subscript 10.5.2 → 10.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/feature/accessor.js +41 -2
- package/feature/async.js +5 -0
- package/feature/switch.js +4 -0
- package/feature/var.js +30 -1
- package/jessie.min.js +8 -8
- package/package.json +1 -1
package/feature/accessor.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Object accessor properties (getters/setters) - parse half
|
|
2
|
+
* Object accessor properties (getters/setters) + method shorthand - parse half
|
|
3
3
|
*
|
|
4
4
|
* { get x() { body } } → ['{}', ['get', 'x', body]]
|
|
5
5
|
* { set x(v) { body } } → ['{}', ['set', 'x', 'v', body]]
|
|
6
|
+
* { *g() { body } } → ['{}', [':', 'g', ['function*', null, params, body]]]
|
|
6
7
|
*/
|
|
7
|
-
import { token, expr, skip, next, parse, cur, idx } from '../parse.js';
|
|
8
|
+
import { token, expr, skip, next, parse, cur, idx, prec, seek } from '../parse.js';
|
|
8
9
|
|
|
9
10
|
const ASSIGN = 20, TOKEN = 200;
|
|
10
11
|
const LF = 10, CR = 13;
|
|
@@ -47,6 +48,44 @@ const accessor = (kind) => a => {
|
|
|
47
48
|
token('get', ASSIGN - 1, accessor('get'));
|
|
48
49
|
token('set', ASSIGN - 1, accessor('set'));
|
|
49
50
|
|
|
51
|
+
// Generator method: { *g() {} } / class { *g() {} } / static *g() {}
|
|
52
|
+
// → [':', key, ['function*', null, params, body]] (≡ g: function* () {})
|
|
53
|
+
// Prefix-only: infix `*` falls through to multiplication. Registered at TOKEN
|
|
54
|
+
// so it fires inside `static`'s operand (unary prec 175); prefix `*` is never
|
|
55
|
+
// valid JS outside member position, so the wide precedence can't misparse.
|
|
56
|
+
// token() re-registration would clobber prec['*'] (multiplication) in the
|
|
57
|
+
// introspection registry (loop.js reads it) — save/restore.
|
|
58
|
+
// A param list is method-shaped when every item could bind: identifier,
|
|
59
|
+
// default, rest, or destructuring pattern — `(1)`, `(a+b)` are expressions.
|
|
60
|
+
const paramish = n => n == null || typeof n === 'string' ||
|
|
61
|
+
(Array.isArray(n) && (n[0] === ',' ? n.slice(1).every(paramish) :
|
|
62
|
+
n[0] === '=' ? typeof n[1] === 'string' || paramish(n[1]) :
|
|
63
|
+
n[0] === '...' || n[0] === '{}' || n[0] === '[]'));
|
|
64
|
+
const multPrec = prec['*'];
|
|
65
|
+
token('*', TOKEN, a => {
|
|
66
|
+
// Infix `*` is multiplication — EXCEPT at a member boundary: class bodies
|
|
67
|
+
// have no separators, so `ctor() {} *g() {}` reaches here with the previous
|
|
68
|
+
// member as `a` (ASI can't split on `*`: `x \n * y` must stay a product).
|
|
69
|
+
// Only a newline/block boundary + the full method shape + a bindable param
|
|
70
|
+
// list reads as a new member, joined the way asi() would join it.
|
|
71
|
+
const boundary = a && parse.newline;
|
|
72
|
+
if (a && !boundary) return;
|
|
73
|
+
const from = idx;
|
|
74
|
+
const name = propertyKey();
|
|
75
|
+
if (!name) return a ? (seek(from), void 0) : false;
|
|
76
|
+
parse.space();
|
|
77
|
+
if (cur.charCodeAt(idx) !== OPAREN) return a ? (seek(from), void 0) : false;
|
|
78
|
+
skip();
|
|
79
|
+
const params = expr(0, CPAREN) || null;
|
|
80
|
+
if (a && !paramish(params)) return seek(from), void 0;
|
|
81
|
+
parse.space();
|
|
82
|
+
if (cur.charCodeAt(idx) !== OBRACE) return a ? (seek(from), void 0) : false;
|
|
83
|
+
skip();
|
|
84
|
+
const node = [':', name, ['function*', null, params, expr(0, CBRACE) || null]];
|
|
85
|
+
return a ? (a[0] === ';' ? (a.push(node), a) : [';', a, node]) : node;
|
|
86
|
+
});
|
|
87
|
+
prec['*'] = multPrec;
|
|
88
|
+
|
|
50
89
|
// Method shorthand: { foo() {} } / { async foo() {} } / class { static foo() {} }
|
|
51
90
|
// → [':', key, ['=>', ['()', params], body]]
|
|
52
91
|
// Accepts identifier, string-literal node [, "..."], ['async', key] from
|
package/feature/async.js
CHANGED
|
@@ -8,7 +8,12 @@ unary('await', PREFIX);
|
|
|
8
8
|
|
|
9
9
|
// yield expr → ['yield', expr]
|
|
10
10
|
// yield* expr → ['yield*', expr]
|
|
11
|
+
// Restricted production: a LineTerminator after `yield` ends it (yields
|
|
12
|
+
// undefined; the next line is its own statement) — the operand never spans.
|
|
13
|
+
const LF = 10, CR = 13;
|
|
14
|
+
const nlAhead = (i) => { let c; while ((c = cur.charCodeAt(i)) <= 32) { if (c === LF || c === CR) return true; i++ } return false };
|
|
11
15
|
keyword('yield', PREFIX, () => {
|
|
16
|
+
if (nlAhead(idx)) return ['yield'];
|
|
12
17
|
parse.space();
|
|
13
18
|
if (cur[idx] === '*') {
|
|
14
19
|
skip();
|
package/feature/switch.js
CHANGED
|
@@ -49,6 +49,10 @@ const switchBody = () => {
|
|
|
49
49
|
}
|
|
50
50
|
} finally { inSwitch--; }
|
|
51
51
|
skip();
|
|
52
|
+
// switchBody consumes its `}` by hand (expr() never sees it), so fire the
|
|
53
|
+
// block-close hook expr() would have fired — ASI marks the implicit newline,
|
|
54
|
+
// letting `switch (x) {…} return y` chain like every other block statement.
|
|
55
|
+
parse.exit?.(0, CBRACE);
|
|
52
56
|
return cases;
|
|
53
57
|
};
|
|
54
58
|
|
package/feature/var.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* ({let}) → ['()', ['{}', 'let']] (let as identifier)
|
|
11
11
|
* var x → ['var', 'x']
|
|
12
12
|
*/
|
|
13
|
-
import { expr, keyword, seek, idx } from '../parse.js';
|
|
13
|
+
import { expr, keyword, seek, idx, next, parse, cur } from '../parse.js';
|
|
14
14
|
|
|
15
15
|
const STATEMENT = 5, SEQ = 10;
|
|
16
16
|
|
|
@@ -32,3 +32,32 @@ const decl = kw => {
|
|
|
32
32
|
keyword('let', STATEMENT + 1, () => decl('let'));
|
|
33
33
|
keyword('const', STATEMENT + 1, () => decl('const'));
|
|
34
34
|
keyword('var', STATEMENT + 1, () => decl('var'));
|
|
35
|
+
|
|
36
|
+
// `using x = res` (explicit resource management) — CONTEXTUAL keyword: only
|
|
37
|
+
// `name = init` declarators make a declaration; anything else (`using(x)` call,
|
|
38
|
+
// `using.y`, `using + 1`, bare `using`) backtracks to the identifier. Registered
|
|
39
|
+
// at TOKEN-high precedence so `await using x = r` works (await's operand parse
|
|
40
|
+
// runs at unary precedence, above STATEMENT — let/const need no such reach).
|
|
41
|
+
// Spec's [no LineTerminator here] between `using` and the binding is not
|
|
42
|
+
// enforced. `using x` without initializer stays a parse error (spec: required).
|
|
43
|
+
const declish = n => Array.isArray(n) && n[0] === '=' && typeof n[1] === 'string';
|
|
44
|
+
keyword('using', 200, () => {
|
|
45
|
+
const from = idx;
|
|
46
|
+
parse.space();
|
|
47
|
+
const c = cur.charCodeAt(idx);
|
|
48
|
+
// Commit only when `name =` (single =, not ==/=>) is ahead — the declarator
|
|
49
|
+
// parse would err() on anything else mid-expression (e.g. `let using = 5`,
|
|
50
|
+
// where the inner expr would start at bare `=`).
|
|
51
|
+
if (parse.id(c) && (c < 48 || c > 57)) {
|
|
52
|
+
const nameAt = idx;
|
|
53
|
+
next(parse.id);
|
|
54
|
+
parse.space();
|
|
55
|
+
if (cur.charCodeAt(idx) === 61 && cur.charCodeAt(idx + 1) !== 61 && cur.charCodeAt(idx + 1) !== 62) {
|
|
56
|
+
seek(nameAt);
|
|
57
|
+
const node = expr(SEQ - 1);
|
|
58
|
+
if (node[0] === ',' ? node.slice(1).every(declish) : declish(node))
|
|
59
|
+
return node[0] === ',' ? ['using', ...node.slice(1)] : ['using', node];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return seek(from), 'using';
|
|
63
|
+
});
|
package/jessie.min.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var l,
|
|
2
|
-
`),o=t.pop(),n=
|
|
3
|
-
${n}${
|
|
4
|
-
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v",0:"\0"},
|
|
5
|
-
`,"/*":"*/"};s.space=()=>{for(var r,e,t,o,n;r=
|
|
6
|
-
`?n:n+o.length),r=0;break}if(r)return r}return r};var
|
|
7
|
-
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v"},
|
|
8
|
-
`;var ge=32,Or=10,ro=59,eo=125,ye=91,we=40,rr=B.asi??B[";"],to=s._baseSpace??=s.space,oo=s._baseStep??=s.step,Nr=r=>Array.isArray(r)||typeof r=="string",no=(B[";"]??5)+1,Rr=r=>Array.isArray(r)&&(B[r[0]]<=no||r[0]==="{}"&&Rr(r[1])),io=(r,e)=>{for(;(e=m.charCodeAt(r))<=ge;){if(e===Or)return!0;r++}return!1},so=(r=l,e)=>{for(;r-- >0&&(e=m.charCodeAt(r))<=ge;)if(e===Or)return!0;return!1};s.space=(r,e)=>{for(;;){for(e=l,r=to();e<l;)if(m.charCodeAt(e++)===Or){s.newline=!0;break}if(r===ro&&io(l+1)){_(l+1),s.newline=s.semi=!0;continue}return r}};s.enter=()=>s.newline=s.semi=!1;s.exit=(r,e)=>{e===eo&&(s.newline=!0,s.semi=!1)};s.step=(r,e,t,o)=>{if(s.semi&&e>=rr)return!1;if(r&&!Nr(r))return null;if(Nr(r)){let p=(t===ye||t===we)&&so();if(s.semi||t===ye&&(p||Rr(r))||t===we&&(Rr(r)||p&&e>=rr))return Ce(r,e,o)??null}let n=s.newline;return oo(r,e,t,o)??(Nr(r)&&n?Ce(r,e,o)??null:null)};var Ir=0,po=2e3,Ce=s.asi=(r,e,t,o,n)=>{if(e>=rr||Ir>=po)return;s.semi=!1;let p=l;Ir++;try{o=t(rr-.5)}finally{Ir--}if(!(!o||l===p))return n=o?.[0]===";"?o.slice(1):[o],r?.[0]===";"?(r.push(...n),r):[";",r,...n]};var Se=(r,e,t,o)=>typeof r=="string"?n=>e(n,r,n):r[0]==="."?(t=i(r[1]),o=r[2],n=>e(t(n),o,n)):r[0]==="[]"&&r.length===3?(t=i(r[1]),o=i(r[2]),n=>e(t(n),o(n),n)):r[0]==="()"&&r.length===2?Se(r[1],e):(()=>{throw Error("Invalid assignment target")})(),Ee={"=":(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 Ee)f(r,(e,t)=>(t=i(t),Se(e,(o,n,p)=>Ee[r](o,n,t(p)))));f("!",r=>(r=i(r),e=>!r(e)));f("||",(r,e)=>(r=i(r),e=i(e),t=>r(t)||e(t)));f("&&",(r,e)=>(r=i(r),e=i(e),t=>r(t)&&e(t)));f("~",r=>(r=i(r),e=>~r(e)));f("|",(r,e)=>(r=i(r),e=i(e),t=>r(t)|e(t)));f("&",(r,e)=>(r=i(r),e=i(e),t=>r(t)&e(t)));f("^",(r,e)=>(r=i(r),e=i(e),t=>r(t)^e(t)));f(">>",(r,e)=>(r=i(r),e=i(e),t=>r(t)>>e(t)));f("<<",(r,e)=>(r=i(r),e=i(e),t=>r(t)<<e(t)));f(">",(r,e)=>(r=i(r),e=i(e),t=>r(t)>e(t)));f("<",(r,e)=>(r=i(r),e=i(e),t=>r(t)<e(t)));f(">=",(r,e)=>(r=i(r),e=i(e),t=>r(t)>=e(t)));f("<=",(r,e)=>(r=i(r),e=i(e),t=>r(t)<=e(t)));f("==",(r,e)=>(r=i(r),e=i(e),t=>r(t)==e(t)));f("!=",(r,e)=>(r=i(r),e=i(e),t=>r(t)!=e(t)));f("+",(r,e)=>e!==void 0?(r=i(r),e=i(e),t=>r(t)+e(t)):(r=i(r),t=>+r(t)));f("-",(r,e)=>e!==void 0?(r=i(r),e=i(e),t=>r(t)-e(t)):(r=i(r),t=>-r(t)));f("*",(r,e)=>(r=i(r),e=i(e),t=>r(t)*e(t)));f("/",(r,e)=>(r=i(r),e=i(e),t=>r(t)/e(t)));f("%",(r,e)=>(r=i(r),e=i(e),t=>r(t)%e(t)));var _r=(r,e,t,o)=>typeof r=="string"?n=>e(n,r):r[0]==="."?(t=i(r[1]),o=r[2],n=>e(t(n),o)):r[0]==="[]"&&r.length===3?(t=i(r[1]),o=i(r[2]),n=>e(t(n),o(n))):r[0]==="()"&&r.length===2?_r(r[1],e):(()=>{throw Error("Invalid increment target")})();f("++",(r,e)=>_r(r,e===null?(t,o)=>t[o]++:(t,o)=>++t[o]));f("--",(r,e)=>_r(r,e===null?(t,o)=>t[o]--:(t,o)=>--t[o]));var ke=(...r)=>(r=r.map(i),e=>{let t;for(let o of r)t=o(e);return t});f(",",ke);f(";",ke);var Q=r=>r?.[0]==="_"&&r[1]==="_"||r==="constructor"||r==="prototype",er=r=>{throw Error(r)};f("[]",(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]),o=>t(o)):(t=i(t),o=>[t(o)])),t=>r.flatMap(o=>o(t))):(e==null&&er("Missing index"),r=i(r),e=i(e),t=>{let o=e(t);return Q(o)?void 0:r(t)[o]}));f(".",(r,e)=>(r=i(r),e=e[0]?e:e[1],Q(e)?()=>{}:t=>r(t)[e]));f("()",(r,e)=>{if(e===void 0)return r==null?er("Empty ()"):i(r);let t=n=>n?.[0]===","&&n.slice(1).some(p=>p==null||t(p));t(e)&&er("Empty argument");let o=e?e[0]===","?(e=e.slice(1).map(i),n=>e.map(p=>p(n))):(e=i(e),n=>[e(n)]):()=>[];return Lr(r,(n,p,c)=>n[p](...o(c)))});var M=r=>typeof r=="string"||Array.isArray(r)&&(r[0]==="."||r[0]==="?."||r[0]==="[]"&&r.length===3||r[0]==="?.[]"||r[0]==="()"&&r.length===2&&M(r[1])||r[0]==="{}"),Lr=(r,e,t,o)=>r==null?er("Empty ()"):r[0]==="()"&&r.length==2?Lr(r[1],e):typeof r=="string"?n=>e(n,r,n):r[0]==="."?(t=i(r[1]),o=r[2],n=>e(t(n),o,n)):r[0]==="?."?(t=i(r[1]),o=r[2],n=>{let p=t(n);return p==null?void 0:e(p,o,n)}):r[0]==="[]"&&r.length===3?(t=i(r[1]),o=i(r[2]),n=>e(t(n),o(n),n)):r[0]==="?.[]"?(t=i(r[1]),o=i(r[2]),n=>{let p=t(n);return p==null?void 0:e(p,o(n),n)}):(r=i(r),n=>e([r(n)],0,n)),D=Lr;f("===",(r,e)=>(r=i(r),e=i(e),t=>r(t)===e(t)));f("!==",(r,e)=>(r=i(r),e=i(e),t=>r(t)!==e(t)));f("??",(r,e)=>(r=i(r),e=i(e),t=>r(t)??e(t)));var fo=r=>{throw Error(r)};f("**",(r,e)=>(r=i(r),e=i(e),t=>r(t)**e(t)));f("**=",(r,e)=>(M(r)||fo("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]**=e(n))));f("in",(r,e)=>(r=i(r),e=i(e),t=>r(t)in e(t)));var lo=r=>{throw Error(r)};f(">>>",(r,e)=>(r=i(r),e=i(e),t=>r(t)>>>e(t)));f(">>>=",(r,e)=>(M(r)||lo("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]>>>=e(n))));var uo=r=>r[0]?.[0]===","?r[0].slice(1):r,G=(r,e,t)=>{if(typeof r=="string"){t[r]=e;return}let[o,...n]=r,p=uo(n);if(o==="{}"){let c=[];for(let u of p){if(Array.isArray(u)&&u[0]==="..."){let C={};for(let R in e)c.includes(R)||(C[R]=e[R]);t[u[1]]=C;break}let a,y,T;typeof u=="string"?a=y=u:u[0]==="="?(typeof u[1]=="string"?a=y=u[1]:[,a,y]=u[1],T=u[2]):[,a,y]=u,c.push(a);let k=e[a];k===void 0&&T&&(k=i(T)(t)),G(y,k,t)}}else if(o==="[]"){let c=0;for(let u of p){if(u===null){c++;continue}if(Array.isArray(u)&&u[0]==="..."){t[u[1]]=e.slice(c);break}let a=u,y;Array.isArray(u)&&u[0]==="="&&([,a,y]=u);let T=e[c++];T===void 0&&y&&(T=i(y)(t)),G(a,T,t)}}},Pr=(...r)=>(r=r.map(e=>{if(typeof e=="string")return t=>{t[e]=void 0};if(e[0]==="="){let[,t,o]=e,n=i(o);return typeof t=="string"?p=>{p[t]=n(p)}:p=>G(t,n(p),p)}return i(e)}),e=>{for(let t of r)t(e)});f("let",Pr);f("const",Pr);f("var",Pr);var tr=r=>{throw Error(r)};f("=",(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"?o=>{o[t]=e(o)}:o=>G(t,e(o),o)}return M(r)||tr("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]=e(n))});f("||=",(r,e)=>(M(r)||tr("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]||=e(n))));f("&&=",(r,e)=>(M(r)||tr("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]&&=e(n))));f("??=",(r,e)=>(M(r)||tr("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]??=e(n))));f("?",(r,e,t)=>(r=i(r),e=i(e),t=i(t),o=>r(o)?e(o):t(o)));var P=[];f("=>",(r,e)=>{r=r?.[0]==="()"?r[1]:r;let t=r?r[0]===","?r.slice(1):[r]:[],o=-1,n=null,p=t[t.length-1];Array.isArray(p)&&p[0]==="..."&&(o=t.length-1,n=p[1],t.length--);let c=e?.[0]==="{}";return e=i(c?["{",e[1]]:e),u=>(...a)=>{let y={};t.forEach((k,C)=>y[k]=a[C]),n&&(y[n]=a.slice(o));let T=new Proxy(y,{get:(k,C)=>C in k?k[C]:u?.[C],set:(k,C,R)=>((C in k?k:u)[C]=R,!0),has:(k,C)=>C in k||(u?C in u:!1)});try{let k=e(T);return c?void 0:k}catch(k){if(k===P)return k[0];throw k}}});f("...",r=>(r=i(r),e=>Object.entries(r(e))));f("?.",(r,e)=>(r=i(r),Q(e)?()=>{}:t=>r(t)?.[e]));f("?.[]",(r,e)=>(r=i(r),e=i(e),t=>{let o=e(t);return Q(o)?void 0:r(t)?.[o]}));f("?.()",(r,e)=>{let t=e?e[0]===","?(e=e.slice(1).map(i),n=>e.map(p=>p(n))):(e=i(e),n=>[e(n)]):()=>[];if(r[0]==="."||r[0]==="?."){let n=i(r[1]),p=r[2];return Q(p)?()=>{}:c=>n(c)?.[p]?.(...t(c))}if((r[0]==="[]"||r[0]==="?.[]")&&r.length===3){let n=i(r[1]),p=i(r[2]);return c=>{let u=p(c);return Q(u)?void 0:n(c)?.[u]?.(...t(c))}}let o=i(r);return n=>o(n)?.(...t(n))});f("typeof",r=>(r=i(r),e=>typeof r(e)));f("void",r=>(r=i(r),e=>(r(e),void 0)));f("delete",r=>{if(r[0]==="."){let e=i(r[1]),t=r[2];return o=>delete e(o)[t]}if(r[0]==="[]"){let e=i(r[1]),t=i(r[2]);return o=>delete e(o)[t(o)]}return()=>!0});f("new",r=>{let e=i(r?.[0]==="()"?r[1]:r),t=r?.[0]==="()"?r[2]:null,o=t?t[0]===","?(n=>p=>n.map(c=>c(p)))(t.slice(1).map(i)):(n=>p=>[n(p)])(i(t)):()=>[];return n=>new(e(n))(...o(n))});var or=Symbol("accessor");f("get",(r,e)=>(e=e?i(e):()=>{},t=>[[or,r,{get:function(){let o=Object.create(t||{});return o.this=this,e(o)}}]]));f("set",(r,e,t)=>(t=t?i(t):()=>{},o=>[[or,r,{set:function(n){let p=Object.create(o||{});p.this=this,p[e]=n,t(p)}}]]));var co=r=>r==null||typeof r=="string"||[":",",","...","get","set"].includes(r[0]);f("{}",(r,e)=>{if(e!==void 0)return;if(!co(r))return i(["{",r]);r=r?r[0]!==","?[r]:r.slice(1):[];let t=r.map(o=>i(typeof o=="string"?[":",o,o]:o));return o=>{let n={},p={};for(let c of t.flatMap(u=>u(o)))if(c[0]===or){let[,u,a]=c;p[u]={...p[u],...a,configurable:!0,enumerable:!0}}else n[c[0]]=c[1];for(let c in p)Object.defineProperty(n,c,p[c]);return n}});f("{",r=>(r=r?i(r):()=>{},e=>r(Object.create(e))));f(":",(r,e)=>(e=i(e),Array.isArray(r)?(r=i(r),t=>[[r(t),e(t)]]):t=>[[r,e(t)]]));f("`",(...r)=>(r=r.map(i),e=>r.map(t=>t(e)).join("")));f("``",(r,...e)=>{r=i(r);let t=[],o=[];for(let p of e)Array.isArray(p)&&p[0]===void 0?t.push(p[1]):o.push(i(p));let n=Object.assign([...t],{raw:t});return p=>r(p)(n,...o.map(c=>c(p)))});f("function",(r,e,t)=>{t=t?i(t):()=>{};let o=e?e[0]===","?e.slice(1):[e]:[],n=null,p=-1,c=o[o.length-1];return Array.isArray(c)&&c[0]==="..."&&(p=o.length-1,n=c[1],o.length--),u=>{let a=(...y)=>{let T={};o.forEach((C,R)=>T[C]=y[R]),n&&(T[n]=y.slice(p));let k=new Proxy(T,{get:(C,R)=>R in C?C[R]:u[R],set:(C,R,Ie)=>((R in C?C:u)[R]=Ie,!0),has:(C,R)=>R in C||R in u});try{return t(k)}catch(C){if(C===P)return C[0];throw C}};return r&&(u[r]=a),a}});f("function*",(r,e,t)=>{throw Error("Generator functions are not supported in evaluation")});f("async",r=>{let e=i(r);return t=>{let o=e(t);return async function(...n){return o(...n)}}});f("await",r=>(r=i(r),async e=>await r(e)));f("yield",r=>(r=r?i(r):null,e=>{throw{__yield__:r?r(e):void 0}}));f("yield*",r=>(r=i(r),e=>{throw{__yield_all__:r(e)}}));var mo=Symbol("static"),ao=r=>{throw Error(r)};f("instanceof",(r,e)=>(r=i(r),e=i(e),t=>r(t)instanceof e(t)));f("class",(r,e,t)=>(e=e?i(e):null,t=t?i(t):null,o=>{let n=e?e(o):Object,p=function(...c){if(!(this instanceof p))return ao("Class constructor must be called with new");let u=e?Reflect.construct(n,c,p):this;return p.prototype.__constructor__&&p.prototype.__constructor__.apply(u,c),u};if(Object.setPrototypeOf(p.prototype,n.prototype),Object.setPrototypeOf(p,n),t){let c=Object.create(o);c.super=n;let u=t(c),a=Array.isArray(u)&&typeof u[0]?.[0]=="string"?u:[];for(let[y,T]of a)y==="constructor"?p.prototype.__constructor__=T:p.prototype[y]=T}return r&&(o[r]=p),p}));f("static",r=>(r=i(r),e=>[[mo,r(e)]]));f("//",(r,e)=>{let t=new RegExp(r,e||"");return()=>t});f("if",(r,e,t)=>(r=i(r),e=i(e),t=t!==void 0?i(t):null,o=>r(o)?e(o):t?.(o)));var U=Symbol("break"),F=Symbol("continue");f("while",(r,e)=>(r=i(r),e=i(e),t=>{let o;for(;r(t);)try{o=e(t)}catch(n){if(n===U)break;if(n===F)continue;if(n===P)return n[0];throw n}return o}));f("do",(r,e)=>(r=i(r),e=i(e),t=>{let o;do try{o=r(t)}catch(n){if(n===U)break;if(n===F)continue;if(n===P)return n[0];throw n}while(e(t));return o}));f("for",(r,e)=>{if(Array.isArray(r)&&r[0]===";"){let[,t,o,n]=r;return t=t?i(t):null,o=o?i(o):()=>!0,n=n?i(n):null,e=i(e),p=>{let c;for(t?.(p);o(p);n?.(p))try{c=e(p)}catch(u){if(u===U)break;if(u===F)continue;if(u===P)return u[0];throw u}return c}}if(Array.isArray(r)&&(r[0]==="in"||r[0]==="of")){let[t,o,n]=r;if(Array.isArray(o)&&(o[0]==="let"||o[0]==="const"||o[0]==="var")&&(o=o[1]),t==="in")return Ao(o,n,e);if(t==="of")return ho(o,n,e)}});var ho=(r,e,t)=>{e=i(e),t=i(t);let o=Array.isArray(r);return n=>{let p,c=o?null:n[r];for(let u of e(n)){o?G(r,u,n):n[r]=u;try{p=t(n)}catch(a){if(a===U)break;if(a===F)continue;if(a===P)return a[0];throw a}}return o||(n[r]=c),p}},Ao=(r,e,t)=>{e=i(e),t=i(t);let o=Array.isArray(r);return n=>{let p,c=o?null:n[r];for(let u in e(n)){o?G(r,u,n):n[r]=u;try{p=t(n)}catch(a){if(a===U)break;if(a===F)continue;if(a===P)return a[0];throw a}}return o||(n[r]=c),p}};f("break",()=>()=>{throw U});f("continue",()=>()=>{throw F});f("return",r=>(r=r!==void 0?i(r):null,e=>{throw P[0]=r?.(e),P}));f("try",(r,...e)=>{r=r?i(r):null;let t=e.find(u=>u?.[0]==="catch"),o=e.find(u=>u?.[0]==="finally"),n=t?.[1],p=t?.[2]?i(t[2]):null,c=o?.[1]?i(o[1]):null;return u=>{let a;try{a=r?.(u)}catch(y){if(y===U||y===F||y===P)throw y;if(n!=null&&p){let T=n in u,k=u[n];u[n]=y;try{a=p(u)}finally{T?u[n]=k:delete u[n]}}else if(!p)throw y}finally{c?.(u)}return a}});f("throw",r=>(r=i(r),e=>{throw r(e)}));f("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 o=r(t),n=!1,p;for(let[u,a]of e)if(n||u===null||u(t)===o)for(n=!0,c=0;c<a.length;c++)try{p=a[c](t)}catch(y){if(y===U)return p;throw y}var c;return p}):t=>r(t)));f("import",()=>()=>{});f("export",()=>()=>{});f("from",(r,e)=>()=>{});f("as",(r,e)=>()=>{});f("default",r=>i(r));var Te=new WeakMap,yo=(r,...e)=>typeof r=="string"?i(s(r)):Te.get(r)||Te.set(r,wo(r,e)).get(r),Ne=57344,wo=(r,e)=>{let t=r.reduce((p,c,u)=>p+(u?String.fromCharCode(Ne+u-1):"")+c,""),o=s(t),n=p=>{if(typeof p=="string"&&p.length===1){let c=p.charCodeAt(0)-Ne,u;if(c>=0&&c<e.length)return u=e[c],Co(u)?u:[,u]}return Array.isArray(p)?p.map(n):p};return i(n(o))},Co=r=>typeof r=="string"||Array.isArray(r)&&(typeof r[0]=="string"||r[0]===void 0),go=yo;export{sr as access,A as binary,i as compile,m as cur,go as default,I as err,d as expr,z as group,Eo as id,l as idx,w as keyword,$ as literal,Re as loc,N as lookup,vr as member,ir as nary,E as next,f as operator,nr as operators,L as parens,s as parse,W as peek,B as prec,pr as propName,_ as seek,h as skip,g as token,O as unary,S as word};
|
|
1
|
+
var l,c,s=r=>(l=0,c=r,s.enter?.(),r=d(),c[l]?R():r||""),R=(r="Unexpected token",e=l,t=c.slice(0,e).split(`
|
|
2
|
+
`),o=t.pop(),n=c.slice(Math.max(0,e-40),e),p="\u032D",m=(c[e]||" ")+p,u=c.slice(e+1,e+20))=>{throw SyntaxError(`${r} at ${t.length+1}:${o.length+1}
|
|
3
|
+
${n}${m}${u}`)},Be=(r,e=l)=>(Array.isArray(r)&&(r.loc=e),r),E=(r,e=l,t)=>{for(;t=r(c.charCodeAt(l));)l+=t;return c.slice(e,l)},h=(r=1)=>c[l+=r],T=r=>l=r,d=(r=0,e)=>{let t,o,n;for(e&&s.enter?.(r,e);(t=s.space())&&t!==e&&(n=s.step(o,r,t,d));)o=n;return e&&(t==e?(l++,s.exit?.(r,e)):R("Unclosed "+String.fromCharCode(e-(e>42?2:1)))),o},W=(r=l)=>{for(;c.charCodeAt(r)<=32;)r++;return c.charCodeAt(r)},Ro=s.id=r=>r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122||r==36||r==95||r>=192&&r!=215&&r!=247,S=(r,e=r.length)=>c.substr(l,e)===r&&!s.id(c.charCodeAt(l+e)),v=()=>(h(),d(0,41)),I=[],L={},g=(r,e=32,t,o=r.charCodeAt(0))=>Gr({op:r,l:r.length,p:L[r]=!I[o]&&L[r]||e,map:t,word:r.toUpperCase()!==r,kw:!1}),A=(r,e,t=!1)=>g(r,e,(o,n)=>o&&(n=d(e-(t?.5:0)))&&[r,o,n]),_=(r,e,t)=>g(r,e,o=>t?o&&[r,o]:!o&&(o=d(e-.5))&&[r,o]),$=(r,e)=>g(r,200,t=>!t&&[,e]),ir=(r,e,t,o)=>g(r,e,(n,p,m=n)=>(p=d(e-(t?.5:0)),n?.[0]!==r&&(n=[r,n||null]),p?.[0]===r?n.push(...p.slice(1)):p?n.push(p):o||W()===r.charCodeAt(0)?n.push(null):m&&n.length===2&&(n=n[1]),n)),z=(r,e)=>g(r[0],e,t=>!t&&[r,d(0,r.charCodeAt(1))||null]),sr=(r,e)=>g(r[0],e,t=>t&&[r,t,d(0,r.charCodeAt(1))||null]),pr=(r,e)=>(s.space(),e=c.charCodeAt(l),s.id(e)&&(e<48||e>57)?E(s.id):d(r)),Fr=(r,e)=>g(r,e,(t,o)=>t&&(o=pr(e))&&[r,t,o]),C=(r,e,t)=>(L[r]??=e,Gr({op:r,l:r.length,p:e,map:t,word:!0,kw:!0})),Dr=(r,e,t=(o,n,p,m=l,u,a,y)=>{for(y=0;a=r[y++];)if(!(a.kw&&o)&&!(p?a.op!==p:!((a.l<2||a.op.charCodeAt(1)===c.charCodeAt(l+1)&&(a.l<3||c.substr(l,a.l)===a.op))&&(!a.word||!s.id(c.charCodeAt(l+a.l)))&&(p=a.op)))&&!(n>=a.p)&&!(a.kw&&s.prop&&!s.prop(l+a.l))){if(l+=a.l,u=a.map(o))return Be(u,m);l=m,p=0,a.word||o||e||r[y]||R()}return e?.(o,n,p)})=>(t.ops=r,t.tail=e,t),Gr=(r,e=r.op.charCodeAt(0),t=I[e])=>I[e]=t?.ops?Dr([r,...t.ops],t.tail):Dr([r],t);s.space=r=>{for(;(r=c.charCodeAt(l))<=32;)l++;return r};s.step=(r,e,t,o,n)=>(n=I[t])&&n(r,e)||(r?null:E(s.id)||null);var nr={},f=(r,e,t=nr[r])=>nr[r]=(...o)=>e(...o)||t?.(...o),i=r=>Array.isArray(r)?r[0]==null?(e=>()=>e)(r[1]):nr[r[0]]?.(...r.slice(1))??R(`Unknown operator: ${r[0]}`,r?.loc):r===void 0?()=>{}:e=>e?.[r];var fr=46,H=48,x=57,Hr=69,Xr=101,Me=43,Ue=45,Qr=95,$r=110,Ke=97,De=102,Fe=65,Ge=70,xr=r=>r.indexOf("_")<0?r:r.replaceAll("_",""),He=r=>r===fr&&(r=c.charCodeAt(l+1))!==fr&&!(s.id(r)&&r>x&&r!==Xr&&r!==Hr)||r>=H&&r<=x||r===Qr||((r===Hr||r===Xr)&&((r=c.charCodeAt(l+1))>=H&&r<=x||r===Me||r===Ue)?2:0),lr=r=>{let e=xr(E(He));return c.charCodeAt(l)===$r?(h(),[,BigInt(e)]):(r=+e)!=r?R():[,r]},Xe=r=>e=>e===Qr||e>=H&&e<=x&&e-H<r||r===16&&(e>=Ke&&e<=De||e>=Fe&&e<=Ge);s.number=null;I[fr]=r=>!r&&c.charCodeAt(l+1)>=H&&c.charCodeAt(l+1)<=x&&lr();for(let r=H;r<=x;r++)I[r]=e=>e?void 0:lr();I[H]=(r,e)=>{if(!r){for(let t in s.number)if(t[0]==="0"&&(c.charCodeAt(l+1)|32)===t.charCodeAt(1)){h(2);let o=xr(E(Xe(e=s.number[t])));return c.charCodeAt(l)===$r?(h(),[,BigInt("0"+t[1]+o)]):[,parseInt(o,e)]}return lr()}};var Qe=92,jr=34,Wr=39,zr=117,Jr=120,$e=123,xe=125,Vr=10,je=13,We={n:`
|
|
4
|
+
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v",0:"\0"},Yr=r=>r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:-1,Zr=r=>(e,t,o="",n=String.fromCharCode(r))=>{if(e||!s.string?.[n])return;h();let p=()=>{let m=c.charCodeAt(l+1);if(m===Vr)return 2;if(m===je)return c.charCodeAt(l+2)===Vr?3:2;if(m===Jr||m===zr&&c.charCodeAt(l+2)!==$e){let u=m===Jr?2:4,a=0,y;for(let N=0;N<u;N++){if((y=Yr(c.charCodeAt(l+2+N)))<0)return o+=c[l+1],2;a=a*16+y}return o+=String.fromCharCode(a),2+u}if(m===zr){let u=0,a=l+3,y;for(;(y=Yr(c.charCodeAt(a)))>=0;)u=u*16+y,a++;return a>l+3&&u<=1114111&&c.charCodeAt(a)===xe?(o+=String.fromCodePoint(u),a-l+1):(o+=c[l+1],2)}return o+=We[c[l+1]]||c[l+1],2};return E(m=>m-r&&(m!==Qe?(o+=c[l],1):p())),c[l]===n?h():R("Bad string"),[,o]};I[jr]=Zr(jr);I[Wr]=Zr(Wr);s.string={'"':!0};var ze=20;"= += -= *= /= %= |= &= ^= >>= <<=".split(" ").map(r=>A(r,ze,!0));var Je=30,Ve=40,Ye=140;_("!",Ye);A("||",Je);A("&&",Ve);var Ze=50,qe=60,be=70,qr=100,rt=140;A("|",Ze);A("&",be);A("^",qe);A(">>",qr);A("<<",qr);_("~",rt);var Y=90;A("<",Y);A(">",Y);A("<=",Y);A(">=",Y);var br=80;A("==",br);A("!=",br);var re=110,ur=120,ee=140;A("+",re);A("-",re);A("*",ur);A("/",ur);A("%",ur);_("+",ee);_("-",ee);var Z=150;g("++",Z,r=>r?["++",r,null]:["++",d(Z-1)]);g("--",Z,r=>r?["--",r,null]:["--",d(Z-1)]);var et=5,tt=10;ir(",",tt);ir(";",et,!0,!0);var ot=170;z("()",ot);var te=170,nt=160;sr("[]",te);Fr(".",te);sr("()",nt);var it=s.space;s.comment??={"//":`
|
|
5
|
+
`,"/*":"*/"};s.space=()=>{for(var r,e,t,o,n;r=it();){for(t in e=s.comment)if(r===t.charCodeAt(0)&&(t.length<2||c.charCodeAt(l+1)===t.charCodeAt(1))&&(t.length<3||c.substr(l,t.length)===t)){o=e[t],n=c.indexOf(o,l+t.length),T(n<0?c.length:o===`
|
|
6
|
+
`?n:n+o.length),r=0;break}if(r)return r}return r};var oe=80;A("===",oe);A("!==",oe);var st=30;A("??",st);var pt=130,ft=20;A("**",pt,!0);A("**=",ft,!0);var ne=90;A("in",ne);A("of",ne);var lt=20,ut=100;A(">>>",ut);A(">>>=",lt,!0);var cr=20;A("||=",cr,!0);A("&&=",cr,!0);A("??=",cr,!0);$("true",!0);$("false",!1);$("null",null);C("undefined",200,()=>[]);$("NaN",NaN);$("Infinity",1/0);var mr=20;g("?",mr,(r,e,t)=>r&&(e=d(mr-1))&&E(o=>o===58)&&(t=d(mr-1),["?",r,e,t]));var ct=20;A("=>",ct,!0);var mt=20;_("...",mt);var ie=170;g("?.",ie,(r,e)=>{if(!r)return;let t=s.space();return t===40?(h(),["?.()",r,d(0,41)||null]):t===91?(h(),["?.[]",r,d(0,93)]):(e=pr(ie),e?["?.",r,e]:void 0)});var ar=140,se=160,at=se+1;_("typeof",ar);_("void",ar);_("delete",ar);var dt=r=>s.space()===40?(h(),["()",r,d(0,41)||null]):r;C("new",at,()=>S(".target")?(h(7),["new.target"]):["new",dt(d(se))]);var ht=20,pe=200;s.prop=r=>W(r)!==58;z("[]",pe);z("{}",pe);A(":",ht-1,!0);var At=170,dr=96,yt=36,Ct=123,wt=92,gt={n:`
|
|
7
|
+
`,r:"\r",t:" ",b:"\b",f:"\f",v:"\v"},fe=()=>{let r=[],e="",t;for(;(t=c.charCodeAt(l))!==dr;)t?t===wt?(h(),e+=gt[c[l]]||c[l],h()):t===yt&&c.charCodeAt(l+1)===Ct?(r.push([,e]),e="",h(2),r.push(d(0,125))):(e+=c[l],h()):R("Unterminated template");return r.push([,e]),h(),r},Et=r=>r.length<2&&r[0]?.[0]===void 0?r[0]||[,""]:["`",...r],St=I[dr];I[dr]=(r,e)=>r&&e<At?s.asi&&s.newline?void 0:(h(),["``",r,...fe()]):r?St?.(r,e):(h(),Et(fe()));s.string["'"]=!0;s.number={"0x":16,"0b":2,"0o":8};var kt=92,Tt=117,Nt=123,It=125,Rt=183,Ot=s.id,le=r=>r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102,_t=(r=l+2,e,t=0,o=0)=>{if(c.charCodeAt(l)!==kt||c.charCodeAt(l+1)!==Tt)return 0;if(c.charCodeAt(r)===Nt){for(;le(e=c.charCodeAt(++r));)t=t*16+(e<=57?e-48:(e&31)+9);return r>l+3&&t<=1114111&&c.charCodeAt(r)===It?r-l+1:0}for(;o<4&&le(c.charCodeAt(r+o));)o++;return o===4?6:0};s.id=r=>Ot(r)||r===Rt||_t();var hr=5,ce=10,Ar=r=>{let e=l,t=d(ce-1);return t==null?r:r==="let"&&(t==="in"||t==="of")?(T(e),r):t[0]===","?[r,...t.slice(1)]:[r,t]};C("let",hr+1,()=>Ar("let"));C("const",hr+1,()=>Ar("const"));C("var",hr+1,()=>Ar("var"));var ue=r=>Array.isArray(r)&&r[0]==="="&&typeof r[1]=="string";C("using",200,()=>{let r=l;s.space();let e=c.charCodeAt(l);if(s.id(e)&&(e<48||e>57)){let t=l;if(E(s.id),s.space(),c.charCodeAt(l)===61&&c.charCodeAt(l+1)!==61&&c.charCodeAt(l+1)!==62){T(t);let o=d(ce-1);if(o[0]===","?o.slice(1).every(ue):ue(o))return o[0]===","?["using",...o.slice(1)]:["using",o]}}return T(r),"using"});var q=5,vt=59,B=()=>(s.space()===123||R("Expected {"),h(),d(q-.5,125)||null),K=()=>s.space()!==123?d(q+.5):(h(),d(q-.5,125)||null),Lt=()=>{let r=l;return s.space()===vt&&h(),s.space(),S("else")?(h(4),s.semi=!1,!0):(T(r),!1)};C("if",q+1,()=>{s.space();let r=["if",v(),K()];return Lt()&&r.push(K()),r});var Pt=200;C("function",Pt,()=>{s.space();let r=!1;c[l]==="*"&&(r=!0,h(),s.space());let e=E(s.id);return e&&s.space(),r?["function*",e,v()||null,B()]:["function",e,v()||null,B()]});var b=140,yr=20,Bt=40;_("await",b);var Mt=10,Ut=13,Kt=r=>{let e;for(;(e=c.charCodeAt(r))<=32;){if(e===Mt||e===Ut)return!0;r++}return!1};C("yield",b,()=>Kt(l)?["yield"]:(s.space(),c[l]==="*"?(h(),s.space(),["yield*",d(yr)]):["yield",d(yr)]));C("async",b,()=>{if(s.space(),S("function"))return["async",d(b)];let r=l,e=E(s.id);if(e){if(s.space(),c.charCodeAt(l)===Bt)return["async",e];T(r)}let t=d(yr-.5);return t&&["async",t]});var me=200;var Dt=90,Ft=175,Gt=160,Ht=Gt-.5;_("static",Ft);A("instanceof",Dt);g("#",me,r=>{if(r)return;let e=E(s.id);return e?"#"+e:void 0});C("class",me,()=>{s.space();let r=E(s.id)||null;if(r==="extends")r=null,s.space();else{if(s.space(),!S("extends"))return["class",r,null,B()];h(7),s.space()}return["class",r,d(Ht),B()]});var Cr=47,Xt=92,Qt=91,$t=93;g("/",140,r=>{let e=c.charCodeAt(l);if(r||e===Cr||e===42||e===43||e===63)return;let t=!1,o=E(p=>p===Xt?2:p===Qt?(t=!0,1):p===$t?(t=!1,1):p&&(t||p!==Cr));c.charCodeAt(l)===Cr||R("Unterminated regex"),h();let n=E(p=>p===103||p===105||p===109||p===115||p===117||p===121);return n?["//",o,n]:["//",o]});var X=5,J=125,V=59;C("while",X+1,()=>(s.space(),["while",v(),K()]));C("do",X+1,r=>(r=K(),s.space(),h(5),s.space(),["do",r,v()]));var ae={let:1,const:1,var:1},wr=(r,e=r,t)=>{if(ae[r?.[0]]&&Array.isArray(r[1]))return(e=wr(r[1]))?.[0]==="in"||e?.[0]==="of"?[e[0],[r[0],e[1]],r.length>2?[",",e[2],...r.slice(2)]:e[2]]:r;for(;Array.isArray(e)&&L[e[0]]<L.in&&!ae[e[0]];)t=e,e=e[1];return t&&Array.isArray(e)&&(e[0]==="in"||e[0]==="of")?(t[1]=e[2],[e[0],e[1],r]):r};C("for",X+1,()=>(s.space(),S("await")?(h(5),s.space(),["for await",wr(v()),K()]):["for",wr(v()),K()]));C("break",X+1,()=>{s.asi&&(s.newline=!1);let r=l,e=s.space();if(!e||e===J||e===V||s.newline)return["break"];let t=E(s.id);if(!t)return["break"];let o=s.space();return!o||o===J||o===V||s.newline?["break",t]:(T(r),["break"])});C("continue",X+1,()=>{s.asi&&(s.newline=!1);let r=l,e=s.space();if(!e||e===J||e===V||s.newline)return["continue"];let t=E(s.id);if(!t)return["continue"];let o=s.space();return!o||o===J||o===V||s.newline?["continue",t]:(T(r),["continue"])});C("return",X+1,()=>{s.asi&&(s.newline=!1);let r=s.space();return!r||r===J||r===V||s.newline?["return"]:["return",d(X)]});var gr=5;C("try",gr+1,()=>{let r=["try",B()];return s.space(),S("catch")&&(h(5),s.space(),r.push(["catch",W()===40?v():null,B()])),s.space(),S("finally")&&(h(7),r.push(["finally",B()])),r});C("throw",gr+1,()=>{if(s.asi&&(s.newline=!1),s.space(),s.newline)throw SyntaxError("Unexpected newline after throw");return["throw",d(gr)]});var Ae=5,xt=20,de=58,jt=59,Er=125,Sr=0,ye=(r,e=r.length,t=r.charCodeAt(0),o=I[t])=>I[t]=(n,p,m)=>S(r)&&!n&&Sr&&(!s.prop||s.prop(l+e))||o?.(n,p,m);ye("case");ye("default");var he=r=>{let e=[];for(;(r=s.space())!==Er&&!S("case")&&!S("default");){if(r===jt){h();continue}s.semi=!1,e.push(d(Ae+.5))||R()}return e.length>1?[";",...e]:e[0]||null},Wt=()=>{s.space()===123||R("Expected {"),h(),Sr++;let r=[];try{for(;s.space()!==Er;)if(S("case")){T(l+4),s.space(),s.semi=!1;let e=d(xt-.5);s.space()===de&&h(),r.push(["case",e,he()])}else S("default")?(T(l+7),s.space()===de&&h(),r.push(["default",he()])):R("Expected case or default")}finally{Sr--}return h(),s.exit?.(0,Er),r};C("switch",Ae+1,()=>s.space()===40&&["switch",v(),...Wt()]);var kr=5,zt=20;C("debugger",kr+1,()=>["debugger"]);C("with",kr+1,()=>(s.space(),["with",v(),K()]));var Jt=["if","for","while","do","switch","try"];g(":",zt-1,r=>typeof r=="string"&&(s.space(),Jt.some(e=>S(e)))&&[":",r,d(kr)]);var Tr=5,j=10,Ce=42,Vt=I[Ce];I[Ce]=(r,e)=>r?Vt?.(r,e):(h(),"*");g("from",j+1,r=>r?r[0]!=="="&&r[0]!==","&&(s.space(),["from",r,d(j+1)]):!1);g("as",j+2,r=>r?(s.space(),["as",r,d(j+2)]):!1);C("import",Tr,()=>S(".meta")?(h(5),["import.meta"]):["import",d(j)]);C("export",Tr,()=>(s.space(),S("default")?(h(7),["export",["default",d(j)]]):["export",d(Tr)]));var Ir=20,we=200,Yt=10,Zt=13,qt=34,bt=35,ro=39,ge=40,Rr=41,eo=91,Or=123,_r=125,to=(r,e)=>{for(;r<e;){let t=c.charCodeAt(r++);if(t===Yt||t===Zt)return!0}return!1},oo=r=>r===qt||r===ro||r===eo||r===bt,Ee=()=>E(s.id)||(oo(c.charCodeAt(l))?d(we-.5):null),no=r=>typeof r=="string"||Array.isArray(r)&&(r[0]===void 0||r[0]==="[]"),Se=r=>e=>{if(e)return;let t=l;if(s.space(),s.semi||to(t,l))return!1;let o=Ee();if(!o||(s.space(),c.charCodeAt(l)!==ge))return!1;h();let n=d(0,Rr);return s.space(),c.charCodeAt(l)!==Or?!1:(h(),[r,o,n,d(0,_r)])};g("get",Ir-1,Se("get"));g("set",Ir-1,Se("set"));var Nr=r=>r==null||typeof r=="string"||Array.isArray(r)&&(r[0]===","?r.slice(1).every(Nr):r[0]==="="?typeof r[1]=="string"||Nr(r[1]):r[0]==="..."||r[0]==="{}"||r[0]==="[]"),io=L["*"];g("*",we,r=>{let e=r&&s.newline;if(r&&!e)return;let t=l,o=Ee();if(!o)return r?(T(t),void 0):!1;if(s.space(),c.charCodeAt(l)!==ge)return r?(T(t),void 0):!1;h();let n=d(0,Rr)||null;if(r&&!Nr(n))return T(t),void 0;if(s.space(),c.charCodeAt(l)!==Or)return r?(T(t),void 0):!1;h();let p=[":",o,["function*",null,n,d(0,_r)||null]];return r?r[0]===";"?(r.push(p),r):[";",r,p]:p});L["*"]=io;g("(",Ir-1,r=>{if(!r)return;let e,t;if(Array.isArray(r)&&r[0]==="static"&&(e="static",r=r[1]),Array.isArray(r)&&r[0]==="async"&&(t=!0,r=r[1]),!no(r))return;let o=d(0,Rr)||null;if(s.space(),c.charCodeAt(l)!==Or)return;h();let n=["=>",["()",o],d(0,_r)||null];t&&(n=["async",n]);let p=[":",r,n];return e?[e,p]:p});s.comment["#!"]=`
|
|
8
|
+
`;var Ie=32,Br=10,so=59,po=125,ke=91,Te=40,rr=L.asi??L[";"],fo=s._baseSpace??=s.space,lo=s._baseStep??=s.step,vr=r=>Array.isArray(r)||typeof r=="string",uo=(L[";"]??5)+1,Pr=r=>Array.isArray(r)&&(L[r[0]]<=uo||r[0]==="{}"&&Pr(r[1])),co=(r,e)=>{for(;(e=c.charCodeAt(r))<=Ie;){if(e===Br)return!0;r++}return!1},mo=(r=l,e)=>{for(;r-- >0&&(e=c.charCodeAt(r))<=Ie;)if(e===Br)return!0;return!1};s.space=(r,e)=>{for(;;){for(e=l,r=fo();e<l;)if(c.charCodeAt(e++)===Br){s.newline=!0;break}if(r===so&&co(l+1)){T(l+1),s.newline=s.semi=!0;continue}return r}};s.enter=()=>s.newline=s.semi=!1;s.exit=(r,e)=>{e===po&&(s.newline=!0,s.semi=!1)};s.step=(r,e,t,o)=>{if(s.semi&&e>=rr)return!1;if(r&&!vr(r))return null;if(vr(r)){let p=(t===ke||t===Te)&&mo();if(s.semi||t===ke&&(p||Pr(r))||t===Te&&(Pr(r)||p&&e>=rr))return Ne(r,e,o)??null}let n=s.newline;return lo(r,e,t,o)??(vr(r)&&n?Ne(r,e,o)??null:null)};var Lr=0,ao=2e3,Ne=s.asi=(r,e,t,o,n)=>{if(e>=rr||Lr>=ao)return;s.semi=!1;let p=l;Lr++;try{o=t(rr-.5)}finally{Lr--}if(!(!o||l===p))return n=o?.[0]===";"?o.slice(1):[o],r?.[0]===";"?(r.push(...n),r):[";",r,...n]};var Oe=(r,e,t,o)=>typeof r=="string"?n=>e(n,r,n):r[0]==="."?(t=i(r[1]),o=r[2],n=>e(t(n),o,n)):r[0]==="[]"&&r.length===3?(t=i(r[1]),o=i(r[2]),n=>e(t(n),o(n),n)):r[0]==="()"&&r.length===2?Oe(r[1],e):(()=>{throw Error("Invalid assignment target")})(),Re={"=":(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 Re)f(r,(e,t)=>(t=i(t),Oe(e,(o,n,p)=>Re[r](o,n,t(p)))));f("!",r=>(r=i(r),e=>!r(e)));f("||",(r,e)=>(r=i(r),e=i(e),t=>r(t)||e(t)));f("&&",(r,e)=>(r=i(r),e=i(e),t=>r(t)&&e(t)));f("~",r=>(r=i(r),e=>~r(e)));f("|",(r,e)=>(r=i(r),e=i(e),t=>r(t)|e(t)));f("&",(r,e)=>(r=i(r),e=i(e),t=>r(t)&e(t)));f("^",(r,e)=>(r=i(r),e=i(e),t=>r(t)^e(t)));f(">>",(r,e)=>(r=i(r),e=i(e),t=>r(t)>>e(t)));f("<<",(r,e)=>(r=i(r),e=i(e),t=>r(t)<<e(t)));f(">",(r,e)=>(r=i(r),e=i(e),t=>r(t)>e(t)));f("<",(r,e)=>(r=i(r),e=i(e),t=>r(t)<e(t)));f(">=",(r,e)=>(r=i(r),e=i(e),t=>r(t)>=e(t)));f("<=",(r,e)=>(r=i(r),e=i(e),t=>r(t)<=e(t)));f("==",(r,e)=>(r=i(r),e=i(e),t=>r(t)==e(t)));f("!=",(r,e)=>(r=i(r),e=i(e),t=>r(t)!=e(t)));f("+",(r,e)=>e!==void 0?(r=i(r),e=i(e),t=>r(t)+e(t)):(r=i(r),t=>+r(t)));f("-",(r,e)=>e!==void 0?(r=i(r),e=i(e),t=>r(t)-e(t)):(r=i(r),t=>-r(t)));f("*",(r,e)=>(r=i(r),e=i(e),t=>r(t)*e(t)));f("/",(r,e)=>(r=i(r),e=i(e),t=>r(t)/e(t)));f("%",(r,e)=>(r=i(r),e=i(e),t=>r(t)%e(t)));var Mr=(r,e,t,o)=>typeof r=="string"?n=>e(n,r):r[0]==="."?(t=i(r[1]),o=r[2],n=>e(t(n),o)):r[0]==="[]"&&r.length===3?(t=i(r[1]),o=i(r[2]),n=>e(t(n),o(n))):r[0]==="()"&&r.length===2?Mr(r[1],e):(()=>{throw Error("Invalid increment target")})();f("++",(r,e)=>Mr(r,e===null?(t,o)=>t[o]++:(t,o)=>++t[o]));f("--",(r,e)=>Mr(r,e===null?(t,o)=>t[o]--:(t,o)=>--t[o]));var _e=(...r)=>(r=r.map(i),e=>{let t;for(let o of r)t=o(e);return t});f(",",_e);f(";",_e);var Q=r=>r?.[0]==="_"&&r[1]==="_"||r==="constructor"||r==="prototype",er=r=>{throw Error(r)};f("[]",(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]),o=>t(o)):(t=i(t),o=>[t(o)])),t=>r.flatMap(o=>o(t))):(e==null&&er("Missing index"),r=i(r),e=i(e),t=>{let o=e(t);return Q(o)?void 0:r(t)[o]}));f(".",(r,e)=>(r=i(r),e=e[0]?e:e[1],Q(e)?()=>{}:t=>r(t)[e]));f("()",(r,e)=>{if(e===void 0)return r==null?er("Empty ()"):i(r);let t=n=>n?.[0]===","&&n.slice(1).some(p=>p==null||t(p));t(e)&&er("Empty argument");let o=e?e[0]===","?(e=e.slice(1).map(i),n=>e.map(p=>p(n))):(e=i(e),n=>[e(n)]):()=>[];return Ur(r,(n,p,m)=>n[p](...o(m)))});var M=r=>typeof r=="string"||Array.isArray(r)&&(r[0]==="."||r[0]==="?."||r[0]==="[]"&&r.length===3||r[0]==="?.[]"||r[0]==="()"&&r.length===2&&M(r[1])||r[0]==="{}"),Ur=(r,e,t,o)=>r==null?er("Empty ()"):r[0]==="()"&&r.length==2?Ur(r[1],e):typeof r=="string"?n=>e(n,r,n):r[0]==="."?(t=i(r[1]),o=r[2],n=>e(t(n),o,n)):r[0]==="?."?(t=i(r[1]),o=r[2],n=>{let p=t(n);return p==null?void 0:e(p,o,n)}):r[0]==="[]"&&r.length===3?(t=i(r[1]),o=i(r[2]),n=>e(t(n),o(n),n)):r[0]==="?.[]"?(t=i(r[1]),o=i(r[2]),n=>{let p=t(n);return p==null?void 0:e(p,o(n),n)}):(r=i(r),n=>e([r(n)],0,n)),D=Ur;f("===",(r,e)=>(r=i(r),e=i(e),t=>r(t)===e(t)));f("!==",(r,e)=>(r=i(r),e=i(e),t=>r(t)!==e(t)));f("??",(r,e)=>(r=i(r),e=i(e),t=>r(t)??e(t)));var ho=r=>{throw Error(r)};f("**",(r,e)=>(r=i(r),e=i(e),t=>r(t)**e(t)));f("**=",(r,e)=>(M(r)||ho("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]**=e(n))));f("in",(r,e)=>(r=i(r),e=i(e),t=>r(t)in e(t)));var Ao=r=>{throw Error(r)};f(">>>",(r,e)=>(r=i(r),e=i(e),t=>r(t)>>>e(t)));f(">>>=",(r,e)=>(M(r)||Ao("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]>>>=e(n))));var yo=r=>r[0]?.[0]===","?r[0].slice(1):r,F=(r,e,t)=>{if(typeof r=="string"){t[r]=e;return}let[o,...n]=r,p=yo(n);if(o==="{}"){let m=[];for(let u of p){if(Array.isArray(u)&&u[0]==="..."){let w={};for(let O in e)m.includes(O)||(w[O]=e[O]);t[u[1]]=w;break}let a,y,N;typeof u=="string"?a=y=u:u[0]==="="?(typeof u[1]=="string"?a=y=u[1]:[,a,y]=u[1],N=u[2]):[,a,y]=u,m.push(a);let k=e[a];k===void 0&&N&&(k=i(N)(t)),F(y,k,t)}}else if(o==="[]"){let m=0;for(let u of p){if(u===null){m++;continue}if(Array.isArray(u)&&u[0]==="..."){t[u[1]]=e.slice(m);break}let a=u,y;Array.isArray(u)&&u[0]==="="&&([,a,y]=u);let N=e[m++];N===void 0&&y&&(N=i(y)(t)),F(a,N,t)}}},Kr=(...r)=>(r=r.map(e=>{if(typeof e=="string")return t=>{t[e]=void 0};if(e[0]==="="){let[,t,o]=e,n=i(o);return typeof t=="string"?p=>{p[t]=n(p)}:p=>F(t,n(p),p)}return i(e)}),e=>{for(let t of r)t(e)});f("let",Kr);f("const",Kr);f("var",Kr);var tr=r=>{throw Error(r)};f("=",(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"?o=>{o[t]=e(o)}:o=>F(t,e(o),o)}return M(r)||tr("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]=e(n))});f("||=",(r,e)=>(M(r)||tr("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]||=e(n))));f("&&=",(r,e)=>(M(r)||tr("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]&&=e(n))));f("??=",(r,e)=>(M(r)||tr("Invalid assignment target"),e=i(e),D(r,(t,o,n)=>t[o]??=e(n))));f("?",(r,e,t)=>(r=i(r),e=i(e),t=i(t),o=>r(o)?e(o):t(o)));var P=[];f("=>",(r,e)=>{r=r?.[0]==="()"?r[1]:r;let t=r?r[0]===","?r.slice(1):[r]:[],o=-1,n=null,p=t[t.length-1];Array.isArray(p)&&p[0]==="..."&&(o=t.length-1,n=p[1],t.length--);let m=e?.[0]==="{}";return e=i(m?["{",e[1]]:e),u=>(...a)=>{let y={};t.forEach((k,w)=>y[k]=a[w]),n&&(y[n]=a.slice(o));let N=new Proxy(y,{get:(k,w)=>w in k?k[w]:u?.[w],set:(k,w,O)=>((w in k?k:u)[w]=O,!0),has:(k,w)=>w in k||(u?w in u:!1)});try{let k=e(N);return m?void 0:k}catch(k){if(k===P)return k[0];throw k}}});f("...",r=>(r=i(r),e=>Object.entries(r(e))));f("?.",(r,e)=>(r=i(r),Q(e)?()=>{}:t=>r(t)?.[e]));f("?.[]",(r,e)=>(r=i(r),e=i(e),t=>{let o=e(t);return Q(o)?void 0:r(t)?.[o]}));f("?.()",(r,e)=>{let t=e?e[0]===","?(e=e.slice(1).map(i),n=>e.map(p=>p(n))):(e=i(e),n=>[e(n)]):()=>[];if(r[0]==="."||r[0]==="?."){let n=i(r[1]),p=r[2];return Q(p)?()=>{}:m=>n(m)?.[p]?.(...t(m))}if((r[0]==="[]"||r[0]==="?.[]")&&r.length===3){let n=i(r[1]),p=i(r[2]);return m=>{let u=p(m);return Q(u)?void 0:n(m)?.[u]?.(...t(m))}}let o=i(r);return n=>o(n)?.(...t(n))});f("typeof",r=>(r=i(r),e=>typeof r(e)));f("void",r=>(r=i(r),e=>(r(e),void 0)));f("delete",r=>{if(r[0]==="."){let e=i(r[1]),t=r[2];return o=>delete e(o)[t]}if(r[0]==="[]"){let e=i(r[1]),t=i(r[2]);return o=>delete e(o)[t(o)]}return()=>!0});f("new",r=>{let e=i(r?.[0]==="()"?r[1]:r),t=r?.[0]==="()"?r[2]:null,o=t?t[0]===","?(n=>p=>n.map(m=>m(p)))(t.slice(1).map(i)):(n=>p=>[n(p)])(i(t)):()=>[];return n=>new(e(n))(...o(n))});var or=Symbol("accessor");f("get",(r,e)=>(e=e?i(e):()=>{},t=>[[or,r,{get:function(){let o=Object.create(t||{});return o.this=this,e(o)}}]]));f("set",(r,e,t)=>(t=t?i(t):()=>{},o=>[[or,r,{set:function(n){let p=Object.create(o||{});p.this=this,p[e]=n,t(p)}}]]));var Co=r=>r==null||typeof r=="string"||[":",",","...","get","set"].includes(r[0]);f("{}",(r,e)=>{if(e!==void 0)return;if(!Co(r))return i(["{",r]);r=r?r[0]!==","?[r]:r.slice(1):[];let t=r.map(o=>i(typeof o=="string"?[":",o,o]:o));return o=>{let n={},p={};for(let m of t.flatMap(u=>u(o)))if(m[0]===or){let[,u,a]=m;p[u]={...p[u],...a,configurable:!0,enumerable:!0}}else n[m[0]]=m[1];for(let m in p)Object.defineProperty(n,m,p[m]);return n}});f("{",r=>(r=r?i(r):()=>{},e=>r(Object.create(e))));f(":",(r,e)=>(e=i(e),Array.isArray(r)?(r=i(r),t=>[[r(t),e(t)]]):t=>[[r,e(t)]]));f("`",(...r)=>(r=r.map(i),e=>r.map(t=>t(e)).join("")));f("``",(r,...e)=>{r=i(r);let t=[],o=[];for(let p of e)Array.isArray(p)&&p[0]===void 0?t.push(p[1]):o.push(i(p));let n=Object.assign([...t],{raw:t});return p=>r(p)(n,...o.map(m=>m(p)))});f("function",(r,e,t)=>{t=t?i(t):()=>{};let o=e?e[0]===","?e.slice(1):[e]:[],n=null,p=-1,m=o[o.length-1];return Array.isArray(m)&&m[0]==="..."&&(p=o.length-1,n=m[1],o.length--),u=>{let a=(...y)=>{let N={};o.forEach((w,O)=>N[w]=y[O]),n&&(N[n]=y.slice(p));let k=new Proxy(N,{get:(w,O)=>O in w?w[O]:u[O],set:(w,O,Pe)=>((O in w?w:u)[O]=Pe,!0),has:(w,O)=>O in w||O in u});try{return t(k)}catch(w){if(w===P)return w[0];throw w}};return r&&(u[r]=a),a}});f("function*",(r,e,t)=>{throw Error("Generator functions are not supported in evaluation")});f("async",r=>{let e=i(r);return t=>{let o=e(t);return async function(...n){return o(...n)}}});f("await",r=>(r=i(r),async e=>await r(e)));f("yield",r=>(r=r?i(r):null,e=>{throw{__yield__:r?r(e):void 0}}));f("yield*",r=>(r=i(r),e=>{throw{__yield_all__:r(e)}}));var wo=Symbol("static"),go=r=>{throw Error(r)};f("instanceof",(r,e)=>(r=i(r),e=i(e),t=>r(t)instanceof e(t)));f("class",(r,e,t)=>(e=e?i(e):null,t=t?i(t):null,o=>{let n=e?e(o):Object,p=function(...m){if(!(this instanceof p))return go("Class constructor must be called with new");let u=e?Reflect.construct(n,m,p):this;return p.prototype.__constructor__&&p.prototype.__constructor__.apply(u,m),u};if(Object.setPrototypeOf(p.prototype,n.prototype),Object.setPrototypeOf(p,n),t){let m=Object.create(o);m.super=n;let u=t(m),a=Array.isArray(u)&&typeof u[0]?.[0]=="string"?u:[];for(let[y,N]of a)y==="constructor"?p.prototype.__constructor__=N:p.prototype[y]=N}return r&&(o[r]=p),p}));f("static",r=>(r=i(r),e=>[[wo,r(e)]]));f("//",(r,e)=>{let t=new RegExp(r,e||"");return()=>t});f("if",(r,e,t)=>(r=i(r),e=i(e),t=t!==void 0?i(t):null,o=>r(o)?e(o):t?.(o)));var U=Symbol("break"),G=Symbol("continue");f("while",(r,e)=>(r=i(r),e=i(e),t=>{let o;for(;r(t);)try{o=e(t)}catch(n){if(n===U)break;if(n===G)continue;if(n===P)return n[0];throw n}return o}));f("do",(r,e)=>(r=i(r),e=i(e),t=>{let o;do try{o=r(t)}catch(n){if(n===U)break;if(n===G)continue;if(n===P)return n[0];throw n}while(e(t));return o}));f("for",(r,e)=>{if(Array.isArray(r)&&r[0]===";"){let[,t,o,n]=r;return t=t?i(t):null,o=o?i(o):()=>!0,n=n?i(n):null,e=i(e),p=>{let m;for(t?.(p);o(p);n?.(p))try{m=e(p)}catch(u){if(u===U)break;if(u===G)continue;if(u===P)return u[0];throw u}return m}}if(Array.isArray(r)&&(r[0]==="in"||r[0]==="of")){let[t,o,n]=r;if(Array.isArray(o)&&(o[0]==="let"||o[0]==="const"||o[0]==="var")&&(o=o[1]),t==="in")return So(o,n,e);if(t==="of")return Eo(o,n,e)}});var Eo=(r,e,t)=>{e=i(e),t=i(t);let o=Array.isArray(r);return n=>{let p,m=o?null:n[r];for(let u of e(n)){o?F(r,u,n):n[r]=u;try{p=t(n)}catch(a){if(a===U)break;if(a===G)continue;if(a===P)return a[0];throw a}}return o||(n[r]=m),p}},So=(r,e,t)=>{e=i(e),t=i(t);let o=Array.isArray(r);return n=>{let p,m=o?null:n[r];for(let u in e(n)){o?F(r,u,n):n[r]=u;try{p=t(n)}catch(a){if(a===U)break;if(a===G)continue;if(a===P)return a[0];throw a}}return o||(n[r]=m),p}};f("break",()=>()=>{throw U});f("continue",()=>()=>{throw G});f("return",r=>(r=r!==void 0?i(r):null,e=>{throw P[0]=r?.(e),P}));f("try",(r,...e)=>{r=r?i(r):null;let t=e.find(u=>u?.[0]==="catch"),o=e.find(u=>u?.[0]==="finally"),n=t?.[1],p=t?.[2]?i(t[2]):null,m=o?.[1]?i(o[1]):null;return u=>{let a;try{a=r?.(u)}catch(y){if(y===U||y===G||y===P)throw y;if(n!=null&&p){let N=n in u,k=u[n];u[n]=y;try{a=p(u)}finally{N?u[n]=k:delete u[n]}}else if(!p)throw y}finally{m?.(u)}return a}});f("throw",r=>(r=i(r),e=>{throw r(e)}));f("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 o=r(t),n=!1,p;for(let[u,a]of e)if(n||u===null||u(t)===o)for(n=!0,m=0;m<a.length;m++)try{p=a[m](t)}catch(y){if(y===U)return p;throw y}var m;return p}):t=>r(t)));f("import",()=>()=>{});f("export",()=>()=>{});f("from",(r,e)=>()=>{});f("as",(r,e)=>()=>{});f("default",r=>i(r));var ve=new WeakMap,ko=(r,...e)=>typeof r=="string"?i(s(r)):ve.get(r)||ve.set(r,To(r,e)).get(r),Le=57344,To=(r,e)=>{let t=r.reduce((p,m,u)=>p+(u?String.fromCharCode(Le+u-1):"")+m,""),o=s(t),n=p=>{if(typeof p=="string"&&p.length===1){let m=p.charCodeAt(0)-Le,u;if(m>=0&&m<e.length)return u=e[m],No(u)?u:[,u]}return Array.isArray(p)?p.map(n):p};return i(n(o))},No=r=>typeof r=="string"||Array.isArray(r)&&(typeof r[0]=="string"||r[0]===void 0),Io=ko;export{sr as access,A as binary,i as compile,c as cur,Io as default,R as err,d as expr,z as group,Ro as id,l as idx,C as keyword,$ as literal,Be as loc,I as lookup,Fr as member,ir as nary,E as next,f as operator,nr as operators,v as parens,s as parse,W as peek,L as prec,pr as propName,T as seek,h as skip,g as token,_ as unary,S as word};
|