solve-engine 2.7.0 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/{chunk-5FO4PDIG.js → chunk-3GAWAMT4.js} +2 -2
  2. package/dist/{chunk-5FO4PDIG.js.map → chunk-3GAWAMT4.js.map} +1 -1
  3. package/dist/{chunk-32GC2FHC.cjs → chunk-3HYO3QYW.cjs} +2 -2
  4. package/dist/{chunk-32GC2FHC.cjs.map → chunk-3HYO3QYW.cjs.map} +1 -1
  5. package/dist/{chunk-2JMFUQZH.js → chunk-44EOEWGP.js} +2 -2
  6. package/dist/chunk-44EOEWGP.js.map +1 -0
  7. package/dist/chunk-556Q7VZC.cjs +2 -0
  8. package/dist/chunk-556Q7VZC.cjs.map +1 -0
  9. package/dist/{chunk-B7J24Q5T.cjs → chunk-6ILXAGWX.cjs} +2 -2
  10. package/dist/{chunk-B7J24Q5T.cjs.map → chunk-6ILXAGWX.cjs.map} +1 -1
  11. package/dist/{chunk-CIQOK7Q4.cjs → chunk-6QRHN3I6.cjs} +2 -2
  12. package/dist/chunk-6QRHN3I6.cjs.map +1 -0
  13. package/dist/{chunk-IHZBKT7L.cjs → chunk-6TPXH6Y5.cjs} +3 -3
  14. package/dist/chunk-6TPXH6Y5.cjs.map +1 -0
  15. package/dist/{chunk-W7VOTR2J.cjs → chunk-7VJN65QP.cjs} +3 -3
  16. package/dist/{chunk-W7VOTR2J.cjs.map → chunk-7VJN65QP.cjs.map} +1 -1
  17. package/dist/{chunk-GYX6S6OS.cjs → chunk-AEPS7W3D.cjs} +3 -3
  18. package/dist/chunk-AEPS7W3D.cjs.map +1 -0
  19. package/dist/chunk-BKSKZA4W.cjs +2 -0
  20. package/dist/chunk-BKSKZA4W.cjs.map +1 -0
  21. package/dist/{chunk-VAGS5JS7.cjs → chunk-C65UDMWH.cjs} +2 -2
  22. package/dist/{chunk-VAGS5JS7.cjs.map → chunk-C65UDMWH.cjs.map} +1 -1
  23. package/dist/chunk-DLAKPF5T.js +2 -0
  24. package/dist/chunk-DLAKPF5T.js.map +1 -0
  25. package/dist/{chunk-AQWNEO7M.cjs → chunk-EURCQMZK.cjs} +2 -2
  26. package/dist/{chunk-AQWNEO7M.cjs.map → chunk-EURCQMZK.cjs.map} +1 -1
  27. package/dist/{chunk-G7TBEQRQ.js → chunk-GMSBBLUQ.js} +2 -2
  28. package/dist/{chunk-G7TBEQRQ.js.map → chunk-GMSBBLUQ.js.map} +1 -1
  29. package/dist/chunk-HE7E6M5O.js +3 -0
  30. package/dist/chunk-HE7E6M5O.js.map +1 -0
  31. package/dist/chunk-K4MME6ZT.js +2 -0
  32. package/dist/chunk-K4MME6ZT.js.map +1 -0
  33. package/dist/{chunk-5AMJNF7J.js → chunk-LH7URJZT.js} +3 -3
  34. package/dist/chunk-LH7URJZT.js.map +1 -0
  35. package/dist/{chunk-KXM7EY27.js → chunk-N46DFZLZ.js} +3 -3
  36. package/dist/{chunk-KXM7EY27.js.map → chunk-N46DFZLZ.js.map} +1 -1
  37. package/dist/{chunk-CVY2A3TP.js → chunk-OVNB7MI5.js} +2 -2
  38. package/dist/{chunk-CVY2A3TP.js.map → chunk-OVNB7MI5.js.map} +1 -1
  39. package/dist/{chunk-ZRFUD2LX.cjs → chunk-OWQF6ZOK.cjs} +4 -4
  40. package/dist/{chunk-ZRFUD2LX.cjs.map → chunk-OWQF6ZOK.cjs.map} +1 -1
  41. package/dist/{chunk-HF4H7LYA.js → chunk-P7XWFT45.js} +3 -3
  42. package/dist/{chunk-HF4H7LYA.js.map → chunk-P7XWFT45.js.map} +1 -1
  43. package/dist/{chunk-YAHGSBMC.js → chunk-QYO7IEPR.js} +2 -2
  44. package/dist/{chunk-YAHGSBMC.js.map → chunk-QYO7IEPR.js.map} +1 -1
  45. package/dist/{chunk-2LFLR3VZ.cjs → chunk-SNVPM27Q.cjs} +2 -2
  46. package/dist/{chunk-2LFLR3VZ.cjs.map → chunk-SNVPM27Q.cjs.map} +1 -1
  47. package/dist/{chunk-AR7L5OJ2.js → chunk-T3FBAFRR.js} +2 -2
  48. package/dist/{chunk-AR7L5OJ2.js.map → chunk-T3FBAFRR.js.map} +1 -1
  49. package/dist/chunk-UWAXJX5G.js +2 -0
  50. package/dist/chunk-UWAXJX5G.js.map +1 -0
  51. package/dist/chunk-WEAKI5V5.cjs +2 -0
  52. package/dist/chunk-WEAKI5V5.cjs.map +1 -0
  53. package/dist/{chunk-NXIMGB4S.cjs → chunk-WYIOXAFW.cjs} +2 -2
  54. package/dist/{chunk-NXIMGB4S.cjs.map → chunk-WYIOXAFW.cjs.map} +1 -1
  55. package/dist/{chunk-HTJPV42D.js → chunk-YTCTUBR2.js} +2 -2
  56. package/dist/{chunk-HTJPV42D.js.map → chunk-YTCTUBR2.js.map} +1 -1
  57. package/dist/constants.cjs +1 -1
  58. package/dist/constants.js +1 -1
  59. package/dist/engine.cjs +1 -1
  60. package/dist/engine.js +1 -1
  61. package/dist/format.cjs +1 -1
  62. package/dist/format.js +1 -1
  63. package/dist/index.cjs +1 -1
  64. package/dist/index.js +1 -1
  65. package/dist/language.cjs +1 -1
  66. package/dist/language.js +1 -1
  67. package/dist/lexer.cjs +1 -1
  68. package/dist/lexer.js +1 -1
  69. package/dist/normalizer.cjs +1 -1
  70. package/dist/normalizer.js +1 -1
  71. package/dist/packages.cjs +1 -1
  72. package/dist/packages.d.cts +1 -1
  73. package/dist/packages.d.ts +1 -1
  74. package/dist/packages.js +1 -1
  75. package/dist/testing.cjs +2 -2
  76. package/dist/testing.js +1 -1
  77. package/dist/uom.cjs +1 -1
  78. package/dist/uom.js +1 -1
  79. package/dist/vm.cjs +1 -1
  80. package/dist/vm.js +1 -1
  81. package/dist/worker.cjs +2 -2
  82. package/dist/worker.js +1 -1
  83. package/package.json +1 -1
  84. package/dist/chunk-2JMFUQZH.js.map +0 -1
  85. package/dist/chunk-5AMJNF7J.js.map +0 -1
  86. package/dist/chunk-CIQOK7Q4.cjs.map +0 -1
  87. package/dist/chunk-FWW3M36J.cjs +0 -2
  88. package/dist/chunk-FWW3M36J.cjs.map +0 -1
  89. package/dist/chunk-GYX6S6OS.cjs.map +0 -1
  90. package/dist/chunk-HAEOMJE3.cjs +0 -2
  91. package/dist/chunk-HAEOMJE3.cjs.map +0 -1
  92. package/dist/chunk-IANAMBJQ.cjs +0 -2
  93. package/dist/chunk-IANAMBJQ.cjs.map +0 -1
  94. package/dist/chunk-IHZBKT7L.cjs.map +0 -1
  95. package/dist/chunk-N4HJTHZR.js +0 -2
  96. package/dist/chunk-N4HJTHZR.js.map +0 -1
  97. package/dist/chunk-P5EMTVMJ.js +0 -3
  98. package/dist/chunk-P5EMTVMJ.js.map +0 -1
  99. package/dist/chunk-TRBXW6HW.js +0 -2
  100. package/dist/chunk-TRBXW6HW.js.map +0 -1
  101. package/dist/chunk-WGZ3FNHI.js +0 -2
  102. package/dist/chunk-WGZ3FNHI.js.map +0 -1
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkSOMGSIO4_cjs=require('./chunk-SOMGSIO4.cjs');var d="2.7.0";var m=d;var l={date:{maxOffsetYears:100,minOffsetYears:-100,defaultFormat:"YYYY-MM-DD",inputOrder:"auto"},performance:{defaultCacheSize:2e3,maxDocumentLines:1e5},validation:{maxExpressionLength:2e3,maxComplexity:500,maxNestingDepth:50,autoBalanceParens:false},vm:{maxStackDepth:200,maxInstructions:5e4,maxCollectionSize:1e5,maxAllocatedElements:2e6,maxFunctionCalls:1e4,maxGoalSeekIterations:100},worker:{maxConcurrentWorkers:4,idleTimeoutMs:3e4,maxRetries:3,baseBackoffMs:1e3},diagnostic:{enabled:false,vmTraceEnabled:false},backgroundRefresh:{enabled:false}};function r(s,e){return {date:{...s.date,...e.date},performance:{...s.performance,...e.performance},validation:{...s.validation,...e.validation},vm:{...s.vm,...e.vm},worker:{...s.worker,...e.worker},diagnostic:{...s.diagnostic,...e.diagnostic},backgroundRefresh:{...s.backgroundRefresh,...e.backgroundRefresh}}}var c=class{constructor(e={}){this.config=r(l,e);}get(e){let o=e.split("."),t=this.config;for(let i of o)if(t&&typeof t=="object"&&i in t)t=t[i];else throw chunkSOMGSIO4_cjs.c.config("CONFIG_PATH_NOT_FOUND",`Configuration path not found: ${e}`,{path:e});return t}set(e,o){let t=e.split(".");if(t.length<2)throw chunkSOMGSIO4_cjs.c.config("INVALID_CONFIG_PATH",`Invalid path: ${e}. Must be in format 'section.property'`,{path:e});let i=t[0],u=t[1];if(!(i in this.config))throw chunkSOMGSIO4_cjs.c.config("CONFIG_SECTION_NOT_FOUND",`Configuration section not found: ${i}`,{section:i,path:e});let a=this.config[i];if(a&&typeof a=="object")a[u]=o;else throw chunkSOMGSIO4_cjs.c.config("CONFIG_PROPERTY_NOT_FOUND",`Configuration property not found: ${e}`,{path:e})}getConfig(){return r(this.config,{})}update(e){this.config=r(this.config,e);}reset(){this.config=r(l,{});}validate(){let e=[];return this.config.performance.maxDocumentLines>1e5&&e.push("maxDocumentLines cannot exceed 100,000"),this.config.date.maxOffsetYears>1e3&&e.push("maxOffsetYears cannot exceed 1000"),{valid:e.length===0,error:e.join("; "),warnings:[]}}};exports.a=m;exports.b=l;exports.c=r;exports.d=c;//# sourceMappingURL=chunk-B7J24Q5T.cjs.map
2
- //# sourceMappingURL=chunk-B7J24Q5T.cjs.map
1
+ 'use strict';var chunkSOMGSIO4_cjs=require('./chunk-SOMGSIO4.cjs');var d="2.9.0";var m=d;var l={date:{maxOffsetYears:100,minOffsetYears:-100,defaultFormat:"YYYY-MM-DD",inputOrder:"auto"},performance:{defaultCacheSize:2e3,maxDocumentLines:1e5},validation:{maxExpressionLength:2e3,maxComplexity:500,maxNestingDepth:50,autoBalanceParens:false},vm:{maxStackDepth:200,maxInstructions:5e4,maxCollectionSize:1e5,maxAllocatedElements:2e6,maxFunctionCalls:1e4,maxGoalSeekIterations:100},worker:{maxConcurrentWorkers:4,idleTimeoutMs:3e4,maxRetries:3,baseBackoffMs:1e3},diagnostic:{enabled:false,vmTraceEnabled:false},backgroundRefresh:{enabled:false}};function r(s,e){return {date:{...s.date,...e.date},performance:{...s.performance,...e.performance},validation:{...s.validation,...e.validation},vm:{...s.vm,...e.vm},worker:{...s.worker,...e.worker},diagnostic:{...s.diagnostic,...e.diagnostic},backgroundRefresh:{...s.backgroundRefresh,...e.backgroundRefresh}}}var c=class{constructor(e={}){this.config=r(l,e);}get(e){let o=e.split("."),t=this.config;for(let i of o)if(t&&typeof t=="object"&&i in t)t=t[i];else throw chunkSOMGSIO4_cjs.c.config("CONFIG_PATH_NOT_FOUND",`Configuration path not found: ${e}`,{path:e});return t}set(e,o){let t=e.split(".");if(t.length<2)throw chunkSOMGSIO4_cjs.c.config("INVALID_CONFIG_PATH",`Invalid path: ${e}. Must be in format 'section.property'`,{path:e});let i=t[0],u=t[1];if(!(i in this.config))throw chunkSOMGSIO4_cjs.c.config("CONFIG_SECTION_NOT_FOUND",`Configuration section not found: ${i}`,{section:i,path:e});let a=this.config[i];if(a&&typeof a=="object")a[u]=o;else throw chunkSOMGSIO4_cjs.c.config("CONFIG_PROPERTY_NOT_FOUND",`Configuration property not found: ${e}`,{path:e})}getConfig(){return r(this.config,{})}update(e){this.config=r(this.config,e);}reset(){this.config=r(l,{});}validate(){let e=[];return this.config.performance.maxDocumentLines>1e5&&e.push("maxDocumentLines cannot exceed 100,000"),this.config.date.maxOffsetYears>1e3&&e.push("maxOffsetYears cannot exceed 1000"),{valid:e.length===0,error:e.join("; "),warnings:[]}}};exports.a=m;exports.b=l;exports.c=r;exports.d=c;//# sourceMappingURL=chunk-6ILXAGWX.cjs.map
2
+ //# sourceMappingURL=chunk-6ILXAGWX.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../package.json","../src/constants/version.ts","../src/constants/Configuration.ts"],"names":["version","ENGINE_VERSION","DEFAULT_CONFIG","mergeEngineConfig","base","override","ConfigManager","config","path","keys","current","key","ErrorFactory","value","section","property","sectionConfig","errors"],"mappings":"mEAEE,IAAAA,EAAW,OA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B,CAAA,CAC/D,GAAIE,CAAAA,EAAiB,OAAOA,CAAAA,EAAkB,QAAA,CAC3CA,EAAqDD,CAAQ,CAAA,CAAIF,OAElE,MAAMD,mBAAAA,CAAa,OACjB,2BAAA,CACA,CAAA,kCAAA,EAAqCJ,CAAI,CAAA,CAAA,CACzC,CAAE,IAAA,CAAAA,CAAK,CACT,CAEJ,CAUA,WAA0B,CACxB,OAAOL,CAAAA,CAAkB,IAAA,CAAK,OAAQ,EAAE,CAC1C,CAKA,MAAA,CAAOI,EAAqC,CAC1C,IAAA,CAAK,OAASJ,CAAAA,CAAkB,IAAA,CAAK,OAAQI,CAAM,EACrD,CAcA,KAAA,EAAc,CACZ,KAAK,MAAA,CAASJ,CAAAA,CAAkBD,CAAAA,CAAgB,EAAE,EACpD,CAKA,UAA6B,CAC3B,IAAMe,EAAmB,EAAC,CAG1B,OAAI,IAAA,CAAK,MAAA,CAAO,YAAY,gBAAA,CAAmB,GAAA,EAC7CA,EAAO,IAAA,CAAK,wCAAwC,EAIlD,IAAA,CAAK,MAAA,CAAO,IAAA,CAAK,cAAA,CAAiB,KACpCA,CAAAA,CAAO,IAAA,CAAK,mCAAmC,CAAA,CAG1C,CACL,MAAOA,CAAAA,CAAO,MAAA,GAAW,EACzB,KAAA,CAAOA,CAAAA,CAAO,KAAK,IAAI,CAAA,CACvB,SAAU,EACZ,CACF,CACF","file":"chunk-B7J24Q5T.cjs","sourcesContent":["{\n \"name\": \"solve-engine\",\n \"version\": \"2.7.0\",\n \"description\": \"An embeddable expression engine for natural-language calculations: units, currencies, percentages, dates and matrices, with the parsing and evaluation plumbing already built.\",\n \"keywords\": [\n \"expression-evaluator\",\n \"calculator\",\n \"bytecode-vm\",\n \"parser\",\n \"lexer\",\n \"dsl\",\n \"markdown\",\n \"obsidian\"\n ],\n \"license\": \"MIT\",\n \"author\": \"Liam Riddell\",\n \"homepage\": \"https://liamriddell.github.io/solve-engine/\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/LiamRiddell/solve-engine.git\",\n \"directory\": \"packages/engine\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/LiamRiddell/solve-engine/issues\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"type\": \"module\",\n \"engines\": {\n \"node\": \">=22\"\n },\n \"files\": [\n \"dist\",\n \"LICENSE\"\n ],\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./dist/index.d.ts\",\n \"default\": \"./dist/index.js\"\n },\n \"require\": {\n \"types\": \"./dist/index.d.cts\",\n \"default\": \"./dist/index.cjs\"\n }\n },\n \"./engine\": {\n \"import\": {\n \"types\": \"./dist/engine.d.ts\",\n \"default\": \"./dist/engine.js\"\n },\n \"require\": {\n \"types\": \"./dist/engine.d.cts\",\n \"default\": \"./dist/engine.cjs\"\n }\n },\n \"./vm\": {\n \"import\": {\n \"types\": \"./dist/vm.d.ts\",\n \"default\": \"./dist/vm.js\"\n },\n \"require\": {\n \"types\": \"./dist/vm.d.cts\",\n \"default\": \"./dist/vm.cjs\"\n }\n },\n \"./format\": {\n \"import\": {\n \"types\": \"./dist/format.d.ts\",\n \"default\": \"./dist/format.js\"\n },\n \"require\": {\n \"types\": \"./dist/format.d.cts\",\n \"default\": \"./dist/format.cjs\"\n }\n },\n \"./language\": {\n \"import\": {\n \"types\": \"./dist/language.d.ts\",\n \"default\": \"./dist/language.js\"\n },\n \"require\": {\n \"types\": \"./dist/language.d.cts\",\n \"default\": \"./dist/language.cjs\"\n }\n },\n \"./packages\": {\n \"import\": {\n \"types\": \"./dist/packages.d.ts\",\n \"default\": \"./dist/packages.js\"\n },\n \"require\": {\n \"types\": \"./dist/packages.d.cts\",\n \"default\": \"./dist/packages.cjs\"\n }\n },\n \"./constants\": {\n \"import\": {\n \"types\": \"./dist/constants.d.ts\",\n \"default\": \"./dist/constants.js\"\n },\n \"require\": {\n \"types\": \"./dist/constants.d.cts\",\n \"default\": \"./dist/constants.cjs\"\n }\n },\n \"./lexer\": {\n \"import\": {\n \"types\": \"./dist/lexer.d.ts\",\n \"default\": \"./dist/lexer.js\"\n },\n \"require\": {\n \"types\": \"./dist/lexer.d.cts\",\n \"default\": \"./dist/lexer.cjs\"\n }\n },\n \"./parser\": {\n \"import\": {\n \"types\": \"./dist/parser.d.ts\",\n \"default\": \"./dist/parser.js\"\n },\n \"require\": {\n \"types\": \"./dist/parser.d.cts\",\n \"default\": \"./dist/parser.cjs\"\n }\n },\n \"./normalizer\": {\n \"import\": {\n \"types\": \"./dist/normalizer.d.ts\",\n \"default\": \"./dist/normalizer.js\"\n },\n \"require\": {\n \"types\": \"./dist/normalizer.d.cts\",\n \"default\": \"./dist/normalizer.cjs\"\n }\n },\n \"./resolvers\": {\n \"import\": {\n \"types\": \"./dist/resolvers.d.ts\",\n \"default\": \"./dist/resolvers.js\"\n },\n \"require\": {\n \"types\": \"./dist/resolvers.d.cts\",\n \"default\": \"./dist/resolvers.cjs\"\n }\n },\n \"./errors\": {\n \"import\": {\n \"types\": \"./dist/errors.d.ts\",\n \"default\": \"./dist/errors.js\"\n },\n \"require\": {\n \"types\": \"./dist/errors.d.cts\",\n \"default\": \"./dist/errors.cjs\"\n }\n },\n \"./utilities\": {\n \"import\": {\n \"types\": \"./dist/utilities.d.ts\",\n \"default\": \"./dist/utilities.js\"\n },\n \"require\": {\n \"types\": \"./dist/utilities.d.cts\",\n \"default\": \"./dist/utilities.cjs\"\n }\n },\n \"./uom\": {\n \"import\": {\n \"types\": \"./dist/uom.d.ts\",\n \"default\": \"./dist/uom.js\"\n },\n \"require\": {\n \"types\": \"./dist/uom.d.cts\",\n \"default\": \"./dist/uom.cjs\"\n }\n },\n \"./services\": {\n \"import\": {\n \"types\": \"./dist/services.d.ts\",\n \"default\": \"./dist/services.js\"\n },\n \"require\": {\n \"types\": \"./dist/services.d.cts\",\n \"default\": \"./dist/services.cjs\"\n }\n },\n \"./worker\": {\n \"import\": {\n \"types\": \"./dist/worker.d.ts\",\n \"default\": \"./dist/worker.js\"\n },\n \"require\": {\n \"types\": \"./dist/worker.d.cts\",\n \"default\": \"./dist/worker.cjs\"\n }\n },\n \"./testing\": {\n \"import\": {\n \"types\": \"./dist/testing.d.ts\",\n \"default\": \"./dist/testing.js\"\n },\n \"require\": {\n \"types\": \"./dist/testing.d.cts\",\n \"default\": \"./dist/testing.cjs\"\n }\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"prepublishOnly\": \"npm run build && node ../../scripts/assert-publishable.mjs .\",\n \"dev\": \"tsup --watch\",\n \"test\": \"jest --config jest.config.cjs --no-coverage\",\n \"typecheck\": \"tsgo --noEmit --skipLibCheck\",\n \"typecheck:tsc\": \"tsc --noEmit --skipLibCheck\"\n },\n \"dependencies\": {\n \"@tanstack/query-core\": \"^5.100.10\"\n },\n \"devDependencies\": {\n \"@jest/globals\": \"^30.4.1\",\n \"@types/node\": \"^26.2.0\",\n \"convert\": \"^7.0.0\",\n \"jest\": \"^30.4.2\",\n \"ts-jest\": \"^29.4.12\",\n \"tsup\": \"8.5.1\",\n \"typescript\": \"5.9.3\"\n },\n \"//sideEffects\": \"Load-bearing claim, not boilerplate. tsup's splitting emits bare chunk imports at the top of dist/index.js, and this field tells Rollup, webpack and Vite they may delete them, which esbuild reports as [ignored-bare-import] once per import during `npm run size`. The engine does have module-level work to lose: registerAllTokenTypes(), _PrecedenceParser.BP_TABLE and its cached token ids, and several process-wide registries. It is safe because every chunk doing that work is also imported for its bindings somewhere, so no bundler can drop it. That is a property of how tsup currently splits the code rather than a design guarantee, so `npm run smoke:bundled` (scripts/check-tree-shaking.mjs) proves it on every run of `npm run verify` instead of assuming it, and its header explains the two fixes if it ever stops holding.\",\n \"sideEffects\": false\n}\n","/**\n * The running engine's own semver version, sourced directly from this\n * package's package.json so it can never drift from what's actually\n * published. Exists so IEnginePackage.engineVersion range checks\n * (api/EngineVersionCompatibility.ts) have something real to check\n * against.\n */\nimport { version } from \"../../package.json\";\n\n/**\n * The running engine's version, taken from package.json.\n *\n * What a package's `engineVersion` range is checked against at registration.\n * A prerelease is compared by its coerced release version, so a 1.0.0 beta\n * satisfies `^1.0.0`. See `api/EngineVersionCompatibility.ts`.\n */\nexport const ENGINE_VERSION: string = version;\n","/**\n * Configuration Module for solve-js Engine\n * \n * This module provides the **single source of truth** for all engine configuration.\n * Every configurable aspect of the engine, from safety limits and performance\n * budgets to VM constraints and worker pool sizing, is defined here.\n * \n * ### Design principles\n * \n * 1. **Engine owns its config.** The engine defines its own config shape and defaults.\n * Consumers (e.g., the Obsidian plugin) pass partial overrides; all unspecified\n * fields fall back to `DEFAULT_CONFIG`.\n * \n * 2. **Self-documenting.** Every interface and field has descriptive JSDoc so the\n * config is understandable at a glance, whether you're using the engine as an\n * npm package or reading the source.\n * \n * 3. **Minimal consumer knowledge.** Consumers only need to pass `Partial<EngineConfig>`.\n * They don't need to replicate the full config shape, just the fields they\n * want to override.\n * \n * @module Configuration\n */\n\nimport { ErrorFactory } from \"@solve-js/errors/UnifiedErrorFramework\";\n\n/**\n * A host's test for whether a calendar date is a public holiday, given the\n * `Date` for that day at local midnight. Return `true` to exclude it from\n * working-day arithmetic.\n */\nexport type HolidayPredicate = (date: Date) => boolean;\n\n/**\n * The host-supplied public-holiday calendar, in the same \"bring your own data\"\n * shape the stocks and weather packages already use for a host callback (see\n * `packages/stocks/StocksPackage.ts`): weekends are decidable from the date\n * alone, holidays are not, so they come from the host or not at all.\n *\n * Either a {@link HolidayPredicate}, for a host that computes holidays itself\n * (an existing library, a region rule), or an iterable of specific dates as\n * `YYYY-MM-DD` strings, epoch-millisecond numbers or `Date` objects, for a host\n * that just has a list. Resolved to one internal predicate by\n * `vm/HolidayCalendar.ts`'s `resolveHolidayPredicate()`.\n *\n * Left unset, working-day arithmetic skips weekends only, which is the honest\n * default: the engine excludes exactly the days it can prove are non-working.\n */\nexport type HolidayCalendar = HolidayPredicate | Iterable<string | number | Date>;\n\n/**\n * Date-related configuration.\n * Controls the bounds and formatting for date/time expression evaluation\n * (e.g., `today + 20 days`, `last monday`).\n */\n/**\n * How an ambiguous all-numeric date literal is read.\n *\n * - `'auto'`: by separator, the historic behaviour. A slash date is\n * day-first (`25/12/2023`), a hyphen date is month-first (`12-25-2023`)\n * unless its first group is four digits, which makes it ISO (`2023-12-25`).\n * - `'DMY'` / `'MDY'` / `'YMD'`: a fixed order for every numeric separator, so\n * a host can match its readers' locale. `'MDY'` is what lets a US reader's\n * `12/25/2023` parse, which `'auto'` refuses because the slash defaults to\n * day-first.\n *\n * Only the all-numeric literals are affected. A spelled-out month (`March 9,\n * 2024`) is never ambiguous, and an ISO timestamp is always read as ISO.\n */\nexport type DateInputOrder = 'auto' | 'DMY' | 'MDY' | 'YMD';\n\n/** Date-related engine configuration: offset limits, input order, holidays. */\nexport interface DateConfig {\n /**\n * The order an ambiguous all-numeric date literal is read in. Defaults to\n * `'auto'` (by separator, the historic behaviour). See {@link DateInputOrder}.\n */\n readonly inputOrder: DateInputOrder;\n /**\n * How far forward a date offset whose COST grows with the offset may reach,\n * in years. Enforced by `vm/VM.ts`'s `addBusinessDays()`.\n *\n * Bounds the walk, not the calendar. Every other date offset in the engine\n * is arithmetic on a Date field, so `today + 100000 days` costs exactly what\n * one day costs and needs no ceiling; workdays are the one offset that has\n * to step day by day, because which days are skipped depends on where each\n * step lands. `today + 100000000 workdays` therefore froze the host for\n * thirteen seconds inside a single ADD opcode (where `vm.maxInstructions`\n * cannot see it) and then answered \"Invalid Date\", and a trillion never\n * returned at all.\n *\n * Release hardening: this field was declared, documented as a \"safety\n * limit\", and read nowhere, so it bounded nothing. A limit a host can\n * configure and the engine ignores is worse than no limit, because it reads\n * as protection that is not there.\n */\n readonly maxOffsetYears: number;\n /** How far BACK the same walk may reach, in years, as a negative number. See {@link maxOffsetYears}. */\n readonly minOffsetYears: number;\n /** Default date string format for display (moment.js format string) */\n readonly defaultFormat: string;\n /**\n * Public-holiday calendar for working-day arithmetic (`N working days after\n * <date>`, `working days between <date> and <date>`, `<date> + N workdays`).\n * See {@link HolidayCalendar}.\n *\n * Optional and unset by default: with no calendar, working-day arithmetic\n * skips weekends only. A host that wants holidays excluded too supplies one\n * here (`new ExpressionEngine({ config: { date: { holidays } } })`), the\n * same way stocks and weather take a host data source. Threaded into the VM\n * by `engine/ExpressionEngine.ts` exactly as {@link maxOffsetYears} is,\n * because working-day math is a VM operation several grammar forms share, so\n * the calendar has to be one source the VM owns rather than per-package state\n * the VM cannot see.\n */\n readonly holidays?: HolidayCalendar;\n}\n\n/**\n * Performance-related configuration.\n * Controls caching, timeouts, and processing limits to prevent runaway\n * resource consumption on large documents.\n */\nexport interface PerformanceConfig {\n /**\n * Maximum number of entries in {@link ExpressionEngine}'s bytecode cache\n * (per-instance, keyed by expression text) before the oldest entry is\n * evicted. Raise this for documents with many distinct expressions if\n * repeated re-evaluation (e.g. scrolling) is re-parsing instead of\n * hitting cache, bug fix (release hardening pass): this field used to\n * be read nowhere; the cache size was a hardcoded, unconfigurable\n * constant. Note this does NOT bound {@link LineCache}, which has no\n * size limit of its own.\n */\n readonly defaultCacheSize: number;\n /**\n * Maximum lines a document may have for the engine to process it in one\n * pass. Enforced by `ExpressionEngine.parseDocument()` and by\n * `engine/DocumentModel.ts`'s `setDocument()`, the two entry points that\n * take a whole document.\n *\n * A document costs memory per line whatever each line says: a parsed line\n * record, a cache entry, a dependency-graph node. Two hundred thousand\n * lines of `1 + 1` therefore exhausted the heap and aborted the process\n * before any per-line limit had anything to object to, which is the same\n * shape of hole as an unbounded expression and needs the same kind of\n * ceiling. Refusing the document names the limit; a host that genuinely has\n * a larger one raises this field.\n *\n * Release hardening: declared and read nowhere until now.\n */\n readonly maxDocumentLines: number;\n}\n\n/**\n * Validation / safety-limit configuration.\n * Protects against runaway expressions that could cause excessive memory use\n * or stack overflow. These limits are checked during lexing and parsing.\n */\n/** Bounds on untrusted input: expression length and nesting depth. */\nexport interface ValidationConfig {\n /** Maximum expression length in characters. Prevents excessively long strings from entering the pipeline. */\n readonly maxExpressionLength: number;\n /** Maximum expression complexity score (`tokens + functionCalls×5 + nestingDepth×10`). Protects against deeply nested or combinatorially complex expressions. */\n readonly maxComplexity: number;\n /** Maximum parentheses nesting depth. Prevents stack overflow in the recursive-descent parser. */\n readonly maxNestingDepth: number;\n /**\n * Auto-balance unmatched parentheses by appending missing closing parens\n * or prepending missing opening parens. When disabled, unbalanced expressions\n * cause parse errors instead of being silently corrected.\n *\n * Disabled by default for strict parsing. Enable for forgiving user input\n * (e.g., chat-style calculators where users often omit closing parens).\n * Has zero overhead when disabled, the O(n) paren-count scan is skipped.\n */\n readonly autoBalanceParens: boolean;\n}\n\n/**\n * Worker pool configuration.\n * Controls the parallel execution workers used for batch evaluation.\n */\nexport interface WorkerConfig {\n /** Maximum number of concurrent Web Workers allowed */\n readonly maxConcurrentWorkers: number;\n /** Time (ms) a worker stays alive while idle before being terminated */\n readonly idleTimeoutMs: number;\n /** Maximum retry attempts for a failed worker operation */\n readonly maxRetries: number;\n /** Base backoff delay (ms) between retries (exponential backoff applied on top) */\n readonly baseBackoffMs: number;\n} /**\n * Diagnostic / telemetry configuration.\n * Controls the diagnostic event pipeline for profiling and debugging.\n * All diagnostics are disabled by default for maximum production performance.\n */\n export interface DiagnosticConfig {\n /** Master switch: enable the diagnostic pipeline (collectors receive events for all pipeline stages) */\n readonly enabled: boolean;\n /** Enable VM trace mode, emits per-opcode execution events (very verbose; disables some optimizations) */\n readonly vmTraceEnabled: boolean;\n }\n\n /**\n * Proactive background refresh of live async values.\n *\n * Off by default. When a live value (a stock quote, an FX rate) has gone\n * stale, today it only refetches on the next re-evaluation (a keystroke), so a\n * note left open silently ages. With this enabled, the engine drives a refetch\n * on each such value's own cadence (the resolver's `refetchIntervalMs`) for the\n * values currently on screen, and pushes the fresh result to the host through\n * the same event stream the pull path uses. It needs timers and a live editor\n * consuming that stream, so a headless or batch host leaves it off.\n */\n export interface BackgroundRefreshConfig {\n /** Master switch. When false, no timers run and every value refreshes only on re-evaluation. */\n readonly enabled: boolean;\n }\n\n /**\n * Virtual Machine configuration.\n * Controls the internal bytecode VM that executes compiled expressions.\n */\n export interface VMConfig {\n /** Maximum stack depth (value slots) for VM execution, prevents stack overflow in recursive/pratt-parser generated bytecode */\n readonly maxStackDepth: number;\n /** Maximum opcodes executed per expression, halts runaway infinite loops */\n readonly maxInstructions: number;\n /**\n * Maximum elements a collection may be expanded to before `map`/`reduce`/\n * `sum`/`prod` will iterate it.\n *\n * A Range is stored as its two bounds and costs nothing until something\n * materializes it, at which point it becomes one Value per element. Twenty\n * characters (`sum(x, 1:100000000)`) therefore asked for a hundred million\n * of them, and neither `maxInstructions` nor `maxStackDepth` could see it:\n * the expansion happens inside a single opcode, so the instruction counter\n * is never consulted while it runs, and the elements never reach the value\n * stack. V8 aborted the whole process with \"Reached heap limit\", which a\n * host embedding the engine cannot catch.\n */\n readonly maxCollectionSize: number;\n /**\n * Maximum elements (collection Values, matrix cells) one evaluation may\n * materialize in total.\n *\n * `maxCollectionSize` above bounds a single collection. This bounds the sum\n * of everything an expression asks for, which is a different question and\n * the one that actually protects the host: two collections that are\n * individually legal are legal together, and an operation whose result is\n * the PRODUCT of two legal operands is bounded by neither of them. A matrix\n * multiply is exactly that shape, so three lines within every other limit\n * (`:a = map(1*x, 0:20000)`, `:b = transpose(a)`, `b * a`) asked for four\n * hundred million cells and aborted the process.\n *\n * Counted in elements rather than bytes, because a count is what a call\n * site has before it allocates. An element is 8 bytes as a numeric matrix\n * cell and closer to a hundred as a full Value, so the default is worth\n * roughly 16 MB of matrix or 200 MB of expanded collection: far past any\n * document and far short of what an editor cannot survive.\n */\n readonly maxAllocatedElements: number;\n /**\n * Maximum user-defined-function calls one evaluation may make in TOTAL,\n * however deeply or widely they nest.\n *\n * `maxFunctionRecursionDepth` bounds how DEEP calls nest and cannot see\n * how MANY there are, and those are different numbers. Twenty-two lines of\n * `f(n)(v) = f(n-1)(v) + f(n-1)(v)` reach a depth of only 22 against a\n * limit of 50, and make 2,097,152 calls doing it: a fatal heap abort in\n * under a second. `maxInstructions` cannot bound it either, because\n * `executeBytecode()` re-enters itself per call and each reentrant call\n * gets its OWN instruction count, so recursion refreshes its allowance on\n * the way in. This is the tally that does not refresh; see\n * `vm/AllocationBudget.ts`, which holds it for the same reason it holds\n * the element tally.\n *\n * Counted in calls rather than in the instructions they run, because the\n * call is the thing that multiplies: every call allocates a frame, its\n * arguments and its result whatever its body says.\n */\n readonly maxFunctionCalls: number;\n /**\n * Hard ceiling on how many bisection steps goal seek (`solve line N for\n * <var> = <target>`, see `packages/goalseek/`) may take before it gives up\n * with a structured error rather than continuing.\n *\n * Goal seek re-evaluates the target line's expression once per step while\n * narrowing an interval, and an untrusted document must never be able to\n * make that loop spin. `maxInstructions` bounds each individual\n * re-evaluation, but not how many of them the search performs, so this is\n * the tally that bounds the search itself, the same reason `maxFunctionCalls`\n * exists alongside `maxInstructions`. Bisection halves the interval every\n * step, so a hundred steps resolves an input to roughly one part in 2^100:\n * far past any precision a document needs, and a definite stop either way.\n */\n readonly maxGoalSeekIterations: number;\n }\n\n/**\n * Complete engine configuration.\n *\n * Every field has a default in `DEFAULT_CONFIG`. To customize, pass a\n * `Partial<EngineConfig>` when constructing `ExpressionEngine`. Only the\n * sections/fields you supply are overridden; all others use their defaults.\n *\n * @example\n * ```typescript\n * import { ExpressionEngine } from \"solve-js\";\n *\n * const engine = new ExpressionEngine({ config: {\n * validation: {\n * maxExpressionLength: 1000,\n * maxComplexity: 200,\n * },\n * // date, performance, vm, worker, diagnostic all use defaults\n * } });\n * ```\n */\nexport interface EngineConfig {\n /** Date/time expression evaluation bounds and formatting */\n readonly date: DateConfig;\n /** Performance budgets and cache sizing */\n readonly performance: PerformanceConfig;\n /** Safety limits for expression complexity */\n readonly validation: ValidationConfig;\n /** Internal bytecode VM configuration */\n readonly vm: VMConfig;\n /** Parallel worker pool configuration */\n readonly worker: WorkerConfig;\n /** Diagnostic pipeline configuration */\n readonly diagnostic: DiagnosticConfig;\n /** Proactive background refresh of live async values */\n readonly backgroundRefresh: BackgroundRefreshConfig;\n }\n\n/**\n * A partial {@link EngineConfig} override, one section at a time.\n *\n * Overrides are merged per section over {@link DEFAULT_CONFIG}, so you can set a\n * single field of one section (`{ validation: { maxExpressionLength: 1000 } }`)\n * and keep every other default in that section. A plain `Partial<EngineConfig>`\n * cannot express that, it demands a whole section object, which is why the\n * documented overrides never typechecked against it. This is the type the\n * constructor and {@link createEngine} accept.\n */\nexport type EngineConfigOverride = {\n readonly [K in keyof EngineConfig]?: Partial<EngineConfig[K]>;\n};\n\n/**\n * Default configuration values\n */\nexport const DEFAULT_CONFIG: EngineConfig = {\n date: {\n // A century of workdays is about 26,000 steps, which is microseconds,\n // and past any offset a person means. The walk is what these bound; see\n // DateConfig above for why no other date offset needs a ceiling.\n maxOffsetYears: 100,\n minOffsetYears: -100,\n defaultFormat: 'YYYY-MM-DD',\n inputOrder: 'auto',\n },\n performance: {\n // Preserves the effective cache size the hardcoded (now-removed)\n // BYTECODE_CACHE_MAX_ENTRIES constant had, so wiring this field up\n // doesn't silently shrink the default cache for existing consumers.\n defaultCacheSize: 2000,\n // Raised from the 10,000 this field was declared with, which was never\n // enforced and turned out to be under what this engine already supports:\n // its paging design is tested against a 20,000-line document\n // (`engine/PageManager.ts` and its spec) and its throughput benchmark\n // parses a 50,000-line one. Twice the largest of those, and the same\n // number `ConfigManager.validate()` already refuses to go above.\n //\n // Measured under a 256MB heap: setting a 100,000-line document costs\n // 64MB, evaluating every line of a 20,000-line one costs 106MB, and\n // 200,000 lines aborts the process before a single expression is looked\n // at. A host with a small heap should lower this; the ceiling is here to\n // stop the size that cannot work anywhere.\n maxDocumentLines: 100000,\n },\n validation: {\n maxExpressionLength: 2000,\n maxComplexity: 500,\n maxNestingDepth: 50,\n autoBalanceParens: false,\n },\n vm: {\n maxStackDepth: 200,\n maxInstructions: 50000,\n // Two orders of magnitude above anything a person types by hand (the\n // longest range in the test suite is 1000 elements) and small enough\n // that expanding it is measured in milliseconds rather than in whether\n // the host survives.\n maxCollectionSize: 100000,\n // Twenty times the single-collection ceiling above, so an expression may\n // legitimately handle a number of large collections, and two hundred\n // times below the allocation that took the process down.\n maxAllocatedElements: 2000000,\n // Six hundred times the largest call count any test or example makes\n // (five levels of composition is sixteen calls), and small enough that\n // the calls it does allow cost single-digit megabytes rather than the\n // heap. A document that needs more than ten thousand calls on one line\n // is doing something a calculator was not built for.\n maxFunctionCalls: 10000,\n // A hundred bisection steps resolve an input to one part in 2^100, far\n // finer than any document needs and a firm stop for an untrusted one. A\n // continuous, monotonic relationship converges in tens of steps, well\n // under this; hitting it means the target is unreachable or the\n // relationship is not the smooth one goal seek assumes.\n maxGoalSeekIterations: 100,\n },\n worker: {\n maxConcurrentWorkers: 4,\n idleTimeoutMs: 30000,\n maxRetries: 3,\n baseBackoffMs: 1000,\n },\n diagnostic: {\n enabled: false,\n vmTraceEnabled: false,\n },\n backgroundRefresh: {\n enabled: false,\n },\n };\n\n/**\n * Merge a partial config override onto a base `EngineConfig`, section by\n * section, `{ ...base.section, ...override.section }` for each of the 7\n * top-level sections, not a single top-level spread.\n *\n * A shallow `{ ...base, ...override }` at the TOP level replaces an entire\n * section wholesale the moment a caller overrides even one field in it\n * (e.g. `{ performance: { defaultCacheSize: 500 } }` would silently drop\n * every other `performance.*` field back to `undefined`, not to its\n * default). This function exists specifically so every config consumer\n * shares one correct merge instead of each hand-rolling (and risking) its\n * own. `ConfigManager` and `ExpressionEngine` both call this rather than\n * either duplicating the section list or instantiating a whole\n * `ConfigManager` just to reuse its private merge logic.\n */\nexport function mergeEngineConfig(\n base: EngineConfig,\n override: EngineConfigOverride\n): EngineConfig {\n return {\n date: { ...base.date, ...override.date },\n performance: { ...base.performance, ...override.performance },\n validation: { ...base.validation, ...override.validation },\n vm: { ...base.vm, ...override.vm },\n worker: { ...base.worker, ...override.worker },\n diagnostic: { ...base.diagnostic, ...override.diagnostic },\n backgroundRefresh: { ...base.backgroundRefresh, ...override.backgroundRefresh },\n };\n}\n\n/**\n * Configuration manager for engine settings\n *\n * @example\n * ```typescript\n * const configManager = new ConfigManager();\n * configManager.set('performance.defaultCacheSize', 2000);\n * const cacheSize = configManager.get('performance.defaultCacheSize');\n * ```\n */\nexport class ConfigManager {\n private config: EngineConfig;\n\n constructor(config: Partial<EngineConfig> = {}) {\n this.config = mergeEngineConfig(DEFAULT_CONFIG, config);\n }\n\n /**\n * Get configuration value by path\n * \n * @param path - Dot-notation path to config value\n * @returns Configuration value\n */\n get<T>(path: string): T {\n const keys = path.split('.');\n let current: unknown = this.config;\n\n for (const key of keys) {\n if (current && typeof current === 'object' && key in current) {\n current = (current as Record<string, unknown>)[key];\n } else {\n throw ErrorFactory.config(\n \"CONFIG_PATH_NOT_FOUND\",\n `Configuration path not found: ${path}`,\n { path }\n );\n }\n }\n\n return current as T;\n }\n\n /**\n * Set configuration value by path\n * \n * @param path - Dot-notation path to config value\n * @param value - New value\n */\n set<T>(path: string, value: T): void {\n const keys = path.split('.');\n if (keys.length < 2) {\n throw ErrorFactory.config(\n \"INVALID_CONFIG_PATH\",\n `Invalid path: ${path}. Must be in format 'section.property'`,\n { path }\n );\n }\n \n const section = keys[0];\n const property = keys[1];\n \n if (!(section in this.config)) {\n throw ErrorFactory.config(\n \"CONFIG_SECTION_NOT_FOUND\",\n `Configuration section not found: ${section}`,\n { section, path }\n );\n }\n \n const sectionConfig = this.config[section as keyof EngineConfig];\n if (sectionConfig && typeof sectionConfig === 'object') {\n (sectionConfig as unknown as Record<string, unknown>)[property] = value;\n } else {\n throw ErrorFactory.config(\n \"CONFIG_PROPERTY_NOT_FOUND\",\n `Configuration property not found: ${path}`,\n { path }\n );\n }\n }\n\n /**\n * Get complete configuration.\n *\n * A detached copy, section objects included. A top-level spread would hand\n * the caller this manager's own section objects, so `getConfig().vm.x = 1`\n * would be an undeclared back door into {@link set}, bypassing its path\n * validation and reaching every later {@link get}.\n */\n getConfig(): EngineConfig {\n return mergeEngineConfig(this.config, {});\n }\n\n /**\n * Update multiple configuration values\n */\n update(config: Partial<EngineConfig>): void {\n this.config = mergeEngineConfig(this.config, config);\n }\n\n /**\n * Reset to default configuration.\n *\n * Goes through {@link mergeEngineConfig} for the same reason the constructor\n * does. A top-level `{ ...DEFAULT_CONFIG }` copies the six section\n * references, not the sections, so after a reset this manager's\n * `performance` object WAS `DEFAULT_CONFIG.performance` and the next\n * `set('performance.x', ...)` wrote into the module constant. That constant\n * is what every `ExpressionEngine` is built from, so one manager's reset\n * could change the cache size, instruction ceiling or allocation budget of\n * every engine constructed later in the process.\n */\n reset(): void {\n this.config = mergeEngineConfig(DEFAULT_CONFIG, {});\n }\n\n /**\n * Validate configuration values\n */\n validate(): ValidationResult {\n const errors: string[] = [];\n\n // Validate performance config\n if (this.config.performance.maxDocumentLines > 100000) {\n errors.push('maxDocumentLines cannot exceed 100,000');\n }\n\n // Validate date config\n if (this.config.date.maxOffsetYears > 1000) {\n errors.push('maxOffsetYears cannot exceed 1000');\n }\n\n return {\n valid: errors.length === 0,\n error: errors.join('; '),\n warnings: []\n };\n }\n}\n\n/**\n * Result type for {@link ConfigManager.validate}.\n */\nexport interface ValidationResult {\n valid: boolean;\n error?: string;\n warnings?: string[];\n}\n\n"]}
1
+ {"version":3,"sources":["../package.json","../src/constants/version.ts","../src/constants/Configuration.ts"],"names":["version","ENGINE_VERSION","DEFAULT_CONFIG","mergeEngineConfig","base","override","ConfigManager","config","path","keys","current","key","ErrorFactory","value","section","property","sectionConfig","errors"],"mappings":"mEAEE,IAAAA,EAAW,OAAA,CCcN,IAAMC,EAAyBD,ECkV/B,IAAME,EAA+B,CACzC,IAAA,CAAM,CAIJ,cAAA,CAAgB,IAChB,cAAA,CAAgB,IAAA,CAChB,cAAe,YAAA,CACf,UAAA,CAAY,MACd,CAAA,CACA,WAAA,CAAa,CAIX,gBAAA,CAAkB,IAalB,gBAAA,CAAkB,GACpB,EACC,UAAA,CAAY,CACV,oBAAqB,GAAA,CACr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AAAA,CAAkB,IAAA,CAAK,OAAQ,EAAE,CAC1C,CAKA,MAAA,CAAOI,EAAqC,CAC1C,IAAA,CAAK,OAASJ,CAAAA,CAAkB,IAAA,CAAK,OAAQI,CAAM,EACrD,CAcA,KAAA,EAAc,CACZ,KAAK,MAAA,CAASJ,CAAAA,CAAkBD,CAAAA,CAAgB,EAAE,EACpD,CAKA,UAA6B,CAC3B,IAAMe,EAAmB,EAAC,CAG1B,OAAI,IAAA,CAAK,MAAA,CAAO,YAAY,gBAAA,CAAmB,GAAA,EAC7CA,EAAO,IAAA,CAAK,wCAAwC,EAIlD,IAAA,CAAK,MAAA,CAAO,IAAA,CAAK,cAAA,CAAiB,KACpCA,CAAAA,CAAO,IAAA,CAAK,mCAAmC,CAAA,CAG1C,CACL,MAAOA,CAAAA,CAAO,MAAA,GAAW,EACzB,KAAA,CAAOA,CAAAA,CAAO,KAAK,IAAI,CAAA,CACvB,SAAU,EACZ,CACF,CACF","file":"chunk-6ILXAGWX.cjs","sourcesContent":["{\n \"name\": \"solve-engine\",\n \"version\": \"2.9.0\",\n \"description\": \"An embeddable expression engine for natural-language calculations: units, currencies, percentages, dates and matrices, with the parsing and evaluation plumbing already built.\",\n \"keywords\": [\n \"expression-evaluator\",\n \"calculator\",\n \"bytecode-vm\",\n \"parser\",\n \"lexer\",\n \"dsl\",\n \"markdown\",\n \"obsidian\"\n ],\n \"license\": \"MIT\",\n \"author\": \"Liam Riddell\",\n \"homepage\": \"https://liamriddell.github.io/solve-engine/\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/LiamRiddell/solve-engine.git\",\n \"directory\": \"packages/engine\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/LiamRiddell/solve-engine/issues\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"type\": \"module\",\n \"engines\": {\n \"node\": \">=22\"\n },\n \"files\": [\n \"dist\",\n \"LICENSE\"\n ],\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./dist/index.d.ts\",\n \"default\": \"./dist/index.js\"\n },\n \"require\": {\n \"types\": \"./dist/index.d.cts\",\n \"default\": \"./dist/index.cjs\"\n }\n },\n \"./engine\": {\n \"import\": {\n \"types\": \"./dist/engine.d.ts\",\n \"default\": \"./dist/engine.js\"\n },\n \"require\": {\n \"types\": \"./dist/engine.d.cts\",\n \"default\": \"./dist/engine.cjs\"\n }\n },\n \"./vm\": {\n \"import\": {\n \"types\": \"./dist/vm.d.ts\",\n \"default\": \"./dist/vm.js\"\n },\n \"require\": {\n \"types\": \"./dist/vm.d.cts\",\n \"default\": \"./dist/vm.cjs\"\n }\n },\n \"./format\": {\n \"import\": {\n \"types\": \"./dist/format.d.ts\",\n \"default\": \"./dist/format.js\"\n },\n \"require\": {\n \"types\": \"./dist/format.d.cts\",\n \"default\": \"./dist/format.cjs\"\n }\n },\n \"./language\": {\n \"import\": {\n \"types\": \"./dist/language.d.ts\",\n \"default\": \"./dist/language.js\"\n },\n \"require\": {\n \"types\": \"./dist/language.d.cts\",\n \"default\": \"./dist/language.cjs\"\n }\n },\n \"./packages\": {\n \"import\": {\n \"types\": \"./dist/packages.d.ts\",\n \"default\": \"./dist/packages.js\"\n },\n \"require\": {\n \"types\": \"./dist/packages.d.cts\",\n \"default\": \"./dist/packages.cjs\"\n }\n },\n \"./constants\": {\n \"import\": {\n \"types\": \"./dist/constants.d.ts\",\n \"default\": \"./dist/constants.js\"\n },\n \"require\": {\n \"types\": \"./dist/constants.d.cts\",\n \"default\": \"./dist/constants.cjs\"\n }\n },\n \"./lexer\": {\n \"import\": {\n \"types\": \"./dist/lexer.d.ts\",\n \"default\": \"./dist/lexer.js\"\n },\n \"require\": {\n \"types\": \"./dist/lexer.d.cts\",\n \"default\": \"./dist/lexer.cjs\"\n }\n },\n \"./parser\": {\n \"import\": {\n \"types\": \"./dist/parser.d.ts\",\n \"default\": \"./dist/parser.js\"\n },\n \"require\": {\n \"types\": \"./dist/parser.d.cts\",\n \"default\": \"./dist/parser.cjs\"\n }\n },\n \"./normalizer\": {\n \"import\": {\n \"types\": \"./dist/normalizer.d.ts\",\n \"default\": \"./dist/normalizer.js\"\n },\n \"require\": {\n \"types\": \"./dist/normalizer.d.cts\",\n \"default\": \"./dist/normalizer.cjs\"\n }\n },\n \"./resolvers\": {\n \"import\": {\n \"types\": \"./dist/resolvers.d.ts\",\n \"default\": \"./dist/resolvers.js\"\n },\n \"require\": {\n \"types\": \"./dist/resolvers.d.cts\",\n \"default\": \"./dist/resolvers.cjs\"\n }\n },\n \"./errors\": {\n \"import\": {\n \"types\": \"./dist/errors.d.ts\",\n \"default\": \"./dist/errors.js\"\n },\n \"require\": {\n \"types\": \"./dist/errors.d.cts\",\n \"default\": \"./dist/errors.cjs\"\n }\n },\n \"./utilities\": {\n \"import\": {\n \"types\": \"./dist/utilities.d.ts\",\n \"default\": \"./dist/utilities.js\"\n },\n \"require\": {\n \"types\": \"./dist/utilities.d.cts\",\n \"default\": \"./dist/utilities.cjs\"\n }\n },\n \"./uom\": {\n \"import\": {\n \"types\": \"./dist/uom.d.ts\",\n \"default\": \"./dist/uom.js\"\n },\n \"require\": {\n \"types\": \"./dist/uom.d.cts\",\n \"default\": \"./dist/uom.cjs\"\n }\n },\n \"./services\": {\n \"import\": {\n \"types\": \"./dist/services.d.ts\",\n \"default\": \"./dist/services.js\"\n },\n \"require\": {\n \"types\": \"./dist/services.d.cts\",\n \"default\": \"./dist/services.cjs\"\n }\n },\n \"./worker\": {\n \"import\": {\n \"types\": \"./dist/worker.d.ts\",\n \"default\": \"./dist/worker.js\"\n },\n \"require\": {\n \"types\": \"./dist/worker.d.cts\",\n \"default\": \"./dist/worker.cjs\"\n }\n },\n \"./testing\": {\n \"import\": {\n \"types\": \"./dist/testing.d.ts\",\n \"default\": \"./dist/testing.js\"\n },\n \"require\": {\n \"types\": \"./dist/testing.d.cts\",\n \"default\": \"./dist/testing.cjs\"\n }\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"prepublishOnly\": \"npm run build && node ../../scripts/assert-publishable.mjs .\",\n \"dev\": \"tsup --watch\",\n \"test\": \"jest --config jest.config.cjs --no-coverage\",\n \"typecheck\": \"tsgo --noEmit --skipLibCheck\",\n \"typecheck:tsc\": \"tsc --noEmit --skipLibCheck\"\n },\n \"dependencies\": {\n \"@tanstack/query-core\": \"^5.100.10\"\n },\n \"devDependencies\": {\n \"@jest/globals\": \"^30.4.1\",\n \"@types/node\": \"^26.2.0\",\n \"convert\": \"^7.0.0\",\n \"jest\": \"^30.4.2\",\n \"ts-jest\": \"^29.4.12\",\n \"tsup\": \"8.5.1\",\n \"typescript\": \"5.9.3\"\n },\n \"//sideEffects\": \"Load-bearing claim, not boilerplate. tsup's splitting emits bare chunk imports at the top of dist/index.js, and this field tells Rollup, webpack and Vite they may delete them, which esbuild reports as [ignored-bare-import] once per import during `npm run size`. The engine does have module-level work to lose: registerAllTokenTypes(), _PrecedenceParser.BP_TABLE and its cached token ids, and several process-wide registries. It is safe because every chunk doing that work is also imported for its bindings somewhere, so no bundler can drop it. That is a property of how tsup currently splits the code rather than a design guarantee, so `npm run smoke:bundled` (scripts/check-tree-shaking.mjs) proves it on every run of `npm run verify` instead of assuming it, and its header explains the two fixes if it ever stops holding.\",\n \"sideEffects\": false\n}\n","/**\n * The running engine's own semver version, sourced directly from this\n * package's package.json so it can never drift from what's actually\n * published. Exists so IEnginePackage.engineVersion range checks\n * (api/EngineVersionCompatibility.ts) have something real to check\n * against.\n */\nimport { version } from \"../../package.json\";\n\n/**\n * The running engine's version, taken from package.json.\n *\n * What a package's `engineVersion` range is checked against at registration.\n * A prerelease is compared by its coerced release version, so a 1.0.0 beta\n * satisfies `^1.0.0`. See `api/EngineVersionCompatibility.ts`.\n */\nexport const ENGINE_VERSION: string = version;\n","/**\n * Configuration Module for solve-js Engine\n * \n * This module provides the **single source of truth** for all engine configuration.\n * Every configurable aspect of the engine, from safety limits and performance\n * budgets to VM constraints and worker pool sizing, is defined here.\n * \n * ### Design principles\n * \n * 1. **Engine owns its config.** The engine defines its own config shape and defaults.\n * Consumers (e.g., the Obsidian plugin) pass partial overrides; all unspecified\n * fields fall back to `DEFAULT_CONFIG`.\n * \n * 2. **Self-documenting.** Every interface and field has descriptive JSDoc so the\n * config is understandable at a glance, whether you're using the engine as an\n * npm package or reading the source.\n * \n * 3. **Minimal consumer knowledge.** Consumers only need to pass `Partial<EngineConfig>`.\n * They don't need to replicate the full config shape, just the fields they\n * want to override.\n * \n * @module Configuration\n */\n\nimport { ErrorFactory } from \"@solve-js/errors/UnifiedErrorFramework\";\n\n/**\n * A host's test for whether a calendar date is a public holiday, given the\n * `Date` for that day at local midnight. Return `true` to exclude it from\n * working-day arithmetic.\n */\nexport type HolidayPredicate = (date: Date) => boolean;\n\n/**\n * The host-supplied public-holiday calendar, in the same \"bring your own data\"\n * shape the stocks and weather packages already use for a host callback (see\n * `packages/stocks/StocksPackage.ts`): weekends are decidable from the date\n * alone, holidays are not, so they come from the host or not at all.\n *\n * Either a {@link HolidayPredicate}, for a host that computes holidays itself\n * (an existing library, a region rule), or an iterable of specific dates as\n * `YYYY-MM-DD` strings, epoch-millisecond numbers or `Date` objects, for a host\n * that just has a list. Resolved to one internal predicate by\n * `vm/HolidayCalendar.ts`'s `resolveHolidayPredicate()`.\n *\n * Left unset, working-day arithmetic skips weekends only, which is the honest\n * default: the engine excludes exactly the days it can prove are non-working.\n */\nexport type HolidayCalendar = HolidayPredicate | Iterable<string | number | Date>;\n\n/**\n * Date-related configuration.\n * Controls the bounds and formatting for date/time expression evaluation\n * (e.g., `today + 20 days`, `last monday`).\n */\n/**\n * How an ambiguous all-numeric date literal is read.\n *\n * - `'auto'`: by separator, the historic behaviour. A slash date is\n * day-first (`25/12/2023`), a hyphen date is month-first (`12-25-2023`)\n * unless its first group is four digits, which makes it ISO (`2023-12-25`).\n * - `'DMY'` / `'MDY'` / `'YMD'`: a fixed order for every numeric separator, so\n * a host can match its readers' locale. `'MDY'` is what lets a US reader's\n * `12/25/2023` parse, which `'auto'` refuses because the slash defaults to\n * day-first.\n *\n * Only the all-numeric literals are affected. A spelled-out month (`March 9,\n * 2024`) is never ambiguous, and an ISO timestamp is always read as ISO.\n */\nexport type DateInputOrder = 'auto' | 'DMY' | 'MDY' | 'YMD';\n\n/** Date-related engine configuration: offset limits, input order, holidays. */\nexport interface DateConfig {\n /**\n * The order an ambiguous all-numeric date literal is read in. Defaults to\n * `'auto'` (by separator, the historic behaviour). See {@link DateInputOrder}.\n */\n readonly inputOrder: DateInputOrder;\n /**\n * How far forward a date offset whose COST grows with the offset may reach,\n * in years. Enforced by `vm/VM.ts`'s `addBusinessDays()`.\n *\n * Bounds the walk, not the calendar. Every other date offset in the engine\n * is arithmetic on a Date field, so `today + 100000 days` costs exactly what\n * one day costs and needs no ceiling; workdays are the one offset that has\n * to step day by day, because which days are skipped depends on where each\n * step lands. `today + 100000000 workdays` therefore froze the host for\n * thirteen seconds inside a single ADD opcode (where `vm.maxInstructions`\n * cannot see it) and then answered \"Invalid Date\", and a trillion never\n * returned at all.\n *\n * Release hardening: this field was declared, documented as a \"safety\n * limit\", and read nowhere, so it bounded nothing. A limit a host can\n * configure and the engine ignores is worse than no limit, because it reads\n * as protection that is not there.\n */\n readonly maxOffsetYears: number;\n /** How far BACK the same walk may reach, in years, as a negative number. See {@link maxOffsetYears}. */\n readonly minOffsetYears: number;\n /** Default date string format for display (moment.js format string) */\n readonly defaultFormat: string;\n /**\n * Public-holiday calendar for working-day arithmetic (`N working days after\n * <date>`, `working days between <date> and <date>`, `<date> + N workdays`).\n * See {@link HolidayCalendar}.\n *\n * Optional and unset by default: with no calendar, working-day arithmetic\n * skips weekends only. A host that wants holidays excluded too supplies one\n * here (`new ExpressionEngine({ config: { date: { holidays } } })`), the\n * same way stocks and weather take a host data source. Threaded into the VM\n * by `engine/ExpressionEngine.ts` exactly as {@link maxOffsetYears} is,\n * because working-day math is a VM operation several grammar forms share, so\n * the calendar has to be one source the VM owns rather than per-package state\n * the VM cannot see.\n */\n readonly holidays?: HolidayCalendar;\n}\n\n/**\n * Performance-related configuration.\n * Controls caching, timeouts, and processing limits to prevent runaway\n * resource consumption on large documents.\n */\nexport interface PerformanceConfig {\n /**\n * Maximum number of entries in {@link ExpressionEngine}'s bytecode cache\n * (per-instance, keyed by expression text) before the oldest entry is\n * evicted. Raise this for documents with many distinct expressions if\n * repeated re-evaluation (e.g. scrolling) is re-parsing instead of\n * hitting cache, bug fix (release hardening pass): this field used to\n * be read nowhere; the cache size was a hardcoded, unconfigurable\n * constant. Note this does NOT bound {@link LineCache}, which has no\n * size limit of its own.\n */\n readonly defaultCacheSize: number;\n /**\n * Maximum lines a document may have for the engine to process it in one\n * pass. Enforced by `ExpressionEngine.parseDocument()` and by\n * `engine/DocumentModel.ts`'s `setDocument()`, the two entry points that\n * take a whole document.\n *\n * A document costs memory per line whatever each line says: a parsed line\n * record, a cache entry, a dependency-graph node. Two hundred thousand\n * lines of `1 + 1` therefore exhausted the heap and aborted the process\n * before any per-line limit had anything to object to, which is the same\n * shape of hole as an unbounded expression and needs the same kind of\n * ceiling. Refusing the document names the limit; a host that genuinely has\n * a larger one raises this field.\n *\n * Release hardening: declared and read nowhere until now.\n */\n readonly maxDocumentLines: number;\n}\n\n/**\n * Validation / safety-limit configuration.\n * Protects against runaway expressions that could cause excessive memory use\n * or stack overflow. These limits are checked during lexing and parsing.\n */\n/** Bounds on untrusted input: expression length and nesting depth. */\nexport interface ValidationConfig {\n /** Maximum expression length in characters. Prevents excessively long strings from entering the pipeline. */\n readonly maxExpressionLength: number;\n /** Maximum expression complexity score (`tokens + functionCalls×5 + nestingDepth×10`). Protects against deeply nested or combinatorially complex expressions. */\n readonly maxComplexity: number;\n /** Maximum parentheses nesting depth. Prevents stack overflow in the recursive-descent parser. */\n readonly maxNestingDepth: number;\n /**\n * Auto-balance unmatched parentheses by appending missing closing parens\n * or prepending missing opening parens. When disabled, unbalanced expressions\n * cause parse errors instead of being silently corrected.\n *\n * Disabled by default for strict parsing. Enable for forgiving user input\n * (e.g., chat-style calculators where users often omit closing parens).\n * Has zero overhead when disabled, the O(n) paren-count scan is skipped.\n */\n readonly autoBalanceParens: boolean;\n}\n\n/**\n * Worker pool configuration.\n * Controls the parallel execution workers used for batch evaluation.\n */\nexport interface WorkerConfig {\n /** Maximum number of concurrent Web Workers allowed */\n readonly maxConcurrentWorkers: number;\n /** Time (ms) a worker stays alive while idle before being terminated */\n readonly idleTimeoutMs: number;\n /** Maximum retry attempts for a failed worker operation */\n readonly maxRetries: number;\n /** Base backoff delay (ms) between retries (exponential backoff applied on top) */\n readonly baseBackoffMs: number;\n} /**\n * Diagnostic / telemetry configuration.\n * Controls the diagnostic event pipeline for profiling and debugging.\n * All diagnostics are disabled by default for maximum production performance.\n */\n export interface DiagnosticConfig {\n /** Master switch: enable the diagnostic pipeline (collectors receive events for all pipeline stages) */\n readonly enabled: boolean;\n /** Enable VM trace mode, emits per-opcode execution events (very verbose; disables some optimizations) */\n readonly vmTraceEnabled: boolean;\n }\n\n /**\n * Proactive background refresh of live async values.\n *\n * Off by default. When a live value (a stock quote, an FX rate) has gone\n * stale, today it only refetches on the next re-evaluation (a keystroke), so a\n * note left open silently ages. With this enabled, the engine drives a refetch\n * on each such value's own cadence (the resolver's `refetchIntervalMs`) for the\n * values currently on screen, and pushes the fresh result to the host through\n * the same event stream the pull path uses. It needs timers and a live editor\n * consuming that stream, so a headless or batch host leaves it off.\n */\n export interface BackgroundRefreshConfig {\n /** Master switch. When false, no timers run and every value refreshes only on re-evaluation. */\n readonly enabled: boolean;\n }\n\n /**\n * Virtual Machine configuration.\n * Controls the internal bytecode VM that executes compiled expressions.\n */\n export interface VMConfig {\n /** Maximum stack depth (value slots) for VM execution, prevents stack overflow in recursive/pratt-parser generated bytecode */\n readonly maxStackDepth: number;\n /** Maximum opcodes executed per expression, halts runaway infinite loops */\n readonly maxInstructions: number;\n /**\n * Maximum elements a collection may be expanded to before `map`/`reduce`/\n * `sum`/`prod` will iterate it.\n *\n * A Range is stored as its two bounds and costs nothing until something\n * materializes it, at which point it becomes one Value per element. Twenty\n * characters (`sum(x, 1:100000000)`) therefore asked for a hundred million\n * of them, and neither `maxInstructions` nor `maxStackDepth` could see it:\n * the expansion happens inside a single opcode, so the instruction counter\n * is never consulted while it runs, and the elements never reach the value\n * stack. V8 aborted the whole process with \"Reached heap limit\", which a\n * host embedding the engine cannot catch.\n */\n readonly maxCollectionSize: number;\n /**\n * Maximum elements (collection Values, matrix cells) one evaluation may\n * materialize in total.\n *\n * `maxCollectionSize` above bounds a single collection. This bounds the sum\n * of everything an expression asks for, which is a different question and\n * the one that actually protects the host: two collections that are\n * individually legal are legal together, and an operation whose result is\n * the PRODUCT of two legal operands is bounded by neither of them. A matrix\n * multiply is exactly that shape, so three lines within every other limit\n * (`:a = map(1*x, 0:20000)`, `:b = transpose(a)`, `b * a`) asked for four\n * hundred million cells and aborted the process.\n *\n * Counted in elements rather than bytes, because a count is what a call\n * site has before it allocates. An element is 8 bytes as a numeric matrix\n * cell and closer to a hundred as a full Value, so the default is worth\n * roughly 16 MB of matrix or 200 MB of expanded collection: far past any\n * document and far short of what an editor cannot survive.\n */\n readonly maxAllocatedElements: number;\n /**\n * Maximum user-defined-function calls one evaluation may make in TOTAL,\n * however deeply or widely they nest.\n *\n * `maxFunctionRecursionDepth` bounds how DEEP calls nest and cannot see\n * how MANY there are, and those are different numbers. Twenty-two lines of\n * `f(n)(v) = f(n-1)(v) + f(n-1)(v)` reach a depth of only 22 against a\n * limit of 50, and make 2,097,152 calls doing it: a fatal heap abort in\n * under a second. `maxInstructions` cannot bound it either, because\n * `executeBytecode()` re-enters itself per call and each reentrant call\n * gets its OWN instruction count, so recursion refreshes its allowance on\n * the way in. This is the tally that does not refresh; see\n * `vm/AllocationBudget.ts`, which holds it for the same reason it holds\n * the element tally.\n *\n * Counted in calls rather than in the instructions they run, because the\n * call is the thing that multiplies: every call allocates a frame, its\n * arguments and its result whatever its body says.\n */\n readonly maxFunctionCalls: number;\n /**\n * Hard ceiling on how many bisection steps goal seek (`solve line N for\n * <var> = <target>`, see `packages/goalseek/`) may take before it gives up\n * with a structured error rather than continuing.\n *\n * Goal seek re-evaluates the target line's expression once per step while\n * narrowing an interval, and an untrusted document must never be able to\n * make that loop spin. `maxInstructions` bounds each individual\n * re-evaluation, but not how many of them the search performs, so this is\n * the tally that bounds the search itself, the same reason `maxFunctionCalls`\n * exists alongside `maxInstructions`. Bisection halves the interval every\n * step, so a hundred steps resolves an input to roughly one part in 2^100:\n * far past any precision a document needs, and a definite stop either way.\n */\n readonly maxGoalSeekIterations: number;\n }\n\n/**\n * Complete engine configuration.\n *\n * Every field has a default in `DEFAULT_CONFIG`. To customize, pass a\n * `Partial<EngineConfig>` when constructing `ExpressionEngine`. Only the\n * sections/fields you supply are overridden; all others use their defaults.\n *\n * @example\n * ```typescript\n * import { ExpressionEngine } from \"solve-js\";\n *\n * const engine = new ExpressionEngine({ config: {\n * validation: {\n * maxExpressionLength: 1000,\n * maxComplexity: 200,\n * },\n * // date, performance, vm, worker, diagnostic all use defaults\n * } });\n * ```\n */\nexport interface EngineConfig {\n /** Date/time expression evaluation bounds and formatting */\n readonly date: DateConfig;\n /** Performance budgets and cache sizing */\n readonly performance: PerformanceConfig;\n /** Safety limits for expression complexity */\n readonly validation: ValidationConfig;\n /** Internal bytecode VM configuration */\n readonly vm: VMConfig;\n /** Parallel worker pool configuration */\n readonly worker: WorkerConfig;\n /** Diagnostic pipeline configuration */\n readonly diagnostic: DiagnosticConfig;\n /** Proactive background refresh of live async values */\n readonly backgroundRefresh: BackgroundRefreshConfig;\n }\n\n/**\n * A partial {@link EngineConfig} override, one section at a time.\n *\n * Overrides are merged per section over {@link DEFAULT_CONFIG}, so you can set a\n * single field of one section (`{ validation: { maxExpressionLength: 1000 } }`)\n * and keep every other default in that section. A plain `Partial<EngineConfig>`\n * cannot express that, it demands a whole section object, which is why the\n * documented overrides never typechecked against it. This is the type the\n * constructor and {@link createEngine} accept.\n */\nexport type EngineConfigOverride = {\n readonly [K in keyof EngineConfig]?: Partial<EngineConfig[K]>;\n};\n\n/**\n * Default configuration values\n */\nexport const DEFAULT_CONFIG: EngineConfig = {\n date: {\n // A century of workdays is about 26,000 steps, which is microseconds,\n // and past any offset a person means. The walk is what these bound; see\n // DateConfig above for why no other date offset needs a ceiling.\n maxOffsetYears: 100,\n minOffsetYears: -100,\n defaultFormat: 'YYYY-MM-DD',\n inputOrder: 'auto',\n },\n performance: {\n // Preserves the effective cache size the hardcoded (now-removed)\n // BYTECODE_CACHE_MAX_ENTRIES constant had, so wiring this field up\n // doesn't silently shrink the default cache for existing consumers.\n defaultCacheSize: 2000,\n // Raised from the 10,000 this field was declared with, which was never\n // enforced and turned out to be under what this engine already supports:\n // its paging design is tested against a 20,000-line document\n // (`engine/PageManager.ts` and its spec) and its throughput benchmark\n // parses a 50,000-line one. Twice the largest of those, and the same\n // number `ConfigManager.validate()` already refuses to go above.\n //\n // Measured under a 256MB heap: setting a 100,000-line document costs\n // 64MB, evaluating every line of a 20,000-line one costs 106MB, and\n // 200,000 lines aborts the process before a single expression is looked\n // at. A host with a small heap should lower this; the ceiling is here to\n // stop the size that cannot work anywhere.\n maxDocumentLines: 100000,\n },\n validation: {\n maxExpressionLength: 2000,\n maxComplexity: 500,\n maxNestingDepth: 50,\n autoBalanceParens: false,\n },\n vm: {\n maxStackDepth: 200,\n maxInstructions: 50000,\n // Two orders of magnitude above anything a person types by hand (the\n // longest range in the test suite is 1000 elements) and small enough\n // that expanding it is measured in milliseconds rather than in whether\n // the host survives.\n maxCollectionSize: 100000,\n // Twenty times the single-collection ceiling above, so an expression may\n // legitimately handle a number of large collections, and two hundred\n // times below the allocation that took the process down.\n maxAllocatedElements: 2000000,\n // Six hundred times the largest call count any test or example makes\n // (five levels of composition is sixteen calls), and small enough that\n // the calls it does allow cost single-digit megabytes rather than the\n // heap. A document that needs more than ten thousand calls on one line\n // is doing something a calculator was not built for.\n maxFunctionCalls: 10000,\n // A hundred bisection steps resolve an input to one part in 2^100, far\n // finer than any document needs and a firm stop for an untrusted one. A\n // continuous, monotonic relationship converges in tens of steps, well\n // under this; hitting it means the target is unreachable or the\n // relationship is not the smooth one goal seek assumes.\n maxGoalSeekIterations: 100,\n },\n worker: {\n maxConcurrentWorkers: 4,\n idleTimeoutMs: 30000,\n maxRetries: 3,\n baseBackoffMs: 1000,\n },\n diagnostic: {\n enabled: false,\n vmTraceEnabled: false,\n },\n backgroundRefresh: {\n enabled: false,\n },\n };\n\n/**\n * Merge a partial config override onto a base `EngineConfig`, section by\n * section, `{ ...base.section, ...override.section }` for each of the 7\n * top-level sections, not a single top-level spread.\n *\n * A shallow `{ ...base, ...override }` at the TOP level replaces an entire\n * section wholesale the moment a caller overrides even one field in it\n * (e.g. `{ performance: { defaultCacheSize: 500 } }` would silently drop\n * every other `performance.*` field back to `undefined`, not to its\n * default). This function exists specifically so every config consumer\n * shares one correct merge instead of each hand-rolling (and risking) its\n * own. `ConfigManager` and `ExpressionEngine` both call this rather than\n * either duplicating the section list or instantiating a whole\n * `ConfigManager` just to reuse its private merge logic.\n */\nexport function mergeEngineConfig(\n base: EngineConfig,\n override: EngineConfigOverride\n): EngineConfig {\n return {\n date: { ...base.date, ...override.date },\n performance: { ...base.performance, ...override.performance },\n validation: { ...base.validation, ...override.validation },\n vm: { ...base.vm, ...override.vm },\n worker: { ...base.worker, ...override.worker },\n diagnostic: { ...base.diagnostic, ...override.diagnostic },\n backgroundRefresh: { ...base.backgroundRefresh, ...override.backgroundRefresh },\n };\n}\n\n/**\n * Configuration manager for engine settings\n *\n * @example\n * ```typescript\n * const configManager = new ConfigManager();\n * configManager.set('performance.defaultCacheSize', 2000);\n * const cacheSize = configManager.get('performance.defaultCacheSize');\n * ```\n */\nexport class ConfigManager {\n private config: EngineConfig;\n\n constructor(config: Partial<EngineConfig> = {}) {\n this.config = mergeEngineConfig(DEFAULT_CONFIG, config);\n }\n\n /**\n * Get configuration value by path\n * \n * @param path - Dot-notation path to config value\n * @returns Configuration value\n */\n get<T>(path: string): T {\n const keys = path.split('.');\n let current: unknown = this.config;\n\n for (const key of keys) {\n if (current && typeof current === 'object' && key in current) {\n current = (current as Record<string, unknown>)[key];\n } else {\n throw ErrorFactory.config(\n \"CONFIG_PATH_NOT_FOUND\",\n `Configuration path not found: ${path}`,\n { path }\n );\n }\n }\n\n return current as T;\n }\n\n /**\n * Set configuration value by path\n * \n * @param path - Dot-notation path to config value\n * @param value - New value\n */\n set<T>(path: string, value: T): void {\n const keys = path.split('.');\n if (keys.length < 2) {\n throw ErrorFactory.config(\n \"INVALID_CONFIG_PATH\",\n `Invalid path: ${path}. Must be in format 'section.property'`,\n { path }\n );\n }\n \n const section = keys[0];\n const property = keys[1];\n \n if (!(section in this.config)) {\n throw ErrorFactory.config(\n \"CONFIG_SECTION_NOT_FOUND\",\n `Configuration section not found: ${section}`,\n { section, path }\n );\n }\n \n const sectionConfig = this.config[section as keyof EngineConfig];\n if (sectionConfig && typeof sectionConfig === 'object') {\n (sectionConfig as unknown as Record<string, unknown>)[property] = value;\n } else {\n throw ErrorFactory.config(\n \"CONFIG_PROPERTY_NOT_FOUND\",\n `Configuration property not found: ${path}`,\n { path }\n );\n }\n }\n\n /**\n * Get complete configuration.\n *\n * A detached copy, section objects included. A top-level spread would hand\n * the caller this manager's own section objects, so `getConfig().vm.x = 1`\n * would be an undeclared back door into {@link set}, bypassing its path\n * validation and reaching every later {@link get}.\n */\n getConfig(): EngineConfig {\n return mergeEngineConfig(this.config, {});\n }\n\n /**\n * Update multiple configuration values\n */\n update(config: Partial<EngineConfig>): void {\n this.config = mergeEngineConfig(this.config, config);\n }\n\n /**\n * Reset to default configuration.\n *\n * Goes through {@link mergeEngineConfig} for the same reason the constructor\n * does. A top-level `{ ...DEFAULT_CONFIG }` copies the six section\n * references, not the sections, so after a reset this manager's\n * `performance` object WAS `DEFAULT_CONFIG.performance` and the next\n * `set('performance.x', ...)` wrote into the module constant. That constant\n * is what every `ExpressionEngine` is built from, so one manager's reset\n * could change the cache size, instruction ceiling or allocation budget of\n * every engine constructed later in the process.\n */\n reset(): void {\n this.config = mergeEngineConfig(DEFAULT_CONFIG, {});\n }\n\n /**\n * Validate configuration values\n */\n validate(): ValidationResult {\n const errors: string[] = [];\n\n // Validate performance config\n if (this.config.performance.maxDocumentLines > 100000) {\n errors.push('maxDocumentLines cannot exceed 100,000');\n }\n\n // Validate date config\n if (this.config.date.maxOffsetYears > 1000) {\n errors.push('maxOffsetYears cannot exceed 1000');\n }\n\n return {\n valid: errors.length === 0,\n error: errors.join('; '),\n warnings: []\n };\n }\n}\n\n/**\n * Result type for {@link ConfigManager.validate}.\n */\nexport interface ValidationResult {\n valid: boolean;\n error?: string;\n warnings?: string[];\n}\n\n"]}
@@ -1,2 +1,2 @@
1
- 'use strict';var o=`0|1|radian,radians,rad,rads,r;0|6.283185307179586|turn,turns;0|0.017453292519943295|degree,degrees,deg,degs,\xB0;0|0.015707963267948967|gradian,gradians,gon,gons,grad,grads,grade,grades;0|0.0002908882086657216|arcminute,arcminutes,minutes of arc,arcmin,arcmins;0|0.00000484813681109536|arcsecond,arcseconds,seconds of arc,arcsec,arcsecs;1|1|square meter,square meters,square metre,square metres,m\xB2,m2,centiare,centiares,ca;1|1e+30|square petameter,square petametre,square petameters,square petametres,Pm\xB2,Pm2;1|1e+24|square terameter,square terametre,square terameters,square terametres,Tm\xB2,Tm2;1|1000000000000000000|square gigameter,square gigametre,square gigameters,square gigametres,Gm\xB2,Gm2;1|1000000000000|square megameter,square megametre,square megameters,square megametres,Mm\xB2,Mm2;1|1000000|square kilometer,square kilometre,square kilometers,square kilometres,km\xB2,km2;1|10000|square hectometer,square hectometre,square hectometers,square hectometres,hm\xB2,hm2,hectare,hectares,ha;1|100|square decameter,square decametre,square decameters,square decametres,dam\xB2,dam2,are,ares;1|0.01|square decimeter,square decimetre,square decimeters,square decimetres,dm\xB2,dm2;1|0.0001|square centimeter,square centimetre,square centimeters,square centimetres,cm\xB2,cm2;1|0.000001|square millimeter,square millimetre,square millimeters,square millimetres,mm\xB2,mm2;1|1e-12|square micrometer,square micrometre,square micrometers,square micrometres,\u03BCm\xB2,\xB5m\xB2,\u03BCm2,\xB5m2;1|1e-18|square nanometer,square nanometre,square nanometers,square nanometres,nm\xB2,nm2;1|1e-24|square picometer,square picometre,square picometers,square picometres,pm\xB2,pm2;1|1e-30|square femtometer,square femtometre,square femtometers,square femtometres,fm\xB2,fm2;1|4046.8564224|acre,acres,ac;1|10|deciare,deciares,da;1|1000|decare,decares,daa;1|0.09290304|square foot,square feet,sq ft,ft\xB2,ft2;1|0.00064516|square inch,square inches,sq in,in\xB2,in2;1|0.83612736|square yard,square yards,sq yd,yd\xB2,yd2;1|2589988.110336|square mile,square miles,sq mi,mi\xB2,mi2;1|666.6666666666666|m\u01D4,mu;2|1|bit,bits,b;2|1125899906842624|pebibit,pebibits,Pib;2|1099511627776|tebibit,tebibits,Tib;2|1073741824|gibibit,gibibits,Gib;2|1048576|mebibit,mebibits,Mib;2|1024|kibibit,kibibits,Kib;2|1000|Kb,kilobit,kilobits,kb;2|8000|KB,kilobyte,kilobytes,kB;2|1000000000000000|petabit,petabits,Pb;2|1000000000000|terabit,terabits,Tb;2|1000000000|gigabit,gigabits,Gb;2|1000000|megabit,megabits,Mb;2|100|hectobit,hectobits,hb;2|10|decabit,decabits,dab;2|0.1|decibit,decibits,db;2|0.01|centibit,centibits,cb;2|0.001|millibit,millibits,mb;2|0.000001|microbit,microbits,\u03BCb,\xB5b;2|1e-9|nanobit,nanobits,nb;2|1e-12|picobit,picobits,pb;2|1e-15|femtobit,femtobits,fb;2|4|nibble,nibbles,semioctet,semioctets,halfbyte,halfbytes;2|8|byte,bytes,octect,octects,B;2|9007199254740992|pebibyte,pebibytes,PiB;2|8796093022208|tebibyte,tebibytes,TiB;2|8589934592|gibibyte,gibibytes,GiB;2|8388608|mebibyte,mebibytes,MiB;2|8192|kibibyte,kibibytes,KiB;2|8000000000000000|petabyte,petabytes,PB;2|8000000000000|terabyte,terabytes,TB;2|8000000000|gigabyte,gigabytes,GB;2|8000000|megabyte,megabytes,MB;2|800|hectobyte,hectobytes,hB;2|80|decabyte,decabytes,daB;2|0.8|decibyte,decibytes,dB;2|0.08|centibyte,centibytes,cB;2|0.008|millibyte,millibytes,mB;2|0.000008|microbyte,microbytes,\u03BCB,\xB5B;2|8e-9|nanobyte,nanobytes,nB;2|8e-12|picobyte,picobytes,pB;2|8e-15|femtobyte,femtobytes,fB;2|16|hextet,hextets;3|1|joule,joules,J;3|1000000000000000|petajoule,petajoules,PJ;3|1000000000000|terajoule,terajoules,TJ;3|1000000000|gigajoule,gigajoules,GJ;3|1000000|megajoule,megajoules,MJ;3|1000|kilojoule,kilojoules,kJ;3|100|hectojoule,hectojoules,hJ;3|10|decajoule,decajoules,daJ;3|0.1|decijoule,decijoules,dJ;3|0.01|centijoule,centijoules,cJ;3|0.001|millijoule,millijoules,mJ;3|0.000001|microjoule,microjoules,\u03BCJ,\xB5J;3|1e-9|nanojoule,nanojoules,nJ;3|1e-12|picojoule,picojoules,pJ;3|1e-15|femtojoule,femtojoules,fJ;3|3600|watt-hour,W\u22C5h,W h,Wh;3|3600000000000000000|petawatt-hour,petawatt-hours,PW\u22C5h,PW h,PWh;3|3600000000000000|terawatt-hour,terawatt-hours,TW\u22C5h,TW h,TWh;3|3600000000000|gigawatt-hour,gigawatt-hours,GW\u22C5h,GW h,GWh;3|3600000000|megawatt-hour,megawatt-hours,MW\u22C5h,MW h,MWh;3|3600000|kilowatt-hour,kilowatt-hours,kW\u22C5h,kW h,kWh;3|360000|hectowatt-hour,hectowatt-hours,hW\u22C5h,hW h,hWh;3|36000|decawatt-hour,decawatt-hours,daW\u22C5h,daW h,daWh;3|360|deciwatt-hour,deciwatt-hours,dW\u22C5h,dW h,dWh;3|36|centiwatt-hour,centiwatt-hours,cW\u22C5h,cW h,cWh;3|3.6|milliwatt-hour,milliwatt-hours,mW\u22C5h,mW h,mWh;3|0.0036|microwatt-hour,microwatt-hours,\u03BCW\u22C5h,\xB5W\u22C5h,\u03BCW h,\xB5W h,\u03BCWh,\xB5Wh;3|0.0000036|nanowatt-hour,nanowatt-hours,nW\u22C5h,nW h,nWh;3|3.6e-9|picowatt-hour,picowatt-hours,pW\u22C5h,pW h,pWh;3|3.6e-12|femtowatt-hour,femtowatt-hours,fW\u22C5h,fW h,fWh;4|1|newton,newtons,N;4|1000000000000000|petanewton,petanewtons,PN;4|1000000000000|teranewton,teranewtons,TN;4|1000000000|giganewton,giganewtons,GN;4|1000000|meganewton,meganewtons,MN;4|1000|kilonewton,kilonewtons,kN;4|100|hectonewton,hectonewtons,hN;4|10|decanewton,decanewtons,daN;4|0.1|decinewton,decinewtons,dN;4|0.01|centinewton,centinewtons,cN;4|0.001|millinewton,millinewtons,mN;4|0.000001|micronewton,micronewtons,\u03BCN,\xB5N;4|1e-9|nanonewton,nanonewtons,nN;4|1e-12|piconewton,piconewtons,pN;4|1e-15|femtonewton,femtonewtons,fN;4|0.00001|dyne,dynes,dyn;4|4.448222|pound of force,pound-force,lbf;4|4448.2216|kip,klb,kipf,klbf;4|0.138255|poundal,poundals,pdl;4|9.80665|kilogram-force,kilopond,kiloponds,kgf,kp;4|9806.65|tonne-force,metric ton-force,megagram-force,megapond,tf,Mp;5|1|hertz,Hz;5|1000000000000000|petahertz,PHz;5|1000000000000|terahertz,THz;5|1000000000|gigahertz,GHz;5|1000000|megahertz,MHz;5|1000|kilohertz,kHz;5|100|hectohertz,hHz;5|10|decahertz,daHz;5|0.1|decihertz,dHz;5|0.01|centihertz,cHz;5|0.001|millihertz,mHz;5|0.000001|microhertz,\u03BCHz,\xB5Hz;5|1e-9|nanohertz,nHz;5|1e-12|picohertz,pHz;5|1e-15|femtohertz,fHz;6|1|lux,lx,lumen per square meter,lm/m2,lm/m\xB2;6|1000000000000000|petalux,Plx;6|1000000000000|teralux,Tlx;6|1000000000|gigalux,Glx;6|1000000|megalux,Mlx;6|1000|kilolux,klx;6|100|hectolux,hlx;6|10|decalux,dalx;6|0.1|decilux,dlx;6|0.01|centilux,clx;6|0.001|millilux,mlx;6|0.000001|microlux,\u03BClx,\xB5lx;6|1e-9|nanolux,nlx;6|1e-12|picolux,plx;6|1e-15|femtolux,flx;6|10.764|foot-candle,foot candle,fc,ft-c;6|10000|phot,ph;7|1|meter,meters,metre,metres,m;7|1000000000000000|petameter,petametre,petameters,petametres,Pm;7|1000000000000|terameter,terametre,terameters,terametres,Tm;7|1000000000|gigameter,gigametre,gigameters,gigametres,Gm;7|1000000|megameter,megametre,megameters,megametres,Mm;7|1000|kilometer,kilometre,kilometers,kilometres,km;7|100|hectometer,hectometre,hectometers,hectometres,hm;7|10|decameter,decametre,decameters,decametres,dam;7|0.1|decimeter,decimetre,decimeters,decimetres,dm;7|0.01|centimeter,centimetre,centimeters,centimetres,cm;7|0.001|millimeter,millimetre,millimeters,millimetres,mm;7|0.000001|micrometer,micrometre,micrometers,micrometres,\u03BCm,\xB5m;7|1e-9|nanometer,nanometre,nanometers,nanometres,nm;7|1e-12|picometer,picometre,picometers,picometres,pm;7|1e-15|femtometer,femtometre,femtometers,femtometres,fm;7|0.3048|foot,feet,ft,';7|0.3048006096012192|US survey foot,US survey feet,U.S. survey foot,U.S. survey feet;7|0.0254|inch,inches,in,";7|0.9144|yard,yards,yd;7|1609.344|mile,miles,mi;7|1852|nautical mile,nautical miles,M,NM,nmi;7|9460730472580800|light-year,light-years,ly;7|30856775814913670|parsec,parsecs,pc;7|0.0042333|pica,picas;7|0.0003528|point,points;8|1|candela per square meter,candelas per square meter,candela per square metre,candelas per square metre,cd/m2,cd/m\xB2,nit,nits,nt;8|1000000000000000|petacandela per square meter,petacandelas per square meter,petacandela per square metre,petacandelas per square metre,Pcd/m2,Pcd/m\xB2;8|1000000000000|teracandela per square meter,teracandelas per square meter,teracandela per square metre,teracandelas per square metre,Tcd/m2,Tcd/m\xB2;8|1000000000|gigacandela per square meter,gigacandelas per square meter,gigacandela per square metre,gigacandelas per square metre,Gcd/m2,Gcd/m\xB2;8|1000000|megacandela per square meter,megacandelas per square meter,megacandela per square metre,megacandelas per square metre,Mcd/m2,Mcd/m\xB2;8|1000|kilocandela per square meter,kilocandelas per square meter,kilocandela per square metre,kilocandelas per square metre,kcd/m2,kcd/m\xB2;8|100|hectocandela per square meter,hectocandelas per square meter,hectocandela per square metre,hectocandelas per square metre,hcd/m2,hcd/m\xB2;8|10|decacandela per square meter,decacandelas per square meter,decacandela per square metre,decacandelas per square metre,dacd/m2,dacd/m\xB2;8|0.1|decicandela per square meter,decicandelas per square meter,decicandela per square metre,decicandelas per square metre,dcd/m2,dcd/m\xB2;8|0.01|centicandela per square meter,centicandelas per square meter,centicandela per square metre,centicandelas per square metre,ccd/m2,ccd/m\xB2;8|0.001|millicandela per square meter,millicandelas per square meter,millicandela per square metre,millicandelas per square metre,mcd/m2,mcd/m\xB2;8|0.000001|microcandela per square meter,microcandelas per square meter,microcandela per square metre,microcandelas per square metre,\u03BCcd/m2,\xB5cd/m2,\u03BCcd/m\xB2,\xB5cd/m\xB2;8|1e-9|nanocandela per square meter,nanocandelas per square meter,nanocandela per square metre,nanocandelas per square metre,ncd/m2,ncd/m\xB2;8|1e-12|picocandela per square meter,picocandelas per square meter,picocandela per square metre,picocandelas per square metre,pcd/m2,pcd/m\xB2;8|1e-15|femtocandela per square meter,femtocandelas per square meter,femtocandela per square metre,femtocandelas per square metre,fcd/m2,fcd/m\xB2;9|1|candela,cd,candlepower,cp,CP;9|1000000000000000|petacandela,Pcd;9|1000000000000|teracandela,Tcd;9|1000000000|gigacandela,Gcd;9|1000000|megacandela,Mcd;9|1000|kilocandela,kcd;9|100|hectocandela,hcd;9|10|decacandela,dacd;9|0.1|decicandela,dcd;9|0.01|centicandela,ccd;9|0.001|millicandela,mcd;9|0.000001|microcandela,\u03BCcd,\xB5cd;9|1e-9|nanocandela,ncd;9|1e-12|picocandela,pcd;9|1e-15|femtocandela,fcd;9|0.92|hefnerkerze,HK;10|1|gram,grams,g;10|1000000000000000|petagram,petagrams,Pg,gigatonne,gigatonnes,Gt;10|1000000000000|teragram,teragrams,Tg,megatonne,megatonnes,Mt;10|1000000000|gigagram,gigagrams,Gg,kilotonne,kilotonnes,kt;10|1000000|megagram,megagrams,Mg,tonne,tonnes,metric ton,metric tons,t;10|1000|kilogram,kilograms,kg;10|100|hectogram,hectograms,hg;10|10|decagram,decagrams,dag;10|0.1|decigram,decigrams,dg;10|0.01|centigram,centigrams,cg;10|0.001|milligram,milligrams,mg;10|0.000001|microgram,micrograms,\u03BCg,\xB5g,mcg;10|1e-9|nanogram,nanograms,ng;10|1e-12|picogram,picograms,pg;10|1e-15|femtogram,femtograms,fg;10|453.59237|pound,pounds,lb,lbs;10|0.06479891|grain,grains,gr;10|6350.29318|stone,stones,st;10|28.349523125|ounce,ounces,oz;10|45360|short hundredweight,cental;10|50800|long hundredweight,imperial hundredweight,cwt;10|907184.74|short ton,short tons,US ton,US tons;10|1016046.9088|long ton,long tons,imperial ton,imperial tons,displacement ton,displacement tons;10|31.1034768|troy ounce,oz t,toz;11|1|watt,watts,W;11|1000000000000000|petawatt,petawatts,PW;11|1000000000000|terawatt,terawatts,TW;11|1000000000|gigawatt,gigawatts,GW;11|1000000|megawatt,megawatts,MW;11|1000|kilowatt,kilowatts,kW;11|100|hectowatt,hectowatts,hW;11|10|decawatt,decawatts,daW;11|0.1|deciwatt,deciwatts,dW;11|0.01|centiwatt,centiwatts,cW;11|0.001|milliwatt,milliwatts,mW;11|0.000001|microwatt,microwatts,\u03BCW,\xB5W;11|1e-9|nanowatt,nanowatts,nW;11|1e-12|picowatt,picowatts,pW;11|1e-15|femtowatt,femtowatts,fW;11|745.699872|horsepower,mechanical horsepower,hp;12|1|pascal,pascals,Pa;12|1000000000000000|petapascal,petapascals,PPa;12|1000000000000|terapascal,terapascals,TPa;12|1000000000|gigapascal,gigapascals,GPa;12|1000000|megapascal,megapascals,MPa,decabar,decabars,dabar;12|1000|kilopascal,kilopascals,kPa,centibar,centibars,cbar;12|100|hectopascal,hectopascals,hPa,millibar,millibars,mbar;12|10|decapascal,decapascals,daPa;12|0.1|decipascal,decipascals,dPa,microbar,microbars,\u03BCbar,\xB5bar;12|0.01|centipascal,centipascals,cPa;12|0.001|millipascal,millipascals,mPa;12|0.000001|micropascal,micropascals,\u03BCPa,\xB5Pa;12|1e-9|nanopascal,nanopascals,nPa;12|1e-12|picopascal,picopascals,pPa;12|1e-15|femtopascal,femtopascals,fPa;12|100000|bar,bars;12|100000000000000000000|petabar,petabars,Pbar;12|100000000000000000|terabar,terabars,Tbar;12|100000000000000|gigabar,gigabars,Gbar;12|100000000000|megabar,megabars,Mbar;12|100000000|kilobar,kilobars,kbar;12|10000000|hectobar,hectobars,hbar;12|10000|decibar,decibars,dbar;12|0.0001|nanobar,nanobars,nbar;12|1e-7|picobar,picobars,pbar;12|1e-10|femtobar,femtobars,fbar;12|133.32236842105263|torr,torrs,Torr;12|0.13332236842105263|millitorr,mTorr;12|101325|atmosphere,atmospheres,atm;12|6894.757|pound per square inch,pounds per square inch,psi,lbf/in2,lbf/in\xB2;12|249.0889|inch of water,inches of water,inAq,Aq;12|3386.389|inch of mercury,inches of mercury,inHg,Hg;13|1|kelvin,kelvins,K,celsius,C,\xB0C;13|1000000000000000|petakelvin,petakelvins,PK;13|1000000000000|terakelvin,terakelvins,TK;13|1000000000|gigakelvin,gigakelvins,GK;13|1000000|megakelvin,megakelvins,MK;13|1000|kilokelvin,kilokelvins,kK;13|100|hectokelvin,hectokelvins,hK;13|10|decakelvin,decakelvins,daK;13|0.1|decikelvin,decikelvins,dK;13|0.01|centikelvin,centikelvins,cK;13|0.001|millikelvin,millikelvins,mK;13|0.000001|microkelvin,microkelvins,\u03BCK,\xB5K;13|1e-9|nanokelvin,nanokelvins,nK;13|1e-12|picokelvin,picokelvins,pK;13|1e-15|femtokelvin,femtokelvins,fK;13|0.5555555555555556|fahrenheit,F,\xB0F,rankine,R;14|1|second,seconds,s;14|1000000000000000|petasecond,petaseconds,Ps;14|1000000000000|terasecond,teraseconds,Ts;14|1000000000|gigasecond,gigaseconds,Gs;14|1000000|megasecond,megaseconds,Ms;14|1000|kilosecond,kiloseconds,ks;14|100|hectosecond,hectoseconds,hs;14|10|decasecond,decaseconds,das;14|0.1|decisecond,deciseconds,ds;14|0.01|centisecond,centiseconds,cs;14|0.001|millisecond,milliseconds,ms;14|0.000001|microsecond,microseconds,\u03BCs,\xB5s;14|1e-9|nanosecond,nanoseconds,ns;14|1e-12|picosecond,picoseconds,ps;14|1e-15|femtosecond,femtoseconds,fs;14|60|minute,minutes,min;14|3600|hour,hours,h;14|86.4|milliday,millidays,md;14|86400|day,days,d;14|604800|week,weeks,wk;14|1209600|fortnight,fortnights,fn;14|2592000|month,months,mo;14|31536000|year,years,a,y,yr;14|315360000|decade,decades,dec;14|3153600000|century,centuries;14|31536000000|millennium,millennia;14|90|moment,moments;14|1e-8|shake,shakes;14|0.001024|time unit,TU;14|1e-13|svedberg,svedbergs,S;15|1|cubic meter,cubic meters,cubic metre,cubic metres,stere,steres,m\xB3,m3,kiloliter,kiloliters,kilolitre,kilolitres,kl,kL;15|1e+45|cubic petameter,cubic petameters,Pm3,Pm\xB3;15|1e+36|cubic terameter,cubic terameters,Tm3,Tm\xB3;15|1e+27|cubic gigameter,cubic gigameters,Gm3,Gm\xB3;15|1000000000000000000|cubic megameter,cubic megameters,Mm3,Mm\xB3;15|1000000000|cubic kilometer,cubic kilometers,km3,km\xB3,teraliter,teraliters,teralitre,teralitres,Tl,TL;15|1000000|cubic hectometer,cubic hectometers,hm3,hm\xB3,gigaliter,gigaliters,gigalitre,gigalitres,Gl,GL;15|1000|cubic decameter,cubic decameters,dam3,dam\xB3,megaliter,megaliters,megalitre,megalitres,Ml,ML;15|0.001|cubic decimeter,cubic decimeters,dm3,dm\xB3,liter,liters,litre,litres,l,L;15|0.000001|cubic centimeter,cubic centimeters,cm3,cm\xB3,milliliter,milliliters,millilitre,millilitres,ml,mL;15|1e-9|cubic millimeter,cubic millimeters,mm3,mm\xB3,microliter,microliters,microlitre,microlitres,\u03BCl,\xB5l,\u03BCL,\xB5L;15|1e-18|cubic micrometer,cubic micrometers,\u03BCm3,\xB5m3,\u03BCm\xB3,\xB5m\xB3,femtoliter,femtoliters,femtolitre,femtolitres,fl,fL;15|1e-27|cubic nanometer,cubic nanometers,nm3,nm\xB3;15|1e-36|cubic picometer,cubic picometers,pm3,pm\xB3;15|1e-45|cubic femtometer,cubic femtometers,fm3,fm\xB3;15|1000000000000|petaliter,petaliters,petalitre,petalitres,Pl,PL;15|0.1|hectoliter,hectoliters,hectolitre,hectolitres,hl,hL;15|0.01|decaliter,decaliters,decalitre,decalitres,dal,daL;15|0.0001|deciliter,deciliters,decilitre,decilitres,dl,dL;15|0.00001|centiliter,centiliters,centilitre,centilitres,cl,cL;15|1e-12|nanoliter,nanoliters,nanolitre,nanolitres,nl,nL;15|1e-15|picoliter,picoliters,picolitre,picolitres,pl,pL;15|4168181825.4405794|cubic mile,cubic miles,cu mi,mi3,mi\xB3;15|1233.48183754752|acre-foot,acre-feet,ac\u22C5ft,ac ft;15|0.764554857984|cubic yard,cubic yards,cu yd,yd3,yd\xB3;15|0.028316846592|cubic foot,cubic feet,cu ft,ft3,ft\xB3;15|0.002359737|board foot,board feet;15|0.000016387064|cubic inch,cubic inches,cu in,in3,in\xB3;15|1.133|measurement ton,measurement tons,MTON;15|0.16365924|imperial barrel,imperial barrels,imp bbl;15|0.03636872|imperial bushel,imperial bushels,imp bsh,imp bu;15|0.00909218|imperial peck,imperial pecks,pk,imp pk;15|0.00454609|imperial gallon,imperial gallons,imp gal;15|0.0011365225|imperial quart,imperial quarts,imp qt;15|0.00056826125|imperial pint,imperial pints,imp pt;15|0.0000284130625|imperial fluid ounce,imperial fluid ounces,imp fl oz;15|0.00000492892159375|teaspoon,teaspoons,US teaspoon,US teaspoons,tsp;15|0.00001478676478125|tablespoon,tablespoons,US tablespoon,US tablespoons,tbsp;15|0.0000295735295625|US fluid ounce,US fluid ounces,fl oz,fl. oz.,oz. fl.;15|0.0002365882365|cup,cups,c;15|0.00024|US legal cup,US legal cups,US lc;15|0.000473176473|pint,pints,US liquid pint,US liquid pints,pt,p;15|0.000946352946|quart,quarts,US liquid quart,US liquid quarts,qt;15|0.003785411784|gallon,gallons,US liquid gallon,US liquid gallons,gal;15|0.03523907016688|US bushel,US bushels,US bsh,US bu;15|0.00880976754172|US peck,US pk;15|0.00440488377086|US dry gallon,US dry gal;15|0.1156|US dry barrel,US dry barrels,US dry bbl;15|0.001101220942715|US dry quart,US dry qt;15|0.0005506104713575|US dry pint,US dry pt`;function l(m){let t={};for(let e of m.split(";")){let a=e.indexOf("|"),r=e.indexOf("|",a+1),s=Number(e.slice(0,a)),i=Number(e.slice(a+1,r)),c=[s,i];for(let n of e.slice(r+1).split(","))t[n]=c;}return t}var d=l(o),u={fahrenheit:459.67,F:459.67,"\xB0F":459.67,celsius:273.15,C:273.15,"\xB0C":273.15},p={0:[["deg",1]],1:[["mm2",1],["cm2",100],["m2",1e6],["km2",1e12]],2:[["bits",1],["B",8],["KB",8e3],["MB",8e6],["GB",8e9],["TB",8e12],["PB",8e15]],3:[["J",1],["Wh",3600],["kWh",36e5],["MWh",36e8],["GWh",36e11]],4:[["N",1]],5:[["Hz",1],["kHz",1e3],["MHz",1e6],["GHz",1e9],["THz",1e12],["PHz",1e15]],6:[["lux",1],["klx",1e3]],7:[["mm",1],["cm",10],["m",1e3],["km",1e6]],8:[["cd/m\xB2",1]],9:[["cd",1]],10:[["mg",1],["g",1e3],["kg",1e6]],11:[["W",1],["kW",1e3],["MW",1e6],["GW",1e9],["TW",1e12],["PW",1e15]],12:[["Pa",1]],13:[["C",1]],14:[["fs",1],["ps",1e3],["ns",1e6],["\xB5s",1e9],["ms",1e12],["s",1e15],["min",6e16],["h",36e17],["d",864e17],["y",31536e18]],15:[["mL",1],["L",1e3]]},h={0:["rad","rads","r","deg","degs","\xB0","gon","gons","grad","grads","grade","grades","arcmin","arcmins","arcsec","arcsecs"],1:["m\xB2","m2","Pm\xB2","Pm2","Tm\xB2","Tm2","Gm\xB2","Gm2","Mm\xB2","Mm2","km\xB2","km2","hm\xB2","hm2","dam\xB2","dam2","dm\xB2","dm2","cm\xB2","cm2","mm\xB2","mm2","\u03BCm\xB2","\xB5m\xB2","\u03BCm2","\xB5m2","nm\xB2","nm2","pm\xB2","pm2","fm\xB2","fm2","ac","ca","da","daa","ha","sq ft","ft\xB2","ft2","sq in","in\xB2","in2","sq yd","yd\xB2","yd2","sq mi","mi\xB2","mi2"],2:["b","Pib","Tib","Gib","Mib","Kib","Kb","KB","Pb","Tb","Gb","Mb","kb","hb","dab","db","cb","mb","\u03BCb","\xB5b","nb","pb","fb","B","PiB","TiB","GiB","MiB","KiB","PB","TB","GB","MB","kB","hB","daB","dB","cB","mB","\u03BCB","\xB5B","nB","pB","fB"],3:["J","PJ","TJ","GJ","MJ","kJ","hJ","daJ","dJ","cJ","mJ","\u03BCJ","\xB5J","nJ","pJ","fJ","W\u22C5h","W h","Wh","PW\u22C5h","PW h","PWh","TW\u22C5h","TW h","TWh","GW\u22C5h","GW h","GWh","MW\u22C5h","MW h","MWh","kW\u22C5h","kW h","kWh","hW\u22C5h","hW h","hWh","daW\u22C5h","daW h","daWh","dW\u22C5h","dW h","dWh","cW\u22C5h","cW h","cWh","mW\u22C5h","mW h","mWh","\u03BCW\u22C5h","\xB5W\u22C5h","\u03BCW h","\xB5W h","\u03BCWh","\xB5Wh","nW\u22C5h","nW h","nWh","pW\u22C5h","pW h","pWh","fW\u22C5h","fW h","fWh"],4:["N","PN","TN","GN","MN","kN","hN","daN","dN","cN","mN","\u03BCN","\xB5N","nN","pN","fN","dyn","lbf","klb","kipf","klbf","pdl","kgf","kp","tf","Mp"],5:["Hz","PHz","THz","GHz","MHz","kHz","hHz","daHz","dHz","cHz","mHz","\u03BCHz","\xB5Hz","nHz","pHz","fHz"],6:["lx","Plx","Tlx","Glx","Mlx","klx","hlx","dalx","dlx","clx","mlx","\u03BClx","\xB5lx","nlx","plx","flx","lm/m2","lm/m\xB2","fc","ft-c","ph"],7:["m","Pm","Tm","Gm","Mm","km","hm","dam","dm","cm","mm","\u03BCm","\xB5m","nm","pm","fm","ft","'","in",'"',"yd","mi","M","NM","nmi","ly","pc"],8:["cd/m2","cd/m\xB2","Pcd/m2","Pcd/m\xB2","Tcd/m2","Tcd/m\xB2","Gcd/m2","Gcd/m\xB2","Mcd/m2","Mcd/m\xB2","kcd/m2","kcd/m\xB2","hcd/m2","hcd/m\xB2","dacd/m2","dacd/m\xB2","dcd/m2","dcd/m\xB2","ccd/m2","ccd/m\xB2","mcd/m2","mcd/m\xB2","\u03BCcd/m2","\xB5cd/m2","\u03BCcd/m\xB2","\xB5cd/m\xB2","ncd/m2","ncd/m\xB2","pcd/m2","pcd/m\xB2","fcd/m2","fcd/m\xB2","nt"],9:["cd","Pcd","Tcd","Gcd","Mcd","kcd","hcd","dacd","dcd","ccd","mcd","\u03BCcd","\xB5cd","ncd","pcd","fcd","cp","CP","HK"],10:["g","Pg","Tg","Gg","Mg","kg","hg","dag","dg","cg","mg","\u03BCg","\xB5g","ng","pg","fg","mcg","t","kt","Mt","Gt","lb","lbs","gr","st","oz","cwt","oz t","toz"],11:["W","PW","TW","GW","MW","kW","hW","daW","dW","cW","mW","\u03BCW","\xB5W","nW","pW","fW","hp"],12:["Pa","PPa","TPa","GPa","MPa","kPa","hPa","daPa","dPa","cPa","mPa","\u03BCPa","\xB5Pa","nPa","pPa","fPa","bar","Pbar","Tbar","Gbar","Mbar","kbar","hbar","dabar","dbar","cbar","mbar","\u03BCbar","\xB5bar","nbar","pbar","fbar","Torr","mTorr","atm","psi","lbf/in2","lbf/in\xB2","inAq","Aq","inHg","Hg"],13:["K","PK","TK","GK","MK","kK","hK","daK","dK","cK","mK","\u03BCK","\xB5K","nK","pK","fK","F","\xB0F","C","\xB0C","R"],14:["s","Ps","Ts","Gs","Ms","ks","hs","das","ds","cs","ms","\u03BCs","\xB5s","ns","ps","fs","min","h","md","d","wk","fn","mo","a","y","yr","dec","TU","S"],15:["m\xB3","m3","Pm3","Pm\xB3","Tm3","Tm\xB3","Gm3","Gm\xB3","Mm3","Mm\xB3","km3","km\xB3","hm3","hm\xB3","dam3","dam\xB3","dm3","dm\xB3","cm3","cm\xB3","mm3","mm\xB3","\u03BCm3","\xB5m3","\u03BCm\xB3","\xB5m\xB3","nm3","nm\xB3","pm3","pm\xB3","fm3","fm\xB3","l","L","Pl","PL","Tl","TL","Gl","GL","Ml","ML","kl","kL","hl","hL","dal","daL","dl","dL","cl","cL","ml","mL","\u03BCl","\xB5l","\u03BCL","\xB5L","nl","nL","pl","pL","fl","fL","cu mi","mi3","mi\xB3","ac\u22C5ft","ac ft","cu yd","yd3","yd\xB3","cu ft","ft3","ft\xB3","cu in","in3","in\xB3","MTON","imp bbl","imp bsh","imp bu","pk","imp pk","imp gal","imp qt","imp pt","imp fl oz","tsp","tbsp","fl oz","fl. oz.","oz. fl.","c","US lc","pt","p","qt","gal","US bsh","US bu","US pk","US dry gal","US dry bbl","US dry qt","US dry pt"]},b={0:"angle",1:"area",2:"data",3:"energy",4:"force",5:"frequency",6:"illuminance",7:"length",8:"luminance",9:"luminousIntensity",10:"mass",11:"power",12:"pressure",13:"temperature",14:"time",15:"volume"};var f={mps:{measure:"speed",toBase:1},kph:{measure:"speed",toBase:.2777777777777778},mph:{measure:"speed",toBase:.44704},kn:{measure:"speed",toBase:.5144444444444445},ft_s:{measure:"speed",toBase:.3048},min_km:{measure:"pace",toBase:.06},min_mi:{measure:"pace",toBase:.03728227153424004},mV:{measure:"voltage",toBase:.001},kV:{measure:"voltage",toBase:1e3},mA:{measure:"current",toBase:.001},A:{measure:"current",toBase:1},kA:{measure:"current",toBase:1e3},VA:{measure:"apparentPower",toBase:1},kVA:{measure:"apparentPower",toBase:1e3},MVA:{measure:"apparentPower",toBase:1e6},kvar:{measure:"reactivePower",toBase:1e3},Mvar:{measure:"reactivePower",toBase:1e6},varh:{measure:"reactiveEnergy",toBase:1},kvarh:{measure:"reactiveEnergy",toBase:1e3},Mvarh:{measure:"reactiveEnergy",toBase:1e6},m3s:{measure:"volumeFlowRate",toBase:1},m3h:{measure:"volumeFlowRate",toBase:.0002777777777777778},lps:{measure:"volumeFlowRate",toBase:.001},lpm:{measure:"volumeFlowRate",toBase:16666666666666667e-21},gpm:{measure:"volumeFlowRate",toBase:630901964e-13},cfs:{measure:"volumeFlowRate",toBase:.028316846592},ppm:{measure:"partsPer",toBase:1e-6},ppb:{measure:"partsPer",toBase:1e-9},ppt:{measure:"partsPer",toBase:1e-12},permille:{measure:"partsPer",toBase:.001},mil:{measure:"length",toBase:254e-7},mils:{measure:"length",toBase:254e-7},hand:{measure:"length",toBase:.1016},hands:{measure:"length",toBase:.1016},rod:{measure:"length",toBase:5.0292},rods:{measure:"length",toBase:5.0292},chain:{measure:"length",toBase:20.1168},chains:{measure:"length",toBase:20.1168},furlong:{measure:"length",toBase:201.168},furlongs:{measure:"length",toBase:201.168},cable:{measure:"length",toBase:185.2},cables:{measure:"length",toBase:185.2},league:{measure:"length",toBase:4828.032},leagues:{measure:"length",toBase:4828.032},carat:{measure:"mass",toBase:.2},carats:{measure:"mass",toBase:.2},centner:{measure:"mass",toBase:1e5},centners:{measure:"mass",toBase:1e5}};exports.a=d;exports.b=u;exports.c=p;exports.d=h;exports.e=b;exports.f=f;//# sourceMappingURL=chunk-CIQOK7Q4.cjs.map
2
- //# sourceMappingURL=chunk-CIQOK7Q4.cjs.map
1
+ 'use strict';var o=`0|1|radian,radians,rad,rads,r;0|6.283185307179586|turn,turns;0|0.017453292519943295|degree,degrees,deg,degs,\xB0;0|0.015707963267948967|gradian,gradians,gon,gons,grad,grads,grade,grades;0|0.0002908882086657216|arcminute,arcminutes,minutes of arc,arcmin,arcmins;0|0.00000484813681109536|arcsecond,arcseconds,seconds of arc,arcsec,arcsecs;1|1|square meter,square meters,square metre,square metres,m\xB2,m2,centiare,centiares,ca;1|1e+30|square petameter,square petametre,square petameters,square petametres,Pm\xB2,Pm2;1|1e+24|square terameter,square terametre,square terameters,square terametres,Tm\xB2,Tm2;1|1000000000000000000|square gigameter,square gigametre,square gigameters,square gigametres,Gm\xB2,Gm2;1|1000000000000|square megameter,square megametre,square megameters,square megametres,Mm\xB2,Mm2;1|1000000|square kilometer,square kilometre,square kilometers,square kilometres,km\xB2,km2;1|10000|square hectometer,square hectometre,square hectometers,square hectometres,hm\xB2,hm2,hectare,hectares,ha;1|100|square decameter,square decametre,square decameters,square decametres,dam\xB2,dam2,are,ares;1|0.01|square decimeter,square decimetre,square decimeters,square decimetres,dm\xB2,dm2;1|0.0001|square centimeter,square centimetre,square centimeters,square centimetres,cm\xB2,cm2;1|0.000001|square millimeter,square millimetre,square millimeters,square millimetres,mm\xB2,mm2;1|1e-12|square micrometer,square micrometre,square micrometers,square micrometres,\u03BCm\xB2,\xB5m\xB2,\u03BCm2,\xB5m2;1|1e-18|square nanometer,square nanometre,square nanometers,square nanometres,nm\xB2,nm2;1|1e-24|square picometer,square picometre,square picometers,square picometres,pm\xB2,pm2;1|1e-30|square femtometer,square femtometre,square femtometers,square femtometres,fm\xB2,fm2;1|4046.8564224|acre,acres,ac;1|10|deciare,deciares,da;1|1000|decare,decares,daa;1|0.09290304|square foot,square feet,sq ft,ft\xB2,ft2;1|0.00064516|square inch,square inches,sq in,in\xB2,in2;1|0.83612736|square yard,square yards,sq yd,yd\xB2,yd2;1|2589988.110336|square mile,square miles,sq mi,mi\xB2,mi2;1|666.6666666666666|m\u01D4,mu;2|1|bit,bits,b;2|1125899906842624|pebibit,pebibits,Pib;2|1099511627776|tebibit,tebibits,Tib;2|1073741824|gibibit,gibibits,Gib;2|1048576|mebibit,mebibits,Mib;2|1024|kibibit,kibibits,Kib;2|1000|Kb,kilobit,kilobits,kb;2|8000|KB,kilobyte,kilobytes,kB;2|1000000000000000|petabit,petabits,Pb;2|1000000000000|terabit,terabits,Tb;2|1000000000|gigabit,gigabits,Gb;2|1000000|megabit,megabits,Mb;2|100|hectobit,hectobits,hb;2|10|decabit,decabits,dab;2|0.1|decibit,decibits,db;2|0.01|centibit,centibits,cb;2|0.001|millibit,millibits,mb;2|0.000001|microbit,microbits,\u03BCb,\xB5b;2|1e-9|nanobit,nanobits,nb;2|1e-12|picobit,picobits,pb;2|1e-15|femtobit,femtobits,fb;2|4|nibble,nibbles,semioctet,semioctets,halfbyte,halfbytes;2|8|byte,bytes,octect,octects,B;2|9007199254740992|pebibyte,pebibytes,PiB;2|8796093022208|tebibyte,tebibytes,TiB;2|8589934592|gibibyte,gibibytes,GiB;2|8388608|mebibyte,mebibytes,MiB;2|8192|kibibyte,kibibytes,KiB;2|8000000000000000|petabyte,petabytes,PB;2|8000000000000|terabyte,terabytes,TB;2|8000000000|gigabyte,gigabytes,GB;2|8000000|megabyte,megabytes,MB;2|800|hectobyte,hectobytes,hB;2|80|decabyte,decabytes,daB;2|0.8|decibyte,decibytes,dB;2|0.08|centibyte,centibytes,cB;2|0.008|millibyte,millibytes,mB;2|0.000008|microbyte,microbytes,\u03BCB,\xB5B;2|8e-9|nanobyte,nanobytes,nB;2|8e-12|picobyte,picobytes,pB;2|8e-15|femtobyte,femtobytes,fB;2|16|hextet,hextets;3|1|joule,joules,J;3|1000000000000000|petajoule,petajoules,PJ;3|1000000000000|terajoule,terajoules,TJ;3|1000000000|gigajoule,gigajoules,GJ;3|1000000|megajoule,megajoules,MJ;3|1000|kilojoule,kilojoules,kJ;3|100|hectojoule,hectojoules,hJ;3|10|decajoule,decajoules,daJ;3|0.1|decijoule,decijoules,dJ;3|0.01|centijoule,centijoules,cJ;3|0.001|millijoule,millijoules,mJ;3|0.000001|microjoule,microjoules,\u03BCJ,\xB5J;3|1e-9|nanojoule,nanojoules,nJ;3|1e-12|picojoule,picojoules,pJ;3|1e-15|femtojoule,femtojoules,fJ;3|3600|watt-hour,W\u22C5h,W h,Wh;3|3600000000000000000|petawatt-hour,petawatt-hours,PW\u22C5h,PW h,PWh;3|3600000000000000|terawatt-hour,terawatt-hours,TW\u22C5h,TW h,TWh;3|3600000000000|gigawatt-hour,gigawatt-hours,GW\u22C5h,GW h,GWh;3|3600000000|megawatt-hour,megawatt-hours,MW\u22C5h,MW h,MWh;3|3600000|kilowatt-hour,kilowatt-hours,kW\u22C5h,kW h,kWh;3|360000|hectowatt-hour,hectowatt-hours,hW\u22C5h,hW h,hWh;3|36000|decawatt-hour,decawatt-hours,daW\u22C5h,daW h,daWh;3|360|deciwatt-hour,deciwatt-hours,dW\u22C5h,dW h,dWh;3|36|centiwatt-hour,centiwatt-hours,cW\u22C5h,cW h,cWh;3|3.6|milliwatt-hour,milliwatt-hours,mW\u22C5h,mW h,mWh;3|0.0036|microwatt-hour,microwatt-hours,\u03BCW\u22C5h,\xB5W\u22C5h,\u03BCW h,\xB5W h,\u03BCWh,\xB5Wh;3|0.0000036|nanowatt-hour,nanowatt-hours,nW\u22C5h,nW h,nWh;3|3.6e-9|picowatt-hour,picowatt-hours,pW\u22C5h,pW h,pWh;3|3.6e-12|femtowatt-hour,femtowatt-hours,fW\u22C5h,fW h,fWh;4|1|newton,newtons,N;4|1000000000000000|petanewton,petanewtons,PN;4|1000000000000|teranewton,teranewtons,TN;4|1000000000|giganewton,giganewtons,GN;4|1000000|meganewton,meganewtons,MN;4|1000|kilonewton,kilonewtons,kN;4|100|hectonewton,hectonewtons,hN;4|10|decanewton,decanewtons,daN;4|0.1|decinewton,decinewtons,dN;4|0.01|centinewton,centinewtons,cN;4|0.001|millinewton,millinewtons,mN;4|0.000001|micronewton,micronewtons,\u03BCN,\xB5N;4|1e-9|nanonewton,nanonewtons,nN;4|1e-12|piconewton,piconewtons,pN;4|1e-15|femtonewton,femtonewtons,fN;4|0.00001|dyne,dynes,dyn;4|4.448222|pound of force,pound-force,lbf;4|4448.2216|kip,klb,kipf,klbf;4|0.138255|poundal,poundals,pdl;4|9.80665|kilogram-force,kilopond,kiloponds,kgf,kp;4|9806.65|tonne-force,metric ton-force,megagram-force,megapond,tf,Mp;5|1|hertz,Hz;5|1000000000000000|petahertz,PHz;5|1000000000000|terahertz,THz;5|1000000000|gigahertz,GHz;5|1000000|megahertz,MHz;5|1000|kilohertz,kHz;5|100|hectohertz,hHz;5|10|decahertz,daHz;5|0.1|decihertz,dHz;5|0.01|centihertz,cHz;5|0.001|millihertz,mHz;5|0.000001|microhertz,\u03BCHz,\xB5Hz;5|1e-9|nanohertz,nHz;5|1e-12|picohertz,pHz;5|1e-15|femtohertz,fHz;6|1|lux,lx,lumen per square meter,lm/m2,lm/m\xB2;6|1000000000000000|petalux,Plx;6|1000000000000|teralux,Tlx;6|1000000000|gigalux,Glx;6|1000000|megalux,Mlx;6|1000|kilolux,klx;6|100|hectolux,hlx;6|10|decalux,dalx;6|0.1|decilux,dlx;6|0.01|centilux,clx;6|0.001|millilux,mlx;6|0.000001|microlux,\u03BClx,\xB5lx;6|1e-9|nanolux,nlx;6|1e-12|picolux,plx;6|1e-15|femtolux,flx;6|10.764|foot-candle,foot candle,fc,ft-c;6|10000|phot,ph;7|1|meter,meters,metre,metres,m;7|1000000000000000|petameter,petametre,petameters,petametres,Pm;7|1000000000000|terameter,terametre,terameters,terametres,Tm;7|1000000000|gigameter,gigametre,gigameters,gigametres,Gm;7|1000000|megameter,megametre,megameters,megametres,Mm;7|1000|kilometer,kilometre,kilometers,kilometres,km;7|100|hectometer,hectometre,hectometers,hectometres,hm;7|10|decameter,decametre,decameters,decametres,dam;7|0.1|decimeter,decimetre,decimeters,decimetres,dm;7|0.01|centimeter,centimetre,centimeters,centimetres,cm;7|0.001|millimeter,millimetre,millimeters,millimetres,mm;7|0.000001|micrometer,micrometre,micrometers,micrometres,\u03BCm,\xB5m;7|1e-9|nanometer,nanometre,nanometers,nanometres,nm;7|1e-12|picometer,picometre,picometers,picometres,pm;7|1e-15|femtometer,femtometre,femtometers,femtometres,fm;7|0.3048|foot,feet,ft,';7|0.3048006096012192|US survey foot,US survey feet,U.S. survey foot,U.S. survey feet;7|0.0254|inch,inches,in,";7|0.9144|yard,yards,yd;7|1609.344|mile,miles,mi;7|1852|nautical mile,nautical miles,M,NM,nmi;7|9460730472580800|light-year,light-years,ly;7|30856775814913670|parsec,parsecs,pc;7|0.0042333|pica,picas;7|0.0003528|point,points;8|1|candela per square meter,candelas per square meter,candela per square metre,candelas per square metre,cd/m2,cd/m\xB2,nit,nits,nt;8|1000000000000000|petacandela per square meter,petacandelas per square meter,petacandela per square metre,petacandelas per square metre,Pcd/m2,Pcd/m\xB2;8|1000000000000|teracandela per square meter,teracandelas per square meter,teracandela per square metre,teracandelas per square metre,Tcd/m2,Tcd/m\xB2;8|1000000000|gigacandela per square meter,gigacandelas per square meter,gigacandela per square metre,gigacandelas per square metre,Gcd/m2,Gcd/m\xB2;8|1000000|megacandela per square meter,megacandelas per square meter,megacandela per square metre,megacandelas per square metre,Mcd/m2,Mcd/m\xB2;8|1000|kilocandela per square meter,kilocandelas per square meter,kilocandela per square metre,kilocandelas per square metre,kcd/m2,kcd/m\xB2;8|100|hectocandela per square meter,hectocandelas per square meter,hectocandela per square metre,hectocandelas per square metre,hcd/m2,hcd/m\xB2;8|10|decacandela per square meter,decacandelas per square meter,decacandela per square metre,decacandelas per square metre,dacd/m2,dacd/m\xB2;8|0.1|decicandela per square meter,decicandelas per square meter,decicandela per square metre,decicandelas per square metre,dcd/m2,dcd/m\xB2;8|0.01|centicandela per square meter,centicandelas per square meter,centicandela per square metre,centicandelas per square metre,ccd/m2,ccd/m\xB2;8|0.001|millicandela per square meter,millicandelas per square meter,millicandela per square metre,millicandelas per square metre,mcd/m2,mcd/m\xB2;8|0.000001|microcandela per square meter,microcandelas per square meter,microcandela per square metre,microcandelas per square metre,\u03BCcd/m2,\xB5cd/m2,\u03BCcd/m\xB2,\xB5cd/m\xB2;8|1e-9|nanocandela per square meter,nanocandelas per square meter,nanocandela per square metre,nanocandelas per square metre,ncd/m2,ncd/m\xB2;8|1e-12|picocandela per square meter,picocandelas per square meter,picocandela per square metre,picocandelas per square metre,pcd/m2,pcd/m\xB2;8|1e-15|femtocandela per square meter,femtocandelas per square meter,femtocandela per square metre,femtocandelas per square metre,fcd/m2,fcd/m\xB2;9|1|candela,cd,candlepower,cp,CP;9|1000000000000000|petacandela,Pcd;9|1000000000000|teracandela,Tcd;9|1000000000|gigacandela,Gcd;9|1000000|megacandela,Mcd;9|1000|kilocandela,kcd;9|100|hectocandela,hcd;9|10|decacandela,dacd;9|0.1|decicandela,dcd;9|0.01|centicandela,ccd;9|0.001|millicandela,mcd;9|0.000001|microcandela,\u03BCcd,\xB5cd;9|1e-9|nanocandela,ncd;9|1e-12|picocandela,pcd;9|1e-15|femtocandela,fcd;9|0.92|hefnerkerze,HK;10|1|gram,grams,g;10|1000000000000000|petagram,petagrams,Pg,gigatonne,gigatonnes,Gt;10|1000000000000|teragram,teragrams,Tg,megatonne,megatonnes,Mt;10|1000000000|gigagram,gigagrams,Gg,kilotonne,kilotonnes,kt;10|1000000|megagram,megagrams,Mg,tonne,tonnes,metric ton,metric tons,t;10|1000|kilogram,kilograms,kg;10|100|hectogram,hectograms,hg;10|10|decagram,decagrams,dag;10|0.1|decigram,decigrams,dg;10|0.01|centigram,centigrams,cg;10|0.001|milligram,milligrams,mg;10|0.000001|microgram,micrograms,\u03BCg,\xB5g,mcg;10|1e-9|nanogram,nanograms,ng;10|1e-12|picogram,picograms,pg;10|1e-15|femtogram,femtograms,fg;10|453.59237|pound,pounds,lb,lbs;10|0.06479891|grain,grains,gr;10|6350.29318|stone,stones,st;10|28.349523125|ounce,ounces,oz;10|45360|short hundredweight,cental;10|50800|long hundredweight,imperial hundredweight,cwt;10|907184.74|short ton,short tons,US ton,US tons;10|1016046.9088|long ton,long tons,imperial ton,imperial tons,displacement ton,displacement tons;10|31.1034768|troy ounce,oz t,toz;11|1|watt,watts,W;11|1000000000000000|petawatt,petawatts,PW;11|1000000000000|terawatt,terawatts,TW;11|1000000000|gigawatt,gigawatts,GW;11|1000000|megawatt,megawatts,MW;11|1000|kilowatt,kilowatts,kW;11|100|hectowatt,hectowatts,hW;11|10|decawatt,decawatts,daW;11|0.1|deciwatt,deciwatts,dW;11|0.01|centiwatt,centiwatts,cW;11|0.001|milliwatt,milliwatts,mW;11|0.000001|microwatt,microwatts,\u03BCW,\xB5W;11|1e-9|nanowatt,nanowatts,nW;11|1e-12|picowatt,picowatts,pW;11|1e-15|femtowatt,femtowatts,fW;11|745.699872|horsepower,mechanical horsepower,hp;12|1|pascal,pascals,Pa;12|1000000000000000|petapascal,petapascals,PPa;12|1000000000000|terapascal,terapascals,TPa;12|1000000000|gigapascal,gigapascals,GPa;12|1000000|megapascal,megapascals,MPa,decabar,decabars,dabar;12|1000|kilopascal,kilopascals,kPa,centibar,centibars,cbar;12|100|hectopascal,hectopascals,hPa,millibar,millibars,mbar;12|10|decapascal,decapascals,daPa;12|0.1|decipascal,decipascals,dPa,microbar,microbars,\u03BCbar,\xB5bar;12|0.01|centipascal,centipascals,cPa;12|0.001|millipascal,millipascals,mPa;12|0.000001|micropascal,micropascals,\u03BCPa,\xB5Pa;12|1e-9|nanopascal,nanopascals,nPa;12|1e-12|picopascal,picopascals,pPa;12|1e-15|femtopascal,femtopascals,fPa;12|100000|bar,bars;12|100000000000000000000|petabar,petabars,Pbar;12|100000000000000000|terabar,terabars,Tbar;12|100000000000000|gigabar,gigabars,Gbar;12|100000000000|megabar,megabars,Mbar;12|100000000|kilobar,kilobars,kbar;12|10000000|hectobar,hectobars,hbar;12|10000|decibar,decibars,dbar;12|0.0001|nanobar,nanobars,nbar;12|1e-7|picobar,picobars,pbar;12|1e-10|femtobar,femtobars,fbar;12|133.32236842105263|torr,torrs,Torr;12|0.13332236842105263|millitorr,mTorr;12|101325|atmosphere,atmospheres,atm;12|6894.757|pound per square inch,pounds per square inch,psi,lbf/in2,lbf/in\xB2;12|249.0889|inch of water,inches of water,inAq,Aq;12|3386.389|inch of mercury,inches of mercury,inHg,Hg;13|1|kelvin,kelvins,K,celsius,C,\xB0C;13|1000000000000000|petakelvin,petakelvins,PK;13|1000000000000|terakelvin,terakelvins,TK;13|1000000000|gigakelvin,gigakelvins,GK;13|1000000|megakelvin,megakelvins,MK;13|1000|kilokelvin,kilokelvins,kK;13|100|hectokelvin,hectokelvins,hK;13|10|decakelvin,decakelvins,daK;13|0.1|decikelvin,decikelvins,dK;13|0.01|centikelvin,centikelvins,cK;13|0.001|millikelvin,millikelvins,mK;13|0.000001|microkelvin,microkelvins,\u03BCK,\xB5K;13|1e-9|nanokelvin,nanokelvins,nK;13|1e-12|picokelvin,picokelvins,pK;13|1e-15|femtokelvin,femtokelvins,fK;13|0.5555555555555556|fahrenheit,F,\xB0F,rankine,R;14|1|second,seconds,s;14|1000000000000000|petasecond,petaseconds,Ps;14|1000000000000|terasecond,teraseconds,Ts;14|1000000000|gigasecond,gigaseconds,Gs;14|1000000|megasecond,megaseconds,Ms;14|1000|kilosecond,kiloseconds,ks;14|100|hectosecond,hectoseconds,hs;14|10|decasecond,decaseconds,das;14|0.1|decisecond,deciseconds,ds;14|0.01|centisecond,centiseconds,cs;14|0.001|millisecond,milliseconds,ms;14|0.000001|microsecond,microseconds,\u03BCs,\xB5s;14|1e-9|nanosecond,nanoseconds,ns;14|1e-12|picosecond,picoseconds,ps;14|1e-15|femtosecond,femtoseconds,fs;14|60|minute,minutes,min;14|3600|hour,hours,h;14|86.4|milliday,millidays,md;14|86400|day,days,d;14|604800|week,weeks,wk;14|1209600|fortnight,fortnights,fn;14|2592000|month,months,mo;14|31536000|year,years,a,y,yr;14|315360000|decade,decades,dec;14|3153600000|century,centuries;14|31536000000|millennium,millennia;14|90|moment,moments;14|1e-8|shake,shakes;14|0.001024|time unit,TU;14|1e-13|svedberg,svedbergs,S;15|1|cubic meter,cubic meters,cubic metre,cubic metres,stere,steres,m\xB3,m3,kiloliter,kiloliters,kilolitre,kilolitres,kl,kL;15|1e+45|cubic petameter,cubic petameters,Pm3,Pm\xB3;15|1e+36|cubic terameter,cubic terameters,Tm3,Tm\xB3;15|1e+27|cubic gigameter,cubic gigameters,Gm3,Gm\xB3;15|1000000000000000000|cubic megameter,cubic megameters,Mm3,Mm\xB3;15|1000000000|cubic kilometer,cubic kilometers,km3,km\xB3,teraliter,teraliters,teralitre,teralitres,Tl,TL;15|1000000|cubic hectometer,cubic hectometers,hm3,hm\xB3,gigaliter,gigaliters,gigalitre,gigalitres,Gl,GL;15|1000|cubic decameter,cubic decameters,dam3,dam\xB3,megaliter,megaliters,megalitre,megalitres,Ml,ML;15|0.001|cubic decimeter,cubic decimeters,dm3,dm\xB3,liter,liters,litre,litres,l,L;15|0.000001|cubic centimeter,cubic centimeters,cm3,cm\xB3,milliliter,milliliters,millilitre,millilitres,ml,mL;15|1e-9|cubic millimeter,cubic millimeters,mm3,mm\xB3,microliter,microliters,microlitre,microlitres,\u03BCl,\xB5l,\u03BCL,\xB5L;15|1e-18|cubic micrometer,cubic micrometers,\u03BCm3,\xB5m3,\u03BCm\xB3,\xB5m\xB3,femtoliter,femtoliters,femtolitre,femtolitres,fl,fL;15|1e-27|cubic nanometer,cubic nanometers,nm3,nm\xB3;15|1e-36|cubic picometer,cubic picometers,pm3,pm\xB3;15|1e-45|cubic femtometer,cubic femtometers,fm3,fm\xB3;15|1000000000000|petaliter,petaliters,petalitre,petalitres,Pl,PL;15|0.1|hectoliter,hectoliters,hectolitre,hectolitres,hl,hL;15|0.01|decaliter,decaliters,decalitre,decalitres,dal,daL;15|0.0001|deciliter,deciliters,decilitre,decilitres,dl,dL;15|0.00001|centiliter,centiliters,centilitre,centilitres,cl,cL;15|1e-12|nanoliter,nanoliters,nanolitre,nanolitres,nl,nL;15|1e-15|picoliter,picoliters,picolitre,picolitres,pl,pL;15|4168181825.4405794|cubic mile,cubic miles,cu mi,mi3,mi\xB3;15|1233.48183754752|acre-foot,acre-feet,ac\u22C5ft,ac ft;15|0.764554857984|cubic yard,cubic yards,cu yd,yd3,yd\xB3;15|0.028316846592|cubic foot,cubic feet,cu ft,ft3,ft\xB3;15|0.002359737|board foot,board feet;15|0.000016387064|cubic inch,cubic inches,cu in,in3,in\xB3;15|1.133|measurement ton,measurement tons,MTON;15|0.16365924|imperial barrel,imperial barrels,imp bbl;15|0.03636872|imperial bushel,imperial bushels,imp bsh,imp bu;15|0.00909218|imperial peck,imperial pecks,pk,imp pk;15|0.00454609|imperial gallon,imperial gallons,imp gal;15|0.0011365225|imperial quart,imperial quarts,imp qt;15|0.00056826125|imperial pint,imperial pints,imp pt;15|0.0000284130625|imperial fluid ounce,imperial fluid ounces,imp fl oz;15|0.00000492892159375|teaspoon,teaspoons,US teaspoon,US teaspoons,tsp;15|0.00001478676478125|tablespoon,tablespoons,US tablespoon,US tablespoons,tbsp;15|0.0000295735295625|US fluid ounce,US fluid ounces,fl oz,fl. oz.,oz. fl.;15|0.0002365882365|cup,cups,c;15|0.00024|US legal cup,US legal cups,US lc;15|0.000473176473|pint,pints,US liquid pint,US liquid pints,pt,p;15|0.000946352946|quart,quarts,US liquid quart,US liquid quarts,qt;15|0.003785411784|gallon,gallons,US liquid gallon,US liquid gallons,gal;15|0.03523907016688|US bushel,US bushels,US bsh,US bu;15|0.00880976754172|US peck,US pk;15|0.00440488377086|US dry gallon,US dry gal;15|0.1156|US dry barrel,US dry barrels,US dry bbl;15|0.001101220942715|US dry quart,US dry qt;15|0.0005506104713575|US dry pint,US dry pt`;function l(m){let t={};for(let e of m.split(";")){let a=e.indexOf("|"),r=e.indexOf("|",a+1),s=Number(e.slice(0,a)),i=Number(e.slice(a+1,r)),c=[s,i];for(let n of e.slice(r+1).split(","))t[n]=c;}return t}var d=l(o),u={fahrenheit:459.67,F:459.67,"\xB0F":459.67,celsius:273.15,C:273.15,"\xB0C":273.15},p={0:[["deg",1]],1:[["mm2",1],["cm2",100],["m2",1e6],["km2",1e12]],2:[["bits",1],["B",8],["KB",8e3],["MB",8e6],["GB",8e9],["TB",8e12],["PB",8e15]],3:[["J",1],["Wh",3600],["kWh",36e5],["MWh",36e8],["GWh",36e11]],4:[["N",1]],5:[["Hz",1],["kHz",1e3],["MHz",1e6],["GHz",1e9],["THz",1e12],["PHz",1e15]],6:[["lux",1],["klx",1e3]],7:[["mm",1],["cm",10],["m",1e3],["km",1e6]],8:[["cd/m\xB2",1]],9:[["cd",1]],10:[["mg",1],["g",1e3],["kg",1e6]],11:[["W",1],["kW",1e3],["MW",1e6],["GW",1e9],["TW",1e12],["PW",1e15]],12:[["Pa",1]],13:[["C",1]],14:[["fs",1],["ps",1e3],["ns",1e6],["\xB5s",1e9],["ms",1e12],["s",1e15],["min",6e16],["h",36e17],["d",864e17],["y",31536e18]],15:[["mL",1],["L",1e3]]},h={0:["rad","rads","r","deg","degs","\xB0","gon","gons","grad","grads","grade","grades","arcmin","arcmins","arcsec","arcsecs"],1:["m\xB2","m2","Pm\xB2","Pm2","Tm\xB2","Tm2","Gm\xB2","Gm2","Mm\xB2","Mm2","km\xB2","km2","hm\xB2","hm2","dam\xB2","dam2","dm\xB2","dm2","cm\xB2","cm2","mm\xB2","mm2","\u03BCm\xB2","\xB5m\xB2","\u03BCm2","\xB5m2","nm\xB2","nm2","pm\xB2","pm2","fm\xB2","fm2","ac","ca","da","daa","ha","sq ft","ft\xB2","ft2","sq in","in\xB2","in2","sq yd","yd\xB2","yd2","sq mi","mi\xB2","mi2"],2:["b","Pib","Tib","Gib","Mib","Kib","Kb","KB","Pb","Tb","Gb","Mb","kb","hb","dab","db","cb","mb","\u03BCb","\xB5b","nb","pb","fb","B","PiB","TiB","GiB","MiB","KiB","PB","TB","GB","MB","kB","hB","daB","dB","cB","mB","\u03BCB","\xB5B","nB","pB","fB"],3:["J","PJ","TJ","GJ","MJ","kJ","hJ","daJ","dJ","cJ","mJ","\u03BCJ","\xB5J","nJ","pJ","fJ","W\u22C5h","W h","Wh","PW\u22C5h","PW h","PWh","TW\u22C5h","TW h","TWh","GW\u22C5h","GW h","GWh","MW\u22C5h","MW h","MWh","kW\u22C5h","kW h","kWh","hW\u22C5h","hW h","hWh","daW\u22C5h","daW h","daWh","dW\u22C5h","dW h","dWh","cW\u22C5h","cW h","cWh","mW\u22C5h","mW h","mWh","\u03BCW\u22C5h","\xB5W\u22C5h","\u03BCW h","\xB5W h","\u03BCWh","\xB5Wh","nW\u22C5h","nW h","nWh","pW\u22C5h","pW h","pWh","fW\u22C5h","fW h","fWh"],4:["N","PN","TN","GN","MN","kN","hN","daN","dN","cN","mN","\u03BCN","\xB5N","nN","pN","fN","dyn","lbf","klb","kipf","klbf","pdl","kgf","kp","tf","Mp"],5:["Hz","PHz","THz","GHz","MHz","kHz","hHz","daHz","dHz","cHz","mHz","\u03BCHz","\xB5Hz","nHz","pHz","fHz"],6:["lx","Plx","Tlx","Glx","Mlx","klx","hlx","dalx","dlx","clx","mlx","\u03BClx","\xB5lx","nlx","plx","flx","lm/m2","lm/m\xB2","fc","ft-c","ph"],7:["m","Pm","Tm","Gm","Mm","km","hm","dam","dm","cm","mm","\u03BCm","\xB5m","nm","pm","fm","ft","'","in",'"',"yd","mi","M","NM","nmi","ly","pc"],8:["cd/m2","cd/m\xB2","Pcd/m2","Pcd/m\xB2","Tcd/m2","Tcd/m\xB2","Gcd/m2","Gcd/m\xB2","Mcd/m2","Mcd/m\xB2","kcd/m2","kcd/m\xB2","hcd/m2","hcd/m\xB2","dacd/m2","dacd/m\xB2","dcd/m2","dcd/m\xB2","ccd/m2","ccd/m\xB2","mcd/m2","mcd/m\xB2","\u03BCcd/m2","\xB5cd/m2","\u03BCcd/m\xB2","\xB5cd/m\xB2","ncd/m2","ncd/m\xB2","pcd/m2","pcd/m\xB2","fcd/m2","fcd/m\xB2","nt"],9:["cd","Pcd","Tcd","Gcd","Mcd","kcd","hcd","dacd","dcd","ccd","mcd","\u03BCcd","\xB5cd","ncd","pcd","fcd","cp","CP","HK"],10:["g","Pg","Tg","Gg","Mg","kg","hg","dag","dg","cg","mg","\u03BCg","\xB5g","ng","pg","fg","mcg","t","kt","Mt","Gt","lb","lbs","gr","st","oz","cwt","oz t","toz"],11:["W","PW","TW","GW","MW","kW","hW","daW","dW","cW","mW","\u03BCW","\xB5W","nW","pW","fW","hp"],12:["Pa","PPa","TPa","GPa","MPa","kPa","hPa","daPa","dPa","cPa","mPa","\u03BCPa","\xB5Pa","nPa","pPa","fPa","bar","Pbar","Tbar","Gbar","Mbar","kbar","hbar","dabar","dbar","cbar","mbar","\u03BCbar","\xB5bar","nbar","pbar","fbar","Torr","mTorr","atm","psi","lbf/in2","lbf/in\xB2","inAq","Aq","inHg","Hg"],13:["K","PK","TK","GK","MK","kK","hK","daK","dK","cK","mK","\u03BCK","\xB5K","nK","pK","fK","F","\xB0F","C","\xB0C","R"],14:["s","Ps","Ts","Gs","Ms","ks","hs","das","ds","cs","ms","\u03BCs","\xB5s","ns","ps","fs","min","h","md","d","wk","fn","mo","a","y","yr","dec","TU","S"],15:["m\xB3","m3","Pm3","Pm\xB3","Tm3","Tm\xB3","Gm3","Gm\xB3","Mm3","Mm\xB3","km3","km\xB3","hm3","hm\xB3","dam3","dam\xB3","dm3","dm\xB3","cm3","cm\xB3","mm3","mm\xB3","\u03BCm3","\xB5m3","\u03BCm\xB3","\xB5m\xB3","nm3","nm\xB3","pm3","pm\xB3","fm3","fm\xB3","l","L","Pl","PL","Tl","TL","Gl","GL","Ml","ML","kl","kL","hl","hL","dal","daL","dl","dL","cl","cL","ml","mL","\u03BCl","\xB5l","\u03BCL","\xB5L","nl","nL","pl","pL","fl","fL","cu mi","mi3","mi\xB3","ac\u22C5ft","ac ft","cu yd","yd3","yd\xB3","cu ft","ft3","ft\xB3","cu in","in3","in\xB3","MTON","imp bbl","imp bsh","imp bu","pk","imp pk","imp gal","imp qt","imp pt","imp fl oz","tsp","tbsp","fl oz","fl. oz.","oz. fl.","c","US lc","pt","p","qt","gal","US bsh","US bu","US pk","US dry gal","US dry bbl","US dry qt","US dry pt"]},b={0:"angle",1:"area",2:"data",3:"energy",4:"force",5:"frequency",6:"illuminance",7:"length",8:"luminance",9:"luminousIntensity",10:"mass",11:"power",12:"pressure",13:"temperature",14:"time",15:"volume"};var f={mps:{measure:"speed",toBase:1},kph:{measure:"speed",toBase:.2777777777777778},mph:{measure:"speed",toBase:.44704},kn:{measure:"speed",toBase:.5144444444444445},ft_s:{measure:"speed",toBase:.3048},min_km:{measure:"pace",toBase:.06},min_mi:{measure:"pace",toBase:.03728227153424004},V:{measure:"voltage",toBase:1},mV:{measure:"voltage",toBase:.001},kV:{measure:"voltage",toBase:1e3},mA:{measure:"current",toBase:.001},A:{measure:"current",toBase:1},kA:{measure:"current",toBase:1e3},VA:{measure:"apparentPower",toBase:1},kVA:{measure:"apparentPower",toBase:1e3},MVA:{measure:"apparentPower",toBase:1e6},kvar:{measure:"reactivePower",toBase:1e3},Mvar:{measure:"reactivePower",toBase:1e6},varh:{measure:"reactiveEnergy",toBase:1},kvarh:{measure:"reactiveEnergy",toBase:1e3},Mvarh:{measure:"reactiveEnergy",toBase:1e6},m3s:{measure:"volumeFlowRate",toBase:1},m3h:{measure:"volumeFlowRate",toBase:.0002777777777777778},lps:{measure:"volumeFlowRate",toBase:.001},lpm:{measure:"volumeFlowRate",toBase:16666666666666667e-21},gpm:{measure:"volumeFlowRate",toBase:630901964e-13},cfs:{measure:"volumeFlowRate",toBase:.028316846592},mpg:{measure:"fuelEconomy",toBase:.425143707430272},kmpl:{measure:"fuelEconomy",toBase:1},l100km:{measure:"fuelConsumption",toBase:.01},ppm:{measure:"partsPer",toBase:1e-6},ppb:{measure:"partsPer",toBase:1e-9},ppt:{measure:"partsPer",toBase:1e-12},permille:{measure:"partsPer",toBase:.001},mil:{measure:"length",toBase:254e-7},mils:{measure:"length",toBase:254e-7},hand:{measure:"length",toBase:.1016},hands:{measure:"length",toBase:.1016},rod:{measure:"length",toBase:5.0292},rods:{measure:"length",toBase:5.0292},chain:{measure:"length",toBase:20.1168},chains:{measure:"length",toBase:20.1168},furlong:{measure:"length",toBase:201.168},furlongs:{measure:"length",toBase:201.168},cable:{measure:"length",toBase:185.2},cables:{measure:"length",toBase:185.2},league:{measure:"length",toBase:4828.032},leagues:{measure:"length",toBase:4828.032},carat:{measure:"mass",toBase:.2},carats:{measure:"mass",toBase:.2},centner:{measure:"mass",toBase:1e5},centners:{measure:"mass",toBase:1e5}};exports.a=d;exports.b=u;exports.c=p;exports.d=h;exports.e=b;exports.f=f;//# sourceMappingURL=chunk-6QRHN3I6.cjs.map
2
+ //# sourceMappingURL=chunk-6QRHN3I6.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/uom/generated/UnitTable.generated.ts","../src/uom/ExtendedUnits.ts"],"names":["PACKED_UNIT_TABLE","unpackUnitTable","packed","table","record","firstBar","secondBar","kind","ratio","entry","alias","UNIT_TABLE","UNIT_DIFFERENCES","BEST_UNITS_METRIC","MEASURE_SYMBOLS","MEASURE_KIND_NAMES","EXTENDED_UNITS"],"mappings":"aA6BA,IAAMA,EACJ,CAAA,unjBAAA,CAAA,CAOF,SAASC,CAAAA,CAAgBC,CAAAA,CAA2C,CAClE,IAAMC,CAAAA,CAAmC,EAAC,CAC1C,QAAWC,CAAAA,IAAUF,CAAAA,CAAO,MAAM,GAAG,CAAA,CAAG,CACtC,IAAMG,CAAAA,CAAWD,CAAAA,CAAO,OAAA,CAAQ,GAAG,CAAA,CAC7BE,CAAAA,CAAYF,EAAO,OAAA,CAAQ,GAAA,CAAKC,EAAW,CAAC,CAAA,CAC5CE,CAAAA,CAAO,MAAA,CAAOH,EAAO,KAAA,CAAM,CAAA,CAAGC,CAAQ,CAAC,CAAA,CACvCG,EAAQ,MAAA,CAAOJ,CAAAA,CAAO,KAAA,CAAMC,CAAAA,CAAW,EAAGC,CAAS,CAAC,CAAA,CACpDG,CAAAA,CAAmB,CAACF,CAAAA,CAAMC,CAAK,CAAA,CACrC,IAAA,IAAWE,KAASN,CAAAA,CAAO,KAAA,CAAME,EAAY,CAAC,CAAA,CAAE,MAAM,GAAG,CAAA,CACvDH,CAAAA,CAAMO,CAAK,EAAID,EAEnB,CACA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QAAS,CAAA,CAC9C,QAAS,CAAE,OAAA,CAAS,QAAA,CAAU,MAAA,CAAQ,QAAS,CAAA,CAK/C,KAAA,CAAO,CAAE,OAAA,CAAS,MAAA,CAAQ,OAAQ,EAAI,CAAA,CACtC,MAAA,CAAQ,CAAE,QAAS,MAAA,CAAQ,MAAA,CAAQ,EAAI,CAAA,CAGvC,OAAA,CAAS,CAAE,OAAA,CAAS,MAAA,CAAQ,MAAA,CAAQ,GAAO,EAC3C,QAAA,CAAU,CAAE,QAAS,MAAA,CAAQ,MAAA,CAAQ,GAAO,CAE9C","file":"chunk-6QRHN3I6.cjs","sourcesContent":["/**\n * Unit conversion tables, ported from the `convert` npm package v7.0.2.\n *\n * DO NOT EDIT BY HAND. Regenerate with:\n * node scripts/generate-unit-table.mjs\n *\n * Ported rather than depended on so the engine ships with no runtime\n * dependencies. See scripts/generate-unit-table.mjs for why the tables are\n * mirrored verbatim rather than hand-authored or recomputed from SI\n * definitions, and THIRD-PARTY-NOTICES.md for the upstream licence.\n *\n * Mirrored verbatim EXCEPT where upstream is arithmetically wrong. Those few\n * entries are marked \"corrected\" below and each one is justified in\n * UPSTREAM_UNIT_CORRECTIONS / UPSTREAM_BEST_UNIT_CORRECTIONS in the generator.\n * They are corrections of an upstream error, never a local preference.\n *\n * Upstream: https://github.com/citycide/convert (MIT, Copyright (c) Jonah Snider)\n */\n\n/** A unit's measure kind and its ratio to that measure's base unit. */\nexport type UnitEntry = readonly [kind: number, ratio: number];\n\n/**\n * Source for {@link UNIT_TABLE}, packed. Each `;`-separated record is\n * `kind|ratio|alias1,alias2,...`, so the 378 distinct `[kind, ratio]` pairs\n * spell each ratio once rather than once per alias. See {@link UNIT_TABLE}.\n *\n * Corrected vs upstream: \"dm2\", \"dm²\", \"square decimeter\", \"square decimeters\", \"square decimetre\", \"square decimetres\".\n */\nconst PACKED_UNIT_TABLE =\n \"0|1|radian,radians,rad,rads,r;0|6.283185307179586|turn,turns;0|0.017453292519943295|degree,degrees,deg,degs,°;0|0.015707963267948967|gradian,gradians,gon,gons,grad,grads,grade,grades;0|0.0002908882086657216|arcminute,arcminutes,minutes of arc,arcmin,arcmins;0|0.00000484813681109536|arcsecond,arcseconds,seconds of arc,arcsec,arcsecs;1|1|square meter,square meters,square metre,square metres,m²,m2,centiare,centiares,ca;1|1e+30|square petameter,square petametre,square petameters,square petametres,Pm²,Pm2;1|1e+24|square terameter,square terametre,square terameters,square terametres,Tm²,Tm2;1|1000000000000000000|square gigameter,square gigametre,square gigameters,square gigametres,Gm²,Gm2;1|1000000000000|square megameter,square megametre,square megameters,square megametres,Mm²,Mm2;1|1000000|square kilometer,square kilometre,square kilometers,square kilometres,km²,km2;1|10000|square hectometer,square hectometre,square hectometers,square hectometres,hm²,hm2,hectare,hectares,ha;1|100|square decameter,square decametre,square decameters,square decametres,dam²,dam2,are,ares;1|0.01|square decimeter,square decimetre,square decimeters,square decimetres,dm²,dm2;1|0.0001|square centimeter,square centimetre,square centimeters,square centimetres,cm²,cm2;1|0.000001|square millimeter,square millimetre,square millimeters,square millimetres,mm²,mm2;1|1e-12|square micrometer,square micrometre,square micrometers,square micrometres,μm²,µm²,μm2,µm2;1|1e-18|square nanometer,square nanometre,square nanometers,square nanometres,nm²,nm2;1|1e-24|square picometer,square picometre,square picometers,square picometres,pm²,pm2;1|1e-30|square femtometer,square femtometre,square femtometers,square femtometres,fm²,fm2;1|4046.8564224|acre,acres,ac;1|10|deciare,deciares,da;1|1000|decare,decares,daa;1|0.09290304|square foot,square feet,sq ft,ft²,ft2;1|0.00064516|square inch,square inches,sq in,in²,in2;1|0.83612736|square yard,square yards,sq yd,yd²,yd2;1|2589988.110336|square mile,square miles,sq mi,mi²,mi2;1|666.6666666666666|mǔ,mu;2|1|bit,bits,b;2|1125899906842624|pebibit,pebibits,Pib;2|1099511627776|tebibit,tebibits,Tib;2|1073741824|gibibit,gibibits,Gib;2|1048576|mebibit,mebibits,Mib;2|1024|kibibit,kibibits,Kib;2|1000|Kb,kilobit,kilobits,kb;2|8000|KB,kilobyte,kilobytes,kB;2|1000000000000000|petabit,petabits,Pb;2|1000000000000|terabit,terabits,Tb;2|1000000000|gigabit,gigabits,Gb;2|1000000|megabit,megabits,Mb;2|100|hectobit,hectobits,hb;2|10|decabit,decabits,dab;2|0.1|decibit,decibits,db;2|0.01|centibit,centibits,cb;2|0.001|millibit,millibits,mb;2|0.000001|microbit,microbits,μb,µb;2|1e-9|nanobit,nanobits,nb;2|1e-12|picobit,picobits,pb;2|1e-15|femtobit,femtobits,fb;2|4|nibble,nibbles,semioctet,semioctets,halfbyte,halfbytes;2|8|byte,bytes,octect,octects,B;2|9007199254740992|pebibyte,pebibytes,PiB;2|8796093022208|tebibyte,tebibytes,TiB;2|8589934592|gibibyte,gibibytes,GiB;2|8388608|mebibyte,mebibytes,MiB;2|8192|kibibyte,kibibytes,KiB;2|8000000000000000|petabyte,petabytes,PB;2|8000000000000|terabyte,terabytes,TB;2|8000000000|gigabyte,gigabytes,GB;2|8000000|megabyte,megabytes,MB;2|800|hectobyte,hectobytes,hB;2|80|decabyte,decabytes,daB;2|0.8|decibyte,decibytes,dB;2|0.08|centibyte,centibytes,cB;2|0.008|millibyte,millibytes,mB;2|0.000008|microbyte,microbytes,μB,µB;2|8e-9|nanobyte,nanobytes,nB;2|8e-12|picobyte,picobytes,pB;2|8e-15|femtobyte,femtobytes,fB;2|16|hextet,hextets;3|1|joule,joules,J;3|1000000000000000|petajoule,petajoules,PJ;3|1000000000000|terajoule,terajoules,TJ;3|1000000000|gigajoule,gigajoules,GJ;3|1000000|megajoule,megajoules,MJ;3|1000|kilojoule,kilojoules,kJ;3|100|hectojoule,hectojoules,hJ;3|10|decajoule,decajoules,daJ;3|0.1|decijoule,decijoules,dJ;3|0.01|centijoule,centijoules,cJ;3|0.001|millijoule,millijoules,mJ;3|0.000001|microjoule,microjoules,μJ,µJ;3|1e-9|nanojoule,nanojoules,nJ;3|1e-12|picojoule,picojoules,pJ;3|1e-15|femtojoule,femtojoules,fJ;3|3600|watt-hour,W⋅h,W h,Wh;3|3600000000000000000|petawatt-hour,petawatt-hours,PW⋅h,PW h,PWh;3|3600000000000000|terawatt-hour,terawatt-hours,TW⋅h,TW h,TWh;3|3600000000000|gigawatt-hour,gigawatt-hours,GW⋅h,GW h,GWh;3|3600000000|megawatt-hour,megawatt-hours,MW⋅h,MW h,MWh;3|3600000|kilowatt-hour,kilowatt-hours,kW⋅h,kW h,kWh;3|360000|hectowatt-hour,hectowatt-hours,hW⋅h,hW h,hWh;3|36000|decawatt-hour,decawatt-hours,daW⋅h,daW h,daWh;3|360|deciwatt-hour,deciwatt-hours,dW⋅h,dW h,dWh;3|36|centiwatt-hour,centiwatt-hours,cW⋅h,cW h,cWh;3|3.6|milliwatt-hour,milliwatt-hours,mW⋅h,mW h,mWh;3|0.0036|microwatt-hour,microwatt-hours,μW⋅h,µW⋅h,μW h,µW h,μWh,µWh;3|0.0000036|nanowatt-hour,nanowatt-hours,nW⋅h,nW h,nWh;3|3.6e-9|picowatt-hour,picowatt-hours,pW⋅h,pW h,pWh;3|3.6e-12|femtowatt-hour,femtowatt-hours,fW⋅h,fW h,fWh;4|1|newton,newtons,N;4|1000000000000000|petanewton,petanewtons,PN;4|1000000000000|teranewton,teranewtons,TN;4|1000000000|giganewton,giganewtons,GN;4|1000000|meganewton,meganewtons,MN;4|1000|kilonewton,kilonewtons,kN;4|100|hectonewton,hectonewtons,hN;4|10|decanewton,decanewtons,daN;4|0.1|decinewton,decinewtons,dN;4|0.01|centinewton,centinewtons,cN;4|0.001|millinewton,millinewtons,mN;4|0.000001|micronewton,micronewtons,μN,µN;4|1e-9|nanonewton,nanonewtons,nN;4|1e-12|piconewton,piconewtons,pN;4|1e-15|femtonewton,femtonewtons,fN;4|0.00001|dyne,dynes,dyn;4|4.448222|pound of force,pound-force,lbf;4|4448.2216|kip,klb,kipf,klbf;4|0.138255|poundal,poundals,pdl;4|9.80665|kilogram-force,kilopond,kiloponds,kgf,kp;4|9806.65|tonne-force,metric ton-force,megagram-force,megapond,tf,Mp;5|1|hertz,Hz;5|1000000000000000|petahertz,PHz;5|1000000000000|terahertz,THz;5|1000000000|gigahertz,GHz;5|1000000|megahertz,MHz;5|1000|kilohertz,kHz;5|100|hectohertz,hHz;5|10|decahertz,daHz;5|0.1|decihertz,dHz;5|0.01|centihertz,cHz;5|0.001|millihertz,mHz;5|0.000001|microhertz,μHz,µHz;5|1e-9|nanohertz,nHz;5|1e-12|picohertz,pHz;5|1e-15|femtohertz,fHz;6|1|lux,lx,lumen per square meter,lm/m2,lm/m²;6|1000000000000000|petalux,Plx;6|1000000000000|teralux,Tlx;6|1000000000|gigalux,Glx;6|1000000|megalux,Mlx;6|1000|kilolux,klx;6|100|hectolux,hlx;6|10|decalux,dalx;6|0.1|decilux,dlx;6|0.01|centilux,clx;6|0.001|millilux,mlx;6|0.000001|microlux,μlx,µlx;6|1e-9|nanolux,nlx;6|1e-12|picolux,plx;6|1e-15|femtolux,flx;6|10.764|foot-candle,foot candle,fc,ft-c;6|10000|phot,ph;7|1|meter,meters,metre,metres,m;7|1000000000000000|petameter,petametre,petameters,petametres,Pm;7|1000000000000|terameter,terametre,terameters,terametres,Tm;7|1000000000|gigameter,gigametre,gigameters,gigametres,Gm;7|1000000|megameter,megametre,megameters,megametres,Mm;7|1000|kilometer,kilometre,kilometers,kilometres,km;7|100|hectometer,hectometre,hectometers,hectometres,hm;7|10|decameter,decametre,decameters,decametres,dam;7|0.1|decimeter,decimetre,decimeters,decimetres,dm;7|0.01|centimeter,centimetre,centimeters,centimetres,cm;7|0.001|millimeter,millimetre,millimeters,millimetres,mm;7|0.000001|micrometer,micrometre,micrometers,micrometres,μm,µm;7|1e-9|nanometer,nanometre,nanometers,nanometres,nm;7|1e-12|picometer,picometre,picometers,picometres,pm;7|1e-15|femtometer,femtometre,femtometers,femtometres,fm;7|0.3048|foot,feet,ft,';7|0.3048006096012192|US survey foot,US survey feet,U.S. survey foot,U.S. survey feet;7|0.0254|inch,inches,in,\\\";7|0.9144|yard,yards,yd;7|1609.344|mile,miles,mi;7|1852|nautical mile,nautical miles,M,NM,nmi;7|9460730472580800|light-year,light-years,ly;7|30856775814913670|parsec,parsecs,pc;7|0.0042333|pica,picas;7|0.0003528|point,points;8|1|candela per square meter,candelas per square meter,candela per square metre,candelas per square metre,cd/m2,cd/m²,nit,nits,nt;8|1000000000000000|petacandela per square meter,petacandelas per square meter,petacandela per square metre,petacandelas per square metre,Pcd/m2,Pcd/m²;8|1000000000000|teracandela per square meter,teracandelas per square meter,teracandela per square metre,teracandelas per square metre,Tcd/m2,Tcd/m²;8|1000000000|gigacandela per square meter,gigacandelas per square meter,gigacandela per square metre,gigacandelas per square metre,Gcd/m2,Gcd/m²;8|1000000|megacandela per square meter,megacandelas per square meter,megacandela per square metre,megacandelas per square metre,Mcd/m2,Mcd/m²;8|1000|kilocandela per square meter,kilocandelas per square meter,kilocandela per square metre,kilocandelas per square metre,kcd/m2,kcd/m²;8|100|hectocandela per square meter,hectocandelas per square meter,hectocandela per square metre,hectocandelas per square metre,hcd/m2,hcd/m²;8|10|decacandela per square meter,decacandelas per square meter,decacandela per square metre,decacandelas per square metre,dacd/m2,dacd/m²;8|0.1|decicandela per square meter,decicandelas per square meter,decicandela per square metre,decicandelas per square metre,dcd/m2,dcd/m²;8|0.01|centicandela per square meter,centicandelas per square meter,centicandela per square metre,centicandelas per square metre,ccd/m2,ccd/m²;8|0.001|millicandela per square meter,millicandelas per square meter,millicandela per square metre,millicandelas per square metre,mcd/m2,mcd/m²;8|0.000001|microcandela per square meter,microcandelas per square meter,microcandela per square metre,microcandelas per square metre,μcd/m2,µcd/m2,μcd/m²,µcd/m²;8|1e-9|nanocandela per square meter,nanocandelas per square meter,nanocandela per square metre,nanocandelas per square metre,ncd/m2,ncd/m²;8|1e-12|picocandela per square meter,picocandelas per square meter,picocandela per square metre,picocandelas per square metre,pcd/m2,pcd/m²;8|1e-15|femtocandela per square meter,femtocandelas per square meter,femtocandela per square metre,femtocandelas per square metre,fcd/m2,fcd/m²;9|1|candela,cd,candlepower,cp,CP;9|1000000000000000|petacandela,Pcd;9|1000000000000|teracandela,Tcd;9|1000000000|gigacandela,Gcd;9|1000000|megacandela,Mcd;9|1000|kilocandela,kcd;9|100|hectocandela,hcd;9|10|decacandela,dacd;9|0.1|decicandela,dcd;9|0.01|centicandela,ccd;9|0.001|millicandela,mcd;9|0.000001|microcandela,μcd,µcd;9|1e-9|nanocandela,ncd;9|1e-12|picocandela,pcd;9|1e-15|femtocandela,fcd;9|0.92|hefnerkerze,HK;10|1|gram,grams,g;10|1000000000000000|petagram,petagrams,Pg,gigatonne,gigatonnes,Gt;10|1000000000000|teragram,teragrams,Tg,megatonne,megatonnes,Mt;10|1000000000|gigagram,gigagrams,Gg,kilotonne,kilotonnes,kt;10|1000000|megagram,megagrams,Mg,tonne,tonnes,metric ton,metric tons,t;10|1000|kilogram,kilograms,kg;10|100|hectogram,hectograms,hg;10|10|decagram,decagrams,dag;10|0.1|decigram,decigrams,dg;10|0.01|centigram,centigrams,cg;10|0.001|milligram,milligrams,mg;10|0.000001|microgram,micrograms,μg,µg,mcg;10|1e-9|nanogram,nanograms,ng;10|1e-12|picogram,picograms,pg;10|1e-15|femtogram,femtograms,fg;10|453.59237|pound,pounds,lb,lbs;10|0.06479891|grain,grains,gr;10|6350.29318|stone,stones,st;10|28.349523125|ounce,ounces,oz;10|45360|short hundredweight,cental;10|50800|long hundredweight,imperial hundredweight,cwt;10|907184.74|short ton,short tons,US ton,US tons;10|1016046.9088|long ton,long tons,imperial ton,imperial tons,displacement ton,displacement tons;10|31.1034768|troy ounce,oz t,toz;11|1|watt,watts,W;11|1000000000000000|petawatt,petawatts,PW;11|1000000000000|terawatt,terawatts,TW;11|1000000000|gigawatt,gigawatts,GW;11|1000000|megawatt,megawatts,MW;11|1000|kilowatt,kilowatts,kW;11|100|hectowatt,hectowatts,hW;11|10|decawatt,decawatts,daW;11|0.1|deciwatt,deciwatts,dW;11|0.01|centiwatt,centiwatts,cW;11|0.001|milliwatt,milliwatts,mW;11|0.000001|microwatt,microwatts,μW,µW;11|1e-9|nanowatt,nanowatts,nW;11|1e-12|picowatt,picowatts,pW;11|1e-15|femtowatt,femtowatts,fW;11|745.699872|horsepower,mechanical horsepower,hp;12|1|pascal,pascals,Pa;12|1000000000000000|petapascal,petapascals,PPa;12|1000000000000|terapascal,terapascals,TPa;12|1000000000|gigapascal,gigapascals,GPa;12|1000000|megapascal,megapascals,MPa,decabar,decabars,dabar;12|1000|kilopascal,kilopascals,kPa,centibar,centibars,cbar;12|100|hectopascal,hectopascals,hPa,millibar,millibars,mbar;12|10|decapascal,decapascals,daPa;12|0.1|decipascal,decipascals,dPa,microbar,microbars,μbar,µbar;12|0.01|centipascal,centipascals,cPa;12|0.001|millipascal,millipascals,mPa;12|0.000001|micropascal,micropascals,μPa,µPa;12|1e-9|nanopascal,nanopascals,nPa;12|1e-12|picopascal,picopascals,pPa;12|1e-15|femtopascal,femtopascals,fPa;12|100000|bar,bars;12|100000000000000000000|petabar,petabars,Pbar;12|100000000000000000|terabar,terabars,Tbar;12|100000000000000|gigabar,gigabars,Gbar;12|100000000000|megabar,megabars,Mbar;12|100000000|kilobar,kilobars,kbar;12|10000000|hectobar,hectobars,hbar;12|10000|decibar,decibars,dbar;12|0.0001|nanobar,nanobars,nbar;12|1e-7|picobar,picobars,pbar;12|1e-10|femtobar,femtobars,fbar;12|133.32236842105263|torr,torrs,Torr;12|0.13332236842105263|millitorr,mTorr;12|101325|atmosphere,atmospheres,atm;12|6894.757|pound per square inch,pounds per square inch,psi,lbf/in2,lbf/in²;12|249.0889|inch of water,inches of water,inAq,Aq;12|3386.389|inch of mercury,inches of mercury,inHg,Hg;13|1|kelvin,kelvins,K,celsius,C,°C;13|1000000000000000|petakelvin,petakelvins,PK;13|1000000000000|terakelvin,terakelvins,TK;13|1000000000|gigakelvin,gigakelvins,GK;13|1000000|megakelvin,megakelvins,MK;13|1000|kilokelvin,kilokelvins,kK;13|100|hectokelvin,hectokelvins,hK;13|10|decakelvin,decakelvins,daK;13|0.1|decikelvin,decikelvins,dK;13|0.01|centikelvin,centikelvins,cK;13|0.001|millikelvin,millikelvins,mK;13|0.000001|microkelvin,microkelvins,μK,µK;13|1e-9|nanokelvin,nanokelvins,nK;13|1e-12|picokelvin,picokelvins,pK;13|1e-15|femtokelvin,femtokelvins,fK;13|0.5555555555555556|fahrenheit,F,°F,rankine,R;14|1|second,seconds,s;14|1000000000000000|petasecond,petaseconds,Ps;14|1000000000000|terasecond,teraseconds,Ts;14|1000000000|gigasecond,gigaseconds,Gs;14|1000000|megasecond,megaseconds,Ms;14|1000|kilosecond,kiloseconds,ks;14|100|hectosecond,hectoseconds,hs;14|10|decasecond,decaseconds,das;14|0.1|decisecond,deciseconds,ds;14|0.01|centisecond,centiseconds,cs;14|0.001|millisecond,milliseconds,ms;14|0.000001|microsecond,microseconds,μs,µs;14|1e-9|nanosecond,nanoseconds,ns;14|1e-12|picosecond,picoseconds,ps;14|1e-15|femtosecond,femtoseconds,fs;14|60|minute,minutes,min;14|3600|hour,hours,h;14|86.4|milliday,millidays,md;14|86400|day,days,d;14|604800|week,weeks,wk;14|1209600|fortnight,fortnights,fn;14|2592000|month,months,mo;14|31536000|year,years,a,y,yr;14|315360000|decade,decades,dec;14|3153600000|century,centuries;14|31536000000|millennium,millennia;14|90|moment,moments;14|1e-8|shake,shakes;14|0.001024|time unit,TU;14|1e-13|svedberg,svedbergs,S;15|1|cubic meter,cubic meters,cubic metre,cubic metres,stere,steres,m³,m3,kiloliter,kiloliters,kilolitre,kilolitres,kl,kL;15|1e+45|cubic petameter,cubic petameters,Pm3,Pm³;15|1e+36|cubic terameter,cubic terameters,Tm3,Tm³;15|1e+27|cubic gigameter,cubic gigameters,Gm3,Gm³;15|1000000000000000000|cubic megameter,cubic megameters,Mm3,Mm³;15|1000000000|cubic kilometer,cubic kilometers,km3,km³,teraliter,teraliters,teralitre,teralitres,Tl,TL;15|1000000|cubic hectometer,cubic hectometers,hm3,hm³,gigaliter,gigaliters,gigalitre,gigalitres,Gl,GL;15|1000|cubic decameter,cubic decameters,dam3,dam³,megaliter,megaliters,megalitre,megalitres,Ml,ML;15|0.001|cubic decimeter,cubic decimeters,dm3,dm³,liter,liters,litre,litres,l,L;15|0.000001|cubic centimeter,cubic centimeters,cm3,cm³,milliliter,milliliters,millilitre,millilitres,ml,mL;15|1e-9|cubic millimeter,cubic millimeters,mm3,mm³,microliter,microliters,microlitre,microlitres,μl,µl,μL,µL;15|1e-18|cubic micrometer,cubic micrometers,μm3,µm3,μm³,µm³,femtoliter,femtoliters,femtolitre,femtolitres,fl,fL;15|1e-27|cubic nanometer,cubic nanometers,nm3,nm³;15|1e-36|cubic picometer,cubic picometers,pm3,pm³;15|1e-45|cubic femtometer,cubic femtometers,fm3,fm³;15|1000000000000|petaliter,petaliters,petalitre,petalitres,Pl,PL;15|0.1|hectoliter,hectoliters,hectolitre,hectolitres,hl,hL;15|0.01|decaliter,decaliters,decalitre,decalitres,dal,daL;15|0.0001|deciliter,deciliters,decilitre,decilitres,dl,dL;15|0.00001|centiliter,centiliters,centilitre,centilitres,cl,cL;15|1e-12|nanoliter,nanoliters,nanolitre,nanolitres,nl,nL;15|1e-15|picoliter,picoliters,picolitre,picolitres,pl,pL;15|4168181825.4405794|cubic mile,cubic miles,cu mi,mi3,mi³;15|1233.48183754752|acre-foot,acre-feet,ac⋅ft,ac ft;15|0.764554857984|cubic yard,cubic yards,cu yd,yd3,yd³;15|0.028316846592|cubic foot,cubic feet,cu ft,ft3,ft³;15|0.002359737|board foot,board feet;15|0.000016387064|cubic inch,cubic inches,cu in,in3,in³;15|1.133|measurement ton,measurement tons,MTON;15|0.16365924|imperial barrel,imperial barrels,imp bbl;15|0.03636872|imperial bushel,imperial bushels,imp bsh,imp bu;15|0.00909218|imperial peck,imperial pecks,pk,imp pk;15|0.00454609|imperial gallon,imperial gallons,imp gal;15|0.0011365225|imperial quart,imperial quarts,imp qt;15|0.00056826125|imperial pint,imperial pints,imp pt;15|0.0000284130625|imperial fluid ounce,imperial fluid ounces,imp fl oz;15|0.00000492892159375|teaspoon,teaspoons,US teaspoon,US teaspoons,tsp;15|0.00001478676478125|tablespoon,tablespoons,US tablespoon,US tablespoons,tbsp;15|0.0000295735295625|US fluid ounce,US fluid ounces,fl oz,fl. oz.,oz. fl.;15|0.0002365882365|cup,cups,c;15|0.00024|US legal cup,US legal cups,US lc;15|0.000473176473|pint,pints,US liquid pint,US liquid pints,pt,p;15|0.000946352946|quart,quarts,US liquid quart,US liquid quarts,qt;15|0.003785411784|gallon,gallons,US liquid gallon,US liquid gallons,gal;15|0.03523907016688|US bushel,US bushels,US bsh,US bu;15|0.00880976754172|US peck,US pk;15|0.00440488377086|US dry gallon,US dry gal;15|0.1156|US dry barrel,US dry barrels,US dry bbl;15|0.001101220942715|US dry quart,US dry qt;15|0.0005506104713575|US dry pint,US dry pt\";\n\n/**\n * Decodes {@link PACKED_UNIT_TABLE} into the {@link UNIT_TABLE} record. The\n * aliases in one record share a single `[kind, ratio]` tuple, safe since the\n * table is read-only by type.\n */\nfunction unpackUnitTable(packed: string): Record<string, UnitEntry> {\n const table: Record<string, UnitEntry> = {};\n for (const record of packed.split(\";\")) {\n const firstBar = record.indexOf(\"|\");\n const secondBar = record.indexOf(\"|\", firstBar + 1);\n const kind = Number(record.slice(0, firstBar));\n const ratio = Number(record.slice(firstBar + 1, secondBar));\n const entry: UnitEntry = [kind, ratio];\n for (const alias of record.slice(secondBar + 1).split(\",\")) {\n table[alias] = entry;\n }\n }\n return table;\n}\n\n/**\n * Every unit spelling the engine can resolve, to `[measureKind, ratioToBase]`.\n *\n * Keys are case-sensitive and are never normalized or aliased: `C` is Celsius\n * and `c` is a cup, `MB` is megabytes and `mb` is millibits. Multi-word\n * spellings are present here and resolve through the conversion API even though\n * the lexer cannot tokenize them.\n *\n * Stored packed (see {@link PACKED_UNIT_TABLE}) and decoded once at load: 1456\n * spellings share 378 distinct pairs, so each ratio parses once per pair rather\n * than once per alias. The generator asserts the packed form decodes to exactly\n * the source table.\n */\nexport const UNIT_TABLE: Readonly<Record<string, UnitEntry>> = unpackUnitTable(PACKED_UNIT_TABLE);\n\n/**\n * Additive offsets applied around the ratio, for measures whose scales do not\n * share an origin. Temperature only.\n */\nexport const UNIT_DIFFERENCES: Readonly<Record<string, number>> = {\n \"fahrenheit\": 459.67,\n \"F\": 459.67,\n \"°F\": 459.67,\n \"celsius\": 273.15,\n \"C\": 273.15,\n \"°C\": 273.15,\n};\n\n/**\n * Ordered `[symbol, threshold]` pairs per measure kind, used to pick the most\n * readable unit for a magnitude. Thresholds are expressed in the list's FIRST\n * unit, which is therefore also its smallest, and the last entry whose\n * threshold the absolute value reaches wins.\n *\n * The two properties are load-bearing together: `convertToBestMetric` converts\n * the magnitude into the first unit and then walks forwards, breaking at the\n * first threshold it does not reach. A list that does not ascend runs off the\n * end of the sensible units rather than merely picking a poor one, and moving a\n * different unit to the front silently changes what every threshold means.\n *\n * Metric only. The imperial lists exist upstream but nothing here has ever\n * requested them, so they are not ported.\n */\nexport const BEST_UNITS_METRIC: Readonly<\n Record<number, readonly (readonly [symbol: string, threshold: number])[]>\n> = {\n 0: [[\"deg\", 1]], // angle\n 1: [[\"mm2\", 1], [\"cm2\", 100], [\"m2\", 1000000], [\"km2\", 1000000000000]], // area\n 2: [[\"bits\", 1], [\"B\", 8], [\"KB\", 8000], [\"MB\", 8000000], [\"GB\", 8000000000], [\"TB\", 8000000000000], [\"PB\", 8000000000000000]], // data\n 3: [[\"J\", 1], [\"Wh\", 3600], [\"kWh\", 3600000], [\"MWh\", 3600000000], [\"GWh\", 3600000000000]], // energy\n 4: [[\"N\", 1]], // force\n 5: [[\"Hz\", 1], [\"kHz\", 1000], [\"MHz\", 1000000], [\"GHz\", 1000000000], [\"THz\", 1000000000000], [\"PHz\", 1000000000000000]], // frequency\n 6: [[\"lux\", 1], [\"klx\", 1000]], // illuminance, corrected\n 7: [[\"mm\", 1], [\"cm\", 10], [\"m\", 1000], [\"km\", 1000000]], // length\n 8: [[\"cd/m²\", 1]], // luminance\n 9: [[\"cd\", 1]], // luminousIntensity\n 10: [[\"mg\", 1], [\"g\", 1000], [\"kg\", 1000000]], // mass\n 11: [[\"W\", 1], [\"kW\", 1000], [\"MW\", 1000000], [\"GW\", 1000000000], [\"TW\", 1000000000000], [\"PW\", 1000000000000000]], // power\n 12: [[\"Pa\", 1]], // pressure\n 13: [[\"C\", 1]], // temperature\n 14: [[\"fs\", 1], [\"ps\", 1000], [\"ns\", 1000000], [\"µs\", 1000000000], [\"ms\", 1000000000000], [\"s\", 1000000000000000], [\"min\", 60000000000000000], [\"h\", 3600000000000000000], [\"d\", 86400000000000000000], [\"y\", 3.1536e+22]], // time\n 15: [[\"mL\", 1], [\"L\", 1000]], // volume\n};\n\n/**\n * The symbols offered for a measure by `<value> <unit> to ?`.\n *\n * A separate, curated vocabulary rather than the keys of UNIT_TABLE filtered by\n * kind: upstream publishes a shorter symbols-only list per unit, and the two\n * genuinely differ. Volume's symbols include `c`, `US lc` and `pt` but not\n * `cup`/`cups`; Time's include `wk` and `mo` but not `week`/`month`.\n * Deriving this from UNIT_TABLE would roughly quadruple every list.\n */\nexport const MEASURE_SYMBOLS: Readonly<Record<number, readonly string[]>> = {\n 0: [\"rad\", \"rads\", \"r\", \"deg\", \"degs\", \"°\", \"gon\", \"gons\", \"grad\", \"grads\", \"grade\", \"grades\", \"arcmin\", \"arcmins\", \"arcsec\", \"arcsecs\"], // angle\n 1: [\"m²\", \"m2\", \"Pm²\", \"Pm2\", \"Tm²\", \"Tm2\", \"Gm²\", \"Gm2\", \"Mm²\", \"Mm2\", \"km²\", \"km2\", \"hm²\", \"hm2\", \"dam²\", \"dam2\", \"dm²\", \"dm2\", \"cm²\", \"cm2\", \"mm²\", \"mm2\", \"μm²\", \"µm²\", \"μm2\", \"µm2\", \"nm²\", \"nm2\", \"pm²\", \"pm2\", \"fm²\", \"fm2\", \"ac\", \"ca\", \"da\", \"daa\", \"ha\", \"sq ft\", \"ft²\", \"ft2\", \"sq in\", \"in²\", \"in2\", \"sq yd\", \"yd²\", \"yd2\", \"sq mi\", \"mi²\", \"mi2\"], // area\n 2: [\"b\", \"Pib\", \"Tib\", \"Gib\", \"Mib\", \"Kib\", \"Kb\", \"KB\", \"Pb\", \"Tb\", \"Gb\", \"Mb\", \"kb\", \"hb\", \"dab\", \"db\", \"cb\", \"mb\", \"μb\", \"µb\", \"nb\", \"pb\", \"fb\", \"B\", \"PiB\", \"TiB\", \"GiB\", \"MiB\", \"KiB\", \"PB\", \"TB\", \"GB\", \"MB\", \"kB\", \"hB\", \"daB\", \"dB\", \"cB\", \"mB\", \"μB\", \"µB\", \"nB\", \"pB\", \"fB\"], // data\n 3: [\"J\", \"PJ\", \"TJ\", \"GJ\", \"MJ\", \"kJ\", \"hJ\", \"daJ\", \"dJ\", \"cJ\", \"mJ\", \"μJ\", \"µJ\", \"nJ\", \"pJ\", \"fJ\", \"W⋅h\", \"W h\", \"Wh\", \"PW⋅h\", \"PW h\", \"PWh\", \"TW⋅h\", \"TW h\", \"TWh\", \"GW⋅h\", \"GW h\", \"GWh\", \"MW⋅h\", \"MW h\", \"MWh\", \"kW⋅h\", \"kW h\", \"kWh\", \"hW⋅h\", \"hW h\", \"hWh\", \"daW⋅h\", \"daW h\", \"daWh\", \"dW⋅h\", \"dW h\", \"dWh\", \"cW⋅h\", \"cW h\", \"cWh\", \"mW⋅h\", \"mW h\", \"mWh\", \"μW⋅h\", \"µW⋅h\", \"μW h\", \"µW h\", \"μWh\", \"µWh\", \"nW⋅h\", \"nW h\", \"nWh\", \"pW⋅h\", \"pW h\", \"pWh\", \"fW⋅h\", \"fW h\", \"fWh\"], // energy\n 4: [\"N\", \"PN\", \"TN\", \"GN\", \"MN\", \"kN\", \"hN\", \"daN\", \"dN\", \"cN\", \"mN\", \"μN\", \"µN\", \"nN\", \"pN\", \"fN\", \"dyn\", \"lbf\", \"klb\", \"kipf\", \"klbf\", \"pdl\", \"kgf\", \"kp\", \"tf\", \"Mp\"], // force\n 5: [\"Hz\", \"PHz\", \"THz\", \"GHz\", \"MHz\", \"kHz\", \"hHz\", \"daHz\", \"dHz\", \"cHz\", \"mHz\", \"μHz\", \"µHz\", \"nHz\", \"pHz\", \"fHz\"], // frequency\n 6: [\"lx\", \"Plx\", \"Tlx\", \"Glx\", \"Mlx\", \"klx\", \"hlx\", \"dalx\", \"dlx\", \"clx\", \"mlx\", \"μlx\", \"µlx\", \"nlx\", \"plx\", \"flx\", \"lm/m2\", \"lm/m²\", \"fc\", \"ft-c\", \"ph\"], // illuminance\n 7: [\"m\", \"Pm\", \"Tm\", \"Gm\", \"Mm\", \"km\", \"hm\", \"dam\", \"dm\", \"cm\", \"mm\", \"μm\", \"µm\", \"nm\", \"pm\", \"fm\", \"ft\", \"'\", \"in\", \"\\\"\", \"yd\", \"mi\", \"M\", \"NM\", \"nmi\", \"ly\", \"pc\"], // length\n 8: [\"cd/m2\", \"cd/m²\", \"Pcd/m2\", \"Pcd/m²\", \"Tcd/m2\", \"Tcd/m²\", \"Gcd/m2\", \"Gcd/m²\", \"Mcd/m2\", \"Mcd/m²\", \"kcd/m2\", \"kcd/m²\", \"hcd/m2\", \"hcd/m²\", \"dacd/m2\", \"dacd/m²\", \"dcd/m2\", \"dcd/m²\", \"ccd/m2\", \"ccd/m²\", \"mcd/m2\", \"mcd/m²\", \"μcd/m2\", \"µcd/m2\", \"μcd/m²\", \"µcd/m²\", \"ncd/m2\", \"ncd/m²\", \"pcd/m2\", \"pcd/m²\", \"fcd/m2\", \"fcd/m²\", \"nt\"], // luminance\n 9: [\"cd\", \"Pcd\", \"Tcd\", \"Gcd\", \"Mcd\", \"kcd\", \"hcd\", \"dacd\", \"dcd\", \"ccd\", \"mcd\", \"μcd\", \"µcd\", \"ncd\", \"pcd\", \"fcd\", \"cp\", \"CP\", \"HK\"], // luminousIntensity\n 10: [\"g\", \"Pg\", \"Tg\", \"Gg\", \"Mg\", \"kg\", \"hg\", \"dag\", \"dg\", \"cg\", \"mg\", \"μg\", \"µg\", \"ng\", \"pg\", \"fg\", \"mcg\", \"t\", \"kt\", \"Mt\", \"Gt\", \"lb\", \"lbs\", \"gr\", \"st\", \"oz\", \"cwt\", \"oz t\", \"toz\"], // mass\n 11: [\"W\", \"PW\", \"TW\", \"GW\", \"MW\", \"kW\", \"hW\", \"daW\", \"dW\", \"cW\", \"mW\", \"μW\", \"µW\", \"nW\", \"pW\", \"fW\", \"hp\"], // power\n 12: [\"Pa\", \"PPa\", \"TPa\", \"GPa\", \"MPa\", \"kPa\", \"hPa\", \"daPa\", \"dPa\", \"cPa\", \"mPa\", \"μPa\", \"µPa\", \"nPa\", \"pPa\", \"fPa\", \"bar\", \"Pbar\", \"Tbar\", \"Gbar\", \"Mbar\", \"kbar\", \"hbar\", \"dabar\", \"dbar\", \"cbar\", \"mbar\", \"μbar\", \"µbar\", \"nbar\", \"pbar\", \"fbar\", \"Torr\", \"mTorr\", \"atm\", \"psi\", \"lbf/in2\", \"lbf/in²\", \"inAq\", \"Aq\", \"inHg\", \"Hg\"], // pressure\n 13: [\"K\", \"PK\", \"TK\", \"GK\", \"MK\", \"kK\", \"hK\", \"daK\", \"dK\", \"cK\", \"mK\", \"μK\", \"µK\", \"nK\", \"pK\", \"fK\", \"F\", \"°F\", \"C\", \"°C\", \"R\"], // temperature\n 14: [\"s\", \"Ps\", \"Ts\", \"Gs\", \"Ms\", \"ks\", \"hs\", \"das\", \"ds\", \"cs\", \"ms\", \"μs\", \"µs\", \"ns\", \"ps\", \"fs\", \"min\", \"h\", \"md\", \"d\", \"wk\", \"fn\", \"mo\", \"a\", \"y\", \"yr\", \"dec\", \"TU\", \"S\"], // time\n 15: [\"m³\", \"m3\", \"Pm3\", \"Pm³\", \"Tm3\", \"Tm³\", \"Gm3\", \"Gm³\", \"Mm3\", \"Mm³\", \"km3\", \"km³\", \"hm3\", \"hm³\", \"dam3\", \"dam³\", \"dm3\", \"dm³\", \"cm3\", \"cm³\", \"mm3\", \"mm³\", \"μm3\", \"µm3\", \"μm³\", \"µm³\", \"nm3\", \"nm³\", \"pm3\", \"pm³\", \"fm3\", \"fm³\", \"l\", \"L\", \"Pl\", \"PL\", \"Tl\", \"TL\", \"Gl\", \"GL\", \"Ml\", \"ML\", \"kl\", \"kL\", \"hl\", \"hL\", \"dal\", \"daL\", \"dl\", \"dL\", \"cl\", \"cL\", \"ml\", \"mL\", \"μl\", \"µl\", \"μL\", \"µL\", \"nl\", \"nL\", \"pl\", \"pL\", \"fl\", \"fL\", \"cu mi\", \"mi3\", \"mi³\", \"ac⋅ft\", \"ac ft\", \"cu yd\", \"yd3\", \"yd³\", \"cu ft\", \"ft3\", \"ft³\", \"cu in\", \"in3\", \"in³\", \"MTON\", \"imp bbl\", \"imp bsh\", \"imp bu\", \"pk\", \"imp pk\", \"imp gal\", \"imp qt\", \"imp pt\", \"imp fl oz\", \"tsp\", \"tbsp\", \"fl oz\", \"fl. oz.\", \"oz. fl.\", \"c\", \"US lc\", \"pt\", \"p\", \"qt\", \"gal\", \"US bsh\", \"US bu\", \"US pk\", \"US dry gal\", \"US dry bbl\", \"US dry qt\", \"US dry pt\"], // volume\n};\n\n/**\n * Measure kind id to the name `getMeasure()` reports. Two units are\n * convertible only when these strings match, so a typo here silently breaks\n * conversion for one whole measure.\n */\nexport const MEASURE_KIND_NAMES: Readonly<Record<number, string>> = {\n 0: \"angle\",\n 1: \"area\",\n 2: \"data\",\n 3: \"energy\",\n 4: \"force\",\n 5: \"frequency\",\n 6: \"illuminance\",\n 7: \"length\",\n 8: \"luminance\",\n 9: \"luminousIntensity\",\n 10: \"mass\",\n 11: \"power\",\n 12: \"pressure\",\n 13: \"temperature\",\n 14: \"time\",\n 15: \"volume\",\n};\n","/**\n * Extended unit categories not supported by the `convert` npm package (v7.0.0).\n *\n * `convert` only ships 16 measure kinds (Angle, Area, Data, Energy, Force,\n * Frequency, Illuminance, Length, Luminance, LuminousIntensity, Mass, Power,\n * Pressure, Temperature, Time, Volume. See MEASURE_KIND_NAMES in\n * UomConverter.ts). The project's own wiki documents several more\n * (Volume Flow Rate, Speed, Pace, Voltage, Current, Apparent Power,\n * Reactive Power, Reactive Energy, Parts-Per) that the library has no\n * concept of at all.\n *\n * A hand-rolled table is deliberately used instead of pulling in a bigger\n * unit-conversion library (e.g. js-quantities, convert-units, mathjs's unit\n * system): every category here is a pure linear ratio scale (no\n * Temperature-style offset formula needed), so the whole extension is a\n * `{ measure, toBase }` lookup plus a couple of arithmetic call sites in\n * UomConverter.ts. Pulling in a heavier dependency for ~30 extra unit\n * symbols would undo the earlier deliberate migration to `convert` for its\n * small size, and would reintroduce the aliasing/normalization behavior\n * this project explicitly moved away from (units here are case-sensitive,\n * no aliasing, matching UomConverter.ts's existing design).\n *\n * Unit symbols are restricted to what the lexer can tokenize as a single\n * UNIT token: `tokenizeIdentifier()` (ExpressionLexer.ts) only reads\n * `[a-zA-Z0-9_]` (plus Unicode), no `/`, no `-`. That rules out\n * slash-notation like \"km/h\" or \"min/km\" as literal unit text. Every\n * category below uses a plain-letters abbreviation where a standard one\n * exists (mph, kn, gpm, cfs, ...); Pace has no standard non-slash\n * abbreviation, so it uses an underscore instead (\"min_km\", \"min_mi\")\n * the one place in this table where that's necessary.\n */\n\nexport interface ExtendedUnitDef {\n /** Category name, matching the style of UomConverter.ts's MEASURE_KIND_NAMES (lowerCamelCase). */\n measure: string;\n /** Multiply a value in this unit by this factor to get the value in the category's base unit. */\n toBase: number;\n}\n\n/** Units beyond the base set, added to whatever the locale already recognises. */\nexport const EXTENDED_UNITS: Record<string, ExtendedUnitDef> = {\n // ── Speed (base: mps, meters per second) ──────────────────────────────\n mps: { measure: \"speed\", toBase: 1 },\n kph: { measure: \"speed\", toBase: 1000 / 3600 },\n mph: { measure: \"speed\", toBase: 0.44704 }, // 1 mile (1609.344m) / 3600s\n kn: { measure: \"speed\", toBase: 1852 / 3600 }, // 1 nautical mile = 1852m exactly\n // \"fps\" (feet per second) deliberately NOT used, confirmed via a real\n // regression (20 failures in VideoTimecode.spec.ts) that it collides with\n // the Time package's \"fps\" (frames per second), which FpsRateNormalizerRule\n // requires to lex as a plain IDENT token. \"ft_s\" avoids the collision,\n // following the same underscore convention as Pace below.\n ft_s: { measure: \"speed\", toBase: 0.3048 }, // 1 ft = 0.3048m exactly\n\n // ── Pace (base: seconds per meter, time/distance, the reciprocal of speed) ──\n // Pace and Speed are deliberately separate measures: converting between them\n // is a reciprocal (1/x) relationship, not a linear scale, so they can't share\n // this table's plain factor-ratio conversion.\n min_km: { measure: \"pace\", toBase: 60 / 1000 },\n min_mi: { measure: \"pace\", toBase: 60 / 1609.344 },\n\n // ── Voltage (base: V, expressed in mV/kV only) ─────────────────────────\n // The bare symbol \"V\" is deliberately NOT registered, it collides with\n // \"V\" the stock ticker (Visa) in packages/stocks/MajorTickers.ts, whose\n // StockTickerNormalizerRule also requires an IDENT token (same class of\n // issue as \"var\"/\"fps\" above; not currently test-covered since bare-ticker\n // recognition is opt-in, but a real latent conflict). \"mV\"/\"kV\" don't\n // collide with anything and cover the practically useful range.\n // `V` is registered so `230 V * 13 A` reads as volts times amperes (issue\n // #191). It does collide with the Visa stock ticker, but the bare-ticker form\n // is opt-in (the stocks package is not a default), and volts is the more\n // broadly useful reading of `V` after a number.\n V: { measure: \"voltage\", toBase: 1 },\n mV: { measure: \"voltage\", toBase: 0.001 },\n kV: { measure: \"voltage\", toBase: 1000 },\n\n // ── Current (base: A) ───────────────────────────────────────────────\n mA: { measure: \"current\", toBase: 0.001 },\n A: { measure: \"current\", toBase: 1 },\n kA: { measure: \"current\", toBase: 1000 },\n\n // ── Apparent Power (base: VA), S = V × I, not real power ─────────────\n VA: { measure: \"apparentPower\", toBase: 1 },\n kVA: { measure: \"apparentPower\", toBase: 1000 },\n MVA: { measure: \"apparentPower\", toBase: 1_000_000 },\n\n // ── Reactive Power (base: var, expressed in kvar/Mvar only) ────────────\n // The bare IEC symbol \"var\" is deliberately NOT registered as a unit\n // confirmed via a real regression (ExpressionLexer.identifiers-keywords.spec.ts's\n // \"$var\" test) that it collides with \"var\" as an extremely common variable\n // name (and former JS keyword). \"kvar\"/\"Mvar\" don't collide with anything\n // and cover the practically useful range.\n kvar: { measure: \"reactivePower\", toBase: 1000 },\n Mvar: { measure: \"reactivePower\", toBase: 1_000_000 },\n\n // ── Reactive Energy (base: varh), IEC standard symbol \"varh\" ─────────\n varh: { measure: \"reactiveEnergy\", toBase: 1 },\n kvarh: { measure: \"reactiveEnergy\", toBase: 1000 },\n Mvarh: { measure: \"reactiveEnergy\", toBase: 1_000_000 },\n\n // ── Volume Flow Rate (base: m3s, cubic meters per second) ─────────────\n m3s: { measure: \"volumeFlowRate\", toBase: 1 },\n m3h: { measure: \"volumeFlowRate\", toBase: 1 / 3600 },\n lps: { measure: \"volumeFlowRate\", toBase: 0.001 }, // 1 L/s = 0.001 m3/s\n lpm: { measure: \"volumeFlowRate\", toBase: 0.001 / 60 },\n gpm: { measure: \"volumeFlowRate\", toBase: 0.003785411784 / 60 }, // US gallon = 3.785411784 L exactly\n cfs: { measure: \"volumeFlowRate\", toBase: 0.028316846592 }, // 1 ft3 = 0.028316846592 m3 exactly\n\n // ── Fuel economy: distance per volume (base: km/l) ────────────────────\n // The reciprocal pairing (economy vs consumption below) is handled by the\n // converter, not this linear ratio (see UomConverter.ts's convertRate). mpg\n // is miles per US gallon (issue #190). These display as themselves and expand\n // to a km/l or l/km rate for conversion.\n mpg: { measure: \"fuelEconomy\", toBase: 1.609344 / 3.785411784 }, // 1 mi/US-gal in km/l\n kmpl: { measure: \"fuelEconomy\", toBase: 1 },\n\n // ── Fuel consumption: volume per distance (base: l/km) ────────────────\n l100km: { measure: \"fuelConsumption\", toBase: 0.01 }, // 1 l/100km = 0.01 l/km\n\n // ── Parts-Per (base: dimensionless fraction, 1 = whole) ───────────────\n // \"%\" is intentionally excluded, it's owned by the project's dedicated\n // Percentage provider, not the UoM system.\n ppm: { measure: \"partsPer\", toBase: 1e-6 },\n ppb: { measure: \"partsPer\", toBase: 1e-9 },\n ppt: { measure: \"partsPer\", toBase: 1e-12 }, // parts per trillion (chemistry/environmental convention)\n permille: { measure: \"partsPer\", toBase: 1e-3 },\n // ── Length, extending the base table rather than replacing it ─────────\n //\n // These share the `length` measure with the generated table, so they convert\n // against metres and everything derived from them. Ratios are the exact\n // international definitions, all of which are whole multiples of the inch\n // (0.0254 m exactly) except the mil, which is a thousandth of one.\n mil: { measure: \"length\", toBase: 0.0000254 },\n mils: { measure: \"length\", toBase: 0.0000254 },\n hand: { measure: \"length\", toBase: 0.1016 }, // 4 in\n hands: { measure: \"length\", toBase: 0.1016 },\n rod: { measure: \"length\", toBase: 5.0292 }, // 16.5 ft\n rods: { measure: \"length\", toBase: 5.0292 },\n chain: { measure: \"length\", toBase: 20.1168 }, // 66 ft, 4 rods\n chains: { measure: \"length\", toBase: 20.1168 },\n furlong: { measure: \"length\", toBase: 201.168 }, // 10 chains\n furlongs: { measure: \"length\", toBase: 201.168 },\n cable: { measure: \"length\", toBase: 185.2 }, // a tenth of a nautical mile\n cables: { measure: \"length\", toBase: 185.2 },\n league: { measure: \"length\", toBase: 4828.032 }, // 3 miles\n leagues: { measure: \"length\", toBase: 4828.032 },\n\n // ── Mass ──────────────────────────────────────────────────────────────\n // The metric carat is exactly 200 mg by definition, not the older and\n // variable gemstone carat, and not the karat that measures gold purity.\n carat: { measure: \"mass\", toBase: 0.2 },\n carats: { measure: \"mass\", toBase: 0.2 },\n // The metric centner, 100 kg, as used across continental Europe. The\n // Imperial hundredweight is a different quantity and is already `cwt`.\n centner: { measure: \"mass\", toBase: 100000 },\n centners: { measure: \"mass\", toBase: 100000 },\n\n};\n"]}
@@ -1,3 +1,3 @@
1
- 'use strict';var chunkR2SZFJTT_cjs=require('./chunk-R2SZFJTT.cjs'),chunk5TVI2UPZ_cjs=require('./chunk-5TVI2UPZ.cjs'),chunk75XDS65A_cjs=require('./chunk-75XDS65A.cjs'),chunkPNDQRCRQ_cjs=require('./chunk-PNDQRCRQ.cjs'),chunkMSYX32PF_cjs=require('./chunk-MSYX32PF.cjs');var b={floatResult:{decimalPlaces:2,enableSeperator:true},numberResult:{decimalSeparatorLocale:"en-US"},hexResult:{enablePadding:false,paddingZeros:0},unitOfMeasurementResult:{decimalPlaces:2},percentageResult:{decimalPlaces:2},dateResult:{format:"long"}};function F(t,r,o,n){let e=o.floatResult.enableSeperator,a=o.numberResult.decimalSeparatorLocale;if(n!==void 0&&Number.isFinite(t)){let c=t.toLocaleString(a||"en-US",{minimumFractionDigits:n,maximumFractionDigits:n,useGrouping:e});return `${r.display.resultPrefix}${c}`}let i=o.floatResult.decimalPlaces,s=chunkR2SZFJTT_cjs.a(t,i,e,a);return `${r.display.resultPrefix}${s}`}function R(t,r,o,n){let e=n.floatResult.decimalPlaces,a=n.floatResult.enableSeperator,i=n.numberResult.decimalSeparatorLocale||"en-US",s=Math.max(e,1),c=t.toLocaleString(i,{useGrouping:a,minimumFractionDigits:0,maximumFractionDigits:e}),u=Math.abs(r).toLocaleString(i,{useGrouping:a,minimumFractionDigits:1,maximumFractionDigits:s});return `${o.display.resultPrefix}${c} \xB1 ${u}`}function L(t,r,o){if(typeof t=="number"&&!Number.isFinite(t))return `= ${t}`;let n=typeof t=="bigint"?t<0n:t<0,e=n?"-":"",a=c=>typeof t=="bigint"?(n?-t:t).toString(c):Math.abs(Math.trunc(t)).toString(c);if(o==="bin")return `= ${e}0b${a(2)}`;if(o==="oct")return `= ${e}0o${a(8)}`;let i=r.hexResult.enablePadding?r.hexResult.paddingZeros:0,s=a(16).toUpperCase().padStart(i,"0");return `= ${e}0x${s}`}var I=2e4;function P(t){let r=t<0n?-t:t;if(Number.isFinite(Number(r)))return `= ${t}`;let o=r.toString(16).length*4;if(o*Math.LN2/Math.LN10<=I)return `= ${t}`;let n=o*Math.LN2/Math.LN10,e=Math.floor(n),a=Math.pow(10,n-e);return `= ${t<0n?"-":""}~${a.toFixed(3)}e+${e} (an exact integer of about ${(e+1).toLocaleString("en-US")} digits, too large to print)`}function T(t){return `= ${t}`}function w(t){return `= ${t}`}function N(t,r,o){let n=new Date(t),e=o.dateResult?.format??"long",a=n.getHours()===0&&n.getMinutes()===0&&n.getSeconds()===0&&n.getMilliseconds()===0;if(e==="long"){let g=n.toLocaleDateString(r.code,{weekday:"long",year:"numeric",month:"long",day:"numeric"});return a?`= ${g}`:`= ${g}, ${n.toLocaleTimeString(r.code)}`}let i=g=>String(g).padStart(2,"0"),s=n.getFullYear(),c=i(n.getMonth()+1),u=i(n.getDate()),m;if(e==="iso"?m=`${s}-${c}-${u}`:e==="dmy"?m=`${u}/${c}/${s}`:m=`${c}/${u}/${s}`,a)return `= ${m}`;let l=`${i(n.getHours())}:${i(n.getMinutes())}:${i(n.getSeconds())}`;return e==="iso"?`= ${m}T${l}`:`= ${m} ${l}`}function C(t){let r=t<0?"-":"",o=Math.round(Math.abs(t)/1e3),n=Math.floor(o/3600),e=Math.floor(o%3600/60),a=o%60,i=String(e).padStart(2,"0");if(a===0)return `${r}${n}:${i}`;let s=String(a).padStart(2,"0");return `${r}${n}:${i}:${s}`}function U(t,r,o,n,e){if(r==="ms")return `= ${C(t)}`;let a=n.unitOfMeasurementResult.decimalPlaces,s=r&&["days","weeks","months","years","hours","minutes","seconds","day","week","month","year","hour","minute","second"].includes(r),c;s&&t===Math.floor(t)?c=t.toString():c=t.toFixed(a);let u=r?chunk75XDS65A_cjs.ua[r.toUpperCase()]:void 0;if(u){let l=e?chunk75XDS65A_cjs.sa(e,a):c,g=u.spaced?" ":"";return `= ${u.position==="prefix"?`${u.symbol}${g}${l}`:`${l}${g}${u.symbol}`}`}return `= ${e?chunk75XDS65A_cjs.sa(e,a):c} ${r||""}`.trim()}function D(t,r){if(typeof t=="boolean")return t?"true":"false";if(typeof t=="object"&&t!==null)return chunk75XDS65A_cjs.R(t);let o=r.floatResult.decimalPlaces,n=r.floatResult.enableSeperator,e=r.numberResult.decimalSeparatorLocale;return chunkR2SZFJTT_cjs.a(t,o,n,e)}function E(t,r,o){let n=chunk75XDS65A_cjs.Z(t),e=[];for(let a=0;a<t.rows;a++){let i=[];for(let s=0;s<t.cols;s++)i.push(D(n[a*t.cols+s],o));e.push(i.join(", "));}return `${r.display.resultPrefix}[${e.join("; ")}]`}function et(t,r){let o=r||b,n=chunk75XDS65A_cjs.Z(t),e=[];for(let i=0;i<t.rows;i++){let s=[];for(let c=0;c<t.cols;c++)s.push(D(n[i*t.cols+c],o));e.push(s);}let a=[];for(let i=0;i<t.cols;i++){let s=0;for(let c=0;c<t.rows;c++)s=Math.max(s,e[c][i].length);a.push(s);}return e.map(i=>`[ ${i.map((s,c)=>s.padStart(a[c])).join(" ")} ]`).join(`
2
- `)}function j(t,r,o){return `${o.display.resultPrefix}${t}:${r}`}function A(t,r,o){let n=o.percentageResult.decimalPlaces;return `= ${(t*100).toFixed(n)}${r.display.percentageSuffix}`}function G(t,r){return `= ${t} ${r||""}`.trim()}function O(t){if(t.addr===void 0)return `/${t.prefix}`;let r=chunk5TVI2UPZ_cjs.D(t.addr);return t.prefix===void 0?r:`${r}/${t.prefix}`}function _(t,r,o){let n=r.display.resultPrefix,e=u=>{let m=t.unit!==void 0?new chunkPNDQRCRQ_cjs.m(6,u.value,t.unit):new chunkPNDQRCRQ_cjs.m(0,u.value);m.exact=u.exact;let l=B(m,o);return l.startsWith(n)?l.slice(n.length):l},[a,i]=t.shares,s=`${e(a)} each`;if(i===void 0)return `${n}${s}`;let c=i.count===1?"share":"shares";return `${n}${s}, with ${i.count} ${c} paying ${e(i)}`}function B(t,r){let o=r||b,n=o.numberResult.decimalSeparatorLocale||"en",e=chunkMSYX32PF_cjs.a(n);switch(t.type){case 0:return t.uncertainty!==void 0?R(t.value,t.uncertainty,e,o):F(t.value,e,o,t.decimalPlaces);case 1:return L(t.value,o,t.unit);case 2:return P(t.value);case 3:return T(t.value);case 10:return w(t.value);case 4:return N(t.value,e,o);case 6:return U(t.value,t.unit,e,o,t.exact);case 7:return E(t.value,e,o);case 8:{let a=t.value;return j(a.min,a.max,e)}case 14:return `${e.display.resultPrefix}${chunk5TVI2UPZ_cjs.g(t.value)}`;case 15:return _(t.value,e,o);case 16:return `${e.display.resultPrefix}${t.value.label}`;case 17:return `${e.display.resultPrefix}${O(t.value)}`;case 9:return chunk75XDS65A_cjs.R(t.value);case 5:return A(t.value,e,o);case 11:return G(t.value,t.unit);case 13:return t.unit??String(t.value);default:return `= ${String(t.value)}`}}exports.a=b;exports.b=et;exports.c=B;//# sourceMappingURL=chunk-IHZBKT7L.cjs.map
3
- //# sourceMappingURL=chunk-IHZBKT7L.cjs.map
1
+ 'use strict';var chunkR2SZFJTT_cjs=require('./chunk-R2SZFJTT.cjs'),chunk5TVI2UPZ_cjs=require('./chunk-5TVI2UPZ.cjs'),chunk75XDS65A_cjs=require('./chunk-75XDS65A.cjs'),chunkPNDQRCRQ_cjs=require('./chunk-PNDQRCRQ.cjs'),chunkMSYX32PF_cjs=require('./chunk-MSYX32PF.cjs');var b={floatResult:{decimalPlaces:2,enableSeperator:true},numberResult:{decimalSeparatorLocale:"en-US"},hexResult:{enablePadding:false,paddingZeros:0},unitOfMeasurementResult:{decimalPlaces:2},percentageResult:{decimalPlaces:2},dateResult:{format:"long"}};function F(t,r,o,n){let e=o.floatResult.enableSeperator,a=o.numberResult.decimalSeparatorLocale;if(n!==void 0&&Number.isFinite(t)){let c=t.toLocaleString(a||"en-US",{minimumFractionDigits:n,maximumFractionDigits:n,useGrouping:e});return `${r.display.resultPrefix}${c}`}let i=o.floatResult.decimalPlaces,s=chunkR2SZFJTT_cjs.a(t,i,e,a);return `${r.display.resultPrefix}${s}`}function R(t,r,o,n){let e=n.floatResult.decimalPlaces,a=n.floatResult.enableSeperator,i=n.numberResult.decimalSeparatorLocale||"en-US",s=Math.max(e,1),c=t.toLocaleString(i,{useGrouping:a,minimumFractionDigits:0,maximumFractionDigits:e}),u=Math.abs(r).toLocaleString(i,{useGrouping:a,minimumFractionDigits:1,maximumFractionDigits:s});return `${o.display.resultPrefix}${c} \xB1 ${u}`}function L(t,r,o){if(typeof t=="number"&&!Number.isFinite(t))return `= ${t}`;let n=typeof t=="bigint"?t<0n:t<0,e=n?"-":"",a=c=>typeof t=="bigint"?(n?-t:t).toString(c):Math.abs(Math.trunc(t)).toString(c);if(o==="bin")return `= ${e}0b${a(2)}`;if(o==="oct")return `= ${e}0o${a(8)}`;let i=r.hexResult.enablePadding?r.hexResult.paddingZeros:0,s=a(16).toUpperCase().padStart(i,"0");return `= ${e}0x${s}`}var I=2e4;function P(t){let r=t<0n?-t:t;if(Number.isFinite(Number(r)))return `= ${t}`;let o=r.toString(16).length*4;if(o*Math.LN2/Math.LN10<=I)return `= ${t}`;let n=o*Math.LN2/Math.LN10,e=Math.floor(n),a=Math.pow(10,n-e);return `= ${t<0n?"-":""}~${a.toFixed(3)}e+${e} (an exact integer of about ${(e+1).toLocaleString("en-US")} digits, too large to print)`}function T(t){return `= ${t}`}function w(t){return `= ${t}`}function N(t,r,o){let n=new Date(t),e=o.dateResult?.format??"long",a=n.getHours()===0&&n.getMinutes()===0&&n.getSeconds()===0&&n.getMilliseconds()===0;if(e==="long"){let g=n.toLocaleDateString(r.code,{weekday:"long",year:"numeric",month:"long",day:"numeric"});return a?`= ${g}`:`= ${g}, ${n.toLocaleTimeString(r.code)}`}let i=g=>String(g).padStart(2,"0"),s=n.getFullYear(),c=i(n.getMonth()+1),u=i(n.getDate()),m;if(e==="iso"?m=`${s}-${c}-${u}`:e==="dmy"?m=`${u}/${c}/${s}`:m=`${c}/${u}/${s}`,a)return `= ${m}`;let l=`${i(n.getHours())}:${i(n.getMinutes())}:${i(n.getSeconds())}`;return e==="iso"?`= ${m}T${l}`:`= ${m} ${l}`}function C(t){let r=t<0?"-":"",o=Math.round(Math.abs(t)/1e3),n=Math.floor(o/3600),e=Math.floor(o%3600/60),a=o%60,i=String(e).padStart(2,"0");if(a===0)return `${r}${n}:${i}`;let s=String(a).padStart(2,"0");return `${r}${n}:${i}:${s}`}function U(t,r,o,n,e){if(r==="ms")return `= ${C(t)}`;r==="l100km"&&(r="l/100km"),r==="mps2"&&(r="m/s\xB2");let a=n.unitOfMeasurementResult.decimalPlaces,s=r&&["days","weeks","months","years","hours","minutes","seconds","day","week","month","year","hour","minute","second"].includes(r),c;s&&t===Math.floor(t)?c=t.toString():c=t.toFixed(a);let u=r?chunk75XDS65A_cjs.ua[r.toUpperCase()]:void 0;if(u){let l=e?chunk75XDS65A_cjs.sa(e,a):c,g=u.spaced?" ":"";return `= ${u.position==="prefix"?`${u.symbol}${g}${l}`:`${l}${g}${u.symbol}`}`}return `= ${e?chunk75XDS65A_cjs.sa(e,a):c} ${r||""}`.trim()}function D(t,r){if(typeof t=="boolean")return t?"true":"false";if(typeof t=="object"&&t!==null)return chunk75XDS65A_cjs.R(t);let o=r.floatResult.decimalPlaces,n=r.floatResult.enableSeperator,e=r.numberResult.decimalSeparatorLocale;return chunkR2SZFJTT_cjs.a(t,o,n,e)}function E(t,r,o){let n=chunk75XDS65A_cjs.Z(t),e=[];for(let a=0;a<t.rows;a++){let i=[];for(let s=0;s<t.cols;s++)i.push(D(n[a*t.cols+s],o));e.push(i.join(", "));}return `${r.display.resultPrefix}[${e.join("; ")}]`}function et(t,r){let o=r||b,n=chunk75XDS65A_cjs.Z(t),e=[];for(let i=0;i<t.rows;i++){let s=[];for(let c=0;c<t.cols;c++)s.push(D(n[i*t.cols+c],o));e.push(s);}let a=[];for(let i=0;i<t.cols;i++){let s=0;for(let c=0;c<t.rows;c++)s=Math.max(s,e[c][i].length);a.push(s);}return e.map(i=>`[ ${i.map((s,c)=>s.padStart(a[c])).join(" ")} ]`).join(`
2
+ `)}function j(t,r,o){return `${o.display.resultPrefix}${t}:${r}`}function A(t,r,o){let n=o.percentageResult.decimalPlaces;return `= ${(t*100).toFixed(n)}${r.display.percentageSuffix}`}function G(t,r){return `= ${t} ${r||""}`.trim()}function O(t){if(t.addr===void 0)return `/${t.prefix}`;let r=chunk5TVI2UPZ_cjs.D(t.addr);return t.prefix===void 0?r:`${r}/${t.prefix}`}function _(t,r,o){let n=r.display.resultPrefix,e=u=>{let m=t.unit!==void 0?new chunkPNDQRCRQ_cjs.m(6,u.value,t.unit):new chunkPNDQRCRQ_cjs.m(0,u.value);m.exact=u.exact;let l=k(m,o);return l.startsWith(n)?l.slice(n.length):l},[a,i]=t.shares,s=`${e(a)} each`;if(i===void 0)return `${n}${s}`;let c=i.count===1?"share":"shares";return `${n}${s}, with ${i.count} ${c} paying ${e(i)}`}function k(t,r){let o=r||b,n=o.numberResult.decimalSeparatorLocale||"en",e=chunkMSYX32PF_cjs.a(n);switch(t.type){case 0:return t.uncertainty!==void 0?R(t.value,t.uncertainty,e,o):F(t.value,e,o,t.decimalPlaces);case 1:return L(t.value,o,t.unit);case 2:return P(t.value);case 3:return T(t.value);case 10:return w(t.value);case 4:return N(t.value,e,o);case 6:return U(t.value,t.unit,e,o,t.exact);case 7:return E(t.value,e,o);case 8:{let a=t.value;return j(a.min,a.max,e)}case 14:return `${e.display.resultPrefix}${chunk5TVI2UPZ_cjs.g(t.value)}`;case 15:return _(t.value,e,o);case 16:return `${e.display.resultPrefix}${t.value.label}`;case 17:return `${e.display.resultPrefix}${O(t.value)}`;case 9:return chunk75XDS65A_cjs.R(t.value);case 5:return A(t.value,e,o);case 11:return G(t.value,t.unit);case 13:return t.unit??String(t.value);default:return `= ${String(t.value)}`}}exports.a=b;exports.b=et;exports.c=k;//# sourceMappingURL=chunk-6TPXH6Y5.cjs.map
3
+ //# sourceMappingURL=chunk-6TPXH6Y5.cjs.map