solve-engine 2.38.7 → 2.38.8

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 (72) hide show
  1. package/dist/{PackageCompatibility-rJfOPkuE.d.cts → PackageCompatibility-BZelfTk8.d.cts} +1 -1
  2. package/dist/{PackageCompatibility-th5IHCuQ.d.ts → PackageCompatibility-CiYxvTMf.d.ts} +1 -1
  3. package/dist/{PackageRegistry-CDZch8VI.d.cts → PackageRegistry-DJe5_uSc.d.cts} +44 -0
  4. package/dist/{PackageRegistry-yDMyorr3.d.ts → PackageRegistry-D_IUBbmY.d.ts} +44 -0
  5. package/dist/chunk-2JR7PALQ.js +2 -0
  6. package/dist/chunk-2JR7PALQ.js.map +1 -0
  7. package/dist/{chunk-CNOYGBBV.cjs → chunk-52WTHBSR.cjs} +2 -2
  8. package/dist/{chunk-CNOYGBBV.cjs.map → chunk-52WTHBSR.cjs.map} +1 -1
  9. package/dist/chunk-D23VNH6B.js +5 -0
  10. package/dist/chunk-D23VNH6B.js.map +1 -0
  11. package/dist/{chunk-LZFH7CWS.js → chunk-DRXTGTXA.js} +2 -2
  12. package/dist/{chunk-LZFH7CWS.js.map → chunk-DRXTGTXA.js.map} +1 -1
  13. package/dist/{chunk-RRI3ZOI3.js → chunk-KKIGQ7GW.js} +2 -2
  14. package/dist/{chunk-RRI3ZOI3.js.map → chunk-KKIGQ7GW.js.map} +1 -1
  15. package/dist/{chunk-JJ4BY6X6.cjs → chunk-LYGVLHAW.cjs} +2 -2
  16. package/dist/{chunk-JJ4BY6X6.cjs.map → chunk-LYGVLHAW.cjs.map} +1 -1
  17. package/dist/{chunk-X7556JAZ.js → chunk-NTSH57MK.js} +2 -2
  18. package/dist/{chunk-X7556JAZ.js.map → chunk-NTSH57MK.js.map} +1 -1
  19. package/dist/{chunk-UV6H33IZ.cjs → chunk-PLYETVYZ.cjs} +2 -2
  20. package/dist/{chunk-UV6H33IZ.cjs.map → chunk-PLYETVYZ.cjs.map} +1 -1
  21. package/dist/chunk-Q57LJFCT.cjs +2 -0
  22. package/dist/chunk-Q57LJFCT.cjs.map +1 -0
  23. package/dist/{chunk-AAUDBEC2.cjs → chunk-QR2GVWD4.cjs} +4 -4
  24. package/dist/chunk-QR2GVWD4.cjs.map +1 -0
  25. package/dist/chunk-RVDO3SRI.js +3 -0
  26. package/dist/chunk-RVDO3SRI.js.map +1 -0
  27. package/dist/{chunk-4LSPMT2M.js → chunk-SU7LRT6J.js} +3 -3
  28. package/dist/{chunk-4LSPMT2M.js.map → chunk-SU7LRT6J.js.map} +1 -1
  29. package/dist/{chunk-6ONIPE5L.cjs → chunk-Y7UPP5QQ.cjs} +3 -3
  30. package/dist/{chunk-6ONIPE5L.cjs.map → chunk-Y7UPP5QQ.cjs.map} +1 -1
  31. package/dist/chunk-ZESVDPEL.cjs +3 -0
  32. package/dist/chunk-ZESVDPEL.cjs.map +1 -0
  33. package/dist/constants.cjs +1 -1
  34. package/dist/constants.js +1 -1
  35. package/dist/engine.cjs +1 -1
  36. package/dist/engine.d.cts +2 -2
  37. package/dist/engine.d.ts +2 -2
  38. package/dist/engine.js +1 -1
  39. package/dist/engine.worker.cjs +1 -1
  40. package/dist/engine.worker.js +1 -1
  41. package/dist/index.cjs +1 -1
  42. package/dist/index.d.cts +3 -3
  43. package/dist/index.d.ts +3 -3
  44. package/dist/index.js +1 -1
  45. package/dist/language.d.cts +2 -2
  46. package/dist/language.d.ts +2 -2
  47. package/dist/packages.cjs +1 -1
  48. package/dist/packages.d.cts +1 -1
  49. package/dist/packages.d.ts +1 -1
  50. package/dist/packages.js +1 -1
  51. package/dist/testing.cjs +2 -2
  52. package/dist/testing.d.cts +2 -2
  53. package/dist/testing.d.ts +2 -2
  54. package/dist/testing.js +1 -1
  55. package/dist/vm.cjs +1 -1
  56. package/dist/vm.js +1 -1
  57. package/dist/worker.cjs +2 -2
  58. package/dist/worker.d.cts +1 -1
  59. package/dist/worker.d.ts +1 -1
  60. package/dist/worker.js +1 -1
  61. package/package.json +1 -1
  62. package/dist/chunk-62JRBFBM.cjs +0 -3
  63. package/dist/chunk-62JRBFBM.cjs.map +0 -1
  64. package/dist/chunk-AAUDBEC2.cjs.map +0 -1
  65. package/dist/chunk-KL2F3YIQ.js +0 -2
  66. package/dist/chunk-KL2F3YIQ.js.map +0 -1
  67. package/dist/chunk-QFZYS7CY.cjs +0 -2
  68. package/dist/chunk-QFZYS7CY.cjs.map +0 -1
  69. package/dist/chunk-WP2CO6BC.js +0 -3
  70. package/dist/chunk-WP2CO6BC.js.map +0 -1
  71. package/dist/chunk-Z4KZETIJ.js +0 -5
  72. package/dist/chunk-Z4KZETIJ.js.map +0 -1
