{"version":3,"sources":["jsdelivr-header.js","/npm/parsify-fraction@1.0.1/dist/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aACA,OAAO,eAAe,QAAS,aAAc,CAAE,OAAO,IACtD,MAAM,cAAgB,QAAQ,eAMxB,QAAU,IAIG,MAAO,IAClB,IAAI,EAAQ,2BAA2B,KAAK,GAI5C,GAHK,IACD,EAAQ,+BAA+B,KAAK,IAE5C,aAAqC,EAAS,EAAM,GAAI,CAExD,OADa,IAAI,cAAc,QAAQ,OAAO,WAAW,EAAM,KACnD,YAAW,EAC3B,CAEA,OAAO,CAAU,EAIzB,QAAQ,QAAU","file":"/npm/parsify-fraction@1.0.1/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/parsify-fraction@1.0.1/dist/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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fraction_js_1 = require(\"fraction.js\");\n/**\n * This is the wrapper function.\n * It allows you to access certain utilities like the math parser's scope and HTTP fetcher, used internally by Parsify Desktop.\n * It should return another function which will handle the logic.\n */\nconst wrapper = () => {\n    /**\n   * This function receives the expression, which you need to validate and either do something with it, or return the original expression (so that other plugins can use it).\n   */\n    const plugin = async (expression) => {\n        let match = /^(\\d*\\.\\d+)\\s+to\\s+frac$/.exec(expression);\n        if (!match) {\n            match = /^(\\d*\\.\\d+)\\s+to\\s+fraction$/.exec(expression);\n        }\n        if (match === null || match === void 0 ? void 0 : match[1]) {\n            const frac = new fraction_js_1.default(Number.parseFloat(match[1]));\n            return frac.toFraction(true);\n        }\n        // If the expression validation fails, just return the expression\n        return expression;\n    };\n    return plugin;\n};\nexports.default = wrapper;\n"]}