@builder.io/sdk-react 3.0.1 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/lib/browser/blocks-exports.cjs +23 -23
  2. package/lib/browser/blocks-exports.mjs +678 -678
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/server-entry-5eafc5bd.cjs +2 -0
  6. package/lib/browser/server-entry-c904f136.js +748 -0
  7. package/lib/browser/server-entry.cjs +1 -1
  8. package/lib/browser/server-entry.mjs +1 -1
  9. package/lib/edge/accordion-032726a7.cjs +1 -0
  10. package/lib/edge/{accordion-1572cb0d.js → accordion-c786f197.js} +17 -16
  11. package/lib/edge/blocks-105e50e5.js +3534 -0
  12. package/lib/edge/blocks-827b0a87.cjs +30 -0
  13. package/lib/edge/blocks-exports.cjs +1 -1
  14. package/lib/edge/blocks-exports.mjs +2 -2
  15. package/lib/edge/{button-cf66cf8d.cjs → button-5cbfe22c.cjs} +1 -1
  16. package/lib/edge/{button-0709893d.js → button-f0e0ea72.js} +2 -2
  17. package/lib/edge/{columns-e234acc6.js → columns-9e187314.js} +14 -15
  18. package/lib/edge/columns-d07da61d.cjs +28 -0
  19. package/lib/edge/content-variants-0db90715.cjs +134 -0
  20. package/lib/edge/{content-variants-3ab9230f.js → content-variants-59dc0824.js} +209 -205
  21. package/lib/edge/{custom-code-6d9730ff.cjs → custom-code-8119ea3f.cjs} +1 -1
  22. package/lib/edge/form-79639135.cjs +1 -0
  23. package/lib/edge/{form-27bcc23a.js → form-7a7b98cf.js} +7 -8
  24. package/lib/edge/{get-class-prop-name-a3bd113c.js → get-class-prop-name-6b143ec7.js} +1 -1
  25. package/lib/edge/{get-class-prop-name-0b3d48a4.cjs → get-class-prop-name-8fb0e5ad.cjs} +1 -1
  26. package/lib/edge/{image-5c9e156f.js → image-2a2b26d2.js} +6 -6
  27. package/lib/edge/{image-94922c87.cjs → image-4db81d72.cjs} +3 -3
  28. package/lib/edge/{img-80be6914.js → img-2c4c6b78.js} +1 -1
  29. package/lib/edge/{img-e0c8f7f9.cjs → img-72bf9d21.cjs} +1 -1
  30. package/lib/edge/index.cjs +1 -1
  31. package/lib/edge/index.mjs +1 -1
  32. package/lib/edge/{input-f5ba6b1e.cjs → input-6eca8427.cjs} +1 -1
  33. package/lib/edge/{input-920922d5.js → input-752f3ce9.js} +1 -1
  34. package/lib/edge/{select-2ced1aca.cjs → select-49a73a0b.cjs} +1 -1
  35. package/lib/edge/{select-673864b7.js → select-a1d6e80e.js} +1 -1
  36. package/lib/edge/server-entry-35f12729.js +746 -0
  37. package/lib/edge/server-entry-6b2058e2.cjs +2 -0
  38. package/lib/edge/server-entry.cjs +1 -1
  39. package/lib/edge/server-entry.mjs +1 -1
  40. package/lib/edge/slot-2327e009.cjs +1 -0
  41. package/lib/edge/{slot-68f2b177.js → slot-b9bcbd41.js} +5 -6
  42. package/lib/edge/{symbol-7e260a70.js → symbol-33e7736f.js} +2 -2
  43. package/lib/edge/{symbol-ded9dba9.cjs → symbol-3527699b.cjs} +1 -1
  44. package/lib/edge/tabs-2df0eaa2.cjs +1 -0
  45. package/lib/edge/{tabs-5156494d.js → tabs-bc422e4c.js} +15 -16
  46. package/lib/edge/text-5915f038.js +17 -0
  47. package/lib/edge/text-e6dbb721.cjs +1 -0
  48. package/lib/node/blocks-exports.cjs +24 -24
  49. package/lib/node/blocks-exports.mjs +555 -555
  50. package/lib/node/index.cjs +1 -1
  51. package/lib/node/index.mjs +3 -3
  52. package/lib/node/init.cjs +1 -1
  53. package/lib/node/init.mjs +3 -3
  54. package/lib/node/server-entry-606ce65a.cjs +2 -0
  55. package/lib/node/server-entry-d1ed35c5.js +749 -0
  56. package/lib/node/server-entry.cjs +1 -1
  57. package/lib/node/server-entry.mjs +1 -1
  58. package/lib/node/{setIvm-8b303d4e.js → setIvm-6675714a.js} +1 -1
  59. package/lib/node/{setIvm-aba1bed8.cjs → setIvm-e4deba11.cjs} +1 -1
  60. package/lib/node/setIvm.cjs +1 -1
  61. package/lib/node/setIvm.mjs +2 -2
  62. package/lib/node/{should-force-browser-runtime-in-node-491a9b55.cjs → should-force-browser-runtime-in-node-03adae17.cjs} +1 -1
  63. package/lib/node/{should-force-browser-runtime-in-node-0a037bde.js → should-force-browser-runtime-in-node-75b2b3a0.js} +1 -1
  64. package/package.json +1 -1
  65. package/types/constants/sdk-version.d.ts +1 -1
  66. package/types/functions/get-block-component-options.d.ts +2 -1
  67. package/types/functions/get-processed-block.d.ts +1 -6
  68. package/types/helpers/flatten.d.ts +6 -0
  69. package/types/server-index.d.ts +1 -1
  70. package/types/types/builder-content.d.ts +1 -0
  71. package/types/types/input.d.ts +10 -0
  72. package/lib/browser/server-entry-017b8439.js +0 -717
  73. package/lib/browser/server-entry-9f80066e.cjs +0 -2
  74. package/lib/edge/accordion-decb24cf.cjs +0 -1
  75. package/lib/edge/blocks-9c35be74.js +0 -916
  76. package/lib/edge/blocks-d3823063.cjs +0 -12
  77. package/lib/edge/columns-2fdf0656.cjs +0 -28
  78. package/lib/edge/content-variants-616a6c0f.cjs +0 -134
  79. package/lib/edge/evaluate-ccf1ad96.cjs +0 -19
  80. package/lib/edge/evaluate-f0b82ede.js +0 -2612
  81. package/lib/edge/form-7c61693d.cjs +0 -1
  82. package/lib/edge/server-entry-6c0047ea.js +0 -715
  83. package/lib/edge/server-entry-de142ee8.cjs +0 -2
  84. package/lib/edge/slot-cc8b4e5b.cjs +0 -1
  85. package/lib/edge/tabs-d422921f.cjs +0 -1
  86. package/lib/edge/text-27a917c0.js +0 -37
  87. package/lib/edge/text-5796f488.cjs +0 -1
  88. package/lib/node/server-entry-e91e06a3.cjs +0 -2
  89. package/lib/node/server-entry-fdedc1aa.js +0 -718
