{"version":3,"sources":["jsdelivr-header.js","/npm/extensible-error@1.0.2/src/index.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,aCKA,MAAA,wBAA8B,MAC5B,WAAA,CAAa,GACX,QAGA,OAAO,eAAe,KAAM,UAAW,CACrC,cAAc,EACd,YAAY,EACZ,WAAmB,IAAZ,EAAwB,OAAO,GAAW,KAInD,OAAO,eAAe,KAAM,OAAQ,CAClC,cAAc,EACd,YAAY,EACZ,MAAO,KAAK,YAAY,OAGa,mBAA5B,MAAM,mBAEf,MAAM,kBAAkB,KAAM,KAAK,YAEvC,EAGF,OAAA,QAAS","file":"/npm/extensible-error@1.0.2/dist/src/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/extensible-error@1.0.2/dist/src/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","/**\n * Extensible error class.\n *\n * The built-in Error class is not actually a constructor, but a factory. It\n * doesn't operate on `this`, so if we call it as `super()` it doesn't do\n * anything useful.\n *\n * Nonetheless it does create objects that are instanceof Error. In order to\n * easily subclass error we need our own base class which mimics that behavior\n * but with a true constructor.\n */\nclass ExtensibleError extends Error {\n  constructor (message: string) {\n    super()\n\n    // Set this.message\n    Object.defineProperty(this, 'message', {\n      configurable: true,\n      enumerable: false,\n      value: message !== undefined ? String(message) : ''\n    })\n\n    // Set this.name\n    Object.defineProperty(this, 'name', {\n      configurable: true,\n      enumerable: false,\n      value: this.constructor.name\n    })\n\n    if (typeof Error.captureStackTrace === 'function') {\n      // Set this.stack\n      Error.captureStackTrace(this, this.constructor)\n    }\n  }\n}\n\nexport = ExtensibleError\n"]}