{"version":3,"sources":["jsdelivr-header.js","/npm/err-code@3.0.1/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAcA,SAAS,OAAO,EAAK,GACjB,IAAK,MAAM,KAAO,EACd,OAAO,eAAe,EAAK,EAAK,CAC5B,MAAO,EAAM,GACb,YAAY,EACZ,cAAc,IAItB,OAAO,CACX,CASA,SAAS,YAAY,EAAK,EAAM,GAC5B,IAAK,GAAsB,iBAAR,EACf,MAAM,IAAI,UAAU,oCAGnB,IACD,EAAQ,CAAC,GAGO,iBAAT,IACP,EAAQ,EACR,EAAO,IAGP,IACA,EAAM,KAAO,GAGjB,IACI,OAAO,OAAO,EAAK,EACvB,CAAE,MAAO,GACL,EAAM,QAAU,EAAI,QACpB,EAAM,MAAQ,EAAI,MAElB,MAAM,EAAW,WAAa,EAE9B,EAAS,UAAY,OAAO,OAAO,OAAO,eAAe,IAKzD,OAFe,OAAO,IAAI,EAAY,EAG1C,CACJ,CAEA,OAAO,QAAU","file":"/npm/err-code@3.0.1/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/err-code@3.0.1/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\n/**\n * @typedef {{ [key: string]: any }} Extensions\n * @typedef {Error} Err\n * @property {string} message\n */\n\n/**\n *\n * @param {Error} obj\n * @param {Extensions} props\n * @returns {Error & Extensions}\n */\nfunction assign(obj, props) {\n    for (const key in props) {\n        Object.defineProperty(obj, key, {\n            value: props[key],\n            enumerable: true,\n            configurable: true,\n        });\n    }\n\n    return obj;\n}\n\n/**\n *\n * @param {any} err - An Error\n * @param {string|Extensions} code - A string code or props to set on the error\n * @param {Extensions} [props] - Props to set on the error\n * @returns {Error & Extensions}\n */\nfunction createError(err, code, props) {\n    if (!err || typeof err === 'string') {\n        throw new TypeError('Please pass an Error to err-code');\n    }\n\n    if (!props) {\n        props = {};\n    }\n\n    if (typeof code === 'object') {\n        props = code;\n        code = '';\n    }\n\n    if (code) {\n        props.code = code;\n    }\n\n    try {\n        return assign(err, props);\n    } catch (_) {\n        props.message = err.message;\n        props.stack = err.stack;\n\n        const ErrClass = function () {};\n\n        ErrClass.prototype = Object.create(Object.getPrototypeOf(err));\n\n        // @ts-ignore\n        const output = assign(new ErrClass(), props);\n\n        return output;\n    }\n}\n\nmodule.exports = createError;\n"]}