@@ -1,2612 +0,0 @@
1
- import { isEditing as Jr, isBrowser as St, getUserAttributes as $r, logger as At, checkIsDefined as Kr } from "./server-entry-6c0047ea.js";
2
- const Zr = (e, t, n) => {
3
- const r = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((i, s) => i != null ? i[s] : i, e);
4
- return r === void 0 || r === e ? n : r;
5
- }, Or = ({
6
- builder: e,
7
- context: t,
8
- event: n,
9
- state: r
10
- }) => Object.entries({
11
- state: r,
12
- Builder: e,
13
- // legacy
14
- builder: e,
15
- context: t,
16
- event: n
17
- }), zr = () => ({
18
- isEditing: Jr(),
19
- isBrowser: St(),
20
- isServer: !St(),
21
- getUserAttributes: () => $r()
22
- }), Qr = (e, {
23
- isExpression: t = !0
24
- }) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e;
25
- function It({
26
- rootState: e,
27
- localState: t,
28
- rootSetState: n
29
- }) {
30
- return new Proxy(e, {
31
- get: (r, i) => {
32
- if (t && i in t)
33
- return t[i];
34
- const s = r[i];
35
- return typeof s == "object" && s !== null ? It({
36
- rootState: s,
37
- localState: void 0,
38
- rootSetState: n ? (u) => {
39
- r[i] = u, n(r);
40
- } : void 0
41
- }) : s;
42
- },
43
- set: (r, i, s) => {
44
- if (t && i in t)
45
- throw new Error("Writing to local state is not allowed as it is read-only.");
46
- return r[i] = s, n == null || n(r), !0;
47
- }
48
- });
49
- }
50
- const qr = ({
51
- code: e,
52
- builder: t,
53
- context: n,
54
- event: r,
55
- localState: i,
56
- rootSetState: s,
57
- rootState: u
58
- }) => {
59
- const h = Or({
60
- builder: t,
61
- context: n,
62
- event: r,
63
- state: It({
64
- rootState: u,
65
- localState: i,
66
- rootSetState: s
67
- })
68
- });
69
- return new Function(...h.map(([d]) => d), e)(...h.map(([, d]) => d));
70
- };
71
- var O, en = function(e) {
72
- function t(o) {
73
- return 48 > o ? o === 36 : 58 > o ? !0 : 65 > o ? !1 : 91 > o ? !0 : 97 > o ? o === 95 : 123 > o ? !0 : 170 <= o && Hr.test(String.fromCharCode(o));
74
- }
75
- function n(o) {
76
- return 65 > o ? o === 36 : 91 > o ? !0 : 97 > o ? o === 95 : 123 > o ? !0 : 170 <= o && mr.test(String.fromCharCode(o));
77
- }
78
- function r(o, a) {
79
- for (var l = g, p = 1, E = 0; ; ) {
80
- Ke.lastIndex = E;
81
- var M = Ke.exec(l);
82
- if (M && M.index < o)
83
- ++p, E = M.index + M[0].length;
84
- else
85
- break;
86
- }
87
- throw l = {
88
- line: p,
89
- ab: o - E
90
- }, a += " (" + l.line + ":" + l.ab + ")", a = new SyntaxError(a), a.j = o, a.X = l, a.o = c, a;
91
- }
92
- function i(o) {
93
- o = o.split(" ");
94
- for (var a = /* @__PURE__ */ Object.create(null), l = 0; l < o.length; l++)
95
- a[o[l]] = !0;
96
- return function(p) {
97
- return a[p] || !1;
98
- };
99
- }
100
- function s() {
101
- this.line = ue, this.ab = c - K;
102
- }
103
- function u(o, a) {
104
- fe = c, j.C && (ut = new s()), w = o, d(), V = a, Oe = o.m;
105
- }
106
- function h() {
107
- for (var o = c, a = j.va && j.C && new s(), l = g.charCodeAt(c += 2); c < pe && l !== 10 && l !== 13 && l !== 8232 && l !== 8233; )
108
- ++c, l = g.charCodeAt(c);
109
- j.va && j.va(!1, g.slice(o + 2, c), o, c, a, j.C && new s());
110
- }
111
- function d() {
112
- for (; c < pe; ) {
113
- var o = g.charCodeAt(c);
114
- if (o === 32)
115
- ++c;
116
- else if (o === 13)
117
- ++c, o = g.charCodeAt(c), o === 10 && ++c, j.C && (++ue, K = c);
118
- else if (o === 10 || o === 8232 || o === 8233)
119
- ++c, j.C && (++ue, K = c);
120
- else if (8 < o && 14 > o)
121
- ++c;
122
- else if (o === 47)
123
- if (o = g.charCodeAt(c + 1), o === 42) {
124
- o = void 0;
125
- var a = j.va && j.C && new s(), l = c, p = g.indexOf("*/", c += 2);
126
- if (p === -1 && r(c - 2, "Unterminated comment"), c = p + 2, j.C)
127
- for (Ke.lastIndex = l; (o = Ke.exec(g)) && o.index < c; )
128
- ++ue, K = o.index + o[0].length;
129
- j.va && j.va(!0, g.slice(l + 2, p), l, c, a, j.C && new s());
130
- } else if (o === 47)
131
- h();
132
- else
133
- break;
134
- else if (o === 160)
135
- ++c;
136
- else if (5760 <= o && Wr.test(String.fromCharCode(o)))
137
- ++c;
138
- else
139
- break;
140
- }
141
- }
142
- function N(o) {
143
- switch (o) {
144
- case 46:
145
- o = g.charCodeAt(c + 1), 48 <= o && 57 >= o ? Qe(!0) : (++c, u(cr));
146
- return;
147
- case 40:
148
- return ++c, u(Z);
149
- case 41:
150
- return ++c, u(H);
151
- case 59:
152
- return ++c, u(z);
153
- case 44:
154
- return ++c, u(oe);
155
- case 91:
156
- return ++c, u(mt);
157
- case 93:
158
- return ++c, u(wt);
159
- case 123:
160
- return ++c, u(Ie);
161
- case 125:
162
- return ++c, u(ge);
163
- case 58:
164
- return ++c, u(Te);
165
- case 63:
166
- return ++c, u(pr);
167
- case 48:
168
- if (o = g.charCodeAt(c + 1), o === 120 || o === 88) {
169
- c += 2, o = Y(16), o === null && r(R + 2, "Expected hexadecimal number"), n(g.charCodeAt(c)) && r(c, "Identifier directly after number"), u(Ae, o);
170
- return;
171
- }
172
- case 49:
173
- case 50:
174
- case 51:
175
- case 52:
176
- case 53:
177
- case 54:
178
- case 55:
179
- case 56:
180
- case 57:
181
- return Qe(!1);
182
- case 34:
183
- case 39:
184
- c++;
185
- for (var a = ""; ; ) {
186
- c >= pe && r(R, "Unterminated string constant");
187
- var l = g.charCodeAt(c);
188
- if (l === o) {
189
- ++c, u(He, a);
190
- break;
191
- }
192
- if (l === 92) {
193
- l = g.charCodeAt(++c);
194
- var p = /^[0-7]+/.exec(g.slice(c, c + 3));
195
- for (p && (p = p[0]); p && 255 < parseInt(p, 8); )
196
- p = p.slice(0, -1);
197
- if (p === "0" && (p = null), ++c, p)
198
- X && r(c - 2, "Octal literal in strict mode"), a += String.fromCharCode(parseInt(p, 8)), c += p.length - 1;
199
- else
200
- switch (l) {
201
- case 110:
202
- a += `
203
- `;
204
- break;
205
- case 114:
206
- a += "\r";
207
- break;
208
- case 120:
209
- a += String.fromCharCode(G(2));
210
- break;
211
- case 117:
212
- a += String.fromCharCode(G(4));
213
- break;
214
- case 85:
215
- a += String.fromCharCode(G(8));
216
- break;
217
- case 116:
218
- a += " ";
219
- break;
220
- case 98:
221
- a += "\b";
222
- break;
223
- case 118:
224
- a += "\v";
225
- break;
226
- case 102:
227
- a += "\f";
228
- break;
229
- case 48:
230
- a += "\0";
231
- break;
232
- case 13:
233
- g.charCodeAt(c) === 10 && ++c;
234
- case 10:
235
- j.C && (K = c, ++ue);
236
- break;
237
- default:
238
- a += String.fromCharCode(l);
239
- }
240
- } else
241
- l !== 13 && l !== 10 && l !== 8232 && l !== 8233 || r(R, "Unterminated string constant"), a += String.fromCharCode(l), ++c;
242
- }
243
- return;
244
- case 47:
245
- o = g.charCodeAt(c + 1), Oe ? (++c, Ge()) : o === 61 ? C(le, 2) : C(fr, 1);
246
- return;
247
- case 37:
248
- case 42:
249
- g.charCodeAt(c + 1) === 61 ? C(le, 2) : C(Gr, 1);
250
- return;
251
- case 124:
252
- case 38:
253
- a = g.charCodeAt(c + 1), a === o ? C(o === 124 ? vr : yr, 2) : a === 61 ? C(le, 2) : C(o === 124 ? _r : Dr, 1);
254
- return;
255
- case 94:
256
- g.charCodeAt(c + 1) === 61 ? C(le, 2) : C(br, 1);
257
- return;
258
- case 43:
259
- case 45:
260
- a = g.charCodeAt(c + 1), a === o ? a === 45 && g.charCodeAt(c + 2) === 62 && $e.test(g.slice(ie, c)) ? (c += 3, h(), d(), P()) : C(Mr, 2) : a === 61 ? C(le, 2) : C(Br, 1);
261
- return;
262
- case 60:
263
- case 62:
264
- a = g.charCodeAt(c + 1), l = 1, a === o ? (l = o === 62 && g.charCodeAt(c + 2) === 62 ? 3 : 2, g.charCodeAt(c + l) === 61 ? C(le, l + 1) : C(Lr, l)) : a === 33 && o === 60 && g.charCodeAt(c + 2) === 45 && g.charCodeAt(c + 3) === 45 ? (c += 4, h(), d(), P()) : (a === 61 && (l = g.charCodeAt(c + 2) === 61 ? 3 : 2), C(Fr, l));
265
- return;
266
- case 61:
267
- case 33:
268
- g.charCodeAt(c + 1) === 61 ? C(Ur, g.charCodeAt(c + 2) === 61 ? 3 : 2) : C(o === 61 ? hr : gr, 1);
269
- return;
270
- case 126:
271
- return C(gr, 1);
272
- }
273
- return !1;
274
- }
275
- function P(o) {
276
- if (o ? c = R + 1 : R = c, j.C && (at = new s()), o)
277
- return Ge();
278
- if (c >= pe)
279
- return u(pt);
280
- if (o = g.charCodeAt(c), n(o) || o === 92)
281
- return ce();
282
- if (N(o) === !1) {
283
- if (o = String.fromCharCode(o), o === "\\" || mr.test(o))
284
- return ce();
285
- r(c, "Unexpected character '" + o + "'");
286
- }
287
- }
288
- function C(o, a) {
289
- var l = g.slice(c, c + a);
290
- c += a, u(o, l);
291
- }
292
- function Ge() {
293
- for (var o, a, l = c; ; ) {
294
- c >= pe && r(l, "Unterminated regexp");
295
- var p = g.charAt(c);
296
- if ($e.test(p) && r(l, "Unterminated regexp"), o)
297
- o = !1;
298
- else {
299
- if (p === "[")
300
- a = !0;
301
- else if (p === "]" && a)
302
- a = !1;
303
- else if (p === "/" && !a)
304
- break;
305
- o = p === "\\";
306
- }
307
- ++c;
308
- }
309
- o = g.slice(l, c), ++c, (a = re()) && !/^[gmi]*$/.test(a) && r(l, "Invalid regexp flag");
310
- try {
311
- var E = new RegExp(o, a);
312
- } catch (M) {
313
- throw M instanceof SyntaxError && r(l, M.message), M;
314
- }
315
- u(Ht, E);
316
- }
317
- function Y(o, a) {
318
- for (var l = c, p = 0, E = a === void 0 ? 1 / 0 : a, M = 0; M < E; ++M) {
319
- var F = g.charCodeAt(c);
320
- if (F = 97 <= F ? F - 97 + 10 : 65 <= F ? F - 65 + 10 : 48 <= F && 57 >= F ? F - 48 : 1 / 0, F >= o)
321
- break;
322
- ++c, p = p * o + F;
323
- }
324
- return c === l || a !== void 0 && c - l !== a ? null : p;
325
- }
326
- function Qe(o) {
327
- var a = c, l = !1, p = g.charCodeAt(c) === 48;
328
- o || Y(10) !== null || r(a, "Invalid number"), g.charCodeAt(c) === 46 && (++c, Y(10), l = !0), o = g.charCodeAt(c), (o === 69 || o === 101) && (o = g.charCodeAt(++c), o !== 43 && o !== 45 || ++c, Y(10) === null && r(a, "Invalid number"), l = !0), n(g.charCodeAt(c)) && r(c, "Identifier directly after number"), o = g.slice(a, c);
329
- var E;
330
- l ? E = parseFloat(o) : p && o.length !== 1 ? /[89]/.test(o) || X ? r(a, "Invalid number") : E = parseInt(o, 8) : E = parseInt(o, 10), u(Ae, E);
331
- }
332
- function G(o) {
333
- return o = Y(16, o), o === null && r(R, "Bad character escape sequence"), o;
334
- }
335
- function re() {
336
- ve = !1;
337
- for (var o, a = !0, l = c; ; ) {
338
- var p = g.charCodeAt(c);
339
- if (t(p))
340
- ve && (o += g.charAt(c)), ++c;
341
- else if (p === 92) {
342
- ve || (o = g.slice(l, c)), ve = !0, g.charCodeAt(++c) !== 117 && r(c, "Expecting Unicode escape sequence \\uXXXX"), ++c, p = G(4);
343
- var E = String.fromCharCode(p);
344
- E || r(c - 1, "Invalid Unicode escape"), (a ? n(p) : t(p)) || r(c - 4, "Invalid Unicode escape"), o += E;
345
- } else
346
- break;
347
- a = !1;
348
- }
349
- return ve ? o : g.slice(l, c);
350
- }
351
- function ce() {
352
- var o = re(), a = he;
353
- !ve && Vr(o) && (a = Rr[o]), u(a, o);
354
- }
355
- function S() {
356
- lt = R, ie = fe, ct = ut, P();
357
- }
358
- function xe(o) {
359
- if (X = o, c = R, j.C)
360
- for (; c < K; )
361
- K = g.lastIndexOf(`
362
- `, K - 2) + 1, --ue;
363
- d(), P();
364
- }
365
- function Bt() {
366
- this.type = null, this.start = R, this.end = null;
367
- }
368
- function Gt() {
369
- this.start = at, this.end = null, st && (this.source = st);
370
- }
371
- function b() {
372
- var o = new Bt();
373
- return j.C && (o.X = new Gt()), j.vb && (o.sourceFile = j.vb), j.Xa && (o.j = [R, 0]), o;
374
- }
375
- function ne(o) {
376
- var a = new Bt();
377
- return a.start = o.start, j.C && (a.X = new Gt(), a.X.start = o.X.start), j.Xa && (a.j = [o.j[0], 0]), a;
378
- }
379
- function x(o, a) {
380
- return o.type = a, o.end = ie, j.C && (o.X.end = ct), j.Xa && (o.j[1] = ie), o;
381
- }
382
- function qe(o) {
383
- return o.type === "ExpressionStatement" && o.la.type === "Literal" && o.la.value === "use strict";
384
- }
385
- function A(o) {
386
- return w === o ? (S(), !0) : !1;
387
- }
388
- function Xe() {
389
- return !j.fc && (w === pt || w === ge || $e.test(g.slice(ie, R)));
390
- }
391
- function ae() {
392
- A(z) || Xe() || J();
393
- }
394
- function I(o) {
395
- w === o ? S() : J();
396
- }
397
- function J() {
398
- r(R, "Unexpected token");
399
- }
400
- function Ve(o) {
401
- o.type !== "Identifier" && o.type !== "MemberExpression" && r(o.start, "Assigning to rvalue"), X && o.type === "Identifier" && Je(o.name) && r(o.start, "Assigning to " + o.name + " in strict mode");
402
- }
403
- function W() {
404
- (w === fr || w === le && V === "/=") && P(!0);
405
- var o = w, a = b();
406
- switch (o) {
407
- case ft:
408
- case Jt:
409
- S();
410
- var l = o === ft;
411
- A(z) || Xe() ? a.label = null : w !== he ? J() : (a.label = $(), ae());
412
- for (var p = 0; p < T.length; ++p) {
413
- var E = T[p];
414
- if ((a.label === null || E.name === a.label.name) && (E.kind !== null && (l || E.kind === "loop") || a.label && l))
415
- break;
416
- }
417
- return p === T.length && r(a.start, "Unsyntactic " + o.l), x(a, l ? "BreakStatement" : "ContinueStatement");
418
- case $t:
419
- return S(), ae(), x(a, "DebuggerStatement");
420
- case Zt:
421
- return S(), T.push(Et), a.body = W(), T.pop(), I(dt), a.test = je(), ae(), x(a, "DoWhileStatement");
422
- case qt:
423
- return S(), T.push(Et), I(Z), w === z ? et(a, null) : w === yt ? (o = b(), S(), Vt(o, !0), x(o, "VariableDeclaration"), o.fa.length === 1 && A(Ye) ? Xt(a, o) : et(a, o)) : (o = U(!1, !0), A(Ye) ? (Ve(o), Xt(a, o)) : et(a, o));
424
- case gt:
425
- return S(), it(a, !0);
426
- case er:
427
- return S(), a.test = je(), a.da = W(), a.alternate = A(zt) ? W() : null, x(a, "IfStatement");
428
- case tr:
429
- return Ce || j.Ib || r(R, "'return' outside of function"), S(), A(z) || Xe() ? a.K = null : (a.K = U(), ae()), x(a, "ReturnStatement");
430
- case vt:
431
- for (S(), a.Qb = je(), a.tb = [], I(Ie), T.push(Yr); w !== ge; )
432
- w === ht || w === Kt ? (o = w === ht, p && x(p, "SwitchCase"), a.tb.push(p = b()), p.da = [], S(), o ? p.test = U() : (l && r(lt, "Multiple default clauses"), l = !0, p.test = null), I(Te)) : (p || J(), p.da.push(W()));
433
- return p && x(p, "SwitchCase"), S(), T.pop(), x(a, "SwitchStatement");
434
- case rr:
435
- return S(), $e.test(g.slice(ie, R)) && r(ie, "Illegal newline after throw"), a.K = U(), ae(), x(a, "ThrowStatement");
436
- case nr:
437
- return S(), a.block = Se(), a.Ea = null, w === Yt && (o = b(), S(), I(Z), o.Ua = $(), X && Je(o.Ua.name) && r(o.Ua.start, "Binding " + o.Ua.name + " in strict mode"), I(H), o.body = Se(), a.Ea = x(o, "CatchClause")), a.fb = A(Qt) ? Se() : null, a.Ea || a.fb || r(a.start, "Missing catch or finally clause"), x(a, "TryStatement");
438
- case yt:
439
- return S(), Vt(a), ae(), x(a, "VariableDeclaration");
440
- case dt:
441
- return S(), a.test = je(), T.push(Et), a.body = W(), T.pop(), x(a, "WhileStatement");
442
- case ir:
443
- return X && r(R, "'with' in strict mode"), S(), a.object = je(), a.body = W(), x(a, "WithStatement");
444
- case Ie:
445
- return Se();
446
- case z:
447
- return S(), x(a, "EmptyStatement");
448
- default:
449
- if (l = V, E = U(), o === he && E.type === "Identifier" && A(Te)) {
450
- for (p = 0; p < T.length; ++p)
451
- T[p].name === l && r(E.start, "Label '" + l + "' is already declared");
452
- return T.push({
453
- name: l,
454
- kind: w.W ? "loop" : w === vt ? "switch" : null
455
- }), a.body = W(), T.pop(), a.label = E, x(a, "LabeledStatement");
456
- }
457
- return a.la = E, ae(), x(a, "ExpressionStatement");
458
- }
459
- }
460
- function je() {
461
- I(Z);
462
- var o = U();
463
- return I(H), o;
464
- }
465
- function Se(o) {
466
- var a = b(), l = !0, p = !1;
467
- for (a.body = [], I(Ie); !A(ge); ) {
468
- var E = W();
469
- if (a.body.push(E), l && o && qe(E)) {
470
- var M = p;
471
- xe(p = !0);
472
- }
473
- l = !1;
474
- }
475
- return p && !M && xe(!1), x(a, "BlockStatement");
476
- }
477
- function et(o, a) {
478
- return o.ua = a, I(z), o.test = w === z ? null : U(), I(z), o.update = w === H ? null : U(), I(H), o.body = W(), T.pop(), x(o, "ForStatement");
479
- }
480
- function Xt(o, a) {
481
- return o.left = a, o.right = U(), I(H), o.body = W(), T.pop(), x(o, "ForInStatement");
482
- }
483
- function Vt(o, a) {
484
- for (o.fa = [], o.kind = "var"; ; ) {
485
- var l = b();
486
- if (l.id = $(), X && Je(l.id.name) && r(l.id.start, "Binding " + l.id.name + " in strict mode"), l.ua = A(hr) ? U(!0, a) : null, o.fa.push(x(l, "VariableDeclarator")), !A(oe))
487
- break;
488
- }
489
- }
490
- function U(o, a) {
491
- var l = tt(a);
492
- if (!o && w === oe) {
493
- for (o = ne(l), o.xb = [l]; A(oe); )
494
- o.xb.push(tt(a));
495
- return x(o, "SequenceExpression");
496
- }
497
- return l;
498
- }
499
- function tt(o) {
500
- var a = rt(nt(), -1, o);
501
- if (A(pr)) {
502
- var l = ne(a);
503
- l.test = a, l.da = U(!0), I(Te), l.alternate = U(!0, o), a = x(l, "ConditionalExpression");
504
- }
505
- return w.Cb ? (l = ne(a), l.operator = V, l.left = a, S(), l.right = tt(o), Ve(a), x(l, "AssignmentExpression")) : a;
506
- }
507
- function rt(o, a, l) {
508
- var p = w.L;
509
- if (p !== null && (!l || w !== Ye) && p > a) {
510
- var E = ne(o);
511
- return E.left = o, E.operator = V, o = w, S(), E.right = rt(nt(), p, l), p = x(E, o === vr || o === yr ? "LogicalExpression" : "BinaryExpression"), rt(p, a, l);
512
- }
513
- return o;
514
- }
515
- function nt() {
516
- if (w.prefix) {
517
- var o = b(), a = w.$b;
518
- return o.operator = V, Oe = o.prefix = !0, S(), o.K = nt(), a ? Ve(o.K) : X && o.operator === "delete" && o.K.type === "Identifier" && r(o.start, "Deleting local variable in strict mode"), x(o, a ? "UpdateExpression" : "UnaryExpression");
519
- }
520
- for (a = ke(We()); w.cc && !Xe(); )
521
- o = ne(a), o.operator = V, o.prefix = !1, o.K = a, Ve(a), S(), a = x(o, "UpdateExpression");
522
- return a;
523
- }
524
- function ke(o, a) {
525
- if (A(cr)) {
526
- var l = ne(o);
527
- return l.object = o, l.Wa = $(!0), l.bb = !1, ke(x(l, "MemberExpression"), a);
528
- }
529
- return A(mt) ? (l = ne(o), l.object = o, l.Wa = U(), l.bb = !0, I(wt), ke(x(l, "MemberExpression"), a)) : !a && A(Z) ? (l = ne(o), l.callee = o, l.arguments = ot(H, !1), ke(x(l, "CallExpression"), a)) : o;
530
- }
531
- function We() {
532
- switch (w) {
533
- case sr:
534
- var o = b();
535
- return S(), x(o, "ThisExpression");
536
- case he:
537
- return $();
538
- case Ae:
539
- case He:
540
- case Ht:
541
- return o = b(), o.value = V, o.raw = g.slice(R, fe), S(), x(o, "Literal");
542
- case ar:
543
- case ur:
544
- case lr:
545
- return o = b(), o.value = w.$a, o.raw = w.l, S(), x(o, "Literal");
546
- case Z:
547
- o = at;
548
- var a = R;
549
- S();
550
- var l = U();
551
- return l.start = a, l.end = fe, j.C && (l.X.start = o, l.X.end = ut), j.Xa && (l.j = [a, fe]), I(H), l;
552
- case mt:
553
- return o = b(), S(), o.elements = ot(wt, !0, !0), x(o, "ArrayExpression");
554
- case Ie:
555
- for (o = b(), a = !0, l = !1, o.h = [], S(); !A(ge); ) {
556
- if (a)
557
- a = !1;
558
- else if (I(oe), j.sb && A(ge))
559
- break;
560
- var p = {
561
- key: w === Ae || w === He ? We() : $(!0)
562
- }, E = !1;
563
- if (A(Te)) {
564
- p.value = U(!0);
565
- var M = p.kind = "init";
566
- } else
567
- p.key.type !== "Identifier" || p.key.name !== "get" && p.key.name !== "set" ? J() : (E = l = !0, M = p.kind = p.key.name, p.key = w === Ae || w === He ? We() : $(!0), w !== Z && J(), p.value = it(b(), !1));
568
- if (p.key.type === "Identifier" && (X || l))
569
- for (var F = 0; F < o.h.length; ++F) {
570
- var ye = o.h[F];
571
- if (ye.key.name === p.key.name) {
572
- var xt = M === ye.kind || E && ye.kind === "init" || M === "init" && (ye.kind === "get" || ye.kind === "set");
573
- xt && !X && M === "init" && ye.kind === "init" && (xt = !1), xt && r(p.key.start, "Redefinition of property");
574
- }
575
- }
576
- o.h.push(p);
577
- }
578
- return x(o, "ObjectExpression");
579
- case gt:
580
- return o = b(), S(), it(o, !1);
581
- case or:
582
- return o = b(), S(), o.callee = ke(We(), !0), o.arguments = A(Z) ? ot(H, !1) : Pr, x(o, "NewExpression");
583
- }
584
- J();
585
- }
586
- function it(o, a) {
587
- w === he ? o.id = $() : a ? J() : o.id = null, o.oa = [];
588
- var l = !0;
589
- for (I(Z); !A(H); )
590
- l ? l = !1 : I(oe), o.oa.push($());
591
- l = Ce;
592
- var p = T;
593
- if (Ce = !0, T = [], o.body = Se(!0), Ce = l, T = p, X || o.body.body.length && qe(o.body.body[0])) {
594
- for (l = o.id ? -1 : 0; l < o.oa.length; ++l)
595
- if (p = 0 > l ? o.id : o.oa[l], (dr(p.name) || Je(p.name)) && r(p.start, "Defining '" + p.name + "' in strict mode"), 0 <= l)
596
- for (var E = 0; E < l; ++E)
597
- p.name === o.oa[E].name && r(p.start, "Argument name clash in strict mode");
598
- }
599
- return x(o, a ? "FunctionDeclaration" : "FunctionExpression");
600
- }
601
- function ot(o, a, l) {
602
- for (var p = [], E = !0; !A(o); ) {
603
- if (E)
604
- E = !1;
605
- else if (I(oe), a && j.sb && A(o))
606
- break;
607
- p.push(l && w === oe ? null : U(!0));
608
- }
609
- return p;
610
- }
611
- function $(o) {
612
- var a = b();
613
- return o && j.yb === "everywhere" && (o = !1), w === he ? (!o && (j.yb && Xr(V) || X && dr(V)) && g.slice(R, fe).indexOf("\\") === -1 && r(R, "The keyword '" + V + "' is reserved"), a.name = V) : o && w.l ? a.name = w.l : J(), Oe = !1, S(), x(a, "Identifier");
614
- }
615
- e.version = "0.5.0";
616
- var j, g = "", pe, st;
617
- e.parse = function(o, a) {
618
- g = String(o), pe = g.length, j = a || {};
619
- for (var l in Wt)
620
- Object.prototype.hasOwnProperty.call(j, l) || (j[l] = Wt[l]);
621
- for (st = j.sourceFile, ue = 1, c = K = 0, Oe = !0, d(), l = j.dc, lt = ie = c, j.C && (ct = new s()), Ce = X = !1, T = [], P(), o = l || b(), a = !0, l || (o.body = []); w !== pt; )
622
- l = W(), o.body.push(l), a && qe(l) && xe(!0), a = !1;
623
- return x(o, "Program");
624
- };
625
- var Wt = {
626
- fc: !1,
627
- sb: !0,
628
- yb: !1,
629
- Ib: !1,
630
- C: !1,
631
- va: null,
632
- Xa: !1,
633
- dc: null,
634
- sourceFile: null,
635
- vb: null
636
- }, c = 0, R = 0, fe = 0, at, ut, w, V, Oe, ue, K, lt = 0, ie = 0, ct, Ce, T, X, Pr = [], Ae = {
637
- type: "num"
638
- }, Ht = {
639
- type: "regexp"
640
- }, He = {
641
- type: "string"
642
- }, he = {
643
- type: "name"
644
- }, pt = {
645
- type: "eof"
646
- }, ft = {
647
- l: "break"
648
- }, ht = {
649
- l: "case",
650
- m: !0
651
- }, Yt = {
652
- l: "catch"
653
- }, Jt = {
654
- l: "continue"
655
- }, $t = {
656
- l: "debugger"
657
- }, Kt = {
658
- l: "default"
659
- }, Zt = {
660
- l: "do",
661
- W: !0
662
- }, zt = {
663
- l: "else",
664
- m: !0
665
- }, Qt = {
666
- l: "finally"
667
- }, qt = {
668
- l: "for",
669
- W: !0
670
- }, gt = {
671
- l: "function"
672
- }, er = {
673
- l: "if"
674
- }, tr = {
675
- l: "return",
676
- m: !0
677
- }, vt = {
678
- l: "switch"
679
- }, rr = {
680
- l: "throw",
681
- m: !0
682
- }, nr = {
683
- l: "try"
684
- }, yt = {
685
- l: "var"
686
- }, dt = {
687
- l: "while",
688
- W: !0
689
- }, ir = {
690
- l: "with"
691
- }, or = {
692
- l: "new",
693
- m: !0
694
- }, sr = {
695
- l: "this"
696
- }, ar = {
697
- l: "null",
698
- $a: null
699
- }, ur = {
700
- l: "true",
701
- $a: !0
702
- }, lr = {
703
- l: "false",
704
- $a: !1
705
- }, Ye = {
706
- l: "in",
707
- L: 7,
708
- m: !0
709
- }, Rr = {
710
- break: ft,
711
- case: ht,
712
- catch: Yt,
713
- continue: Jt,
714
- debugger: $t,
715
- default: Kt,
716
- do: Zt,
717
- else: zt,
718
- finally: Qt,
719
- for: qt,
720
- function: gt,
721
- if: er,
722
- return: tr,
723
- switch: vt,
724
- throw: rr,
725
- try: nr,
726
- var: yt,
727
- while: dt,
728
- with: ir,
729
- null: ar,
730
- true: ur,
731
- false: lr,
732
- new: or,
733
- in: Ye,
734
- instanceof: {
735
- l: "instanceof",
736
- L: 7,
737
- m: !0
738
- },
739
- this: sr,
740
- typeof: {
741
- l: "typeof",
742
- prefix: !0,
743
- m: !0
744
- },
745
- void: {
746
- l: "void",
747
- prefix: !0,
748
- m: !0
749
- },
750
- delete: {
751
- l: "delete",
752
- prefix: !0,
753
- m: !0
754
- }
755
- }, mt = {
756
- type: "[",
757
- m: !0
758
- }, wt = {
759
- type: "]"
760
- }, Ie = {
761
- type: "{",
762
- m: !0
763
- }, ge = {
764
- type: "}"
765
- }, Z = {
766
- type: "(",
767
- m: !0
768
- }, H = {
769
- type: ")"
770
- }, oe = {
771
- type: ",",
772
- m: !0
773
- }, z = {
774
- type: ";",
775
- m: !0
776
- }, Te = {
777
- type: ":",
778
- m: !0
779
- }, cr = {
780
- type: "."
781
- }, pr = {
782
- type: "?",
783
- m: !0
784
- }, fr = {
785
- L: 10,
786
- m: !0
787
- }, hr = {
788
- Cb: !0,
789
- m: !0
790
- }, le = {
791
- Cb: !0,
792
- m: !0
793
- }, Mr = {
794
- cc: !0,
795
- prefix: !0,
796
- $b: !0
797
- }, gr = {
798
- prefix: !0,
799
- m: !0
800
- }, vr = {
801
- L: 1,
802
- m: !0
803
- }, yr = {
804
- L: 2,
805
- m: !0
806
- }, _r = {
807
- L: 3,
808
- m: !0
809
- }, br = {
810
- L: 4,
811
- m: !0
812
- }, Dr = {
813
- L: 5,
814
- m: !0
815
- }, Ur = {
816
- L: 6,
817
- m: !0
818
- }, Fr = {
819
- L: 7,
820
- m: !0
821
- }, Lr = {
822
- L: 8,
823
- m: !0
824
- }, Br = {
825
- L: 9,
826
- prefix: !0,
827
- m: !0
828
- }, Gr = {
829
- L: 10,
830
- m: !0
831
- }, Xr = i("class enum extends super const export import"), dr = i("implements interface let package private protected public static yield"), Je = i("eval arguments"), Vr = i("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"), Wr = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/, mr = RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"), Hr = RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‌‍‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_]"), $e = /[\n\r\u2028\u2029]/, Ke = /\r\n|[\n\r\u2028\u2029]/g, ve, Et = {
832
- kind: "loop"
833
- }, Yr = {
834
- kind: "switch"
835
- };
836
- }, kt = kt = typeof globalThis == "undefined" ? void 0 : globalThis;
837
- en(kt.j || (kt.j = {}));
838
- function f(e, t) {
839
- typeof e == "string" && (e = me(e, "code"));
840
- var n = e.constructor;
841
- this.ya = function() {
842
- return new n({
843
- options: {}
844
- });
845
- };
846
- var r = this.ya(), i;
847
- for (i in e)
848
- r[i] = i === "body" ? e[i].slice() : e[i];
849
- this.ra = r, this.ca = [], this.qb = t, this.za = !1, this.ba = [], this.Ya = 0, this.rb = /* @__PURE__ */ Object.create(null), e = /^step([A-Z]\w*)$/;
850
- var s, u;
851
- for (u in this)
852
- typeof this[u] == "function" && (s = u.match(e)) && (this.rb[s[1]] = this[u].bind(this));
853
- this.N = Ct(this, this.ra, null), this.Na = this.N.object, this.ra = me(this.ba.join(`
854
- `), "polyfills"), this.ba = void 0, Ze(this.ra), s = new y(this.ra, this.N), s.done = !1, this.o = [s], this.Eb(), this.value = void 0, this.ra = r, s = new y(this.ra, this.N), s.done = !1, this.o.length = 0, this.o[0] = s;
855
- }
856
- var wr = {
857
- C: !0,
858
- kc: 5
859
- }, Tt = {
860
- configurable: !0,
861
- enumerable: !0,
862
- writable: !1
863
- }, v = {
864
- configurable: !0,
865
- enumerable: !1,
866
- writable: !0
867
- }, B = {
868
- configurable: !0,
869
- enumerable: !1,
870
- writable: !1
871
- }, Ne = {
872
- configurable: !1,
873
- enumerable: !1,
874
- writable: !1
875
- }, Er = {
876
- configurable: !1,
877
- enumerable: !0,
878
- writable: !0
879
- }, Cr = {
880
- STEP_ERROR: !0
881
- }, Ee = {
882
- SCOPE_REFERENCE: !0
883
- }, Ue = {
884
- VALUE_IN_DESCRIPTOR: !0
885
- }, de = {
886
- REGEXP_TIMEOUT: !0
887
- }, xr = [], q = null, be = null, se = typeof globalThis == "undefined" ? void 0 : globalThis, tn = ["onmessage = function(e) {", "var result;", "var data = e.data;", "switch (data[0]) {", "case 'split':", "result = data[1].split(data[2], data[3]);", "break;", "case 'match':", "result = data[1].match(data[2]);", "break;", "case 'search':", "result = data[1].search(data[2]);", "break;", "case 'replace':", "result = data[1].replace(data[2], data[3]);", "break;", "case 'exec':", "var regexp = data[1];", "regexp.lastIndex = data[2];", "result = [regexp.exec(data[3]), data[1].lastIndex];", "break;", "default:", "throw Error('Unknown RegExp operation: ' + data[0]);", "}", "postMessage(result);", "close();", "};"];
888
- function Nt(e) {
889
- var t = e >>> 0;
890
- return t === Number(e) ? t : NaN;
891
- }
892
- function De(e) {
893
- var t = e >>> 0;
894
- return String(t) === String(e) && t !== 4294967295 ? t : NaN;
895
- }
896
- function Ze(e, t, n) {
897
- t ? e.start = t : delete e.start, n ? e.end = n : delete e.end;
898
- for (var r in e)
899
- if (r !== "loc" && e.hasOwnProperty(r)) {
900
- var i = e[r];
901
- i && typeof i == "object" && Ze(i, t, n);
902
- }
903
- }
904
- f.prototype.REGEXP_MODE = 2;
905
- f.prototype.REGEXP_THREAD_TIMEOUT = 1e3;
906
- f.prototype.POLYFILL_TIMEOUT = 1e3;
907
- O = f.prototype;
908
- O.P = !1;
909
- O.Ka = !1;
910
- O.Kb = 0;
911
- O.ic = 0;
912
- function me(e, t) {
913
- var n = {}, r;
914
- for (r in wr)
915
- n[r] = wr[r];
916
- return n.sourceFile = t, se.j.parse(e, n);
917
- }
918
- O.Jb = function(e) {
919
- var t = this.o[0];
920
- if (!t || t.node.type !== "Program")
921
- throw Error("Expecting original AST to start with a Program node");
922
- if (typeof e == "string" && (e = me(e, "appendCode" + this.Kb++)), !e || e.type !== "Program")
923
- throw Error("Expecting new AST to start with a Program node");
924
- Fe(this, e, t.scope), Array.prototype.push.apply(t.node.body, e.body), t.node.body.jb = null, t.done = !1;
925
- };
926
- O.lb = function() {
927
- var e = this.o, t;
928
- do {
929
- var n = e[e.length - 1];
930
- if (this.za)
931
- break;
932
- if (!n || n.node.type === "Program" && n.done) {
933
- if (!this.ca.length)
934
- return !1;
935
- if (n = this.ca[0], !n || n.time > Date.now())
936
- n = null;
937
- else {
938
- this.ca.shift(), 0 <= n.interval && Tr(this, n, n.interval);
939
- var r = new y(n.node, n.scope);
940
- n.zb && (r.ia = 2, r.B = this.Na, r.U = n.zb, r.Qa = !0, r.F = n.Lb), n = r;
941
- }
942
- if (!n)
943
- break;
944
- }
945
- r = n.node;
946
- var i = be;
947
- be = this;
948
- try {
949
- var s = this.rb[r.type](e, n, r);
950
- } catch (u) {
951
- if (u !== Cr)
952
- throw this.value !== u && (this.value = void 0), u;
953
- } finally {
954
- be = i;
955
- }
956
- if (s && e.push(s), this.P)
957
- throw this.value = void 0, Error("Getter not supported in this context");
958
- if (this.Ka)
959
- throw this.value = void 0, Error("Setter not supported in this context");
960
- t || r.end || (t = Date.now() + this.POLYFILL_TIMEOUT);
961
- } while (!r.end && t > Date.now());
962
- return !0;
963
- };
964
- O.Eb = function() {
965
- for (; !this.za && this.lb(); )
966
- ;
967
- return this.za;
968
- };
969
- function rn(e, t) {
970
- e.g(t, "NaN", NaN, Ne), e.g(t, "Infinity", 1 / 0, Ne), e.g(t, "undefined", void 0, Ne), e.g(t, "window", t, Tt), e.g(t, "this", t, Ne), e.g(t, "self", t), e.M = new k(null), e.Z = new k(e.M), nn(e, t), on(e, t), t.xa = e.M, e.g(t, "constructor", e.v, v), sn(e, t), an(e, t), un(e, t), ln(e, t), cn(e, t), pn(e, t), fn(e, t), hn(e, t), gn(e, t);
971
- var n = e.i(function() {
972
- throw EvalError("Can't happen");
973
- }, !1);
974
- n.eval = !0, e.g(t, "eval", n, v), e.g(t, "parseInt", e.i(parseInt, !1), v), e.g(t, "parseFloat", e.i(parseFloat, !1), v), e.g(t, "isNaN", e.i(isNaN, !1), v), e.g(t, "isFinite", e.i(isFinite, !1), v);
975
- for (var r = [[escape, "escape"], [unescape, "unescape"], [decodeURI, "decodeURI"], [decodeURIComponent, "decodeURIComponent"], [encodeURI, "encodeURI"], [encodeURIComponent, "encodeURIComponent"]], i = 0; i < r.length; i++)
976
- n = function(s) {
977
- return function(u) {
978
- try {
979
- return s(u);
980
- } catch (h) {
981
- m(e, e.Gb, h.message);
982
- }
983
- };
984
- }(r[i][0]), e.g(t, r[i][1], e.i(n, !1), v);
985
- n = function(s) {
986
- return jr(e, !1, arguments);
987
- }, e.g(t, "setTimeout", e.i(n, !1), v), n = function(s) {
988
- return jr(e, !0, arguments);
989
- }, e.g(t, "setInterval", e.i(n, !1), v), n = function(s) {
990
- Sr(e, s);
991
- }, e.g(t, "clearTimeout", e.i(n, !1), v), n = function(s) {
992
- Sr(e, s);
993
- }, e.g(t, "clearInterval", e.i(n, !1), v), e.OBJECT = e.v, e.OBJECT_PROTO = e.M, e.FUNCTION = e.O, e.FUNCTION_PROTO = e.Z, e.ARRAY = e.qa, e.ARRAY_PROTO = e.La, e.REGEXP = e.I, e.REGEXP_PROTO = e.Ma, e.DATE = e.$, e.DATE_PROTO = e.nb, e.qb && e.qb(e, t);
994
- }
995
- O.Wb = 0;
996
- function nn(e, t) {
997
- var n = /^[A-Za-z_$][\w$]*$/, r = function(i) {
998
- var s = arguments.length ? String(arguments[arguments.length - 1]) : "", u = Array.prototype.slice.call(arguments, 0, -1).join(",").trim();
999
- if (u) {
1000
- u = u.split(/\s*,\s*/);
1001
- for (var h = 0; h < u.length; h++) {
1002
- var d = u[h];
1003
- n.test(d) || m(e, e.T, "Invalid function argument: " + d);
1004
- }
1005
- u = u.join(", ");
1006
- }
1007
- try {
1008
- var N = me("(function(" + u + ") {" + s + "})", "function" + e.Wb++);
1009
- } catch (P) {
1010
- m(e, e.T, "Invalid code: " + P.message);
1011
- }
1012
- return N.body.length !== 1 && m(e, e.T, "Invalid code in function body"), Mt(e, N.body[0].la, e.N, "anonymous");
1013
- };
1014
- e.O = e.i(r, !0), e.g(t, "Function", e.O, v), e.g(e.O, "prototype", e.Z, v), e.g(e.Z, "constructor", e.O, v), e.Z.Ta = function() {
1015
- }, e.Z.Ta.id = e.Ya++, e.Z.Ab = !0, e.g(e.Z, "length", 0, B), e.Z.H = "Function", r = function(i, s) {
1016
- var u = e.o[e.o.length - 1];
1017
- u.U = this, u.B = i, u.F = [], s != null && (s instanceof k ? u.F = Ar(e, s) : m(e, e.j, "CreateListFromArrayLike called on non-object")), u.eb = !1;
1018
- }, _(e, e.O, "apply", r), r = function(i) {
1019
- var s = e.o[e.o.length - 1];
1020
- s.U = this, s.B = i, s.F = [];
1021
- for (var u = 1; u < arguments.length; u++)
1022
- s.F.push(arguments[u]);
1023
- s.eb = !1;
1024
- }, _(e, e.O, "call", r), e.ba.push("Object.defineProperty(Function.prototype, 'bind',", "{configurable: true, writable: true, value:", "function bind(oThis) {", "if (typeof this !== 'function') {", "throw TypeError('What is trying to be bound is not callable');", "}", "var aArgs = Array.prototype.slice.call(arguments, 1),", "fToBind = this,", "fNOP = function() {},", "fBound = function() {", "return fToBind.apply(this instanceof fNOP", "? this", ": oThis,", "aArgs.concat(Array.prototype.slice.call(arguments)));", "};", "if (this.prototype) {", "fNOP.prototype = this.prototype;", "}", "fBound.prototype = new fNOP();", "return fBound;", "}", "});", ""), r = function() {
1025
- return String(this);
1026
- }, _(e, e.O, "toString", r), e.g(e.O, "toString", e.i(r, !1), v), r = function() {
1027
- return this.valueOf();
1028
- }, _(e, e.O, "valueOf", r), e.g(e.O, "valueOf", e.i(r, !1), v);
1029
- }
1030
- function on(e, t) {
1031
- function n(i) {
1032
- i != null || m(e, e.j, "Cannot convert '" + i + "' to object");
1033
- }
1034
- var r = function(i) {
1035
- if (i == null)
1036
- return te(e) ? this : e.s(e.M);
1037
- if (!(i instanceof k)) {
1038
- var s = e.s(ee(e, i));
1039
- return s.data = i, s;
1040
- }
1041
- return i;
1042
- };
1043
- e.v = e.i(r, !0), e.g(e.v, "prototype", e.M, v), e.g(e.M, "constructor", e.v, v), e.g(t, "Object", e.v, v), r = function(i) {
1044
- return n(i), Q(e, Object.getOwnPropertyNames(i instanceof k ? i.h : i));
1045
- }, e.g(e.v, "getOwnPropertyNames", e.i(r, !1), v), r = function(i) {
1046
- return n(i), i instanceof k && (i = i.h), Q(e, Object.keys(i));
1047
- }, e.g(e.v, "keys", e.i(r, !1), v), r = function(i) {
1048
- return i === null ? e.s(null) : (i instanceof k || m(e, e.j, "Object prototype may only be an Object or null, not " + i), e.s(i));
1049
- }, e.g(e.v, "create", e.i(r, !1), v), e.ba.push("(function() {", "var create_ = Object.create;", "Object.create = function create(proto, props) {", "var obj = create_(proto);", "props && Object.defineProperties(obj, props);", "return obj;", "};", "})();", ""), r = function(i, s, u) {
1050
- return s = String(s), i instanceof k || m(e, e.j, "Object.defineProperty called on non-object: " + i), u instanceof k || m(e, e.j, "Property description must be an object"), !i.preventExtensions || s in i.h || m(e, e.j, "Can't define property '" + s + "', object is not extensible"), e.g(i, s, Ue, u.h), i;
1051
- }, e.g(e.v, "defineProperty", e.i(r, !1), v), e.ba.push("(function() {", "var defineProperty_ = Object.defineProperty;", "Object.defineProperty = function defineProperty(obj, prop, d1) {", "var d2 = {};", "if ('configurable' in d1) d2.configurable = d1.configurable;", "if ('enumerable' in d1) d2.enumerable = d1.enumerable;", "if ('writable' in d1) d2.writable = d1.writable;", "if ('value' in d1) d2.value = d1.value;", "if ('get' in d1) d2.get = d1.get;", "if ('set' in d1) d2.set = d1.set;", "return defineProperty_(obj, prop, d2);", "};", "})();", "Object.defineProperty(Object, 'defineProperties',", "{configurable: true, writable: true, value:", "function defineProperties(obj, props) {", "var keys = Object.keys(props);", "for (var i = 0; i < keys.length; i++) {", "Object.defineProperty(obj, keys[i], props[keys[i]]);", "}", "return obj;", "}", "});", ""), r = function(i, s) {
1052
- if (i instanceof k || m(e, e.j, "Object.getOwnPropertyDescriptor called on non-object: " + i), s = String(s), s in i.h) {
1053
- var u = Object.getOwnPropertyDescriptor(i.h, s), h = i.V[s];
1054
- return i = i.Y[s], s = e.s(e.M), h || i ? (e.g(s, "get", h), e.g(s, "set", i)) : (e.g(s, "value", u.value), e.g(s, "writable", u.writable)), e.g(s, "configurable", u.configurable), e.g(s, "enumerable", u.enumerable), s;
1055
- }
1056
- }, e.g(e.v, "getOwnPropertyDescriptor", e.i(r, !1), v), r = function(i) {
1057
- return n(i), ee(e, i);
1058
- }, e.g(e.v, "getPrototypeOf", e.i(r, !1), v), r = function(i) {
1059
- return !!i && !i.preventExtensions;
1060
- }, e.g(e.v, "isExtensible", e.i(r, !1), v), r = function(i) {
1061
- return i instanceof k && (i.preventExtensions = !0), i;
1062
- }, e.g(e.v, "preventExtensions", e.i(r, !1), v), _(e, e.v, "toString", k.prototype.toString), _(e, e.v, "toLocaleString", k.prototype.toString), _(e, e.v, "valueOf", k.prototype.valueOf), r = function(i) {
1063
- return n(this), this instanceof k ? String(i) in this.h : this.hasOwnProperty(i);
1064
- }, _(e, e.v, "hasOwnProperty", r), r = function(i) {
1065
- return n(this), this instanceof k ? Object.prototype.propertyIsEnumerable.call(this.h, i) : this.propertyIsEnumerable(i);
1066
- }, _(e, e.v, "propertyIsEnumerable", r), r = function(i) {
1067
- for (; ; ) {
1068
- if (i = ee(e, i), !i)
1069
- return !1;
1070
- if (i === this)
1071
- return !0;
1072
- }
1073
- }, _(e, e.v, "isPrototypeOf", r);
1074
- }
1075
- function sn(e, t) {
1076
- var n = function(r) {
1077
- var i = te(e) ? this : we(e), s = arguments[0];
1078
- if (arguments.length === 1 && typeof s == "number")
1079
- isNaN(Nt(s)) && m(e, e.ob, "Invalid array length: " + s), i.h.length = s;
1080
- else {
1081
- for (s = 0; s < arguments.length; s++)
1082
- i.h[s] = arguments[s];
1083
- i.h.length = s;
1084
- }
1085
- return i;
1086
- };
1087
- e.qa = e.i(n, !0), e.La = e.qa.h.prototype, e.g(t, "Array", e.qa, v), n = function(r) {
1088
- return r && r.H === "Array";
1089
- }, e.g(e.qa, "isArray", e.i(n, !1), v), e.g(e.La, "length", 0, {
1090
- configurable: !1,
1091
- enumerable: !1,
1092
- writable: !0
1093
- }), e.La.H = "Array", e.ba.push("(function() {", "function createArrayMethod_(f) {", "Object.defineProperty(Array.prototype, f.name,", "{configurable: true, writable: true, value: f});", "}", "createArrayMethod_(", "function pop() {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "if (!len || len < 0) {", "o.length = 0;", "return undefined;", "}", "len--;", "var x = o[len];", "delete o[len];", "o.length = len;", "return x;", "}", ");", "createArrayMethod_(", "function push(var_args) {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "for (var i = 0; i < arguments.length; i++) {", "o[len] = arguments[i];", "len++;", "}", "o.length = len;", "return len;", "}", ");", "createArrayMethod_(", "function shift() {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "if (!len || len < 0) {", "o.length = 0;", "return undefined;", "}", "var value = o[0];", "for (var i = 0; i < len - 1; i++) {", "if ((i + 1) in o) {", "o[i] = o[i + 1];", "} else {", "delete o[i];", "}", "}", "delete o[i];", "o.length = len - 1;", "return value;", "}", ");", "createArrayMethod_(", "function unshift(var_args) {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "if (!len || len < 0) {", "len = 0;", "}", "for (var i = len - 1; i >= 0; i--) {", "if (i in o) {", "o[i + arguments.length] = o[i];", "} else {", "delete o[i + arguments.length];", "}", "}", "for (var i = 0; i < arguments.length; i++) {", "o[i] = arguments[i];", "}", "return (o.length = len + arguments.length);", "}", ");", "createArrayMethod_(", "function reverse() {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "if (!len || len < 2) {", "return o;", "}", "for (var i = 0; i < len / 2 - 0.5; i++) {", "var x = o[i];", "var hasX = i in o;", "if ((len - i - 1) in o) {", "o[i] = o[len - i - 1];", "} else {", "delete o[i];", "}", "if (hasX) {", "o[len - i - 1] = x;", "} else {", "delete o[len - i - 1];", "}", "}", "return o;", "}", ");", "createArrayMethod_(", "function indexOf(searchElement, fromIndex) {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "var n = fromIndex | 0;", "if (!len || n >= len) {", "return -1;", "}", "var i = Math.max(n >= 0 ? n : len - Math.abs(n), 0);", "while (i < len) {", "if (i in o && o[i] === searchElement) {", "return i;", "}", "i++;", "}", "return -1;", "}", ");", "createArrayMethod_(", "function lastIndexOf(searchElement, fromIndex) {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "if (!len) {", "return -1;", "}", "var n = len - 1;", "if (arguments.length > 1) {", "n = fromIndex | 0;", "if (n) {", "n = (n > 0 || -1) * Math.floor(Math.abs(n));", "}", "}", "var i = n >= 0 ? Math.min(n, len - 1) : len - Math.abs(n);", "while (i >= 0) {", "if (i in o && o[i] === searchElement) {", "return i;", "}", "i--;", "}", "return -1;", "}", ");", "createArrayMethod_(", "function slice(start, end) {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "start |= 0;", "start = (start >= 0) ? start : Math.max(0, len + start);", "if (typeof end !== 'undefined') {", "if (end !== Infinity) {", "end |= 0;", "}", "if (end < 0) {", "end = len + end;", "} else {", "end = Math.min(end, len);", "}", "} else {", "end = len;", "}", "var size = end - start;", "var cloned = new Array(size);", "for (var i = 0; i < size; i++) {", "if ((start + i) in o) {", "cloned[i] = o[start + i];", "}", "}", "return cloned;", "}", ");", "createArrayMethod_(", "function splice(start, deleteCount, var_args) {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "start |= 0;", "if (start < 0) {", "start = Math.max(len + start, 0);", "} else {", "start = Math.min(start, len);", "}", "if (arguments.length < 1) {", "deleteCount = len - start;", "} else {", "deleteCount |= 0;", "deleteCount = Math.max(0, Math.min(deleteCount, len - start));", "}", "var removed = [];", "for (var i = start; i < start + deleteCount; i++) {", "if (i in o) {", "removed.push(o[i]);", "} else {", "removed.length++;", "}", "if ((i + deleteCount) in o) {", "o[i] = o[i + deleteCount];", "} else {", "delete o[i];", "}", "}", "for (var i = start + deleteCount; i < len - deleteCount; i++) {", "if ((i + deleteCount) in o) {", "o[i] = o[i + deleteCount];", "} else {", "delete o[i];", "}", "}", "for (var i = len - deleteCount; i < len; i++) {", "delete o[i];", "}", "len -= deleteCount;", "var arl = arguments.length - 2;", "for (var i = len - 1; i >= start; i--) {", "if (i in o) {", "o[i + arl] = o[i];", "} else {", "delete o[i + arl];", "}", "}", "len += arl;", "for (var i = 2; i < arguments.length; i++) {", "o[start + i - 2] = arguments[i];", "}", "o.length = len;", "return removed;", "}", ");", "createArrayMethod_(", "function concat(var_args) {", "if (!this) throw TypeError();", "var o = Object(this);", "var cloned = [];", "for (var i = -1; i < arguments.length; i++) {", "var value = (i === -1) ? o : arguments[i];", "if (Array.isArray(value)) {", "for (var j = 0, l = value.length; j < l; j++) {", "if (j in value) {", "cloned.push(value[j]);", "} else {", "cloned.length++;", "}", "}", "} else {", "cloned.push(value);", "}", "}", "return cloned;", "}", ");", "createArrayMethod_(", "function join(opt_separator) {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "var sep = typeof opt_separator === 'undefined' ?", "',' : ('' + opt_separator);", "var str = '';", "for (var i = 0; i < len; i++) {", "if (i && sep) str += sep;", "str += (o[i] === null || o[i] === undefined) ? '' : o[i];", "}", "return str;", "}", ");", "createArrayMethod_(", "function every(callbackfn, thisArg) {", "if (!this || typeof callbackfn !== 'function') throw TypeError();", "var t, k = 0;", "var o = Object(this), len = o.length >>> 0;", "if (arguments.length > 1) t = thisArg;", "while (k < len) {", "if (k in o && !callbackfn.call(t, o[k], k, o)) return false;", "k++;", "}", "return true;", "}", ");", "createArrayMethod_(", "function filter(fun, var_args) {", "if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "var res = [];", "var thisArg = arguments.length >= 2 ? arguments[1] : void 0;", "for (var i = 0; i < len; i++) {", "if (i in o) {", "var val = o[i];", "if (fun.call(thisArg, val, i, o)) res.push(val);", "}", "}", "return res;", "}", ");", "createArrayMethod_(", "function forEach(callback, thisArg) {", "if (!this || typeof callback !== 'function') throw TypeError();", "var t, k = 0;", "var o = Object(this), len = o.length >>> 0;", "if (arguments.length > 1) t = thisArg;", "while (k < len) {", "if (k in o) callback.call(t, o[k], k, o);", "k++;", "}", "}", ");", "createArrayMethod_(", "function map(callback, thisArg) {", "if (!this || typeof callback !== 'function') throw TypeError();", "var t, k = 0;", "var o = Object(this), len = o.length >>> 0;", "if (arguments.length > 1) t = thisArg;", "var a = new Array(len);", "while (k < len) {", "if (k in o) a[k] = callback.call(t, o[k], k, o);", "k++;", "}", "return a;", "}", ");", "createArrayMethod_(", "function reduce(callback /*, initialValue*/) {", "if (!this || typeof callback !== 'function') throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "var k = 0, value;", "if (arguments.length === 2) {", "value = arguments[1];", "} else {", "while (k < len && !(k in o)) k++;", "if (k >= len) {", "throw TypeError('Reduce of empty array with no initial value');", "}", "value = o[k++];", "}", "for (; k < len; k++) {", "if (k in o) value = callback(value, o[k], k, o);", "}", "return value;", "}", ");", "createArrayMethod_(", "function reduceRight(callback /*, initialValue*/) {", "if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "var k = len - 1, value;", "if (arguments.length >= 2) {", "value = arguments[1];", "} else {", "while (k >= 0 && !(k in o)) k--;", "if (k < 0) {", "throw TypeError('Reduce of empty array with no initial value');", "}", "value = o[k--];", "}", "for (; k >= 0; k--) {", "if (k in o) value = callback(value, o[k], k, o);", "}", "return value;", "}", ");", "createArrayMethod_(", "function some(fun/*, thisArg*/) {", "if (!this || typeof fun !== 'function') throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "var thisArg = arguments.length >= 2 ? arguments[1] : void 0;", "for (var i = 0; i < len; i++) {", "if (i in o && fun.call(thisArg, o[i], i, o)) return true;", "}", "return false;", "}", ");", "createArrayMethod_(", "function sort(opt_comp) {", "if (!this) throw TypeError();", "if (typeof opt_comp !== 'function') {", "opt_comp = undefined;", "}", "for (var i = 0; i < this.length; i++) {", "var changes = 0;", "for (var j = 0; j < this.length - i - 1; j++) {", "if (opt_comp ? (opt_comp(this[j], this[j + 1]) > 0) :", "(String(this[j]) > String(this[j + 1]))) {", "var swap = this[j];", "var hasSwap = j in this;", "if ((j + 1) in this) {", "this[j] = this[j + 1];", "} else {", "delete this[j];", "}", "if (hasSwap) {", "this[j + 1] = swap;", "} else {", "delete this[j + 1];", "}", "changes++;", "}", "}", "if (!changes) break;", "}", "return this;", "}", ");", "createArrayMethod_(", "function toLocaleString() {", "if (!this) throw TypeError();", "var o = Object(this), len = o.length >>> 0;", "var out = [];", "for (var i = 0; i < len; i++) {", "out[i] = (o[i] === null || o[i] === undefined) ? '' : o[i].toLocaleString();", "}", "return out.join(',');", "}", ");", "})();", "");
1094
- }
1095
- function an(e, t) {
1096
- var n = function(r) {
1097
- return r = arguments.length ? se.String(r) : "", te(e) ? (this.data = r, this) : r;
1098
- };
1099
- for (e.J = e.i(n, !0), e.g(t, "String", e.J, v), e.g(e.J, "fromCharCode", e.i(String.fromCharCode, !1), v), t = "charAt charCodeAt concat indexOf lastIndexOf slice substr substring toLocaleLowerCase toLocaleUpperCase toLowerCase toUpperCase trim".split(" "), n = 0; n < t.length; n++)
1100
- _(e, e.J, t[n], String.prototype[t[n]]);
1101
- n = function(r, i, s) {
1102
- i = e.R(i), s = e.R(s);
1103
- try {
1104
- return String(this).localeCompare(r, i, s);
1105
- } catch (u) {
1106
- m(e, e.D, "localeCompare: " + u.message);
1107
- }
1108
- }, _(e, e.J, "localeCompare", n), n = function(r, i, s) {
1109
- var u = String(this);
1110
- if (i = i ? Number(i) : void 0, D(e, r, e.I) && (r = r.data, Re(e, r, s), e.REGEXP_MODE === 2)) {
1111
- if (q)
1112
- r = Pe(e, "string.split(separator, limit)", {
1113
- string: u,
1114
- separator: r,
1115
- limit: i
1116
- }, r, s), r !== de && s(Q(e, r));
1117
- else {
1118
- var h = e.ha(), d = Me(e, r, h, s);
1119
- h.onmessage = function(N) {
1120
- clearTimeout(d), s(Q(e, N.data));
1121
- }, h.postMessage(["split", u, r, i]);
1122
- }
1123
- return;
1124
- }
1125
- r = u.split(r, i), s(Q(e, r));
1126
- }, _e(e, e.J, "split", n), n = function(r, i) {
1127
- var s = String(this);
1128
- if (r = D(e, r, e.I) ? r.data : new RegExp(r), Re(e, r, i), e.REGEXP_MODE === 2)
1129
- if (q)
1130
- r = Pe(e, "string.match(regexp)", {
1131
- string: s,
1132
- regexp: r
1133
- }, r, i), r !== de && i(r && Q(e, r));
1134
- else {
1135
- var u = e.ha(), h = Me(e, r, u, i);
1136
- u.onmessage = function(d) {
1137
- clearTimeout(h), i(d.data && Q(e, d.data));
1138
- }, u.postMessage(["match", s, r]);
1139
- }
1140
- else
1141
- r = s.match(r), i(r && Q(e, r));
1142
- }, _e(e, e.J, "match", n), n = function(r, i) {
1143
- var s = String(this);
1144
- if (D(e, r, e.I) ? r = r.data : r = new RegExp(r), Re(e, r, i), e.REGEXP_MODE === 2)
1145
- if (q)
1146
- r = Pe(e, "string.search(regexp)", {
1147
- string: s,
1148
- regexp: r
1149
- }, r, i), r !== de && i(r);
1150
- else {
1151
- var u = e.ha(), h = Me(e, r, u, i);
1152
- u.onmessage = function(d) {
1153
- clearTimeout(h), i(d.data);
1154
- }, u.postMessage(["search", s, r]);
1155
- }
1156
- else
1157
- i(s.search(r));
1158
- }, _e(e, e.J, "search", n), n = function(r, i, s) {
1159
- var u = String(this);
1160
- if (i = String(i), D(e, r, e.I) && (r = r.data, Re(e, r, s), e.REGEXP_MODE === 2)) {
1161
- if (q)
1162
- r = Pe(e, "string.replace(substr, newSubstr)", {
1163
- string: u,
1164
- substr: r,
1165
- newSubstr: i
1166
- }, r, s), r !== de && s(r);
1167
- else {
1168
- var h = e.ha(), d = Me(e, r, h, s);
1169
- h.onmessage = function(N) {
1170
- clearTimeout(d), s(N.data);
1171
- }, h.postMessage(["replace", u, r, i]);
1172
- }
1173
- return;
1174
- }
1175
- s(u.replace(r, i));
1176
- }, _e(e, e.J, "replace", n), e.ba.push("(function() {", "var replace_ = String.prototype.replace;", "String.prototype.replace = function replace(substr, newSubstr) {", "if (typeof newSubstr !== 'function') {", "return replace_.call(this, substr, newSubstr);", "}", "var str = this;", "if (substr instanceof RegExp) {", "var subs = [];", "var m = substr.exec(str);", "while (m) {", "m.push(m.index, str);", "var inject = newSubstr.apply(null, m);", "subs.push([m.index, m[0].length, inject]);", "m = substr.global ? substr.exec(str) : null;", "}", "for (var i = subs.length - 1; i >= 0; i--) {", "str = str.substring(0, subs[i][0]) + subs[i][2] + str.substring(subs[i][0] + subs[i][1]);", "}", "} else {", "var i = str.indexOf(substr);", "if (i !== -1) {", "var inject = newSubstr(str.substr(i, substr.length), i, str);", "str = str.substring(0, i) + inject + str.substring(i + substr.length);", "}", "}", "return str;", "};", "})();", "");
1177
- }
1178
- function un(e, t) {
1179
- e.mb = e.i(function(n) {
1180
- return n = se.Boolean(n), te(e) ? (this.data = n, this) : n;
1181
- }, !0), e.g(t, "Boolean", e.mb, v);
1182
- }
1183
- function ln(e, t) {
1184
- var n = function(r) {
1185
- return r = arguments.length ? se.Number(r) : 0, te(e) ? (this.data = r, this) : r;
1186
- };
1187
- for (e.aa = e.i(n, !0), e.g(t, "Number", e.aa, v), t = ["MAX_VALUE", "MIN_VALUE", "NaN", "NEGATIVE_INFINITY", "POSITIVE_INFINITY"], n = 0; n < t.length; n++)
1188
- e.g(e.aa, t[n], Number[t[n]], Ne);
1189
- n = function(r) {
1190
- try {
1191
- return Number(this).toExponential(r);
1192
- } catch (i) {
1193
- m(e, e.D, i.message);
1194
- }
1195
- }, _(e, e.aa, "toExponential", n), n = function(r) {
1196
- try {
1197
- return Number(this).toFixed(r);
1198
- } catch (i) {
1199
- m(e, e.D, i.message);
1200
- }
1201
- }, _(e, e.aa, "toFixed", n), n = function(r) {
1202
- try {
1203
- return Number(this).toPrecision(r);
1204
- } catch (i) {
1205
- m(e, e.D, i.message);
1206
- }
1207
- }, _(e, e.aa, "toPrecision", n), n = function(r) {
1208
- try {
1209
- return Number(this).toString(r);
1210
- } catch (i) {
1211
- m(e, e.D, i.message);
1212
- }
1213
- }, _(e, e.aa, "toString", n), n = function(r, i) {
1214
- r = r ? e.R(r) : void 0, i = i ? e.R(i) : void 0;
1215
- try {
1216
- return Number(this).toLocaleString(r, i);
1217
- } catch (s) {
1218
- m(e, e.D, "toLocaleString: " + s.message);
1219
- }
1220
- }, _(e, e.aa, "toLocaleString", n);
1221
- }
1222
- function cn(e, t) {
1223
- var n = function(i, s) {
1224
- if (!te(e))
1225
- return se.Date();
1226
- var u = [null].concat(Array.from(arguments));
1227
- return this.data = new (Function.prototype.bind.apply(se.Date, u))(), this;
1228
- };
1229
- e.$ = e.i(n, !0), e.nb = e.$.h.prototype, e.g(t, "Date", e.$, v), e.g(e.$, "now", e.i(Date.now, !1), v), e.g(e.$, "parse", e.i(Date.parse, !1), v), e.g(e.$, "UTC", e.i(Date.UTC, !1), v), t = "getDate getDay getFullYear getHours getMilliseconds getMinutes getMonth getSeconds getTime getTimezoneOffset getUTCDate getUTCDay getUTCFullYear getUTCHours getUTCMilliseconds getUTCMinutes getUTCMonth getUTCSeconds getYear setDate setFullYear setHours setMilliseconds setMinutes setMonth setSeconds setTime setUTCDate setUTCFullYear setUTCHours setUTCMilliseconds setUTCMinutes setUTCMonth setUTCSeconds setYear toDateString toISOString toJSON toGMTString toLocaleDateString toLocaleString toLocaleTimeString toTimeString toUTCString".split(" ");
1230
- for (var r = 0; r < t.length; r++)
1231
- n = function(i) {
1232
- return function(s) {
1233
- var u = this.data;
1234
- u instanceof Date || m(e, e.j, i + " not called on a Date");
1235
- for (var h = [], d = 0; d < arguments.length; d++)
1236
- h[d] = e.R(arguments[d]);
1237
- return u[i].apply(u, h);
1238
- };
1239
- }(t[r]), _(e, e.$, t[r], n);
1240
- }
1241
- function pn(e, t) {
1242
- var n = function(r, i) {
1243
- if (te(e))
1244
- var s = this;
1245
- else {
1246
- if (i === void 0 && D(e, r, e.I))
1247
- return r;
1248
- s = e.s(e.Ma);
1249
- }
1250
- r = r === void 0 ? "" : String(r), i = i ? String(i) : "", /^[gmi]*$/.test(i) || m(e, e.T, "Invalid regexp flag: " + i);
1251
- try {
1252
- var u = new se.RegExp(r, i);
1253
- } catch (h) {
1254
- m(e, e.T, h.message);
1255
- }
1256
- return Pt(e, s, u), s;
1257
- };
1258
- e.I = e.i(n, !0), e.Ma = e.I.h.prototype, e.g(t, "RegExp", e.I, v), e.g(e.I.h.prototype, "global", void 0, B), e.g(e.I.h.prototype, "ignoreCase", void 0, B), e.g(e.I.h.prototype, "multiline", void 0, B), e.g(e.I.h.prototype, "source", "(?:)", B), e.ba.push("Object.defineProperty(RegExp.prototype, 'test',", "{configurable: true, writable: true, value:", "function test(str) {", "return !!this.exec(str);", "}", "});"), n = function(r, i) {
1259
- function s(P) {
1260
- if (P) {
1261
- var C = Q(e, P);
1262
- return e.g(C, "index", P.index), e.g(C, "input", P.input), C;
1263
- }
1264
- return null;
1265
- }
1266
- var u = this.data;
1267
- if (r = String(r), u.lastIndex = Number(e.G(this, "lastIndex")), Re(e, u, i), e.REGEXP_MODE === 2)
1268
- if (q)
1269
- r = Pe(e, "regexp.exec(string)", {
1270
- string: r,
1271
- regexp: u
1272
- }, u, i), r !== de && (e.g(this, "lastIndex", u.lastIndex), i(s(r)));
1273
- else {
1274
- var h = e.ha(), d = Me(e, u, h, i), N = this;
1275
- h.onmessage = function(P) {
1276
- clearTimeout(d), e.g(N, "lastIndex", P.data[1]), i(s(P.data[0]));
1277
- }, h.postMessage(["exec", u, u.lastIndex, r]);
1278
- }
1279
- else
1280
- r = u.exec(r), e.g(this, "lastIndex", u.lastIndex), i(s(r));
1281
- }, _e(e, e.I, "exec", n);
1282
- }
1283
- function fn(e, t) {
1284
- function n(r) {
1285
- var i = e.i(function(s) {
1286
- var u = te(e) ? this : e.Aa(i);
1287
- return Ot(e, u, s), u;
1288
- }, !0);
1289
- return e.g(i, "prototype", e.Aa(e.D), v), e.g(i.h.prototype, "name", r, v), e.g(t, r, i, v), i;
1290
- }
1291
- e.D = e.i(function(r) {
1292
- var i = te(e) ? this : e.Aa(e.D);
1293
- return Ot(e, i, r), i;
1294
- }, !0), e.g(t, "Error", e.D, v), e.g(e.D.h.prototype, "message", "", v), e.g(e.D.h.prototype, "name", "Error", v), n("EvalError"), e.ob = n("RangeError"), e.pb = n("ReferenceError"), e.T = n("SyntaxError"), e.j = n("TypeError"), e.Gb = n("URIError");
1295
- }
1296
- function hn(e, t) {
1297
- var n = e.s(e.M);
1298
- e.g(t, "Math", n, v);
1299
- var r = "E LN2 LN10 LOG2E LOG10E PI SQRT1_2 SQRT2".split(" ");
1300
- for (t = 0; t < r.length; t++)
1301
- e.g(n, r[t], Math[r[t]], B);
1302
- for (r = "abs acos asin atan atan2 ceil cos exp floor log max min pow random round sin sqrt tan".split(" "), t = 0; t < r.length; t++)
1303
- e.g(n, r[t], e.i(Math[r[t]], !1), v);
1304
- }
1305
- function gn(e, t) {
1306
- var n = e.s(e.M);
1307
- e.g(t, "JSON", n, v), t = function(r) {
1308
- try {
1309
- var i = JSON.parse(String(r));
1310
- } catch (s) {
1311
- m(e, e.T, s.message);
1312
- }
1313
- return e.Ia(i);
1314
- }, e.g(n, "parse", e.i(t, !1)), t = function(r, i, s) {
1315
- i && i.H === "Function" ? m(e, e.j, "Function replacer on JSON.stringify not supported") : i && i.H === "Array" ? (i = Ar(e, i), i = i.filter(function(h) {
1316
- return typeof h == "string" || typeof h == "number";
1317
- })) : i = null, typeof s != "string" && typeof s != "number" && (s = void 0), r = e.R(r);
1318
- try {
1319
- var u = JSON.stringify(r, i, s);
1320
- } catch (h) {
1321
- m(e, e.j, h.message);
1322
- }
1323
- return u;
1324
- }, e.g(n, "stringify", e.i(t, !1));
1325
- }
1326
- function D(e, t, n) {
1327
- if (t == null || !n)
1328
- return !1;
1329
- if (n = n.h.prototype, t === n)
1330
- return !0;
1331
- for (t = ee(e, t); t; ) {
1332
- if (t === n)
1333
- return !0;
1334
- t = t.xa;
1335
- }
1336
- return !1;
1337
- }
1338
- function Pt(e, t, n) {
1339
- t.data = new RegExp(n.source, n.flags), e.g(t, "lastIndex", n.lastIndex, v), e.g(t, "source", n.source, B), e.g(t, "global", n.global, B), e.g(t, "ignoreCase", n.ignoreCase, B), e.g(t, "multiline", n.multiline, B);
1340
- }
1341
- function Ot(e, t, n) {
1342
- n && e.g(t, "message", String(n), v), n = [];
1343
- for (var r = e.o.length - 1; 0 <= r; r--) {
1344
- var i = e.o[r], s = i.node;
1345
- s.type === "CallExpression" && (i = i.U) && n.length && (n[n.length - 1].Ob = e.G(i, "name")), !s.X || n.length && s.type !== "CallExpression" || n.push({
1346
- Nb: s.X
1347
- });
1348
- }
1349
- for (r = String(e.G(t, "name")), s = String(e.G(t, "message")), s = r + ": " + s + `
1350
- `, r = 0; r < n.length; r++) {
1351
- var u = n[r].Nb;
1352
- i = n[r].Ob, u = u.source + ":" + u.start.line + ":" + u.start.ab, s = i ? s + (" at " + i + " (" + u + `)
1353
- `) : s + (" at " + u + `
1354
- `);
1355
- }
1356
- e.g(t, "stack", s.trim(), v);
1357
- }
1358
- O.ha = function() {
1359
- var e = this.ha.Mb;
1360
- return e || (e = new Blob([tn.join(`
1361
- `)], {
1362
- type: "application/javascript"
1363
- }), this.ha.Mb = e), new Worker(URL.createObjectURL(e));
1364
- };
1365
- function Pe(e, t, n, r, i) {
1366
- var s = {
1367
- timeout: e.REGEXP_THREAD_TIMEOUT
1368
- };
1369
- try {
1370
- return q.runInNewContext(t, n, s);
1371
- } catch {
1372
- i(null), m(e, e.D, "RegExp Timeout: " + r);
1373
- }
1374
- return de;
1375
- }
1376
- function Re(e, t, n) {
1377
- if (e.REGEXP_MODE === 0)
1378
- var r = !1;
1379
- else if (e.REGEXP_MODE === 1)
1380
- r = !0;
1381
- else if (q)
1382
- r = !0;
1383
- else if (typeof Worker == "function" && typeof URL == "function")
1384
- r = !0;
1385
- else if (typeof require == "function") {
1386
- try {
1387
- q = require("vm");
1388
- } catch {
1389
- }
1390
- r = !!q;
1391
- } else
1392
- r = !1;
1393
- r || (n(null), m(e, e.D, "Regular expressions not supported: " + t));
1394
- }
1395
- function Me(e, t, n, r) {
1396
- return setTimeout(function() {
1397
- n.terminate(), r(null);
1398
- try {
1399
- m(e, e.D, "RegExp Timeout: " + t);
1400
- } catch {
1401
- }
1402
- }, e.REGEXP_THREAD_TIMEOUT);
1403
- }
1404
- O.Aa = function(e) {
1405
- return this.s(e && e.h.prototype);
1406
- };
1407
- O.s = function(e) {
1408
- if (typeof e != "object")
1409
- throw Error("Non object prototype");
1410
- return e = new k(e), D(this, e, this.D) && (e.H = "Error"), e;
1411
- };
1412
- function we(e) {
1413
- var t = e.s(e.La);
1414
- return e.g(t, "length", 0, {
1415
- configurable: !1,
1416
- enumerable: !1,
1417
- writable: !0
1418
- }), t.H = "Array", t;
1419
- }
1420
- function Rt(e, t, n) {
1421
- var r = e.s(e.Z);
1422
- return n ? (n = e.s(e.M), e.g(r, "prototype", n, v), e.g(n, "constructor", r, v)) : r.Ab = !0, e.g(r, "length", t, B), r.H = "Function", r;
1423
- }
1424
- function Mt(e, t, n, r) {
1425
- var i = Rt(e, t.oa.length, !0);
1426
- return i.Va = n, i.node = t, e.g(i, "name", t.id ? String(t.id.name) : r || "", B), i;
1427
- }
1428
- O.i = function(e, t) {
1429
- return t = Rt(this, e.length, t), t.Ta = e, e.id = this.Ya++, this.g(t, "name", e.name, B), t;
1430
- };
1431
- O.ub = function(e) {
1432
- var t = Rt(this, e.length, !0);
1433
- return t.Za = e, e.id = this.Ya++, this.g(t, "name", e.name, B), t;
1434
- };
1435
- O.Ia = function(e) {
1436
- if (e instanceof k)
1437
- throw Error("Object is already pseudo");
1438
- if (e == null || e === !0 || e === !1 || typeof e == "string" || typeof e == "number")
1439
- return e;
1440
- if (e instanceof RegExp) {
1441
- var t = this.s(this.Ma);
1442
- return Pt(this, t, e), t;
1443
- }
1444
- if (e instanceof Date)
1445
- return t = this.s(this.nb), t.data = new Date(e.valueOf()), t;
1446
- if (typeof e == "function") {
1447
- var n = this;
1448
- return t = Object.getOwnPropertyDescriptor(e, "prototype"), this.i(function() {
1449
- var i = Array.prototype.slice.call(arguments).map(function(s) {
1450
- return n.R(s);
1451
- });
1452
- return i = e.apply(n, i), n.Ia(i);
1453
- }, !!t);
1454
- }
1455
- if (Array.isArray(e)) {
1456
- t = we(this);
1457
- for (var r = 0; r < e.length; r++)
1458
- r in e && this.g(t, r, this.Ia(e[r]));
1459
- return t;
1460
- }
1461
- t = this.s(this.M);
1462
- for (r in e)
1463
- this.g(t, r, this.Ia(e[r]));
1464
- return t;
1465
- };
1466
- O.R = function(e, t) {
1467
- if (typeof e != "object" && typeof e != "function" || e === null)
1468
- return e;
1469
- if (!(e instanceof k))
1470
- throw Error("Object is not pseudo");
1471
- if (D(this, e, this.I))
1472
- return t = new RegExp(e.data.source, e.data.flags), t.lastIndex = e.data.lastIndex, t;
1473
- if (D(this, e, this.$))
1474
- return new Date(e.data.valueOf());
1475
- t = t || {
1476
- hb: [],
1477
- Sa: []
1478
- };
1479
- var n = t.hb.indexOf(e);
1480
- if (n !== -1)
1481
- return t.Sa[n];
1482
- if (t.hb.push(e), D(this, e, this.qa)) {
1483
- n = [], t.Sa.push(n);
1484
- for (var r = this.G(e, "length"), i = 0; i < r; i++)
1485
- ze(this, e, i) && (n[i] = this.R(this.G(e, i), t));
1486
- } else
1487
- for (r in n = {}, t.Sa.push(n), e.h)
1488
- i = this.R(e.h[r], t), Object.defineProperty(n, r, {
1489
- value: i,
1490
- writable: !0,
1491
- enumerable: !0,
1492
- configurable: !0
1493
- });
1494
- return t.hb.pop(), t.Sa.pop(), n;
1495
- };
1496
- function Q(e, t) {
1497
- for (var n = we(e), r = Object.getOwnPropertyNames(t), i = 0; i < r.length; i++)
1498
- e.g(n, r[i], t[r[i]]);
1499
- return n;
1500
- }
1501
- function Ar(e, t) {
1502
- var n = [], r;
1503
- for (r in t.h)
1504
- n[r] = e.G(t, r);
1505
- return n.length = Nt(e.G(t, "length")) || 0, n;
1506
- }
1507
- function ee(e, t) {
1508
- switch (typeof t) {
1509
- case "number":
1510
- return e.aa.h.prototype;
1511
- case "boolean":
1512
- return e.mb.h.prototype;
1513
- case "string":
1514
- return e.J.h.prototype;
1515
- }
1516
- return t ? t.xa : null;
1517
- }
1518
- O.G = function(e, t) {
1519
- if (this.P)
1520
- throw Error("Getter not supported in that context");
1521
- if (t = String(t), e != null || m(this, this.j, "Cannot read property '" + t + "' of " + e), typeof e == "object" && !(e instanceof k))
1522
- throw TypeError("Expecting native value or pseudo object");
1523
- if (t === "length") {
1524
- if (D(this, e, this.J))
1525
- return String(e).length;
1526
- } else if (64 > t.charCodeAt(0) && D(this, e, this.J)) {
1527
- var n = De(t);
1528
- if (!isNaN(n) && n < String(e).length)
1529
- return String(e)[n];
1530
- }
1531
- do
1532
- if (e.h && t in e.h)
1533
- return (n = e.V[t]) ? (this.P = !0, n) : e.h[t];
1534
- while (e = ee(this, e));
1535
- };
1536
- function ze(e, t, n) {
1537
- if (!(t instanceof k))
1538
- throw TypeError("Primitive data type has no properties");
1539
- if (n = String(n), n === "length" && D(e, t, e.J))
1540
- return !0;
1541
- if (D(e, t, e.J)) {
1542
- var r = De(n);
1543
- if (!isNaN(r) && r < String(t).length)
1544
- return !0;
1545
- }
1546
- do
1547
- if (t.h && n in t.h)
1548
- return !0;
1549
- while (t = ee(e, t));
1550
- return !1;
1551
- }
1552
- O.g = function(e, t, n, r) {
1553
- if (this.Ka)
1554
- throw Error("Setter not supported in that context");
1555
- if (t = String(t), e != null || m(this, this.j, "Cannot set property '" + t + "' of " + e), typeof e == "object" && !(e instanceof k))
1556
- throw TypeError("Expecting native value or pseudo object");
1557
- r && ("get" in r || "set" in r) && ("value" in r || "writable" in r) && m(this, this.j, "Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");
1558
- var i = !this.o || _t(this).S;
1559
- if (e instanceof k) {
1560
- if (D(this, e, this.J)) {
1561
- var s = De(t);
1562
- if (t === "length" || !isNaN(s) && s < String(e).length) {
1563
- i && m(this, this.j, "Cannot assign to read only property '" + t + "' of String '" + e.data + "'");
1564
- return;
1565
- }
1566
- }
1567
- if (e.H === "Array")
1568
- if (s = e.h.length, t === "length") {
1569
- if (r) {
1570
- if (!("value" in r))
1571
- return;
1572
- n = r.value;
1573
- }
1574
- if (n = Nt(n), isNaN(n) && m(this, this.ob, "Invalid array length"), n < s)
1575
- for (u in e.h) {
1576
- var u = De(u);
1577
- !isNaN(u) && n <= u && delete e.h[u];
1578
- }
1579
- } else
1580
- isNaN(u = De(t)) || (e.h.length = Math.max(s, u + 1));
1581
- if (!e.preventExtensions || t in e.h)
1582
- if (r) {
1583
- i = {}, "get" in r && r.get && (e.V[t] = r.get, i.get = this.g.ac), "set" in r && r.set && (e.Y[t] = r.set, i.set = this.g.bc), "configurable" in r && (i.configurable = r.configurable), "enumerable" in r && (i.enumerable = r.enumerable), "writable" in r && (i.writable = r.writable, delete e.V[t], delete e.Y[t]), "value" in r ? (i.value = r.value, delete e.V[t], delete e.Y[t]) : n !== Ue && (i.value = n, delete e.V[t], delete e.Y[t]);
1584
- try {
1585
- Object.defineProperty(e.h, t, i);
1586
- } catch {
1587
- m(this, this.j, "Cannot redefine property: " + t);
1588
- }
1589
- "get" in r && !r.get && delete e.V[t], "set" in r && !r.set && delete e.Y[t];
1590
- } else {
1591
- if (n === Ue)
1592
- throw ReferenceError("Value not specified");
1593
- for (r = e; !(t in r.h); )
1594
- if (r = ee(this, r), !r) {
1595
- r = e;
1596
- break;
1597
- }
1598
- if (r.Y && r.Y[t])
1599
- return this.Ka = !0, r.Y[t];
1600
- if (r.V && r.V[t])
1601
- i && m(this, this.j, "Cannot set property '" + t + "' of object '" + e + "' which only has a getter");
1602
- else
1603
- try {
1604
- e.h[t] = n;
1605
- } catch {
1606
- i && m(this, this.j, "Cannot assign to read only property '" + t + "' of object '" + e + "'");
1607
- }
1608
- }
1609
- else
1610
- i && m(this, this.j, "Can't add property '" + t + "', object is not extensible");
1611
- } else
1612
- i && m(this, this.j, "Can't create property '" + t + "' on '" + e + "'");
1613
- };
1614
- O.g.ac = function() {
1615
- throw Error("Placeholder getter");
1616
- };
1617
- O.g.bc = function() {
1618
- throw Error("Placeholder setter");
1619
- };
1620
- function _(e, t, n, r) {
1621
- e.g(t.h.prototype, n, e.i(r, !1), v);
1622
- }
1623
- function _e(e, t, n, r) {
1624
- e.g(t.h.prototype, n, e.ub(r), v);
1625
- }
1626
- function _t(e) {
1627
- if (e = e.o[e.o.length - 1].scope, !e)
1628
- throw Error("No scope found");
1629
- return e;
1630
- }
1631
- function Ct(e, t, n) {
1632
- var r = !1;
1633
- if (n && n.S)
1634
- r = !0;
1635
- else {
1636
- var i = t.body && t.body[0];
1637
- i && i.la && i.la.type === "Literal" && i.la.value === "use strict" && (r = !0);
1638
- }
1639
- return i = e.s(null), r = new Nr(n, r, i), n || rn(e, r.object), Fe(e, t, r), r;
1640
- }
1641
- function bt(e, t, n) {
1642
- if (!t)
1643
- throw Error("parentScope required");
1644
- return e = n || e.s(null), new Nr(t, t.S, e);
1645
- }
1646
- function Dt(e, t) {
1647
- for (var n = _t(e); n && n !== e.N; ) {
1648
- if (t in n.object.h)
1649
- return n.object.h[t];
1650
- n = n.Va;
1651
- }
1652
- if (n === e.N && ze(e, n.object, t))
1653
- return e.G(n.object, t);
1654
- n = e.o[e.o.length - 1].node, n.type === "UnaryExpression" && n.operator === "typeof" || m(e, e.pb, t + " is not defined");
1655
- }
1656
- function Ir(e, t, n) {
1657
- for (var r = _t(e), i = r.S; r && r !== e.N; ) {
1658
- if (t in r.object.h) {
1659
- try {
1660
- r.object.h[t] = n;
1661
- } catch {
1662
- i && m(e, e.j, "Cannot assign to read only variable '" + t + "'");
1663
- }
1664
- return;
1665
- }
1666
- r = r.Va;
1667
- }
1668
- if (r === e.N && (!i || ze(e, r.object, t)))
1669
- return e.g(r.object, t, n);
1670
- m(e, e.pb, t + " is not defined");
1671
- }
1672
- function Fe(e, t, n) {
1673
- if (t.jb)
1674
- var r = t.jb;
1675
- else {
1676
- switch (r = /* @__PURE__ */ Object.create(null), t.type) {
1677
- case "VariableDeclaration":
1678
- for (var i = 0; i < t.fa.length; i++)
1679
- r[t.fa[i].id.name] = !0;
1680
- break;
1681
- case "FunctionDeclaration":
1682
- r[t.id.name] = t;
1683
- break;
1684
- case "BlockStatement":
1685
- case "CatchClause":
1686
- case "DoWhileStatement":
1687
- case "ForInStatement":
1688
- case "ForStatement":
1689
- case "IfStatement":
1690
- case "LabeledStatement":
1691
- case "Program":
1692
- case "SwitchCase":
1693
- case "SwitchStatement":
1694
- case "TryStatement":
1695
- case "WithStatement":
1696
- case "WhileStatement":
1697
- var s = t.constructor, u;
1698
- for (u in t)
1699
- if (u !== "loc") {
1700
- var h = t[u];
1701
- if (h && typeof h == "object") {
1702
- if (Array.isArray(h)) {
1703
- for (i = 0; i < h.length; i++)
1704
- if (h[i] && h[i].constructor === s) {
1705
- var d = Fe(e, h[i], n);
1706
- for (u in d)
1707
- r[u] = d[u];
1708
- }
1709
- } else if (h.constructor === s)
1710
- for (u in d = Fe(e, h, n), d)
1711
- r[u] = d[u];
1712
- }
1713
- }
1714
- }
1715
- t.jb = r;
1716
- }
1717
- for (u in r)
1718
- r[u] === !0 ? e.g(n.object, u, void 0, Er) : e.g(n.object, u, Mt(e, r[u], n), Er);
1719
- return r;
1720
- }
1721
- function te(e) {
1722
- return e.o[e.o.length - 1].isConstructor;
1723
- }
1724
- function Ut(e, t) {
1725
- return t[0] === Ee ? Dt(e, t[1]) : e.G(t[0], t[1]);
1726
- }
1727
- function Ft(e, t, n) {
1728
- return t[0] === Ee ? Ir(e, t[1], n) : e.g(t[0], t[1], n);
1729
- }
1730
- function m(e, t, n) {
1731
- throw e.N ? (n !== void 0 && t instanceof k && (t = e.Aa(t), Ot(e, t, n)), Le(e, 4, t), Cr) : n === void 0 ? t : n;
1732
- }
1733
- function Le(e, t, n, r) {
1734
- if (t === 0)
1735
- throw TypeError("Should not unwind for NORMAL completions");
1736
- var i = e.o;
1737
- e:
1738
- for (; 0 < i.length; i.pop()) {
1739
- var s = i[i.length - 1];
1740
- switch (s.node.type) {
1741
- case "TryStatement":
1742
- s.ea = {
1743
- type: t,
1744
- value: n,
1745
- label: r
1746
- };
1747
- return;
1748
- case "CallExpression":
1749
- case "NewExpression":
1750
- if (t === 3) {
1751
- s.value = n;
1752
- return;
1753
- }
1754
- if (t !== 4)
1755
- throw Error("Unsynatctic break/continue not rejected by Acorn");
1756
- break;
1757
- case "Program":
1758
- s.done = !0;
1759
- break e;
1760
- }
1761
- if (t === 1) {
1762
- if (r ? s.labels && s.labels.indexOf(r) !== -1 : s.W || s.Zb) {
1763
- i.pop();
1764
- return;
1765
- }
1766
- } else if (t === 2 && (r ? s.labels && s.labels.indexOf(r) !== -1 : s.W))
1767
- return;
1768
- }
1769
- throw D(e, n, e.D) ? (t = {
1770
- EvalError,
1771
- RangeError,
1772
- ReferenceError,
1773
- SyntaxError,
1774
- TypeError,
1775
- URIError
1776
- }, r = String(e.G(n, "name")), i = e.G(n, "message").valueOf(), t = (t[r] || Error)(i), t.stack = String(e.G(n, "stack"))) : t = String(n), e.value = t, t;
1777
- }
1778
- function L(e, t) {
1779
- switch (t.type) {
1780
- case "ArrayExpression":
1781
- return "[...]";
1782
- case "BinaryExpression":
1783
- case "LogicalExpression":
1784
- return L(e, t.left) + " " + t.operator + " " + L(e, t.right);
1785
- case "CallExpression":
1786
- return L(e, t.callee) + "(...)";
1787
- case "ConditionalExpression":
1788
- return L(e, t.test) + " ? " + L(e, t.da) + " : " + L(e, t.alternate);
1789
- case "Identifier":
1790
- return t.name;
1791
- case "Literal":
1792
- return t.raw;
1793
- case "MemberExpression":
1794
- var n = L(e, t.object);
1795
- return e = L(e, t.Wa), t.bb ? n + "[" + e + "]" : n + "." + e;
1796
- case "NewExpression":
1797
- return "new " + L(e, t.callee) + "(...)";
1798
- case "ObjectExpression":
1799
- return "{...}";
1800
- case "ThisExpression":
1801
- return "this";
1802
- case "UnaryExpression":
1803
- return t.operator + " " + L(e, t.K);
1804
- case "UpdateExpression":
1805
- return n = L(e, t.K), t.prefix ? t.operator + n : n + t.operator;
1806
- }
1807
- return "???";
1808
- }
1809
- function jr(e, t, n) {
1810
- var r = e.o[e.o.length - 1], i = Array.from(n), s = i.shift();
1811
- n = Math.max(Number(i.shift() || 0), 0);
1812
- var u = e.ya();
1813
- if (s instanceof k && s.H === "Function") {
1814
- var h = s;
1815
- u.type = "CallExpression", r = r.scope;
1816
- } else {
1817
- try {
1818
- var d = me(String(s), "taskCode" + e.ic++);
1819
- } catch (N) {
1820
- m(e, e.T, "Invalid code: " + N.message);
1821
- }
1822
- u.type = "EvalProgram_", u.body = d.body, r = r.node.arguments[0], Ze(u, r ? r.start : void 0, r ? r.end : void 0), r = e.N, i.length = 0;
1823
- }
1824
- return t = new vn(h, i, r, u, t ? n : -1), Tr(e, t, n), t.Db;
1825
- }
1826
- function Tr(e, t, n) {
1827
- t.time = Date.now() + n, e.ca.push(t), e.ca.sort(function(r, i) {
1828
- return r.time - i.time;
1829
- });
1830
- }
1831
- function Sr(e, t) {
1832
- for (var n = 0; n < e.ca.length; n++)
1833
- if (e.ca[n].Db == t) {
1834
- e.ca.splice(n, 1);
1835
- break;
1836
- }
1837
- }
1838
- function Be(e, t, n) {
1839
- if (!e.P)
1840
- throw Error("Unexpected call to createGetter");
1841
- e.P = !1, n = Array.isArray(n) ? n[0] : n;
1842
- var r = e.ya();
1843
- return r.type = "CallExpression", e = new y(r, e.o[e.o.length - 1].scope), e.ia = 2, e.B = n, e.U = t, e.Qa = !0, e.F = [], e;
1844
- }
1845
- function Lt(e, t, n, r) {
1846
- if (!e.Ka)
1847
- throw Error("Unexpected call to createSetter");
1848
- e.Ka = !1, n = Array.isArray(n) ? n[0] : e.Na;
1849
- var i = e.ya();
1850
- return i.type = "CallExpression", e = new y(i, e.o[e.o.length - 1].scope), e.ia = 2, e.B = n, e.U = t, e.Qa = !0, e.F = [r], e;
1851
- }
1852
- function jt(e, t) {
1853
- return t == null ? e.Na : t instanceof k ? t : (e = e.s(ee(e, t)), e.data = t, e);
1854
- }
1855
- O.Xb = function() {
1856
- return this.N;
1857
- };
1858
- O.Yb = function() {
1859
- return this.o;
1860
- };
1861
- O.ec = function(e) {
1862
- this.o = e;
1863
- };
1864
- function y(e, t) {
1865
- this.node = e, this.scope = t;
1866
- }
1867
- function Nr(e, t, n) {
1868
- this.Va = e, this.S = t, this.object = n;
1869
- }
1870
- function k(e) {
1871
- this.V = /* @__PURE__ */ Object.create(null), this.Y = /* @__PURE__ */ Object.create(null), this.h = /* @__PURE__ */ Object.create(null), this.xa = e;
1872
- }
1873
- O = k.prototype;
1874
- O.xa = null;
1875
- O.H = "Object";
1876
- O.data = null;
1877
- O.toString = function() {
1878
- if (!be)
1879
- return "[object Interpreter.Object]";
1880
- if (!(this instanceof k))
1881
- return String(this);
1882
- if (this.H === "Array") {
1883
- var e = xr;
1884
- e.push(this);
1885
- try {
1886
- var t = [], n = this.h.length, r = !1;
1887
- 1024 < n && (n = 1e3, r = !0);
1888
- for (var i = 0; i < n; i++) {
1889
- var s = this.h[i];
1890
- t[i] = s instanceof k && e.indexOf(s) !== -1 ? "..." : s;
1891
- }
1892
- r && t.push("...");
1893
- } finally {
1894
- e.pop();
1895
- }
1896
- return t.join(",");
1897
- }
1898
- if (this.H === "Error") {
1899
- if (e = xr, e.indexOf(this) !== -1)
1900
- return "[object Error]";
1901
- n = this;
1902
- do
1903
- if ("name" in n.h) {
1904
- t = n.h.name;
1905
- break;
1906
- }
1907
- while (n = n.xa);
1908
- n = this;
1909
- do
1910
- if ("message" in n.h) {
1911
- r = n.h.message;
1912
- break;
1913
- }
1914
- while (n = n.xa);
1915
- e.push(this);
1916
- try {
1917
- t = t && String(t), r = r && String(r);
1918
- } finally {
1919
- e.pop();
1920
- }
1921
- return r ? t + ": " + r : String(t);
1922
- }
1923
- return this.data !== null ? String(this.data) : "[object " + this.H + "]";
1924
- };
1925
- O.valueOf = function() {
1926
- return !be || this.data === void 0 || this.data === null || this.data instanceof RegExp ? this : this.data instanceof Date ? this.data.valueOf() : this.data;
1927
- };
1928
- function vn(e, t, n, r, i) {
1929
- this.zb = e, this.Lb = t, this.scope = n, this.node = r, this.interval = i, this.Db = ++yn, this.time = 0;
1930
- }
1931
- var yn = 0;
1932
- f.prototype.stepArrayExpression = function(e, t, n) {
1933
- n = n.elements;
1934
- var r = t.A || 0;
1935
- for (t.Oa ? (this.g(t.Oa, r, t.value), r++) : (t.Oa = we(this), t.Oa.h.length = n.length); r < n.length; ) {
1936
- if (n[r])
1937
- return t.A = r, new y(n[r], t.scope);
1938
- r++;
1939
- }
1940
- e.pop(), e[e.length - 1].value = t.Oa;
1941
- };
1942
- f.prototype.stepAssignmentExpression = function(e, t, n) {
1943
- if (!t.ja)
1944
- return t.ja = !0, t = new y(n.left, t.scope), t.sa = !0, t;
1945
- if (!t.Da)
1946
- return t.Fa || (t.Fa = t.value), t.Ba && (t.ma = t.value), !t.Ba && n.operator !== "=" && (e = Ut(this, t.Fa), t.ma = e, this.P) ? (t.Ba = !0, Be(this, e, t.Fa)) : (t.Da = !0, n.operator === "=" && n.left.type === "Identifier" && (t.Pa = n.left.name), new y(n.right, t.scope));
1947
- if (t.ta)
1948
- e.pop(), e[e.length - 1].value = t.ib;
1949
- else {
1950
- var r = t.ma, i = t.value;
1951
- switch (n.operator) {
1952
- case "=":
1953
- r = i;
1954
- break;
1955
- case "+=":
1956
- r += i;
1957
- break;
1958
- case "-=":
1959
- r -= i;
1960
- break;
1961
- case "*=":
1962
- r *= i;
1963
- break;
1964
- case "/=":
1965
- r /= i;
1966
- break;
1967
- case "%=":
1968
- r %= i;
1969
- break;
1970
- case "<<=":
1971
- r <<= i;
1972
- break;
1973
- case ">>=":
1974
- r >>= i;
1975
- break;
1976
- case ">>>=":
1977
- r >>>= i;
1978
- break;
1979
- case "&=":
1980
- r &= i;
1981
- break;
1982
- case "^=":
1983
- r ^= i;
1984
- break;
1985
- case "|=":
1986
- r |= i;
1987
- break;
1988
- default:
1989
- throw SyntaxError("Unknown assignment expression: " + n.operator);
1990
- }
1991
- if (n = Ft(this, t.Fa, r))
1992
- return t.ta = !0, t.ib = r, Lt(this, n, t.Fa, r);
1993
- e.pop(), e[e.length - 1].value = r;
1994
- }
1995
- };
1996
- f.prototype.stepBinaryExpression = function(e, t, n) {
1997
- if (!t.ja)
1998
- return t.ja = !0, new y(n.left, t.scope);
1999
- if (!t.Da)
2000
- return t.Da = !0, t.ma = t.value, new y(n.right, t.scope);
2001
- e.pop();
2002
- var r = t.ma;
2003
- switch (t = t.value, n.operator) {
2004
- case "==":
2005
- n = r == t;
2006
- break;
2007
- case "!=":
2008
- n = r != t;
2009
- break;
2010
- case "===":
2011
- n = r === t;
2012
- break;
2013
- case "!==":
2014
- n = r !== t;
2015
- break;
2016
- case ">":
2017
- n = r > t;
2018
- break;
2019
- case ">=":
2020
- n = r >= t;
2021
- break;
2022
- case "<":
2023
- n = r < t;
2024
- break;
2025
- case "<=":
2026
- n = r <= t;
2027
- break;
2028
- case "+":
2029
- n = r + t;
2030
- break;
2031
- case "-":
2032
- n = r - t;
2033
- break;
2034
- case "*":
2035
- n = r * t;
2036
- break;
2037
- case "/":
2038
- n = r / t;
2039
- break;
2040
- case "%":
2041
- n = r % t;
2042
- break;
2043
- case "&":
2044
- n = r & t;
2045
- break;
2046
- case "|":
2047
- n = r | t;
2048
- break;
2049
- case "^":
2050
- n = r ^ t;
2051
- break;
2052
- case "<<":
2053
- n = r << t;
2054
- break;
2055
- case ">>":
2056
- n = r >> t;
2057
- break;
2058
- case ">>>":
2059
- n = r >>> t;
2060
- break;
2061
- case "in":
2062
- t instanceof k || m(this, this.j, "'in' expects an object, not '" + t + "'"), n = ze(this, t, r);
2063
- break;
2064
- case "instanceof":
2065
- D(this, t, this.O) || m(this, this.j, "'instanceof' expects an object, not '" + t + "'"), n = r instanceof k ? D(this, r, t) : !1;
2066
- break;
2067
- default:
2068
- throw SyntaxError("Unknown binary operator: " + n.operator);
2069
- }
2070
- e[e.length - 1].value = n;
2071
- };
2072
- f.prototype.stepBlockStatement = function(e, t, n) {
2073
- var r = t.A || 0;
2074
- if (n = n.body[r])
2075
- return t.A = r + 1, new y(n, t.scope);
2076
- e.pop();
2077
- };
2078
- f.prototype.stepBreakStatement = function(e, t, n) {
2079
- Le(this, 1, void 0, n.label && n.label.name);
2080
- };
2081
- f.prototype.Hb = 0;
2082
- f.prototype.stepCallExpression = function(e, t, n) {
2083
- if (!t.ia) {
2084
- t.ia = 1;
2085
- var r = new y(n.callee, t.scope);
2086
- return r.sa = !0, r;
2087
- }
2088
- if (t.ia === 1) {
2089
- t.ia = 2;
2090
- var i = t.value;
2091
- if (Array.isArray(i)) {
2092
- if (t.U = Ut(this, i), i[0] === Ee ? t.Pb = i[1] === "eval" : t.B = i[0], i = t.U, this.P)
2093
- return t.ia = 1, Be(this, i, t.value);
2094
- } else
2095
- t.U = i;
2096
- t.F = [], t.A = 0;
2097
- }
2098
- if (i = t.U, !t.Qa) {
2099
- if (t.A !== 0 && t.F.push(t.value), n.arguments[t.A])
2100
- return new y(n.arguments[t.A++], t.scope);
2101
- if (n.type === "NewExpression") {
2102
- if (i instanceof k && !i.Ab || m(this, this.j, L(this, n.callee) + " is not a constructor"), i === this.qa)
2103
- t.B = we(this);
2104
- else {
2105
- var s = i.h.prototype;
2106
- (typeof s != "object" || s === null) && (s = this.M), t.B = this.s(s);
2107
- }
2108
- t.isConstructor = !0;
2109
- }
2110
- t.Qa = !0;
2111
- }
2112
- if (t.eb)
2113
- e.pop(), e[e.length - 1].value = t.isConstructor && typeof t.value != "object" ? t.B : t.value;
2114
- else {
2115
- if (t.eb = !0, i instanceof k || m(this, this.j, L(this, n.callee) + " is not a function"), e = i.node) {
2116
- for (n = Ct(this, e.body, i.Va), r = we(this), i = 0; i < t.F.length; i++)
2117
- this.g(r, i, t.F[i]);
2118
- for (this.g(n.object, "arguments", r), i = 0; i < e.oa.length; i++)
2119
- this.g(n.object, e.oa[i].name, t.F.length > i ? t.F[i] : void 0);
2120
- return n.S || (t.B = jt(this, t.B)), this.g(n.object, "this", t.B, Tt), t.value = void 0, new y(e.body, n);
2121
- }
2122
- if (i.eval)
2123
- if (i = t.F[0], typeof i != "string")
2124
- t.value = i;
2125
- else {
2126
- try {
2127
- r = me(String(i), "eval" + this.Hb++);
2128
- } catch (h) {
2129
- m(this, this.T, "Invalid code: " + h.message);
2130
- }
2131
- return i = this.ya(), i.type = "EvalProgram_", i.body = r.body, Ze(i, n.start, n.end), n = t.Pb ? t.scope : this.N, n.S ? n = Ct(this, r, n) : Fe(this, r, n), this.value = void 0, new y(i, n);
2132
- }
2133
- else if (i.Ta)
2134
- t.scope.S || (t.B = jt(this, t.B)), t.value = i.Ta.apply(t.B, t.F);
2135
- else if (i.Za) {
2136
- var u = this;
2137
- r = i.Za.length - 1, r = t.F.concat(Array(r)).slice(0, r), r.push(function(h) {
2138
- t.value = h, u.za = !1;
2139
- }), this.za = !0, t.scope.S || (t.B = jt(this, t.B)), i.Za.apply(t.B, r);
2140
- } else
2141
- m(this, this.j, L(this, n.callee) + " is not callable");
2142
- }
2143
- };
2144
- f.prototype.stepConditionalExpression = function(e, t, n) {
2145
- var r = t.na || 0;
2146
- if (r === 0)
2147
- return t.na = 1, new y(n.test, t.scope);
2148
- if (r === 1) {
2149
- if (t.na = 2, (r = !!t.value) && n.da)
2150
- return new y(n.da, t.scope);
2151
- if (!r && n.alternate)
2152
- return new y(n.alternate, t.scope);
2153
- this.value = void 0;
2154
- }
2155
- e.pop(), n.type === "ConditionalExpression" && (e[e.length - 1].value = t.value);
2156
- };
2157
- f.prototype.stepContinueStatement = function(e, t, n) {
2158
- Le(this, 2, void 0, n.label && n.label.name);
2159
- };
2160
- f.prototype.stepDebuggerStatement = function(e) {
2161
- e.pop();
2162
- };
2163
- f.prototype.stepDoWhileStatement = function(e, t, n) {
2164
- if (n.type === "DoWhileStatement" && t.ga === void 0 && (t.value = !0, t.ga = !0), !t.ga)
2165
- return t.ga = !0, new y(n.test, t.scope);
2166
- if (!t.value)
2167
- e.pop();
2168
- else if (n.body)
2169
- return t.ga = !1, t.W = !0, new y(n.body, t.scope);
2170
- };
2171
- f.prototype.stepEmptyStatement = function(e) {
2172
- e.pop();
2173
- };
2174
- f.prototype.stepEvalProgram_ = function(e, t, n) {
2175
- var r = t.A || 0;
2176
- if (n = n.body[r])
2177
- return t.A = r + 1, new y(n, t.scope);
2178
- e.pop(), e[e.length - 1].value = this.value;
2179
- };
2180
- f.prototype.stepExpressionStatement = function(e, t, n) {
2181
- if (!t.ka)
2182
- return this.value = void 0, t.ka = !0, new y(n.la, t.scope);
2183
- e.pop(), this.value = t.value;
2184
- };
2185
- f.prototype.stepForInStatement = function(e, t, n) {
2186
- if (!t.Ub && (t.Ub = !0, n.left.fa && n.left.fa[0].ua))
2187
- return t.scope.S && m(this, this.T, "for-in loop variable declaration may not have an initializer"), new y(n.left, t.scope);
2188
- if (!t.Ca)
2189
- return t.Ca = !0, t.pa || (t.pa = t.value), new y(n.right, t.scope);
2190
- if (t.W || (t.W = !0, t.u = t.value, t.kb = /* @__PURE__ */ Object.create(null)), t.Ra === void 0)
2191
- e:
2192
- for (; ; ) {
2193
- if (t.u instanceof k)
2194
- for (t.wa || (t.wa = Object.getOwnPropertyNames(t.u.h)); ; ) {
2195
- var r = t.wa.shift();
2196
- if (r === void 0)
2197
- break;
2198
- if (Object.prototype.hasOwnProperty.call(t.u.h, r) && !t.kb[r] && (t.kb[r] = !0, Object.prototype.propertyIsEnumerable.call(t.u.h, r))) {
2199
- t.Ra = r;
2200
- break e;
2201
- }
2202
- }
2203
- else if (t.u !== null && t.u !== void 0) {
2204
- for (t.wa || (t.wa = Object.getOwnPropertyNames(t.u)); r = t.wa.shift(), r !== void 0; )
2205
- if (t.kb[r] = !0, Object.prototype.propertyIsEnumerable.call(t.u, r)) {
2206
- t.Ra = r;
2207
- break e;
2208
- }
2209
- }
2210
- if (t.u = ee(this, t.u), t.wa = null, t.u === null) {
2211
- e.pop();
2212
- return;
2213
- }
2214
- }
2215
- if (!t.wb)
2216
- if (t.wb = !0, e = n.left, e.type === "VariableDeclaration")
2217
- t.pa = [Ee, e.fa[0].id.name];
2218
- else
2219
- return t.pa = null, t = new y(e, t.scope), t.sa = !0, t;
2220
- if (t.pa || (t.pa = t.value), !t.ta && (t.ta = !0, e = t.Ra, r = Ft(this, t.pa, e)))
2221
- return Lt(this, r, t.pa, e);
2222
- if (t.Ra = void 0, t.wb = !1, t.ta = !1, n.body)
2223
- return new y(n.body, t.scope);
2224
- };
2225
- f.prototype.stepForStatement = function(e, t, n) {
2226
- switch (t.na) {
2227
- default:
2228
- if (t.na = 1, n.ua)
2229
- return new y(n.ua, t.scope);
2230
- break;
2231
- case 1:
2232
- if (t.na = 2, n.test)
2233
- return new y(n.test, t.scope);
2234
- break;
2235
- case 2:
2236
- if (t.na = 3, n.test && !t.value)
2237
- e.pop();
2238
- else
2239
- return t.W = !0, new y(n.body, t.scope);
2240
- break;
2241
- case 3:
2242
- if (t.na = 1, n.update)
2243
- return new y(n.update, t.scope);
2244
- }
2245
- };
2246
- f.prototype.stepFunctionDeclaration = function(e) {
2247
- e.pop();
2248
- };
2249
- f.prototype.stepFunctionExpression = function(e, t, n) {
2250
- e.pop(), t = e[e.length - 1], e = t.scope, n.id && (e = bt(this, e)), t.value = Mt(this, n, e, t.Pa), n.id && this.g(e.object, n.id.name, t.value, Tt);
2251
- };
2252
- f.prototype.stepIdentifier = function(e, t, n) {
2253
- if (e.pop(), t.sa)
2254
- e[e.length - 1].value = [Ee, n.name];
2255
- else {
2256
- if (t = Dt(this, n.name), this.P)
2257
- return Be(this, t, this.Na);
2258
- e[e.length - 1].value = t;
2259
- }
2260
- };
2261
- f.prototype.stepIfStatement = f.prototype.stepConditionalExpression;
2262
- f.prototype.stepLabeledStatement = function(e, t, n) {
2263
- return e.pop(), e = t.labels || [], e.push(n.label.name), t = new y(n.body, t.scope), t.labels = e, t;
2264
- };
2265
- f.prototype.stepLiteral = function(e, t, n) {
2266
- e.pop(), t = n.value, t instanceof RegExp && (n = this.s(this.Ma), Pt(this, n, t), t = n), e[e.length - 1].value = t;
2267
- };
2268
- f.prototype.stepLogicalExpression = function(e, t, n) {
2269
- if (n.operator !== "&&" && n.operator !== "||")
2270
- throw SyntaxError("Unknown logical operator: " + n.operator);
2271
- if (!t.ja)
2272
- return t.ja = !0, new y(n.left, t.scope);
2273
- if (t.Da)
2274
- e.pop(), e[e.length - 1].value = t.value;
2275
- else if (n.operator === "&&" && !t.value || n.operator === "||" && t.value)
2276
- e.pop(), e[e.length - 1].value = t.value;
2277
- else
2278
- return t.Da = !0, new y(n.right, t.scope);
2279
- };
2280
- f.prototype.stepMemberExpression = function(e, t, n) {
2281
- if (!t.Ca)
2282
- return t.Ca = !0, new y(n.object, t.scope);
2283
- if (n.bb)
2284
- if (t.Vb)
2285
- n = t.value;
2286
- else
2287
- return t.u = t.value, t.Vb = !0, new y(n.Wa, t.scope);
2288
- else
2289
- t.u = t.value, n = n.Wa.name;
2290
- if (e.pop(), t.sa)
2291
- e[e.length - 1].value = [t.u, n];
2292
- else {
2293
- if (n = this.G(t.u, n), this.P)
2294
- return Be(this, n, t.u);
2295
- e[e.length - 1].value = n;
2296
- }
2297
- };
2298
- f.prototype.stepNewExpression = f.prototype.stepCallExpression;
2299
- f.prototype.stepObjectExpression = function(e, t, n) {
2300
- var r = t.A || 0, i = n.h[r];
2301
- if (t.u) {
2302
- var s = t.Pa;
2303
- t.Ja[s] || (t.Ja[s] = {}), t.Ja[s][i.kind] = t.value, t.A = ++r, i = n.h[r];
2304
- } else
2305
- t.u = this.s(this.M), t.Ja = /* @__PURE__ */ Object.create(null);
2306
- if (i) {
2307
- var u = i.key;
2308
- if (u.type === "Identifier")
2309
- s = u.name;
2310
- else if (u.type === "Literal")
2311
- s = u.value;
2312
- else
2313
- throw SyntaxError("Unknown object structure: " + u.type);
2314
- return t.Pa = s, new y(i.value, t.scope);
2315
- }
2316
- for (u in t.Ja)
2317
- n = t.Ja[u], "get" in n || "set" in n ? this.g(t.u, u, Ue, {
2318
- configurable: !0,
2319
- enumerable: !0,
2320
- get: n.get,
2321
- set: n.set
2322
- }) : this.g(t.u, u, n.init);
2323
- e.pop(), e[e.length - 1].value = t.u;
2324
- };
2325
- f.prototype.stepProgram = function(e, t, n) {
2326
- if (e = n.body.shift())
2327
- return t.done = !1, new y(e, t.scope);
2328
- t.done = !0;
2329
- };
2330
- f.prototype.stepReturnStatement = function(e, t, n) {
2331
- if (n.K && !t.ka)
2332
- return t.ka = !0, new y(n.K, t.scope);
2333
- Le(this, 3, t.value);
2334
- };
2335
- f.prototype.stepSequenceExpression = function(e, t, n) {
2336
- var r = t.A || 0;
2337
- if (n = n.xb[r])
2338
- return t.A = r + 1, new y(n, t.scope);
2339
- e.pop(), e[e.length - 1].value = t.value;
2340
- };
2341
- f.prototype.stepSwitchStatement = function(e, t, n) {
2342
- if (!t.ga)
2343
- return t.ga = 1, new y(n.Qb, t.scope);
2344
- for (t.ga === 1 && (t.ga = 2, t.hc = t.value, t.cb = -1); ; ) {
2345
- var r = t.gb || 0, i = n.tb[r];
2346
- if (t.Ha || !i || i.test)
2347
- if (i || t.Ha || t.cb === -1)
2348
- if (i) {
2349
- if (!t.Ha && !t.Fb && i.test)
2350
- return t.Fb = !0, new y(i.test, t.scope);
2351
- if (t.Ha || t.value === t.hc) {
2352
- t.Ha = !0;
2353
- var s = t.A || 0;
2354
- if (i.da[s])
2355
- return t.Zb = !0, t.A = s + 1, new y(i.da[s], t.scope);
2356
- }
2357
- t.Fb = !1, t.A = 0, t.gb = r + 1;
2358
- } else {
2359
- e.pop();
2360
- break;
2361
- }
2362
- else
2363
- t.Ha = !0, t.gb = t.cb;
2364
- else
2365
- t.cb = r, t.gb = r + 1;
2366
- }
2367
- };
2368
- f.prototype.stepThisExpression = function(e) {
2369
- e.pop(), e[e.length - 1].value = Dt(this, "this");
2370
- };
2371
- f.prototype.stepThrowStatement = function(e, t, n) {
2372
- if (t.ka)
2373
- m(this, t.value);
2374
- else
2375
- return t.ka = !0, new y(n.K, t.scope);
2376
- };
2377
- f.prototype.stepTryStatement = function(e, t, n) {
2378
- if (!t.Rb)
2379
- return t.Rb = !0, new y(n.block, t.scope);
2380
- if (t.ea && t.ea.type === 4 && !t.Tb && n.Ea)
2381
- return t.Tb = !0, e = bt(this, t.scope), this.g(e.object, n.Ea.Ua.name, t.ea.value), t.ea = void 0, new y(n.Ea.body, e);
2382
- if (!t.Sb && n.fb)
2383
- return t.Sb = !0, new y(n.fb, t.scope);
2384
- e.pop(), t.ea && Le(this, t.ea.type, t.ea.value, t.ea.label);
2385
- };
2386
- f.prototype.stepUnaryExpression = function(e, t, n) {
2387
- if (!t.ka)
2388
- return t.ka = !0, e = new y(n.K, t.scope), e.sa = n.operator === "delete", e;
2389
- e.pop();
2390
- var r = t.value;
2391
- switch (n.operator) {
2392
- case "-":
2393
- r = -r;
2394
- break;
2395
- case "+":
2396
- r = +r;
2397
- break;
2398
- case "!":
2399
- r = !r;
2400
- break;
2401
- case "~":
2402
- r = ~r;
2403
- break;
2404
- case "delete":
2405
- if (n = !0, Array.isArray(r)) {
2406
- var i = r[0];
2407
- i === Ee && (i = t.scope), r = String(r[1]);
2408
- try {
2409
- delete i.h[r];
2410
- } catch {
2411
- t.scope.S ? m(this, this.j, "Cannot delete property '" + r + "' of '" + i + "'") : n = !1;
2412
- }
2413
- }
2414
- r = n;
2415
- break;
2416
- case "typeof":
2417
- r = r && r.H === "Function" ? "function" : typeof r;
2418
- break;
2419
- case "void":
2420
- r = void 0;
2421
- break;
2422
- default:
2423
- throw SyntaxError("Unknown unary operator: " + n.operator);
2424
- }
2425
- e[e.length - 1].value = r;
2426
- };
2427
- f.prototype.stepUpdateExpression = function(e, t, n) {
2428
- if (!t.ja)
2429
- return t.ja = !0, e = new y(n.K, t.scope), e.sa = !0, e;
2430
- if (t.Ga || (t.Ga = t.value), t.Ba && (t.ma = t.value), !t.Ba) {
2431
- var r = Ut(this, t.Ga);
2432
- if (t.ma = r, this.P)
2433
- return t.Ba = !0, Be(this, r, t.Ga);
2434
- }
2435
- if (t.ta)
2436
- e.pop(), e[e.length - 1].value = t.ib;
2437
- else {
2438
- if (r = Number(t.ma), n.operator === "++")
2439
- var i = r + 1;
2440
- else if (n.operator === "--")
2441
- i = r - 1;
2442
- else
2443
- throw SyntaxError("Unknown update expression: " + n.operator);
2444
- if (n = n.prefix ? i : r, r = Ft(this, t.Ga, i))
2445
- return t.ta = !0, t.ib = n, Lt(this, r, t.Ga, i);
2446
- e.pop(), e[e.length - 1].value = n;
2447
- }
2448
- };
2449
- f.prototype.stepVariableDeclaration = function(e, t, n) {
2450
- n = n.fa;
2451
- var r = t.A || 0, i = n[r];
2452
- for (t.Bb && i && (Ir(this, i.id.name, t.value), t.Bb = !1, i = n[++r]); i; ) {
2453
- if (i.ua)
2454
- return t.A = r, t.Bb = !0, t.Pa = i.id.name, new y(i.ua, t.scope);
2455
- i = n[++r];
2456
- }
2457
- e.pop();
2458
- };
2459
- f.prototype.stepWithStatement = function(e, t, n) {
2460
- return t.Ca ? (e.pop(), e = bt(this, t.scope, t.value), new y(n.body, e)) : (t.Ca = !0, new y(n.object, t.scope));
2461
- };
2462
- f.prototype.stepWhileStatement = f.prototype.stepDoWhileStatement;
2463
- se.Interpreter = f;
2464
- f.prototype.step = f.prototype.lb;
2465
- f.prototype.run = f.prototype.Eb;
2466
- f.prototype.appendCode = f.prototype.Jb;
2467
- f.prototype.createObject = f.prototype.Aa;
2468
- f.prototype.createObjectProto = f.prototype.s;
2469
- f.prototype.createAsyncFunction = f.prototype.ub;
2470
- f.prototype.createNativeFunction = f.prototype.i;
2471
- f.prototype.getProperty = f.prototype.G;
2472
- f.prototype.setProperty = f.prototype.g;
2473
- f.prototype.nativeToPseudo = f.prototype.Ia;
2474
- f.prototype.pseudoToNative = f.prototype.R;
2475
- f.prototype.getGlobalScope = f.prototype.Xb;
2476
- f.prototype.getStateStack = f.prototype.Yb;
2477
- f.prototype.setStateStack = f.prototype.ec;
2478
- f.VALUE_IN_DESCRIPTOR = Ue;
2479
- function dn() {
2480
- const e = f.prototype.getProperty, t = f.prototype.setProperty;
2481
- function n(u, h) {
2482
- if (u == null || !u._connected)
2483
- return e.call(this, u, h);
2484
- const d = u._connected[h];
2485
- return Array.isArray(d) ? this.nativeToPseudo(d) : typeof d == "object" ? this.createConnectedObject(d) : d;
2486
- }
2487
- function r(u, h, d, N) {
2488
- if (u == null || !u._connected)
2489
- return t.call(this, u, h, d, N);
2490
- u._connected[h] = this.pseudoToNative(d);
2491
- }
2492
- const i = [], s = [];
2493
- for (const u of Object.keys(f.prototype))
2494
- f.prototype[u] === e && i.push(u), f.prototype[u] === t && s.push(u);
2495
- for (const u of i)
2496
- f.prototype[u] = n;
2497
- for (const u of s)
2498
- f.prototype[u] = r;
2499
- f.prototype.createConnectedObject = function(u) {
2500
- const h = this.createObject(this.OBJECT);
2501
- return h._connected = u, h;
2502
- };
2503
- }
2504
- dn();
2505
- const mn = (e) => e.replace(/^.*?function main\(\)/, `
2506
- var __awaiter = function (e, t, n, r) {return r()},
2507
- __generator = function (e, t) { return t() };
2508
- function main()`).replace(/\?\./g, "."), kr = (e) => e + "JSON", wn = ({
2509
- builder: e,
2510
- context: t,
2511
- event: n,
2512
- rootState: r,
2513
- localState: i,
2514
- rootSetState: s,
2515
- code: u
2516
- }) => {
2517
- const h = It({
2518
- rootState: r,
2519
- localState: i,
2520
- rootSetState: s
2521
- }), d = Or({
2522
- builder: e,
2523
- context: t,
2524
- event: n,
2525
- state: h
2526
- }), N = d.map(([G]) => {
2527
- const re = kr(G);
2528
- return G === "state" ? "" : `var ${G} = ${re} === undefined ? undefined : JSON.parse(${re});`;
2529
- }).join(`
2530
- `), P = mn(u);
2531
- if (P === "") {
2532
- At.warn("Skipping evaluation of empty code block.");
2533
- return;
2534
- }
2535
- const C = `
2536
- function theFunction() {
2537
- ${N}
2538
-
2539
- ${P}
2540
- }
2541
- theFunction();
2542
- `, Ge = function(G, re) {
2543
- d.forEach(([ce, S]) => {
2544
- if (ce === "state")
2545
- G.setProperty(re, ce, G.createConnectedObject(S), G.READONLY_DESCRIPTOR);
2546
- else {
2547
- const xe = JSON.stringify(S);
2548
- G.setProperty(re, kr(ce), xe);
2549
- }
2550
- });
2551
- }, Y = new f(C, Ge);
2552
- return Y.run(), Y.pseudoToNative(Y.value);
2553
- };
2554
- function En() {
2555
- var e;
2556
- return typeof process != "undefined" && Kr((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
2557
- }
2558
- const xn = ({
2559
- shouldLogWarning: e
2560
- }) => {
2561
- var i;
2562
- if (!En())
2563
- return !1;
2564
- const t = process.arch === "arm64", n = process.version.startsWith("v20"), r = (i = process.env.NODE_OPTIONS) == null ? void 0 : i.includes("--no-node-snapshot");
2565
- return t && n && !r ? (e && At.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
2566
- }, jn = (e) => St() || xn({
2567
- shouldLogWarning: !0
2568
- }) ? qr(e) : wn(e), Sn = /^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/, kn = /(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/, On = (e) => {
2569
- var t, n, r, i, s, u;
2570
- return ((r = (n = (t = Sn.exec(e.trim())) == null ? void 0 : t.groups) == null ? void 0 : n.getPath) == null ? void 0 : r.slice(1)) || ((u = (s = (i = kn.exec(e.trim())) == null ? void 0 : i.groups) == null ? void 0 : s.getPath) == null ? void 0 : u.slice(1));
2571
- };
2572
- function An({
2573
- code: e,
2574
- context: t,
2575
- localState: n,
2576
- rootState: r,
2577
- rootSetState: i,
2578
- event: s,
2579
- isExpression: u = !0
2580
- }) {
2581
- if (e.trim() === "")
2582
- return;
2583
- const h = On(e.trim());
2584
- if (h)
2585
- return Zr({
2586
- ...r,
2587
- ...n
2588
- }, h);
2589
- const d = {
2590
- code: Qr(e, {
2591
- isExpression: u
2592
- }),
2593
- builder: zr(),
2594
- context: t,
2595
- event: s,
2596
- rootSetState: i,
2597
- rootState: r,
2598
- localState: n
2599
- };
2600
- try {
2601
- return jn(d);
2602
- } catch (N) {
2603
- At.error("Failed code evaluation: " + N.message, {
2604
- code: e
2605
- });
2606
- return;
2607
- }
2608
- }
2609
- export {
2610
- An as evaluate,
2611
- Zr as get
2612
- };