subscript 10.1.7 → 10.1.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.
@@ -14,25 +14,31 @@ binary('=>', ASSIGN, true);
14
14
 
15
15
  // Compile
16
16
  operator('=>', (a, b) => {
17
+ // Normalize params: () → [], x → [x], (a, b) → [a, b]
17
18
  a = a?.[0] === '()' ? a[1] : a;
18
- a = !a ? [] : a[0] === ',' ? a.slice(1) : [a];
19
+ const ps = !a ? [] : a[0] === ',' ? a.slice(1) : [a];
20
+ // Check for rest param
19
21
  let restIdx = -1, restName = null;
20
- if (a.length && Array.isArray(a[a.length - 1]) && a[a.length - 1][0] === '...') {
21
- restIdx = a.length - 1;
22
- restName = a[restIdx][1];
23
- a = a.slice(0, -1);
22
+ const last = ps[ps.length - 1];
23
+ if (Array.isArray(last) && last[0] === '...') {
24
+ restIdx = ps.length - 1;
25
+ restName = last[1];
26
+ ps.length--;
24
27
  }
25
28
  // Arrow body: {} is always block (need parens for object: ({...}))
26
29
  // Block body returns undefined unless explicit return
27
30
  const isBlock = b?.[0] === '{}';
28
31
  b = compile(isBlock ? ['{', b[1]] : b);
29
- return (ctx = null) => {
30
- ctx = Object.create(ctx);
31
- return (...args) => {
32
- a.forEach((p, i) => ctx[p] = args[i]);
33
- if (restName) ctx[restName] = args.slice(restIdx);
34
- try { const r = b(ctx); return isBlock ? undefined : r; }
35
- catch (e) { if (e === RETURN) return e[0]; throw e; }
36
- };
32
+ return ctx => (...args) => {
33
+ const l = {};
34
+ ps.forEach((p, i) => l[p] = args[i]);
35
+ if (restName) l[restName] = args.slice(restIdx);
36
+ const fnCtx = new Proxy(l, {
37
+ get: (l, k) => k in l ? l[k] : ctx?.[k],
38
+ set: (l, k, v) => ((k in l ? l : ctx)[k] = v, true),
39
+ has: (l, k) => k in l || (ctx ? k in ctx : false)
40
+ });
41
+ try { const r = b(fnCtx); return isBlock ? undefined : r; }
42
+ catch (e) { if (e === RETURN) return e[0]; throw e; }
37
43
  };
38
44
  });
package/jessie.min.js CHANGED
@@ -1,8 +1,8 @@
1
- var u,m,c=r=>(u=0,m=r,c.newline=!1,r=h(),m[u]?I():r||""),I=(r="Unexpected token",e=u,t=m.slice(0,e).split(`
2
- `),n=t.pop(),o=m.slice(Math.max(0,e-40),e),s="\u032D",l=(m[e]||" ")+s,f=m.slice(e+1,e+20))=>{throw SyntaxError(`${r} at ${t.length+1}:${n.length+1}
1
+ var l,m,c=r=>(l=0,m=r,c.newline=!1,r=h(),m[l]?R():r||""),R=(r="Unexpected token",e=l,t=m.slice(0,e).split(`
2
+ `),n=t.pop(),o=m.slice(Math.max(0,e-40),e),p="\u032D",f=(m[e]||" ")+p,u=m.slice(e+1,e+20))=>{throw SyntaxError(`${r} at ${t.length+1}:${n.length+1}
3
3
  ${m[e-41]!==`
4
- `,""+o}${l}${f}`)},q=(r,e=u)=>(Array.isArray(r)&&(r.loc=e),r),k=(r,e=u,t)=>{for(;t=r(m.charCodeAt(u));)u+=t;return m.slice(e,u)},y=(r=1)=>m[u+=r],v=r=>u=r,h=(r=0,e)=>{let t,n,o,s,l;for(e&&c.asi&&(c.newline=!1);(t=c.space())&&(l=c.newline,1)&&t!==e&&(o=((s=E[t])&&s(n,r))??(n&&l&&c.asi?.(n,r,h))??(!n&&k(c.id)));)n=o;return e&&(t==e?u++:I("Unclosed "+String.fromCharCode(e-(e>42?2:1)))),n},d=c.space=(r,e=u)=>{for(;(r=m.charCodeAt(u))<=32;)c.asi&&r===10&&(c.newline=!0),u++;return r},Or=(r=u)=>{for(;m.charCodeAt(r)<=32;)r++;return m.charCodeAt(r)},Tt=c.id=r=>r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122||r==36||r==95||r>=192&&r!=215&&r!=247,R=(r,e=r.length)=>m.substr(u,e)===r&&!c.id(m.charCodeAt(u+e)),O=()=>(y(),h(0,41)),E=[],H={},C=(r,e=32,t,n=r.charCodeAt(0),o=r.length,s=E[n],l=r.toUpperCase()!==r,f,a)=>(e=H[r]=!s&&H[r]||e,E[n]=(w,S,U,T=u)=>(f=U,(U?r==U:(o<2||r.charCodeAt(1)===m.charCodeAt(u+1)&&(o<3||m.substr(u,o)==r))&&(!l||!c.id(m.charCodeAt(u+o)))&&(f=U=r))&&S<e&&(u+=o,(a=t(w))?q(a,T):(u=T,f=0,!l&&!s&&I()),a)||s?.(w,S,f))),A=(r,e,t=!1)=>C(r,e,n=>n&&(o=>o&&[r,n,o])(h(e-(t?.5:0)))),N=(r,e,t)=>C(r,e,n=>t?n&&[r,n]:!n&&(n=h(e-.5))&&[r,n]),j=(r,e)=>C(r,200,t=>!t&&[,e]),lr=(r,e,t)=>C(r,e,(n,o)=>(o=h(e-(t?.5:0)),n?.[0]!==r&&(n=[r,n||null]),o?.[0]===r?n.push(...o.slice(1)):n.push(o||null),n)),W=(r,e)=>C(r[0],e,t=>!t&&[r,h(0,r.charCodeAt(1))||null]),ur=(r,e)=>C(r[0],e,t=>t&&[r,t,h(0,r.charCodeAt(1))||null]),fr={},p=(r,e,t=fr[r])=>fr[r]=(...n)=>e(...n)||t?.(...n),i=r=>Array.isArray(r)?r[0]==null?(e=>()=>e)(r[1]):fr[r[0]]?.(...r.slice(1))??I(`Unknown operator: ${r[0]}`,r?.loc):r===void 0?()=>{}:e=>e?.[r];var b=46,z=48,rr=57,me=69,de=101,he=43,Ae=45,x=95,ae=110,ye=97,ge=102,we=65,Ee=70,_r=r=>r.indexOf("_")<0?r:r.replaceAll("_",""),cr=r=>{let e=_r(k(t=>t===b&&m.charCodeAt(u+1)!==b||t>=z&&t<=rr||t===x||((t===me||t===de)&&((t=m.charCodeAt(u+1))>=z&&t<=rr||t===he||t===Ae)?2:0)));return m.charCodeAt(u)===ae?(y(),[,BigInt(e)]):(r=+e)!=r?I():[,r]},Ce={2:r=>r===48||r===49||r===x,8:r=>r>=48&&r<=55||r===x,16:r=>r>=z&&r<=rr||r>=ye&&r<=ge||r>=we&&r<=Ee||r===x};c.number=null;E[b]=r=>!r&&m.charCodeAt(u+1)!==b&&cr();for(let r=z;r<=rr;r++)E[r]=e=>e?void 0:cr();E[z]=r=>{if(r)return;let e=c.number;if(e){for(let[t,n]of Object.entries(e))if(t[0]==="0"&&m[u+1]?.toLowerCase()===t[1])return y(2),[,parseInt(_r(k(Ce[n])),n)]}return cr()};var Se=92,vr=34,Pr=39,ke={n:`
5
- `,r:"\r",t:" ",b:"\b",f:"\f",v:"\v"},Mr=r=>(e,t,n="")=>{if(!(e||!c.string?.[String.fromCharCode(r)]))return y(),k(o=>o-r&&(o===Se?(n+=ke[m[u+1]]||m[u+1],2):(n+=m[u],1))),m[u]===String.fromCharCode(r)?y():I("Bad string"),[,n]};E[vr]=Mr(vr);E[Pr]=Mr(Pr);c.string={'"':!0};var Te=20;"= += -= *= /= %= |= &= ^= >>= <<=".split(" ").map(r=>A(r,Te,!0));var Lr=(r,e,t,n)=>typeof r=="string"?o=>e(o,r,o):r[0]==="."?(t=i(r[1]),n=r[2],o=>e(t(o),n,o)):r[0]==="[]"&&r.length===3?(t=i(r[1]),n=i(r[2]),o=>e(t(o),n(o),o)):r[0]==="()"&&r.length===2?Lr(r[1],e):(()=>{throw Error("Invalid assignment target")})(),Ur={"=":(r,e,t)=>r[e]=t,"+=":(r,e,t)=>r[e]+=t,"-=":(r,e,t)=>r[e]-=t,"*=":(r,e,t)=>r[e]*=t,"/=":(r,e,t)=>r[e]/=t,"%=":(r,e,t)=>r[e]%=t,"|=":(r,e,t)=>r[e]|=t,"&=":(r,e,t)=>r[e]&=t,"^=":(r,e,t)=>r[e]^=t,">>=":(r,e,t)=>r[e]>>=t,"<<=":(r,e,t)=>r[e]<<=t};for(let r in Ur)p(r,(e,t)=>(t=i(t),Lr(e,(n,o,s)=>Ur[r](n,o,t(s)))));var Ie=30,Re=40,Fr=140;A("!",Fr);N("!",Fr);A("||",Ie);A("&&",Re);p("!",r=>(r=i(r),e=>!r(e)));p("||",(r,e)=>(r=i(r),e=i(e),t=>r(t)||e(t)));p("&&",(r,e)=>(r=i(r),e=i(e),t=>r(t)&&e(t)));var Ne=50,Oe=60,_e=70,Br=100,ve=140;A("|",Ne);A("&",_e);A("^",Oe);A(">>",Br);A("<<",Br);N("~",ve);p("~",r=>(r=i(r),e=>~r(e)));p("|",(r,e)=>(r=i(r),e=i(e),t=>r(t)|e(t)));p("&",(r,e)=>(r=i(r),e=i(e),t=>r(t)&e(t)));p("^",(r,e)=>(r=i(r),e=i(e),t=>r(t)^e(t)));p(">>",(r,e)=>(r=i(r),e=i(e),t=>r(t)>>e(t)));p("<<",(r,e)=>(r=i(r),e=i(e),t=>r(t)<<e(t)));var er=90;A("<",er);A(">",er);A("<=",er);A(">=",er);p(">",(r,e)=>(r=i(r),e=i(e),t=>r(t)>e(t)));p("<",(r,e)=>(r=i(r),e=i(e),t=>r(t)<e(t)));p(">=",(r,e)=>(r=i(r),e=i(e),t=>r(t)>=e(t)));p("<=",(r,e)=>(r=i(r),e=i(e),t=>r(t)<=e(t)));var Gr=80;A("==",Gr);A("!=",Gr);p("==",(r,e)=>(r=i(r),e=i(e),t=>r(t)==e(t)));p("!=",(r,e)=>(r=i(r),e=i(e),t=>r(t)!=e(t)));var Xr=110,mr=120,Dr=140;A("+",Xr);A("-",Xr);A("*",mr);A("/",mr);A("%",mr);N("+",Dr);N("-",Dr);p("+",(r,e)=>e!==void 0?(r=i(r),e=i(e),t=>r(t)+e(t)):(r=i(r),t=>+r(t)));p("-",(r,e)=>e!==void 0?(r=i(r),e=i(e),t=>r(t)-e(t)):(r=i(r),t=>-r(t)));p("*",(r,e)=>(r=i(r),e=i(e),t=>r(t)*e(t)));p("/",(r,e)=>(r=i(r),e=i(e),t=>r(t)/e(t)));p("%",(r,e)=>(r=i(r),e=i(e),t=>r(t)%e(t)));var tr=150;C("++",tr,r=>r?["++",r,null]:["++",h(tr-1)]);C("--",tr,r=>r?["--",r,null]:["--",h(tr-1)]);var dr=(r,e,t,n)=>typeof r=="string"?o=>e(o,r):r[0]==="."?(t=i(r[1]),n=r[2],o=>e(t(o),n)):r[0]==="[]"&&r.length===3?(t=i(r[1]),n=i(r[2]),o=>e(t(o),n(o))):r[0]==="()"&&r.length===2?dr(r[1],e):(()=>{throw Error("Invalid increment target")})();p("++",(r,e)=>dr(r,e===null?(t,n)=>t[n]++:(t,n)=>++t[n]));p("--",(r,e)=>dr(r,e===null?(t,n)=>t[n]--:(t,n)=>--t[n]));var Pe=5,Me=10,Ue=170;W("()",Ue);lr(",",Me);lr(";",Pe,!0);var Kr=(...r)=>(r=r.map(i),e=>{let t;for(let n of r)t=n(e);return t});p(",",Kr);p(";",Kr);var G=r=>r?.[0]==="_"&&r[1]==="_"||r==="constructor"||r==="prototype",hr=170;ur("[]",hr);A(".",hr);ur("()",hr);var nr=r=>{throw Error(r)};p("[]",(r,e)=>e===void 0?(r=r?r[0]===","?r.slice(1):[r]:[],r=r.map(t=>t==null?(()=>{}):t[0]==="..."?(t=i(t[1]),n=>t(n)):(t=i(t),n=>[t(n)])),t=>r.flatMap(n=>n(t))):(e==null&&nr("Missing index"),r=i(r),e=i(e),t=>{let n=e(t);return G(n)?void 0:r(t)[n]}));p(".",(r,e)=>(r=i(r),e=e[0]?e:e[1],G(e)?()=>{}:t=>r(t)[e]));p("()",(r,e)=>{if(e===void 0)return r==null?nr("Empty ()"):i(r);let t=o=>o?.[0]===","&&o.slice(1).some(s=>s==null||t(s));t(e)&&nr("Empty argument");let n=e?e[0]===","?(e=e.slice(1).map(i),o=>e.map(s=>s(o))):(e=i(e),o=>[e(o)]):()=>[];return Ar(r,(o,s,l)=>o[s](...n(l)))});var L=r=>typeof r=="string"||Array.isArray(r)&&(r[0]==="."||r[0]==="?."||r[0]==="[]"&&r.length===3||r[0]==="?.[]"||r[0]==="()"&&r.length===2&&L(r[1])||r[0]==="{}"),Ar=(r,e,t,n)=>r==null?nr("Empty ()"):r[0]==="()"&&r.length==2?Ar(r[1],e):typeof r=="string"?o=>e(o,r,o):r[0]==="."?(t=i(r[1]),n=r[2],o=>e(t(o),n,o)):r[0]==="?."?(t=i(r[1]),n=r[2],o=>{let s=t(o);return s==null?void 0:e(s,n,o)}):r[0]==="[]"&&r.length===3?(t=i(r[1]),n=i(r[2]),o=>e(t(o),n(o),o)):r[0]==="?.[]"?(t=i(r[1]),n=i(r[2]),o=>{let s=t(o);return s==null?void 0:e(s,n(o),o)}):(r=i(r),o=>e([r(o)],0,o)),X=Ar;var Qr=new WeakMap,Le=(r,...e)=>typeof r=="string"?i(c(r)):Qr.get(r)||Qr.set(r,Fe(r,e)).get(r),$r=57344,Fe=(r,e)=>{let t=r.reduce((s,l,f)=>s+(f?String.fromCharCode($r+f-1):"")+l,""),n=c(t),o=s=>{if(typeof s=="string"&&s.length===1){let l=s.charCodeAt(0)-$r,f;if(l>=0&&l<e.length)return f=e[l],Be(f)?f:[,f]}return Array.isArray(s)?s.map(o):s};return i(o(n))},Be=r=>typeof r=="string"||Array.isArray(r)&&(typeof r[0]=="string"||r[0]===void 0),jr=Le;var Ge=32,Xe=c.space;c.comment??={"//":`
6
- `,"/*":"*/"};var ar;c.space=()=>{ar||(ar=Object.entries(c.comment).map(([o,s])=>[o,s,o.charCodeAt(0)]));for(var r;r=Xe();){for(var e=0,t;t=ar[e++];)if(r===t[2]&&m.substr(u,t[0].length)===t[0]){var n=u+t[0].length;if(t[1]===`
7
- `)for(;m.charCodeAt(n)>=Ge;)n++;else{for(;m[n]&&m.substr(n,t[1].length)!==t[1];)n++;m[n]&&(n+=t[1].length)}v(n),r=0;break}if(r)return r}return r};var Hr=80;A("===",Hr);A("!==",Hr);p("===",(r,e)=>(r=i(r),e=i(e),t=>r(t)===e(t)));p("!==",(r,e)=>(r=i(r),e=i(e),t=>r(t)!==e(t)));var De=30;A("??",De);p("??",(r,e)=>(r=i(r),e=i(e),t=>r(t)??e(t)));var Ke=130,Qe=20;A("**",Ke,!0);A("**=",Qe,!0);p("**",(r,e)=>(r=i(r),e=i(e),t=>r(t)**e(t)));var $e=r=>{throw Error(r)};p("**=",(r,e)=>(L(r)||$e("Invalid assignment target"),e=i(e),X(r,(t,n,o)=>t[n]**=e(o))));var Wr=90;A("in",Wr);A("of",Wr);p("in",(r,e)=>(r=i(r),e=i(e),t=>r(t)in e(t)));var je=20,He=100,We=r=>{throw Error(r)};A(">>>",He);A(">>>=",je,!0);p(">>>",(r,e)=>(r=i(r),e=i(e),t=>r(t)>>>e(t)));p(">>>=",(r,e)=>(L(r)||We("Invalid assignment target"),e=i(e),X(r,(t,n,o)=>t[n]>>>=e(o))));var ze=r=>r[0]?.[0]===","?r[0].slice(1):r,D=(r,e,t)=>{if(typeof r=="string"){t[r]=e;return}let[n,...o]=r,s=ze(o);if(n==="{}"){let l=[];for(let f of s){if(Array.isArray(f)&&f[0]==="..."){let T={};for(let _ in e)l.includes(_)||(T[_]=e[_]);t[f[1]]=T;break}let a,w,S;typeof f=="string"?a=w=f:f[0]==="="?(typeof f[1]=="string"?a=w=f[1]:[,a,w]=f[1],S=f[2]):[,a,w]=f,l.push(a);let U=e[a];U===void 0&&S&&(U=i(S)(t)),D(w,U,t)}}else if(n==="[]"){let l=0;for(let f of s){if(f===null){l++;continue}if(Array.isArray(f)&&f[0]==="..."){t[f[1]]=e.slice(l);break}let a=f,w;Array.isArray(f)&&f[0]==="="&&([,a,w]=f);let S=e[l++];S===void 0&&w&&(S=i(w)(t)),D(a,S,t)}}};var yr=20,or=r=>{throw Error(r)};A("||=",yr,!0);A("&&=",yr,!0);A("??=",yr,!0);p("=",(r,e)=>{if(Array.isArray(r)&&(r[0]==="let"||r[0]==="const"||r[0]==="var")){let t=r[1];return e=i(e),typeof t=="string"?n=>{n[t]=e(n)}:n=>D(t,e(n),n)}return L(r)||or("Invalid assignment target"),e=i(e),X(r,(t,n,o)=>t[n]=e(o))});p("||=",(r,e)=>(L(r)||or("Invalid assignment target"),e=i(e),X(r,(t,n,o)=>t[n]||=e(o))));p("&&=",(r,e)=>(L(r)||or("Invalid assignment target"),e=i(e),X(r,(t,n,o)=>t[n]&&=e(o))));p("??=",(r,e)=>(L(r)||or("Invalid assignment target"),e=i(e),X(r,(t,n,o)=>t[n]??=e(o))));var gr=5,zr=123,Jr=125,g=(r,e,t,n=r.charCodeAt(0),o=r.length,s=E[n],l)=>E[n]=(f,a,w,S=u)=>!f&&(w?r==w:(o<2||m.substr(u,o)==r)&&(w=r))&&a<e&&!c.id(m.charCodeAt(u+o))&&Or(u+o)!==58&&(v(u+o),(l=t())?q(l,S):v(S),l)||s?.(f,a,w),wr=(r,e,t,n=r.charCodeAt(0),o=r.length,s=E[n],l)=>E[n]=(f,a,w,S=u)=>f&&(w?r==w:(o<2||m.substr(u,o)==r)&&(w=r))&&a<e&&!c.id(m.charCodeAt(u+o))&&(v(u+o),q(l=t(f),S),l)||s?.(f,a,w),F=()=>(d()===zr||I("Expected {"),y(),h(gr-.5,Jr)||null),B=()=>d()!==zr?h(gr+.5):(y(),h(gr-.5,Jr)||null);j("true",!0);j("false",!1);j("null",null);g("undefined",200,()=>[]);j("NaN",NaN);j("Infinity",1/0);var Er=20;C("?",Er,(r,e,t)=>r&&(e=h(Er-1))&&k(n=>n===58)&&(t=h(Er-1),["?",r,e,t]));p("?",(r,e,t)=>(r=i(r),e=i(e),t=i(t),n=>r(n)?e(n):t(n)));var M=Symbol("break"),K=Symbol("continue"),P=[];var Je=20;A("=>",Je,!0);p("=>",(r,e)=>{r=r?.[0]==="()"?r[1]:r,r=r?r[0]===","?r.slice(1):[r]:[];let t=-1,n=null;r.length&&Array.isArray(r[r.length-1])&&r[r.length-1][0]==="..."&&(t=r.length-1,n=r[t][1],r=r.slice(0,-1));let o=e?.[0]==="{}";return e=i(o?["{",e[1]]:e),(s=null)=>(s=Object.create(s),(...l)=>{r.forEach((f,a)=>s[f]=l[a]),n&&(s[n]=l.slice(t));try{let f=e(s);return o?void 0:f}catch(f){if(f===P)return f[0];throw f}})});var Ve=140;N("...",Ve);p("...",r=>(r=i(r),e=>Object.entries(r(e))));var Vr=170;C("?.",Vr,(r,e)=>{if(!r)return;let t=d();return t===40?(y(),["?.()",r,h(0,41)||null]):t===91?(y(),["?.[]",r,h(0,93)]):(e=h(Vr),e?["?.",r,e]:void 0)});p("?.",(r,e)=>(r=i(r),G(e)?()=>{}:t=>r(t)?.[e]));p("?.[]",(r,e)=>(r=i(r),e=i(e),t=>{let n=e(t);return G(n)?void 0:r(t)?.[n]}));p("?.()",(r,e)=>{let t=e?e[0]===","?(e=e.slice(1).map(i),o=>e.map(s=>s(o))):(e=i(e),o=>[e(o)]):()=>[];if(r[0]==="?."){let o=i(r[1]),s=r[2];return G(s)?()=>{}:l=>o(l)?.[s]?.(...t(l))}if(r[0]==="?.[]"){let o=i(r[1]),s=i(r[2]);return l=>{let f=o(l),a=s(l);return G(a)?void 0:f?.[a]?.(...t(l))}}if(r[0]==="."){let o=i(r[1]),s=r[2];return G(s)?()=>{}:l=>o(l)?.[s]?.(...t(l))}if(r[0]==="[]"&&r.length===3){let o=i(r[1]),s=i(r[2]);return l=>{let f=o(l),a=s(l);return G(a)?void 0:f?.[a]?.(...t(l))}}let n=i(r);return o=>n(o)?.(...t(o))});var J=140;N("typeof",J);N("void",J);N("delete",J);g("new",J,()=>R(".target")?(y(7),["new.target"]):["new",h(J)]);p("typeof",r=>(r=i(r),e=>typeof r(e)));p("void",r=>(r=i(r),e=>(r(e),void 0)));p("delete",r=>{if(r[0]==="."){let e=i(r[1]),t=r[2];return n=>delete e(n)[t]}if(r[0]==="[]"){let e=i(r[1]),t=i(r[2]);return n=>delete e(n)[t(n)]}return()=>!0});p("new",r=>{let e=i(r?.[0]==="()"?r[1]:r),t=r?.[0]==="()"?r[2]:null,n=t?t[0]===","?(o=>s=>o.map(l=>l(s)))(t.slice(1).map(i)):(o=>s=>[o(s)])(i(t)):()=>[];return o=>new(e(o))(...n(o))});var ir=Symbol("accessor"),Cr=20,Ye=40,Yr=41,Zr=123,qr=125,xr=r=>e=>{if(e)return;d();let t=k(c.id);if(!t||(d(),m.charCodeAt(u)!==Ye))return!1;y();let n=h(0,Yr);return d(),m.charCodeAt(u)!==Zr?!1:(y(),[r,t,n,h(0,qr)])};C("get",Cr-1,xr("get"));C("set",Cr-1,xr("set"));C("(",Cr-1,r=>{if(!r||typeof r!="string")return;let e=h(0,Yr)||null;if(d(),m.charCodeAt(u)===Zr)return y(),[":",r,["=>",["()",e],h(0,qr)||null]]});p("get",(r,e)=>(e=e?i(e):()=>{},t=>[[ir,r,{get:function(){let n=Object.create(t||{});return n.this=this,e(n)}}]]));p("set",(r,e,t)=>(t=t?i(t):()=>{},n=>[[ir,r,{set:function(o){let s=Object.create(n||{});s.this=this,s[e]=o,t(s)}}]]));var Ze=20,br=200,qe=r=>r==null||typeof r=="string"||[":",",","...","get","set"].includes(r[0]);W("[]",br);W("{}",br);A(":",Ze-1,!0);p("{}",(r,e)=>{if(e!==void 0)return;if(!qe(r))return i(["{",r]);r=r?r[0]!==","?[r]:r.slice(1):[];let t=r.map(n=>i(typeof n=="string"?[":",n,n]:n));return n=>{let o={},s={};for(let l of t.flatMap(f=>f(n)))if(l[0]===ir){let[,f,a]=l;s[f]={...s[f],...a,configurable:!0,enumerable:!0}}else o[l[0]]=l[1];for(let l in s)Object.defineProperty(o,l,s[l]);return o}});p("{",r=>(r=r?i(r):()=>{},e=>r(Object.create(e))));p(":",(r,e)=>(e=i(e),Array.isArray(r)?(r=i(r),t=>[[r(t),e(t)]]):t=>[[r,e(t)]]));var xe=170,sr=96,be=36,rt=123,et=92,tt={n:`
8
- `,r:"\r",t:" ",b:"\b",f:"\f",v:"\v"},re=()=>{let r=[];for(let e="",t;(t=m.charCodeAt(u))!==sr;)t?t===et?(y(),e+=tt[m[u]]||m[u],y()):t===be&&m.charCodeAt(u+1)===rt?(e&&r.push([,e]),e="",y(2),r.push(h(0,125))):(e+=m[u],y(),t=m.charCodeAt(u),t===sr&&e&&r.push([,e])):I("Unterminated template");return y(),r},nt=E[sr];E[sr]=(r,e)=>r&&e<xe?c.asi&&c.newline?void 0:(y(),["``",r,...re()]):r?nt?.(r,e):(y(),(t=>t.length<2&&t[0]?.[0]===void 0?t[0]||[,""]:["`",...t])(re()));p("`",(...r)=>(r=r.map(i),e=>r.map(t=>t(e)).join("")));p("``",(r,...e)=>{r=i(r);let t=[],n=[];for(let s of e)Array.isArray(s)&&s[0]===void 0?t.push(s[1]):n.push(i(s));let o=Object.assign([...t],{raw:t});return s=>r(s)(o,...n.map(l=>l(s)))});c.string["'"]=!0;c.number={"0x":16,"0b":2,"0o":8};var Sr=5,ot=10,it=20,ee=r=>{let e=h(ot-1);return e?.[0]==="in"||e?.[0]==="of"?[e[0],[r,e[1]],e[2]]:e?.[0]===","?[r,...e.slice(1)]:[r,e]};g("let",Sr+1,()=>ee("let"));g("const",Sr+1,()=>ee("const"));g("var",Sr,()=>(d(),["var",h(it)]));var te=(...r)=>(r=r.map(e=>{if(typeof e=="string")return t=>{t[e]=void 0};if(e[0]==="="){let[,t,n]=e,o=i(n);return typeof t=="string"?s=>{s[t]=o(s)}:s=>D(t,o(s),s)}return i(e)}),e=>{for(let t of r)t(e)});p("let",te);p("const",te);p("var",r=>typeof r=="string"?e=>{e[r]=void 0}:()=>{});var st=200;g("function",st,()=>{d();let r=!1;m[u]==="*"&&(r=!0,y(),d());let e=k(c.id);return e&&d(),r?["function*",e,O()||null,F()]:["function",e,O()||null,F()]});p("function",(r,e,t)=>{t=t?i(t):()=>{};let n=e?e[0]===","?e.slice(1):[e]:[],o=null,s=-1,l=n[n.length-1];return Array.isArray(l)&&l[0]==="..."&&(s=n.length-1,o=l[1],n.length--),f=>{let a=(...w)=>{let S={};n.forEach((T,_)=>S[T]=w[_]),o&&(S[o]=w.slice(s));let U=new Proxy(S,{get:(T,_)=>_ in T?T[_]:f[_],set:(T,_,ce)=>((_ in T?T:f)[_]=ce,!0),has:(T,_)=>_ in T||_ in f});try{return t(U)}catch(T){if(T===P)return T[0];throw T}};return r&&(f[r]=a),a}});p("function*",(r,e,t)=>{throw Error("Generator functions are not supported in evaluation")});var pr=140,kr=20;N("await",pr);g("yield",pr,()=>(d(),m[u]==="*"?(y(),d(),["yield*",h(kr)]):["yield",h(kr)]));g("async",pr,()=>{if(d(),R("function"))return["async",h(pr)];let r=h(kr-.5);return r&&["async",r]});p("async",r=>{let e=i(r);return t=>{let n=e(t);return async function(...o){return n(...o)}}});p("await",r=>(r=i(r),async e=>await r(e)));p("yield",r=>(r=r?i(r):null,e=>{throw{__yield__:r?r(e):void 0}}));p("yield*",r=>(r=i(r),e=>{throw{__yield_all__:r(e)}}));var Tr=200,pt=140,ft=90,lt=Symbol("static");N("static",pt);A("instanceof",ft);C("#",Tr,r=>{if(r)return;let e=k(c.id);return e?"#"+e:void 0});g("class",Tr,()=>{d();let r=k(c.id)||null;if(r==="extends")r=null,d();else{if(d(),!R("extends"))return["class",r,null,F()];y(7),d()}return["class",r,h(Tr),F()]});var ut=r=>{throw Error(r)};p("instanceof",(r,e)=>(r=i(r),e=i(e),t=>r(t)instanceof e(t)));p("class",(r,e,t)=>(e=e?i(e):null,t=t?i(t):null,n=>{let o=e?e(n):Object,s=function(...l){if(!(this instanceof s))return ut("Class constructor must be called with new");let f=e?Reflect.construct(o,l,s):this;return s.prototype.__constructor__&&s.prototype.__constructor__.apply(f,l),f};if(Object.setPrototypeOf(s.prototype,o.prototype),Object.setPrototypeOf(s,o),t){let l=Object.create(n);l.super=o;let f=t(l),a=Array.isArray(f)&&typeof f[0]?.[0]=="string"?f:[];for(let[w,S]of a)w==="constructor"?s.prototype.__constructor__=S:s.prototype[w]=S}return r&&(n[r]=s),s}));p("static",r=>(r=i(r),e=>[[lt,r(e)]]));var ct=140,Ir=47,mt=92,dt=r=>r===mt?2:r&&r!==Ir,ht=r=>r===103||r===105||r===109||r===115||r===117||r===121;C("/",ct,r=>{if(r)return;let e=m.charCodeAt(u);if(e===Ir||e===42||e===43||e===63||e===61)return;let t=k(dt);m.charCodeAt(u)===Ir||I("Unterminated regex"),y();let n=k(ht);try{new RegExp(t,n)}catch(o){I("Invalid regex: "+o.message)}return n?["//",t,n]:["//",t]});p("//",(r,e)=>{let t=new RegExp(r,e||"");return()=>t});var At=5,at=59,yt=()=>{let r=u;return d()===at&&y(),d(),R("else")?(y(4),!0):(v(r),!1)};g("if",At+1,()=>{d();let r=["if",O(),B()];return yt()&&r.push(B()),r});p("if",(r,e,t)=>(r=i(r),e=i(e),t=t!==void 0?i(t):null,n=>r(n)?e(n):t?.(n)));var Q=5,V=125,Y=59;g("while",Q+1,()=>(d(),["while",O(),B()]));g("do",Q+1,()=>(r=>(d(),y(5),d(),["do",r,O()]))(B()));g("for",Q+1,()=>(d(),R("await")?(y(5),d(),["for await",O(),B()]):["for",O(),B()]));g("break",Q+1,()=>{c.asi&&(c.newline=!1);let r=u;d();let e=m.charCodeAt(u);if(!e||e===V||e===Y||c.newline)return["break"];let t=k(c.id);if(!t)return["break"];d();let n=m.charCodeAt(u);return!n||n===V||n===Y||c.newline?["break",t]:(v(r),["break"])});g("continue",Q+1,()=>{c.asi&&(c.newline=!1);let r=u;d();let e=m.charCodeAt(u);if(!e||e===V||e===Y||c.newline)return["continue"];let t=k(c.id);if(!t)return["continue"];d();let n=m.charCodeAt(u);return!n||n===V||n===Y||c.newline?["continue",t]:(v(r),["continue"])});g("return",Q+1,()=>{c.asi&&(c.newline=!1);let r=d();return!r||r===V||r===Y||c.newline?["return"]:["return",h(Q)]});p("while",(r,e)=>(r=i(r),e=i(e),t=>{let n;for(;r(t);)try{n=e(t)}catch(o){if(o===M)break;if(o===K)continue;if(o===P)return o[0];throw o}return n}));p("do",(r,e)=>(r=i(r),e=i(e),t=>{let n;do try{n=r(t)}catch(o){if(o===M)break;if(o===K)continue;if(o===P)return o[0];throw o}while(e(t));return n}));p("for",(r,e)=>{if(Array.isArray(r)&&r[0]===";"){let[,t,n,o]=r;return t=t?i(t):null,n=n?i(n):()=>!0,o=o?i(o):null,e=i(e),s=>{let l;for(t?.(s);n(s);o?.(s))try{l=e(s)}catch(f){if(f===M)break;if(f===K)continue;if(f===P)return f[0];throw f}return l}}if(Array.isArray(r)&&(r[0]==="in"||r[0]==="of")){let[t,n,o]=r;if(Array.isArray(n)&&(n[0]==="let"||n[0]==="const"||n[0]==="var")&&(n=n[1]),t==="in")return wt(n,o,e);if(t==="of")return gt(n,o,e)}});var gt=(r,e,t)=>{e=i(e),t=i(t);let n=Array.isArray(r);return o=>{let s,l=n?null:o[r];for(let f of e(o)){n?D(r,f,o):o[r]=f;try{s=t(o)}catch(a){if(a===M)break;if(a===K)continue;if(a===P)return a[0];throw a}}return n||(o[r]=l),s}},wt=(r,e,t)=>{e=i(e),t=i(t);let n=Array.isArray(r);return o=>{let s,l=n?null:o[r];for(let f in e(o)){n?D(r,f,o):o[r]=f;try{s=t(o)}catch(a){if(a===M)break;if(a===K)continue;if(a===P)return a[0];throw a}}return n||(o[r]=l),s}};p("break",()=>()=>{throw M});p("continue",()=>()=>{throw K});p("return",r=>(r=r!==void 0?i(r):null,e=>{throw P[0]=r?.(e),P}));var Z=5;g("try",Z+1,()=>["try",F()]);wr("catch",Z+1,r=>(d(),["catch",r,O(),F()]));wr("finally",Z+1,r=>["finally",r,F()]);g("throw",Z+1,()=>{if(c.asi&&(c.newline=!1),d(),c.newline)throw SyntaxError("Unexpected newline after throw");return["throw",h(Z)]});p("try",r=>(r=r?i(r):null,e=>r?.(e)));p("catch",(r,e,t)=>{let n=r?.[1]?i(r[1]):null;return t=t?i(t):null,o=>{let s;try{s=n?.(o)}catch(l){if(l===M||l===K||l===P)throw l;if(e!==null&&t){let f=e in o,a=o[e];o[e]=l;try{s=t(o)}finally{f?o[e]=a:delete o[e]}}else if(e===null)throw l}return s}});p("finally",(r,e)=>(r=r?i(r):null,e=e?i(e):null,t=>{let n;try{n=r?.(t)}finally{e?.(t)}return n}));p("throw",r=>(r=i(r),e=>{throw r(e)}));var ie=5,Et=20,ne=58,Ct=59,se=125,Rr=0,pe=(r,e=r.length,t=r.charCodeAt(0),n=E[t])=>E[t]=(o,s,l)=>R(r)&&!o&&Rr||n?.(o,s,l);pe("case");pe("default");var oe=r=>{let e=[];for(;(r=d())!==se&&!R("case")&&!R("default");){if(r===Ct){y();continue}e.push(h(ie-.5))||I()}return e.length>1?[";",...e]:e[0]||null},St=()=>{d()===123||I("Expected {"),y(),Rr++;let r=[];try{for(;d()!==se;)if(R("case")){v(u+4),d();let e=h(Et-.5);d()===ne&&y(),r.push(["case",e,oe()])}else R("default")?(v(u+7),d()===ne&&y(),r.push(["default",oe()])):I("Expected case or default")}finally{Rr--}return y(),r};g("switch",ie+1,()=>d()===40&&["switch",O(),...St()]);p("switch",(r,...e)=>(r=i(r),e.length?(e=e.map(t=>[t[0]==="case"?i(t[1]):null,(t[0]==="case"?t[2]:t[1])?.[0]===";"?(t[0]==="case"?t[2]:t[1]).slice(1).map(i):(t[0]==="case"?t[2]:t[1])?[i(t[0]==="case"?t[2]:t[1])]:[]]),t=>{let n=r(t),o=!1,s;for(let[f,a]of e)if(o||f===null||f(t)===n)for(o=!0,l=0;l<a.length;l++)try{s=a[l](t)}catch(w){if(w===M)return s;throw w}var l;return s}):t=>r(t)));var fe=5;g("debugger",fe+1,()=>["debugger"]);g("with",fe+1,()=>(d(),["with",O(),B()]));var Nr=5,$=10,le=42,kt=E[le];E[le]=(r,e)=>r?kt?.(r,e):(y(),"*");C("from",$+1,r=>r?r[0]!=="="&&r[0]!==","&&(d(),["from",r,h($+1)]):!1);C("as",$+2,r=>r?(d(),["as",r,h($+2)]):!1);g("import",Nr,()=>R(".meta")?(y(5),["import.meta"]):["import",h($)]);g("export",Nr,()=>(d(),["export",h(Nr)]));g("default",$+1,()=>d()!==58&&(d(),["default",h($)]));p("import",()=>()=>{});p("export",()=>()=>{});p("from",(r,e)=>()=>{});p("as",(r,e)=>()=>{});p("default",r=>i(r));var ue=H.asi??H[";"];c.asi=(r,e,t,n,o)=>e<ue&&(n=t(ue-.5))&&(o=n?.[0]===";"?n.slice(1):[n],r?.[0]===";"?(r.push(...o),r):[";",r,...o]);export{ur as access,A as binary,i as compile,m as cur,jr as default,I as err,h as expr,W as group,Tt as id,u as idx,j as literal,q as loc,E as lookup,lr as nary,k as next,p as operator,fr as operators,O as parens,c as parse,Or as peek,H as prec,v as seek,y as skip,d as space,C as token,N as unary,R as word};
4
+ `,""+o}${f}${u}`)},q=(r,e=l)=>(Array.isArray(r)&&(r.loc=e),r),I=(r,e=l,t)=>{for(;t=r(m.charCodeAt(l));)l+=t;return m.slice(e,l)},y=(r=1)=>m[l+=r],P=r=>l=r,h=(r=0,e)=>{let t,n,o,p,f;for(e&&c.asi&&(c.newline=!1);(t=c.space())&&(f=c.newline,1)&&t!==e&&(o=((p=k[t])&&p(n,r))??(n&&f&&c.asi?.(n,r,h))??(!n&&I(c.id)));)n=o;return e&&(t==e?l++:R("Unclosed "+String.fromCharCode(e-(e>42?2:1)))),n},d=c.space=(r,e=l)=>{for(;(r=m.charCodeAt(l))<=32;)c.asi&&r===10&&(c.newline=!0),l++;return r},_r=(r=l)=>{for(;m.charCodeAt(r)<=32;)r++;return m.charCodeAt(r)},Tt=c.id=r=>r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122||r==36||r==95||r>=192&&r!=215&&r!=247,N=(r,e=r.length)=>m.substr(l,e)===r&&!c.id(m.charCodeAt(l+e)),v=()=>(y(),h(0,41)),k=[],j={},T=(r,e=32,t,n=r.charCodeAt(0),o=r.length,p=k[n],f=r.toUpperCase()!==r,u,a)=>(e=j[r]=!p&&j[r]||e,k[n]=(w,S,C,E=l)=>(u=C,(C?r==C:(o<2||r.charCodeAt(1)===m.charCodeAt(l+1)&&(o<3||m.substr(l,o)==r))&&(!f||!c.id(m.charCodeAt(l+o)))&&(u=C=r))&&S<e&&(l+=o,(a=t(w))?q(a,E):(l=E,u=0,!f&&!p&&R()),a)||p?.(w,S,u))),A=(r,e,t=!1)=>T(r,e,n=>n&&(o=>o&&[r,n,o])(h(e-(t?.5:0)))),O=(r,e,t)=>T(r,e,n=>t?n&&[r,n]:!n&&(n=h(e-.5))&&[r,n]),H=(r,e)=>T(r,200,t=>!t&&[,e]),ur=(r,e,t)=>T(r,e,(n,o)=>(o=h(e-(t?.5:0)),n?.[0]!==r&&(n=[r,n||null]),o?.[0]===r?n.push(...o.slice(1)):n.push(o||null),n)),W=(r,e)=>T(r[0],e,t=>!t&&[r,h(0,r.charCodeAt(1))||null]),lr=(r,e)=>T(r[0],e,t=>t&&[r,t,h(0,r.charCodeAt(1))||null]),fr={},s=(r,e,t=fr[r])=>fr[r]=(...n)=>e(...n)||t?.(...n),i=r=>Array.isArray(r)?r[0]==null?(e=>()=>e)(r[1]):fr[r[0]]?.(...r.slice(1))??R(`Unknown operator: ${r[0]}`,r?.loc):r===void 0?()=>{}:e=>e?.[r];var b=46,z=48,rr=57,me=69,de=101,he=43,ae=45,x=95,Ae=110,ye=97,ge=102,we=65,Ee=70,Or=r=>r.indexOf("_")<0?r:r.replaceAll("_",""),cr=r=>{let e=Or(I(t=>t===b&&m.charCodeAt(l+1)!==b||t>=z&&t<=rr||t===x||((t===me||t===de)&&((t=m.charCodeAt(l+1))>=z&&t<=rr||t===he||t===ae)?2:0)));return m.charCodeAt(l)===Ae?(y(),[,BigInt(e)]):(r=+e)!=r?R():[,r]},Ce={2:r=>r===48||r===49||r===x,8:r=>r>=48&&r<=55||r===x,16:r=>r>=z&&r<=rr||r>=ye&&r<=ge||r>=we&&r<=Ee||r===x};c.number=null;k[b]=r=>!r&&m.charCodeAt(l+1)!==b&&cr();for(let r=z;r<=rr;r++)k[r]=e=>e?void 0:cr();k[z]=r=>{if(r)return;let e=c.number;if(e){for(let[t,n]of Object.entries(e))if(t[0]==="0"&&m[l+1]?.toLowerCase()===t[1])return y(2),[,parseInt(Or(I(Ce[n])),n)]}return cr()};var Se=92,vr=34,Pr=39,ke={n:`
5
+ `,r:"\r",t:" ",b:"\b",f:"\f",v:"\v"},Mr=r=>(e,t,n="")=>{if(!(e||!c.string?.[String.fromCharCode(r)]))return y(),I(o=>o-r&&(o===Se?(n+=ke[m[l+1]]||m[l+1],2):(n+=m[l],1))),m[l]===String.fromCharCode(r)?y():R("Bad string"),[,n]};k[vr]=Mr(vr);k[Pr]=Mr(Pr);c.string={'"':!0};var Te=20;"= += -= *= /= %= |= &= ^= >>= <<=".split(" ").map(r=>A(r,Te,!0));var Lr=(r,e,t,n)=>typeof r=="string"?o=>e(o,r,o):r[0]==="."?(t=i(r[1]),n=r[2],o=>e(t(o),n,o)):r[0]==="[]"&&r.length===3?(t=i(r[1]),n=i(r[2]),o=>e(t(o),n(o),o)):r[0]==="()"&&r.length===2?Lr(r[1],e):(()=>{throw Error("Invalid assignment target")})(),Ur={"=":(r,e,t)=>r[e]=t,"+=":(r,e,t)=>r[e]+=t,"-=":(r,e,t)=>r[e]-=t,"*=":(r,e,t)=>r[e]*=t,"/=":(r,e,t)=>r[e]/=t,"%=":(r,e,t)=>r[e]%=t,"|=":(r,e,t)=>r[e]|=t,"&=":(r,e,t)=>r[e]&=t,"^=":(r,e,t)=>r[e]^=t,">>=":(r,e,t)=>r[e]>>=t,"<<=":(r,e,t)=>r[e]<<=t};for(let r in Ur)s(r,(e,t)=>(t=i(t),Lr(e,(n,o,p)=>Ur[r](n,o,t(p)))));var Ie=30,Re=40,Fr=140;A("!",Fr);O("!",Fr);A("||",Ie);A("&&",Re);s("!",r=>(r=i(r),e=>!r(e)));s("||",(r,e)=>(r=i(r),e=i(e),t=>r(t)||e(t)));s("&&",(r,e)=>(r=i(r),e=i(e),t=>r(t)&&e(t)));var Ne=50,_e=60,Oe=70,Br=100,ve=140;A("|",Ne);A("&",Oe);A("^",_e);A(">>",Br);A("<<",Br);O("~",ve);s("~",r=>(r=i(r),e=>~r(e)));s("|",(r,e)=>(r=i(r),e=i(e),t=>r(t)|e(t)));s("&",(r,e)=>(r=i(r),e=i(e),t=>r(t)&e(t)));s("^",(r,e)=>(r=i(r),e=i(e),t=>r(t)^e(t)));s(">>",(r,e)=>(r=i(r),e=i(e),t=>r(t)>>e(t)));s("<<",(r,e)=>(r=i(r),e=i(e),t=>r(t)<<e(t)));var er=90;A("<",er);A(">",er);A("<=",er);A(">=",er);s(">",(r,e)=>(r=i(r),e=i(e),t=>r(t)>e(t)));s("<",(r,e)=>(r=i(r),e=i(e),t=>r(t)<e(t)));s(">=",(r,e)=>(r=i(r),e=i(e),t=>r(t)>=e(t)));s("<=",(r,e)=>(r=i(r),e=i(e),t=>r(t)<=e(t)));var Gr=80;A("==",Gr);A("!=",Gr);s("==",(r,e)=>(r=i(r),e=i(e),t=>r(t)==e(t)));s("!=",(r,e)=>(r=i(r),e=i(e),t=>r(t)!=e(t)));var Xr=110,mr=120,Dr=140;A("+",Xr);A("-",Xr);A("*",mr);A("/",mr);A("%",mr);O("+",Dr);O("-",Dr);s("+",(r,e)=>e!==void 0?(r=i(r),e=i(e),t=>r(t)+e(t)):(r=i(r),t=>+r(t)));s("-",(r,e)=>e!==void 0?(r=i(r),e=i(e),t=>r(t)-e(t)):(r=i(r),t=>-r(t)));s("*",(r,e)=>(r=i(r),e=i(e),t=>r(t)*e(t)));s("/",(r,e)=>(r=i(r),e=i(e),t=>r(t)/e(t)));s("%",(r,e)=>(r=i(r),e=i(e),t=>r(t)%e(t)));var tr=150;T("++",tr,r=>r?["++",r,null]:["++",h(tr-1)]);T("--",tr,r=>r?["--",r,null]:["--",h(tr-1)]);var dr=(r,e,t,n)=>typeof r=="string"?o=>e(o,r):r[0]==="."?(t=i(r[1]),n=r[2],o=>e(t(o),n)):r[0]==="[]"&&r.length===3?(t=i(r[1]),n=i(r[2]),o=>e(t(o),n(o))):r[0]==="()"&&r.length===2?dr(r[1],e):(()=>{throw Error("Invalid increment target")})();s("++",(r,e)=>dr(r,e===null?(t,n)=>t[n]++:(t,n)=>++t[n]));s("--",(r,e)=>dr(r,e===null?(t,n)=>t[n]--:(t,n)=>--t[n]));var Pe=5,Me=10,Ue=170;W("()",Ue);ur(",",Me);ur(";",Pe,!0);var Kr=(...r)=>(r=r.map(i),e=>{let t;for(let n of r)t=n(e);return t});s(",",Kr);s(";",Kr);var G=r=>r?.[0]==="_"&&r[1]==="_"||r==="constructor"||r==="prototype",hr=170;lr("[]",hr);A(".",hr);lr("()",hr);var nr=r=>{throw Error(r)};s("[]",(r,e)=>e===void 0?(r=r?r[0]===","?r.slice(1):[r]:[],r=r.map(t=>t==null?(()=>{}):t[0]==="..."?(t=i(t[1]),n=>t(n)):(t=i(t),n=>[t(n)])),t=>r.flatMap(n=>n(t))):(e==null&&nr("Missing index"),r=i(r),e=i(e),t=>{let n=e(t);return G(n)?void 0:r(t)[n]}));s(".",(r,e)=>(r=i(r),e=e[0]?e:e[1],G(e)?()=>{}:t=>r(t)[e]));s("()",(r,e)=>{if(e===void 0)return r==null?nr("Empty ()"):i(r);let t=o=>o?.[0]===","&&o.slice(1).some(p=>p==null||t(p));t(e)&&nr("Empty argument");let n=e?e[0]===","?(e=e.slice(1).map(i),o=>e.map(p=>p(o))):(e=i(e),o=>[e(o)]):()=>[];return ar(r,(o,p,f)=>o[p](...n(f)))});var L=r=>typeof r=="string"||Array.isArray(r)&&(r[0]==="."||r[0]==="?."||r[0]==="[]"&&r.length===3||r[0]==="?.[]"||r[0]==="()"&&r.length===2&&L(r[1])||r[0]==="{}"),ar=(r,e,t,n)=>r==null?nr("Empty ()"):r[0]==="()"&&r.length==2?ar(r[1],e):typeof r=="string"?o=>e(o,r,o):r[0]==="."?(t=i(r[1]),n=r[2],o=>e(t(o),n,o)):r[0]==="?."?(t=i(r[1]),n=r[2],o=>{let p=t(o);return p==null?void 0:e(p,n,o)}):r[0]==="[]"&&r.length===3?(t=i(r[1]),n=i(r[2]),o=>e(t(o),n(o),o)):r[0]==="?.[]"?(t=i(r[1]),n=i(r[2]),o=>{let p=t(o);return p==null?void 0:e(p,n(o),o)}):(r=i(r),o=>e([r(o)],0,o)),X=ar;var Qr=new WeakMap,Le=(r,...e)=>typeof r=="string"?i(c(r)):Qr.get(r)||Qr.set(r,Fe(r,e)).get(r),$r=57344,Fe=(r,e)=>{let t=r.reduce((p,f,u)=>p+(u?String.fromCharCode($r+u-1):"")+f,""),n=c(t),o=p=>{if(typeof p=="string"&&p.length===1){let f=p.charCodeAt(0)-$r,u;if(f>=0&&f<e.length)return u=e[f],Be(u)?u:[,u]}return Array.isArray(p)?p.map(o):p};return i(o(n))},Be=r=>typeof r=="string"||Array.isArray(r)&&(typeof r[0]=="string"||r[0]===void 0),Hr=Le;var Ge=32,Xe=c.space;c.comment??={"//":`
6
+ `,"/*":"*/"};var Ar;c.space=()=>{Ar||(Ar=Object.entries(c.comment).map(([o,p])=>[o,p,o.charCodeAt(0)]));for(var r;r=Xe();){for(var e=0,t;t=Ar[e++];)if(r===t[2]&&m.substr(l,t[0].length)===t[0]){var n=l+t[0].length;if(t[1]===`
7
+ `)for(;m.charCodeAt(n)>=Ge;)n++;else{for(;m[n]&&m.substr(n,t[1].length)!==t[1];)n++;m[n]&&(n+=t[1].length)}P(n),r=0;break}if(r)return r}return r};var jr=80;A("===",jr);A("!==",jr);s("===",(r,e)=>(r=i(r),e=i(e),t=>r(t)===e(t)));s("!==",(r,e)=>(r=i(r),e=i(e),t=>r(t)!==e(t)));var De=30;A("??",De);s("??",(r,e)=>(r=i(r),e=i(e),t=>r(t)??e(t)));var Ke=130,Qe=20;A("**",Ke,!0);A("**=",Qe,!0);s("**",(r,e)=>(r=i(r),e=i(e),t=>r(t)**e(t)));var $e=r=>{throw Error(r)};s("**=",(r,e)=>(L(r)||$e("Invalid assignment target"),e=i(e),X(r,(t,n,o)=>t[n]**=e(o))));var Wr=90;A("in",Wr);A("of",Wr);s("in",(r,e)=>(r=i(r),e=i(e),t=>r(t)in e(t)));var He=20,je=100,We=r=>{throw Error(r)};A(">>>",je);A(">>>=",He,!0);s(">>>",(r,e)=>(r=i(r),e=i(e),t=>r(t)>>>e(t)));s(">>>=",(r,e)=>(L(r)||We("Invalid assignment target"),e=i(e),X(r,(t,n,o)=>t[n]>>>=e(o))));var ze=r=>r[0]?.[0]===","?r[0].slice(1):r,D=(r,e,t)=>{if(typeof r=="string"){t[r]=e;return}let[n,...o]=r,p=ze(o);if(n==="{}"){let f=[];for(let u of p){if(Array.isArray(u)&&u[0]==="..."){let E={};for(let _ in e)f.includes(_)||(E[_]=e[_]);t[u[1]]=E;break}let a,w,S;typeof u=="string"?a=w=u:u[0]==="="?(typeof u[1]=="string"?a=w=u[1]:[,a,w]=u[1],S=u[2]):[,a,w]=u,f.push(a);let C=e[a];C===void 0&&S&&(C=i(S)(t)),D(w,C,t)}}else if(n==="[]"){let f=0;for(let u of p){if(u===null){f++;continue}if(Array.isArray(u)&&u[0]==="..."){t[u[1]]=e.slice(f);break}let a=u,w;Array.isArray(u)&&u[0]==="="&&([,a,w]=u);let S=e[f++];S===void 0&&w&&(S=i(w)(t)),D(a,S,t)}}};var yr=20,or=r=>{throw Error(r)};A("||=",yr,!0);A("&&=",yr,!0);A("??=",yr,!0);s("=",(r,e)=>{if(Array.isArray(r)&&(r[0]==="let"||r[0]==="const"||r[0]==="var")){let t=r[1];return e=i(e),typeof t=="string"?n=>{n[t]=e(n)}:n=>D(t,e(n),n)}return L(r)||or("Invalid assignment target"),e=i(e),X(r,(t,n,o)=>t[n]=e(o))});s("||=",(r,e)=>(L(r)||or("Invalid assignment target"),e=i(e),X(r,(t,n,o)=>t[n]||=e(o))));s("&&=",(r,e)=>(L(r)||or("Invalid assignment target"),e=i(e),X(r,(t,n,o)=>t[n]&&=e(o))));s("??=",(r,e)=>(L(r)||or("Invalid assignment target"),e=i(e),X(r,(t,n,o)=>t[n]??=e(o))));var gr=5,zr=123,Jr=125,g=(r,e,t,n=r.charCodeAt(0),o=r.length,p=k[n],f)=>k[n]=(u,a,w,S=l)=>!u&&(w?r==w:(o<2||m.substr(l,o)==r)&&(w=r))&&a<e&&!c.id(m.charCodeAt(l+o))&&_r(l+o)!==58&&(P(l+o),(f=t())?q(f,S):P(S),f)||p?.(u,a,w),wr=(r,e,t,n=r.charCodeAt(0),o=r.length,p=k[n],f)=>k[n]=(u,a,w,S=l)=>u&&(w?r==w:(o<2||m.substr(l,o)==r)&&(w=r))&&a<e&&!c.id(m.charCodeAt(l+o))&&(P(l+o),q(f=t(u),S),f)||p?.(u,a,w),F=()=>(d()===zr||R("Expected {"),y(),h(gr-.5,Jr)||null),B=()=>d()!==zr?h(gr+.5):(y(),h(gr-.5,Jr)||null);H("true",!0);H("false",!1);H("null",null);g("undefined",200,()=>[]);H("NaN",NaN);H("Infinity",1/0);var Er=20;T("?",Er,(r,e,t)=>r&&(e=h(Er-1))&&I(n=>n===58)&&(t=h(Er-1),["?",r,e,t]));s("?",(r,e,t)=>(r=i(r),e=i(e),t=i(t),n=>r(n)?e(n):t(n)));var U=Symbol("break"),K=Symbol("continue"),M=[];var Je=20;A("=>",Je,!0);s("=>",(r,e)=>{r=r?.[0]==="()"?r[1]:r;let t=r?r[0]===","?r.slice(1):[r]:[],n=-1,o=null,p=t[t.length-1];Array.isArray(p)&&p[0]==="..."&&(n=t.length-1,o=p[1],t.length--);let f=e?.[0]==="{}";return e=i(f?["{",e[1]]:e),u=>(...a)=>{let w={};t.forEach((C,E)=>w[C]=a[E]),o&&(w[o]=a.slice(n));let S=new Proxy(w,{get:(C,E)=>E in C?C[E]:u?.[E],set:(C,E,_)=>((E in C?C:u)[E]=_,!0),has:(C,E)=>E in C||(u?E in u:!1)});try{let C=e(S);return f?void 0:C}catch(C){if(C===M)return C[0];throw C}}});var Ve=140;O("...",Ve);s("...",r=>(r=i(r),e=>Object.entries(r(e))));var Vr=170;T("?.",Vr,(r,e)=>{if(!r)return;let t=d();return t===40?(y(),["?.()",r,h(0,41)||null]):t===91?(y(),["?.[]",r,h(0,93)]):(e=h(Vr),e?["?.",r,e]:void 0)});s("?.",(r,e)=>(r=i(r),G(e)?()=>{}:t=>r(t)?.[e]));s("?.[]",(r,e)=>(r=i(r),e=i(e),t=>{let n=e(t);return G(n)?void 0:r(t)?.[n]}));s("?.()",(r,e)=>{let t=e?e[0]===","?(e=e.slice(1).map(i),o=>e.map(p=>p(o))):(e=i(e),o=>[e(o)]):()=>[];if(r[0]==="?."){let o=i(r[1]),p=r[2];return G(p)?()=>{}:f=>o(f)?.[p]?.(...t(f))}if(r[0]==="?.[]"){let o=i(r[1]),p=i(r[2]);return f=>{let u=o(f),a=p(f);return G(a)?void 0:u?.[a]?.(...t(f))}}if(r[0]==="."){let o=i(r[1]),p=r[2];return G(p)?()=>{}:f=>o(f)?.[p]?.(...t(f))}if(r[0]==="[]"&&r.length===3){let o=i(r[1]),p=i(r[2]);return f=>{let u=o(f),a=p(f);return G(a)?void 0:u?.[a]?.(...t(f))}}let n=i(r);return o=>n(o)?.(...t(o))});var J=140;O("typeof",J);O("void",J);O("delete",J);g("new",J,()=>N(".target")?(y(7),["new.target"]):["new",h(J)]);s("typeof",r=>(r=i(r),e=>typeof r(e)));s("void",r=>(r=i(r),e=>(r(e),void 0)));s("delete",r=>{if(r[0]==="."){let e=i(r[1]),t=r[2];return n=>delete e(n)[t]}if(r[0]==="[]"){let e=i(r[1]),t=i(r[2]);return n=>delete e(n)[t(n)]}return()=>!0});s("new",r=>{let e=i(r?.[0]==="()"?r[1]:r),t=r?.[0]==="()"?r[2]:null,n=t?t[0]===","?(o=>p=>o.map(f=>f(p)))(t.slice(1).map(i)):(o=>p=>[o(p)])(i(t)):()=>[];return o=>new(e(o))(...n(o))});var ir=Symbol("accessor"),Cr=20,Ye=40,Yr=41,Zr=123,qr=125,xr=r=>e=>{if(e)return;d();let t=I(c.id);if(!t||(d(),m.charCodeAt(l)!==Ye))return!1;y();let n=h(0,Yr);return d(),m.charCodeAt(l)!==Zr?!1:(y(),[r,t,n,h(0,qr)])};T("get",Cr-1,xr("get"));T("set",Cr-1,xr("set"));T("(",Cr-1,r=>{if(!r||typeof r!="string")return;let e=h(0,Yr)||null;if(d(),m.charCodeAt(l)===Zr)return y(),[":",r,["=>",["()",e],h(0,qr)||null]]});s("get",(r,e)=>(e=e?i(e):()=>{},t=>[[ir,r,{get:function(){let n=Object.create(t||{});return n.this=this,e(n)}}]]));s("set",(r,e,t)=>(t=t?i(t):()=>{},n=>[[ir,r,{set:function(o){let p=Object.create(n||{});p.this=this,p[e]=o,t(p)}}]]));var Ze=20,br=200,qe=r=>r==null||typeof r=="string"||[":",",","...","get","set"].includes(r[0]);W("[]",br);W("{}",br);A(":",Ze-1,!0);s("{}",(r,e)=>{if(e!==void 0)return;if(!qe(r))return i(["{",r]);r=r?r[0]!==","?[r]:r.slice(1):[];let t=r.map(n=>i(typeof n=="string"?[":",n,n]:n));return n=>{let o={},p={};for(let f of t.flatMap(u=>u(n)))if(f[0]===ir){let[,u,a]=f;p[u]={...p[u],...a,configurable:!0,enumerable:!0}}else o[f[0]]=f[1];for(let f in p)Object.defineProperty(o,f,p[f]);return o}});s("{",r=>(r=r?i(r):()=>{},e=>r(Object.create(e))));s(":",(r,e)=>(e=i(e),Array.isArray(r)?(r=i(r),t=>[[r(t),e(t)]]):t=>[[r,e(t)]]));var xe=170,sr=96,be=36,rt=123,et=92,tt={n:`
8
+ `,r:"\r",t:" ",b:"\b",f:"\f",v:"\v"},re=()=>{let r=[];for(let e="",t;(t=m.charCodeAt(l))!==sr;)t?t===et?(y(),e+=tt[m[l]]||m[l],y()):t===be&&m.charCodeAt(l+1)===rt?(e&&r.push([,e]),e="",y(2),r.push(h(0,125))):(e+=m[l],y(),t=m.charCodeAt(l),t===sr&&e&&r.push([,e])):R("Unterminated template");return y(),r},nt=k[sr];k[sr]=(r,e)=>r&&e<xe?c.asi&&c.newline?void 0:(y(),["``",r,...re()]):r?nt?.(r,e):(y(),(t=>t.length<2&&t[0]?.[0]===void 0?t[0]||[,""]:["`",...t])(re()));s("`",(...r)=>(r=r.map(i),e=>r.map(t=>t(e)).join("")));s("``",(r,...e)=>{r=i(r);let t=[],n=[];for(let p of e)Array.isArray(p)&&p[0]===void 0?t.push(p[1]):n.push(i(p));let o=Object.assign([...t],{raw:t});return p=>r(p)(o,...n.map(f=>f(p)))});c.string["'"]=!0;c.number={"0x":16,"0b":2,"0o":8};var Sr=5,ot=10,it=20,ee=r=>{let e=h(ot-1);return e?.[0]==="in"||e?.[0]==="of"?[e[0],[r,e[1]],e[2]]:e?.[0]===","?[r,...e.slice(1)]:[r,e]};g("let",Sr+1,()=>ee("let"));g("const",Sr+1,()=>ee("const"));g("var",Sr,()=>(d(),["var",h(it)]));var te=(...r)=>(r=r.map(e=>{if(typeof e=="string")return t=>{t[e]=void 0};if(e[0]==="="){let[,t,n]=e,o=i(n);return typeof t=="string"?p=>{p[t]=o(p)}:p=>D(t,o(p),p)}return i(e)}),e=>{for(let t of r)t(e)});s("let",te);s("const",te);s("var",r=>typeof r=="string"?e=>{e[r]=void 0}:()=>{});var st=200;g("function",st,()=>{d();let r=!1;m[l]==="*"&&(r=!0,y(),d());let e=I(c.id);return e&&d(),r?["function*",e,v()||null,F()]:["function",e,v()||null,F()]});s("function",(r,e,t)=>{t=t?i(t):()=>{};let n=e?e[0]===","?e.slice(1):[e]:[],o=null,p=-1,f=n[n.length-1];return Array.isArray(f)&&f[0]==="..."&&(p=n.length-1,o=f[1],n.length--),u=>{let a=(...w)=>{let S={};n.forEach((E,_)=>S[E]=w[_]),o&&(S[o]=w.slice(p));let C=new Proxy(S,{get:(E,_)=>_ in E?E[_]:u[_],set:(E,_,ce)=>((_ in E?E:u)[_]=ce,!0),has:(E,_)=>_ in E||_ in u});try{return t(C)}catch(E){if(E===M)return E[0];throw E}};return r&&(u[r]=a),a}});s("function*",(r,e,t)=>{throw Error("Generator functions are not supported in evaluation")});var pr=140,kr=20;O("await",pr);g("yield",pr,()=>(d(),m[l]==="*"?(y(),d(),["yield*",h(kr)]):["yield",h(kr)]));g("async",pr,()=>{if(d(),N("function"))return["async",h(pr)];let r=h(kr-.5);return r&&["async",r]});s("async",r=>{let e=i(r);return t=>{let n=e(t);return async function(...o){return n(...o)}}});s("await",r=>(r=i(r),async e=>await r(e)));s("yield",r=>(r=r?i(r):null,e=>{throw{__yield__:r?r(e):void 0}}));s("yield*",r=>(r=i(r),e=>{throw{__yield_all__:r(e)}}));var Tr=200,pt=140,ft=90,ut=Symbol("static");O("static",pt);A("instanceof",ft);T("#",Tr,r=>{if(r)return;let e=I(c.id);return e?"#"+e:void 0});g("class",Tr,()=>{d();let r=I(c.id)||null;if(r==="extends")r=null,d();else{if(d(),!N("extends"))return["class",r,null,F()];y(7),d()}return["class",r,h(Tr),F()]});var lt=r=>{throw Error(r)};s("instanceof",(r,e)=>(r=i(r),e=i(e),t=>r(t)instanceof e(t)));s("class",(r,e,t)=>(e=e?i(e):null,t=t?i(t):null,n=>{let o=e?e(n):Object,p=function(...f){if(!(this instanceof p))return lt("Class constructor must be called with new");let u=e?Reflect.construct(o,f,p):this;return p.prototype.__constructor__&&p.prototype.__constructor__.apply(u,f),u};if(Object.setPrototypeOf(p.prototype,o.prototype),Object.setPrototypeOf(p,o),t){let f=Object.create(n);f.super=o;let u=t(f),a=Array.isArray(u)&&typeof u[0]?.[0]=="string"?u:[];for(let[w,S]of a)w==="constructor"?p.prototype.__constructor__=S:p.prototype[w]=S}return r&&(n[r]=p),p}));s("static",r=>(r=i(r),e=>[[ut,r(e)]]));var ct=140,Ir=47,mt=92,dt=r=>r===mt?2:r&&r!==Ir,ht=r=>r===103||r===105||r===109||r===115||r===117||r===121;T("/",ct,r=>{if(r)return;let e=m.charCodeAt(l);if(e===Ir||e===42||e===43||e===63||e===61)return;let t=I(dt);m.charCodeAt(l)===Ir||R("Unterminated regex"),y();let n=I(ht);try{new RegExp(t,n)}catch(o){R("Invalid regex: "+o.message)}return n?["//",t,n]:["//",t]});s("//",(r,e)=>{let t=new RegExp(r,e||"");return()=>t});var at=5,At=59,yt=()=>{let r=l;return d()===At&&y(),d(),N("else")?(y(4),!0):(P(r),!1)};g("if",at+1,()=>{d();let r=["if",v(),B()];return yt()&&r.push(B()),r});s("if",(r,e,t)=>(r=i(r),e=i(e),t=t!==void 0?i(t):null,n=>r(n)?e(n):t?.(n)));var Q=5,V=125,Y=59;g("while",Q+1,()=>(d(),["while",v(),B()]));g("do",Q+1,()=>(r=>(d(),y(5),d(),["do",r,v()]))(B()));g("for",Q+1,()=>(d(),N("await")?(y(5),d(),["for await",v(),B()]):["for",v(),B()]));g("break",Q+1,()=>{c.asi&&(c.newline=!1);let r=l;d();let e=m.charCodeAt(l);if(!e||e===V||e===Y||c.newline)return["break"];let t=I(c.id);if(!t)return["break"];d();let n=m.charCodeAt(l);return!n||n===V||n===Y||c.newline?["break",t]:(P(r),["break"])});g("continue",Q+1,()=>{c.asi&&(c.newline=!1);let r=l;d();let e=m.charCodeAt(l);if(!e||e===V||e===Y||c.newline)return["continue"];let t=I(c.id);if(!t)return["continue"];d();let n=m.charCodeAt(l);return!n||n===V||n===Y||c.newline?["continue",t]:(P(r),["continue"])});g("return",Q+1,()=>{c.asi&&(c.newline=!1);let r=d();return!r||r===V||r===Y||c.newline?["return"]:["return",h(Q)]});s("while",(r,e)=>(r=i(r),e=i(e),t=>{let n;for(;r(t);)try{n=e(t)}catch(o){if(o===U)break;if(o===K)continue;if(o===M)return o[0];throw o}return n}));s("do",(r,e)=>(r=i(r),e=i(e),t=>{let n;do try{n=r(t)}catch(o){if(o===U)break;if(o===K)continue;if(o===M)return o[0];throw o}while(e(t));return n}));s("for",(r,e)=>{if(Array.isArray(r)&&r[0]===";"){let[,t,n,o]=r;return t=t?i(t):null,n=n?i(n):()=>!0,o=o?i(o):null,e=i(e),p=>{let f;for(t?.(p);n(p);o?.(p))try{f=e(p)}catch(u){if(u===U)break;if(u===K)continue;if(u===M)return u[0];throw u}return f}}if(Array.isArray(r)&&(r[0]==="in"||r[0]==="of")){let[t,n,o]=r;if(Array.isArray(n)&&(n[0]==="let"||n[0]==="const"||n[0]==="var")&&(n=n[1]),t==="in")return wt(n,o,e);if(t==="of")return gt(n,o,e)}});var gt=(r,e,t)=>{e=i(e),t=i(t);let n=Array.isArray(r);return o=>{let p,f=n?null:o[r];for(let u of e(o)){n?D(r,u,o):o[r]=u;try{p=t(o)}catch(a){if(a===U)break;if(a===K)continue;if(a===M)return a[0];throw a}}return n||(o[r]=f),p}},wt=(r,e,t)=>{e=i(e),t=i(t);let n=Array.isArray(r);return o=>{let p,f=n?null:o[r];for(let u in e(o)){n?D(r,u,o):o[r]=u;try{p=t(o)}catch(a){if(a===U)break;if(a===K)continue;if(a===M)return a[0];throw a}}return n||(o[r]=f),p}};s("break",()=>()=>{throw U});s("continue",()=>()=>{throw K});s("return",r=>(r=r!==void 0?i(r):null,e=>{throw M[0]=r?.(e),M}));var Z=5;g("try",Z+1,()=>["try",F()]);wr("catch",Z+1,r=>(d(),["catch",r,v(),F()]));wr("finally",Z+1,r=>["finally",r,F()]);g("throw",Z+1,()=>{if(c.asi&&(c.newline=!1),d(),c.newline)throw SyntaxError("Unexpected newline after throw");return["throw",h(Z)]});s("try",r=>(r=r?i(r):null,e=>r?.(e)));s("catch",(r,e,t)=>{let n=r?.[1]?i(r[1]):null;return t=t?i(t):null,o=>{let p;try{p=n?.(o)}catch(f){if(f===U||f===K||f===M)throw f;if(e!==null&&t){let u=e in o,a=o[e];o[e]=f;try{p=t(o)}finally{u?o[e]=a:delete o[e]}}else if(e===null)throw f}return p}});s("finally",(r,e)=>(r=r?i(r):null,e=e?i(e):null,t=>{let n;try{n=r?.(t)}finally{e?.(t)}return n}));s("throw",r=>(r=i(r),e=>{throw r(e)}));var ie=5,Et=20,ne=58,Ct=59,se=125,Rr=0,pe=(r,e=r.length,t=r.charCodeAt(0),n=k[t])=>k[t]=(o,p,f)=>N(r)&&!o&&Rr||n?.(o,p,f);pe("case");pe("default");var oe=r=>{let e=[];for(;(r=d())!==se&&!N("case")&&!N("default");){if(r===Ct){y();continue}e.push(h(ie-.5))||R()}return e.length>1?[";",...e]:e[0]||null},St=()=>{d()===123||R("Expected {"),y(),Rr++;let r=[];try{for(;d()!==se;)if(N("case")){P(l+4),d();let e=h(Et-.5);d()===ne&&y(),r.push(["case",e,oe()])}else N("default")?(P(l+7),d()===ne&&y(),r.push(["default",oe()])):R("Expected case or default")}finally{Rr--}return y(),r};g("switch",ie+1,()=>d()===40&&["switch",v(),...St()]);s("switch",(r,...e)=>(r=i(r),e.length?(e=e.map(t=>[t[0]==="case"?i(t[1]):null,(t[0]==="case"?t[2]:t[1])?.[0]===";"?(t[0]==="case"?t[2]:t[1]).slice(1).map(i):(t[0]==="case"?t[2]:t[1])?[i(t[0]==="case"?t[2]:t[1])]:[]]),t=>{let n=r(t),o=!1,p;for(let[u,a]of e)if(o||u===null||u(t)===n)for(o=!0,f=0;f<a.length;f++)try{p=a[f](t)}catch(w){if(w===U)return p;throw w}var f;return p}):t=>r(t)));var fe=5;g("debugger",fe+1,()=>["debugger"]);g("with",fe+1,()=>(d(),["with",v(),B()]));var Nr=5,$=10,ue=42,kt=k[ue];k[ue]=(r,e)=>r?kt?.(r,e):(y(),"*");T("from",$+1,r=>r?r[0]!=="="&&r[0]!==","&&(d(),["from",r,h($+1)]):!1);T("as",$+2,r=>r?(d(),["as",r,h($+2)]):!1);g("import",Nr,()=>N(".meta")?(y(5),["import.meta"]):["import",h($)]);g("export",Nr,()=>(d(),["export",h(Nr)]));g("default",$+1,()=>d()!==58&&(d(),["default",h($)]));s("import",()=>()=>{});s("export",()=>()=>{});s("from",(r,e)=>()=>{});s("as",(r,e)=>()=>{});s("default",r=>i(r));var le=j.asi??j[";"];c.asi=(r,e,t,n,o)=>e<le&&(n=t(le-.5))&&(o=n?.[0]===";"?n.slice(1):[n],r?.[0]===";"?(r.push(...o),r):[";",r,...o]);export{lr as access,A as binary,i as compile,m as cur,Hr as default,R as err,h as expr,W as group,Tt as id,l as idx,H as literal,q as loc,k as lookup,ur as nary,I as next,s as operator,fr as operators,v as parens,c as parse,_r as peek,j as prec,P as seek,y as skip,d as space,T as token,O as unary,N as word};
package/justin.min.js CHANGED
@@ -1,8 +1,8 @@
1
- var m,c,d=r=>(m=0,c=r,d.newline=!1,r=A(),c[m]?w():r||""),w=(r="Unexpected token",e=m,t=c.slice(0,e).split(`
2
- `),o=t.pop(),i=c.slice(Math.max(0,e-40),e),p="\u032D",f=(c[e]||" ")+p,l=c.slice(e+1,e+20))=>{throw SyntaxError(`${r} at ${t.length+1}:${o.length+1}
1
+ var m,c,d=r=>(m=0,c=r,d.newline=!1,r=A(),c[m]?N():r||""),N=(r="Unexpected token",e=m,t=c.slice(0,e).split(`
2
+ `),o=t.pop(),i=c.slice(Math.max(0,e-40),e),p="\u032D",l=(c[e]||" ")+p,f=c.slice(e+1,e+20))=>{throw SyntaxError(`${r} at ${t.length+1}:${o.length+1}
3
3
  ${c[e-41]!==`
4
- `,""+i}${f}${l}`)},V=(r,e=m)=>(Array.isArray(r)&&(r.loc=e),r),I=(r,e=m,t)=>{for(;t=r(c.charCodeAt(m));)m+=t;return c.slice(e,m)},h=(r=1)=>c[m+=r],U=r=>m=r,A=(r=0,e)=>{let t,o,i,p,f;for(e&&d.asi&&(d.newline=!1);(t=d.space())&&(f=d.newline,1)&&t!==e&&(i=((p=S[t])&&p(o,r))??(o&&f&&d.asi?.(o,r,A))??(!o&&I(d.id)));)o=i;return e&&(t==e?m++:w("Unclosed "+String.fromCharCode(e-(e>42?2:1)))),o},v=d.space=(r,e=m)=>{for(;(r=c.charCodeAt(m))<=32;)d.asi&&r===10&&(d.newline=!0),m++;return r},pr=(r=m)=>{for(;c.charCodeAt(r)<=32;)r++;return c.charCodeAt(r)},Oe=d.id=r=>r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122||r==36||r==95||r>=192&&r!=215&&r!=247,lr=(r,e=r.length)=>c.substr(m,e)===r&&!d.id(c.charCodeAt(m+e)),Te=()=>(h(),A(0,41)),S=[],sr={},C=(r,e=32,t,o=r.charCodeAt(0),i=r.length,p=S[o],f=r.toUpperCase()!==r,l,g)=>(e=sr[r]=!p&&sr[r]||e,S[o]=(y,E,T,L=m)=>(l=T,(T?r==T:(i<2||r.charCodeAt(1)===c.charCodeAt(m+1)&&(i<3||c.substr(m,i)==r))&&(!f||!d.id(c.charCodeAt(m+i)))&&(l=T=r))&&E<e&&(m+=i,(g=t(y))?V(g,L):(m=L,l=0,!f&&!p&&w()),g)||p?.(y,E,l))),u=(r,e,t=!1)=>C(r,e,o=>o&&(i=>i&&[r,o,i])(A(e-(t?.5:0)))),k=(r,e,t)=>C(r,e,o=>t?o&&[r,o]:!o&&(o=A(e-.5))&&[r,o]),P=(r,e)=>C(r,200,t=>!t&&[,e]),Y=(r,e,t)=>C(r,e,(o,i)=>(i=A(e-(t?.5:0)),o?.[0]!==r&&(o=[r,o||null]),i?.[0]===r?o.push(...i.slice(1)):o.push(i||null),o)),_=(r,e)=>C(r[0],e,t=>!t&&[r,A(0,r.charCodeAt(1))||null]),Z=(r,e)=>C(r[0],e,t=>t&&[r,t,A(0,r.charCodeAt(1))||null]),J={},s=(r,e,t=J[r])=>J[r]=(...o)=>e(...o)||t?.(...o),n=r=>Array.isArray(r)?r[0]==null?(e=>()=>e)(r[1]):J[r[0]]?.(...r.slice(1))??w(`Unknown operator: ${r[0]}`,r?.loc):r===void 0?()=>{}:e=>e?.[r];var F=46,B=48,G=57,Br=69,Mr=101,Dr=43,Fr=45,D=95,Gr=110,Xr=97,$r=102,ar=65,Qr=70,fr=r=>r.indexOf("_")<0?r:r.replaceAll("_",""),q=r=>{let e=fr(I(t=>t===F&&c.charCodeAt(m+1)!==F||t>=B&&t<=G||t===D||((t===Br||t===Mr)&&((t=c.charCodeAt(m+1))>=B&&t<=G||t===Dr||t===Fr)?2:0)));return c.charCodeAt(m)===Gr?(h(),[,BigInt(e)]):(r=+e)!=r?w():[,r]},jr={2:r=>r===48||r===49||r===D,8:r=>r>=48&&r<=55||r===D,16:r=>r>=B&&r<=G||r>=Xr&&r<=$r||r>=ar&&r<=Qr||r===D};d.number=null;S[F]=r=>!r&&c.charCodeAt(m+1)!==F&&q();for(let r=B;r<=G;r++)S[r]=e=>e?void 0:q();S[B]=r=>{if(r)return;let e=d.number;if(e){for(let[t,o]of Object.entries(e))if(t[0]==="0"&&c[m+1]?.toLowerCase()===t[1])return h(2),[,parseInt(fr(I(jr[o])),o)]}return q()};var Hr=92,mr=34,ur=39,Kr={n:`
5
- `,r:"\r",t:" ",b:"\b",f:"\f",v:"\v"},cr=r=>(e,t,o="")=>{if(!(e||!d.string?.[String.fromCharCode(r)]))return h(),I(i=>i-r&&(i===Hr?(o+=Kr[c[m+1]]||c[m+1],2):(o+=c[m],1))),c[m]===String.fromCharCode(r)?h():w("Bad string"),[,o]};S[mr]=cr(mr);S[ur]=cr(ur);d.string={'"':!0};var Wr=20;"= += -= *= /= %= |= &= ^= >>= <<=".split(" ").map(r=>u(r,Wr,!0));var Ar=(r,e,t,o)=>typeof r=="string"?i=>e(i,r,i):r[0]==="."?(t=n(r[1]),o=r[2],i=>e(t(i),o,i)):r[0]==="[]"&&r.length===3?(t=n(r[1]),o=n(r[2]),i=>e(t(i),o(i),i)):r[0]==="()"&&r.length===2?Ar(r[1],e):(()=>{throw Error("Invalid assignment target")})(),dr={"=":(r,e,t)=>r[e]=t,"+=":(r,e,t)=>r[e]+=t,"-=":(r,e,t)=>r[e]-=t,"*=":(r,e,t)=>r[e]*=t,"/=":(r,e,t)=>r[e]/=t,"%=":(r,e,t)=>r[e]%=t,"|=":(r,e,t)=>r[e]|=t,"&=":(r,e,t)=>r[e]&=t,"^=":(r,e,t)=>r[e]^=t,">>=":(r,e,t)=>r[e]>>=t,"<<=":(r,e,t)=>r[e]<<=t};for(let r in dr)s(r,(e,t)=>(t=n(t),Ar(e,(o,i,p)=>dr[r](o,i,t(p)))));var zr=30,Jr=40,gr=140;u("!",gr);k("!",gr);u("||",zr);u("&&",Jr);s("!",r=>(r=n(r),e=>!r(e)));s("||",(r,e)=>(r=n(r),e=n(e),t=>r(t)||e(t)));s("&&",(r,e)=>(r=n(r),e=n(e),t=>r(t)&&e(t)));var Vr=50,Yr=60,Zr=70,hr=100,qr=140;u("|",Vr);u("&",Zr);u("^",Yr);u(">>",hr);u("<<",hr);k("~",qr);s("~",r=>(r=n(r),e=>~r(e)));s("|",(r,e)=>(r=n(r),e=n(e),t=>r(t)|e(t)));s("&",(r,e)=>(r=n(r),e=n(e),t=>r(t)&e(t)));s("^",(r,e)=>(r=n(r),e=n(e),t=>r(t)^e(t)));s(">>",(r,e)=>(r=n(r),e=n(e),t=>r(t)>>e(t)));s("<<",(r,e)=>(r=n(r),e=n(e),t=>r(t)<<e(t)));var X=90;u("<",X);u(">",X);u("<=",X);u(">=",X);s(">",(r,e)=>(r=n(r),e=n(e),t=>r(t)>e(t)));s("<",(r,e)=>(r=n(r),e=n(e),t=>r(t)<e(t)));s(">=",(r,e)=>(r=n(r),e=n(e),t=>r(t)>=e(t)));s("<=",(r,e)=>(r=n(r),e=n(e),t=>r(t)<=e(t)));var yr=80;u("==",yr);u("!=",yr);s("==",(r,e)=>(r=n(r),e=n(e),t=>r(t)==e(t)));s("!=",(r,e)=>(r=n(r),e=n(e),t=>r(t)!=e(t)));var Cr=110,x=120,Sr=140;u("+",Cr);u("-",Cr);u("*",x);u("/",x);u("%",x);k("+",Sr);k("-",Sr);s("+",(r,e)=>e!==void 0?(r=n(r),e=n(e),t=>r(t)+e(t)):(r=n(r),t=>+r(t)));s("-",(r,e)=>e!==void 0?(r=n(r),e=n(e),t=>r(t)-e(t)):(r=n(r),t=>-r(t)));s("*",(r,e)=>(r=n(r),e=n(e),t=>r(t)*e(t)));s("/",(r,e)=>(r=n(r),e=n(e),t=>r(t)/e(t)));s("%",(r,e)=>(r=n(r),e=n(e),t=>r(t)%e(t)));var $=150;C("++",$,r=>r?["++",r,null]:["++",A($-1)]);C("--",$,r=>r?["--",r,null]:["--",A($-1)]);var b=(r,e,t,o)=>typeof r=="string"?i=>e(i,r):r[0]==="."?(t=n(r[1]),o=r[2],i=>e(t(i),o)):r[0]==="[]"&&r.length===3?(t=n(r[1]),o=n(r[2]),i=>e(t(i),o(i))):r[0]==="()"&&r.length===2?b(r[1],e):(()=>{throw Error("Invalid increment target")})();s("++",(r,e)=>b(r,e===null?(t,o)=>t[o]++:(t,o)=>++t[o]));s("--",(r,e)=>b(r,e===null?(t,o)=>t[o]--:(t,o)=>--t[o]));var xr=5,br=10,re=170;_("()",re);Y(",",br);Y(";",xr,!0);var Er=(...r)=>(r=r.map(n),e=>{let t;for(let o of r)t=o(e);return t});s(",",Er);s(";",Er);var R=r=>r?.[0]==="_"&&r[1]==="_"||r==="constructor"||r==="prototype",rr=170;Z("[]",rr);u(".",rr);Z("()",rr);var a=r=>{throw Error(r)};s("[]",(r,e)=>e===void 0?(r=r?r[0]===","?r.slice(1):[r]:[],r=r.map(t=>t==null?(()=>{}):t[0]==="..."?(t=n(t[1]),o=>t(o)):(t=n(t),o=>[t(o)])),t=>r.flatMap(o=>o(t))):(e==null&&a("Missing index"),r=n(r),e=n(e),t=>{let o=e(t);return R(o)?void 0:r(t)[o]}));s(".",(r,e)=>(r=n(r),e=e[0]?e:e[1],R(e)?()=>{}:t=>r(t)[e]));s("()",(r,e)=>{if(e===void 0)return r==null?a("Empty ()"):n(r);let t=i=>i?.[0]===","&&i.slice(1).some(p=>p==null||t(p));t(e)&&a("Empty argument");let o=e?e[0]===","?(e=e.slice(1).map(n),i=>e.map(p=>p(i))):(e=n(e),i=>[e(i)]):()=>[];return er(r,(i,p,f)=>i[p](...o(f)))});var N=r=>typeof r=="string"||Array.isArray(r)&&(r[0]==="."||r[0]==="?."||r[0]==="[]"&&r.length===3||r[0]==="?.[]"||r[0]==="()"&&r.length===2&&N(r[1])||r[0]==="{}"),er=(r,e,t,o)=>r==null?a("Empty ()"):r[0]==="()"&&r.length==2?er(r[1],e):typeof r=="string"?i=>e(i,r,i):r[0]==="."?(t=n(r[1]),o=r[2],i=>e(t(i),o,i)):r[0]==="?."?(t=n(r[1]),o=r[2],i=>{let p=t(i);return p==null?void 0:e(p,o,i)}):r[0]==="[]"&&r.length===3?(t=n(r[1]),o=n(r[2]),i=>e(t(i),o(i),i)):r[0]==="?.[]"?(t=n(r[1]),o=n(r[2]),i=>{let p=t(i);return p==null?void 0:e(p,o(i),i)}):(r=n(r),i=>e([r(i)],0,i)),O=er;var kr=new WeakMap,ee=(r,...e)=>typeof r=="string"?n(d(r)):kr.get(r)||kr.set(r,te(r,e)).get(r),wr=57344,te=(r,e)=>{let t=r.reduce((p,f,l)=>p+(l?String.fromCharCode(wr+l-1):"")+f,""),o=d(t),i=p=>{if(typeof p=="string"&&p.length===1){let f=p.charCodeAt(0)-wr,l;if(f>=0&&f<e.length)return l=e[f],oe(l)?l:[,l]}return Array.isArray(p)?p.map(i):p};return n(i(o))},oe=r=>typeof r=="string"||Array.isArray(r)&&(typeof r[0]=="string"||r[0]===void 0),ne=ee;var ie=32,se=d.space;d.comment??={"//":`
4
+ `,""+i}${l}${f}`)},V=(r,e=m)=>(Array.isArray(r)&&(r.loc=e),r),R=(r,e=m,t)=>{for(;t=r(c.charCodeAt(m));)m+=t;return c.slice(e,m)},h=(r=1)=>c[m+=r],U=r=>m=r,A=(r=0,e)=>{let t,o,i,p,l;for(e&&d.asi&&(d.newline=!1);(t=d.space())&&(l=d.newline,1)&&t!==e&&(i=((p=w[t])&&p(o,r))??(o&&l&&d.asi?.(o,r,A))??(!o&&R(d.id)));)o=i;return e&&(t==e?m++:N("Unclosed "+String.fromCharCode(e-(e>42?2:1)))),o},v=d.space=(r,e=m)=>{for(;(r=c.charCodeAt(m))<=32;)d.asi&&r===10&&(d.newline=!0),m++;return r},pr=(r=m)=>{for(;c.charCodeAt(r)<=32;)r++;return c.charCodeAt(r)},Te=d.id=r=>r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122||r==36||r==95||r>=192&&r!=215&&r!=247,lr=(r,e=r.length)=>c.substr(m,e)===r&&!d.id(c.charCodeAt(m+e)),ae=()=>(h(),A(0,41)),w=[],sr={},E=(r,e=32,t,o=r.charCodeAt(0),i=r.length,p=w[o],l=r.toUpperCase()!==r,f,g)=>(e=sr[r]=!p&&sr[r]||e,w[o]=(C,I,y,S=m)=>(f=y,(y?r==y:(i<2||r.charCodeAt(1)===c.charCodeAt(m+1)&&(i<3||c.substr(m,i)==r))&&(!l||!d.id(c.charCodeAt(m+i)))&&(f=y=r))&&I<e&&(m+=i,(g=t(C))?V(g,S):(m=S,f=0,!l&&!p&&N()),g)||p?.(C,I,f))),u=(r,e,t=!1)=>E(r,e,o=>o&&(i=>i&&[r,o,i])(A(e-(t?.5:0)))),k=(r,e,t)=>E(r,e,o=>t?o&&[r,o]:!o&&(o=A(e-.5))&&[r,o]),P=(r,e)=>E(r,200,t=>!t&&[,e]),Y=(r,e,t)=>E(r,e,(o,i)=>(i=A(e-(t?.5:0)),o?.[0]!==r&&(o=[r,o||null]),i?.[0]===r?o.push(...i.slice(1)):o.push(i||null),o)),_=(r,e)=>E(r[0],e,t=>!t&&[r,A(0,r.charCodeAt(1))||null]),Z=(r,e)=>E(r[0],e,t=>t&&[r,t,A(0,r.charCodeAt(1))||null]),J={},s=(r,e,t=J[r])=>J[r]=(...o)=>e(...o)||t?.(...o),n=r=>Array.isArray(r)?r[0]==null?(e=>()=>e)(r[1]):J[r[0]]?.(...r.slice(1))??N(`Unknown operator: ${r[0]}`,r?.loc):r===void 0?()=>{}:e=>e?.[r];var F=46,B=48,G=57,_r=69,Br=101,Mr=43,Dr=45,D=95,Fr=110,Gr=97,Xr=102,$r=65,Qr=70,fr=r=>r.indexOf("_")<0?r:r.replaceAll("_",""),q=r=>{let e=fr(R(t=>t===F&&c.charCodeAt(m+1)!==F||t>=B&&t<=G||t===D||((t===_r||t===Br)&&((t=c.charCodeAt(m+1))>=B&&t<=G||t===Mr||t===Dr)?2:0)));return c.charCodeAt(m)===Fr?(h(),[,BigInt(e)]):(r=+e)!=r?N():[,r]},Hr={2:r=>r===48||r===49||r===D,8:r=>r>=48&&r<=55||r===D,16:r=>r>=B&&r<=G||r>=Gr&&r<=Xr||r>=$r&&r<=Qr||r===D};d.number=null;w[F]=r=>!r&&c.charCodeAt(m+1)!==F&&q();for(let r=B;r<=G;r++)w[r]=e=>e?void 0:q();w[B]=r=>{if(r)return;let e=d.number;if(e){for(let[t,o]of Object.entries(e))if(t[0]==="0"&&c[m+1]?.toLowerCase()===t[1])return h(2),[,parseInt(fr(R(Hr[o])),o)]}return q()};var Kr=92,mr=34,ur=39,jr={n:`
5
+ `,r:"\r",t:" ",b:"\b",f:"\f",v:"\v"},cr=r=>(e,t,o="")=>{if(!(e||!d.string?.[String.fromCharCode(r)]))return h(),R(i=>i-r&&(i===Kr?(o+=jr[c[m+1]]||c[m+1],2):(o+=c[m],1))),c[m]===String.fromCharCode(r)?h():N("Bad string"),[,o]};w[mr]=cr(mr);w[ur]=cr(ur);d.string={'"':!0};var Wr=20;"= += -= *= /= %= |= &= ^= >>= <<=".split(" ").map(r=>u(r,Wr,!0));var Ar=(r,e,t,o)=>typeof r=="string"?i=>e(i,r,i):r[0]==="."?(t=n(r[1]),o=r[2],i=>e(t(i),o,i)):r[0]==="[]"&&r.length===3?(t=n(r[1]),o=n(r[2]),i=>e(t(i),o(i),i)):r[0]==="()"&&r.length===2?Ar(r[1],e):(()=>{throw Error("Invalid assignment target")})(),dr={"=":(r,e,t)=>r[e]=t,"+=":(r,e,t)=>r[e]+=t,"-=":(r,e,t)=>r[e]-=t,"*=":(r,e,t)=>r[e]*=t,"/=":(r,e,t)=>r[e]/=t,"%=":(r,e,t)=>r[e]%=t,"|=":(r,e,t)=>r[e]|=t,"&=":(r,e,t)=>r[e]&=t,"^=":(r,e,t)=>r[e]^=t,">>=":(r,e,t)=>r[e]>>=t,"<<=":(r,e,t)=>r[e]<<=t};for(let r in dr)s(r,(e,t)=>(t=n(t),Ar(e,(o,i,p)=>dr[r](o,i,t(p)))));var zr=30,Jr=40,gr=140;u("!",gr);k("!",gr);u("||",zr);u("&&",Jr);s("!",r=>(r=n(r),e=>!r(e)));s("||",(r,e)=>(r=n(r),e=n(e),t=>r(t)||e(t)));s("&&",(r,e)=>(r=n(r),e=n(e),t=>r(t)&&e(t)));var Vr=50,Yr=60,Zr=70,hr=100,qr=140;u("|",Vr);u("&",Zr);u("^",Yr);u(">>",hr);u("<<",hr);k("~",qr);s("~",r=>(r=n(r),e=>~r(e)));s("|",(r,e)=>(r=n(r),e=n(e),t=>r(t)|e(t)));s("&",(r,e)=>(r=n(r),e=n(e),t=>r(t)&e(t)));s("^",(r,e)=>(r=n(r),e=n(e),t=>r(t)^e(t)));s(">>",(r,e)=>(r=n(r),e=n(e),t=>r(t)>>e(t)));s("<<",(r,e)=>(r=n(r),e=n(e),t=>r(t)<<e(t)));var X=90;u("<",X);u(">",X);u("<=",X);u(">=",X);s(">",(r,e)=>(r=n(r),e=n(e),t=>r(t)>e(t)));s("<",(r,e)=>(r=n(r),e=n(e),t=>r(t)<e(t)));s(">=",(r,e)=>(r=n(r),e=n(e),t=>r(t)>=e(t)));s("<=",(r,e)=>(r=n(r),e=n(e),t=>r(t)<=e(t)));var yr=80;u("==",yr);u("!=",yr);s("==",(r,e)=>(r=n(r),e=n(e),t=>r(t)==e(t)));s("!=",(r,e)=>(r=n(r),e=n(e),t=>r(t)!=e(t)));var Cr=110,x=120,Sr=140;u("+",Cr);u("-",Cr);u("*",x);u("/",x);u("%",x);k("+",Sr);k("-",Sr);s("+",(r,e)=>e!==void 0?(r=n(r),e=n(e),t=>r(t)+e(t)):(r=n(r),t=>+r(t)));s("-",(r,e)=>e!==void 0?(r=n(r),e=n(e),t=>r(t)-e(t)):(r=n(r),t=>-r(t)));s("*",(r,e)=>(r=n(r),e=n(e),t=>r(t)*e(t)));s("/",(r,e)=>(r=n(r),e=n(e),t=>r(t)/e(t)));s("%",(r,e)=>(r=n(r),e=n(e),t=>r(t)%e(t)));var $=150;E("++",$,r=>r?["++",r,null]:["++",A($-1)]);E("--",$,r=>r?["--",r,null]:["--",A($-1)]);var b=(r,e,t,o)=>typeof r=="string"?i=>e(i,r):r[0]==="."?(t=n(r[1]),o=r[2],i=>e(t(i),o)):r[0]==="[]"&&r.length===3?(t=n(r[1]),o=n(r[2]),i=>e(t(i),o(i))):r[0]==="()"&&r.length===2?b(r[1],e):(()=>{throw Error("Invalid increment target")})();s("++",(r,e)=>b(r,e===null?(t,o)=>t[o]++:(t,o)=>++t[o]));s("--",(r,e)=>b(r,e===null?(t,o)=>t[o]--:(t,o)=>--t[o]));var xr=5,br=10,re=170;_("()",re);Y(",",br);Y(";",xr,!0);var Er=(...r)=>(r=r.map(n),e=>{let t;for(let o of r)t=o(e);return t});s(",",Er);s(";",Er);var a=r=>r?.[0]==="_"&&r[1]==="_"||r==="constructor"||r==="prototype",rr=170;Z("[]",rr);u(".",rr);Z("()",rr);var Q=r=>{throw Error(r)};s("[]",(r,e)=>e===void 0?(r=r?r[0]===","?r.slice(1):[r]:[],r=r.map(t=>t==null?(()=>{}):t[0]==="..."?(t=n(t[1]),o=>t(o)):(t=n(t),o=>[t(o)])),t=>r.flatMap(o=>o(t))):(e==null&&Q("Missing index"),r=n(r),e=n(e),t=>{let o=e(t);return a(o)?void 0:r(t)[o]}));s(".",(r,e)=>(r=n(r),e=e[0]?e:e[1],a(e)?()=>{}:t=>r(t)[e]));s("()",(r,e)=>{if(e===void 0)return r==null?Q("Empty ()"):n(r);let t=i=>i?.[0]===","&&i.slice(1).some(p=>p==null||t(p));t(e)&&Q("Empty argument");let o=e?e[0]===","?(e=e.slice(1).map(n),i=>e.map(p=>p(i))):(e=n(e),i=>[e(i)]):()=>[];return er(r,(i,p,l)=>i[p](...o(l)))});var T=r=>typeof r=="string"||Array.isArray(r)&&(r[0]==="."||r[0]==="?."||r[0]==="[]"&&r.length===3||r[0]==="?.[]"||r[0]==="()"&&r.length===2&&T(r[1])||r[0]==="{}"),er=(r,e,t,o)=>r==null?Q("Empty ()"):r[0]==="()"&&r.length==2?er(r[1],e):typeof r=="string"?i=>e(i,r,i):r[0]==="."?(t=n(r[1]),o=r[2],i=>e(t(i),o,i)):r[0]==="?."?(t=n(r[1]),o=r[2],i=>{let p=t(i);return p==null?void 0:e(p,o,i)}):r[0]==="[]"&&r.length===3?(t=n(r[1]),o=n(r[2]),i=>e(t(i),o(i),i)):r[0]==="?.[]"?(t=n(r[1]),o=n(r[2]),i=>{let p=t(i);return p==null?void 0:e(p,o(i),i)}):(r=n(r),i=>e([r(i)],0,i)),O=er;var wr=new WeakMap,ee=(r,...e)=>typeof r=="string"?n(d(r)):wr.get(r)||wr.set(r,te(r,e)).get(r),Ir=57344,te=(r,e)=>{let t=r.reduce((p,l,f)=>p+(f?String.fromCharCode(Ir+f-1):"")+l,""),o=d(t),i=p=>{if(typeof p=="string"&&p.length===1){let l=p.charCodeAt(0)-Ir,f;if(l>=0&&l<e.length)return f=e[l],oe(f)?f:[,f]}return Array.isArray(p)?p.map(i):p};return n(i(o))},oe=r=>typeof r=="string"||Array.isArray(r)&&(typeof r[0]=="string"||r[0]===void 0),ne=ee;var ie=32,se=d.space;d.comment??={"//":`
6
6
  `,"/*":"*/"};var tr;d.space=()=>{tr||(tr=Object.entries(d.comment).map(([i,p])=>[i,p,i.charCodeAt(0)]));for(var r;r=se();){for(var e=0,t;t=tr[e++];)if(r===t[2]&&c.substr(m,t[0].length)===t[0]){var o=m+t[0].length;if(t[1]===`
7
- `)for(;c.charCodeAt(o)>=ie;)o++;else{for(;c[o]&&c.substr(o,t[1].length)!==t[1];)o++;c[o]&&(o+=t[1].length)}U(o),r=0;break}if(r)return r}return r};var Ir=80;u("===",Ir);u("!==",Ir);s("===",(r,e)=>(r=n(r),e=n(e),t=>r(t)===e(t)));s("!==",(r,e)=>(r=n(r),e=n(e),t=>r(t)!==e(t)));var pe=30;u("??",pe);s("??",(r,e)=>(r=n(r),e=n(e),t=>r(t)??e(t)));var le=130,fe=20;u("**",le,!0);u("**=",fe,!0);s("**",(r,e)=>(r=n(r),e=n(e),t=>r(t)**e(t)));var me=r=>{throw Error(r)};s("**=",(r,e)=>(N(r)||me("Invalid assignment target"),e=n(e),O(r,(t,o,i)=>t[o]**=e(i))));var Nr=90;u("in",Nr);u("of",Nr);s("in",(r,e)=>(r=n(r),e=n(e),t=>r(t)in e(t)));var ue=20,ce=100,de=r=>{throw Error(r)};u(">>>",ce);u(">>>=",ue,!0);s(">>>",(r,e)=>(r=n(r),e=n(e),t=>r(t)>>>e(t)));s(">>>=",(r,e)=>(N(r)||de("Invalid assignment target"),e=n(e),O(r,(t,o,i)=>t[o]>>>=e(i))));var Ae=r=>r[0]?.[0]===","?r[0].slice(1):r,Q=(r,e,t)=>{if(typeof r=="string"){t[r]=e;return}let[o,...i]=r,p=Ae(i);if(o==="{}"){let f=[];for(let l of p){if(Array.isArray(l)&&l[0]==="..."){let L={};for(let z in e)f.includes(z)||(L[z]=e[z]);t[l[1]]=L;break}let g,y,E;typeof l=="string"?g=y=l:l[0]==="="?(typeof l[1]=="string"?g=y=l[1]:[,g,y]=l[1],E=l[2]):[,g,y]=l,f.push(g);let T=e[g];T===void 0&&E&&(T=n(E)(t)),Q(y,T,t)}}else if(o==="[]"){let f=0;for(let l of p){if(l===null){f++;continue}if(Array.isArray(l)&&l[0]==="..."){t[l[1]]=e.slice(f);break}let g=l,y;Array.isArray(l)&&l[0]==="="&&([,g,y]=l);let E=e[f++];E===void 0&&y&&(E=n(y)(t)),Q(g,E,t)}}};var or=20,j=r=>{throw Error(r)};u("||=",or,!0);u("&&=",or,!0);u("??=",or,!0);s("=",(r,e)=>{if(Array.isArray(r)&&(r[0]==="let"||r[0]==="const"||r[0]==="var")){let t=r[1];return e=n(e),typeof t=="string"?o=>{o[t]=e(o)}:o=>Q(t,e(o),o)}return N(r)||j("Invalid assignment target"),e=n(e),O(r,(t,o,i)=>t[o]=e(i))});s("||=",(r,e)=>(N(r)||j("Invalid assignment target"),e=n(e),O(r,(t,o,i)=>t[o]||=e(i))));s("&&=",(r,e)=>(N(r)||j("Invalid assignment target"),e=n(e),O(r,(t,o,i)=>t[o]&&=e(i))));s("??=",(r,e)=>(N(r)||j("Invalid assignment target"),e=n(e),O(r,(t,o,i)=>t[o]??=e(i))));var H=(r,e,t,o=r.charCodeAt(0),i=r.length,p=S[o],f)=>S[o]=(l,g,y,E=m)=>!l&&(y?r==y:(i<2||c.substr(m,i)==r)&&(y=r))&&g<e&&!d.id(c.charCodeAt(m+i))&&pr(m+i)!==58&&(U(m+i),(f=t())?V(f,E):U(E),f)||p?.(l,g,y);P("true",!0);P("false",!1);P("null",null);H("undefined",200,()=>[]);P("NaN",NaN);P("Infinity",1/0);var nr=20;C("?",nr,(r,e,t)=>r&&(e=A(nr-1))&&I(o=>o===58)&&(t=A(nr-1),["?",r,e,t]));s("?",(r,e,t)=>(r=n(r),e=n(e),t=n(t),o=>r(o)?e(o):t(o)));var Rr=[];var ge=20;u("=>",ge,!0);s("=>",(r,e)=>{r=r?.[0]==="()"?r[1]:r,r=r?r[0]===","?r.slice(1):[r]:[];let t=-1,o=null;r.length&&Array.isArray(r[r.length-1])&&r[r.length-1][0]==="..."&&(t=r.length-1,o=r[t][1],r=r.slice(0,-1));let i=e?.[0]==="{}";return e=n(i?["{",e[1]]:e),(p=null)=>(p=Object.create(p),(...f)=>{r.forEach((l,g)=>p[l]=f[g]),o&&(p[o]=f.slice(t));try{let l=e(p);return i?void 0:l}catch(l){if(l===Rr)return l[0];throw l}})});var he=140;k("...",he);s("...",r=>(r=n(r),e=>Object.entries(r(e))));var Or=170;C("?.",Or,(r,e)=>{if(!r)return;let t=v();return t===40?(h(),["?.()",r,A(0,41)||null]):t===91?(h(),["?.[]",r,A(0,93)]):(e=A(Or),e?["?.",r,e]:void 0)});s("?.",(r,e)=>(r=n(r),R(e)?()=>{}:t=>r(t)?.[e]));s("?.[]",(r,e)=>(r=n(r),e=n(e),t=>{let o=e(t);return R(o)?void 0:r(t)?.[o]}));s("?.()",(r,e)=>{let t=e?e[0]===","?(e=e.slice(1).map(n),i=>e.map(p=>p(i))):(e=n(e),i=>[e(i)]):()=>[];if(r[0]==="?."){let i=n(r[1]),p=r[2];return R(p)?()=>{}:f=>i(f)?.[p]?.(...t(f))}if(r[0]==="?.[]"){let i=n(r[1]),p=n(r[2]);return f=>{let l=i(f),g=p(f);return R(g)?void 0:l?.[g]?.(...t(f))}}if(r[0]==="."){let i=n(r[1]),p=r[2];return R(p)?()=>{}:f=>i(f)?.[p]?.(...t(f))}if(r[0]==="[]"&&r.length===3){let i=n(r[1]),p=n(r[2]);return f=>{let l=i(f),g=p(f);return R(g)?void 0:l?.[g]?.(...t(f))}}let o=n(r);return i=>o(i)?.(...t(i))});var M=140;k("typeof",M);k("void",M);k("delete",M);H("new",M,()=>lr(".target")?(h(7),["new.target"]):["new",A(M)]);s("typeof",r=>(r=n(r),e=>typeof r(e)));s("void",r=>(r=n(r),e=>(r(e),void 0)));s("delete",r=>{if(r[0]==="."){let e=n(r[1]),t=r[2];return o=>delete e(o)[t]}if(r[0]==="[]"){let e=n(r[1]),t=n(r[2]);return o=>delete e(o)[t(o)]}return()=>!0});s("new",r=>{let e=n(r?.[0]==="()"?r[1]:r),t=r?.[0]==="()"?r[2]:null,o=t?t[0]===","?(i=>p=>i.map(f=>f(p)))(t.slice(1).map(n)):(i=>p=>[i(p)])(n(t)):()=>[];return i=>new(e(i))(...o(i))});var K=Symbol("accessor"),ir=20,ye=40,Tr=41,vr=123,Pr=125,Lr=r=>e=>{if(e)return;v();let t=I(d.id);if(!t||(v(),c.charCodeAt(m)!==ye))return!1;h();let o=A(0,Tr);return v(),c.charCodeAt(m)!==vr?!1:(h(),[r,t,o,A(0,Pr)])};C("get",ir-1,Lr("get"));C("set",ir-1,Lr("set"));C("(",ir-1,r=>{if(!r||typeof r!="string")return;let e=A(0,Tr)||null;if(v(),c.charCodeAt(m)===vr)return h(),[":",r,["=>",["()",e],A(0,Pr)||null]]});s("get",(r,e)=>(e=e?n(e):()=>{},t=>[[K,r,{get:function(){let o=Object.create(t||{});return o.this=this,e(o)}}]]));s("set",(r,e,t)=>(t=t?n(t):()=>{},o=>[[K,r,{set:function(i){let p=Object.create(o||{});p.this=this,p[e]=i,t(p)}}]]));var Ce=20,Ur=200,Se=r=>r==null||typeof r=="string"||[":",",","...","get","set"].includes(r[0]);_("[]",Ur);_("{}",Ur);u(":",Ce-1,!0);s("{}",(r,e)=>{if(e!==void 0)return;if(!Se(r))return n(["{",r]);r=r?r[0]!==","?[r]:r.slice(1):[];let t=r.map(o=>n(typeof o=="string"?[":",o,o]:o));return o=>{let i={},p={};for(let f of t.flatMap(l=>l(o)))if(f[0]===K){let[,l,g]=f;p[l]={...p[l],...g,configurable:!0,enumerable:!0}}else i[f[0]]=f[1];for(let f in p)Object.defineProperty(i,f,p[f]);return i}});s("{",r=>(r=r?n(r):()=>{},e=>r(Object.create(e))));s(":",(r,e)=>(e=n(e),Array.isArray(r)?(r=n(r),t=>[[r(t),e(t)]]):t=>[[r,e(t)]]));var Ee=170,W=96,ke=36,we=123,Ie=92,Ne={n:`
8
- `,r:"\r",t:" ",b:"\b",f:"\f",v:"\v"},_r=()=>{let r=[];for(let e="",t;(t=c.charCodeAt(m))!==W;)t?t===Ie?(h(),e+=Ne[c[m]]||c[m],h()):t===ke&&c.charCodeAt(m+1)===we?(e&&r.push([,e]),e="",h(2),r.push(A(0,125))):(e+=c[m],h(),t=c.charCodeAt(m),t===W&&e&&r.push([,e])):w("Unterminated template");return h(),r},Re=S[W];S[W]=(r,e)=>r&&e<Ee?d.asi&&d.newline?void 0:(h(),["``",r,..._r()]):r?Re?.(r,e):(h(),(t=>t.length<2&&t[0]?.[0]===void 0?t[0]||[,""]:["`",...t])(_r()));s("`",(...r)=>(r=r.map(n),e=>r.map(t=>t(e)).join("")));s("``",(r,...e)=>{r=n(r);let t=[],o=[];for(let p of e)Array.isArray(p)&&p[0]===void 0?t.push(p[1]):o.push(n(p));let i=Object.assign([...t],{raw:t});return p=>r(p)(i,...o.map(f=>f(p)))});d.string["'"]=!0;d.number={"0x":16,"0b":2,"0o":8};export{Z as access,u as binary,n as compile,c as cur,ne as default,w as err,A as expr,_ as group,Oe as id,m as idx,P as literal,V as loc,S as lookup,Y as nary,I as next,s as operator,J as operators,Te as parens,d as parse,pr as peek,sr as prec,U as seek,h as skip,v as space,C as token,k as unary,lr as word};
7
+ `)for(;c.charCodeAt(o)>=ie;)o++;else{for(;c[o]&&c.substr(o,t[1].length)!==t[1];)o++;c[o]&&(o+=t[1].length)}U(o),r=0;break}if(r)return r}return r};var kr=80;u("===",kr);u("!==",kr);s("===",(r,e)=>(r=n(r),e=n(e),t=>r(t)===e(t)));s("!==",(r,e)=>(r=n(r),e=n(e),t=>r(t)!==e(t)));var pe=30;u("??",pe);s("??",(r,e)=>(r=n(r),e=n(e),t=>r(t)??e(t)));var le=130,fe=20;u("**",le,!0);u("**=",fe,!0);s("**",(r,e)=>(r=n(r),e=n(e),t=>r(t)**e(t)));var me=r=>{throw Error(r)};s("**=",(r,e)=>(T(r)||me("Invalid assignment target"),e=n(e),O(r,(t,o,i)=>t[o]**=e(i))));var Nr=90;u("in",Nr);u("of",Nr);s("in",(r,e)=>(r=n(r),e=n(e),t=>r(t)in e(t)));var ue=20,ce=100,de=r=>{throw Error(r)};u(">>>",ce);u(">>>=",ue,!0);s(">>>",(r,e)=>(r=n(r),e=n(e),t=>r(t)>>>e(t)));s(">>>=",(r,e)=>(T(r)||de("Invalid assignment target"),e=n(e),O(r,(t,o,i)=>t[o]>>>=e(i))));var Ae=r=>r[0]?.[0]===","?r[0].slice(1):r,H=(r,e,t)=>{if(typeof r=="string"){t[r]=e;return}let[o,...i]=r,p=Ae(i);if(o==="{}"){let l=[];for(let f of p){if(Array.isArray(f)&&f[0]==="..."){let S={};for(let L in e)l.includes(L)||(S[L]=e[L]);t[f[1]]=S;break}let g,C,I;typeof f=="string"?g=C=f:f[0]==="="?(typeof f[1]=="string"?g=C=f[1]:[,g,C]=f[1],I=f[2]):[,g,C]=f,l.push(g);let y=e[g];y===void 0&&I&&(y=n(I)(t)),H(C,y,t)}}else if(o==="[]"){let l=0;for(let f of p){if(f===null){l++;continue}if(Array.isArray(f)&&f[0]==="..."){t[f[1]]=e.slice(l);break}let g=f,C;Array.isArray(f)&&f[0]==="="&&([,g,C]=f);let I=e[l++];I===void 0&&C&&(I=n(C)(t)),H(g,I,t)}}};var or=20,K=r=>{throw Error(r)};u("||=",or,!0);u("&&=",or,!0);u("??=",or,!0);s("=",(r,e)=>{if(Array.isArray(r)&&(r[0]==="let"||r[0]==="const"||r[0]==="var")){let t=r[1];return e=n(e),typeof t=="string"?o=>{o[t]=e(o)}:o=>H(t,e(o),o)}return T(r)||K("Invalid assignment target"),e=n(e),O(r,(t,o,i)=>t[o]=e(i))});s("||=",(r,e)=>(T(r)||K("Invalid assignment target"),e=n(e),O(r,(t,o,i)=>t[o]||=e(i))));s("&&=",(r,e)=>(T(r)||K("Invalid assignment target"),e=n(e),O(r,(t,o,i)=>t[o]&&=e(i))));s("??=",(r,e)=>(T(r)||K("Invalid assignment target"),e=n(e),O(r,(t,o,i)=>t[o]??=e(i))));var j=(r,e,t,o=r.charCodeAt(0),i=r.length,p=w[o],l)=>w[o]=(f,g,C,I=m)=>!f&&(C?r==C:(i<2||c.substr(m,i)==r)&&(C=r))&&g<e&&!d.id(c.charCodeAt(m+i))&&pr(m+i)!==58&&(U(m+i),(l=t())?V(l,I):U(I),l)||p?.(f,g,C);P("true",!0);P("false",!1);P("null",null);j("undefined",200,()=>[]);P("NaN",NaN);P("Infinity",1/0);var nr=20;E("?",nr,(r,e,t)=>r&&(e=A(nr-1))&&R(o=>o===58)&&(t=A(nr-1),["?",r,e,t]));s("?",(r,e,t)=>(r=n(r),e=n(e),t=n(t),o=>r(o)?e(o):t(o)));var Rr=[];var ge=20;u("=>",ge,!0);s("=>",(r,e)=>{r=r?.[0]==="()"?r[1]:r;let t=r?r[0]===","?r.slice(1):[r]:[],o=-1,i=null,p=t[t.length-1];Array.isArray(p)&&p[0]==="..."&&(o=t.length-1,i=p[1],t.length--);let l=e?.[0]==="{}";return e=n(l?["{",e[1]]:e),f=>(...g)=>{let C={};t.forEach((y,S)=>C[y]=g[S]),i&&(C[i]=g.slice(o));let I=new Proxy(C,{get:(y,S)=>S in y?y[S]:f?.[S],set:(y,S,L)=>((S in y?y:f)[S]=L,!0),has:(y,S)=>S in y||(f?S in f:!1)});try{let y=e(I);return l?void 0:y}catch(y){if(y===Rr)return y[0];throw y}}});var he=140;k("...",he);s("...",r=>(r=n(r),e=>Object.entries(r(e))));var Tr=170;E("?.",Tr,(r,e)=>{if(!r)return;let t=v();return t===40?(h(),["?.()",r,A(0,41)||null]):t===91?(h(),["?.[]",r,A(0,93)]):(e=A(Tr),e?["?.",r,e]:void 0)});s("?.",(r,e)=>(r=n(r),a(e)?()=>{}:t=>r(t)?.[e]));s("?.[]",(r,e)=>(r=n(r),e=n(e),t=>{let o=e(t);return a(o)?void 0:r(t)?.[o]}));s("?.()",(r,e)=>{let t=e?e[0]===","?(e=e.slice(1).map(n),i=>e.map(p=>p(i))):(e=n(e),i=>[e(i)]):()=>[];if(r[0]==="?."){let i=n(r[1]),p=r[2];return a(p)?()=>{}:l=>i(l)?.[p]?.(...t(l))}if(r[0]==="?.[]"){let i=n(r[1]),p=n(r[2]);return l=>{let f=i(l),g=p(l);return a(g)?void 0:f?.[g]?.(...t(l))}}if(r[0]==="."){let i=n(r[1]),p=r[2];return a(p)?()=>{}:l=>i(l)?.[p]?.(...t(l))}if(r[0]==="[]"&&r.length===3){let i=n(r[1]),p=n(r[2]);return l=>{let f=i(l),g=p(l);return a(g)?void 0:f?.[g]?.(...t(l))}}let o=n(r);return i=>o(i)?.(...t(i))});var M=140;k("typeof",M);k("void",M);k("delete",M);j("new",M,()=>lr(".target")?(h(7),["new.target"]):["new",A(M)]);s("typeof",r=>(r=n(r),e=>typeof r(e)));s("void",r=>(r=n(r),e=>(r(e),void 0)));s("delete",r=>{if(r[0]==="."){let e=n(r[1]),t=r[2];return o=>delete e(o)[t]}if(r[0]==="[]"){let e=n(r[1]),t=n(r[2]);return o=>delete e(o)[t(o)]}return()=>!0});s("new",r=>{let e=n(r?.[0]==="()"?r[1]:r),t=r?.[0]==="()"?r[2]:null,o=t?t[0]===","?(i=>p=>i.map(l=>l(p)))(t.slice(1).map(n)):(i=>p=>[i(p)])(n(t)):()=>[];return i=>new(e(i))(...o(i))});var W=Symbol("accessor"),ir=20,ye=40,ar=41,Or=123,vr=125,Pr=r=>e=>{if(e)return;v();let t=R(d.id);if(!t||(v(),c.charCodeAt(m)!==ye))return!1;h();let o=A(0,ar);return v(),c.charCodeAt(m)!==Or?!1:(h(),[r,t,o,A(0,vr)])};E("get",ir-1,Pr("get"));E("set",ir-1,Pr("set"));E("(",ir-1,r=>{if(!r||typeof r!="string")return;let e=A(0,ar)||null;if(v(),c.charCodeAt(m)===Or)return h(),[":",r,["=>",["()",e],A(0,vr)||null]]});s("get",(r,e)=>(e=e?n(e):()=>{},t=>[[W,r,{get:function(){let o=Object.create(t||{});return o.this=this,e(o)}}]]));s("set",(r,e,t)=>(t=t?n(t):()=>{},o=>[[W,r,{set:function(i){let p=Object.create(o||{});p.this=this,p[e]=i,t(p)}}]]));var Ce=20,Lr=200,Se=r=>r==null||typeof r=="string"||[":",",","...","get","set"].includes(r[0]);_("[]",Lr);_("{}",Lr);u(":",Ce-1,!0);s("{}",(r,e)=>{if(e!==void 0)return;if(!Se(r))return n(["{",r]);r=r?r[0]!==","?[r]:r.slice(1):[];let t=r.map(o=>n(typeof o=="string"?[":",o,o]:o));return o=>{let i={},p={};for(let l of t.flatMap(f=>f(o)))if(l[0]===W){let[,f,g]=l;p[f]={...p[f],...g,configurable:!0,enumerable:!0}}else i[l[0]]=l[1];for(let l in p)Object.defineProperty(i,l,p[l]);return i}});s("{",r=>(r=r?n(r):()=>{},e=>r(Object.create(e))));s(":",(r,e)=>(e=n(e),Array.isArray(r)?(r=n(r),t=>[[r(t),e(t)]]):t=>[[r,e(t)]]));var Ee=170,z=96,we=36,Ie=123,ke=92,Ne={n:`
8
+ `,r:"\r",t:" ",b:"\b",f:"\f",v:"\v"},Ur=()=>{let r=[];for(let e="",t;(t=c.charCodeAt(m))!==z;)t?t===ke?(h(),e+=Ne[c[m]]||c[m],h()):t===we&&c.charCodeAt(m+1)===Ie?(e&&r.push([,e]),e="",h(2),r.push(A(0,125))):(e+=c[m],h(),t=c.charCodeAt(m),t===z&&e&&r.push([,e])):N("Unterminated template");return h(),r},Re=w[z];w[z]=(r,e)=>r&&e<Ee?d.asi&&d.newline?void 0:(h(),["``",r,...Ur()]):r?Re?.(r,e):(h(),(t=>t.length<2&&t[0]?.[0]===void 0?t[0]||[,""]:["`",...t])(Ur()));s("`",(...r)=>(r=r.map(n),e=>r.map(t=>t(e)).join("")));s("``",(r,...e)=>{r=n(r);let t=[],o=[];for(let p of e)Array.isArray(p)&&p[0]===void 0?t.push(p[1]):o.push(n(p));let i=Object.assign([...t],{raw:t});return p=>r(p)(i,...o.map(l=>l(p)))});d.string["'"]=!0;d.number={"0x":16,"0b":2,"0o":8};export{Z as access,u as binary,n as compile,c as cur,ne as default,N as err,A as expr,_ as group,Te as id,m as idx,P as literal,V as loc,w as lookup,Y as nary,R as next,s as operator,J as operators,ae as parens,d as parse,pr as peek,sr as prec,U as seek,h as skip,v as space,E as token,k as unary,lr as word};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "subscript",
3
- "version": "10.1.7",
3
+ "version": "10.1.8",
4
4
  "description": "Tiny expression parser & evaluator",
5
5
  "main": "subscript.js",
6
6
  "module": "subscript.js",