{"version":3,"sources":["jsdelivr-header.js","/npm/chai-uuid@1.0.6/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAEA,OAAO,QAAU,SAAU,EAAM,GAC/B,IAAI,EAAY,EAAK,UACjB,EAAS,EAAK,OA6BlB,SAAS,EAAK,GACZ,IAAI,EAAI,GAAsB,GAG9B,KAAK,OACmB,iBAAd,KAAK,MAAqB,KAAK,gBAAgB,OACvD,uDACA,4CACA,gBACO,KAAS,MAIlB,IAAI,EAnCN,SAAkB,GAChB,OAAO,EAAQ,eAEb,IAAK,KACH,MAAO,2EACT,IAAK,KACH,MAAO,2EACT,IAAK,KACH,MAAO,2EACT,IAAK,KACH,MAAO,2EACT,IAAK,KACH,MAAO,2EACT,QACE,MAAO,6EAEb,CAmBc,CAAS,GACrB,KAAK,OACH,EAAM,KAAK,KAAK,MAChB,uCAAyC,EACzC,qCAAuC,EAE3C,CAGA,EAAU,UAAU,OAAQ,GAC5B,EAAU,UAAU,OAAQ,GAG5B,EAAO,KAAO,SAAU,EAAK,GAC3B,IAAI,EAAK,UAAU,GAAK,GAAG,GAAG,EAAE,KAAK,EACvC,EACA,EAAO,KAAO,EAAO,IACvB","file":"/npm/chai-uuid@1.0.6/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/chai-uuid@1.0.6/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\n\nmodule.exports = function (chai, utils) {\n  var Assertion = chai.Assertion;\n  var assert = chai.assert;\n\n  /**\n   * Returns a valid regex for validating the UUID\n   * @param  {String} version\n   * @return {Regex}\n   */\n  function getRegEx(version) {\n    switch(version.toLowerCase())\n    {\n      case 'v1':\n        return /^[0-9A-F]{8}-[0-9A-F]{4}-[1][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i;\n      case 'v2':\n        return /^[0-9A-F]{8}-[0-9A-F]{4}-[2][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i;\n      case 'v3':\n        return /^[0-9A-F]{8}-[0-9A-F]{4}-[3][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i;\n      case 'v4':\n        return /^[0-9A-F]{8}-[0-9A-F]{4}-[4][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i;\n      case 'v5':\n        return /^[0-9A-F]{8}-[0-9A-F]{4}-[5][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i;\n      default:\n        return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\n    }\n  }\n\n  /**\n   * Validates a uuid\n   * @param  {String} version\n   */\n  function uuid(version) {\n    var v = (version) ? version : '';\n\n    // verify its a valid string\n    this.assert(\n      (typeof this._obj === 'string' || this._obj instanceof String),\n      'expected #{this} to be of type #{exp} but got #{act}',\n      'expected #{this} to not be of type #{exp}',\n      'string',\n      typeof(this._obj)\n    );\n\n    // assert it is a valid uuid\n    var regex = getRegEx(v);\n    this.assert(\n      regex.test(this._obj),\n      'expected #{this} to be a valid UUID ' + v,\n      'expected #{this} to not be a UUID ' + v\n    );    \n  }\n\n  // should / expect methods for chai\n  Assertion.addMethod('uuid', uuid)\n  Assertion.addMethod('guid', uuid)\n\n  // assert methods for chai\n  assert.uuid = function (val, exp) {\n    new chai.Assertion(val).to.be.a.uuid(exp);\n  };\n  assert.guid = assert.uuid;\n};\n"]}