@@ -1,2 +0,0 @@
1
- import {b as b$1}from'./chunk-X2GQAKL2.js';import {c as c$2}from'./chunk-PICFFFJV.js';import {ga,C,z,B,E,p,i,j,r,s,qa,l,h,g,f,e as e$1,k,Q as Q$1,V as V$1,ha,la as la$1,ra as ra$1,ja,ma,J as J$1,w,o,a as a$1,d,u as u$1,W,Y,F,_ as _$1,da as da$1,ca as ca$1,ba,$,L,O,c as c$3,na as na$1,pa,ka,ia as ia$1,oa as oa$1,v as v$1,q as q$2,m as m$1,b as b$2,A,n as n$1,K as K$1,fa,I,H as H$2,G,N as N$1,t as t$1,D,P as P$2,y,x,M}from'./chunk-IHPYXJIY.js';import {b}from'./chunk-EOO6M65F.js';import {Q,P as P$1,p as p$1,q as q$1,K,n,s as s$1,u,C as C$1,v,m,H as H$1,N,t,r as r$1}from'./chunk-A34R65WT.js';import {c as c$1,e,i as i$1,j as j$1}from'./chunk-BWTVJD5L.js';import {a}from'./chunk-PRSXXDTA.js';import {c}from'./chunk-6G2NES2I.js';var ir={variable:"",global:"global:",tag:"#",datasource:"ds:"};function tn(e,t){return ir[e]+t}function Qt(e,t){return tn("datasource",`${e}:${JSON.stringify(t)}`)}var tt=new Set,Jt=new Set,en=class{constructor(){this.consumers=new Map;this.producers=new Map;this.dependencies=new Map;this.writes=new Map;this.lineReads=new Map;this.pinnedReads=new Map;}hasSameEdges(t,n,r,o){let i=this.lineReads.get(t);if(i===void 0||i.size!==n.length+(o?.size??0))return false;let a=this.writes.get(t);if(r.length===0){if(a!==void 0)return false}else if(a===void 0||a.size!==r.length)return false;for(let u of n)if(!i.has(u))return false;if(a!==void 0){for(let u of r)if(!a.has(u))return false}return true}registerLine(t,n,r){let o=this.pinnedReads.get(t);if(this.hasSameEdges(t,n,r,o))return;let i=this.lineReads.get(t);if(i)for(let s of i){if(o?.has(s))continue;let l=this.consumers.get(s);l&&l.delete(t);}let a=this.writes.get(t);if(a)for(let s of a){let l=this.producers.get(s);l&&l.delete(t);}let u=new Set(n);if(o)for(let s of o)u.add(s);this.lineReads.set(t,u);for(let s of n)this.consumers.has(s)||this.consumers.set(s,new Set),this.consumers.get(s).add(t);for(let s of r)this.producers.has(s)||this.producers.set(s,new Set),this.producers.get(s).add(t);if(r.length>0){this.dependencies.set(t,new Set(n)),this.writes.set(t,new Set(r));for(let s of r){let l=this.consumers.get(s);l&&l.delete(t);}}else this.writes.delete(t),this.dependencies.delete(t);}registerLineDataSourceDependency(t,n,r){let o=Qt(n,r);this.pinnedReads.has(t)||this.pinnedReads.set(t,new Set),this.pinnedReads.get(t).add(o),this.lineReads.has(t)||this.lineReads.set(t,new Set),this.lineReads.get(t).add(o),this.consumers.has(o)||this.consumers.set(o,new Set),this.consumers.get(o).add(t);}getAffectedLines(t){let n=new Set,r=new Set([t]),o=[t];for(let i=0;i<o.length;i++){let a=this.consumers.get(o[i]);if(a)for(let u of a){if(n.has(u))continue;n.add(u);let s=this.writes.get(u);if(s)for(let l of s)r.has(l)||(r.add(l),o.push(l));}}return n}getAffectedLinesInOrder(t){let n=this.getAffectedLines(t);if(n.size===0)return [];let r=new Map,o=new Map,i=(c,b)=>{let h=o.get(c);h?h.push(b):o.set(c,[b]),r.set(b,(r.get(b)??0)+1);};for(let c of n)r.has(c)||r.set(c,0);let a=new Set;for(let c of n){let b=this.writes.get(c);if(b)for(let h of b)a.add(h);}let u=new Set;for(let c of n){let b=this.lineReads.get(c);if(b)for(let h of b)a.has(h)&&(this.writes.get(c)?.has(h)||u.add(h));}for(let c of u)r.has(c)||r.set(c,0);for(let c of n){let b=this.writes.get(c);if(b)for(let R of b)u.has(R)&&i(c,R);let h=this.lineReads.get(c);if(h)for(let R of h)u.has(R)&&(b?.has(R)||i(R,c));}let s=[];for(let[c,b]of r)b===0&&s.push(c);if(s.length===0){let c=Array.from(n).sort((b,h)=>b-h);s.push(c[0]);}let l=[];for(let c=0;c<s.length;c++){let b=s[c];typeof b=="number"&&l.push(b);let h=o.get(b);if(h)for(let R of h){let $=(r.get(R)??1)-1;r.set(R,$),$===0&&s.push(R);}}if(l.length<n.size){let c=new Set(l),b=Array.from(n).filter(h=>!c.has(h)).sort((h,R)=>h-R);l.push(...b);}return l}getAffectedLinesByDataSource(t,n){return this.consumers.get(Qt(t,n))??tt}removeLine(t){let n=this.lineReads.get(t);if(n){for(let o of n){let i=this.consumers.get(o);i&&i.delete(t);}this.lineReads.delete(t);}let r=this.writes.get(t);if(r)for(let o of r)this.producers.get(o)?.delete(t);this.dependencies.delete(t),this.writes.delete(t),this.pinnedReads.delete(t);}getConsumers(t){return this.consumers.get(t)??tt}getProducers(t){return this.producers.get(t)??tt}getDependencies(t){return this.dependencies.get(t)??Jt}getWrites(t){return this.writes.get(t)??Jt}getSnapshot(){let t={};for(let[s,l]of this.consumers)t[s]=Array.from(l);let n={};for(let[s,l]of this.writes)n[s]=Array.from(l);let r={};for(let[s,l]of this.lineReads)r[s]=Array.from(l);let o={};for(let[s,l]of this.producers)o[s]=Array.from(l);let i=tn("datasource",""),a={};for(let[s,l]of this.lineReads){let c=Array.from(l).filter(b=>b.startsWith(i));c.length>0&&(a[s]=c.map(b=>b.slice(i.length)));}let u={};for(let[s,l]of this.consumers)s.startsWith(i)&&(u[s.slice(i.length)]=Array.from(l));return {consumers:t,producers:o,writes:n,reads:r,dataSourceDeps:a,dataSourceConsumers:u}}clear(){this.consumers.clear(),this.producers.clear(),this.dependencies.clear(),this.writes.clear(),this.lineReads.clear(),this.pinnedReads.clear();}};function nn(e,t){let n=t===2?L:M,r=n(e.n),o=n(e.d);return r===null||o===null?null:{n:r,d:o}}function rn(e,t){let n=y(e),r=new Map;for(let[o,i]of n){if(i%t!==0)return null;r.set(o,i/t);}return x(r)}function ar(e,t){let n=y(e);for(let[r,o]of y(t))n.set(r,(n.get(r)??0)+o);return x(n)}function on(e,t){let n=y(e);for(let[r,o]of y(t)){let i=(n.get(r)??0)-o;i<=0?n.delete(r):n.set(r,i);}return x(n)}function ur(e,t){let n=y(e),r=new Map;for(let[o,i]of y(t)){let a=n.get(o);a!==void 0&&r.set(o,Math.min(a,i));}return x(r)}function sr(e){let t=new Set;for(let n of e)for(let r of y(n).keys())t.add(r);return [...t].sort()}function J(e){let t=new Map;for(let n of e)t.set(n.key,n.coefficient);return E({terms:t,vars:sr(e.map(n=>n.key))})}function nt(e){let t=e[0];for(let n=1;n<e.length;n++)t={kind:"mul",left:t,right:e[n]};return t}function lr(e){return [...e.terms].map(([n,r])=>({key:n,coefficient:r})).sort((n,r)=>D(n.key,r.key,e.vars))}function sn(e){if(e.vars.length<2)return null;let t=lr(e);return t.length===2?cr(t[0],t[1]):t.length===3?mr(t):t.length===4?fr(t):null}function cr(e,t){let n=e.coefficient.n>0n,r=t.coefficient.n>0n;if(!n)return null;let o=rt(e,t,2);if(o!==null&&!r)return nt([J([o.a,De(o.b)]),J([o.a,o.b])]);let i=rt(e,t,3);if(i===null)return null;let a=J(r?[i.a,i.b]:[i.a,De(i.b)]),u=r?De(Pe(i.a,i.b)):Pe(i.a,i.b);return nt([a,J([an(i.a),u,an(i.b)])])}function rt(e,t,n){let r=t.coefficient.n<0n?j(t.coefficient):t.coefficient,o=nn(e.coefficient,n),i=nn(r,n);if(o===null||i===null)return null;let a=rn(e.key,n),u=rn(t.key,n);return a===null||u===null?null:{a:{key:a,coefficient:o},b:{key:u,coefficient:i}}}function De(e){return {key:e.key,coefficient:j(e.coefficient)}}function Pe(e,t){return {key:ar(e.key,t.key),coefficient:h(e.coefficient,t.coefficient)}}function an(e){return Pe(e,e)}function mr(e){let[t,n,r]=e;if(t.coefficient.n<0n||r.coefficient.n<0n)return null;let o=rt(t,r,2);if(o===null)return null;let i$1=Pe(o.a,o.b);if(i$1.key!==n.key)return null;let a=h(i$1.coefficient,{n:2n,d:1n}),u=n.coefficient.n<0n,s=u?j(n.coefficient):n.coefficient;return m$1(i(s,a))?{kind:"pow",base:J([o.a,u?De(o.b):o.b]),exponent:p(2)}:null}function fr(e){let t=[[[0,1],[2,3]],[[0,2],[1,3]],[[0,3],[1,2]]];for(let n of t){let r=un(e[n[0][0]],e[n[0][1]]),o=un(e[n[1][0]],e[n[1][1]]);if(!(r===null||o===null)&&dr(r.cofactor,o.cofactor))return nt([J([r.common,o.common]),J(r.cofactor)])}return null}function un(e,t){let n=ur(e.key,t.key),r={key:n,coefficient:e.coefficient},o=[{key:on(e.key,n),coefficient:{n:1n,d:1n}},{key:on(t.key,n),coefficient:i(t.coefficient,e.coefficient)}];return o[0].key===o[1].key?null:{common:r,cofactor:o}}function dr(e,t){return e.length!==t.length?false:e.every((n,r)=>n.key===t[r].key&&n.coefficient.n===t[r].coefficient.n&&n.coefficient.d===t[r].coefficient.d)}var pr=12,Le=4096,br=100000n;function Fe(e,t){let n=e<0n?-e:e,r=t<0n?-t:t;for(;r!==0n;){let o=n%r;n=r,r=o;}return n}function cn(e,t){return e===0n||t===0n?0n:e/Fe(e,t)*t}function ln(e){let t=e<0n?-e:e;if(t===0n)return null;let n=[];for(let r=1n;r*r<=t;r++){if(r>br)return null;if(t%r!==0n)continue;n.push(r);let o=t/r;if(o!==r&&n.push(o),n.length>Le)return null}return n}function mn(e,t){let n=a$1;for(let r of e)n=f(h(n,t),r);return n}function yr(e,t){let n=[e[0]];for(let r=1;r<e.length-1;r++)n.push(f(e[r],h(n[r-1],t)));return n}function le(e){if(e.length<2)return [];if(e.length===2){let[l$1,c]=e;return l(l$1)?[]:[i(g(a$1,c),l$1)]}let t=1n;for(let l of e)t=cn(t,l.d);let n=e.map(l=>l.n*t/l.d),r=n[0],o=n[n.length-1];if(o===0n)return [];let i$1=ln(o),a=ln(r);if(i$1===null||a===null)throw c.execution("SYMBOLIC_FACTOR_LIMIT_EXCEEDED","This polynomial's coefficients have too many divisors to search for rational roots.",{limit:Le});if(i$1.length*a.length>Le)throw c.execution("SYMBOLIC_FACTOR_LIMIT_EXCEEDED","This polynomial has too many candidate rational roots to test.",{limit:Le});let u=[],s=new Set;for(let l$1 of i$1)for(let c of a)for(let b of [1n,-1n]){let h={n:b*l$1/Fe(l$1,c),d:c/Fe(l$1,c)},R=`${h.n}/${h.d}`;s.has(R)||(s.add(R),l(mn(e,h))&&u.push(h));}return u}function hr(e,t){return l(t)?q$2(e):t.n>0n?{kind:"sub",left:q$2(e),right:p(t)}:{kind:"add",left:q$2(e),right:p(j(t))}}function gr(e,t){let n=e.length-1,r=new Map;return e.forEach((o,i)=>{if(l(o))return;let a=n-i;r.set(a===0?"":a===1?t:`${t}^${a}`,o);}),E({terms:r,vars:r.size>0?[t]:[]})}function it(e,t){let n=[],r=[...e],o=le(r);for(;o.length>0&&r.length>2;){for(let a of o){let u=0;for(;r.length>1&&l(mn(r,a));)r=yr(r,a),u++;u>0&&n.push({base:hr(t,a),power:u});}o=r.length>2?le(r):[];}return r.length-1>=1?(n.push({base:gr(r,t),power:1}),{content:b$2,factors:n}):{content:r.length===1?r[0]:b$2,factors:n}}function Nr(e){let t=[];m$1(e.content)||t.push(p(e.content));for(let r$1 of e.factors)t.push(r$1.power===1?r$1.base:r(r$1.base,p({n:BigInt(r$1.power),d:1n})));if(t.length===0)return p(b$2);let n=t[0];for(let r=1;r<t.length;r++)n={kind:"mul",left:n,right:t[r]};return n}function Rr(e){let t=0n,n=1n;for(let r of e.terms.values())t=Fe(t,r.n),n=cn(n,r.d);return t===0n?b$2:{n:t,d:n}}function Ar(e){let t=new Map;for(let o of e.vars){let i=1/0;for(let a of e.terms.keys()){let u=xr(a,o);u<i&&(i=u);}i>0&&i!==1/0&&t.set(o,i);}if(t.size===0)return {monomial:t,reduced:e};let n=new Map;for(let[o,i]of e.terms){let a=ot(o);for(let[u,s]of t)a.set(u,(a.get(u)??0)-s);n.set(Sr(a),i);}let r=new Set;for(let o of n.keys())for(let i of ot(o).keys())r.add(i);return {monomial:t,reduced:{terms:n,vars:[...r].sort()}}}function xr(e,t){return ot(e).get(t)??0}function ot(e){let t=new Map;if(e==="")return t;for(let n of e.split("*")){let r=n.indexOf("^");r===-1?t.set(n,1):t.set(n.slice(0,r),Number(n.slice(r+1)));}return t}function Sr(e){return [...e.keys()].filter(n=>(e.get(n)??0)>0).sort().map(n=>e.get(n)===1?n:`${n}^${e.get(n)}`).join("*")}function vr(e){let t=[...e.keys()].sort(),n=null;for(let r$1 of t){let o=e.get(r$1),i=o===1?q$2(r$1):r(q$2(r$1),p({n:BigInt(o),d:1n}));n=n===null?i:{kind:"mul",left:n,right:i};}return n}function fn(e){let t=C(e);if(t===null||t.terms.size===0||z(t)>pr||t.vars.length===0)return e;let n=Rr(t),r=m$1(n)?t:Mr(t,i(b$2,n)),{monomial:o,reduced:i$1}=Ar(r),a=vr(o),u=A(i$1);if(u===null){let $=sn(i$1);return $!==null?Ir(n,a,$):Er(n,a,i$1)??e}let s=[...B(i$1,u)].reverse(),l=it(s,u),c=h(n,l.content);if(l.factors.length<=1&&(l.factors[0]?.power??1)===1&&a===null&&m$1(c))return e;let h$1=[];m$1(c)||h$1.push(p(c)),a!==null&&h$1.push(a),h$1.push(Nr({content:b$2,factors:l.factors}));let R=h$1[0];for(let $=1;$<h$1.length;$++)R={kind:"mul",left:R,right:h$1[$]};return R}function Mr(e,t){let n=new Map;for(let[r,o]of e.terms)n.set(r,h(o,t));return {terms:n,vars:e.vars}}function Ir(e,t,n){let r=[];m$1(e)||r.push(p(e)),t!==null&&r.push(t),r.push(n);let o=r[0];for(let i=1;i<r.length;i++)o={kind:"mul",left:o,right:r[i]};return o}function Er(e,t,n){if(t===null&&m$1(e))return null;let r=[];m$1(e)||r.push(p(e)),t!==null&&r.push(t),r.push(E(n));let o=r[0];for(let i=1;i<r.length;i++)o={kind:"mul",left:o,right:r[i]};return o}var _={n:2n,d:1n},q={n:3n,d:1n},Ne={n:4n,d:1n};function kr(e,t,n,r){let o=j(i(t,h(q,e))),i$1=i(g(h(q,h(e,n)),h(t,t)),h(q,h(e,e))),a=h(_,h(t,h(t,t))),u=h({n:9n,d:1n},h(e,h(t,n))),s=h({n:27n,d:1n},h(h(e,e),r)),l=i(f(g(a,u),s),h({n:27n,d:1n},h(e,h(e,e))));return {p:i$1,q:l,shift:o}}function pn(e,t,n,r){let{p:o,q:i,shift:a}=kr(e,t,n,r),u=j(f(h(Ne,h(o,h(o,o))),h({n:27n,d:1n},h(i,i))));return k(u,a$1)>0?{exact:[],approximate:Tr(o,i,a)}:l(u)?{exact:wr(o,i,a),approximate:[]}:{exact:_r(o,i,a),approximate:[]}}function wr(e,t,n){if(l(e))return [p(n)];let r=f(i(h(q,t),e),n),o=f(j(i(h(q,t),h(_,e))),n);return [r,o].sort(k).map(p)}function _r(e,t,n){let r=j(i(t,_)),o=f(h(i(t,_),i(t,_)),h(i(e,q),h(i(e,q),i(e,q)))),i$1=O(o),a={kind:"call",name:"cbrt",args:[{kind:"add",left:p(r),right:i$1}]},u={kind:"call",name:"cbrt",args:[{kind:"sub",left:p(r),right:i$1}]},s={kind:"add",left:a,right:u},l={kind:"sub",left:a,right:u},c={kind:"add",left:p(n),right:{kind:"div",left:{kind:"neg",operand:s},right:p(_)}},b={kind:"mul",left:{kind:"div",left:{kind:"mul",left:l,right:O(q)},right:p(_)},right:w(n$1)};return [{kind:"add",left:p(n),right:s},{kind:"sub",left:c,right:b},{kind:"add",left:c,right:b}]}function Tr(e,t,n){let r=e$1(e),o=e$1(t),i=e$1(n),a=2*Math.sqrt(-r/3),u=3*o/(2*r)*Math.sqrt(-3/r),s=Math.acos(Math.min(1,Math.max(-1,u)))/3;return [0,1,2].map(l=>a*Math.cos(s-2*Math.PI*l/3)+i).sort((l,c)=>l-c)}function Vr(e,t,n,r){let o=j(i(e,Ne)),i$1=h(e,e),a=g(t,i(h(q,i$1),{n:8n,d:1n})),u=f(g(n,i(h(e,t),_)),i(h(i$1,e),{n:8n,d:1n})),s=g(f(g(r,i(h(e,n),Ne)),i(h(i$1,t),{n:16n,d:1n})),i(h(q,h(i$1,i$1)),{n:256n,d:1n}));return {p:a,q:u,r:s,shift:o}}function bn(e,t,n,r,o,i$1){let a=R=>i(R,e),{p:u,q:s,r:l$1,shift:c}=Vr(a(t),a(n),a(r),a(o)),b=l(s)?Cr(u,l$1):Fr(u,s,l$1,i$1);if(b===null)return null;let h=l(c)?b:b.map(R=>({kind:"add",left:p(c),right:R}));return {exact:Or(h),approximate:[]}}function Or(e){let t=new Set,n=[];for(let r of e){let o=t$1(Q$1(r));t.has(o)||(t.add(o),n.push(r));}return n}function Cr(e,t){let n=g(h(e,e),h(Ne,t));if(k(n,a$1)<0)return Lr(e,t);let r=N$1(n);return r!==null?Dr(j(e),r,l(n)):Pr(e,t,n)}function Dr(e,t,n){let r=n?[i(e,_)]:[i(f(e,t),_),i(g(e,t),_)],o=[];for(let i of r){if(l(i)){o.push(p(a$1));continue}let a=P$2(i);o.push({kind:"neg",operand:a},a);}return o}function Pr(e,t,n){let r=p(j(e)),o=O(n),i=k(e,a$1)<=0,a=[{node:at({kind:"add",left:r,right:o}),positive:i||k(t,a$1)<=0},{node:at({kind:"sub",left:r,right:o}),positive:i&&k(t,a$1)>=0}],u=[];for(let{node:s,positive:l}of a){let b={kind:"call",name:"sqrt",args:[l?s:{kind:"neg",operand:s}]},h=l?b:{kind:"mul",left:b,right:w(n$1)};u.push({kind:"neg",operand:h},h);}return u}function at(e){return {kind:"div",left:e,right:p(_)}}function Lr(e,t){let n=i(j(e),_),r=N$1(t),o=r===null?dn(O(t),n):O(i(f(r,n),_)),a={kind:"mul",left:r===null?dn(O(t),j(n)):O(i(g(r,n),_)),right:w(n$1)},u={kind:"add",left:o,right:a},s={kind:"sub",left:o,right:a};return [{kind:"neg",operand:u},{kind:"neg",operand:s},s,u]}function dn(e,t){let n=t.n>=0n?{kind:"add",left:e,right:p(t)}:{kind:"sub",left:e,right:p(j(t))};return {kind:"call",name:"sqrt",args:[at(n)]}}function Fr(e,t,n,r){let o=[{n:1n,d:1n},h(_,e),g(h(e,e),h(Ne,n)),j(h(t,t))];for(let i$1 of le(o)){if(k(i$1,a$1)<=0)continue;let a=N$1(i$1);if(a===null)continue;let u=f(e,i$1),s=i(t,a),l=i(g(u,s),_),c=i(f(u,s),_),b={n:1n,d:1n};return [...r(b,a,l),...r(b,j(a),c)]}return null}var Ur=200,$r=1e-14,Br=1e-10,qr=1e-10,yn=1e-9,Yr=1e-8,Kr=4;function Re(e,t){return {re:e.re-t.re,im:e.im-t.im}}function Gr(e,t){return {re:e.re*t.re-e.im*t.im,im:e.re*t.im+e.im*t.re}}function gn(e,t){if(Math.abs(t.re)>=Math.abs(t.im)){let o=t.im/t.re,i=t.re+t.im*o;return {re:(e.re+e.im*o)/i,im:(e.im-e.re*o)/i}}let n=t.re/t.im,r=t.re*n+t.im;return {re:(e.re*n+e.im)/r,im:(e.im*n-e.re)/r}}function X(e){return Math.hypot(e.re,e.im)}function Ue(e,t){let n=0,r=0;for(let o of e){let i=n*t.re-r*t.im+o;r=n*t.im+r*t.re,n=i;}return {re:n,im:r}}function jr(e,t){let n=X(t),r=0;for(let o of e)r=r*n+Math.abs(o);return r}function Xr(e){let t=e.length-1,n=[];for(let r=0;r<t;r++)n.push(e[r]*(t-r));return n}function Zr(e){let t=[...e].reverse(),r=[...K$1(t)].reverse().map(e$1);return r.some(o=>!Number.isFinite(o))?null:r}function Hr(e){let t=e.length-1,n=0;for(let a=1;a<e.length;a++)n=Math.max(n,Math.abs(e[a]));let r=1+n,o=-e[1]/t,i=[];for(let a=0;a<t;a++){let u=2*Math.PI*a/t+Math.PI/(2*t);i.push({re:o+r*Math.cos(u),im:r*Math.sin(u)});}return i}function Wr(e){let t=e.length-1,n=Hr(e);for(let r=0;r<Ur;r++){let o=0,i=1;for(let a=0;a<t;a++){let u={re:1,im:0};for(let l=0;l<t;l++)a!==l&&(u=Gr(u,Re(n[a],n[l])));if(u.re===0&&u.im===0){n[a]={re:n[a].re+1e-6*(a+1),im:n[a].im+1e-6};continue}let s=gn(Ue(e,n[a]),u);if(!Number.isFinite(s.re)||!Number.isFinite(s.im))return null;n[a]=Re(n[a],s),o=Math.max(o,X(s)),i=Math.max(i,X(n[a]));}if(o<=$r*i)return n}return null}function hn(e,t,n){let r=n;for(let o=0;o<Kr;o++){let i=Ue(t,r);if(i.re===0&&i.im===0)break;let a=Re(r,gn(Ue(e,r),i));if(!Number.isFinite(a.re)||!Number.isFinite(a.im))break;r=a;}return r}function zr(e,t,n){let r=Math.max(1,X(n));if(n.im!==0&&Math.abs(n.im)<=yn*r){let o=hn(e,t,{re:n.re,im:0});if(ut(e,o))return {re:o.re,im:0}}if(n.re!==0&&Math.abs(n.re)<=yn*r){let o=hn(e,t,{re:0,im:n.im});if(ut(e,o))return {re:0,im:o.im}}return n}function ut(e,t){return !Number.isFinite(t.re)||!Number.isFinite(t.im)?false:X(Ue(e,t))<=Br*jr(e,t)}function Qr(e){let t=[...e],n=t.map(r=>r.im===0);for(let r=0;r<t.length;r++){if(n[r])continue;let o={re:t[r].re,im:-t[r].im},i=-1,a=Number.POSITIVE_INFINITY;for(let c=r+1;c<t.length;c++){if(n[c])continue;let b=X(Re(t[c],o));b<a&&(a=b,i=c);}if(i===-1||a>Yr*Math.max(1,X(t[r])))continue;let u=(t[r].re+t[i].re)/2,s=(Math.abs(t[r].im)+Math.abs(t[i].im))/2,l=t[r].im<0?-1:1;t[r]={re:u,im:l*s},t[i]={re:u,im:-l*s},n[r]=true,n[i]=true;}return t}function Jr(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++){let r=Math.max(1,X(e[t]),X(e[n]));if(X(Re(e[t],e[n]))<=qr*r)return false}return true}function Nn(e){let t=Zr(e);if(t===null)return null;if(t.length<2)return [];let n=Wr(t);if(n===null)return null;let r=Xr(t),o=Qr(n).map(i=>zr(t,r,i));for(let i of o)if(!ut(t,i))return null;return Jr(o)?[...o].sort((i,a)=>i.re-a.re||i.im-a.im):null}var Rn=8;function eo(e,t){let n=a$1;for(let r of e)n=f(h(n,t),r);return n}function to(e,t){let n=[e[0]];for(let r=1;r<e.length-1;r++)n.push(f(e[r],h(n[r-1],t)));return n}function An(e,t,n){let r=g(h(t,t),h(oo(),h(e,n))),o=h(ro(),e);if(k(r,a$1)<0)return no(j(t),r,o);if(l(r))return [p(i(j(t),o))];let i$1=L(r.n),a=L(r.d);if(i$1!==null&&a!==null){let b={n:i$1,d:a},h=i(f(j(t),b),o),R=i(g(j(t),b),o);return k(R,h)<=0?[p(R),p(h)]:[p(h),p(R)]}let u=O(r),s=k(o,a$1)>0,l$1={kind:"div",left:{kind:"sub",left:p(j(t)),right:u},right:p(o)},c={kind:"div",left:{kind:"add",left:p(j(t)),right:u},right:p(o)};return s?[l$1,c]:[c,l$1]}function no(e,t,n){let r=j(t),o$1=L(r.n),i$1=L(r.d);if(o$1!==null&&i$1!==null){let l=i({n:o$1,d:i$1},n),c=i(e,n);return [w(o(c,j(l))),w(o(c,l))]}let a=i(e,n),u=i(r,h(n,n)),s={kind:"mul",left:O(u),right:w(n$1)};return l(a)?[{kind:"neg",operand:s},s]:[{kind:"sub",left:p(a),right:s},{kind:"add",left:p(a),right:s}]}function ro(){return {n:2n,d:1n}}function oo(){return {n:4n,d:1n}}function io(e){return {re:e,im:0}}function xn(e,t,n){let r=C({kind:"sub",left:e,right:t});if(r===null)return {kind:"unsupported",reason:"this is not a polynomial equation (it divides by an unknown, or calls a function of one)"};let o=r.vars.filter(u=>u!==n),i=z(r,n);if(o.length>0)return i!==1?{kind:"unsupported",reason:`solving for "${n}" needs the equation to be linear in it when other unknowns (${o.join(", ")}) are present`}:ao(r,n);if(i===0)return r.terms.size===0?{kind:"identity"}:{kind:"contradiction"};if(i>Rn)return {kind:"unsupported",reason:`degree ${i} is above the supported maximum of ${Rn}`};let a=[...B(r,n)].reverse();return lo(a)}function ao(e,t){let n=new Map,r=new Map;for(let[u,s]of e.terms){let l=u.split("*").filter(b=>b.length>0),c=l.indexOf(t);c===-1?r.set(u,s):(l.splice(c,1),n.set(l.join("*"),s));}let o=u=>{let s=new Set;for(let l of u.keys())for(let c of l.split("*"))c.length>0&&s.add(c.split("^")[0]);return [...s].sort()},i=E({terms:n,vars:o(n)});return {kind:"roots",exact:[{kind:"div",left:{kind:"neg",operand:E({terms:r,vars:o(r)})},right:i}],approximate:[]}}function uo(e){return e.length===4?pn(e[0],e[1],e[2],e[3]):e.length===5?bn(e[0],e[1],e[2],e[3],e[4],An):null}function so(e){let t=[],n=[...e],r=0;for(;n.length>1&&l(n[n.length-1]);)n=n.slice(0,-1),r++;for(r>0&&t.push(a$1);n.length>1;){let o=le(n);if(o.length===0)break;for(let i of o){let a=0;for(;n.length>1&&l(eo(n,i));)n=to(n,i),a++;a>0&&t.push(i);}}return {roots:t.sort(k),remaining:n}}function lo(e){let{roots:t,remaining:n}=so(e),r=t.map(p),o=[],i$1=n.length-1,a=e.length-n.length;if(i$1<=0)return ce(r,o,a,0,"");if(i$1===1)return r.push(p(i(j(n[1]),n[0]))),ce(r,o,a+1,0,"");if(i$1===2)return r.push(...An(n[0],n[1],n[2])),ce(r,o,a+2,0,"");let u=uo(n);if(u!==null)return r.push(...u.exact),o.push(...u.approximate.map(io)),ce(r,o,a+i$1,0,"");let s=Nn(n);return s!==null?(o.push(...s),ce(r,o,a+i$1,0,"")):ce(r,o,a,i$1,`a degree-${i$1} factor of it has no exact solution here and the numerical method did not converge on that factor`)}function ce(e,t,n,r,o){let i=e.length+t.length,a=n>=1&&(i<1||i>n);return r>0||a?{kind:"incomplete",exact:e,approximate:t,missing:a?Math.max(1,n+r-i):r,reason:a?`${i} root${i===1?"":"s"} were produced for a degree-${n+r} equation, which does not add up`:o}:{kind:"roots",exact:e,approximate:t}}var Sn={0:"sqrt",1:"abs",2:"sin",3:"cos",4:"tan",5:"log",6:"ceil",7:"floor",8:"round",11:"asin",12:"acos",13:"atan",14:"atan2",15:"sinh",16:"cosh",17:"tanh",18:"asinh",19:"acosh",20:"atanh",21:"cbrt",23:"expm1",24:"exp",26:"hypot",28:"log10",29:"log1p",30:"log2",33:"sign",34:"trunc",35:"degtorad",36:"radtodeg",61:"root",62:"fact"},co=31,qi=new Set([67,68,69,70,71,72,73,74,75,76,77,78,79]);function T(e){if(e.type===9)return e.value;if(e.type===13||e.type===12)return null;let t=e.toNumber();return Number.isFinite(t)?p(d(t)):null}function V(e){let t=Q$1(e);return t.kind==="const"?n(e$1(t.value)):K(t)}function $e(e){return P$1("SYMBOLIC_UNSUPPORTED_FUNCTION",`"${e}" cannot be applied to an expression that still contains an unknown.`)}function Yi(e,t){let n=T(e),r$1=T(t);return n===null||r$1===null?$e("^"):V(r(n,r$1))}function Ki(e){let t=T(e);return t===null?$e("-"):V({kind:"neg",operand:t})}function Gi(e,t){let n=[];for(let o of t){let i=Q(o);if(i)return i;let a=T(o);if(a===null)return $e(Sn[e]??`builtin ${e}`);n.push(a);}if(e===co&&n.length===2)return V(r(n[0],n[1]));let r$1=Sn[e];return r$1===void 0?$e(`builtin ${e}`):V(s(r$1,n))}function mo(e){let t=V(e);return t.type===0&&!Number.isInteger(t.toNumber())?K(e):t}function fo(e){return e.im===0?n(e.re):K(w(o(d(e.re),d(e.im))))}function po(e){switch(e.kind){case "identity":return t("true for every value");case "contradiction":return t("no solution");case "unsupported":return P$1("SYMBOLIC_SOLVE_UNSUPPORTED",`Cannot solve this equation: ${e.reason}.`);case "incomplete":{let t=e.exact.length+e.approximate.length;return P$1("SYMBOLIC_SOLVE_INCOMPLETE",`Only ${t} of this equation's ${t+e.missing} roots could be found: ${e.reason}.`)}case "roots":{let t$1=e.exact.map(mo);for(let n of e.approximate)t$1.push(fo(n));return t$1.length===0?t("no solution"):t$1.length===1?t$1[0]:C$1(1,t$1.length,t$1.map(n=>n.type===9?n.value:n.toNumber()))}}}function Mn(e,t,n){let r=T(e),o=T(t);return r===null||o===null?P$1("SYMBOLIC_NONFINITE_OPERAND","An equation side has no exact value to solve with."):po(xn(r,o,n))}function me(e$1,t){if(e$1.type===6&&t.type===6){if(e$1.unit===t.unit)return {lv:e$1.toNumber(),rv:t.toNumber(),unit:e$1.unit,sameMeasure:true};let n=c$1(e$1.unit),r=c$1(t.unit),o=c$2.isCurrency(e$1.unit)&&c$2.isCurrency(t.unit);if(n&&n===r){let i=e(t.toNumber(),t.unit,e$1.unit);return {lv:e$1.toNumber(),rv:i,unit:e$1.unit,sameMeasure:true}}if(o){let i=c$2.convertSync(t.toNumber(),t.unit,e$1.unit);if(i!==null)return {lv:e$1.toNumber(),rv:i,unit:e$1.unit,sameMeasure:true}}return {lv:e$1.toNumber(),rv:t.toNumber(),unit:void 0,sameMeasure:false}}return e$1.type===6?{lv:e$1.toNumber(),rv:t.toNumber(),unit:e$1.unit,sameMeasure:true}:t.type===6?{lv:e$1.toNumber(),rv:t.toNumber(),unit:t.unit,sameMeasure:true}:{lv:e$1.toNumber(),rv:t.toNumber(),unit:void 0,sameMeasure:true}}function Ae(e,t){let n=new Array(e.length),r;for(let o=0;o<e.length;o++){let i=e[o];if(i.type!==6||i.unit===void 0){n[o]=i.toNumber();continue}if(r===void 0){r=i,n[o]=i.toNumber();continue}let{rv:a,sameMeasure:u}=me(r,i);if(!u){let s=xe(r.unit,i.unit,t);return P$1("INCOMPATIBLE_UNITS",s??`Cannot combine incompatible units: ${r.unit??"?"} and ${i.unit??"?"}`)}n[o]=a;}return {magnitudes:n,unit:r?.unit}}var bo=1e-12;function yo(e,t,n){let r=0;return Number.isFinite(e)&&Math.abs(e)>r&&(r=Math.abs(e)),Number.isFinite(t)&&Math.abs(t)>r&&(r=Math.abs(t)),Number.isFinite(n)&&Math.abs(n)>r&&(r=Math.abs(n)),r}function na(e,t){let{lv:n,rv:r,sameMeasure:o}=me(e,t);if(!o)return {lv:n,rv:r,equal:false,sameMeasure:false};if(e.type===6&&t.type===6&&e.unit!==void 0&&e.unit===t.unit&&e.exact!==void 0&&t.exact!==void 0&&c$2.isCurrency(e.unit))return {lv:n,rv:r,equal:qa(e.exact,t.exact)===0,sameMeasure:true};if(n===r)return {lv:n,rv:r,equal:true,sameMeasure:true};if(!Number.isFinite(n)||!Number.isFinite(r))return {lv:n,rv:r,equal:false,sameMeasure:true};let i=yo(n,r,t.toNumber());return {lv:n,rv:r,equal:Math.abs(n-r)<=i*bo,sameMeasure:true}}var ho={time:"duration",luminousIntensity:"luminous intensity"},go=new Set(["money","data"]),No={add:"added",sub:"subtracted",mul:"multiplied",div:"divided"};function Be(e){if(c$2.isCurrency(e))return "money";let t=c$1(e);if(t!==void 0)return ho[t]??t}function In(e){return go.has(e)?e:/^[aeiou]/.test(e)?`an ${e}`:`a ${e}`}function xe(e,t,n){let r=e===void 0?void 0:Be(e),o=t===void 0?void 0:Be(t);if(r!==void 0&&o!==void 0&&r!==o)return `${r} and ${o} cannot be ${n}`}function Ro(e){return e!==void 0?No[e]??"combined":"combined"}function ra(e,t){let n=Be(e),r=Be(t);if(n!==void 0&&r!==void 0&&n!==r)return `${In(n)} cannot be converted to ${In(r)}`}function oa(e,t){let n=e.type===6?e.unit:void 0,r=t.type===6?t.unit:void 0,o=xe(n,r,"compared");return P$1("INCOMPATIBLE_UNITS",o??`Cannot compare incompatible units: ${n??"?"} and ${r??"?"}`)}function En(e){if(e.type===2)return e.value;let t=e.toNumber();if(!Number.isInteger(t)){let n=Number.isNaN(t)?"NaN":String(t);throw c.execution("BIGINT_INEXACT_OPERAND",`A whole-number (n) value can only be combined with another whole number, and ${n} is not one`,{operand:n})}return BigInt(t)}function ia(){return c.execution("BIGINT_DIVISION_BY_ZERO","Division by zero: a whole-number (n) division is exact integer division, which has no answer at zero, unlike 1 / 0 which is Infinity")}function aa(e,t){let n=kn(e),r=kn(t);return n===null||r===null?null:n<r?-1:n>r?1:0}function kn(e){if(e.type===2)return e.value;let t=e.toNumber();return Number.isInteger(t)?BigInt(t):null}function st(e,t){return Number.isFinite(t)?Math.pow(e,t):e===1||e===-1&&!Number.isNaN(t)?1:Math.pow(e,t)}function wn(e){return e.exact!==void 0?e.exact:ha(e.toNumber())}function Ao(e,t,n){let r=e.type===6&&e.unit!==void 0&&e.exact!==void 0&&c$2.isCurrency(e.unit),o=t.type===6&&t.unit!==void 0&&t.exact!==void 0&&c$2.isCurrency(t.unit);if(!r&&!o)return null;let i,a,u;if(r&&o){if(e.unit!==t.unit||n==="div")return null;i=e.exact,a=t.exact,u=e.unit;}else if(r&&t.type!==6)i=e.exact,u=e.unit,a=wn(t);else if(o&&e.type!==6)a=t.exact,u=t.unit,i=wn(e);else return null;if(i===null||a===null)return null;let s;switch(n){case "add":s=ja(i,a);break;case "sub":s=ka(i,a);break;case "mul":s=la$1(i,a);break;case "div":if(na$1(a))return null;s=pa(i,a);break}return v(ra$1(s),u,s)}function qe(e){return e.rational!==void 0?e.rational:(e.type===0||e.type===1)&&typeof e.value=="number"&&Number.isInteger(e.value)?c$3(BigInt(e.value)):null}function ua(e,t,n){let r=qe(e);if(r===null)return null;let o=qe(t);if(o===null||n==="div"&&l(o))return null;let i$1;try{switch(n){case "add":i$1=f(r,o);break;case "sub":i$1=g(r,o);break;case "mul":i$1=h(r,o);break;case "div":i$1=i(r,o);break}}catch{return null}return p$1(e$1(i$1),i$1)}function sa(e,t,n){if(e.type!==0||t.type!==0)return null;let r=e.value,o=t.value,i=e.uncertainty??0,a=t.uncertainty??0,u,s;switch(n){case "add":u=r+o,s=Math.hypot(i,a);break;case "sub":u=r-o,s=Math.hypot(i,a);break;case "mul":u=r*o,s=Math.hypot(o*i,r*a);break;case "div":u=r/o,s=Math.hypot(i/o,r*a/(o*o));break}return q$1(u,s)}function la(e,t){let n=qe(e);if(n===null)return null;let r=qe(t);return r===null?null:k(n,r)}function ca(e,t,n$1,r,o){if(e.type===13)return e;if(t.type===13)return t;if(e.type===12)return e;if(t.type===12)return t;if(o&&(e.type===9||t.type===9)){let i=T(e),a=T(t);return i===null||a===null?P$1("SYMBOLIC_NONFINITE_OPERAND","A symbolic expression cannot combine with a value that has no exact number (NaN or infinity)."):K(Q$1({kind:o,left:i,right:a}))}if(e.type===0&&t.type===0)return n(n$1(e.value,t.value));if(e.type===2||t.type===2){let i=En(e),a=En(t);return r?s$1(r(i,a)):s$1(i+a)}if(e.type===6||t.type===6){if(o){let h=Ao(e,t,o);if(h)return h}let{lv:i,rv:a,unit:u$1,sameMeasure:s}=me(e,t);if(!s){let h=e.type===6?e.unit:void 0,R=t.type===6?t.unit:void 0,$=xe(h,R,Ro(o));return P$1("INCOMPATIBLE_UNITS",$??`Cannot combine incompatible units: ${h??"?"} and ${R??"?"}`)}let l=u(n$1(i,a),u$1),c=e.datetimeSpan===true&&t.datetimeSpan===true,b=e.datetimeSpan===true&&t.type===0||t.datetimeSpan===true&&e.type===0;return (c||b)&&(l.datetimeSpan=true),l}if(e.type===7&&t.type===7){let i=e.value,a=t.value;if(!V$1(i,a))return P$1("DIMENSION_MISMATCH",`Cannot combine matrices of different shapes: ${i.rows}x${i.cols} and ${a.rows}x${a.cols}`);let u=new Array(i.data.length);for(let s=0;s<i.data.length;s++)u[s]=n$1(i.data[s],a.data[s]);return C$1(i.rows,i.cols,u)}if(e.type===7){let i=e.value,a=t.toNumber(),u=i.data.map(s=>n$1(s,a));return C$1(i.rows,i.cols,u)}if(t.type===7){let i=t.value,a=e.toNumber(),u=i.data.map(s=>n$1(a,s));return C$1(i.rows,i.cols,u)}return n(n$1(e.toNumber(),t.toNumber()))}var _n=254,Tn=200,Se=class{constructor(){this.handlers=new Map;this.nextOpcode=Tn+1;}register(t){this.handlers.set(t.opcode,t.handler);}unregister(t){this.handlers.delete(t);}get(t){return this.handlers.get(t)}has(t){return this.handlers.has(t)}allocateOpcode(){if(this.nextOpcode>_n)throw c.config("OPCODE_POOL_EXHAUSTED",`OpRegistry: dynamic opcode pool exhausted (max ${_n-Tn} allocations).`);return this.nextOpcode++}},da=new Se;var On=ga(1);function ve(e,t){return c$2.isCurrency(t)?e.exact??ha(e.toNumber()):null}function lt(e){if(!Number.isFinite(e))return null;if(Number.isInteger(e))return ga(BigInt(e));let t=String(e);return /^-?\d+\.\d+$/.test(t)?ia$1(t):null}function Cn(e,t,n){let r=ve(e,n),o=lt(t);if(r!==null&&o!==null){let i=la$1(r,o);return v(ra$1(i),n,i)}return u(e.toNumber()*t,n)}function Dn(e,t,n,r){let o=ve(e,t),i=lt(n);if(o!==null&&i!==null){let a=ja(On,r===1?i:ma(i)),u=la$1(o,a);return v(ra$1(u),t,u)}return u(e.toNumber()*(1+r*n),t)}function Pn(e){let t=lt(e);return t===null?null:ja(On,t)}function Ln(e,t,n){let r=ve(e,t),o=Pn(n);if(r===null||o===null||na$1(o))return null;let i=pa(r,o);return v(ra$1(i),t,i)}function Fn(e,t,n){let r=ve(e,t),o=Pn(n);if(r===null||o===null||na$1(o))return null;let i=ka(r,pa(r,o));return v(ra$1(i),t,i)}function Un(e,t){let n=e.unit,r=n!==void 0&&c$2.isCurrency(n)?xo(e,n):null;if(r===null)return {unit:n,shares:[{value:e.toNumber()/t,count:t}]};let o=BigInt(t),i=r/o,a=r-i*o,u=Number(a<0n?-a:a),s=r<0n?-1n:1n,l=Vn(i,t-u);return u===0?{unit:n,shares:[l]}:{unit:n,shares:[l,Vn(i+s,u)]}}function Vn(e,t){let n=fa(e,2);return {value:ra$1(n),exact:n,count:t}}function xo(e,t){let n=ve(e,t);return n===null?null:oa$1(n,2).coef}var So=12;function $n(e,t){if(e.length===0||t.length===0)return [];let n=new Array(e.length+t.length-1).fill(a$1);return e.forEach((r,o)=>{t.forEach((i,a)=>{n[o+a]=f(n[o+a],h(r,i));});}),n}function vo(e,t){let n=[b$2];for(let r=0;r<t;r++)n=$n(n,e);return n}function ct(e,t){return e.map(n=>i(n,t))}function Mo(e,t){let n=[],r=0;for(;r<e.length&&l(e[r]);)r++;r>0&&n.push({base:[a$1,b$2],power:r});let o=e.slice(r);if(o.length>1){let i=it([...o].reverse(),t);for(let a of i.factors){let u=C(a.base);if(u===null)return null;n.push({base:[...B(u,t)],power:a.power});}}return n.length>0?n:null}function Io(e){let t=[];return e.forEach((n,r)=>{let o=n.base.length-1;for(let i=1;i<=n.power;i++)for(let a=0;a<o;a++)t.push({factor:r,power:i,degree:a});}),t}function Eo(e,t,n){let r=vo(t[e.factor].base,e.power),{quotient:o,remainder:i}=H$2(n,r);if(!G(i))return null;let a=new Array(e.degree).fill(a$1);return a.push(b$2),$n(o,a)}function ko(e,t){let n=t.length;for(let r=0;r<n;r++){let o=-1;for(let i=r;i<n;i++)if(!l(e[i][r])){o=i;break}if(o===-1)return null;[e[r],e[o]]=[e[o],e[r]],[t[r],t[o]]=[t[o],t[r]];for(let i$1=0;i$1<n;i$1++){if(i$1===r||l(e[i$1][r]))continue;let a=i(e[i$1][r],e[r][r]);for(let u=r;u<n;u++)e[i$1][u]=g(e[i$1][u],h(a,e[r][u]));t[i$1]=g(t[i$1],h(a,t[r]));}}return t.map((r,o)=>i(r,e[o][o]))}function mt(e,t,n){if(t.length<2||t.length-1>So)return null;let r=I(e,t),o=r.length>1?H$2(e,r).quotient:[...e],i=r.length>1?H$2(t,r).quotient:[...t];if(i.length===1)return {polynomial:ct(o,i[0]),terms:[]};if(i.length===0)return null;let a=i[i.length-1],u=ct(i,a),s=ct(o,a),{quotient:l,remainder:c}=H$2(s,u);if(G(c))return {polynomial:l,terms:[]};let b=Mo(u,n);if(b===null)return null;let h=wo(b,u,c);return h===null?null:{polynomial:l,terms:h}}function wo(e,t,n){let r=Io(e),o=t.length-1;if(r.length!==o)return null;let i=[];for(let l of r){let c=Eo(l,e,t);if(c===null)return null;i.push(c);}let a=[];for(let l=0;l<o;l++)a.push(i.map(c=>c[l]??a$1));let u=[];for(let l=0;l<o;l++)u.push(n[l]??a$1);let s=ko(a,u);return s===null?null:_o(r,s,e)}function _o(e,t,n){let r=new Map;e.forEach((i,a)=>{let u=`${i.factor}:${i.power}`,s=r.get(u)??[];s[i.degree]=t[a],r.set(u,s);});let o=[];for(let[i,a]of r){let[u,s]=i.split(":").map(Number),l$1=[...a].map(c=>c??a$1);l$1.every(l)||o.push({numerator:l$1,base:n[u].base,power:s});}return o}function Me(e,t){let n=new Map;return e.forEach((r,o)=>{l(r)||n.set(o===0?"":o===1?t:`${t}^${o}`,r);}),n.size===0?p(a$1):E({terms:n,vars:e.length>1?[t]:[]})}function Bn(e){let t=ft(e);if(t===null)return e;let n=mt(t.numerator,t.denominator,t.variable);if(n===null||n.terms.length===0)return e;let r$1=n.polynomial.length>0?Me(n.polynomial,t.variable):null;for(let o of n.terms){let i=Me(o.base,t.variable),a=o.power===1?i:r(i,p({n:BigInt(o.power),d:1n})),u=To(o.numerator),s=u?o.numerator.map(c=>j(c)):o.numerator,l={kind:"div",left:Me(s,t.variable),right:a};r$1===null?r$1=u?{kind:"neg",operand:l}:l:r$1={kind:u?"sub":"add",left:r$1,right:l};}return r$1===null?e:Q$1(r$1)}function To(e){return e.some(t=>t.n<0n)&&e.every(t=>t.n<=0n)}function ft(e){if(e.kind!=="div")return null;let t=C(e.left),n=C(e.right);if(t===null||n===null)return null;let r=A(n);return r===null||t.vars.some(o=>o!==r)?null:{numerator:B(t,r),denominator:B(n,r),variable:r}}var dt=16;function qn(){return p(a$1)}function Z(){return p(b$2)}function Vo(e,t){switch(e){case "sin":return s("cos",[t]);case "cos":return {kind:"neg",operand:s("sin",[t])};case "tan":return {kind:"div",left:Z(),right:r(s("cos",[t]),p(2))};case "exp":return s("exp",[t]);case "log":return {kind:"div",left:Z(),right:t};case "sqrt":return {kind:"div",left:Z(),right:{kind:"mul",left:p(2),right:s("sqrt",[t])}};case "asin":return {kind:"div",left:Z(),right:s("sqrt",[Yn(t)])};case "acos":return {kind:"neg",operand:{kind:"div",left:Z(),right:s("sqrt",[Yn(t)])}};case "atan":return {kind:"div",left:Z(),right:Oo(t)};case "sinh":return s("cosh",[t]);case "cosh":return s("sinh",[t]);case "tanh":return {kind:"div",left:Z(),right:r(s("cosh",[t]),p(2))};case "abs":return s("sign",[t]);default:return null}}function Yn(e){return {kind:"sub",left:Z(),right:r(e,p(2))}}function Oo(e){return {kind:"add",left:Z(),right:r(e,p(2))}}function Ie(e,t,n=1){if(n<0||!Number.isInteger(n))throw c.execution("SYMBOLIC_DERIVATIVE_ORDER_LIMIT","A derivative order must be a whole number, at least zero.");if(n>dt)throw c.execution("SYMBOLIC_DERIVATIVE_ORDER_LIMIT",`A derivative order above ${dt} is not supported.`,{limit:dt});let r=Q$1(e);for(let o=0;o<n;o++)r=Q$1(P(r,t));return r}function P(e,t){switch(e.kind){case "const":case "complex":return qn();case "var":return e.name===t?Z():qn();case "add":return {kind:"add",left:P(e.left,t),right:P(e.right,t)};case "sub":return {kind:"sub",left:P(e.left,t),right:P(e.right,t)};case "neg":return {kind:"neg",operand:P(e.operand,t)};case "mul":return {kind:"add",left:{kind:"mul",left:P(e.left,t),right:e.right},right:{kind:"mul",left:e.left,right:P(e.right,t)}};case "div":return {kind:"div",left:{kind:"sub",left:{kind:"mul",left:P(e.left,t),right:e.right},right:{kind:"mul",left:e.left,right:P(e.right,t)}},right:r(e.right,p(2))};case "pow":return Co(e,t);case "call":{if(e.args.length!==1)return pt(e,t);let n=Vo(e.name,e.args[0]);return n===null?pt(e,t):{kind:"mul",left:n,right:P(e.args[0],t)}}}}function Co(e,t){if(e.exponent.kind==="const"){let n=p(g(e.exponent.value,b$2));return {kind:"mul",left:{kind:"mul",left:e.exponent,right:r(e.base,n)},right:P(e.base,t)}}return e.base.kind==="const"&&e.base.value.n>0n?{kind:"mul",left:{kind:"mul",left:e,right:s("log",[e.base])},right:P(e.exponent,t)}:pt(e,t)}function pt(e,t){return s("der",[e,q$2(t)])}function Kn(e,t){let n=C(e);if(n===null||n.vars.filter(u=>u!==t).length>0||z(n,t)>1)return null;let o=B(n,t),i=o[0]??{n:0n,d:1n},a=o[1]??{n:0n,d:1n};return l(a)?null:{slope:a,intercept:i}}function Do(e,t){let n=C(e);if(n===null)return null;let r$1=n.vars.filter(a=>a!==t);if(r$1.length>0)return {ok:false,reason:`it involves more than one unknown (${r$1.join(", ")})`};let o=B(n,t),i$1=p(0);return o.forEach((a,u)=>{if(l(a))return;let s=u+1,l$1=i(a,{n:BigInt(s),d:1n}),c={kind:"mul",left:p(l$1),right:s===1?q$2(t):r(q$2(t),p(s))};i$1={kind:"add",left:i$1,right:c};}),{ok:true,value:Q$1(i$1)}}function Po(e,t){if(e.kind!=="call"||e.args.length!==1)return null;let n=Kn(e.args[0],t);if(n===null)return null;let r=e.args[0],o=i=>Q$1({kind:"div",left:i,right:p(n.slope)});switch(e.name){case "exp":return {ok:true,value:o(s("exp",[r]))};case "sin":return {ok:true,value:o({kind:"neg",operand:s("cos",[r])})};case "cos":return {ok:true,value:o(s("sin",[r]))};case "log":return {ok:true,value:o({kind:"sub",left:{kind:"mul",left:r,right:s("log",[r])},right:r})};default:return null}}function Lo(e,t){if(e.kind!=="div"||e.left.kind!=="const"||!bt(e.left.value))return null;let n=Kn(e.right,t);if(n!==null)return {ok:true,value:Q$1({kind:"div",left:s("log",[e.right]),right:p(n.slope)})};let r=C(e.right);if(r!==null&&r.vars.length===1&&r.vars[0]===t){let o=B(r,t);if(o.length===3&&bt(o[0])&&l(o[1])&&bt(o[2]))return {ok:true,value:s("atan",[q$2(t)])}}return null}function bt(e){return e.n===1n&&e.d===1n}function Fo(e,t){let n=ft(e);if(n===null||n.variable!==t)return null;let r=mt(n.numerator,n.denominator,t);if(r===null)return null;let o=r.polynomial.length>0?Bo(r.polynomial,t):p(0);for(let i of r.terms){let a=Uo(i,t);if(a===null)return {ok:false,reason:"its denominator has a repeated irreducible quadratic factor, which needs a reduction formula this does not have"};o={kind:"add",left:o,right:a};}return {ok:true,value:Q$1(o)}}function Uo(e,t){let n=e.base.length-1,r$1=Me(e.base,t);if(n===1){let o=e.numerator[0]??a$1;if(e.power===1)return {kind:"mul",left:p(o),right:s("log",[r$1])};let i$1=e.power-1,a=i(o,{n:BigInt(-i$1),d:1n});return {kind:"div",left:p(a),right:r(r$1,p({n:BigInt(i$1),d:1n}))}}return n!==2||e.power!==1?null:$o(e,t,r$1)}function $o(e,t,n){let r=e.numerator[0]??a$1,o=e.numerator[1]??a$1,[i,a]=e.base,u={n:1n,d:2n},s$1=h(a,u),l$1={kind:"mul",left:p(h(o,u)),right:s("log",[n])},c=g(r,h(o,s$1));if(l(c))return l$1;let b=O(g(i,h(s$1,s$1))),h$1={kind:"add",left:q$2(t),right:p(s$1)},R={kind:"mul",left:{kind:"div",left:p(c),right:b},right:s("atan",[{kind:"div",left:h$1,right:b}])};return l(o)?R:{kind:"add",left:l$1,right:R}}function Bo(e,t){let n=p(0);return e.forEach((r$1,o)=>{if(l(r$1))return;let i$1=o+1,a=i(r$1,{n:BigInt(i$1),d:1n}),u={kind:"mul",left:p(a),right:i$1===1?q$2(t):r(q$2(t),p(i$1))};n={kind:"add",left:n,right:u};}),n}function Ee(e,t){let n=Q$1(e);if(!u$1(n).has(t))return {ok:true,value:Q$1({kind:"mul",left:n,right:q$2(t)})};let r=Do(n,t);if(r!==null)return r;let o=Po(n,t);if(o!==null)return o;let i=Lo(n,t);if(i!==null)return i;let a=Fo(n,t);if(a!==null)return a;if(n.kind==="add"||n.kind==="sub"){let u=Ee(n.left,t);if(!u.ok)return u;let s=Ee(n.right,t);return s.ok?{ok:true,value:Q$1({kind:n.kind,left:u.value,right:s.value})}:s}if(n.kind==="mul"&&n.left.kind==="const"){let u=Ee(n.right,t);return u.ok?{ok:true,value:Q$1({kind:"mul",left:n.left,right:u.value})}:u}return {ok:false,reason:"no elementary antiderivative is known for this expression"}}var yt=16;function Gn(e,t,n,r$1){if(r$1<0||!Number.isInteger(r$1)||r$1>yt)throw c.execution("SYMBOLIC_TAYLOR_DEGREE_LIMIT",`A Taylor degree must be a whole number from 0 to ${yt}.`,{limit:yt});let o=p(n),i$1=1n,a=p(a$1);for(let u=0;u<=r$1;u++){u>0&&(i$1*=BigInt(u));let s=Ie(e,t,u),l$1=Q$1(v$1(s,t,o));if(l$1.kind!=="const")throw c.execution("SYMBOLIC_TAYLOR_INEXACT",`The derivative of order ${u} does not reduce to an exact number at the expansion point, so this series cannot be computed exactly.`,{order:u});let c$1=i(l$1.value,{n:i$1,d:1n});if(l(c$1))continue;let b=l(n)?q$2(t):{kind:"sub",left:q$2(t),right:o},h=u===0?p(1):u===1?b:r(b,p(u));a={kind:"add",left:a,right:{kind:"mul",left:p(c$1),right:h}};}return Q$1(a)}function jn(e,t){return e.map(n=>t.map(r=>Ie(n,r)))}function qo(){let e=globalThis.Temporal;return e??void 0}function Xn(e){if(e!==void 0&&typeof e!="string")return e;if(e==="date")return b;let t=qo();if(e==="temporal"){if(t===void 0)throw c.config("CALENDAR_TEMPORAL_UNAVAILABLE",'calendar: "temporal" was asked for, but this runtime has no Temporal. Node ships it from 26 (24 behind --harmony-temporal), and Chrome, Edge, Firefox and Opera ship it; Safari does not. Pass a polyfill-backed backend from "solve-engine/temporal", or use calendar: "auto" to compute on Date where Temporal is absent.');return b$1(t)}return t===void 0?b:b$1(t)}function Yo(e={}){return {pluginFunctions:{},opRegistry:new Se,pluginFunctionOwners:{},networkEnabled:e.networkEnabled??true,calendar:Xn(e.calendar)}}var Zn=Yo();var Ko={1970:38.8,1971:40.5,1972:41.8,1973:44.4,1974:49.3,1975:53.8,1976:56.9,1977:60.6,1978:65.2,1979:72.6,1980:82.4,1981:90.9,1982:96.5,1983:99.6,1984:103.9,1985:107.6,1986:109.6,1987:113.6,1988:118.3,1989:124,1990:130.7,1991:136.2,1992:140.3,1993:144.5,1994:148.2,1995:152.4,1996:156.9,1997:160.5,1998:163,1999:166.6,2e3:172.2,2001:177.1,2002:179.9,2003:184,2004:188.9,2005:195.3,2006:201.6,2007:207.3,2008:215.3,2009:214.5,2010:218.1,2011:224.9,2012:229.6,2013:233,2014:236.7,2015:237,2016:240,2017:245.1,2018:251.1,2019:255.7,2020:258.8,2021:271,2022:292.7,2023:304.7,2024:313.7,2025:322.2,2026:332.7},Wn=1970,zn=2026;function Hn(e){return Ko[Math.trunc(e)]}function ht(e,t){let n=Hn(e),r=Hn(t);if(!(n===void 0||r===void 0||n===0))return r/n}function Qa(e,t,n){let r=ht(t,n);if(r!==void 0)return e*r}function Go(e){let t=Math.abs(e);return t<60?u(e,"s"):t<3600?u(e/60,"min"):t<86400?u(e/3600,"h"):u(e/86400,"d")}var jo=0;function gt(e){if(e.type===6&&e.unit!==void 0){let t=a[e.unit.toLowerCase()];if(t!==void 0&&t[0]===jo)return e.toNumber()*t[1]}return e.toNumber()}function Xo(e,t){if(t===1)return e;let n=`${e}s`;return a[n.toLowerCase()]===void 0?e:n}function Qn(e,t){let n$1,r=false;for(let o of e){if(Number.isNaN(o.toNumber())){r=true;continue}if(n$1===void 0){n$1=o;continue}let{lv:i,rv:a,sameMeasure:u}=me(n$1,o);if(!u){let s=n$1.type===6?n$1.unit:void 0,l=o.type===6?o.unit:void 0,c=xe(s,l,"compared");return P$1("INCOMPATIBLE_UNITS",c??`Cannot compare incompatible units: ${s??"?"} and ${l??"?"}`)}(t?a>i:a<i)&&(n$1=o);}return r?n(NaN):n$1===void 0?n(t?-1/0:1/0):n$1.type===6?n$1:n(n$1.toNumber())}function Ye(e,t){return t===void 0?n(e):u(e,t)}function Ke(e,t){return e.type===6&&e.unit!==void 0?u(t,e.unit):n(t)}function Jn(e,t){let n=Number.isFinite(t)?Math.min(100,Math.max(0,Math.trunc(t))):0;if(e.exact!==void 0){let a=oa$1(e.exact,n);return Ge(e,ra$1(a),n,a)}let r=e.toNumber();if(!Number.isFinite(r))return Ge(e,r,n);let o=Math.pow(10,n),i=r*o;return !Number.isFinite(i)||Math.abs(i)>Number.MAX_SAFE_INTEGER?Ge(e,r,n):Ge(e,Math.round(i)/o,n)}function Ge(e,t,n$1,r){let o=e.type===6&&e.unit!==void 0?u(t,e.unit):n(t);return o.decimalPlaces=n$1,r!==void 0&&(o.exact=r),o}function er(e,t,n){if(Number.isFinite(e)&&Number.isFinite(t))return null;let r=Number.isFinite(e)?t:e;return P$1("INVALID_INTEGER_OPERAND",`${n} needs two whole numbers, and ${Number.isNaN(r)?"one of them has no value":"one of them is infinite"}`)}function tr(e,t){let n=e,r=t;for(;r!==0;){let o=r;r=n%r,n=o;}return n}function Zo(e){let t=e.length;if(t===0)return 0;let n=e.reduce((r,o)=>r+o,0)/t;return e.reduce((r,o)=>r+(o-n)*(o-n),0)}function je(e,t){let n=e.length;if(n===0)return 0;let r=t?n-1:n;return r<=0?0:Zo(e)/r}var Ho=12,Wo=new Set(["month","months","mo","mos","mth","mths"]);function H(e$1){return e$1.type!==6||e$1.unit===void 0?e$1.toNumber():c$1(e$1.unit)!=="time"?P$1("INVALID_TERM",`a term is a length of time, and "${e$1.unit}" is not: write it as days, months or years`):Wo.has(e$1.unit)?e$1.toNumber()/Ho:e(e$1.toNumber(),e$1.unit,"year")}var Ru={0:e=>{let t=e[0].toNumber();return t>=0?n(Math.sqrt(t)):V(s("sqrt",[p(t)]))},1:e=>e[0].type===7?ca$1(e[0].value):Ke(e[0],Math.abs(e[0].toNumber())),2:e=>n(Math.sin(gt(e[0]))),3:e=>n(Math.cos(gt(e[0]))),4:e=>n(Math.tan(gt(e[0]))),5:e=>n(Math.log(e[0].toNumber())),6:e=>Ke(e[0],Math.ceil(e[0].toNumber())),7:e=>Ke(e[0],Math.floor(e[0].toNumber())),8:e=>e.length>=2?Jn(e[0],e[1].toNumber()):Ke(e[0],Math.round(e[0].toNumber())),9:e=>Qn(e,false),10:e=>Qn(e,true),11:e=>n(Math.asin(e[0].toNumber())),12:e=>n(Math.acos(e[0].toNumber())),13:e=>n(Math.atan(e[0].toNumber())),14:e=>n(Math.atan2(e[0].toNumber(),e[1].toNumber())),15:e=>n(Math.sinh(e[0].toNumber())),16:e=>n(Math.cosh(e[0].toNumber())),17:e=>n(Math.tanh(e[0].toNumber())),18:e=>n(Math.asinh(e[0].toNumber())),19:e=>n(Math.acosh(e[0].toNumber())),20:e=>n(Math.atanh(e[0].toNumber())),21:e=>n(Math.cbrt(e[0].toNumber())),22:e=>n(Math.clz32(e[0].toNumber())),23:e=>n(Math.expm1(e[0].toNumber())),24:e=>n(Math.exp(e[0].toNumber())),25:e=>n(Math.fround(e[0].toNumber())),26:e=>n(Math.hypot(...e.map(t=>t.toNumber()))),27:e=>n(Math.imul(e[0].toNumber(),e[1].toNumber())),28:e=>n(Math.log10(e[0].toNumber())),29:e=>n(Math.log1p(e[0].toNumber())),30:e=>n(Math.log2(e[0].toNumber())),31:e=>e[0].type===7?e[1].type!==0?P$1("MATRIX_POWER_UNSUPPORTED",`pow: a matrix's exponent must be a whole number, as in "pow([1,2;3,4], 2)".`):$(e[0].value,e[1].value):e[1].type===7?P$1("MATRIX_POWER_UNSUPPORTED",'pow: a matrix may only be the base, as in "pow([1,2;3,4], 2)".'):n(st(e[0].toNumber(),e[1].toNumber())),32:()=>n(Math.random()),33:e=>n(Math.sign(e[0].toNumber())),34:e=>n(Math.trunc(e[0].toNumber())),35:e=>n(e[0].toNumber()*Math.PI/180),36:e=>n(e[0].toNumber()*180/Math.PI),37:e=>{let t=e[0].toNumber(),n$1=e[1].toNumber();return t>n$1?P$1("INVALID_RANGE",`roll: invalid range, ${t} is greater than ${n$1}`):n(Math.floor(Math.random()*(n$1-t+1))+t)},38:e=>{let t=Math.trunc(Math.abs(e[0].toNumber())),n$1=Math.trunc(Math.abs(e[1].toNumber())),r=er(t,n$1,"gcd");return r||n(tr(t,n$1))},39:e=>{let t=Math.trunc(Math.abs(e[0].toNumber())),n$1=Math.trunc(Math.abs(e[1].toNumber())),r=er(t,n$1,"lcm");return r||(t===0||n$1===0?n(0):n(t/tr(t,n$1)*n$1))},40:e=>{let t=Math.trunc(e[0].toNumber()),n$1=Math.trunc(e[1].toNumber());if(t<0||n$1<0||n$1>t)return P$1("INVALID_RANGE",`permutation: invalid n=${t}, r=${n$1} (require 0 <= r <= n)`);let r=1;for(let o=0;o<n$1;o++)if(r*=t-o,!Number.isFinite(r))return P$1("PERMUTATION_OVERFLOW",`permutation: P(${t}, ${n$1}) exceeds the maximum representable double (it passed it after ${o+1} of ${n$1} factors)`);return n(r)},41:e=>{let t=Math.trunc(e[0].toNumber()),n$1=Math.trunc(e[1].toNumber());if(t<0||n$1<0||n$1>t)return P$1("INVALID_RANGE",`combination: invalid n=${t}, r=${n$1} (require 0 <= r <= n)`);let r=Math.min(n$1,t-n$1),o=1;for(let i=0;i<r;i++)if(o=o*(t-i)/(i+1),!Number.isFinite(o))return P$1("COMBINATION_OVERFLOW",`combination: C(${t}, ${n$1}) exceeds the maximum representable double (it passed it after ${i+1} of ${r} steps)`);return n(Math.round(o))},42:e=>{if(e.length===0)return n(0);let t=Ae(e,"averaged");if(t instanceof m)return t;let n$1=t.magnitudes.reduce((r,o)=>r+o,0);return Ye(n$1/t.magnitudes.length,t.unit)},43:e=>{if(e.length===0)return n(0);let t=Ae(e,"ordered");if(t instanceof m)return t;let n$1=t.magnitudes.slice().sort((o,i)=>o-i),r=Math.floor(n$1.length/2);return Ye(n$1.length%2===0?(n$1[r-1]+n$1[r])/2:n$1[r],t.unit)},44:e=>{let t=Ae(e,"added");return t instanceof m?t:Ye(t.magnitudes.reduce((n,r)=>n+r,0),t.unit)},45:e=>n(e.length),46:e=>{let[t,n$1,r]=e,{lv:o,rv:i}=me(t,n$1);if(o===0)return P$1("PROPORTION_DIVIDE_BY_ZERO",`Cannot compute proportion: "${t.value}" is zero`);let a=r.toNumber()*(i/o);return r.type===6?u(a,r.unit):n(a)},47:e=>{let t=e[0].toNumber(),n$1=e[1].toNumber(),r=e[2].toNumber();return n$1>r?P$1("INVALID_RANGE",`clamp: invalid range, ${n$1} is greater than ${r}`):n(Math.min(Math.max(t,n$1),r))},48:e=>r$1(e[0].toNumber()),49:e=>r$1(e[0].toNumber(),"bin"),50:e=>n(Math.trunc(e[0].toNumber())),51:e=>{let t=e[0].toNumber(),n$1=e[1].toNumber(),r=H(e[2]);if(typeof r!="number")return r;if(1+n$1<=0)return P$1("INVALID_RATE",`compoundInterest: rate ${n$1} makes (1 + rate) non-positive`);let o=t*Math.pow(1+n$1,r);return e[0].type===6?u(o,e[0].unit):n(o)},52:e=>{let t=e[0].toNumber(),n$1=e[1].toNumber(),r=H(e[2]);if(typeof r!="number")return r;if(1+n$1<=0)return P$1("INVALID_RATE",`interestEarned: rate ${n$1} makes (1 + rate) non-positive`);let o=t*(Math.pow(1+n$1,r)-1);return e[0].type===6?u(o,e[0].unit):n(o)},53:e=>{let t=e[0].toNumber(),n$1=e[1].toNumber(),r=H(e[2]);return typeof r!="number"?r:t<=0||n$1<=0?P$1("INVALID_RANGE","compoundInterestRate: principal and futureValue must both be positive"):r<=0?P$1("INVALID_RANGE","compoundInterestRate: years must be greater than 0"):n(Math.pow(n$1/t,1/r)-1)},54:e=>{let t=e[0].toNumber(),n$1=e[1].toNumber(),r=e[2].toNumber();return t<=0||n$1<=0?P$1("INVALID_RANGE","compoundInterestYears: principal and futureValue must both be positive"):1+r<=0||r===0?P$1("INVALID_RATE",`compoundInterestYears: rate ${r} is not usable (must be > -1 and not 0)`):n(Math.log(n$1/t)/Math.log(1+r))},55:e=>{let t=e[0].toNumber(),n$1=e[1].toNumber(),r=H(e[2]);if(typeof r!="number")return r;let o=e[3].toNumber();if(t<=0)return P$1("INVALID_RANGE","loanRepayment: principal must be positive");if(r<=0)return P$1("INVALID_RANGE","loanRepayment: years must be positive");if(n$1<0)return P$1("INVALID_RATE","loanRepayment: rate must not be negative");if(o<0)return P$1("INVALID_RANGE","loanRepayment: periodsPerYear must not be negative");let{totalRepayment:i}=At(t,n$1,r),a=o===0?i:i/(r*o);return e[0].type===6?u(a,e[0].unit):n(a)},56:e=>{let t=e[0].toNumber(),n$1=e[1].toNumber(),r=H(e[2]);if(typeof r!="number")return r;let o=e[3].toNumber();if(t<=0)return P$1("INVALID_RANGE","loanInterest: principal must be positive");if(r<=0)return P$1("INVALID_RANGE","loanInterest: years must be positive");if(n$1<0)return P$1("INVALID_RATE","loanInterest: rate must not be negative");if(o<0)return P$1("INVALID_RANGE","loanInterest: periodsPerYear must not be negative");let{totalInterest:i}=At(t,n$1,r),a=o===0?i:i/(r*o);return e[0].type===6?u(a,e[0].unit):n(a)},57:e=>{let t=e[0].toNumber(),n$1=e[1].toNumber(),r=H(e[2]);if(typeof r!="number")return r;if(t<=0)return P$1("INVALID_RANGE","monthlyPayment: principal must be positive");if(r<=0)return P$1("INVALID_RANGE","monthlyPayment: years must be positive");if(n$1<0)return P$1("INVALID_RATE","monthlyPayment: rate must not be negative");let{monthlyPayment:o}=At(t,n$1,r);return e[0].type===6?u(o,e[0].unit):n(o)},58:e=>{let t=e[0].toNumber(),n$1=e[1].toNumber();return e[0].type===6?Dn(e[0],e[0].unit,n$1,1):n(t*(1+n$1))},59:e=>{let t=e[0].toNumber(),n$1=e[1].toNumber();return 1+n$1<=0?P$1("INVALID_RATE",`taxRemove: rate ${n$1} makes (1 + rate) non-positive`):e[0].type===6?Ln(e[0],e[0].unit,n$1)??u(t/(1+n$1),e[0].unit):n(t/(1+n$1))},60:e=>{let t=e[0].toNumber(),n$1=e[1].toNumber(),r=e[2].toNumber(),o=ht(n$1,r);if(o===void 0)return P$1("INFLATION_YEAR_OUT_OF_RANGE",`inflationAdjust: fromYear ${n$1} or toYear ${r} is outside the bundled CPI table's range (${Wn}-${zn})`);let i=t*o;return e[0].type===6?u(i,e[0].unit):n(i)},61:e=>{let t=e[0].toNumber(),n$1=e[1].toNumber();return n(st(n$1,1/t))},62:e=>{let t=e[0].toNumber();if(!Number.isInteger(t)||t<0)return P$1("INVALID_FACTORIAL_INPUT",`fact: ${t} is not a non-negative integer`);if(t>170)return P$1("FACTORIAL_OVERFLOW",`fact: ${t}! exceeds the maximum representable double (170! is the largest finite factorial)`);let n$1=1;for(let r=2;r<=t;r++)n$1*=r;return n(n$1)},63:e=>e[0].type===7?ba(e[0].value):e[0],64:e=>e[0].type===7?ca$1(e[0].value):n(e[0].toNumber()),65:e=>e[0].type===7?da$1(e[0].value):n(1/e[0].toNumber()),66:e=>{let[t,n$1]=e;if(t.type===0&&n$1.type===0)return n(t.toNumber()*n$1.toNumber());let r=o=>o.type===7?o.value:{rows:1,cols:1,data:[o.toNumber()],hasSymbolic:false};return _$1(r(t),r(n$1))},67:e=>{let[t]=e;return t.type!==9?t:V(F(t.value))},68:e=>{let[t]=e;return t.type!==9?t:V(fn(t.value))},69:e=>{let[t,n,r]=e;return r?.type!==3?P$1("SOLVE_REQUIRES_VARIABLE_NAME","solve's second argument must be the name of the unknown."):Mn(t,n,r.value)},70:e=>{let[t,n,r]=e,o=Rt(n,"der");if(typeof o!="string")return o;let i=T(t);return i===null?P$1("SYMBOLIC_NONFINITE_OPERAND","der needs an expression with an exact value."):V(Ie(i,o,r?.toNumber()??1))},71:e=>{let[t,n]=e,r=Rt(n,"integral");if(typeof r!="string")return r;let o=T(t);if(o===null)return P$1("SYMBOLIC_NONFINITE_OPERAND","integral needs an expression with an exact value.");let i=Ee(o,r);return i.ok?V(i.value):P$1("SYMBOLIC_INTEGRAL_UNSUPPORTED",`Cannot integrate this: ${i.reason}.`)},72:e=>{let[t,n,r,o]=e,i=Rt(n,"taylor");if(typeof i!="string")return i;let a=T(t),u=T(r);return a===null||u===null||u.kind!=="const"?P$1("SYMBOLIC_NONFINITE_OPERAND","taylor needs an expression and an exact expansion point."):V(Gn(a,i,u.value,o.toNumber()))},73:e=>{let t=[];for(let a of e){let u=T(a);if(u===null)return P$1("SYMBOLIC_NONFINITE_OPERAND","jacobian needs expressions with exact values.");t.push(u);}let n=new Set;for(let a of t)for(let u of u$1(a))n.add(u);let r=[...n].sort();if(r.length===0)return P$1("SYMBOLIC_JACOBIAN_NO_VARIABLES","jacobian needs at least one unknown to differentiate against.");let o=jn(t,r),i=[];for(let a of o)for(let u of a)i.push(W(u));return C$1(o.length,r.length,Y(o.length,r.length,i))},74:e=>V(w(o(a$1,d(e[0].toNumber())))),75:e=>Nt("conj",e[0]),76:e=>Nt("re",e[0]),77:e=>Nt("im",e[0]),78:e=>{let t=e[0];return t.type!==9?t:V(J$1(t.value))},79:e=>{let t=e[0];return t.type!==9?t:V(Bn(t.value))},85:e=>{let t=e[0].toNumber(),n$1=e[1].toNumber();if(1+n$1<=0)return P$1("INVALID_RATE",`taxIn: rate ${n$1} makes (1 + rate) non-positive`);let r=t-t/(1+n$1);return e[0].type===6?Fn(e[0],e[0].unit,n$1)??u(r,e[0].unit):n(r)},86:e=>{let t=e[0].toNumber(),n$1=e[1].toNumber();return e[0].type===6?Cn(e[0],n$1,e[0].unit):n(t*n$1)},87:e=>n(Math.sin(e[0].toNumber()*Math.PI/180)),88:e=>n(Math.cos(e[0].toNumber()*Math.PI/180)),89:e=>n(Math.tan(e[0].toNumber()*Math.PI/180)),90:e=>n(Math.asin(e[0].toNumber())*180/Math.PI),91:e=>n(Math.acos(e[0].toNumber())*180/Math.PI),92:e=>n(Math.atan(e[0].toNumber())*180/Math.PI),93:e=>u(e[0].toNumber(),"days"),94:e=>{let t$1=typeof e[1]?.value=="string"?e[1].value:void 0,n=typeof e[2]?.value=="string"?e[2].value:void 0;if(t$1===void 0||n===void 0)return P$1("UNKNOWN_UNIT",'both units have to be named, as in "12.5 minutes in minutes and seconds"');let r=a[t$1.toLowerCase()],o=a[n.toLowerCase()];if(r===void 0||o===void 0)return P$1("UNKNOWN_UNIT",`${t$1} and ${n}: one of these is not a unit`);if(r[0]!==o[0])return P$1("INCOMPATIBLE_UNITS",`${t$1} and ${n} measure different things`);if(o[1]>=r[1])return P$1("INCOMPATIBLE_UNITS",`${t$1} and ${n}: name the larger unit first`);let i=e[0],a$1=i.type===6&&i.unit!==void 0?a[i.unit.toLowerCase()]:void 0,u=i.toNumber()*(a$1?.[1]??r[1]),s=Math.floor(u/r[1]),l=Math.round((u-s*r[1])/o[1]*1e3)/1e3;return t(`${s} ${t$1} ${l} ${n}`)},95:e=>{let t=e[0],n=String(e[1].value),r=t.type===6&&t.unit!==void 0?t.unit:"";return r.includes("/")?P$1("INVALID_RATE_UNIT",`${r}/${n}: that is already a rate`):u(t.toNumber(),`${r}/${n}`)},96:e=>{let t=e[0],n$1=e[1];if(n$1.type===6&&t.type===6&&i$1(n$1.unit)){let l=j$1(t.toNumber(),t.unit,n$1.toNumber(),n$1.unit);if(l!==null)return Go(l)}if(n$1.type!==6||n$1.unit===void 0||!n$1.unit.includes("/"))return P$1("INVALID_RATE",'at: the right-hand side has to be a rate, as in "$30/hour"');let r=n$1.unit.indexOf("/"),o=n$1.unit.slice(0,r),i=n$1.unit.slice(r+1),a$1=t.type===6?t.unit:void 0,u$1=a[i.toLowerCase()],s=a$1===void 0?void 0:a[a$1.toLowerCase()];if(s!==void 0&&u$1!==void 0&&s[0]===u$1[0]){let c=t.toNumber()*s[1]/u$1[1]*n$1.toNumber();return o===""?n(c):u(c,o)}if(a$1!==void 0&&a$1===o){let l=t.toNumber()/n$1.toNumber();return u(l,Xo(i,l))}if(a$1===void 0){let l=t.toNumber()*n$1.toNumber();return o===""?n(l):u(l,o)}return P$1("INCOMPATIBLE_UNITS",`at: ${a$1} matches neither side of ${n$1.unit}`)},80:e=>{let t=e[0].toNumber(),n$1=e[1].toNumber(),r=H(e[2]);if(typeof r!="number")return r;let o=e[3].toNumber();if(o<=0)return P$1("INVALID_RATE",`compounding: ${o} periods per year is not a period`);if(1+n$1/o<=0)return P$1("INVALID_RATE",`compounding: rate ${n$1} makes each period non-positive`);let i=t*Math.pow(1+n$1/o,o*r);return e[0].type===6?u(i,e[0].unit):n(i)},81:e=>{let t=e[0].toNumber(),n$1=e[1].toNumber(),r=H(e[2]);if(typeof r!="number")return r;let o=e[3].toNumber();if(o<=0||1+n$1/o<=0)return P$1("INVALID_RATE",`compounding: rate ${n$1} over ${o} periods per year is not usable`);let i=t*(Math.pow(1+n$1/o,o*r)-1);return e[0].type===6?u(i,e[0].unit):n(i)},82:e=>{let t=e[0].toNumber(),n$1=e[1].toNumber(),r=H(e[2]);if(typeof r!="number")return r;if(1+n$1<=0)return P$1("INVALID_RATE",`presentValue: rate ${n$1} makes (1 + rate) non-positive`);let o=t/Math.pow(1+n$1,r);return e[0].type===6?u(o,e[0].unit):n(o)},83:e=>{let t=e[0].toNumber(),n$1=e[1].toNumber();return t===0?P$1("INVALID_RATE","roi: nothing was invested, so there is no return on it"):n((n$1-t)/t)},84:e=>{let t=e[0].toNumber(),n=e[1].toNumber(),r=H(e[2]);return typeof r!="number"?r:t<=0?P$1("INVALID_RATE","annual return: the amount invested must be positive"):r<=0?P$1("INVALID_RATE","annual return: the period must be longer than zero"):n<=0?P$1("INVALID_RATE","annual return: nothing was returned, so there is no annual rate"):N(Math.pow(n/t,1/r)-1)},97:e=>Jn(e[0],e[1].toNumber()),98:e=>{let t=e[1].toNumber();return !Number.isInteger(t)||t<1?P$1("INVALID_RANGE",`split: the number of shares must be a whole number of at least 1, not ${e[1].toNumber()}.`):H$1(Un(e[0],t))},99:e=>{let t=e[0].toNumber(),n$1=zo(e[1]),r=e[2].toNumber();if(n$1===null)return P$1("INVALID_RANGE",'savings goal: the duration must be in months or years, e.g. "in 2 years".');if(t<=0)return P$1("INVALID_RANGE","savings goal: the target must be positive.");if(n$1<=0)return P$1("INVALID_RANGE","savings goal: the duration must be positive.");if(r<0)return P$1("INVALID_RATE","savings goal: the rate must not be negative.");let o=Qo(t,r/12,n$1);return e[0].type===6?u(o,e[0].unit):n(o)},100:e=>{let t=e[0].toNumber(),n=e[1].toNumber(),r=e[2].toNumber(),o=e[3].toNumber(),i=typeof e[4]?.value=="string"?e[4].value:"periods";if(t<=0)return P$1("INVALID_RANGE","savings goal: the target must be positive.");if(n<=0)return P$1("INVALID_RANGE","savings goal: the contribution must be positive.");if(o<0)return P$1("INVALID_RATE","savings goal: the rate must not be negative.");let a=Jo(t,n,o/r);return u(a,i)},101:e=>n(Math.sqrt(je(e.map(t=>t.toNumber()),false))),102:e=>n(Math.sqrt(je(e.map(t=>t.toNumber()),true))),103:e=>n(je(e.map(t=>t.toNumber()),false)),104:e=>n(je(e.map(t=>t.toNumber()),true)),105:e=>{if(e.length===0)return n(0);let t=Ae(e,"compared");if(t instanceof m)return t;let n$1=t.magnitudes;return Ye(Math.max(...n$1)-Math.min(...n$1),t.unit)},106:e=>{if(e.length===0)return n(0);let t=new Map,n$1=e[0].toNumber(),r=0;for(let o of e){let i=o.toNumber(),a=(t.get(i)??0)+1;t.set(i,a),a>r&&(r=a,n$1=i);}return n(n$1)},107:e=>{let t=0,n$1=0;for(let r=0;r+1<e.length;r+=2){let o=e[r].toNumber(),i=e[r+1].toNumber();t+=o*i,n$1+=i;}return n$1===0?P$1("WEIGHTED_AVERAGE_ZERO_WEIGHT","weighted average: the weights sum to zero, so there is nothing to divide by"):n(t/n$1)}};function zo(e){if(e.type!==6)return null;let t=e.unit;return t==="months"||t==="month"?e.toNumber():t==="years"||t==="year"?e.toNumber()*12:null}function Qo(e,t,n){return t===0?e/n:e*t/(Math.pow(1+t,n)-1)}function Jo(e,t,n){let r=n===0?e/t:Math.log(1+e*n/t)/Math.log(1+n);return Math.ceil(r-1e-9)}function Nt(e,t){let n=T(t);return n===null?P$1("SYMBOLIC_NONFINITE_OPERAND",e+" needs a value with an exact number."):V(s(e,[n]))}function Rt(e,t){return e?.type!==3?P$1("SYMBOLIC_REQUIRES_VARIABLE_NAME",`${t} needs the name of an unknown.`):e.value}function At(e,t,n){let r=n*12,o=t/12,i=o===0?e/r:e*o/(1-Math.pow(1+o,-r)),a=i*r,u=a-e;return {monthlyPayment:i,totalRepayment:a,totalInterest:u}}var Au=Zn.pluginFunctions,nr=65535,rr=0;function ei(){if(rr>nr)throw c.config("PLUGIN_FUNCTION_INDEX_POOL_EXHAUSTED",`allocatePluginFunctionIndex: pool exhausted (max ${nr+1} allocations).`);return rr++}var or=new Map;function xu(e){let t=or.get(e);return t===void 0&&(t=ei(),or.set(e,t)),t}var xt=new Map;function Su(e,t){let n=e.toLowerCase(),r=xt.get(n);r&&r!==t&&console.warn(`[asConverterRegistry] Converter name "${n}" is already registered \u2014 overwriting.`),xt.set(n,t);}function vu(e){xt.delete(e.toLowerCase());}var Xe=class Xe{constructor(){this.values=new Map;this.listeners=new Set;this.notifyDepth=0;}get(t){return this.values.get(t)}has(t){return this.values.has(t)}set(t,n){let r=this.values.get(t);this.values.set(t,n),!(r!==void 0&&ti(r,n))&&this.notify(t,n);}notify(t,n){if(!(this.notifyDepth>=Xe.MAX_NOTIFY_DEPTH)){this.notifyDepth++;try{for(let r of this.listeners)r(t,n);}finally{this.notifyDepth--;}}}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t);}}clear(){this.values.clear(),this.listeners.clear(),this.notifyDepth=0;}};Xe.MAX_NOTIFY_DEPTH=64;var St=Xe;function ti(e,t){if(e.type!==t.type||e.unit!==t.unit||(e.timedOut??false)!==(t.timedOut??false))return false;let n=e.value,r=t.value;if(Array.isArray(n)||Array.isArray(r)){if(!Array.isArray(n)||!Array.isArray(r)||n.length!==r.length)return false;for(let o=0;o<n.length;o++)if(!Object.is(n[o],r[o]))return false;return true}return Object.is(n,r)}var Iu=new St;function Eu(e){return `global:${e}`}var ni={sydney:"Australia/Sydney",melbourne:"Australia/Melbourne",brisbane:"Australia/Brisbane",perth:"Australia/Perth",adelaide:"Australia/Adelaide",canberra:"Australia/Sydney",auckland:"Pacific/Auckland",wellington:"Pacific/Auckland",fiji:"Pacific/Fiji",chicago:"America/Chicago",seattle:"America/Los_Angeles",denver:"America/Denver",phoenix:"America/Phoenix",toronto:"America/Toronto",montreal:"America/Toronto",vancouver:"America/Vancouver",ottawa:"America/Toronto",honolulu:"Pacific/Honolulu",anchorage:"America/Anchorage",miami:"America/New_York",boston:"America/New_York",atlanta:"America/New_York",dallas:"America/Chicago",houston:"America/Chicago",lima:"America/Lima",bogota:"America/Bogota",caracas:"America/Caracas",santiago:"America/Santiago",montevideo:"America/Montevideo",quito:"America/Guayaquil",london:"Europe/London",paris:"Europe/Paris",berlin:"Europe/Berlin",madrid:"Europe/Madrid",rome:"Europe/Rome",amsterdam:"Europe/Amsterdam",dublin:"Europe/Dublin",lisbon:"Europe/Lisbon",vienna:"Europe/Vienna",zurich:"Europe/Zurich",geneva:"Europe/Zurich",moscow:"Europe/Moscow",istanbul:"Europe/Istanbul",athens:"Europe/Athens",stockholm:"Europe/Stockholm",oslo:"Europe/Oslo",helsinki:"Europe/Helsinki",warsaw:"Europe/Warsaw",prague:"Europe/Prague",budapest:"Europe/Budapest",brussels:"Europe/Brussels",copenhagen:"Europe/Copenhagen",reykjavik:"Atlantic/Reykjavik",kiev:"Europe/Kyiv",kyiv:"Europe/Kyiv",tokyo:"Asia/Tokyo",osaka:"Asia/Tokyo",beijing:"Asia/Shanghai",shanghai:"Asia/Shanghai",seoul:"Asia/Seoul",singapore:"Asia/Singapore",bangkok:"Asia/Bangkok",jakarta:"Asia/Jakarta",manila:"Asia/Manila",mumbai:"Asia/Kolkata",delhi:"Asia/Kolkata",bangalore:"Asia/Kolkata",dubai:"Asia/Dubai",abudhabi:"Asia/Dubai",karachi:"Asia/Karachi",dhaka:"Asia/Dhaka",hanoi:"Asia/Ho_Chi_Minh",taipei:"Asia/Taipei",islamabad:"Asia/Karachi",riyadh:"Asia/Riyadh",telaviv:"Asia/Jerusalem",jerusalem:"Asia/Jerusalem",cairo:"Africa/Cairo",lagos:"Africa/Lagos",nairobi:"Africa/Nairobi",johannesburg:"Africa/Johannesburg",casablanca:"Africa/Casablanca",accra:"Africa/Accra",tunis:"Africa/Tunis",addisababa:"Africa/Addis_Ababa",france:"Europe/Paris",germany:"Europe/Berlin",spain:"Europe/Madrid",italy:"Europe/Rome",japan:"Asia/Tokyo",china:"Asia/Shanghai",india:"Asia/Kolkata",brazil:"America/Sao_Paulo",russia:"Europe/Moscow",australia:"Australia/Sydney",canada:"America/Toronto",mexico:"America/Mexico_City",uk:"Europe/London",usa:"America/New_York",ireland:"Europe/Dublin",netherlands:"Europe/Amsterdam",sweden:"Europe/Stockholm",norway:"Europe/Oslo",poland:"Europe/Warsaw",turkey:"Europe/Istanbul",egypt:"Africa/Cairo",nigeria:"Africa/Lagos"},ri={"new york":"America/New_York","los angeles":"America/Los_Angeles","san francisco":"America/Los_Angeles","las vegas":"America/Los_Angeles","mexico city":"America/Mexico_City","hong kong":"Asia/Hong_Kong","kuala lumpur":"Asia/Kuala_Lumpur","sao paulo":"America/Sao_Paulo","buenos aires":"America/Argentina/Buenos_Aires","rio de janeiro":"America/Sao_Paulo","cape town":"Africa/Johannesburg","new delhi":"Asia/Kolkata","united kingdom":"Europe/London","united states":"America/New_York","south africa":"Africa/Johannesburg"},oi={pst:"America/Los_Angeles",pdt:"America/Los_Angeles",est:"America/New_York",edt:"America/New_York",cst:"America/Chicago",cdt:"America/Chicago",mst:"America/Denver",mdt:"America/Denver",hst:"Pacific/Honolulu",bst:"Europe/London",cet:"Europe/Paris",cest:"Europe/Paris",jst:"Asia/Tokyo",ist:"Asia/Kolkata",aest:"Australia/Sydney",aedt:"Australia/Sydney"},ii={...ni,...ri,...oi};function wu(e){let t=e.trim().toLowerCase();return t==="utc"||t==="gmt"?"UTC":ii[t]??null}export{Yo as A,Zn as B,Wn as C,zn as D,Qa as E,Ru as F,Au as G,ei as H,xu as I,xt as J,Su as K,vu as L,Iu as M,Eu as N,ri as O,ii as P,wu as Q,tn as a,en as b,ve as c,Cn as d,Dn as e,xn as f,qi as g,Yi as h,Ki as i,Gi as j,Mn as k,me as l,Ae as m,na as n,ra as o,oa as p,En as q,ia as r,aa as s,st as t,ua as u,sa as v,la as w,ca as x,Se as y,da as z};//# sourceMappingURL=chunk-KL2F3YIQ.js.map
2
- //# sourceMappingURL=chunk-KL2F3YIQ.js.map