@viji-dev/core 0.11.7 → 0.11.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
- function ar(t) {
1
+ function cr(t) {
2
2
  if (typeof t == "string")
3
- return xc(t);
3
+ return Ec(t);
4
4
  if (t && typeof t == "object") {
5
5
  const e = t, n = "r" in e && "g" in e && "b" in e;
6
6
  if ("h" in e && "s" in e && "b" in e && !("r" in e) && !("g" in e))
7
- return Cc(e);
7
+ return Pc(e);
8
8
  if (n)
9
- return Rc(e);
9
+ return Cc(e);
10
10
  throw new Error(
11
11
  `Invalid color object: expected {r,g,b} or {h,s,b} keys, got ${JSON.stringify(t)}`
12
12
  );
@@ -23,7 +23,7 @@ function Sn(t) {
23
23
  b: parseInt(e[3], 16)
24
24
  };
25
25
  }
26
- function li(t) {
26
+ function hi(t) {
27
27
  const { r: e, g: n, b: s } = Sn(t), i = e / 255, o = n / 255, c = s / 255, u = Math.max(i, o, c), h = Math.min(i, o, c), f = u - h;
28
28
  let m = 0;
29
29
  f > 0 && (u === i ? m = (o - c) / f % 6 : u === o ? m = (c - i) / f + 2 : m = (i - o) / f + 4, m *= 60, m < 0 && (m += 360));
@@ -34,7 +34,7 @@ function li(t) {
34
34
  b: Ws(x, 4)
35
35
  };
36
36
  }
37
- function wc(t) {
37
+ function xc(t) {
38
38
  const { r: e, g: n, b: s } = Sn(t);
39
39
  return [e / 255, n / 255, s / 255];
40
40
  }
@@ -42,7 +42,7 @@ function cn(t, e, n) {
42
42
  const s = Hs(t, "r"), i = Hs(e, "g"), o = Hs(n, "b");
43
43
  return "#" + Xs(s) + Xs(i) + Xs(o);
44
44
  }
45
- function fo(t, e, n) {
45
+ function ho(t, e, n) {
46
46
  if (typeof t != "number" || typeof e != "number" || typeof n != "number" || !isFinite(t) || !isFinite(e) || !isFinite(n))
47
47
  throw new Error(`Invalid HSB: h=${t}, s=${e}, b=${n}`);
48
48
  if (e < 0 || e > 100)
@@ -59,29 +59,29 @@ function fo(t, e, n) {
59
59
  Math.round((g + x) * 255)
60
60
  );
61
61
  }
62
- function xc(t) {
62
+ function Ec(t) {
63
63
  const e = t.trim();
64
64
  if (e.startsWith("#"))
65
- return Ec(e);
65
+ return Sc(e);
66
66
  const n = e.match(/^(rgb|hsl|hsb|vec3)\s*\(([^)]*)\)$/i);
67
67
  if (n) {
68
68
  const s = n[1].toLowerCase(), i = n[2];
69
69
  switch (s) {
70
70
  case "rgb":
71
- return Sc(i);
72
- case "hsl":
73
71
  return Tc(i);
74
- case "hsb":
72
+ case "hsl":
75
73
  return Ic(i);
76
- case "vec3":
74
+ case "hsb":
77
75
  return Ac(i);
76
+ case "vec3":
77
+ return Rc(i);
78
78
  }
79
79
  }
80
80
  throw new Error(
81
81
  `Invalid color string: '${t}'. Expected #rrggbb, #rgb, rgb(...), hsl(...), hsb(...), or vec3(...)`
82
82
  );
83
83
  }
84
- function Ec(t) {
84
+ function Sc(t) {
85
85
  if (/^#[0-9a-fA-F]{6}$/.test(t))
86
86
  return t.toLowerCase();
87
87
  if (/^#[0-9a-fA-F]{3}$/.test(t)) {
@@ -90,28 +90,28 @@ function Ec(t) {
90
90
  }
91
91
  throw new Error(`Invalid hex color: '${t}'. Expected #rrggbb or #rgb`);
92
92
  }
93
- function Sc(t) {
93
+ function Tc(t) {
94
94
  const e = jn(t);
95
95
  if (e.length !== 3)
96
96
  throw new Error(`rgb() requires 3 arguments, got ${e.length}: rgb(${t})`);
97
97
  const n = We(e[0], "r"), s = We(e[1], "g"), i = We(e[2], "b");
98
98
  return cn(n, s, i);
99
99
  }
100
- function Tc(t) {
100
+ function Ic(t) {
101
101
  const e = jn(t);
102
102
  if (e.length !== 3)
103
103
  throw new Error(`hsl() requires 3 arguments, got ${e.length}: hsl(${t})`);
104
- const n = We(e[0], "h"), s = fi(e[1], "s"), i = fi(e[2], "l");
105
- return Pc(n, s, i);
104
+ const n = We(e[0], "h"), s = di(e[1], "s"), i = di(e[2], "l");
105
+ return Dc(n, s, i);
106
106
  }
107
- function Ic(t) {
107
+ function Ac(t) {
108
108
  const e = jn(t);
109
109
  if (e.length !== 3)
110
110
  throw new Error(`hsb() requires 3 arguments, got ${e.length}: hsb(${t})`);
111
111
  const n = We(e[0], "h"), s = We(e[1], "s"), i = We(e[2], "b");
112
- return fo(n, s, i);
112
+ return ho(n, s, i);
113
113
  }
114
- function Ac(t) {
114
+ function Rc(t) {
115
115
  const e = jn(t);
116
116
  if (e.length !== 3)
117
117
  throw new Error(`vec3() requires 3 arguments, got ${e.length}: vec3(${t})`);
@@ -124,15 +124,15 @@ function Ac(t) {
124
124
  Math.round(i * 255)
125
125
  );
126
126
  }
127
- function Rc(t) {
127
+ function Cc(t) {
128
128
  const e = Mt(t.r, "r"), n = Mt(t.g, "g"), s = Mt(t.b, "b");
129
129
  return cn(e, n, s);
130
130
  }
131
- function Cc(t) {
131
+ function Pc(t) {
132
132
  const e = Mt(t.h, "h"), n = Mt(t.s, "s"), s = Mt(t.b, "b");
133
- return fo(e, n, s);
133
+ return ho(e, n, s);
134
134
  }
135
- function Pc(t, e, n) {
135
+ function Dc(t, e, n) {
136
136
  if (e < 0 || e > 100)
137
137
  throw new Error(`HSL saturation must be 0..100%, got: ${e}%`);
138
138
  if (n < 0 || n > 100)
@@ -156,7 +156,7 @@ function We(t, e) {
156
156
  throw new Error(`Invalid number for '${e}': '${t}'`);
157
157
  return n;
158
158
  }
159
- function fi(t, e) {
159
+ function di(t, e) {
160
160
  if (!t.endsWith("%"))
161
161
  throw new Error(`Field '${e}' must use percent notation (e.g., 50%), got: '${t}'`);
162
162
  return We(t.slice(0, -1), e);
@@ -180,13 +180,13 @@ function Ws(t, e) {
180
180
  const n = 10 ** e;
181
181
  return Math.round(t * n) / n;
182
182
  }
183
- function hi(t, e) {
183
+ function mi(t, e) {
184
184
  const n = Math.abs(e - t);
185
185
  if (n <= 0) return 1;
186
186
  const s = Math.pow(10, Math.floor(Math.log10(n / 100)));
187
187
  return Math.max(s, Number.EPSILON);
188
188
  }
189
- class Dc {
189
+ class Lc {
190
190
  // Parameter system for Phase 2 (new object-based approach)
191
191
  parameterDefinitions = /* @__PURE__ */ new Map();
192
192
  parameterGroups = /* @__PURE__ */ new Map();
@@ -221,7 +221,7 @@ class Dc {
221
221
  value: e,
222
222
  min: i,
223
223
  max: o,
224
- step: n.step ?? hi(i, o),
224
+ step: n.step ?? mi(i, o),
225
225
  label: n.label,
226
226
  description: n.description ?? "",
227
227
  group: n.group ?? "general",
@@ -242,10 +242,10 @@ class Dc {
242
242
  return this.storeParameterDefinition(s, u), this.parameterObjects.set(s, c), c;
243
243
  }
244
244
  createColorParameter(e, n) {
245
- const s = n.label, i = ar(e), o = {
245
+ const s = n.label, i = cr(e), o = {
246
246
  value: i,
247
247
  rgb: Object.freeze(Sn(i)),
248
- hsb: Object.freeze(li(i)),
248
+ hsb: Object.freeze(hi(i)),
249
249
  label: n.label,
250
250
  description: n.description ?? "",
251
251
  group: n.group ?? "general",
@@ -324,7 +324,7 @@ class Dc {
324
324
  value: e,
325
325
  min: i,
326
326
  max: o,
327
- step: n.step ?? hi(i, o),
327
+ step: n.step ?? mi(i, o),
328
328
  label: n.label,
329
329
  description: n.description ?? "",
330
330
  group: n.group ?? "general",
@@ -410,7 +410,7 @@ class Dc {
410
410
  return console.warn(`Unknown parameter: ${e}. Available parameters:`, Array.from(this.parameterDefinitions.keys())), !1;
411
411
  if (s.type === "color")
412
412
  try {
413
- n = ar(n);
413
+ n = cr(n);
414
414
  } catch (h) {
415
415
  return console.error(`Parameter '${e}' invalid color: ${h.message}`), !1;
416
416
  }
@@ -423,7 +423,7 @@ class Dc {
423
423
  const u = this.parameterObjects.get(e);
424
424
  if (u && (u.value = n, s.type === "color")) {
425
425
  const h = n;
426
- u.rgb = Object.freeze(Sn(h)), u.hsb = Object.freeze(li(h));
426
+ u.rgb = Object.freeze(Sn(h)), u.hsb = Object.freeze(hi(h));
427
427
  }
428
428
  return !0;
429
429
  }
@@ -555,7 +555,7 @@ class Dc {
555
555
  }
556
556
  }
557
557
  }
558
- class Lc {
558
+ class Fc {
559
559
  // Interaction enabled state
560
560
  isEnabled = !0;
561
561
  // Previous button bitmask for detecting press/release transitions
@@ -807,20 +807,20 @@ class Lc {
807
807
  this.mouseState.x = 0, this.mouseState.y = 0, this.mouseState.isInCanvas = !1, this.mouseState.isPressed = !1, this.mouseState.leftButton = !1, this.mouseState.rightButton = !1, this.mouseState.middleButton = !1, this.mouseState.deltaX = 0, this.mouseState.deltaY = 0, this.mouseState.wheelDelta = 0, this.mouseState.wheelX = 0, this.mouseState.wheelY = 0, this.mouseState.wasPressed = !1, this.mouseState.wasReleased = !1, this.mouseState.wasMoved = !1, this.keyboardState.activeKeys.clear(), this.keyboardState.pressedThisFrame.clear(), this.keyboardState.releasedThisFrame.clear(), this.keyboardState.lastKeyPressed = "", this.keyboardState.lastKeyReleased = "", this.keyboardState.shift = !1, this.keyboardState.ctrl = !1, this.keyboardState.alt = !1, this.keyboardState.meta = !1, this.keyboardTextureData.fill(0), this.touchState.points = [], this.touchState.count = 0, this.touchState.started = [], this.touchState.moved = [], this.touchState.ended = [], this.touchState.primary = null, this.previousTouchPositions.clear(), this.pointerState.x = 0, this.pointerState.y = 0, this.pointerState.deltaX = 0, this.pointerState.deltaY = 0, this.pointerState.isDown = !1, this.pointerState.wasPressed = !1, this.pointerState.wasReleased = !1, this.pointerState.isInCanvas = !1, this.pointerState.type = "none", this.previousPointerDown = !1;
808
808
  }
809
809
  }
810
- const di = {
810
+ const pi = {
811
811
  activeFeatures: [],
812
812
  processingTime: 0,
813
813
  targetFPS: 0,
814
814
  actualFPS: 0,
815
815
  isProcessing: !1
816
- }, mi = {
816
+ }, gi = {
817
817
  faceDetection: { active: !1, meaningful: !1 },
818
818
  faceMesh: { active: !1, meaningful: !1 },
819
819
  emotion: { active: !1, meaningful: !1 },
820
820
  handTracking: { active: !1, meaningful: !1 },
821
821
  poseDetection: { active: !1, meaningful: !1 },
822
822
  segmentation: { active: !1, meaningful: !1 }
823
- }, Fc = {
823
+ }, Uc = {
824
824
  faceDetection: "faceDetection",
825
825
  faceMesh: "faceMesh",
826
826
  emotionDetection: "emotion",
@@ -828,7 +828,7 @@ const di = {
828
828
  poseDetection: "poseDetection",
829
829
  bodySegmentation: "segmentation"
830
830
  };
831
- class Uc {
831
+ class Nc {
832
832
  desired = /* @__PURE__ */ new Set();
833
833
  results = {
834
834
  faces: [],
@@ -836,8 +836,8 @@ class Uc {
836
836
  pose: null,
837
837
  segmentation: null
838
838
  };
839
- stats = { ...di };
840
- activity = structuredClone(mi);
839
+ stats = { ...pi };
840
+ activity = structuredClone(gi);
841
841
  // analysedFrame rehydration: the received per-sink bitmap is drawn into a
842
842
  // local OffscreenCanvas (lazy-allocated, resized on dimension change,
843
843
  // retained across results) and CLOSED — same scratch-canvas pattern the
@@ -885,7 +885,7 @@ class Uc {
885
885
  * set; `meaningful` is the host's result-non-empty signal.
886
886
  */
887
887
  getCVActivity() {
888
- const e = new Set([...this.desired].map((s) => Fc[s])), n = (s) => ({
888
+ const e = new Set([...this.desired].map((s) => Uc[s])), n = (s) => ({
889
889
  active: e.has(s) && this.activity[s].active,
890
890
  meaningful: this.activity[s].meaningful
891
891
  });
@@ -918,7 +918,7 @@ class Uc {
918
918
  }
919
919
  /** Full clear (video disconnect / teardown): results, stats, analysed frame. */
920
920
  clearResults() {
921
- this.results.faces = [], this.results.hands = [], this.results.pose = null, this.results.segmentation = null, this.stats = { ...di }, this.activity = structuredClone(mi), this.analysedFrameValid && this.analysedCtx && this.analysedCanvas && this.analysedCtx.clearRect(0, 0, this.analysedCanvas.width, this.analysedCanvas.height), this.analysedFrameValid = !1, this.analysedFrameData = null, this.analysedFrameDataDirty = !1;
921
+ this.results.faces = [], this.results.hands = [], this.results.pose = null, this.results.segmentation = null, this.stats = { ...pi }, this.activity = structuredClone(gi), this.analysedFrameValid && this.analysedCtx && this.analysedCanvas && this.analysedCtx.clearRect(0, 0, this.analysedCanvas.width, this.analysedCanvas.height), this.analysedFrameValid = !1, this.analysedFrameData = null, this.analysedFrameDataDirty = !1;
922
922
  }
923
923
  // ── Control interface (spread into the stable cv surface) ───────────────
924
924
  /**
@@ -1063,7 +1063,7 @@ class pn {
1063
1063
  // the very first instant the scene runs.
1064
1064
  cvSurface;
1065
1065
  constructor() {
1066
- this.cvSurfaceState = new Uc();
1066
+ this.cvSurfaceState = new Nc();
1067
1067
  const e = this, n = this.cvSurfaceState.getControlInterface();
1068
1068
  this.cvSurface = {
1069
1069
  analysedFrame: null,
@@ -1344,11 +1344,11 @@ class pn {
1344
1344
  this.directGPUMode ? (this.videoState.currentFrame instanceof ImageBitmap && this.videoState.currentFrame.close(), this.videoState.currentFrame = e.imageBitmap, this.videoState.frameWidth = e.imageBitmap.width, this.videoState.frameHeight = e.imageBitmap.height, this.videoState.isConnected = !0) : ((!this.offscreenCanvas || !this.ctx) && (this.debugLog("[Compositor] Initializing canvas for direct frames"), this.offscreenCanvas = new OffscreenCanvas(e.imageBitmap.width, e.imageBitmap.height), this.ctx = this.offscreenCanvas.getContext("2d", { willReadFrequently: !0 })), (this.offscreenCanvas.width !== e.imageBitmap.width || this.offscreenCanvas.height !== e.imageBitmap.height) && (this.offscreenCanvas.width = e.imageBitmap.width, this.offscreenCanvas.height = e.imageBitmap.height), this.ctx.drawImage(e.imageBitmap, 0, 0), this.videoState.currentFrame = this.offscreenCanvas, this.videoState.frameWidth = e.imageBitmap.width, this.videoState.frameHeight = e.imageBitmap.height, this.videoState.isConnected = !0, this.frameDataDirty = !0, this.processCurrentFrame(e.timestamp), e.imageBitmap.close());
1345
1345
  }
1346
1346
  }
1347
- const Nc = 0, Mc = 100, Bc = 200, Oc = 1, pi = 100;
1347
+ const Mc = 0, Bc = 100, Oc = 200, $c = 1, bi = 100;
1348
1348
  function Xt(t) {
1349
- return t === Nc ? "main" : t < Mc ? "additional" : t < Bc ? "device" : "directFrame";
1349
+ return t === Mc ? "main" : t < Bc ? "additional" : t < Oc ? "device" : "directFrame";
1350
1350
  }
1351
- const gi = [
1351
+ const _i = [
1352
1352
  "faceDetection",
1353
1353
  "faceMesh",
1354
1354
  "emotion",
@@ -1379,7 +1379,7 @@ function Gs() {
1379
1379
  }
1380
1380
  };
1381
1381
  }
1382
- class $c {
1382
+ class jc {
1383
1383
  enabled = !1;
1384
1384
  usageMask = {
1385
1385
  mouse: { position: !1, left: !1, right: !1, middle: !1 },
@@ -1446,8 +1446,8 @@ class $c {
1446
1446
  return this.frames = [], this.counts = Gs(), {
1447
1447
  frames: e,
1448
1448
  timing: {
1449
- cpuMs: bi(e, (s) => s.cpuMs),
1450
- frameIntervalMs: bi(e, (s) => s.frameIntervalMs)
1449
+ cpuMs: yi(e, (s) => s.cpuMs),
1450
+ frameIntervalMs: yi(e, (s) => s.frameIntervalMs)
1451
1451
  },
1452
1452
  capabilities: n
1453
1453
  };
@@ -1455,7 +1455,7 @@ class $c {
1455
1455
  tally(e) {
1456
1456
  const n = this.counts;
1457
1457
  Ke(n.audio, e.audio), Ke(n.video, e.video), Ke(n.mouse, e.mouse), Ke(n.keyboard, e.keyboard), Ke(n.pointer, e.pointer), Ke(n.touch, e.touch), Ke(n.sensors, e.sensors), Ke(n.devices, e.devices);
1458
- for (const s of gi)
1458
+ for (const s of _i)
1459
1459
  Ke(n.cv[s].active, e.cv[s].active), Ke(n.cv[s].meaningful, e.cv[s].meaningful);
1460
1460
  }
1461
1461
  emitEdges(e, n, s) {
@@ -1472,7 +1472,7 @@ class $c {
1472
1472
  ];
1473
1473
  for (const [c, u, h] of o)
1474
1474
  u !== h && this.onTransition({ capability: c, active: u, frameIndex: n, timestamp: s });
1475
- for (const c of gi) {
1475
+ for (const c of _i) {
1476
1476
  const u = e.cv[c].active, h = i ? i.cv[c].active : !1;
1477
1477
  u !== h && this.onTransition({ capability: "cv", cvType: c, level: "active", active: u, frameIndex: n, timestamp: s });
1478
1478
  const f = e.cv[c].meaningful, m = i ? i.cv[c].meaningful : !1;
@@ -1483,7 +1483,7 @@ class $c {
1483
1483
  function Ke(t, e) {
1484
1484
  e ? t.trueCount++ : t.falseCount++;
1485
1485
  }
1486
- function bi(t, e) {
1486
+ function yi(t, e) {
1487
1487
  let n = 1 / 0, s = -1 / 0, i = 0;
1488
1488
  for (const o of t) {
1489
1489
  const c = e(o);
@@ -1491,7 +1491,7 @@ function bi(t, e) {
1491
1491
  }
1492
1492
  return { min: n, avg: i / t.length, max: s };
1493
1493
  }
1494
- class jc {
1494
+ class Vc {
1495
1495
  constructor(e, n, s) {
1496
1496
  this.offscreenCanvas = e, this.setupFn = s.setup || null, this.renderFn = s.render, this.p5CanvasMode = s.canvasMode === "webgl" ? "webgl" : "2d", this.installMinimalShims();
1497
1497
  }
@@ -1767,14 +1767,19 @@ class jc {
1767
1767
  * Called by Viji's render loop
1768
1768
  * @param vijiAPI The Viji API object passed to artist code
1769
1769
  * @param parameterObjects Map of parameter objects from ParameterSystem
1770
+ * @returns Whether the artist's render function was dispatched this call:
1771
+ * `false` while p5's internal setup is still pending (the not-ready early
1772
+ * return), `true` after `renderFn` ran. The runtime's render loop uses this
1773
+ * as the P5 arm of its frame-painted predicate.
1770
1774
  */
1771
1775
  tick(e, n) {
1772
- if (!(!this.p5Instance || !this.p5InternalSetupComplete))
1773
- try {
1774
- this.addP5PropertyToImageParameters(n), this.wrapVideoFramesForP5(e), !this.artistSetupComplete && this.setupFn && (this.setupFn(e, this.p5Instance), this.artistSetupComplete = !0), this.p5Instance._setProperty && this.p5Instance._setProperty("frameCount", this.p5Instance.frameCount + 1), this.renderFn && this.renderFn(e, this.p5Instance);
1775
- } catch (s) {
1776
- throw console.error("P5 render error:", s), s;
1777
- }
1776
+ if (!this.p5Instance || !this.p5InternalSetupComplete)
1777
+ return !1;
1778
+ try {
1779
+ return this.addP5PropertyToImageParameters(n), this.wrapVideoFramesForP5(e), !this.artistSetupComplete && this.setupFn && (this.setupFn(e, this.p5Instance), this.artistSetupComplete = !0), this.p5Instance._setProperty && this.p5Instance._setProperty("frameCount", this.p5Instance.frameCount + 1), this.renderFn ? (this.renderFn(e, this.p5Instance), !0) : !1;
1780
+ } catch (s) {
1781
+ throw console.error("P5 render error:", s), s;
1782
+ }
1778
1783
  }
1779
1784
  /**
1780
1785
  * Handle canvas resize
@@ -1805,7 +1810,7 @@ class jc {
1805
1810
  this.setupFn = null, this.renderFn = null, this.p5InternalSetupComplete = !1, this.artistSetupComplete = !1;
1806
1811
  }
1807
1812
  }
1808
- const cr = [
1813
+ const ur = [
1809
1814
  "faceDetection",
1810
1815
  "faceMesh",
1811
1816
  "emotionDetection",
@@ -1813,7 +1818,7 @@ const cr = [
1813
1818
  "poseDetection",
1814
1819
  "bodySegmentation"
1815
1820
  ];
1816
- class _i {
1821
+ class ki {
1817
1822
  /**
1818
1823
  * Parse all parameter declarations from shader code
1819
1824
  */
@@ -1913,7 +1918,7 @@ class _i {
1913
1918
  if (e.config.default === void 0)
1914
1919
  throw new Error(`Parameter ${e.uniformName} of type 'color' missing required 'default' key`);
1915
1920
  try {
1916
- e.config.default = ar(e.config.default);
1921
+ e.config.default = cr(e.config.default);
1917
1922
  } catch (n) {
1918
1923
  throw new Error(
1919
1924
  `Parameter ${e.uniformName} of type 'color' has invalid default: ${n.message}`
@@ -1950,9 +1955,9 @@ class _i {
1950
1955
  throw new Error(`Accumulator '${e.uniformName}' rate must be a parameter name or numeric constant`);
1951
1956
  break;
1952
1957
  case "cv": {
1953
- if (!cr.includes(e.uniformName))
1958
+ if (!ur.includes(e.uniformName))
1954
1959
  throw new Error(
1955
- `Unknown CV feature '${e.uniformName}'. Expected one of: ${cr.join(", ")}`
1960
+ `Unknown CV feature '${e.uniformName}'. Expected one of: ${ur.join(", ")}`
1956
1961
  );
1957
1962
  if (Object.keys(e.config).length > 0) {
1958
1963
  if (e.config.label === void 0)
@@ -2021,7 +2026,7 @@ class _i {
2021
2026
  }
2022
2027
  }
2023
2028
  }
2024
- function Vc(t) {
2029
+ function qc(t) {
2025
2030
  const e = t.match(/^\s*ERROR:\s*0:(\d+)/m);
2026
2031
  if (!e) return null;
2027
2032
  const n = parseInt(e[1], 10);
@@ -2112,7 +2117,7 @@ class Fe {
2112
2117
  */
2113
2118
  async init() {
2114
2119
  try {
2115
- this.parameters = _i.parseParameters(this.shaderCode);
2120
+ this.parameters = ki.parseParameters(this.shaderCode);
2116
2121
  for (const s of this.parameters)
2117
2122
  s.type === "accumulator" && this.accumulatorValues.set(s.uniformName, s.config.default ?? 0);
2118
2123
  for (const s of this.parameters) {
@@ -2182,7 +2187,7 @@ class Fe {
2182
2187
  break;
2183
2188
  }
2184
2189
  }
2185
- const o = this.findInjectionPoint(s), c = this.getBuiltInUniforms(), u = this.parameters.map((T) => _i.generateUniformDeclaration(T)).join(`
2190
+ const o = this.findInjectionPoint(s), c = this.getBuiltInUniforms(), u = this.parameters.map((T) => ki.generateUniformDeclaration(T)).join(`
2186
2191
  `), h = e.includes("fwidth");
2187
2192
  h && this.glslVersion === "glsl100" && (this.gl.getExtension("OES_standard_derivatives") || console.warn("Shader uses fwidth() but OES_standard_derivatives extension is not supported. Shader may not compile."));
2188
2193
  const f = [];
@@ -2686,7 +2691,7 @@ ${this.backbufferEnabled ? "uniform sampler2D backbuffer; // Previous frame text
2686
2691
  ${c}`);
2687
2692
  if (e === i.FRAGMENT_SHADER) {
2688
2693
  h.__isShaderCompileError = !0;
2689
- const f = Vc(c || "");
2694
+ const f = qc(c || "");
2690
2695
  if (f !== null) {
2691
2696
  const m = f - s;
2692
2697
  m >= 1 && (h.__sourceLocation = { line: m });
@@ -2735,14 +2740,19 @@ ${c}`);
2735
2740
  this.backbufferFramebuffer = o.framebuffer, this.backbufferTexture = o.texture, this.currentFramebuffer = c.framebuffer, this.currentTexture = c.texture, e.bindFramebuffer(e.FRAMEBUFFER, null), e.bindTexture(e.TEXTURE_2D, null);
2736
2741
  }
2737
2742
  /**
2738
- * Main render method
2743
+ * Main render method.
2744
+ *
2745
+ * Returns whether a frame was actually drawn this call: `false` while the
2746
+ * program is still compiling (the not-initialized early return), `true`
2747
+ * once the fullscreen-quad draw has been issued. The runtime's render loop
2748
+ * uses this as the shader arm of its frame-painted predicate — the GL
2749
+ * context alone is not a readiness signal here, since the constructor
2750
+ * acquires it before the async compile completes.
2739
2751
  */
2740
2752
  render(e, n) {
2741
2753
  const s = this.gl;
2742
- if (!this.program || !this.quadBuffer) {
2743
- console.warn("Shader not initialized");
2744
- return;
2745
- }
2754
+ if (!this.program || !this.quadBuffer)
2755
+ return console.warn("Shader not initialized"), !1;
2746
2756
  if (s.useProgram(this.program), this.syncCvVisibility(e, n), this.updateBuiltInUniforms(e), this.updateAccumulators(e, n), this.updateParameterUniforms(n), this.backbufferEnabled && this.backbufferTexture) {
2747
2757
  const o = this.textureUnits.get("backbuffer");
2748
2758
  o !== void 0 && (s.activeTexture(s.TEXTURE0 + o), s.bindTexture(s.TEXTURE_2D, this.backbufferTexture), this.setUniform("backbuffer", "sampler2D", o)), s.bindFramebuffer(s.FRAMEBUFFER, this.currentFramebuffer);
@@ -2753,6 +2763,7 @@ ${c}`);
2753
2763
  const o = this.backbufferFramebuffer, c = this.backbufferTexture;
2754
2764
  this.backbufferFramebuffer = this.currentFramebuffer, this.backbufferTexture = this.currentTexture, this.currentFramebuffer = o, this.currentTexture = c;
2755
2765
  }
2766
+ return !0;
2756
2767
  }
2757
2768
  /**
2758
2769
  * Reconcile `// @viji-cv:` directive intent with `viji.video.cv` pipeline
@@ -2796,7 +2807,7 @@ ${c}`);
2796
2807
  }
2797
2808
  this.dispatchCvEnable(s, o, u, c);
2798
2809
  }
2799
- for (const o of cr)
2810
+ for (const o of ur)
2800
2811
  this.cvDirectives.has(o) || (i.includes(o) ? this.visibleFeatures.add(o) : this.visibleFeatures.delete(o));
2801
2812
  }
2802
2813
  /**
@@ -2989,7 +3000,7 @@ ${c}`);
2989
3000
  break;
2990
3001
  case "color": {
2991
3002
  const o = i;
2992
- this.colorVec3CacheKey.get(n.uniformName) !== o && (this.colorVec3Cache.set(n.uniformName, wc(o)), this.colorVec3CacheKey.set(n.uniformName, o)), this.setUniform(n.uniformName, "vec3", this.colorVec3Cache.get(n.uniformName));
3003
+ this.colorVec3CacheKey.get(n.uniformName) !== o && (this.colorVec3Cache.set(n.uniformName, xc(o)), this.colorVec3CacheKey.set(n.uniformName, o)), this.setUniform(n.uniformName, "vec3", this.colorVec3Cache.get(n.uniformName));
2993
3004
  break;
2994
3005
  }
2995
3006
  case "toggle":
@@ -3297,7 +3308,7 @@ ${c}`);
3297
3308
  this.textures.clear(), this.backbufferFramebuffer && e.deleteFramebuffer(this.backbufferFramebuffer), this.backbufferTexture && e.deleteTexture(this.backbufferTexture), this.currentFramebuffer && e.deleteFramebuffer(this.currentFramebuffer), this.currentTexture && e.deleteTexture(this.currentTexture), this.quadBuffer && e.deleteBuffer(this.quadBuffer);
3298
3309
  }
3299
3310
  }
3300
- function ho(t) {
3311
+ function mo(t) {
3301
3312
  return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array" && "BYTES_PER_ELEMENT" in t && t.BYTES_PER_ELEMENT === 1;
3302
3313
  }
3303
3314
  function St(t, e = "") {
@@ -3311,14 +3322,14 @@ function St(t, e = "") {
3311
3322
  }
3312
3323
  }
3313
3324
  function Ct(t, e, n = "") {
3314
- const s = ho(t), i = t?.length, o = e !== void 0;
3325
+ const s = mo(t), i = t?.length, o = e !== void 0;
3315
3326
  if (!s || o && i !== e) {
3316
3327
  const c = n && `"${n}" `, u = o ? ` of length ${e}` : "", h = s ? `length=${i}` : `type=${typeof t}`, f = c + "expected Uint8Array" + u + ", got " + h;
3317
3328
  throw s ? new RangeError(f) : new TypeError(f);
3318
3329
  }
3319
3330
  return t;
3320
3331
  }
3321
- function mo(t) {
3332
+ function po(t) {
3322
3333
  if (typeof t != "function" || typeof t.create != "function")
3323
3334
  throw new TypeError("Hash must wrapped by utils.createHasher");
3324
3335
  if (St(t.outputLen), St(t.blockLen), t.outputLen < 1)
@@ -3332,7 +3343,7 @@ function Tn(t, e = !0) {
3332
3343
  if (e && t.finished)
3333
3344
  throw new Error("Hash#digest() has already been called");
3334
3345
  }
3335
- function po(t, e) {
3346
+ function go(t, e) {
3336
3347
  Ct(t, void 0, "digestInto() output");
3337
3348
  const n = e.outputLen;
3338
3349
  if (t.length < n)
@@ -3348,17 +3359,17 @@ function Ys(t) {
3348
3359
  function Ze(t, e) {
3349
3360
  return t << 32 - e | t >>> e;
3350
3361
  }
3351
- const go = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", qc = /* @__PURE__ */ Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
3352
- function Sr(t) {
3353
- if (Ct(t), go)
3362
+ const bo = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", Hc = /* @__PURE__ */ Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
3363
+ function Tr(t) {
3364
+ if (Ct(t), bo)
3354
3365
  return t.toHex();
3355
3366
  let e = "";
3356
3367
  for (let n = 0; n < t.length; n++)
3357
- e += qc[t[n]];
3368
+ e += Hc[t[n]];
3358
3369
  return e;
3359
3370
  }
3360
3371
  const rt = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
3361
- function yi(t) {
3372
+ function vi(t) {
3362
3373
  if (t >= rt._0 && t <= rt._9)
3363
3374
  return t - rt._0;
3364
3375
  if (t >= rt.A && t <= rt.F)
@@ -3366,10 +3377,10 @@ function yi(t) {
3366
3377
  if (t >= rt.a && t <= rt.f)
3367
3378
  return t - (rt.a - 10);
3368
3379
  }
3369
- function bo(t) {
3380
+ function _o(t) {
3370
3381
  if (typeof t != "string")
3371
3382
  throw new TypeError("hex string expected, got " + typeof t);
3372
- if (go)
3383
+ if (bo)
3373
3384
  try {
3374
3385
  return Uint8Array.fromHex(t);
3375
3386
  } catch (i) {
@@ -3380,7 +3391,7 @@ function bo(t) {
3380
3391
  throw new RangeError("hex string expected, got unpadded hex of length " + e);
3381
3392
  const s = new Uint8Array(n);
3382
3393
  for (let i = 0, o = 0; i < n; i++, o += 2) {
3383
- const c = yi(t.charCodeAt(o)), u = yi(t.charCodeAt(o + 1));
3394
+ const c = vi(t.charCodeAt(o)), u = vi(t.charCodeAt(o + 1));
3384
3395
  if (c === void 0 || u === void 0) {
3385
3396
  const h = t[o] + t[o + 1];
3386
3397
  throw new RangeError('hex string expected, got non-hex character "' + h + '" at index ' + o);
@@ -3389,7 +3400,7 @@ function bo(t) {
3389
3400
  }
3390
3401
  return s;
3391
3402
  }
3392
- function Hc(...t) {
3403
+ function Xc(...t) {
3393
3404
  let e = 0;
3394
3405
  for (let s = 0; s < t.length; s++) {
3395
3406
  const i = t[s];
@@ -3402,11 +3413,11 @@ function Hc(...t) {
3402
3413
  }
3403
3414
  return n;
3404
3415
  }
3405
- function Xc(t, e = {}) {
3416
+ function Wc(t, e = {}) {
3406
3417
  const n = (i, o) => t(o).update(i).digest(), s = t(void 0);
3407
3418
  return n.outputLen = s.outputLen, n.blockLen = s.blockLen, n.canXOF = s.canXOF, n.create = (i) => t(i), Object.assign(n, e), Object.freeze(n);
3408
3419
  }
3409
- function Wc(t = 32) {
3420
+ function Gc(t = 32) {
3410
3421
  St(t, "bytesLength");
3411
3422
  const e = typeof globalThis == "object" ? globalThis.crypto : null;
3412
3423
  if (typeof e?.getRandomValues != "function")
@@ -3415,18 +3426,18 @@ function Wc(t = 32) {
3415
3426
  throw new RangeError(`"bytesLength" expected <= 65536, got ${t}`);
3416
3427
  return e.getRandomValues(new Uint8Array(t));
3417
3428
  }
3418
- const Gc = (t) => ({
3429
+ const Yc = (t) => ({
3419
3430
  // Current NIST hashAlgs suffixes used here fit in one DER subidentifier octet.
3420
3431
  // Larger suffix values would need base-128 OID encoding and a different length byte.
3421
3432
  oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, t])
3422
3433
  });
3423
- function Yc(t, e, n) {
3434
+ function zc(t, e, n) {
3424
3435
  return t & e ^ ~t & n;
3425
3436
  }
3426
- function zc(t, e, n) {
3437
+ function Kc(t, e, n) {
3427
3438
  return t & e ^ t & n ^ e & n;
3428
3439
  }
3429
- class Kc {
3440
+ class Zc {
3430
3441
  blockLen;
3431
3442
  outputLen;
3432
3443
  canXOF = !1;
@@ -3458,7 +3469,7 @@ class Kc {
3458
3469
  return this.length += e.length, this.roundClean(), this;
3459
3470
  }
3460
3471
  digestInto(e) {
3461
- Tn(this), po(e, this), this.finished = !0;
3472
+ Tn(this), go(e, this), this.finished = !0;
3462
3473
  const { buffer: n, view: s, blockLen: i, isLE: o } = this;
3463
3474
  let { pos: c } = this;
3464
3475
  n[c++] = 128, In(this.buffer.subarray(c)), this.padOffset > i - c && (this.process(s, 0), c = 0);
@@ -3498,7 +3509,7 @@ const ct = /* @__PURE__ */ Uint32Array.from([
3498
3509
  2600822924,
3499
3510
  528734635,
3500
3511
  1541459225
3501
- ]), Zc = /* @__PURE__ */ Uint32Array.from([
3512
+ ]), Jc = /* @__PURE__ */ Uint32Array.from([
3502
3513
  1116352408,
3503
3514
  1899447441,
3504
3515
  3049323471,
@@ -3564,7 +3575,7 @@ const ct = /* @__PURE__ */ Uint32Array.from([
3564
3575
  3204031479,
3565
3576
  3329325298
3566
3577
  ]), ut = /* @__PURE__ */ new Uint32Array(64);
3567
- class Jc extends Kc {
3578
+ class Qc extends Zc {
3568
3579
  constructor(e) {
3569
3580
  super(64, e, 8, !1);
3570
3581
  }
@@ -3585,7 +3596,7 @@ class Jc extends Kc {
3585
3596
  }
3586
3597
  let { A: s, B: i, C: o, D: c, E: u, F: h, G: f, H: m } = this;
3587
3598
  for (let g = 0; g < 64; g++) {
3588
- const x = Ze(u, 6) ^ Ze(u, 11) ^ Ze(u, 25), T = m + x + Yc(u, h, f) + Zc[g] + ut[g] | 0, N = (Ze(s, 2) ^ Ze(s, 13) ^ Ze(s, 22)) + zc(s, i, o) | 0;
3599
+ const x = Ze(u, 6) ^ Ze(u, 11) ^ Ze(u, 25), T = m + x + zc(u, h, f) + Jc[g] + ut[g] | 0, N = (Ze(s, 2) ^ Ze(s, 13) ^ Ze(s, 22)) + Kc(s, i, o) | 0;
3589
3600
  m = f, f = h, h = u, u = c + T | 0, c = o, o = i, i = s, s = T + N | 0;
3590
3601
  }
3591
3602
  s = s + this.A | 0, i = i + this.B | 0, o = o + this.C | 0, c = c + this.D | 0, u = u + this.E | 0, h = h + this.F | 0, f = f + this.G | 0, m = m + this.H | 0, this.set(s, i, o, c, u, h, f, m);
@@ -3597,7 +3608,7 @@ class Jc extends Kc {
3597
3608
  this.destroyed = !0, this.set(0, 0, 0, 0, 0, 0, 0, 0), In(this.buffer);
3598
3609
  }
3599
3610
  }
3600
- class Qc extends Jc {
3611
+ class e1 extends Qc {
3601
3612
  // We cannot use array here since array allows indexing by variable
3602
3613
  // which means optimizer/compiler cannot use registers.
3603
3614
  A = ct[0] | 0;
@@ -3612,12 +3623,12 @@ class Qc extends Jc {
3612
3623
  super(32);
3613
3624
  }
3614
3625
  }
3615
- const e1 = /* @__PURE__ */ Xc(
3616
- () => new Qc(),
3617
- /* @__PURE__ */ Gc(1)
3626
+ const t1 = /* @__PURE__ */ Wc(
3627
+ () => new e1(),
3628
+ /* @__PURE__ */ Yc(1)
3618
3629
  );
3619
3630
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
3620
- const Ce = (t, e, n) => Ct(t, e, n), _o = St, yo = Sr, ft = (...t) => Hc(...t), ur = (t) => bo(t), ko = ho, vo = (t) => Wc(t), An = /* @__PURE__ */ BigInt(0), lr = /* @__PURE__ */ BigInt(1);
3631
+ const Ce = (t, e, n) => Ct(t, e, n), yo = St, ko = Tr, ft = (...t) => Xc(...t), lr = (t) => _o(t), vo = mo, wo = (t) => Gc(t), An = /* @__PURE__ */ BigInt(0), fr = /* @__PURE__ */ BigInt(1);
3621
3632
  function Qt(t, e = "") {
3622
3633
  if (typeof t != "boolean") {
3623
3634
  const n = e && `"${e}" `;
@@ -3625,15 +3636,15 @@ function Qt(t, e = "") {
3625
3636
  }
3626
3637
  return t;
3627
3638
  }
3628
- function Tr(t) {
3639
+ function Ir(t) {
3629
3640
  if (typeof t == "bigint") {
3630
3641
  if (!kn(t))
3631
3642
  throw new RangeError("positive bigint expected, got " + t);
3632
3643
  } else
3633
- _o(t);
3644
+ yo(t);
3634
3645
  return t;
3635
3646
  }
3636
- function fr(t, e = "") {
3647
+ function hr(t, e = "") {
3637
3648
  if (typeof t != "number") {
3638
3649
  const n = e && `"${e}" `;
3639
3650
  throw new TypeError(n + "expected number, got type=" + typeof t);
@@ -3644,53 +3655,53 @@ function fr(t, e = "") {
3644
3655
  }
3645
3656
  }
3646
3657
  function gn(t) {
3647
- const e = Tr(t).toString(16);
3658
+ const e = Ir(t).toString(16);
3648
3659
  return e.length & 1 ? "0" + e : e;
3649
3660
  }
3650
- function wo(t) {
3661
+ function xo(t) {
3651
3662
  if (typeof t != "string")
3652
3663
  throw new TypeError("hex string expected, got " + typeof t);
3653
3664
  return t === "" ? An : BigInt("0x" + t);
3654
3665
  }
3655
3666
  function Vn(t) {
3656
- return wo(Sr(t));
3667
+ return xo(Tr(t));
3657
3668
  }
3658
- function xo(t) {
3659
- return wo(Sr(t1(Ct(t)).reverse()));
3669
+ function Eo(t) {
3670
+ return xo(Tr(n1(Ct(t)).reverse()));
3660
3671
  }
3661
- function Ir(t, e) {
3672
+ function Ar(t, e) {
3662
3673
  if (St(e), e === 0)
3663
3674
  throw new RangeError("zero length");
3664
- t = Tr(t);
3675
+ t = Ir(t);
3665
3676
  const n = t.toString(16);
3666
3677
  if (n.length > e * 2)
3667
3678
  throw new RangeError("number too large");
3668
- return bo(n.padStart(e * 2, "0"));
3679
+ return _o(n.padStart(e * 2, "0"));
3669
3680
  }
3670
- function Eo(t, e) {
3671
- return Ir(t, e).reverse();
3681
+ function So(t, e) {
3682
+ return Ar(t, e).reverse();
3672
3683
  }
3673
- function t1(t) {
3684
+ function n1(t) {
3674
3685
  return Uint8Array.from(Ce(t));
3675
3686
  }
3676
3687
  const kn = (t) => typeof t == "bigint" && An <= t;
3677
- function n1(t, e, n) {
3688
+ function s1(t, e, n) {
3678
3689
  return kn(t) && kn(e) && kn(n) && e <= t && t < n;
3679
3690
  }
3680
- function So(t, e, n, s) {
3681
- if (!n1(e, n, s))
3691
+ function To(t, e, n, s) {
3692
+ if (!s1(e, n, s))
3682
3693
  throw new RangeError("expected valid " + t + ": " + n + " <= n < " + s + ", got " + e);
3683
3694
  }
3684
- function Ar(t) {
3695
+ function Rr(t) {
3685
3696
  if (t < An)
3686
3697
  throw new Error("expected non-negative bigint, got " + t);
3687
3698
  let e;
3688
- for (e = 0; t > An; t >>= lr, e += 1)
3699
+ for (e = 0; t > An; t >>= fr, e += 1)
3689
3700
  ;
3690
3701
  return e;
3691
3702
  }
3692
- const Rr = (t) => (lr << BigInt(t)) - lr;
3693
- function s1(t, e, n) {
3703
+ const Cr = (t) => (fr << BigInt(t)) - fr;
3704
+ function r1(t, e, n) {
3694
3705
  if (St(t, "hashLen"), St(e, "qByteLen"), typeof n != "function")
3695
3706
  throw new TypeError("hmacFn must be a function");
3696
3707
  const s = (q) => new Uint8Array(q), i = Uint8Array.of(), o = Uint8Array.of(0), c = Uint8Array.of(1), u = 1e3;
@@ -3736,14 +3747,14 @@ function qn(t, e = {}, n = {}) {
3736
3747
  i(e, !1), i(n, !0);
3737
3748
  }
3738
3749
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
3739
- const Ne = /* @__PURE__ */ BigInt(0), Ee = /* @__PURE__ */ BigInt(1), vt = /* @__PURE__ */ BigInt(2), To = /* @__PURE__ */ BigInt(3), Io = /* @__PURE__ */ BigInt(4), Ao = /* @__PURE__ */ BigInt(5), r1 = /* @__PURE__ */ BigInt(7), Ro = /* @__PURE__ */ BigInt(8), i1 = /* @__PURE__ */ BigInt(9), Co = /* @__PURE__ */ BigInt(16);
3750
+ const Ne = /* @__PURE__ */ BigInt(0), Ee = /* @__PURE__ */ BigInt(1), vt = /* @__PURE__ */ BigInt(2), Io = /* @__PURE__ */ BigInt(3), Ao = /* @__PURE__ */ BigInt(4), Ro = /* @__PURE__ */ BigInt(5), i1 = /* @__PURE__ */ BigInt(7), Co = /* @__PURE__ */ BigInt(8), o1 = /* @__PURE__ */ BigInt(9), Po = /* @__PURE__ */ BigInt(16);
3740
3751
  function qe(t, e) {
3741
3752
  if (e <= Ne)
3742
3753
  throw new Error("mod: expected positive modulus, got " + e);
3743
3754
  const n = t % e;
3744
3755
  return n >= Ne ? n : e + n;
3745
3756
  }
3746
- function ki(t, e) {
3757
+ function wi(t, e) {
3747
3758
  if (t === Ne)
3748
3759
  throw new Error("invert: expected non-zero number");
3749
3760
  if (e <= Ne)
@@ -3757,50 +3768,50 @@ function ki(t, e) {
3757
3768
  throw new Error("invert: does not exist");
3758
3769
  return qe(i, e);
3759
3770
  }
3760
- function Cr(t, e, n) {
3771
+ function Pr(t, e, n) {
3761
3772
  const s = t;
3762
3773
  if (!s.eql(s.sqr(e), n))
3763
3774
  throw new Error("Cannot find square root");
3764
3775
  }
3765
- function Po(t, e) {
3766
- const n = t, s = (n.ORDER + Ee) / Io, i = n.pow(e, s);
3767
- return Cr(n, i, e), i;
3776
+ function Do(t, e) {
3777
+ const n = t, s = (n.ORDER + Ee) / Ao, i = n.pow(e, s);
3778
+ return Pr(n, i, e), i;
3768
3779
  }
3769
- function o1(t, e) {
3770
- const n = t, s = (n.ORDER - Ao) / Ro, i = n.mul(e, vt), o = n.pow(i, s), c = n.mul(e, o), u = n.mul(n.mul(c, vt), o), h = n.mul(c, n.sub(u, n.ONE));
3771
- return Cr(n, h, e), h;
3780
+ function a1(t, e) {
3781
+ const n = t, s = (n.ORDER - Ro) / Co, i = n.mul(e, vt), o = n.pow(i, s), c = n.mul(e, o), u = n.mul(n.mul(c, vt), o), h = n.mul(c, n.sub(u, n.ONE));
3782
+ return Pr(n, h, e), h;
3772
3783
  }
3773
- function a1(t) {
3774
- const e = Pr(t), n = Do(t), s = n(e, e.neg(e.ONE)), i = n(e, s), o = n(e, e.neg(s)), c = (t + r1) / Co;
3784
+ function c1(t) {
3785
+ const e = Dr(t), n = Lo(t), s = n(e, e.neg(e.ONE)), i = n(e, s), o = n(e, e.neg(s)), c = (t + i1) / Po;
3775
3786
  return (u, h) => {
3776
3787
  const f = u;
3777
3788
  let m = f.pow(h, c), g = f.mul(m, s);
3778
3789
  const x = f.mul(m, i), T = f.mul(m, o), L = f.eql(f.sqr(g), h), N = f.eql(f.sqr(x), h);
3779
3790
  m = f.cmov(m, g, L), g = f.cmov(T, x, N);
3780
3791
  const q = f.eql(f.sqr(g), h), K = f.cmov(m, g, q);
3781
- return Cr(f, K, h), K;
3792
+ return Pr(f, K, h), K;
3782
3793
  };
3783
3794
  }
3784
- function Do(t) {
3785
- if (t < To)
3795
+ function Lo(t) {
3796
+ if (t < Io)
3786
3797
  throw new Error("sqrt is not defined for small field");
3787
3798
  let e = t - Ee, n = 0;
3788
3799
  for (; e % vt === Ne; )
3789
3800
  e /= vt, n++;
3790
3801
  let s = vt;
3791
- const i = Pr(t);
3792
- for (; vi(i, s) === 1; )
3802
+ const i = Dr(t);
3803
+ for (; xi(i, s) === 1; )
3793
3804
  if (s++ > 1e3)
3794
3805
  throw new Error("Cannot find square root: probably non-prime P");
3795
3806
  if (n === 1)
3796
- return Po;
3807
+ return Do;
3797
3808
  let o = i.pow(s, e);
3798
3809
  const c = (e + Ee) / vt;
3799
3810
  return function(h, f) {
3800
3811
  const m = h;
3801
3812
  if (m.is0(f))
3802
3813
  return f;
3803
- if (vi(m, f) !== 1)
3814
+ if (xi(m, f) !== 1)
3804
3815
  throw new Error("Cannot find square root");
3805
3816
  let g = n, x = m.mul(m.ONE, o), T = m.pow(f, e), L = m.pow(f, c);
3806
3817
  for (; !m.eql(T, m.ONE); ) {
@@ -3816,10 +3827,10 @@ function Do(t) {
3816
3827
  return L;
3817
3828
  };
3818
3829
  }
3819
- function c1(t) {
3820
- return t % Io === To ? Po : t % Ro === Ao ? o1 : t % Co === i1 ? a1(t) : Do(t);
3830
+ function u1(t) {
3831
+ return t % Ao === Io ? Do : t % Co === Ro ? a1 : t % Po === o1 ? c1(t) : Lo(t);
3821
3832
  }
3822
- const u1 = [
3833
+ const l1 = [
3823
3834
  "create",
3824
3835
  "isValid",
3825
3836
  "is0",
@@ -3838,19 +3849,19 @@ const u1 = [
3838
3849
  "mulN",
3839
3850
  "sqrN"
3840
3851
  ];
3841
- function l1(t) {
3852
+ function f1(t) {
3842
3853
  const e = {
3843
3854
  ORDER: "bigint",
3844
3855
  BYTES: "number",
3845
3856
  BITS: "number"
3846
- }, n = u1.reduce((s, i) => (s[i] = "function", s), e);
3847
- if (qn(t, n), fr(t.BYTES, "BYTES"), fr(t.BITS, "BITS"), t.BYTES < 1 || t.BITS < 1)
3857
+ }, n = l1.reduce((s, i) => (s[i] = "function", s), e);
3858
+ if (qn(t, n), hr(t.BYTES, "BYTES"), hr(t.BITS, "BITS"), t.BYTES < 1 || t.BITS < 1)
3848
3859
  throw new Error("invalid field: expected BYTES/BITS > 0");
3849
3860
  if (t.ORDER <= Ee)
3850
3861
  throw new Error("invalid field: expected ORDER > 1, got " + t.ORDER);
3851
3862
  return t;
3852
3863
  }
3853
- function f1(t, e, n) {
3864
+ function h1(t, e, n) {
3854
3865
  const s = t;
3855
3866
  if (n < Ne)
3856
3867
  throw new Error("invalid exponent, negatives unsupported");
@@ -3863,29 +3874,29 @@ function f1(t, e, n) {
3863
3874
  n & Ee && (i = s.mul(i, o)), o = s.sqr(o), n >>= Ee;
3864
3875
  return i;
3865
3876
  }
3866
- function Lo(t, e, n = !1) {
3877
+ function Fo(t, e, n = !1) {
3867
3878
  const s = t, i = new Array(e.length).fill(n ? s.ZERO : void 0), o = e.reduce((u, h, f) => s.is0(h) ? u : (i[f] = u, s.mul(u, h)), s.ONE), c = s.inv(o);
3868
3879
  return e.reduceRight((u, h, f) => s.is0(h) ? u : (i[f] = s.mul(u, i[f]), s.mul(u, h)), c), i;
3869
3880
  }
3870
- function vi(t, e) {
3881
+ function xi(t, e) {
3871
3882
  const n = t, s = (n.ORDER - Ee) / vt, i = n.pow(e, s), o = n.eql(i, n.ONE), c = n.eql(i, n.ZERO), u = n.eql(i, n.neg(n.ONE));
3872
3883
  if (!o && !c && !u)
3873
3884
  throw new Error("invalid Legendre symbol result");
3874
3885
  return o ? 1 : c ? 0 : -1;
3875
3886
  }
3876
- function h1(t, e) {
3877
- if (e !== void 0 && _o(e), t <= Ne)
3887
+ function d1(t, e) {
3888
+ if (e !== void 0 && yo(e), t <= Ne)
3878
3889
  throw new Error("invalid n length: expected positive n, got " + t);
3879
3890
  if (e !== void 0 && e < 1)
3880
3891
  throw new Error("invalid n length: expected positive bit length, got " + e);
3881
- const n = Ar(t);
3892
+ const n = Rr(t);
3882
3893
  if (e !== void 0 && e < n)
3883
3894
  throw new Error(`invalid n length: expected bit length (${n}) >= n.length (${e})`);
3884
3895
  const s = e !== void 0 ? e : n, i = Math.ceil(s / 8);
3885
3896
  return { nBitLength: s, nByteLength: i };
3886
3897
  }
3887
- const wi = /* @__PURE__ */ new WeakMap();
3888
- class Fo {
3898
+ const Ei = /* @__PURE__ */ new WeakMap();
3899
+ class Uo {
3889
3900
  ORDER;
3890
3901
  BITS;
3891
3902
  BYTES;
@@ -3899,7 +3910,7 @@ class Fo {
3899
3910
  throw new Error("invalid field: expected ORDER > 1, got " + e);
3900
3911
  let s;
3901
3912
  this.isLE = !1, n != null && typeof n == "object" && (typeof n.BITS == "number" && (s = n.BITS), typeof n.sqrt == "function" && Object.defineProperty(this, "sqrt", { value: n.sqrt, enumerable: !0 }), typeof n.isLE == "boolean" && (this.isLE = n.isLE), n.allowedLengths && (this._lengths = Object.freeze(n.allowedLengths.slice())), typeof n.modFromBytes == "boolean" && (this._mod = n.modFromBytes));
3902
- const { nBitLength: i, nByteLength: o } = h1(e, s);
3913
+ const { nBitLength: i, nByteLength: o } = d1(e, s);
3903
3914
  if (o > 2048)
3904
3915
  throw new Error("invalid field: expected ORDER of <= 2048 bytes");
3905
3916
  this.ORDER = e, this.BITS = i, this.BYTES = o, Object.freeze(this);
@@ -3941,10 +3952,10 @@ class Fo {
3941
3952
  return qe(e * n, this.ORDER);
3942
3953
  }
3943
3954
  pow(e, n) {
3944
- return f1(this, e, n);
3955
+ return h1(this, e, n);
3945
3956
  }
3946
3957
  div(e, n) {
3947
- return qe(e * ki(n, this.ORDER), this.ORDER);
3958
+ return qe(e * wi(n, this.ORDER), this.ORDER);
3948
3959
  }
3949
3960
  // Same as above, but doesn't normalize
3950
3961
  sqrN(e) {
@@ -3960,14 +3971,14 @@ class Fo {
3960
3971
  return e * n;
3961
3972
  }
3962
3973
  inv(e) {
3963
- return ki(e, this.ORDER);
3974
+ return wi(e, this.ORDER);
3964
3975
  }
3965
3976
  sqrt(e) {
3966
- let n = wi.get(this);
3967
- return n || wi.set(this, n = c1(this.ORDER)), n(this, e);
3977
+ let n = Ei.get(this);
3978
+ return n || Ei.set(this, n = u1(this.ORDER)), n(this, e);
3968
3979
  }
3969
3980
  toBytes(e) {
3970
- return this.isLE ? Eo(e, this.BYTES) : Ir(e, this.BYTES);
3981
+ return this.isLE ? So(e, this.BYTES) : Ar(e, this.BYTES);
3971
3982
  }
3972
3983
  fromBytes(e, n = !1) {
3973
3984
  Ce(e);
@@ -3980,14 +3991,14 @@ class Fo {
3980
3991
  }
3981
3992
  if (e.length !== i)
3982
3993
  throw new Error("Field.fromBytes: expected " + i + " bytes, got " + e.length);
3983
- let h = o ? xo(e) : Vn(e);
3994
+ let h = o ? Eo(e) : Vn(e);
3984
3995
  if (u && (h = qe(h, c)), !n && !this.isValid(h))
3985
3996
  throw new Error("invalid field element: outside of range 0..ORDER");
3986
3997
  return h;
3987
3998
  }
3988
3999
  // TODO: we don't need it here, move out to separate fn
3989
4000
  invertBatch(e) {
3990
- return Lo(this, e);
4001
+ return Fo(this, e);
3991
4002
  }
3992
4003
  // We can't move this out because Fp6, Fp12 implement it
3993
4004
  // and it's unclear what to return in there.
@@ -3995,29 +4006,29 @@ class Fo {
3995
4006
  return Qt(s, "condition"), s ? n : e;
3996
4007
  }
3997
4008
  }
3998
- Object.freeze(Fo.prototype);
3999
- function Pr(t, e = {}) {
4000
- return new Fo(t, e);
4009
+ Object.freeze(Uo.prototype);
4010
+ function Dr(t, e = {}) {
4011
+ return new Uo(t, e);
4001
4012
  }
4002
- function Uo(t) {
4013
+ function No(t) {
4003
4014
  if (typeof t != "bigint")
4004
4015
  throw new Error("field order must be bigint");
4005
4016
  if (t <= Ee)
4006
4017
  throw new Error("field order must be greater than 1");
4007
- const e = Ar(t - Ee);
4018
+ const e = Rr(t - Ee);
4008
4019
  return Math.ceil(e / 8);
4009
4020
  }
4010
- function No(t) {
4011
- const e = Uo(t);
4021
+ function Mo(t) {
4022
+ const e = No(t);
4012
4023
  return e + Math.ceil(e / 2);
4013
4024
  }
4014
- function d1(t, e, n = !1) {
4025
+ function m1(t, e, n = !1) {
4015
4026
  Ce(t);
4016
- const s = t.length, i = Uo(e), o = Math.max(No(e), 16);
4027
+ const s = t.length, i = No(e), o = Math.max(Mo(e), 16);
4017
4028
  if (s < o || s > 1024)
4018
4029
  throw new Error("expected " + o + "-1024 bytes of input, got " + s);
4019
- const c = n ? xo(t) : Vn(t), u = qe(c, e - Ee) + Ee;
4020
- return n ? Eo(u, i) : Ir(u, i);
4030
+ const c = n ? Eo(t) : Vn(t), u = qe(c, e - Ee) + Ee;
4031
+ return n ? So(u, i) : Ar(u, i);
4021
4032
  }
4022
4033
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
4023
4034
  const Ot = /* @__PURE__ */ BigInt(0), wt = /* @__PURE__ */ BigInt(1);
@@ -4025,35 +4036,35 @@ function Rn(t, e) {
4025
4036
  const n = e.negate();
4026
4037
  return t ? n : e;
4027
4038
  }
4028
- function xi(t, e) {
4029
- const n = Lo(t.Fp, e.map((s) => s.Z));
4039
+ function Si(t, e) {
4040
+ const n = Fo(t.Fp, e.map((s) => s.Z));
4030
4041
  return e.map((s, i) => t.fromAffine(s.toAffine(n[i])));
4031
4042
  }
4032
- function Mo(t, e) {
4043
+ function Bo(t, e) {
4033
4044
  if (!Number.isSafeInteger(t) || t <= 0 || t > e)
4034
4045
  throw new Error("invalid window size, expected [1.." + e + "], got W=" + t);
4035
4046
  }
4036
4047
  function zs(t, e) {
4037
- Mo(t, e);
4038
- const n = Math.ceil(e / t) + 1, s = 2 ** (t - 1), i = 2 ** t, o = Rr(t), c = BigInt(t);
4048
+ Bo(t, e);
4049
+ const n = Math.ceil(e / t) + 1, s = 2 ** (t - 1), i = 2 ** t, o = Cr(t), c = BigInt(t);
4039
4050
  return { windows: n, windowSize: s, mask: o, maxNumber: i, shiftBy: c };
4040
4051
  }
4041
- function Ei(t, e, n) {
4052
+ function Ti(t, e, n) {
4042
4053
  const { windowSize: s, mask: i, maxNumber: o, shiftBy: c } = n;
4043
4054
  let u = Number(t & i), h = t >> c;
4044
4055
  u > s && (u -= o, h += wt);
4045
4056
  const f = e * s, m = f + Math.abs(u) - 1, g = u === 0, x = u < 0, T = e % 2 !== 0;
4046
4057
  return { nextN: h, offset: m, isZero: g, isNeg: x, isNegF: T, offsetF: f };
4047
4058
  }
4048
- const Ks = /* @__PURE__ */ new WeakMap(), Bo = /* @__PURE__ */ new WeakMap();
4059
+ const Ks = /* @__PURE__ */ new WeakMap(), Oo = /* @__PURE__ */ new WeakMap();
4049
4060
  function Zs(t) {
4050
- return Bo.get(t) || 1;
4061
+ return Oo.get(t) || 1;
4051
4062
  }
4052
- function Si(t) {
4063
+ function Ii(t) {
4053
4064
  if (t !== Ot)
4054
4065
  throw new Error("invalid wNAF");
4055
4066
  }
4056
- class m1 {
4067
+ class p1 {
4057
4068
  BASE;
4058
4069
  ZERO;
4059
4070
  Fn;
@@ -4104,10 +4115,10 @@ class m1 {
4104
4115
  let i = this.ZERO, o = this.BASE;
4105
4116
  const c = zs(e, this.bits);
4106
4117
  for (let u = 0; u < c.windows; u++) {
4107
- const { nextN: h, offset: f, isZero: m, isNeg: g, isNegF: x, offsetF: T } = Ei(s, u, c);
4118
+ const { nextN: h, offset: f, isZero: m, isNeg: g, isNegF: x, offsetF: T } = Ti(s, u, c);
4108
4119
  s = h, m ? o = o.add(Rn(x, n[T])) : i = i.add(Rn(g, n[f]));
4109
4120
  }
4110
- return Si(s), { p: i, f: o };
4121
+ return Ii(s), { p: i, f: o };
4111
4122
  }
4112
4123
  /**
4113
4124
  * Implements unsafe EC multiplication using precomputed tables
@@ -4118,13 +4129,13 @@ class m1 {
4118
4129
  wNAFUnsafe(e, n, s, i = this.ZERO) {
4119
4130
  const o = zs(e, this.bits);
4120
4131
  for (let c = 0; c < o.windows && s !== Ot; c++) {
4121
- const { nextN: u, offset: h, isZero: f, isNeg: m } = Ei(s, c, o);
4132
+ const { nextN: u, offset: h, isZero: f, isNeg: m } = Ti(s, c, o);
4122
4133
  if (s = u, !f) {
4123
4134
  const g = n[h];
4124
4135
  i = i.add(m ? g.negate() : g);
4125
4136
  }
4126
4137
  }
4127
- return Si(s), i;
4138
+ return Ii(s), i;
4128
4139
  }
4129
4140
  getPrecomputes(e, n, s) {
4130
4141
  let i = Ks.get(n);
@@ -4142,27 +4153,27 @@ class m1 {
4142
4153
  // using windowed method. This specifies window size and
4143
4154
  // stores precomputed values. Usually only base point would be precomputed.
4144
4155
  createCache(e, n) {
4145
- Mo(n, this.bits), Bo.set(e, n), Ks.delete(e);
4156
+ Bo(n, this.bits), Oo.set(e, n), Ks.delete(e);
4146
4157
  }
4147
4158
  hasCache(e) {
4148
4159
  return Zs(e) !== 1;
4149
4160
  }
4150
4161
  }
4151
- function p1(t, e, n, s) {
4162
+ function g1(t, e, n, s) {
4152
4163
  let i = e, o = t.ZERO, c = t.ZERO;
4153
4164
  for (; n > Ot || s > Ot; )
4154
4165
  n & wt && (o = o.add(i)), s & wt && (c = c.add(i)), i = i.double(), n >>= wt, s >>= wt;
4155
4166
  return { p1: o, p2: c };
4156
4167
  }
4157
- function Ti(t, e, n) {
4168
+ function Ai(t, e, n) {
4158
4169
  if (e) {
4159
4170
  if (e.ORDER !== t)
4160
4171
  throw new Error("Field.ORDER must match order: Fp == p, Fn == n");
4161
- return l1(e), e;
4172
+ return f1(e), e;
4162
4173
  } else
4163
- return Pr(t, { isLE: n });
4174
+ return Dr(t, { isLE: n });
4164
4175
  }
4165
- function g1(t, e, n = {}, s) {
4176
+ function b1(t, e, n = {}, s) {
4166
4177
  if (s === void 0 && (s = t === "edwards"), !e || typeof e != "object")
4167
4178
  throw new Error(`expected valid ${t} CURVE object`);
4168
4179
  for (const h of ["p", "n", "h"]) {
@@ -4170,19 +4181,19 @@ function g1(t, e, n = {}, s) {
4170
4181
  if (!(typeof f == "bigint" && f > Ot))
4171
4182
  throw new Error(`CURVE.${h} must be positive bigint`);
4172
4183
  }
4173
- const i = Ti(e.p, n.Fp, s), o = Ti(e.n, n.Fn, s), u = ["Gx", "Gy", "a", "b"];
4184
+ const i = Ai(e.p, n.Fp, s), o = Ai(e.n, n.Fn, s), u = ["Gx", "Gy", "a", "b"];
4174
4185
  for (const h of u)
4175
4186
  if (!i.isValid(e[h]))
4176
4187
  throw new Error(`CURVE.${h} must be valid field element of CURVE.Fp`);
4177
4188
  return e = Object.freeze(Object.assign({}, e)), { CURVE: e, Fp: i, Fn: o };
4178
4189
  }
4179
- function b1(t, e) {
4190
+ function _1(t, e) {
4180
4191
  return function(s) {
4181
4192
  const i = t(s);
4182
4193
  return { secretKey: i, publicKey: e(i) };
4183
4194
  };
4184
4195
  }
4185
- class Ii {
4196
+ class Ri {
4186
4197
  oHash;
4187
4198
  iHash;
4188
4199
  blockLen;
@@ -4191,7 +4202,7 @@ class Ii {
4191
4202
  finished = !1;
4192
4203
  destroyed = !1;
4193
4204
  constructor(e, n) {
4194
- if (mo(e), Ct(n, void 0, "key"), this.iHash = e.create(), typeof this.iHash.update != "function")
4205
+ if (po(e), Ct(n, void 0, "key"), this.iHash = e.create(), typeof this.iHash.update != "function")
4195
4206
  throw new Error("Expected instance of class which extends utils.Hash");
4196
4207
  this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
4197
4208
  const s = this.blockLen, i = new Uint8Array(s);
@@ -4207,7 +4218,7 @@ class Ii {
4207
4218
  return Tn(this), this.iHash.update(e), this;
4208
4219
  }
4209
4220
  digestInto(e) {
4210
- Tn(this), po(e, this), this.finished = !0;
4221
+ Tn(this), go(e, this), this.finished = !0;
4211
4222
  const n = e.subarray(0, this.outputLen);
4212
4223
  this.iHash.digestInto(n), this.oHash.update(n), this.oHash.digestInto(n), this.destroy();
4213
4224
  }
@@ -4227,24 +4238,24 @@ class Ii {
4227
4238
  this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
4228
4239
  }
4229
4240
  }
4230
- const _1 = /* @__PURE__ */ (() => {
4231
- const t = (e, n, s) => new Ii(e, n).update(s).digest();
4232
- return t.create = (e, n) => new Ii(e, n), t;
4241
+ const y1 = /* @__PURE__ */ (() => {
4242
+ const t = (e, n, s) => new Ri(e, n).update(s).digest();
4243
+ return t.create = (e, n) => new Ri(e, n), t;
4233
4244
  })();
4234
4245
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
4235
- const Ai = (t, e) => (t + (t >= 0 ? e : -e) / Oo) / e;
4236
- function y1(t, e, n) {
4237
- So("scalar", t, Je, n);
4238
- const [[s, i], [o, c]] = e, u = Ai(c * t, n), h = Ai(-i * t, n);
4246
+ const Ci = (t, e) => (t + (t >= 0 ? e : -e) / $o) / e;
4247
+ function k1(t, e, n) {
4248
+ To("scalar", t, Je, n);
4249
+ const [[s, i], [o, c]] = e, u = Ci(c * t, n), h = Ci(-i * t, n);
4239
4250
  let f = t - u * s - h * o, m = -u * i - h * c;
4240
4251
  const g = f < Je, x = m < Je;
4241
4252
  g && (f = -f), x && (m = -m);
4242
- const T = Rr(Math.ceil(Ar(n) / 2)) + ht;
4253
+ const T = Cr(Math.ceil(Rr(n) / 2)) + ht;
4243
4254
  if (f < Je || f >= T || m < Je || m >= T)
4244
4255
  throw new Error("splitScalar (endomorphism): failed for k");
4245
4256
  return { k1neg: g, k1: f, k2neg: x, k2: m };
4246
4257
  }
4247
- function hr(t) {
4258
+ function dr(t) {
4248
4259
  if (!["compact", "recovered", "der"].includes(t))
4249
4260
  throw new Error('Signature format must be "compact", "recovered", or "der"');
4250
4261
  return t;
@@ -4254,21 +4265,21 @@ function Js(t, e) {
4254
4265
  const n = {};
4255
4266
  for (let s of Object.keys(e))
4256
4267
  n[s] = t[s] === void 0 ? e[s] : t[s];
4257
- return Qt(n.lowS, "lowS"), Qt(n.prehash, "prehash"), n.format !== void 0 && hr(n.format), n;
4268
+ return Qt(n.lowS, "lowS"), Qt(n.prehash, "prehash"), n.format !== void 0 && dr(n.format), n;
4258
4269
  }
4259
- class k1 extends Error {
4270
+ class v1 extends Error {
4260
4271
  constructor(e = "") {
4261
4272
  super(e);
4262
4273
  }
4263
4274
  }
4264
4275
  const He = {
4265
4276
  // asn.1 DER encoding utils
4266
- Err: k1,
4277
+ Err: v1,
4267
4278
  // Basic building block is TLV (Tag-Length-Value)
4268
4279
  _tlv: {
4269
4280
  encode: (t, e) => {
4270
4281
  const { Err: n } = He;
4271
- if (fr(t, "tag"), t < 0 || t > 255)
4282
+ if (hr(t, "tag"), t < 0 || t > 255)
4272
4283
  throw new n("tlv.encode: wrong tag");
4273
4284
  if (typeof e != "string")
4274
4285
  throw new TypeError('"data" expected string, got type=' + typeof e);
@@ -4322,7 +4333,7 @@ const He = {
4322
4333
  _int: {
4323
4334
  encode(t) {
4324
4335
  const { Err: e } = He;
4325
- if (Tr(t), t < Je)
4336
+ if (Ir(t), t < Je)
4326
4337
  throw new e("integer: negative integers are not allowed");
4327
4338
  let n = gn(t);
4328
4339
  if (Number.parseInt(n[0], 16) & 8 && (n = "00" + n), n.length & 1)
@@ -4357,9 +4368,9 @@ const He = {
4357
4368
  Object.freeze(He._tlv);
4358
4369
  Object.freeze(He._int);
4359
4370
  Object.freeze(He);
4360
- const Je = /* @__PURE__ */ BigInt(0), ht = /* @__PURE__ */ BigInt(1), Oo = /* @__PURE__ */ BigInt(2), bn = /* @__PURE__ */ BigInt(3), v1 = /* @__PURE__ */ BigInt(4);
4361
- function w1(t, e = {}) {
4362
- const n = g1("weierstrass", t, e), s = n.Fp, i = n.Fn;
4371
+ const Je = /* @__PURE__ */ BigInt(0), ht = /* @__PURE__ */ BigInt(1), $o = /* @__PURE__ */ BigInt(2), bn = /* @__PURE__ */ BigInt(3), w1 = /* @__PURE__ */ BigInt(4);
4372
+ function x1(t, e = {}) {
4373
+ const n = b1("weierstrass", t, e), s = n.Fp, i = n.Fn;
4363
4374
  let o = n.CURVE;
4364
4375
  const { h: c, n: u } = o;
4365
4376
  qn(e, {}, {
@@ -4373,7 +4384,7 @@ function w1(t, e = {}) {
4373
4384
  const { endo: h, allowInfinityPoint: f } = e;
4374
4385
  if (h && (!s.is0(o.a) || typeof h.beta != "bigint" || !Array.isArray(h.basises)))
4375
4386
  throw new Error('invalid endo: expected "beta": bigint and "basises": array');
4376
- const m = jo(s, i);
4387
+ const m = Vo(s, i);
4377
4388
  function g() {
4378
4389
  if (!s.isOdd)
4379
4390
  throw new Error("compression is not supported: Field does not have .isOdd()");
@@ -4385,7 +4396,7 @@ function w1(t, e = {}) {
4385
4396
  if (Qt($, "isCompressed"), $) {
4386
4397
  g();
4387
4398
  const M = !s.isOdd(U);
4388
- return ft($o(M), R);
4399
+ return ft(jo(M), R);
4389
4400
  } else
4390
4401
  return ft(Uint8Array.of(4), R, s.toBytes(U));
4391
4402
  }
@@ -4428,7 +4439,7 @@ function w1(t, e = {}) {
4428
4439
  }
4429
4440
  if (!K(o.Gx, o.Gy))
4430
4441
  throw new Error("bad curve params: generator point");
4431
- const C = s.mul(s.pow(o.a, bn), v1), H = s.mul(s.sqr(o.b), BigInt(27));
4442
+ const C = s.mul(s.pow(o.a, bn), w1), H = s.mul(s.sqr(o.b), BigInt(27));
4432
4443
  if (s.is0(s.add(C, H)))
4433
4444
  throw new Error("bad curve params: a or b");
4434
4445
  function B(b, v, $ = !1) {
@@ -4443,7 +4454,7 @@ function w1(t, e = {}) {
4443
4454
  function oe(b) {
4444
4455
  if (!h || !h.basises)
4445
4456
  throw new Error("no endo");
4446
- return y1(b, h.basises, i.ORDER);
4457
+ return k1(b, h.basises, i.ORDER);
4447
4458
  }
4448
4459
  function se(b, v, $, X, U) {
4449
4460
  return $ = new Y(s.mul($.X, b), $.Y, $.Z), v = Rn(X, v), $ = Rn(U, $), v.add($);
@@ -4482,7 +4493,7 @@ function w1(t, e = {}) {
4482
4493
  return $.assertValidity(), $;
4483
4494
  }
4484
4495
  static fromHex(v) {
4485
- return Y.fromBytes(ur(v));
4496
+ return Y.fromBytes(lr(v));
4486
4497
  }
4487
4498
  get x() {
4488
4499
  return this.toAffine().x;
@@ -4575,7 +4586,7 @@ function w1(t, e = {}) {
4575
4586
  if (!i.isValidNot0(v))
4576
4587
  throw new RangeError("invalid scalar: out of range");
4577
4588
  let X, U;
4578
- const R = (M) => _.cached(this, M, (F) => xi(Y, F));
4589
+ const R = (M) => _.cached(this, M, (F) => Si(Y, F));
4579
4590
  if ($) {
4580
4591
  const { k1neg: M, k1: F, k2neg: O, k2: j } = oe(v), { p: z, f: ue } = R(F), { p: ae, f: ie } = R(j);
4581
4592
  U = ue.add(ie), X = se($.beta, z, ae, M, O);
@@ -4583,7 +4594,7 @@ function w1(t, e = {}) {
4583
4594
  const { p: M, f: F } = R(v);
4584
4595
  X = M, U = F;
4585
4596
  }
4586
- return xi(Y, [X, U])[0];
4597
+ return Si(Y, [X, U])[0];
4587
4598
  }
4588
4599
  /**
4589
4600
  * Non-constant-time multiplication. Uses double-and-add algorithm.
@@ -4601,7 +4612,7 @@ function w1(t, e = {}) {
4601
4612
  if (_.hasCache(this))
4602
4613
  return this.multiply(U);
4603
4614
  if ($) {
4604
- const { k1neg: R, k1: M, k2neg: F, k2: O } = oe(U), { p1: j, p2: z } = p1(Y, X, M, O);
4615
+ const { k1neg: R, k1: M, k2neg: F, k2: O } = oe(U), { p1: j, p2: z } = g1(Y, X, M, O);
4605
4616
  return se($.beta, j, z, R, F);
4606
4617
  } else
4607
4618
  return _.unsafe(X, U);
@@ -4645,19 +4656,19 @@ function w1(t, e = {}) {
4645
4656
  return Qt(v, "isCompressed"), this.assertValidity(), L(Y, this, v);
4646
4657
  }
4647
4658
  toHex(v = !0) {
4648
- return yo(this.toBytes(v));
4659
+ return ko(this.toBytes(v));
4649
4660
  }
4650
4661
  toString() {
4651
4662
  return `<Point ${this.is0() ? "ZERO" : this.toHex()}>`;
4652
4663
  }
4653
4664
  }
4654
- const de = i.BITS, _ = new m1(Y, e.endo ? Math.ceil(de / 2) : de);
4665
+ const de = i.BITS, _ = new p1(Y, e.endo ? Math.ceil(de / 2) : de);
4655
4666
  return de >= 8 && Y.BASE.precompute(8), Object.freeze(Y.prototype), Object.freeze(Y), Y;
4656
4667
  }
4657
- function $o(t) {
4668
+ function jo(t) {
4658
4669
  return Uint8Array.of(t ? 2 : 3);
4659
4670
  }
4660
- function jo(t, e) {
4671
+ function Vo(t, e) {
4661
4672
  return {
4662
4673
  secretKey: e.BYTES,
4663
4674
  publicKey: 1 + t.BYTES,
@@ -4668,9 +4679,9 @@ function jo(t, e) {
4668
4679
  signature: 2 * e.BYTES
4669
4680
  };
4670
4681
  }
4671
- function x1(t, e = {}) {
4672
- const { Fn: n } = t, s = e.randomBytes === void 0 ? vo : e.randomBytes, i = Object.assign(jo(t.Fp, n), {
4673
- seed: Math.max(No(n.ORDER), 16)
4682
+ function E1(t, e = {}) {
4683
+ const { Fn: n } = t, s = e.randomBytes === void 0 ? wo : e.randomBytes, i = Object.assign(Vo(t.Fp, n), {
4684
+ seed: Math.max(Mo(n.ORDER), 16)
4674
4685
  });
4675
4686
  function o(T) {
4676
4687
  try {
@@ -4690,14 +4701,14 @@ function x1(t, e = {}) {
4690
4701
  }
4691
4702
  }
4692
4703
  function u(T) {
4693
- return T = T === void 0 ? s(i.seed) : T, d1(Ce(T, i.seed, "seed"), n.ORDER);
4704
+ return T = T === void 0 ? s(i.seed) : T, m1(Ce(T, i.seed, "seed"), n.ORDER);
4694
4705
  }
4695
4706
  function h(T, L = !0) {
4696
4707
  return t.BASE.multiply(n.fromBytes(T)).toBytes(L);
4697
4708
  }
4698
4709
  function f(T) {
4699
4710
  const { secretKey: L, publicKey: N, publicKeyUncompressed: q } = i, K = n._lengths;
4700
- if (!ko(T))
4711
+ if (!vo(T))
4701
4712
  return;
4702
4713
  const C = Ce(T, void 0, "key").length, H = C === N || C === q, B = C === L || !!K?.includes(C);
4703
4714
  if (!(H && B))
@@ -4715,24 +4726,24 @@ function x1(t, e = {}) {
4715
4726
  isValidSecretKey: o,
4716
4727
  isValidPublicKey: c,
4717
4728
  randomSecretKey: u
4718
- }, x = b1(u, h);
4729
+ }, x = _1(u, h);
4719
4730
  return Object.freeze(g), Object.freeze(i), Object.freeze({ getPublicKey: h, getSharedSecret: m, keygen: x, Point: t, utils: g, lengths: i });
4720
4731
  }
4721
- function E1(t, e, n = {}) {
4732
+ function S1(t, e, n = {}) {
4722
4733
  const s = e;
4723
- mo(s), qn(n, {}, {
4734
+ po(s), qn(n, {}, {
4724
4735
  hmac: "function",
4725
4736
  lowS: "boolean",
4726
4737
  randomBytes: "function",
4727
4738
  bits2int: "function",
4728
4739
  bits2int_modN: "function"
4729
4740
  }), n = Object.assign({}, n);
4730
- const i = n.randomBytes === void 0 ? vo : n.randomBytes, o = n.hmac === void 0 ? (U, R) => _1(s, U, R) : n.hmac, { Fp: c, Fn: u } = t, { ORDER: h, BITS: f } = u, { keygen: m, getPublicKey: g, getSharedSecret: x, utils: T, lengths: L } = x1(t, n), N = {
4741
+ const i = n.randomBytes === void 0 ? wo : n.randomBytes, o = n.hmac === void 0 ? (U, R) => y1(s, U, R) : n.hmac, { Fp: c, Fn: u } = t, { ORDER: h, BITS: f } = u, { keygen: m, getPublicKey: g, getSharedSecret: x, utils: T, lengths: L } = E1(t, n), N = {
4731
4742
  prehash: !0,
4732
4743
  lowS: typeof n.lowS == "boolean" ? n.lowS : !0,
4733
4744
  format: "compact",
4734
4745
  extraEntropy: !1
4735
- }, q = h * Oo + ht < c.ORDER;
4746
+ }, q = h * $o + ht < c.ORDER;
4736
4747
  function K(U) {
4737
4748
  const R = h >> ht;
4738
4749
  return U > R;
@@ -4747,7 +4758,7 @@ function E1(t, e, n = {}) {
4747
4758
  throw new Error('"recovered" sig type is not supported for cofactor >2 curves');
4748
4759
  }
4749
4760
  function B(U, R) {
4750
- hr(R);
4761
+ dr(R);
4751
4762
  const M = L.signature, F = R === "compact" ? M : R === "recovered" ? M + 1 : void 0;
4752
4763
  return Ce(U, F);
4753
4764
  }
@@ -4775,7 +4786,7 @@ function E1(t, e, n = {}) {
4775
4786
  return new J(u.fromBytes(j), u.fromBytes(z), F);
4776
4787
  }
4777
4788
  static fromHex(R, M) {
4778
- return this.fromBytes(ur(R), M);
4789
+ return this.fromBytes(lr(R), M);
4779
4790
  }
4780
4791
  assertRecovery() {
4781
4792
  const { recovery: R } = this;
@@ -4792,7 +4803,7 @@ function E1(t, e, n = {}) {
4792
4803
  const { r: M, s: F } = this, O = this.assertRecovery(), j = O === 2 || O === 3 ? M + h : M;
4793
4804
  if (!c.isValid(j))
4794
4805
  throw new Error("invalid recovery id: sig.r+curve.n != R.x");
4795
- const z = c.toBytes(j), ue = t.fromBytes(ft($o((O & 1) === 0), z)), ae = u.inv(j), ie = se(Ce(R, void 0, "msgHash")), k = u.create(-ie * ae), S = u.create(F * ae), A = t.BASE.multiplyUnsafe(k).add(ue.multiplyUnsafe(S));
4806
+ const z = c.toBytes(j), ue = t.fromBytes(ft(jo((O & 1) === 0), z)), ae = u.inv(j), ie = se(Ce(R, void 0, "msgHash")), k = u.create(-ie * ae), S = u.create(F * ae), A = t.BASE.multiplyUnsafe(k).add(ue.multiplyUnsafe(S));
4796
4807
  if (A.is0())
4797
4808
  throw new Error("invalid recovery: point at infinify");
4798
4809
  return A.assertValidity(), A;
@@ -4802,13 +4813,13 @@ function E1(t, e, n = {}) {
4802
4813
  return K(this.s);
4803
4814
  }
4804
4815
  toBytes(R = N.format) {
4805
- if (hr(R), R === "der")
4806
- return ur(He.hexFromSig(this));
4816
+ if (dr(R), R === "der")
4817
+ return lr(He.hexFromSig(this));
4807
4818
  const { r: M, s: F } = this, O = u.toBytes(M), j = u.toBytes(F);
4808
4819
  return R === "recovered" ? (H(), ft(Uint8Array.of(this.assertRecovery()), O, j)) : ft(O, j);
4809
4820
  }
4810
4821
  toHex(R) {
4811
- return yo(this.toBytes(R));
4822
+ return ko(this.toBytes(R));
4812
4823
  }
4813
4824
  }
4814
4825
  Object.freeze(J.prototype), Object.freeze(J);
@@ -4819,9 +4830,9 @@ function E1(t, e, n = {}) {
4819
4830
  return F > 0 ? M >> BigInt(F) : M;
4820
4831
  } : n.bits2int, se = n.bits2int_modN === void 0 ? function(R) {
4821
4832
  return u.create(oe(R));
4822
- } : n.bits2int_modN, Y = Rr(f);
4833
+ } : n.bits2int_modN, Y = Cr(f);
4823
4834
  function de(U) {
4824
- return So("num < 2^" + f, U, Je, Y), u.toBytes(U);
4835
+ return To("num < 2^" + f, U, Je, Y), u.toBytes(U);
4825
4836
  }
4826
4837
  function _(U, R) {
4827
4838
  return Ce(U, void 0, "message"), R ? Ce(s(U), void 0, "prehashed message") : U;
@@ -4855,11 +4866,11 @@ function E1(t, e, n = {}) {
4855
4866
  }
4856
4867
  function v(U, R, M = {}) {
4857
4868
  const { seed: F, k2sig: O } = b(U, R, M);
4858
- return s1(s.outputLen, u.BYTES, o)(F, O).toBytes(M.format);
4869
+ return r1(s.outputLen, u.BYTES, o)(F, O).toBytes(M.format);
4859
4870
  }
4860
4871
  function $(U, R, M, F = {}) {
4861
4872
  const { lowS: O, prehash: j, format: z } = Js(F, N);
4862
- if (M = Ce(M, void 0, "publicKey"), R = _(R, j), !ko(U)) {
4873
+ if (M = Ce(M, void 0, "publicKey"), R = _(R, j), !vo(U)) {
4863
4874
  const ue = U instanceof J ? ", use sig.toBytes()" : "";
4864
4875
  throw new Error("verify expects Uint8Array signature" + ue);
4865
4876
  }
@@ -4893,7 +4904,7 @@ function E1(t, e, n = {}) {
4893
4904
  });
4894
4905
  }
4895
4906
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
4896
- const S1 = {
4907
+ const T1 = {
4897
4908
  p: BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff"),
4898
4909
  n: BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),
4899
4910
  h: BigInt(1),
@@ -4901,28 +4912,28 @@ const S1 = {
4901
4912
  b: BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),
4902
4913
  Gx: BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),
4903
4914
  Gy: BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5")
4904
- }, T1 = /* @__PURE__ */ w1(S1), I1 = /* @__PURE__ */ E1(T1, e1), Ri = {
4915
+ }, I1 = /* @__PURE__ */ x1(T1), A1 = /* @__PURE__ */ S1(I1, t1), Pi = {
4905
4916
  x: "6bkPbVZXx-c08blVs6qIwm0gfSRLS2nnf2Tsz19ggtM",
4906
4917
  y: "lhi486ASKQkS8TGbVee-FpdAu7qKaO3gad_4ScX8qJI"
4907
- }, A1 = 60;
4908
- let dr = null, Dr = !1, xt = null, Bt = 0;
4918
+ }, R1 = 60;
4919
+ let mr = null, Lr = !1, xt = null, Bt = 0;
4909
4920
  function Cn(t) {
4910
4921
  const e = t.replace(/-/g, "+").replace(/_/g, "/"), n = atob(e), s = new Uint8Array(n.length);
4911
4922
  for (let i = 0; i < n.length; i++) s[i] = n.charCodeAt(i);
4912
4923
  return s;
4913
4924
  }
4914
- async function R1() {
4925
+ async function C1() {
4915
4926
  try {
4916
- const t = Cn(Ri.x), e = Cn(Ri.y);
4927
+ const t = Cn(Pi.x), e = Cn(Pi.y);
4917
4928
  if (t.length !== 32 || e.length !== 32) throw new Error("bad key");
4918
4929
  const n = new Uint8Array(65);
4919
- n[0] = 4, n.set(t, 1), n.set(e, 33), dr = n;
4930
+ n[0] = 4, n.set(t, 1), n.set(e, 33), mr = n;
4920
4931
  } catch {
4921
- Dr = !0, console.warn("[Viji] _SC: key import failed — restricted mode active");
4932
+ Lr = !0, console.warn("[Viji] _SC: key import failed — restricted mode active");
4922
4933
  }
4923
4934
  }
4924
- async function Ci(t) {
4925
- if (Dr || !dr) {
4935
+ async function Di(t) {
4936
+ if (Lr || !mr) {
4926
4937
  xt = null, Bt = 0;
4927
4938
  return;
4928
4939
  }
@@ -4931,7 +4942,7 @@ async function Ci(t) {
4931
4942
  if (e.length !== 3) throw new Error("malformed");
4932
4943
  const n = new TextEncoder().encode(e[0] + "." + e[1]), s = Cn(e[2]);
4933
4944
  if (s.length !== 64) throw new Error("invalid signature length");
4934
- if (!I1.verify(s, n, dr, {
4945
+ if (!A1.verify(s, n, mr, {
4935
4946
  lowS: !1
4936
4947
  })) throw new Error("invalid signature");
4937
4948
  const o = JSON.parse(new TextDecoder().decode(Cn(e[1])));
@@ -4940,12 +4951,12 @@ async function Ci(t) {
4940
4951
  xt = null, Bt = 0;
4941
4952
  }
4942
4953
  }
4943
- function C1(t, e) {
4944
- if (Dr || !xt) return e;
4954
+ function P1(t, e) {
4955
+ if (Lr || !xt) return e;
4945
4956
  const n = Math.floor(Date.now() / 1e3);
4946
- return Bt > 0 && Bt + A1 < n ? (xt = null, Bt = 0, e) : typeof xt[t] == "number" ? xt[t] : e;
4957
+ return Bt > 0 && Bt + R1 < n ? (xt = null, Bt = 0, e) : typeof xt[t] == "number" ? xt[t] : e;
4947
4958
  }
4948
- const P1 = "#F1F1F1", Nt = 28, Qs = 40, Pi = 24, D1 = {
4959
+ const D1 = "#F1F1F1", Nt = 28, Qs = 40, Li = 24, L1 = {
4949
4960
  paths: [
4950
4961
  "M37.5801 32.0859L32.248 40.084C31.9699 40.5012 31.5015 40.7519 31 40.752C30.4985 40.7519 30.0302 40.5012 29.752 40.084L24.4199 32.0859L26.916 30.4219L31 36.5479L35.084 30.4219L37.5801 32.0859Z",
4951
4962
  "M43.0059 39.25C43.0059 40.0784 43.6774 40.75 44.5059 40.75C45.3343 40.75 46.0059 40.0784 46.0059 39.25V31H43.0059V39.25Z",
@@ -4962,7 +4973,7 @@ const P1 = "#F1F1F1", Nt = 28, Qs = 40, Pi = 24, D1 = {
4962
4973
  maxX: 64.375,
4963
4974
  maxY: 47.5195,
4964
4975
  shadowStd: 11
4965
- }, L1 = {
4976
+ }, F1 = {
4966
4977
  paths: [
4967
4978
  "M77.6895 41.1893C78.2752 40.6036 79.2248 40.6036 79.8106 41.1893C80.3963 41.7751 80.3963 42.7246 79.8106 43.3104L43.8106 79.3104C43.2248 79.8962 42.2752 79.8962 41.6895 79.3104C41.1037 78.7246 41.1037 77.7751 41.6895 77.1893L77.6895 41.1893Z",
4968
4979
  "M76.875 78.25C76.875 77.2145 77.7145 76.375 78.75 76.375C79.7855 76.375 80.625 77.2145 80.625 78.25C80.625 79.2855 79.7855 80.125 78.75 80.125C77.7145 80.125 76.875 79.2855 76.875 78.25Z",
@@ -4981,15 +4992,15 @@ const P1 = "#F1F1F1", Nt = 28, Qs = 40, Pi = 24, D1 = {
4981
4992
  maxY: 107.52,
4982
4993
  shadowStd: 12
4983
4994
  };
4984
- let Lr = null, Fr = null, Vo = null, qo = null, Ue = null, Kt = null, Pn = null, lt = null, it = -1, ot = -1, Di = null, Ho = 0;
4985
- const F1 = `
4995
+ let Fr = null, Ur = null, qo = null, Ho = null, Ue = null, Kt = null, Pn = null, lt = null, it = -1, ot = -1, Fi = null, Xo = 0;
4996
+ const U1 = `
4986
4997
  attribute vec2 a_pos;
4987
4998
  attribute vec2 a_uv;
4988
4999
  varying vec2 v_uv;
4989
5000
  void main() {
4990
5001
  v_uv = a_uv;
4991
5002
  gl_Position = vec4(a_pos, 0.0, 1.0);
4992
- }`, U1 = `
5003
+ }`, N1 = `
4993
5004
  precision mediump float;
4994
5005
  uniform sampler2D u_tex;
4995
5006
  uniform float u_alpha;
@@ -4997,7 +5008,7 @@ varying vec2 v_uv;
4997
5008
  void main() {
4998
5009
  gl_FragColor = texture2D(u_tex, v_uv) * u_alpha;
4999
5010
  }`;
5000
- function N1(t) {
5011
+ function M1(t) {
5001
5012
  const e = new Path2D();
5002
5013
  for (const [n, s] of t.dots) {
5003
5014
  const i = new Path2D();
@@ -5007,11 +5018,11 @@ function N1(t) {
5007
5018
  e.addPath(new Path2D(n));
5008
5019
  return e;
5009
5020
  }
5010
- function Li(t) {
5021
+ function Ui(t) {
5011
5022
  const e = t.maxX - t.minX, n = t.maxY - t.minY, s = Math.ceil(e + Nt * 2), i = Math.ceil(n + Nt * 2), o = new OffscreenCanvas(s, i), c = o.getContext("2d");
5012
5023
  if (!c) return null;
5013
- const u = N1(t);
5014
- c.translate(Nt - t.minX, Nt - t.minY), c.fillStyle = P1;
5024
+ const u = M1(t);
5025
+ c.translate(Nt - t.minX, Nt - t.minY), c.fillStyle = D1;
5015
5026
  const h = [
5016
5027
  [t.shadowStd * 2, 0.5],
5017
5028
  [8, 0.2],
@@ -5021,22 +5032,22 @@ function Li(t) {
5021
5032
  c.save(), c.shadowColor = `rgba(0,0,0,${m})`, c.shadowBlur = f, c.fill(u), c.restore();
5022
5033
  return c.fill(u), { canvas: o, bufW: s, bufH: i, contentW: e, contentH: n };
5023
5034
  }
5024
- function M1(t) {
5035
+ function B1(t) {
5025
5036
  try {
5026
- Lr = Li(D1), Fr = Li(L1);
5037
+ Fr = Ui(L1), Ur = Ui(F1);
5027
5038
  } catch (e) {
5028
5039
  console.warn("[Viji] overlay: init failed", e);
5029
5040
  }
5030
5041
  }
5031
- function Fi(t) {
5032
- Ho = t;
5042
+ function Ni(t) {
5043
+ Xo = t;
5033
5044
  }
5034
- function B1(t, e, n, s) {
5035
- const i = t === 0, o = i ? Fr : Lr;
5045
+ function O1(t, e, n, s) {
5046
+ const i = t === 0, o = i ? Ur : Fr;
5036
5047
  if (!o) return null;
5037
5048
  const c = o.contentW * s, u = o.contentH * s;
5038
5049
  let h, f;
5039
- return t === 0 ? (h = Qs * s, f = Qs * s) : t === 2 ? (h = Pi * s, f = n - u - Pi * s) : (h = (e - c) / 2, f = Qs * s), {
5050
+ return t === 0 ? (h = Qs * s, f = Qs * s) : t === 2 ? (h = Li * s, f = n - u - Li * s) : (h = (e - c) / 2, f = Qs * s), {
5040
5051
  buffer: o,
5041
5052
  vertical: i,
5042
5053
  px: Math.round(h - Nt * s),
@@ -5045,13 +5056,13 @@ function B1(t, e, n, s) {
5045
5056
  h: o.bufH * s
5046
5057
  };
5047
5058
  }
5048
- function O1(t, e, n, s, i = 1) {
5059
+ function $1(t, e, n, s, i = 1) {
5049
5060
  if (s >= 2) return;
5050
- const o = B1(Ho, t.width, t.height, i || 1);
5051
- o && (e ? V1(e, o) : n && q1(n, t, o));
5061
+ const o = O1(Xo, t.width, t.height, i || 1);
5062
+ o && (e ? q1(e, o) : n && H1(n, t, o));
5052
5063
  }
5053
- const Xo = 34229;
5054
- function $1(t) {
5064
+ const Wo = 34229;
5065
+ function j1(t) {
5055
5066
  const e = t;
5056
5067
  if (typeof e.createVertexArray == "function")
5057
5068
  return {
@@ -5064,29 +5075,29 @@ function $1(t) {
5064
5075
  bind: (s) => n.bindVertexArrayOES(s)
5065
5076
  } : null;
5066
5077
  }
5067
- function Ui(t, e) {
5078
+ function Mi(t, e) {
5068
5079
  if (!e) return null;
5069
5080
  const n = t.getParameter(t.TEXTURE_BINDING_2D), s = t.getParameter(t.UNPACK_FLIP_Y_WEBGL), i = t.getParameter(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL);
5070
5081
  t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL, 1), t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 0);
5071
5082
  const o = t.createTexture();
5072
5083
  return t.bindTexture(t.TEXTURE_2D, o), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MIN_FILTER, t.LINEAR), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MAG_FILTER, t.LINEAR), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_S, t.CLAMP_TO_EDGE), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_T, t.CLAMP_TO_EDGE), t.texImage2D(t.TEXTURE_2D, 0, t.RGBA, t.RGBA, t.UNSIGNED_BYTE, e), t.bindTexture(t.TEXTURE_2D, n), t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL, s ? 1 : 0), t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL, i ? 1 : 0), o;
5073
5084
  }
5074
- function j1(t) {
5075
- if (Di === t) return;
5076
- Di = t, Vo = Ui(t, Lr?.canvas ?? null), qo = Ui(t, Fr?.canvas ?? null);
5085
+ function V1(t) {
5086
+ if (Fi === t) return;
5087
+ Fi = t, qo = Mi(t, Fr?.canvas ?? null), Ho = Mi(t, Ur?.canvas ?? null);
5077
5088
  const e = t.createShader(t.VERTEX_SHADER);
5078
- t.shaderSource(e, F1), t.compileShader(e);
5089
+ t.shaderSource(e, U1), t.compileShader(e);
5079
5090
  const n = t.createShader(t.FRAGMENT_SHADER);
5080
- if (t.shaderSource(n, U1), t.compileShader(n), Ue = t.createProgram(), t.attachShader(Ue, e), t.attachShader(Ue, n), t.bindAttribLocation(Ue, 0, "a_pos"), t.bindAttribLocation(Ue, 1, "a_uv"), t.linkProgram(Ue), t.deleteShader(e), t.deleteShader(n), !t.getProgramParameter(Ue, t.LINK_STATUS)) {
5091
+ if (t.shaderSource(n, N1), t.compileShader(n), Ue = t.createProgram(), t.attachShader(Ue, e), t.attachShader(Ue, n), t.bindAttribLocation(Ue, 0, "a_pos"), t.bindAttribLocation(Ue, 1, "a_uv"), t.linkProgram(Ue), t.deleteShader(e), t.deleteShader(n), !t.getProgramParameter(Ue, t.LINK_STATUS)) {
5081
5092
  console.warn("[Viji] overlay: shader link failed"), Ue = null;
5082
5093
  return;
5083
5094
  }
5084
- if (Kt = t.createBuffer(), it = t.getAttribLocation(Ue, "a_pos"), ot = t.getAttribLocation(Ue, "a_uv"), lt = $1(t), lt) {
5085
- const s = t.getParameter(Xo), i = t.getParameter(t.ARRAY_BUFFER_BINDING);
5095
+ if (Kt = t.createBuffer(), it = t.getAttribLocation(Ue, "a_pos"), ot = t.getAttribLocation(Ue, "a_uv"), lt = j1(t), lt) {
5096
+ const s = t.getParameter(Wo), i = t.getParameter(t.ARRAY_BUFFER_BINDING);
5086
5097
  Pn = lt.create(), lt.bind(Pn), t.bindBuffer(t.ARRAY_BUFFER, Kt), it >= 0 && (t.enableVertexAttribArray(it), t.vertexAttribPointer(it, 2, t.FLOAT, !1, 16, 0)), ot >= 0 && (t.enableVertexAttribArray(ot), t.vertexAttribPointer(ot, 2, t.FLOAT, !1, 16, 8)), lt.bind(s), t.bindBuffer(t.ARRAY_BUFFER, i);
5087
5098
  }
5088
5099
  }
5089
- function Ni(t, e) {
5100
+ function Bi(t, e) {
5090
5101
  return {
5091
5102
  index: e,
5092
5103
  buffer: t.getVertexAttrib(e, t.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING),
@@ -5099,19 +5110,19 @@ function Ni(t, e) {
5099
5110
  currentValue: t.getVertexAttrib(e, t.CURRENT_VERTEX_ATTRIB)
5100
5111
  };
5101
5112
  }
5102
- function Mi(t, e) {
5113
+ function Oi(t, e) {
5103
5114
  e.buffer && (t.bindBuffer(t.ARRAY_BUFFER, e.buffer), t.vertexAttribPointer(e.index, e.size, e.type, e.normalized, e.stride, e.offset)), e.enabled ? t.enableVertexAttribArray(e.index) : t.disableVertexAttribArray(e.index), t.vertexAttrib4f(e.index, e.currentValue[0], e.currentValue[1], e.currentValue[2], e.currentValue[3]);
5104
5115
  }
5105
- function V1(t, e) {
5116
+ function q1(t, e) {
5106
5117
  t.save(), t.globalAlpha = 1, t.drawImage(e.buffer.canvas, e.px, e.py, e.w, e.h), t.restore();
5107
5118
  }
5108
- function q1(t, e, n) {
5109
- if (j1(t), !Ue || !Kt) return;
5110
- const s = n.vertical ? qo : Vo;
5119
+ function H1(t, e, n) {
5120
+ if (V1(t), !Ue || !Kt) return;
5121
+ const s = n.vertical ? Ho : qo;
5111
5122
  if (!s) return;
5112
5123
  const i = e.width, o = e.height, c = n.px, u = n.py, h = n.w, f = n.h, m = c / i * 2 - 1, g = 1 - (u + f) / o * 2, x = (c + h) / i * 2 - 1, T = 1 - u / o * 2, L = !!(lt && Pn), N = t.getParameter(t.CURRENT_PROGRAM), q = t.getParameter(t.ACTIVE_TEXTURE);
5113
5124
  t.activeTexture(t.TEXTURE0);
5114
- const K = t.getParameter(t.TEXTURE_BINDING_2D), C = t.getParameter(t.ARRAY_BUFFER_BINDING), H = t.getParameter(t.FRAMEBUFFER_BINDING), B = t.getParameter(t.VIEWPORT), J = t.isEnabled(t.BLEND), oe = t.getParameter(t.BLEND_SRC_RGB), se = t.getParameter(t.BLEND_DST_RGB), Y = t.getParameter(t.BLEND_SRC_ALPHA), de = t.getParameter(t.BLEND_DST_ALPHA), _ = t.getParameter(t.BLEND_EQUATION_RGB), b = t.getParameter(t.BLEND_EQUATION_ALPHA), v = t.isEnabled(t.DEPTH_TEST), $ = t.isEnabled(t.SCISSOR_TEST), X = t.isEnabled(t.STENCIL_TEST), U = t.isEnabled(t.CULL_FACE), R = t.getParameter(t.COLOR_WRITEMASK), M = t.getParameter(t.UNPACK_FLIP_Y_WEBGL), F = L ? t.getParameter(Xo) : null, O = !L && it >= 0 ? Ni(t, it) : null, j = !L && ot >= 0 ? Ni(t, ot) : null;
5125
+ const K = t.getParameter(t.TEXTURE_BINDING_2D), C = t.getParameter(t.ARRAY_BUFFER_BINDING), H = t.getParameter(t.FRAMEBUFFER_BINDING), B = t.getParameter(t.VIEWPORT), J = t.isEnabled(t.BLEND), oe = t.getParameter(t.BLEND_SRC_RGB), se = t.getParameter(t.BLEND_DST_RGB), Y = t.getParameter(t.BLEND_SRC_ALPHA), de = t.getParameter(t.BLEND_DST_ALPHA), _ = t.getParameter(t.BLEND_EQUATION_RGB), b = t.getParameter(t.BLEND_EQUATION_ALPHA), v = t.isEnabled(t.DEPTH_TEST), $ = t.isEnabled(t.SCISSOR_TEST), X = t.isEnabled(t.STENCIL_TEST), U = t.isEnabled(t.CULL_FACE), R = t.getParameter(t.COLOR_WRITEMASK), M = t.getParameter(t.UNPACK_FLIP_Y_WEBGL), F = L ? t.getParameter(Wo) : null, O = !L && it >= 0 ? Bi(t, it) : null, j = !L && ot >= 0 ? Bi(t, ot) : null;
5115
5126
  t.bindFramebuffer(t.FRAMEBUFFER, null), t.viewport(0, 0, i, o), t.useProgram(Ue), t.enable(t.BLEND), t.blendEquation(t.FUNC_ADD), t.blendFunc(t.SRC_ALPHA, t.ONE_MINUS_SRC_ALPHA), t.disable(t.DEPTH_TEST), t.disable(t.SCISSOR_TEST), t.disable(t.STENCIL_TEST), t.disable(t.CULL_FACE), t.colorMask(!0, !0, !0, !0), t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL, 0), t.bindTexture(t.TEXTURE_2D, s), t.uniform1i(t.getUniformLocation(Ue, "u_tex"), 0), t.uniform1f(t.getUniformLocation(Ue, "u_alpha"), 1);
5116
5127
  const z = new Float32Array([
5117
5128
  m,
@@ -5139,12 +5150,20 @@ function q1(t, e, n) {
5139
5150
  1,
5140
5151
  1
5141
5152
  ]);
5142
- L ? (lt.bind(Pn), t.bindBuffer(t.ARRAY_BUFFER, Kt), t.bufferData(t.ARRAY_BUFFER, z, t.DYNAMIC_DRAW)) : (t.bindBuffer(t.ARRAY_BUFFER, Kt), t.bufferData(t.ARRAY_BUFFER, z, t.DYNAMIC_DRAW), it >= 0 && (t.enableVertexAttribArray(it), t.vertexAttribPointer(it, 2, t.FLOAT, !1, 16, 0)), ot >= 0 && (t.enableVertexAttribArray(ot), t.vertexAttribPointer(ot, 2, t.FLOAT, !1, 16, 8))), t.drawArrays(t.TRIANGLES, 0, 6), L ? lt.bind(F) : (j && Mi(t, j), O && Mi(t, O)), t.bindFramebuffer(t.FRAMEBUFFER, H), t.viewport(B[0], B[1], B[2], B[3]), t.bindBuffer(t.ARRAY_BUFFER, C), t.colorMask(R[0], R[1], R[2], R[3]), t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL, M ? 1 : 0), $ ? t.enable(t.SCISSOR_TEST) : t.disable(t.SCISSOR_TEST), X ? t.enable(t.STENCIL_TEST) : t.disable(t.STENCIL_TEST), U ? t.enable(t.CULL_FACE) : t.disable(t.CULL_FACE), v ? t.enable(t.DEPTH_TEST) : t.disable(t.DEPTH_TEST), J ? t.enable(t.BLEND) : t.disable(t.BLEND), t.blendFuncSeparate(oe, se, Y, de), t.blendEquationSeparate(_, b), t.activeTexture(t.TEXTURE0), t.bindTexture(t.TEXTURE_2D, K), t.activeTexture(q), t.useProgram(N);
5153
+ L ? (lt.bind(Pn), t.bindBuffer(t.ARRAY_BUFFER, Kt), t.bufferData(t.ARRAY_BUFFER, z, t.DYNAMIC_DRAW)) : (t.bindBuffer(t.ARRAY_BUFFER, Kt), t.bufferData(t.ARRAY_BUFFER, z, t.DYNAMIC_DRAW), it >= 0 && (t.enableVertexAttribArray(it), t.vertexAttribPointer(it, 2, t.FLOAT, !1, 16, 0)), ot >= 0 && (t.enableVertexAttribArray(ot), t.vertexAttribPointer(ot, 2, t.FLOAT, !1, 16, 8))), t.drawArrays(t.TRIANGLES, 0, 6), L ? lt.bind(F) : (j && Oi(t, j), O && Oi(t, O)), t.bindFramebuffer(t.FRAMEBUFFER, H), t.viewport(B[0], B[1], B[2], B[3]), t.bindBuffer(t.ARRAY_BUFFER, C), t.colorMask(R[0], R[1], R[2], R[3]), t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL, M ? 1 : 0), $ ? t.enable(t.SCISSOR_TEST) : t.disable(t.SCISSOR_TEST), X ? t.enable(t.STENCIL_TEST) : t.disable(t.STENCIL_TEST), U ? t.enable(t.CULL_FACE) : t.disable(t.CULL_FACE), v ? t.enable(t.DEPTH_TEST) : t.disable(t.DEPTH_TEST), J ? t.enable(t.BLEND) : t.disable(t.BLEND), t.blendFuncSeparate(oe, se, Y, de), t.blendEquationSeparate(_, b), t.activeTexture(t.TEXTURE0), t.bindTexture(t.TEXTURE_2D, K), t.activeTexture(q), t.useProgram(N);
5143
5154
  }
5144
- class H1 {
5155
+ class Nr {
5145
5156
  canvas = null;
5146
5157
  ctx = null;
5147
5158
  gl = null;
5159
+ /**
5160
+ * True once the canvas has acquired ANY rendering context — set by the
5161
+ * getContext interceptor for every successful acquisition, including types
5162
+ * the runtime has no tracked field for (webgpu, bitmaprenderer). One arm of
5163
+ * the frame-painted predicate in renderFrame. Never reset: a canvas's
5164
+ * context mode is permanent once acquired.
5165
+ */
5166
+ contextAcquired = !1;
5148
5167
  isRunning = !1;
5149
5168
  // Host-driven render-loop pause (via 'set-render-loop-paused'). Stops rendering
5150
5169
  // (no draws → no GPU work while hidden) but does NOT touch the scene clock —
@@ -5183,8 +5202,19 @@ class H1 {
5183
5202
  * always picks them up).
5184
5203
  */
5185
5204
  controlPort = null;
5186
- // Pending capture requests (queue to handle multiple simultaneous requests)
5205
+ // Pending capture requests (queue to handle multiple simultaneous requests).
5206
+ // Entries are stamped at enqueue so the frame tail can evict requests whose
5207
+ // host-side RPC has already timed out (see CAPTURE_QUEUE_TTL_MS).
5187
5208
  pendingCaptures = [];
5209
+ /**
5210
+ * How long a queued capture stays eligible before the frame tail evicts
5211
+ * it. Must be >= the host-side captureFrame RPC timeout (10s,
5212
+ * `VijiCore.captureFrame`): an evicted entry's caller has already rejected
5213
+ * with MESSAGE_TIMEOUT, so executing it would be dead work — a full pixel
5214
+ * readback + encode with no receiver. Eviction also keeps the queue
5215
+ * bounded on a scene that never paints.
5216
+ */
5217
+ static CAPTURE_QUEUE_TTL_MS = 1e4;
5188
5218
  /**
5189
5219
  * Inject the scene error reporter. Called once from the worker bootstrap
5190
5220
  * after both runtime and reporter are constructed. The render-loop catch
@@ -5224,7 +5254,7 @@ class H1 {
5224
5254
  interactionSystem;
5225
5255
  // Live capability + performance monitor. Gated on host listener presence via
5226
5256
  // the 'enable-capability-reporting' message; zero per-frame cost when off.
5227
- capabilityMonitor = new $c();
5257
+ capabilityMonitor = new jc();
5228
5258
  // Active fenced-benchmark session (runFencedBenchmark). While set, each
5229
5259
  // rendered frame is fenced (gl.finish) and recorded; steady-state reporting
5230
5260
  // is suppressed for the duration. Cleared when frameCount frames are collected.
@@ -5351,9 +5381,9 @@ class H1 {
5351
5381
  useContext: (e) => e === "2d" ? (!this.ctx && this.canvas && (this.ctx = this.canvas.getContext("2d"), this.viji.ctx = this.ctx), this.ctx) : e === "webgl" || e === "webgl2" ? (!this.gl && this.canvas && (this.gl = e === "webgl2" ? this.canvas.getContext("webgl2") : this.canvas.getContext("webgl"), this.viji.gl = this.gl, this.gl && this.gl.viewport(0, 0, this.viji.width, this.viji.height)), this.gl) : null
5352
5382
  };
5353
5383
  constructor() {
5354
- this.parameterSystem = new Dc((e, n) => {
5384
+ this.parameterSystem = new Lc((e, n) => {
5355
5385
  this.postMessage(e, n);
5356
- }), this.interactionSystem = new Lc(), this.videoSystems[0] = new pn(), this.videoSystems[0].setCVMessaging(0, (e, n) => {
5386
+ }), this.interactionSystem = new Fc(), this.videoSystems[0] = new pn(), this.videoSystems[0].setCVMessaging(0, (e, n) => {
5357
5387
  this.postMessage("cv-feature-request", { streamIndex: e, desired: n });
5358
5388
  }), this.viji.video.cv = this.videoSystems[0].getCvSurface(), Object.assign(this.viji, this.interactionSystem.getInteractionAPIs()), this.viji.audio.getFrequencyData = () => this.audioFrequencyData, this.viji.audio.getWaveform = () => this.audioWaveformData, this.capabilityMonitor.setTransitionCallback((e) => {
5359
5389
  this.postMessage("capability-transition", e);
@@ -5517,7 +5547,7 @@ class H1 {
5517
5547
  */
5518
5548
  async initP5Mode(e, n, s) {
5519
5549
  try {
5520
- this.rendererType = "p5", this.debugLog("🎨 Initializing P5.js mode..."), this.p5Adapter = new jc(
5550
+ this.rendererType = "p5", this.debugLog("🎨 Initializing P5.js mode..."), this.p5Adapter = new Vc(
5521
5551
  this.canvas,
5522
5552
  this.viji,
5523
5553
  {
@@ -5658,7 +5688,7 @@ class H1 {
5658
5688
  updateVijiAudioStreams() {
5659
5689
  const e = [];
5660
5690
  for (const [n, s] of this.audioStreamStates)
5661
- n >= Oc && n < pi && e.push({ index: n, ...s });
5691
+ n >= $c && n < bi && e.push({ index: n, ...s });
5662
5692
  e.sort((n, s) => n.index - s.index), this.viji.audioStreams.length = e.length;
5663
5693
  for (let n = 0; n < e.length; n++) {
5664
5694
  const s = e[n], i = s.frequencyData, o = s.waveformData;
@@ -5777,10 +5807,10 @@ class H1 {
5777
5807
  this.handleCaptureFrame(e);
5778
5808
  break;
5779
5809
  case "sc-update":
5780
- Ci(e.data.t);
5810
+ Di(e.data.t);
5781
5811
  break;
5782
5812
  case "rh-update":
5783
- Fi(e.data.h);
5813
+ Ni(e.data.h);
5784
5814
  break;
5785
5815
  }
5786
5816
  }
@@ -5790,8 +5820,8 @@ class H1 {
5790
5820
  const n = this.canvas.getContext.bind(this.canvas);
5791
5821
  this.canvas.getContext = (s, i) => {
5792
5822
  const o = n(s, i);
5793
- return o && (s === "2d" ? (this.ctx = o, this.viji.ctx = this.ctx) : (s === "webgl" || s === "webgl2") && (this.gl = o, this.viji.gl = this.gl)), o;
5794
- }, this.viji.width = this.canvas.width, this.viji.height = this.canvas.height, await R1(), e.data.sc && await Ci(e.data.sc), M1(this.canvas), e.data.rh !== void 0 && Fi(e.data.rh), e.data.controlPort && (this.controlPort = e.data.controlPort, this.controlPort.onmessage = (s) => {
5823
+ return o && (this.contextAcquired = !0, s === "2d" ? (this.ctx = o, this.viji.ctx = this.ctx) : (s === "webgl" || s === "webgl2") && (this.gl = o, this.viji.gl = this.gl)), o;
5824
+ }, this.viji.width = this.canvas.width, this.viji.height = this.canvas.height, await C1(), e.data.sc && await Di(e.data.sc), B1(this.canvas), e.data.rh !== void 0 && Ni(e.data.rh), e.data.controlPort && (this.controlPort = e.data.controlPort, this.controlPort.onmessage = (s) => {
5795
5825
  this.dispatchMessage(s.data);
5796
5826
  }), this.startRenderLoop(), self.postMessage({
5797
5827
  type: "init-response",
@@ -5907,7 +5937,7 @@ class H1 {
5907
5937
  spectral: { ...n.spectral },
5908
5938
  frequencyData: s,
5909
5939
  waveformData: i
5910
- }), this.updateVijiAudioStreams(), e >= pi && this.wireDeviceAudio(e);
5940
+ }), this.updateVijiAudioStreams(), e >= bi && this.wireDeviceAudio(e);
5911
5941
  }
5912
5942
  /**
5913
5943
  * Wires `viji.devices[n].audio` for the device mapped to the given audio
@@ -6061,7 +6091,7 @@ class H1 {
6061
6091
  * Defers capture to immediately after the next render completes to avoid race conditions.
6062
6092
  */
6063
6093
  async handleCaptureFrame(e) {
6064
- this.pendingCaptures.push(e), this.debugLog(`Capture queued: ${e.data.format || "blob"} (${this.pendingCaptures.length} pending)`);
6094
+ this.pendingCaptures.push({ queuedAt: performance.now(), message: e }), this.debugLog(`Capture queued: ${e.data.format || "blob"} (${this.pendingCaptures.length} pending)`);
6065
6095
  }
6066
6096
  /**
6067
6097
  * Execute a capture frame request immediately after render completes.
@@ -6130,7 +6160,7 @@ class H1 {
6130
6160
  * capture snapshots its pixels synchronously before its first await).
6131
6161
  */
6132
6162
  runCaptures(e) {
6133
- for (const n of e)
6163
+ for (const { message: n } of e)
6134
6164
  this.executeCaptureFrame(n).catch((s) => {
6135
6165
  console.error("Capture execution error:", s);
6136
6166
  });
@@ -6138,24 +6168,26 @@ class H1 {
6138
6168
  /**
6139
6169
  * Auto-capture for frame sources. Called from exactly one frame-tail slot
6140
6170
  * per frame, chosen by `autoCaptureFormat.frame` (plate = pre-overlay,
6141
- * display = post-overlay).
6171
+ * display = post-overlay). The caller gates on the frame-painted predicate,
6172
+ * so this only runs on ticks where artist code actually drew — no black
6173
+ * frames during scene setup / shader compile, no torn frames from throwing
6174
+ * renders. No context probe here: getContext is creative and would bind the
6175
+ * wrong context type on a not-yet-bound canvas; createImageBitmap reads the
6176
+ * canvas bitmap regardless of context type.
6142
6177
  */
6143
6178
  runAutoCapture() {
6144
6179
  if (!(!this.autoCaptureEnabled || !this.canvas))
6145
6180
  try {
6146
- if (this.gl ?? this.ctx) {
6147
- const n = this.autoCaptureFormat.flipY ? { imageOrientation: "flipY" } : {};
6148
- createImageBitmap(this.canvas, n).then((s) => {
6149
- this.postMessage(
6150
- "auto-capture-result",
6151
- { bitmap: s, timestamp: performance.now() },
6152
- [s]
6153
- );
6154
- }).catch((s) => {
6155
- console.warn("[AutoCapture] ImageBitmap creation failed:", s);
6156
- });
6157
- } else
6158
- this.debugMode && this.frameCount % 60 === 0 && this.debugLog("[AutoCapture] No context yet, skipping capture");
6181
+ const e = this.autoCaptureFormat.flipY ? { imageOrientation: "flipY" } : {};
6182
+ createImageBitmap(this.canvas, e).then((n) => {
6183
+ this.postMessage(
6184
+ "auto-capture-result",
6185
+ { bitmap: n, timestamp: performance.now() },
6186
+ [n]
6187
+ );
6188
+ }).catch((n) => {
6189
+ console.warn("[AutoCapture] ImageBitmap creation failed:", n);
6190
+ });
6159
6191
  } catch (e) {
6160
6192
  console.warn("[AutoCapture] Failed:", e);
6161
6193
  }
@@ -6175,15 +6207,14 @@ class H1 {
6175
6207
  try {
6176
6208
  if (this.shaderAdapter && this.rendererType === "shader") {
6177
6209
  const m = this.parameterSystem.getAllParameterObjects();
6178
- this.shaderAdapter.render(this.viji, m);
6210
+ c = this.shaderAdapter.render(this.viji, m);
6179
6211
  } else if (this.p5Adapter && this.rendererType === "p5") {
6180
6212
  const m = this.parameterSystem.getAllParameterObjects();
6181
- this.p5Adapter.tick(this.viji, m);
6213
+ c = this.p5Adapter.tick(this.viji, m);
6182
6214
  } else {
6183
6215
  const m = self.renderFunction;
6184
- m && typeof m == "function" && m(this.viji);
6216
+ m && typeof m == "function" && (m(this.viji), c = !0);
6185
6217
  }
6186
- c = !0;
6187
6218
  } catch (m) {
6188
6219
  const g = m;
6189
6220
  console.error("Render error:", g), this.sceneErrorReporter ? this.sceneErrorReporter.reportSceneError({
@@ -6196,22 +6227,28 @@ class H1 {
6196
6227
  stack: g.stack
6197
6228
  });
6198
6229
  }
6199
- if (c && this.sceneErrorReporter && this.sceneErrorReporter.markFirstFrameProduced(), this.benchmark) {
6230
+ const u = c && this.contextAcquired;
6231
+ if (u && this.sceneErrorReporter && this.sceneErrorReporter.markFirstFrameProduced(), this.benchmark) {
6200
6232
  const m = performance.now() - o;
6201
6233
  this.recordBenchmarkFrame(e, m);
6202
6234
  } else if (this.capabilityMonitor.isEnabled()) {
6203
6235
  const m = performance.now() - o;
6204
6236
  this.recordCapabilityFrame(e, m, i);
6205
6237
  }
6206
- this.parameterSystem.resetButtonParameters();
6207
- const u = this.pendingCaptures;
6208
- this.pendingCaptures = [];
6209
- const h = u.filter((m) => m.data.frame === "display"), f = u.filter((m) => m.data.frame !== "display");
6210
- if (this.runCaptures(f), this.autoCaptureFormat.frame !== "display" && this.runAutoCapture(), !this._isHeadless && this.canvas) {
6211
- const m = C1("b", 0);
6212
- O1(this.canvas, this.ctx, this.gl, m, this._displayScale);
6238
+ if (this.parameterSystem.resetButtonParameters(), this.pendingCaptures.length > 0) {
6239
+ const m = performance.now() - Nr.CAPTURE_QUEUE_TTL_MS;
6240
+ this.pendingCaptures = this.pendingCaptures.filter((g) => g.queuedAt >= m);
6213
6241
  }
6214
- this.runCaptures(h), this.autoCaptureFormat.frame === "display" && this.runAutoCapture();
6242
+ let h = [], f = [];
6243
+ if (u) {
6244
+ const m = this.pendingCaptures;
6245
+ this.pendingCaptures = [], f = m.filter((g) => g.message.data.frame === "display"), h = m.filter((g) => g.message.data.frame !== "display");
6246
+ }
6247
+ if (this.runCaptures(h), u && this.autoCaptureFormat.frame !== "display" && this.runAutoCapture(), !this._isHeadless && this.canvas) {
6248
+ const m = P1("b", 0);
6249
+ $1(this.canvas, this.ctx, this.gl, m, this._displayScale);
6250
+ }
6251
+ this.runCaptures(f), u && this.autoCaptureFormat.frame === "display" && this.runAutoCapture();
6215
6252
  }
6216
6253
  this.benchmark || this.reportPerformanceStats(e), this.interactionSystem.frameStart(), this.resetAudioFrameEvents(), this.scheduleNextFrame();
6217
6254
  }
@@ -6462,7 +6499,7 @@ class er {
6462
6499
  return n === "shader" ? (i.mouse.position = /\bu_mouse(\b|InCanvas|Delta|Wheel)/.test(s), i.mouse.left = /\bu_mouse(Left|Pressed|WasPressed|WasReleased)\b/.test(s), i.mouse.right = /\bu_mouseRight\b/.test(s), i.mouse.middle = /\bu_mouseMiddle\b/.test(s), i.pointer.position = /\bu_pointer(\b|Delta|InCanvas)/.test(s), i.pointer.down = /\bu_pointer(Down|WasPressed|WasReleased)\b/.test(s), i.touch = /\bu_touch/.test(s)) : (i.mouse.position = /\bmouse\.(x|y|deltaX|deltaY|wheelDelta|wheelX|wheelY|wasMoved)\b/.test(s), i.mouse.left = /\bmouse\.(leftButton|isPressed|wasPressed|wasReleased)\b/.test(s), i.mouse.right = /\bmouse\.rightButton\b/.test(s), i.mouse.middle = /\bmouse\.middleButton\b/.test(s), i.pointer.position = /\bpointer\.(x|y|deltaX|deltaY)\b/.test(s), i.pointer.down = /\bpointer\.(isDown|wasPressed|wasReleased)\b/.test(s), i.touch = /\btouches\./.test(s)), i;
6463
6500
  }
6464
6501
  }
6465
- const Ur = 5, X1 = (1 << Ur) - 1, W1 = 1 << Ur, G1 = (() => {
6502
+ const Mr = 5, X1 = (1 << Mr) - 1, W1 = 1 << Mr, G1 = (() => {
6466
6503
  const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", e = new Int8Array(128).fill(-1);
6467
6504
  for (let n = 0; n < t.length; n++)
6468
6505
  e[t.charCodeAt(n)] = n;
@@ -6476,7 +6513,7 @@ function Wt(t, e) {
6476
6513
  const c = t.charCodeAt(e.index++), u = c < 128 ? G1[c] : -1;
6477
6514
  if (u < 0)
6478
6515
  throw new Error(`VLQ decode: invalid base64 character '${t[e.index - 1]}'`);
6479
- i = u & W1, n += (u & X1) << s, s += Ur;
6516
+ i = u & W1, n += (u & X1) << s, s += Mr;
6480
6517
  } while (i);
6481
6518
  const o = n & 1;
6482
6519
  return n >>>= 1, o ? -n : n;
@@ -6551,10 +6588,10 @@ class J1 {
6551
6588
  */
6552
6589
  envelopeSeq = 0;
6553
6590
  constructor(e, n = {}) {
6554
- this.config = { ...Z1, ...n }, this.post = e, this.errorChannel = new Bi(
6591
+ this.config = { ...Z1, ...n }, this.post = e, this.errorChannel = new $i(
6555
6592
  this.config.errorCoalescingWindowMs,
6556
6593
  (s) => this.postEnvelope("scene-error", s)
6557
- ), this.consoleChannel = new Bi(
6594
+ ), this.consoleChannel = new $i(
6558
6595
  this.config.consoleCoalescingWindowMs,
6559
6596
  (s) => this.postEnvelope("scene-console", s)
6560
6597
  ), this.detectFunctionBodyOffset();
@@ -6601,7 +6638,7 @@ class J1 {
6601
6638
  * routes through the error coalescing channel.
6602
6639
  */
6603
6640
  reportSceneError(e) {
6604
- const n = e.stack, s = e.sourceOverride ? { source: e.sourceOverride, sourceLocation: e.sourceLocationOverride } : this.attributeFromStack(n), i = e.sourceLocationOverride ?? s.sourceLocation, o = this.hasProducedFirstFrame ? "render" : "init", c = Oi([
6641
+ const n = e.stack, s = e.sourceOverride ? { source: e.sourceOverride, sourceLocation: e.sourceLocationOverride } : this.attributeFromStack(n), i = e.sourceLocationOverride ?? s.sourceLocation, o = this.hasProducedFirstFrame ? "render" : "init", c = ji([
6605
6642
  e.message,
6606
6643
  e.code,
6607
6644
  i ? `${i.line}:${i.column ?? "?"}` : "no-loc"
@@ -6645,7 +6682,7 @@ class J1 {
6645
6682
  forwardConsoleCall(e, n) {
6646
6683
  const i = (n.length > this.config.consoleMaxArgsPerCall ? [...n.slice(0, this.config.consoleMaxArgsPerCall), "…[truncated args]"] : n).map(
6647
6684
  (m) => Q1(m, this.config.consoleArgMaxBytes)
6648
- ), o = Oi([e, ...i]), c = Date.now();
6685
+ ), o = ji([e, ...i]), c = Date.now();
6649
6686
  if (c - this.rateCapWindowStart >= this.rateCapWindowMs && (this.rateCapWindowStart = c, this.rateCapSignaturesInWindow = 0, this.rateCapSuppressionFiredInWindow = !1), !this.consoleChannel.hasPending(o)) {
6650
6687
  if (this.rateCapSignaturesInWindow >= this.config.consoleMaxUniqueSignaturesPerSecond) {
6651
6688
  this.rateCapSuppressionFiredInWindow || (this.rateCapSuppressionFiredInWindow = !0, this.emitSuppressionNotice());
@@ -6741,7 +6778,7 @@ class J1 {
6741
6778
  });
6742
6779
  }
6743
6780
  }
6744
- class Bi {
6781
+ class $i {
6745
6782
  windowMs;
6746
6783
  emitFn;
6747
6784
  pending = /* @__PURE__ */ new Map();
@@ -6811,7 +6848,7 @@ function eu(t) {
6811
6848
  return "[unstringifiable]";
6812
6849
  }
6813
6850
  }
6814
- function Oi(t) {
6851
+ function ji(t) {
6815
6852
  let s = 2166136261;
6816
6853
  const o = t.join("");
6817
6854
  for (let c = 0; c < o.length; c++)
@@ -7111,38 +7148,38 @@ var r;
7111
7148
  t[t._typeof = Vs] = "_typeof";
7112
7149
  const qs = 98960;
7113
7150
  t[t._void = qs] = "_void";
7114
- const oc = 99984;
7115
- t[t._delete = oc] = "_delete";
7116
- const ac = 100880;
7117
- t[t._async = ac] = "_async";
7118
- const cc = 101904;
7119
- t[t._get = cc] = "_get";
7120
- const uc = 102928;
7121
- t[t._set = uc] = "_set";
7122
- const lc = 103952;
7123
- t[t._declare = lc] = "_declare";
7124
- const fc = 104976;
7125
- t[t._readonly = fc] = "_readonly";
7126
- const hc = 106e3;
7127
- t[t._abstract = hc] = "_abstract";
7128
- const dc = 107024;
7129
- t[t._static = dc] = "_static";
7130
- const mc = 107536;
7131
- t[t._public = mc] = "_public";
7132
- const pc = 108560;
7133
- t[t._private = pc] = "_private";
7134
- const gc = 109584;
7135
- t[t._protected = gc] = "_protected";
7136
- const bc = 110608;
7137
- t[t._override = bc] = "_override";
7138
- const _c = 112144;
7139
- t[t._as = _c] = "_as";
7140
- const yc = 113168;
7141
- t[t._enum = yc] = "_enum";
7142
- const kc = 114192;
7143
- t[t._type = kc] = "_type";
7144
- const vc = 115216;
7145
- t[t._implements = vc] = "_implements";
7151
+ const ac = 99984;
7152
+ t[t._delete = ac] = "_delete";
7153
+ const cc = 100880;
7154
+ t[t._async = cc] = "_async";
7155
+ const uc = 101904;
7156
+ t[t._get = uc] = "_get";
7157
+ const lc = 102928;
7158
+ t[t._set = lc] = "_set";
7159
+ const fc = 103952;
7160
+ t[t._declare = fc] = "_declare";
7161
+ const hc = 104976;
7162
+ t[t._readonly = hc] = "_readonly";
7163
+ const dc = 106e3;
7164
+ t[t._abstract = dc] = "_abstract";
7165
+ const mc = 107024;
7166
+ t[t._static = mc] = "_static";
7167
+ const pc = 107536;
7168
+ t[t._public = pc] = "_public";
7169
+ const gc = 108560;
7170
+ t[t._private = gc] = "_private";
7171
+ const bc = 109584;
7172
+ t[t._protected = bc] = "_protected";
7173
+ const _c = 110608;
7174
+ t[t._override = _c] = "_override";
7175
+ const yc = 112144;
7176
+ t[t._as = yc] = "_as";
7177
+ const kc = 113168;
7178
+ t[t._enum = kc] = "_enum";
7179
+ const vc = 114192;
7180
+ t[t._type = vc] = "_type";
7181
+ const wc = 115216;
7182
+ t[t._implements = wc] = "_implements";
7146
7183
  })(r || (r = {}));
7147
7184
  function tu(t) {
7148
7185
  switch (t) {
@@ -7675,9 +7712,9 @@ var p;
7675
7712
  const qs = 8233;
7676
7713
  t[t.paragraphSeparator = qs] = "paragraphSeparator";
7677
7714
  })(p || (p = {}));
7678
- let Hn, le, fe, a, P, Wo;
7715
+ let Hn, le, fe, a, P, Go;
7679
7716
  function en() {
7680
- return Wo++;
7717
+ return Go++;
7681
7718
  }
7682
7719
  function su(t) {
7683
7720
  if ("pos" in t) {
@@ -7698,12 +7735,12 @@ function iu(t) {
7698
7735
  return new ru(e, n);
7699
7736
  }
7700
7737
  function ou(t, e, n, s) {
7701
- P = t, a = new Pe(), Wo = 1, Hn = e, le = n, fe = s;
7738
+ P = t, a = new Pe(), Go = 1, Hn = e, le = n, fe = s;
7702
7739
  }
7703
7740
  function V(t) {
7704
7741
  return a.contextualKeyword === t;
7705
7742
  }
7706
- function Nr(t) {
7743
+ function Br(t) {
7707
7744
  const e = ln();
7708
7745
  return e.type === r.name && e.contextualKeyword === t;
7709
7746
  }
@@ -7725,8 +7762,8 @@ function De() {
7725
7762
  }
7726
7763
  return !1;
7727
7764
  }
7728
- function Go() {
7729
- const t = Mr();
7765
+ function Yo() {
7766
+ const t = Or();
7730
7767
  for (let e = a.end; e < t; e++) {
7731
7768
  const n = P.charCodeAt(e);
7732
7769
  if (n === p.lineFeed || n === p.carriageReturn || n === 8232 || n === 8233)
@@ -7749,7 +7786,7 @@ function te(t = "Unexpected token", e = a.start) {
7749
7786
  const n = new SyntaxError(t);
7750
7787
  n.pos = e, a.error = n, a.pos = P.length, ee(r.eof);
7751
7788
  }
7752
- const Yo = [
7789
+ const zo = [
7753
7790
  9,
7754
7791
  11,
7755
7792
  12,
@@ -7786,9 +7823,9 @@ const Yo = [
7786
7823
  // IDEOGRAPHIC SPACE
7787
7824
  65279
7788
7825
  // ZERO WIDTH NO-BREAK SPACE
7789
- ], $i = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, zo = new Uint8Array(65536);
7790
- for (const t of Yo)
7791
- zo[t] = 1;
7826
+ ], Vi = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, Ko = new Uint8Array(65536);
7827
+ for (const t of zo)
7828
+ Ko[t] = 1;
7792
7829
  function au(t) {
7793
7830
  if (t < 48) return t === 36;
7794
7831
  if (t < 58) return !0;
@@ -7804,14 +7841,14 @@ for (let t = 0; t < 128; t++)
7804
7841
  Ge[t] = au(t) ? 1 : 0;
7805
7842
  for (let t = 128; t < 65536; t++)
7806
7843
  Ge[t] = 1;
7807
- for (const t of Yo)
7844
+ for (const t of zo)
7808
7845
  Ge[t] = 0;
7809
7846
  Ge[8232] = 0;
7810
7847
  Ge[8233] = 0;
7811
7848
  const un = Ge.slice();
7812
7849
  for (let t = p.digit0; t <= p.digit9; t++)
7813
7850
  un[t] = 0;
7814
- const ji = new Int32Array([
7851
+ const qi = new Int32Array([
7815
7852
  // ""
7816
7853
  -1,
7817
7854
  27,
@@ -17112,12 +17149,12 @@ const ji = new Int32Array([
17112
17149
  function cu() {
17113
17150
  let t = 0, e = 0, n = a.pos;
17114
17151
  for (; n < P.length && (e = P.charCodeAt(n), !(e < p.lowercaseA || e > p.lowercaseZ)); ) {
17115
- const i = ji[t + (e - p.lowercaseA) + 1];
17152
+ const i = qi[t + (e - p.lowercaseA) + 1];
17116
17153
  if (i === -1)
17117
17154
  break;
17118
17155
  t = i, n++;
17119
17156
  }
17120
- const s = ji[t];
17157
+ const s = qi[t];
17121
17158
  if (s > -1 && !Ge[e]) {
17122
17159
  a.pos = n, s & 1 ? ee(s >>> 1) : ee(r.name, s >>> 1);
17123
17160
  return;
@@ -17175,7 +17212,7 @@ var Xe;
17175
17212
  const i = s + 1;
17176
17213
  t[t.KeyAfterPropSpread = i] = "KeyAfterPropSpread";
17177
17214
  })(Xe || (Xe = {}));
17178
- function Ko(t) {
17215
+ function Zo(t) {
17179
17216
  const e = t.identifierRole;
17180
17217
  return e === G.TopLevelDeclaration || e === G.FunctionScopedDeclaration || e === G.BlockScopedDeclaration || e === G.ObjectShorthandTopLevelDeclaration || e === G.ObjectShorthandFunctionScopedDeclaration || e === G.ObjectShorthandBlockScopedDeclaration;
17181
17218
  }
@@ -17183,7 +17220,7 @@ function uu(t) {
17183
17220
  const e = t.identifierRole;
17184
17221
  return e === G.FunctionScopedDeclaration || e === G.BlockScopedDeclaration || e === G.ObjectShorthandFunctionScopedDeclaration || e === G.ObjectShorthandBlockScopedDeclaration;
17185
17222
  }
17186
- function Zo(t) {
17223
+ function Jo(t) {
17187
17224
  const e = t.identifierRole;
17188
17225
  return e === G.TopLevelDeclaration || e === G.ObjectShorthandTopLevelDeclaration || e === G.ImportDeclaration;
17189
17226
  }
@@ -17217,7 +17254,7 @@ class Xn {
17217
17254
  // Tag for `??` operators to denote the root token for this nullish coalescing call.
17218
17255
  }
17219
17256
  function E() {
17220
- a.tokens.push(new Xn()), ta();
17257
+ a.tokens.push(new Xn()), na();
17221
17258
  }
17222
17259
  function dt() {
17223
17260
  a.tokens.push(new Xn()), a.start = a.pos, Ru();
@@ -17237,7 +17274,7 @@ function ne(t) {
17237
17274
  function y(t) {
17238
17275
  return l(t) ? (E(), !0) : !1;
17239
17276
  }
17240
- function Jo(t) {
17277
+ function Qo(t) {
17241
17278
  const e = a.isType;
17242
17279
  a.isType = !0, y(t), a.isType = e;
17243
17280
  }
@@ -17261,19 +17298,19 @@ function ln() {
17261
17298
  const e = a.type, n = a.contextualKeyword;
17262
17299
  return a.restoreFromSnapshot(t), new mu(e, n);
17263
17300
  }
17264
- function Mr() {
17265
- return Qo(a.pos);
17301
+ function Or() {
17302
+ return ea(a.pos);
17266
17303
  }
17267
- function Qo(t) {
17268
- $i.lastIndex = t;
17269
- const e = $i.exec(P);
17304
+ function ea(t) {
17305
+ Vi.lastIndex = t;
17306
+ const e = Vi.exec(P);
17270
17307
  return t + e[0].length;
17271
17308
  }
17272
- function ea() {
17273
- return P.charCodeAt(Mr());
17274
- }
17275
17309
  function ta() {
17276
- if (sa(), a.start = a.pos, a.pos >= P.length) {
17310
+ return P.charCodeAt(Or());
17311
+ }
17312
+ function na() {
17313
+ if (ra(), a.start = a.pos, a.pos >= P.length) {
17277
17314
  const t = a.tokens;
17278
17315
  t.length >= 2 && t[t.length - 1].start >= P.length && t[t.length - 2].start >= P.length && te("Unexpectedly reached the end of input."), ee(r.eof);
17279
17316
  return;
@@ -17281,7 +17318,7 @@ function ta() {
17281
17318
  pu(P.charCodeAt(a.pos));
17282
17319
  }
17283
17320
  function pu(t) {
17284
- un[t] || t === p.backslash || t === p.atSign && P.charCodeAt(a.pos + 1) === p.atSign ? cu() : oa(t);
17321
+ un[t] || t === p.backslash || t === p.atSign && P.charCodeAt(a.pos + 1) === p.atSign ? cu() : aa(t);
17285
17322
  }
17286
17323
  function gu() {
17287
17324
  for (; P.charCodeAt(a.pos) !== p.asterisk || P.charCodeAt(a.pos + 1) !== p.slash; )
@@ -17291,13 +17328,13 @@ function gu() {
17291
17328
  }
17292
17329
  a.pos += 2;
17293
17330
  }
17294
- function na(t) {
17331
+ function sa(t) {
17295
17332
  let e = P.charCodeAt(a.pos += t);
17296
17333
  if (a.pos < P.length)
17297
17334
  for (; e !== p.lineFeed && e !== p.carriageReturn && e !== p.lineSeparator && e !== p.paragraphSeparator && ++a.pos < P.length; )
17298
17335
  e = P.charCodeAt(a.pos);
17299
17336
  }
17300
- function sa() {
17337
+ function ra() {
17301
17338
  for (; a.pos < P.length; ) {
17302
17339
  const t = P.charCodeAt(a.pos);
17303
17340
  switch (t) {
@@ -17314,14 +17351,14 @@ function sa() {
17314
17351
  a.pos += 2, gu();
17315
17352
  break;
17316
17353
  case p.slash:
17317
- na(2);
17354
+ sa(2);
17318
17355
  break;
17319
17356
  default:
17320
17357
  return;
17321
17358
  }
17322
17359
  break;
17323
17360
  default:
17324
- if (zo[t])
17361
+ if (Ko[t])
17325
17362
  ++a.pos;
17326
17363
  else
17327
17364
  return;
@@ -17334,7 +17371,7 @@ function ee(t, e = d.NONE) {
17334
17371
  function bu() {
17335
17372
  const t = P.charCodeAt(a.pos + 1);
17336
17373
  if (t >= p.digit0 && t <= p.digit9) {
17337
- aa(!0);
17374
+ ca(!0);
17338
17375
  return;
17339
17376
  }
17340
17377
  t === p.dot && P.charCodeAt(a.pos + 2) === p.dot ? (a.pos += 3, ee(r.ellipsis)) : (++a.pos, ee(r.dot));
@@ -17390,7 +17427,7 @@ function xu() {
17390
17427
  }
17391
17428
  t === p.equalsTo ? he(r.relationalOrEqual, 2) : he(r.lessThan, 1);
17392
17429
  }
17393
- function ra() {
17430
+ function ia() {
17394
17431
  if (a.isType) {
17395
17432
  he(r.greaterThan, 1);
17396
17433
  return;
@@ -17407,8 +17444,8 @@ function ra() {
17407
17444
  }
17408
17445
  t === p.equalsTo ? he(r.relationalOrEqual, 2) : he(r.greaterThan, 1);
17409
17446
  }
17410
- function ia() {
17411
- a.type === r.greaterThan && (a.pos -= 1, ra());
17447
+ function oa() {
17448
+ a.type === r.greaterThan && (a.pos -= 1, ia());
17412
17449
  }
17413
17450
  function Eu(t) {
17414
17451
  const e = P.charCodeAt(a.pos + 1);
@@ -17428,7 +17465,7 @@ function Su() {
17428
17465
  // tokenized as two individual ? tokens.
17429
17466
  !(fe && a.isType) ? e === p.equalsTo ? he(r.assign, 3) : he(r.nullishCoalescing, 2) : t === p.dot && !(e >= p.digit0 && e <= p.digit9) ? (a.pos += 2, ee(r.questionDot)) : (++a.pos, ee(r.question));
17430
17467
  }
17431
- function oa(t) {
17468
+ function aa(t) {
17432
17469
  switch (t) {
17433
17470
  case p.numberSign:
17434
17471
  ++a.pos, ee(r.hash);
@@ -17488,7 +17525,7 @@ function oa(t) {
17488
17525
  case p.digit7:
17489
17526
  case p.digit8:
17490
17527
  case p.digit9:
17491
- aa(!1);
17528
+ ca(!1);
17492
17529
  return;
17493
17530
  case p.quotationMark:
17494
17531
  case p.apostrophe:
@@ -17516,7 +17553,7 @@ function oa(t) {
17516
17553
  xu();
17517
17554
  return;
17518
17555
  case p.greaterThan:
17519
- ra();
17556
+ ia();
17520
17557
  return;
17521
17558
  case p.equalsTo:
17522
17559
  case p.exclamationMark:
@@ -17574,7 +17611,7 @@ function Iu() {
17574
17611
  }
17575
17612
  P.charCodeAt(a.pos) === p.lowercaseN ? (++a.pos, ee(r.bigint)) : ee(r.num);
17576
17613
  }
17577
- function aa(t) {
17614
+ function ca(t) {
17578
17615
  let e = !1, n = !1;
17579
17616
  t || tr();
17580
17617
  let s = P.charCodeAt(a.pos);
@@ -17933,11 +17970,11 @@ var Pu = /* @__PURE__ */ new Map([
17933
17970
  ["hearts", "♥"],
17934
17971
  ["diams", "♦"]
17935
17972
  ]);
17936
- function ca(t) {
17937
- const [e, n] = Vi(t.jsxPragma || "React.createElement"), [s, i] = Vi(t.jsxFragmentPragma || "React.Fragment");
17973
+ function ua(t) {
17974
+ const [e, n] = Hi(t.jsxPragma || "React.createElement"), [s, i] = Hi(t.jsxFragmentPragma || "React.Fragment");
17938
17975
  return { base: e, suffix: n, fragmentBase: s, fragmentSuffix: i };
17939
17976
  }
17940
- function Vi(t) {
17977
+ function Hi(t) {
17941
17978
  let e = t.indexOf(".");
17942
17979
  return e === -1 && (e = t.length), [t.slice(0, e), t.slice(e)];
17943
17980
  }
@@ -17976,7 +18013,7 @@ class yt extends Ye {
17976
18013
  this.cjsAutomaticModuleNameResolutions = {};
17977
18014
  }
17978
18015
  constructor(e, n, s, i, o) {
17979
- super(), this.rootTransformer = e, this.tokens = n, this.importProcessor = s, this.nameManager = i, this.options = o, yt.prototype.__init.call(this), yt.prototype.__init2.call(this), yt.prototype.__init3.call(this), yt.prototype.__init4.call(this), yt.prototype.__init5.call(this), this.jsxPragmaInfo = ca(o), this.isAutomaticRuntime = o.jsxRuntime === "automatic", this.jsxImportSource = o.jsxImportSource || "react";
18016
+ super(), this.rootTransformer = e, this.tokens = n, this.importProcessor = s, this.nameManager = i, this.options = o, yt.prototype.__init.call(this), yt.prototype.__init2.call(this), yt.prototype.__init3.call(this), yt.prototype.__init4.call(this), yt.prototype.__init5.call(this), this.jsxPragmaInfo = ua(o), this.isAutomaticRuntime = o.jsxRuntime === "automatic", this.jsxImportSource = o.jsxImportSource || "react";
17980
18017
  }
17981
18018
  process() {
17982
18019
  return this.tokens.matches1(r.jsxTagStart) ? (this.processJSXTag(), !0) : !1;
@@ -18141,7 +18178,7 @@ class yt extends Ye {
18141
18178
  e++;
18142
18179
  if (e === this.tokens.currentIndex() + 1) {
18143
18180
  const n = this.tokens.identifierName();
18144
- ua(n) && this.tokens.replaceToken(`'${n}'`);
18181
+ la(n) && this.tokens.replaceToken(`'${n}'`);
18145
18182
  }
18146
18183
  for (; this.tokens.currentIndex() < e; )
18147
18184
  this.rootTransformer.processToken();
@@ -18198,7 +18235,7 @@ class yt extends Ye {
18198
18235
  this.tokens.matches1(r.braceL) ? (this.tokens.replaceToken(""), this.rootTransformer.processBalancedCode(), this.tokens.replaceToken("")) : this.tokens.matches1(r.jsxTagStart) ? this.processJSXTag() : this.processStringPropValue();
18199
18236
  }
18200
18237
  processStringPropValue() {
18201
- const e = this.tokens.currentToken(), n = this.tokens.code.slice(e.start + 1, e.end - 1), s = qi(n), i = Lu(n);
18238
+ const e = this.tokens.currentToken(), n = this.tokens.code.slice(e.start + 1, e.end - 1), s = Xi(n), i = Lu(n);
18202
18239
  this.tokens.replaceToken(i + s);
18203
18240
  }
18204
18241
  /**
@@ -18236,7 +18273,7 @@ class yt extends Ye {
18236
18273
  * Returns true if a string literal is emitted, false otherwise.
18237
18274
  */
18238
18275
  processChildTextElement(e) {
18239
- const n = this.tokens.currentToken(), s = this.tokens.code.slice(n.start, n.end), i = qi(s), o = Du(s);
18276
+ const n = this.tokens.currentToken(), s = this.tokens.code.slice(n.start, n.end), i = Xi(s), o = Du(s);
18240
18277
  return o === '""' ? (this.tokens.replaceToken(i), !1) : (this.tokens.replaceToken(`${e ? ", " : ""}${o}${i}`), !0);
18241
18278
  }
18242
18279
  getDevSource(e) {
@@ -18246,7 +18283,7 @@ class yt extends Ye {
18246
18283
  return this.filenameVarName || (this.filenameVarName = this.nameManager.claimFreeName("_jsxFileName")), this.filenameVarName;
18247
18284
  }
18248
18285
  }
18249
- function ua(t) {
18286
+ function la(t) {
18250
18287
  const e = t.charCodeAt(0);
18251
18288
  return e >= p.lowercaseA && e <= p.lowercaseZ;
18252
18289
  }
@@ -18261,7 +18298,7 @@ function Du(t) {
18261
18298
  n = "", s = !0;
18262
18299
  else {
18263
18300
  if (i && s && (e += " "), e += n, n = "", c === "&") {
18264
- const { entity: u, newI: h } = la(t, o + 1);
18301
+ const { entity: u, newI: h } = fa(t, o + 1);
18265
18302
  o = h - 1, e += u;
18266
18303
  } else
18267
18304
  e += c;
@@ -18270,7 +18307,7 @@ function Du(t) {
18270
18307
  }
18271
18308
  return s || (e += n), JSON.stringify(e);
18272
18309
  }
18273
- function qi(t) {
18310
+ function Xi(t) {
18274
18311
  let e = 0, n = 0;
18275
18312
  for (const s of t)
18276
18313
  s === `
@@ -18291,14 +18328,14 @@ function Lu(t) {
18291
18328
  e += `
18292
18329
  `;
18293
18330
  else if (s === "&") {
18294
- const { entity: i, newI: o } = la(t, n + 1);
18331
+ const { entity: i, newI: o } = fa(t, n + 1);
18295
18332
  e += i, n = o - 1;
18296
18333
  } else
18297
18334
  e += s;
18298
18335
  }
18299
18336
  return JSON.stringify(e);
18300
18337
  }
18301
- function la(t, e) {
18338
+ function fa(t, e) {
18302
18339
  let n = "", s = 0, i, o = e;
18303
18340
  if (t[o] === "#") {
18304
18341
  let c = 10;
@@ -18331,13 +18368,13 @@ function Fu(t) {
18331
18368
  function Uu(t) {
18332
18369
  return t >= p.digit0 && t <= p.digit9 || t >= p.lowercaseA && t <= p.lowercaseF || t >= p.uppercaseA && t <= p.uppercaseF;
18333
18370
  }
18334
- function fa(t, e) {
18335
- const n = ca(e), s = /* @__PURE__ */ new Set();
18371
+ function ha(t, e) {
18372
+ const n = ua(e), s = /* @__PURE__ */ new Set();
18336
18373
  for (let i = 0; i < t.tokens.length; i++) {
18337
18374
  const o = t.tokens[i];
18338
18375
  if (o.type === r.name && !o.isType && (o.identifierRole === G.Access || o.identifierRole === G.ObjectShorthand || o.identifierRole === G.ExportAccess) && !o.shadowsGlobal && s.add(t.identifierNameForToken(o)), o.type === r.jsxTagStart && s.add(n.base), o.type === r.jsxTagStart && i + 1 < t.tokens.length && t.tokens[i + 1].type === r.jsxTagEnd && (s.add(n.base), s.add(n.fragmentBase)), o.type === r.jsxName && o.identifierRole === G.Access) {
18339
18376
  const c = t.identifierNameForToken(o);
18340
- (!ua(c) || t.tokens[i + 1].type === r.dot) && s.add(t.identifierNameForToken(o));
18377
+ (!la(c) || t.tokens[i + 1].type === r.dot) && s.add(t.identifierNameForToken(o));
18341
18378
  }
18342
18379
  }
18343
18380
  return s;
@@ -18371,7 +18408,7 @@ class kt {
18371
18408
  * This includes `import {} from 'foo';`, but not `import 'foo';`.
18372
18409
  */
18373
18410
  pruneTypeOnlyImports() {
18374
- this.nonTypeIdentifiers = fa(this.tokens, this.options);
18411
+ this.nonTypeIdentifiers = ha(this.tokens, this.options);
18375
18412
  for (const [e, n] of this.importInfoByPath.entries()) {
18376
18413
  if (n.hasBareImport || n.hasStarExport || n.exportStarNames.length > 0 || n.namedExports.length > 0)
18377
18414
  continue;
@@ -18475,7 +18512,7 @@ class kt {
18475
18512
  s = i - 1;
18476
18513
  } else {
18477
18514
  const i = this.tokens.tokens[s];
18478
- if (Ko(i)) {
18515
+ if (Zo(i)) {
18479
18516
  const o = this.tokens.identifierNameAtIndex(s);
18480
18517
  this.identifierReplacements.set(o, `exports.${o}`);
18481
18518
  }
@@ -18584,21 +18621,21 @@ class kt {
18584
18621
  ]);
18585
18622
  }
18586
18623
  }
18587
- var Nu = 44, Mu = 59, Hi = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", ha = new Uint8Array(64), Bu = new Uint8Array(128);
18588
- for (let t = 0; t < Hi.length; t++) {
18589
- const e = Hi.charCodeAt(t);
18590
- ha[t] = e, Bu[e] = t;
18624
+ var Nu = 44, Mu = 59, Wi = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", da = new Uint8Array(64), Bu = new Uint8Array(128);
18625
+ for (let t = 0; t < Wi.length; t++) {
18626
+ const e = Wi.charCodeAt(t);
18627
+ da[t] = e, Bu[e] = t;
18591
18628
  }
18592
18629
  function Gt(t, e, n) {
18593
18630
  let s = e - n;
18594
18631
  s = s < 0 ? -s << 1 | 1 : s << 1;
18595
18632
  do {
18596
18633
  let i = s & 31;
18597
- s >>>= 5, s > 0 && (i |= 32), t.write(ha[i]);
18634
+ s >>>= 5, s > 0 && (i |= 32), t.write(da[i]);
18598
18635
  } while (s > 0);
18599
18636
  return e;
18600
18637
  }
18601
- var Xi = 1024 * 16, Wi = typeof TextDecoder < "u" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer < "u" ? {
18638
+ var Gi = 1024 * 16, Yi = typeof TextDecoder < "u" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer < "u" ? {
18602
18639
  decode(t) {
18603
18640
  return Buffer.from(t.buffer, t.byteOffset, t.byteLength).toString();
18604
18641
  }
@@ -18611,15 +18648,15 @@ var Xi = 1024 * 16, Wi = typeof TextDecoder < "u" ? /* @__PURE__ */ new TextDeco
18611
18648
  }
18612
18649
  }, Ou = class {
18613
18650
  constructor() {
18614
- this.pos = 0, this.out = "", this.buffer = new Uint8Array(Xi);
18651
+ this.pos = 0, this.out = "", this.buffer = new Uint8Array(Gi);
18615
18652
  }
18616
18653
  write(t) {
18617
18654
  const { buffer: e } = this;
18618
- e[this.pos++] = t, this.pos === Xi && (this.out += Wi.decode(e), this.pos = 0);
18655
+ e[this.pos++] = t, this.pos === Gi && (this.out += Yi.decode(e), this.pos = 0);
18619
18656
  }
18620
18657
  flush() {
18621
18658
  const { buffer: t, out: e, pos: n } = this;
18622
- return n > 0 ? e + Wi.decode(t.subarray(0, n)) : e;
18659
+ return n > 0 ? e + Yi.decode(t.subarray(0, n)) : e;
18623
18660
  }
18624
18661
  };
18625
18662
  function $u(t) {
@@ -18779,7 +18816,7 @@ function qu(t, e) {
18779
18816
  const { array: s, _indexes: i } = t, o = s.push(e);
18780
18817
  return i[e] = o - 1;
18781
18818
  }
18782
- var Hu = 0, Xu = 1, Wu = 2, Gu = 3, Yu = 4, da = -1, zu = class {
18819
+ var Hu = 0, Xu = 1, Wu = 2, Gu = 3, Yu = 4, ma = -1, zu = class {
18783
18820
  constructor({ file: t, sourceRoot: e } = {}) {
18784
18821
  this._names = new nr(), this._sources = new nr(), this._sourcesContent = [], this._mappings = [], this.file = t, this.sourceRoot = e, this._ignoreList = new nr();
18785
18822
  }
@@ -18833,10 +18870,10 @@ function Ju(t, e, n, s, i, o, c, u, h) {
18833
18870
  // _originalScopes: originalScopes,
18834
18871
  } = e, T = Qu(f, n), L = el(T, s);
18835
18872
  if (!i)
18836
- return nl(T, L) ? void 0 : Gi(T, L, [s]);
18837
- const N = qu(m, i), q = da;
18873
+ return nl(T, L) ? void 0 : zi(T, L, [s]);
18874
+ const N = qu(m, i), q = ma;
18838
18875
  if (N === g.length && (g[N] = null), !sl(T, L, N, o, c, q))
18839
- return Gi(
18876
+ return zi(
18840
18877
  T,
18841
18878
  L,
18842
18879
  [s, N, o, c]
@@ -18855,7 +18892,7 @@ function el(t, e) {
18855
18892
  }
18856
18893
  return n;
18857
18894
  }
18858
- function Gi(t, e, n) {
18895
+ function zi(t, e, n) {
18859
18896
  for (let s = t.length; s > e; s--)
18860
18897
  t[s] = t[s - 1];
18861
18898
  t[e] = n;
@@ -18873,7 +18910,7 @@ function nl(t, e) {
18873
18910
  function sl(t, e, n, s, i, o) {
18874
18911
  if (e === 0) return !1;
18875
18912
  const c = t[e - 1];
18876
- return c.length === 1 ? !1 : n === c[Xu] && s === c[Wu] && i === c[Gu] && o === (c.length === 5 ? c[Yu] : da);
18913
+ return c.length === 1 ? !1 : n === c[Xu] && s === c[Wu] && i === c[Gu] && o === (c.length === 5 ? c[Yu] : ma);
18877
18914
  }
18878
18915
  function rl({ code: t, mappings: e }, n, s, i, o) {
18879
18916
  const c = il(i, o), u = new zu({ file: s.compiledFilename });
@@ -19054,7 +19091,7 @@ class Dn {
19054
19091
  return e;
19055
19092
  }
19056
19093
  }
19057
- function Yi(t, e, n) {
19094
+ function Ki(t, e, n) {
19058
19095
  al(t, n) && cl(t, e, n);
19059
19096
  }
19060
19097
  function al(t, e) {
@@ -19076,21 +19113,21 @@ function cl(t, e, n) {
19076
19113
  const c = t.tokens[o], u = t.identifierNameForToken(c);
19077
19114
  if (s.length > 1 && !c.isType && c.type === r.name && n.has(u)) {
19078
19115
  if (lu(c))
19079
- zi(s[s.length - 1], t, u);
19116
+ Zi(s[s.length - 1], t, u);
19080
19117
  else if (fu(c)) {
19081
19118
  let h = s.length - 1;
19082
19119
  for (; h > 0 && !s[h].isFunctionScope; )
19083
19120
  h--;
19084
19121
  if (h < 0)
19085
19122
  throw new Error("Did not find parent function scope.");
19086
- zi(s[h], t, u);
19123
+ Zi(s[h], t, u);
19087
19124
  }
19088
19125
  }
19089
19126
  }
19090
19127
  if (s.length > 0)
19091
19128
  throw new Error("Expected empty scope stack after processing file.");
19092
19129
  }
19093
- function zi(t, e, n) {
19130
+ function Zi(t, e, n) {
19094
19131
  for (let s = t.startTokenIndex; s < t.endTokenIndex; s++) {
19095
19132
  const i = e.tokens[s];
19096
19133
  (i.type === r.name || i.type === r.jsxName) && e.identifierNameForToken(i) === n && (i.shadowsGlobal = !0);
@@ -19102,12 +19139,12 @@ function ul(t, e) {
19102
19139
  s.type === r.name && n.push(t.slice(s.start, s.end));
19103
19140
  return n;
19104
19141
  }
19105
- class Br {
19142
+ class $r {
19106
19143
  __init() {
19107
19144
  this.usedNames = /* @__PURE__ */ new Set();
19108
19145
  }
19109
19146
  constructor(e, n) {
19110
- Br.prototype.__init.call(this), this.usedNames = new Set(ul(e, n));
19147
+ $r.prototype.__init.call(this), this.usedNames = new Set(ul(e, n));
19111
19148
  }
19112
19149
  claimFreeName(e) {
19113
19150
  const n = this.findFreeName(e);
@@ -19122,7 +19159,7 @@ class Br {
19122
19159
  return e + String(n);
19123
19160
  }
19124
19161
  }
19125
- var pe = {}, mr = {}, et = {}, ll = Tt && Tt.__extends || /* @__PURE__ */ function() {
19162
+ var pe = {}, pr = {}, et = {}, ll = Tt && Tt.__extends || /* @__PURE__ */ function() {
19126
19163
  var t = function(e, n) {
19127
19164
  return t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(s, i) {
19128
19165
  s.__proto__ = i;
@@ -19140,7 +19177,7 @@ var pe = {}, mr = {}, et = {}, ll = Tt && Tt.__extends || /* @__PURE__ */ functi
19140
19177
  }();
19141
19178
  Object.defineProperty(et, "__esModule", { value: !0 });
19142
19179
  et.DetailContext = et.NoopContext = et.VError = void 0;
19143
- var ma = (
19180
+ var pa = (
19144
19181
  /** @class */
19145
19182
  function(t) {
19146
19183
  ll(e, t);
@@ -19151,7 +19188,7 @@ var ma = (
19151
19188
  return e;
19152
19189
  }(Error)
19153
19190
  );
19154
- et.VError = ma;
19191
+ et.VError = pa;
19155
19192
  var fl = (
19156
19193
  /** @class */
19157
19194
  function() {
@@ -19168,7 +19205,7 @@ var fl = (
19168
19205
  }()
19169
19206
  );
19170
19207
  et.NoopContext = fl;
19171
- var pa = (
19208
+ var ga = (
19172
19209
  /** @class */
19173
19210
  function() {
19174
19211
  function t() {
@@ -19191,7 +19228,7 @@ var pa = (
19191
19228
  var o = this._messages[s];
19192
19229
  o && n.push(e + " " + o);
19193
19230
  }
19194
- return new ma(e, n.join("; "));
19231
+ return new pa(e, n.join("; "));
19195
19232
  }, t.prototype.getErrorDetail = function(e) {
19196
19233
  for (var n = [], s = this._propNames.length - 1; s >= 0; s--) {
19197
19234
  var i = this._propNames[s];
@@ -19205,7 +19242,7 @@ var pa = (
19205
19242
  }, t;
19206
19243
  }()
19207
19244
  );
19208
- et.DetailContext = pa;
19245
+ et.DetailContext = ga;
19209
19246
  var hl = (
19210
19247
  /** @class */
19211
19248
  function() {
@@ -19213,7 +19250,7 @@ var hl = (
19213
19250
  this.contexts = [];
19214
19251
  }
19215
19252
  return t.prototype.createContext = function() {
19216
- var e = new pa();
19253
+ var e = new ga();
19217
19254
  return this.contexts.push(e), e;
19218
19255
  }, t;
19219
19256
  }()
@@ -19723,7 +19760,7 @@ var hl = (
19723
19760
  var ie = ae[ue];
19724
19761
  z(ie);
19725
19762
  }
19726
- })(mr);
19763
+ })(pr);
19727
19764
  (function(t) {
19728
19765
  var e = Tt && Tt.__spreadArrays || function() {
19729
19766
  for (var h = 0, f = 0, m = arguments.length; f < m; f++) h += arguments[f].length;
@@ -19733,7 +19770,7 @@ var hl = (
19733
19770
  return g;
19734
19771
  };
19735
19772
  Object.defineProperty(t, "__esModule", { value: !0 }), t.Checker = t.createCheckers = void 0;
19736
- var n = mr, s = et, i = mr;
19773
+ var n = pr, s = et, i = pr;
19737
19774
  Object.defineProperty(t, "TArray", { enumerable: !0, get: function() {
19738
19775
  return i.TArray;
19739
19776
  } }), Object.defineProperty(t, "TEnumType", { enumerable: !0, get: function() {
@@ -19908,19 +19945,19 @@ const dl = pe.union(
19908
19945
  function _l(t) {
19909
19946
  bl.strictCheck(t);
19910
19947
  }
19911
- function ga() {
19948
+ function ba() {
19912
19949
  E(), Ie(!1);
19913
19950
  }
19914
- function ba(t) {
19951
+ function _a(t) {
19915
19952
  E(), Wn(t);
19916
19953
  }
19917
19954
  function bt(t) {
19918
- Q(), Or(t);
19955
+ Q(), jr(t);
19919
19956
  }
19920
19957
  function Ln() {
19921
19958
  Q(), a.tokens[a.tokens.length - 1].identifierRole = G.ImportDeclaration;
19922
19959
  }
19923
- function Or(t) {
19960
+ function jr(t) {
19924
19961
  let e;
19925
19962
  a.scopeDepth === 0 ? e = G.TopLevelDeclaration : t ? e = G.BlockScopedDeclaration : e = G.FunctionScopedDeclaration, a.tokens[a.tokens.length - 1].identifierRole = e;
19926
19963
  }
@@ -19937,7 +19974,7 @@ function Wn(t) {
19937
19974
  return;
19938
19975
  }
19939
19976
  case r.bracketL: {
19940
- E(), $r(
19977
+ E(), Vr(
19941
19978
  r.bracketR,
19942
19979
  t,
19943
19980
  !0
@@ -19946,13 +19983,13 @@ function Wn(t) {
19946
19983
  return;
19947
19984
  }
19948
19985
  case r.braceL:
19949
- Zr(!0, t);
19986
+ Qr(!0, t);
19950
19987
  return;
19951
19988
  default:
19952
19989
  te();
19953
19990
  }
19954
19991
  }
19955
- function $r(t, e, n = !1, s = !1, i = 0) {
19992
+ function Vr(t, e, n = !1, s = !1, i = 0) {
19956
19993
  let o = !0, c = !1;
19957
19994
  const u = a.tokens.length;
19958
19995
  for (; !y(t) && !a.error; )
@@ -19960,26 +19997,26 @@ function $r(t, e, n = !1, s = !1, i = 0) {
19960
19997
  if (y(t))
19961
19998
  break;
19962
19999
  if (l(r.ellipsis)) {
19963
- ba(e), _a(), y(r.comma), w(t);
20000
+ _a(e), ya(), y(r.comma), w(t);
19964
20001
  break;
19965
20002
  } else
19966
20003
  yl(s, e);
19967
20004
  }
19968
20005
  }
19969
20006
  function yl(t, e) {
19970
- t && jr([
20007
+ t && qr([
19971
20008
  d._public,
19972
20009
  d._protected,
19973
20010
  d._private,
19974
20011
  d._readonly,
19975
20012
  d._override
19976
- ]), Fn(e), _a(), Fn(
20013
+ ]), Fn(e), ya(), Fn(
19977
20014
  e,
19978
20015
  !0
19979
20016
  /* leftAlreadyParsed */
19980
20017
  );
19981
20018
  }
19982
- function _a() {
20019
+ function ya() {
19983
20020
  fe ? Bh() : le && Af();
19984
20021
  }
19985
20022
  function Fn(t, e = !1) {
@@ -19988,25 +20025,25 @@ function Fn(t, e = !1) {
19988
20025
  const n = a.tokens.length - 1;
19989
20026
  Ie(), a.tokens[n].rhsEndIndex = a.tokens.length;
19990
20027
  }
19991
- function pr() {
20028
+ function gr() {
19992
20029
  return l(r.name);
19993
20030
  }
19994
20031
  function kl() {
19995
20032
  return l(r.name) || !!(a.type & r.IS_KEYWORD) || l(r.string) || l(r.num) || l(r.bigint) || l(r.decimal);
19996
20033
  }
19997
- function ya() {
20034
+ function ka() {
19998
20035
  const t = a.snapshot();
19999
20036
  return E(), (l(r.bracketL) || l(r.braceL) || l(r.star) || l(r.ellipsis) || l(r.hash) || kl()) && !De() ? !0 : (a.restoreFromSnapshot(t), !1);
20000
20037
  }
20001
- function jr(t) {
20002
- for (; ka(t) !== null; )
20038
+ function qr(t) {
20039
+ for (; va(t) !== null; )
20003
20040
  ;
20004
20041
  }
20005
- function ka(t) {
20042
+ function va(t) {
20006
20043
  if (!l(r.name))
20007
20044
  return null;
20008
20045
  const e = a.contextualKeyword;
20009
- if (t.indexOf(e) !== -1 && ya()) {
20046
+ if (t.indexOf(e) !== -1 && ka()) {
20010
20047
  switch (e) {
20011
20048
  case d._readonly:
20012
20049
  a.tokens[a.tokens.length - 1].type = r._readonly;
@@ -20051,9 +20088,9 @@ function xl() {
20051
20088
  E();
20052
20089
  }
20053
20090
  function El() {
20054
- w(r._typeof), l(r._import) ? va() : fn(), !De() && l(r.lessThan) && Vt();
20091
+ w(r._typeof), l(r._import) ? wa() : fn(), !De() && l(r.lessThan) && Vt();
20055
20092
  }
20056
- function va() {
20093
+ function wa() {
20057
20094
  w(r._import), w(r.parenL), w(r.string), w(r.parenR), y(r.dot) && fn(), l(r.lessThan) && Vt();
20058
20095
  }
20059
20096
  function Sl() {
@@ -20070,7 +20107,7 @@ function Gn() {
20070
20107
  Sl(), y(r.comma);
20071
20108
  ne(t);
20072
20109
  }
20073
- function Vr(t) {
20110
+ function Hr(t) {
20074
20111
  const e = t === r.arrow;
20075
20112
  Pt(), w(r.parenL), a.scopeDepth++, Tl(
20076
20113
  !1
@@ -20078,13 +20115,13 @@ function Vr(t) {
20078
20115
  ), a.scopeDepth--, (e || l(t)) && nn(t);
20079
20116
  }
20080
20117
  function Tl(t) {
20081
- $r(r.parenR, t);
20118
+ Vr(r.parenR, t);
20082
20119
  }
20083
20120
  function Un() {
20084
20121
  y(r.comma) || be();
20085
20122
  }
20086
- function Ki() {
20087
- Vr(r.colon), Un();
20123
+ function Ji() {
20124
+ Hr(r.colon), Un();
20088
20125
  }
20089
20126
  function Il() {
20090
20127
  const t = a.snapshot();
@@ -20092,34 +20129,34 @@ function Il() {
20092
20129
  const e = y(r.name) && l(r.colon);
20093
20130
  return a.restoreFromSnapshot(t), e;
20094
20131
  }
20095
- function wa() {
20132
+ function xa() {
20096
20133
  if (!(l(r.bracketL) && Il()))
20097
20134
  return !1;
20098
20135
  const t = re(0);
20099
20136
  return w(r.bracketL), Q(), hn(), w(r.bracketR), jt(), Un(), ne(t), !0;
20100
20137
  }
20101
- function Zi(t) {
20102
- y(r.question), !t && (l(r.parenL) || l(r.lessThan)) ? (Vr(r.colon), Un()) : (jt(), Un());
20138
+ function Qi(t) {
20139
+ y(r.question), !t && (l(r.parenL) || l(r.lessThan)) ? (Hr(r.colon), Un()) : (jt(), Un());
20103
20140
  }
20104
20141
  function Al() {
20105
20142
  if (l(r.parenL) || l(r.lessThan)) {
20106
- Ki();
20143
+ Ji();
20107
20144
  return;
20108
20145
  }
20109
20146
  if (l(r._new)) {
20110
- E(), l(r.parenL) || l(r.lessThan) ? Ki() : Zi(!1);
20147
+ E(), l(r.parenL) || l(r.lessThan) ? Ji() : Qi(!1);
20111
20148
  return;
20112
20149
  }
20113
- const t = !!ka([d._readonly]);
20114
- wa() || ((V(d._get) || V(d._set)) && ya(), sn(
20150
+ const t = !!va([d._readonly]);
20151
+ xa() || ((V(d._get) || V(d._set)) && ka(), sn(
20115
20152
  -1
20116
20153
  /* Types don't need context IDs. */
20117
- ), Zi(t));
20154
+ ), Qi(t));
20118
20155
  }
20119
20156
  function Rl() {
20120
- xa();
20157
+ Ea();
20121
20158
  }
20122
- function xa() {
20159
+ function Ea() {
20123
20160
  for (w(r.braceL); !y(r.braceR) && !a.error; )
20124
20161
  Al();
20125
20162
  }
@@ -20128,7 +20165,7 @@ function Cl() {
20128
20165
  return a.restoreFromSnapshot(t), e;
20129
20166
  }
20130
20167
  function Pl() {
20131
- return E(), y(r.plus) || y(r.minus) ? V(d._readonly) : (V(d._readonly) && E(), !l(r.bracketL) || (E(), !pr()) ? !1 : (E(), l(r._in)));
20168
+ return E(), y(r.plus) || y(r.minus) ? V(d._readonly) : (V(d._readonly) && E(), !l(r.bracketL) || (E(), !gr()) ? !1 : (E(), l(r._in)));
20132
20169
  }
20133
20170
  function Dl() {
20134
20171
  Q(), w(r._in), ye();
@@ -20162,7 +20199,7 @@ var mt;
20162
20199
  function rr(t) {
20163
20200
  t === mt.TSAbstractConstructorType && ve(d._abstract), (t === mt.TSConstructorType || t === mt.TSAbstractConstructorType) && w(r._new);
20164
20201
  const e = a.inDisallowConditionalTypesContext;
20165
- a.inDisallowConditionalTypesContext = !1, Vr(r.arrow), a.inDisallowConditionalTypesContext = e;
20202
+ a.inDisallowConditionalTypesContext = !1, Hr(r.arrow), a.inDisallowConditionalTypesContext = e;
20166
20203
  }
20167
20204
  function Bl() {
20168
20205
  switch (a.type) {
@@ -20192,7 +20229,7 @@ function Bl() {
20192
20229
  El();
20193
20230
  return;
20194
20231
  case r._import:
20195
- va();
20232
+ wa();
20196
20233
  return;
20197
20234
  case r.braceL:
20198
20235
  Cl() ? Ll() : Rl();
@@ -20227,9 +20264,9 @@ function $l() {
20227
20264
  a.inDisallowConditionalTypesContext = !0, ye(), a.inDisallowConditionalTypesContext = e, (a.error || !a.inDisallowConditionalTypesContext && l(r.question)) && a.restoreFromSnapshot(t);
20228
20265
  }
20229
20266
  }
20230
- function gr() {
20267
+ function br() {
20231
20268
  if (V(d._keyof) || V(d._unique) || V(d._readonly))
20232
- E(), gr();
20269
+ E(), br();
20233
20270
  else if (V(d._infer))
20234
20271
  $l();
20235
20272
  else {
@@ -20237,15 +20274,15 @@ function gr() {
20237
20274
  a.inDisallowConditionalTypesContext = !1, Ol(), a.inDisallowConditionalTypesContext = t;
20238
20275
  }
20239
20276
  }
20240
- function Ji() {
20241
- if (y(r.bitwiseAND), gr(), l(r.bitwiseAND))
20277
+ function eo() {
20278
+ if (y(r.bitwiseAND), br(), l(r.bitwiseAND))
20242
20279
  for (; y(r.bitwiseAND); )
20243
- gr();
20280
+ br();
20244
20281
  }
20245
20282
  function jl() {
20246
- if (y(r.bitwiseOR), Ji(), l(r.bitwiseOR))
20283
+ if (y(r.bitwiseOR), eo(), l(r.bitwiseOR))
20247
20284
  for (; y(r.bitwiseOR); )
20248
- Ji();
20285
+ eo();
20249
20286
  }
20250
20287
  function Vl() {
20251
20288
  return l(r.lessThan) ? !0 : l(r.parenL) && Hl();
@@ -20283,22 +20320,22 @@ function Gl() {
20283
20320
  }
20284
20321
  function Yl() {
20285
20322
  const t = a.snapshot();
20286
- return V(d._asserts) ? (E(), xe(d._is) ? (ye(), !0) : pr() || l(r._this) ? (E(), xe(d._is) && ye(), !0) : (a.restoreFromSnapshot(t), !1)) : pr() || l(r._this) ? (E(), V(d._is) && !De() ? (E(), ye(), !0) : (a.restoreFromSnapshot(t), !1)) : !1;
20323
+ return V(d._asserts) ? (E(), xe(d._is) ? (ye(), !0) : gr() || l(r._this) ? (E(), xe(d._is) && ye(), !0) : (a.restoreFromSnapshot(t), !1)) : gr() || l(r._this) ? (E(), V(d._is) && !De() ? (E(), ye(), !0) : (a.restoreFromSnapshot(t), !1)) : !1;
20287
20324
  }
20288
20325
  function hn() {
20289
20326
  const t = re(0);
20290
20327
  w(r.colon), ye(), ne(t);
20291
20328
  }
20292
20329
  function ye() {
20293
- if (Qi(), a.inDisallowConditionalTypesContext || De() || !y(r._extends))
20330
+ if (to(), a.inDisallowConditionalTypesContext || De() || !y(r._extends))
20294
20331
  return;
20295
20332
  const t = a.inDisallowConditionalTypesContext;
20296
- a.inDisallowConditionalTypesContext = !0, Qi(), a.inDisallowConditionalTypesContext = t, w(r.question), ye(), w(r.colon), ye();
20333
+ a.inDisallowConditionalTypesContext = !0, to(), a.inDisallowConditionalTypesContext = t, w(r.question), ye(), w(r.colon), ye();
20297
20334
  }
20298
20335
  function zl() {
20299
20336
  return V(d._abstract) && _e() === r._new;
20300
20337
  }
20301
- function Qi() {
20338
+ function to() {
20302
20339
  if (Vl()) {
20303
20340
  rr(mt.TSFunctionType);
20304
20341
  return;
@@ -20325,7 +20362,7 @@ function Zl() {
20325
20362
  je(), ne(t);
20326
20363
  }
20327
20364
  }
20328
- function Ea() {
20365
+ function Sa() {
20329
20366
  for (; !l(r.braceL) && !a.error; )
20330
20367
  Jl(), y(r.comma);
20331
20368
  }
@@ -20333,7 +20370,7 @@ function Jl() {
20333
20370
  fn(), l(r.lessThan) && Vt();
20334
20371
  }
20335
20372
  function Ql() {
20336
- bt(!1), Pt(), y(r._extends) && Ea(), xa();
20373
+ bt(!1), Pt(), y(r._extends) && Sa(), Ea();
20337
20374
  }
20338
20375
  function ef() {
20339
20376
  bt(!1), Pt(), w(r.eq), ye(), be();
@@ -20344,23 +20381,23 @@ function tf() {
20344
20381
  Ie(), a.tokens[t].rhsEndIndex = a.tokens.length;
20345
20382
  }
20346
20383
  }
20347
- function qr() {
20384
+ function Xr() {
20348
20385
  for (bt(!1), w(r.braceL); !y(r.braceR) && !a.error; )
20349
20386
  tf(), y(r.comma);
20350
20387
  }
20351
- function Hr() {
20388
+ function Wr() {
20352
20389
  w(r.braceL), Zn(
20353
20390
  /* end */
20354
20391
  r.braceR
20355
20392
  );
20356
20393
  }
20357
- function br() {
20358
- bt(!1), y(r.dot) ? br() : Hr();
20394
+ function _r() {
20395
+ bt(!1), y(r.dot) ? _r() : Wr();
20359
20396
  }
20360
- function Sa() {
20361
- V(d._global) ? Q() : l(r.string) ? at() : te(), l(r.braceL) ? Hr() : be();
20397
+ function Ta() {
20398
+ V(d._global) ? Q() : l(r.string) ? at() : te(), l(r.braceL) ? Wr() : be();
20362
20399
  }
20363
- function _r() {
20400
+ function yr() {
20364
20401
  Ln(), w(r.eq), sf(), be();
20365
20402
  }
20366
20403
  function nf() {
@@ -20396,9 +20433,9 @@ function of() {
20396
20433
  ), ne(t), !0;
20397
20434
  }
20398
20435
  case r._const:
20399
- if (l(r._const) && Nr(d._enum)) {
20436
+ if (l(r._const) && Br(d._enum)) {
20400
20437
  const t = re(1);
20401
- return w(r._const), ve(d._enum), a.tokens[a.tokens.length - 1].type = r._enum, qr(), ne(t), !0;
20438
+ return w(r._const), ve(d._enum), a.tokens[a.tokens.length - 1].type = r._enum, Xr(), ne(t), !0;
20402
20439
  }
20403
20440
  case r._var:
20404
20441
  case r._let: {
@@ -20408,7 +20445,7 @@ function of() {
20408
20445
  case r.name: {
20409
20446
  const t = re(1), e = a.contextualKeyword;
20410
20447
  let n = !1;
20411
- return e === d._global ? (Sa(), n = !0) : n = Yn(
20448
+ return e === d._global ? (Ta(), n = !0) : n = Yn(
20412
20449
  e,
20413
20450
  /* isBeforeToken */
20414
20451
  !0
@@ -20418,7 +20455,7 @@ function of() {
20418
20455
  return !1;
20419
20456
  }
20420
20457
  }
20421
- function eo() {
20458
+ function no() {
20422
20459
  return Yn(
20423
20460
  a.contextualKeyword,
20424
20461
  /* isBeforeToken */
@@ -20435,7 +20472,7 @@ function af(t) {
20435
20472
  }
20436
20473
  case d._global:
20437
20474
  if (l(r.braceL))
20438
- return Hr(), !0;
20475
+ return Wr(), !0;
20439
20476
  break;
20440
20477
  default:
20441
20478
  return Yn(
@@ -20459,7 +20496,7 @@ function Yn(t, e) {
20459
20496
  break;
20460
20497
  case d._enum:
20461
20498
  if (Ft(e) && l(r.name))
20462
- return a.tokens[a.tokens.length - 1].type = r._enum, qr(), !0;
20499
+ return a.tokens[a.tokens.length - 1].type = r._enum, Xr(), !0;
20463
20500
  break;
20464
20501
  case d._interface:
20465
20502
  if (Ft(e) && l(r.name)) {
@@ -20471,17 +20508,17 @@ function Yn(t, e) {
20471
20508
  if (Ft(e)) {
20472
20509
  if (l(r.string)) {
20473
20510
  const n = re(e ? 2 : 1);
20474
- return Sa(), ne(n), !0;
20511
+ return Ta(), ne(n), !0;
20475
20512
  } else if (l(r.name)) {
20476
20513
  const n = re(e ? 2 : 1);
20477
- return br(), ne(n), !0;
20514
+ return _r(), ne(n), !0;
20478
20515
  }
20479
20516
  }
20480
20517
  break;
20481
20518
  case d._namespace:
20482
20519
  if (Ft(e) && l(r.name)) {
20483
20520
  const n = re(e ? 2 : 1);
20484
- return br(), ne(n), !0;
20521
+ return _r(), ne(n), !0;
20485
20522
  }
20486
20523
  break;
20487
20524
  case d._type:
@@ -20500,16 +20537,16 @@ function cf() {
20500
20537
  const t = a.snapshot();
20501
20538
  return Gn(), qt(), Wl(), w(r.arrow), a.error ? (a.restoreFromSnapshot(t), !1) : (mn(!0), !0);
20502
20539
  }
20503
- function Xr() {
20540
+ function Gr() {
20504
20541
  a.type === r.bitShiftL && (a.pos -= 1, ee(r.lessThan)), Vt();
20505
20542
  }
20506
20543
  function Vt() {
20507
20544
  const t = re(0);
20508
20545
  for (w(r.lessThan); !l(r.greaterThan) && !a.error; )
20509
20546
  ye(), y(r.comma);
20510
- t ? (w(r.greaterThan), ne(t)) : (ne(t), ia(), w(r.greaterThan), a.tokens[a.tokens.length - 1].isType = !0);
20547
+ t ? (w(r.greaterThan), ne(t)) : (ne(t), oa(), w(r.greaterThan), a.tokens[a.tokens.length - 1].isType = !0);
20511
20548
  }
20512
- function Ta() {
20549
+ function Ia() {
20513
20550
  if (l(r.name))
20514
20551
  switch (a.contextualKeyword) {
20515
20552
  case d._abstract:
@@ -20539,9 +20576,9 @@ function lf(t, e, n) {
20539
20576
  }
20540
20577
  if (l(r.lessThan) || l(r.bitShiftL)) {
20541
20578
  const s = a.snapshot();
20542
- if (!e && Fa() && cf())
20579
+ if (!e && Ua() && cf())
20543
20580
  return;
20544
- if (Xr(), !e && y(r.parenL) ? (a.tokens[a.tokens.length - 1].subscriptStartIndex = t, pt()) : l(r.backQuote) ? Kr() : (
20581
+ if (Gr(), !e && y(r.parenL) ? (a.tokens[a.tokens.length - 1].subscriptStartIndex = t, pt()) : l(r.backQuote) ? Jr() : (
20545
20582
  // The remaining possible case is an instantiation expression, e.g.
20546
20583
  // Array<number> . Check for a few cases that would disqualify it and
20547
20584
  // cause us to bail out.
@@ -20553,11 +20590,11 @@ function lf(t, e, n) {
20553
20590
  else
20554
20591
  return;
20555
20592
  } else !e && l(r.questionDot) && _e() === r.lessThan && (E(), a.tokens[t].isOptionalChainStart = !0, a.tokens[a.tokens.length - 1].subscriptStartIndex = t, Vt(), w(r.parenL), pt());
20556
- Gr(t, e, n);
20593
+ zr(t, e, n);
20557
20594
  }
20558
20595
  function ff() {
20559
20596
  if (y(r._import))
20560
- return V(d._type) && _e() !== r.eq && ve(d._type), _r(), !0;
20597
+ return V(d._type) && _e() !== r.eq && ve(d._type), yr(), !0;
20561
20598
  if (y(r.eq))
20562
20599
  return Te(), be(), !0;
20563
20600
  if (xe(d._as))
@@ -20611,13 +20648,13 @@ function pf() {
20611
20648
  if (a.type === r._const) {
20612
20649
  const t = ln();
20613
20650
  if (t.type === r.name && t.contextualKeyword === d._enum)
20614
- return w(r._const), ve(d._enum), a.tokens[a.tokens.length - 1].type = r._enum, qr(), !0;
20651
+ return w(r._const), ve(d._enum), a.tokens[a.tokens.length - 1].type = r._enum, Xr(), !0;
20615
20652
  }
20616
20653
  return !1;
20617
20654
  }
20618
20655
  function gf(t) {
20619
20656
  const e = a.tokens.length;
20620
- jr([
20657
+ qr([
20621
20658
  d._abstract,
20622
20659
  d._readonly,
20623
20660
  d._declare,
@@ -20625,7 +20662,7 @@ function gf(t) {
20625
20662
  d._override
20626
20663
  ]);
20627
20664
  const n = a.tokens.length;
20628
- if (wa()) {
20665
+ if (xa()) {
20629
20666
  const i = t ? e - 1 : e;
20630
20667
  for (let o = i; o < n; o++)
20631
20668
  a.tokens[o].isType = !0;
@@ -20643,9 +20680,9 @@ function _f() {
20643
20680
  if (l(r.name))
20644
20681
  if (t) {
20645
20682
  const n = re(2);
20646
- e = eo(), ne(n);
20683
+ e = no(), ne(n);
20647
20684
  } else
20648
- e = eo();
20685
+ e = no();
20649
20686
  if (!e)
20650
20687
  if (t) {
20651
20688
  const n = re(2);
@@ -20654,10 +20691,10 @@ function _f() {
20654
20691
  Oe(!0);
20655
20692
  }
20656
20693
  function yf(t) {
20657
- if (t && (l(r.lessThan) || l(r.bitShiftL)) && Xr(), xe(d._implements)) {
20694
+ if (t && (l(r.lessThan) || l(r.bitShiftL)) && Gr(), xe(d._implements)) {
20658
20695
  a.tokens[a.tokens.length - 1].type = r._implements;
20659
20696
  const e = re(1);
20660
- Ea(), ne(e);
20697
+ Sa(), ne(e);
20661
20698
  }
20662
20699
  }
20663
20700
  function kf() {
@@ -20711,7 +20748,7 @@ function Af() {
20711
20748
  y(r.question), jt(), ne(t);
20712
20749
  }
20713
20750
  function Rf() {
20714
- (l(r.lessThan) || l(r.bitShiftL)) && Xr(), Wa();
20751
+ (l(r.lessThan) || l(r.bitShiftL)) && Gr(), Ga();
20715
20752
  }
20716
20753
  function Cf() {
20717
20754
  let t = !1, e = !1;
@@ -20727,7 +20764,7 @@ function Cf() {
20727
20764
  a.pos++, ee(r.jsxTagStart);
20728
20765
  return;
20729
20766
  }
20730
- oa(n);
20767
+ aa(n);
20731
20768
  return;
20732
20769
  }
20733
20770
  ee(t && !e ? r.jsxEmptyText : r.jsxText);
@@ -20761,22 +20798,22 @@ function Df() {
20761
20798
  } while (Ge[t] || t === p.dash);
20762
20799
  ee(r.jsxName);
20763
20800
  }
20764
- function yr() {
20801
+ function kr() {
20765
20802
  je();
20766
20803
  }
20767
- function Ia(t) {
20768
- if (yr(), !y(r.colon)) {
20804
+ function Aa(t) {
20805
+ if (kr(), !y(r.colon)) {
20769
20806
  a.tokens[a.tokens.length - 1].identifierRole = t;
20770
20807
  return;
20771
20808
  }
20772
- yr();
20809
+ kr();
20773
20810
  }
20774
- function Aa() {
20811
+ function Ra() {
20775
20812
  const t = a.tokens.length;
20776
- Ia(G.Access);
20813
+ Aa(G.Access);
20777
20814
  let e = !1;
20778
20815
  for (; l(r.dot); )
20779
- e = !0, je(), yr();
20816
+ e = !0, je(), kr();
20780
20817
  if (!e) {
20781
20818
  const n = a.tokens[t], s = P.charCodeAt(n.start);
20782
20819
  s >= p.lowercaseA && s <= p.lowercaseZ && (n.identifierRole = null);
@@ -20788,7 +20825,7 @@ function Lf() {
20788
20825
  E(), Te(), je();
20789
20826
  return;
20790
20827
  case r.jsxTagStart:
20791
- Ca(), je();
20828
+ Pa(), je();
20792
20829
  return;
20793
20830
  case r.string:
20794
20831
  je();
@@ -20803,22 +20840,22 @@ function Ff() {
20803
20840
  function Uf(t) {
20804
20841
  if (l(r.jsxTagEnd))
20805
20842
  return !1;
20806
- Aa(), le && Zl();
20843
+ Ra(), le && Zl();
20807
20844
  let e = !1;
20808
20845
  for (; !l(r.slash) && !l(r.jsxTagEnd) && !a.error; ) {
20809
20846
  if (y(r.braceL)) {
20810
20847
  e = !0, w(r.ellipsis), Ie(), je();
20811
20848
  continue;
20812
20849
  }
20813
- e && a.end - a.start === 3 && P.charCodeAt(a.start) === p.lowercaseK && P.charCodeAt(a.start + 1) === p.lowercaseE && P.charCodeAt(a.start + 2) === p.lowercaseY && (a.tokens[t].jsxRole = Xe.KeyAfterPropSpread), Ia(G.ObjectKey), l(r.eq) && (je(), Lf());
20850
+ e && a.end - a.start === 3 && P.charCodeAt(a.start) === p.lowercaseK && P.charCodeAt(a.start + 1) === p.lowercaseE && P.charCodeAt(a.start + 2) === p.lowercaseY && (a.tokens[t].jsxRole = Xe.KeyAfterPropSpread), Aa(G.ObjectKey), l(r.eq) && (je(), Lf());
20814
20851
  }
20815
20852
  const n = l(r.slash);
20816
20853
  return n && je(), n;
20817
20854
  }
20818
20855
  function Nf() {
20819
- l(r.jsxTagEnd) || Aa();
20856
+ l(r.jsxTagEnd) || Ra();
20820
20857
  }
20821
- function Ra() {
20858
+ function Ca() {
20822
20859
  const t = a.tokens.length - 1;
20823
20860
  a.tokens[t].jsxRole = Xe.NoChildren;
20824
20861
  let e = 0;
@@ -20830,7 +20867,7 @@ function Ra() {
20830
20867
  je(), Nf(), a.tokens[t].jsxRole !== Xe.KeyAfterPropSpread && (e === 1 ? a.tokens[t].jsxRole = Xe.OneChild : e > 1 && (a.tokens[t].jsxRole = Xe.StaticChildren));
20831
20868
  return;
20832
20869
  }
20833
- e++, Ra(), Ut();
20870
+ e++, Ca(), Ut();
20834
20871
  break;
20835
20872
  case r.jsxText:
20836
20873
  e++, Ut();
@@ -20846,11 +20883,11 @@ function Ra() {
20846
20883
  return;
20847
20884
  }
20848
20885
  }
20849
- function Ca() {
20850
- je(), Ra();
20886
+ function Pa() {
20887
+ je(), Ca();
20851
20888
  }
20852
20889
  function je() {
20853
- a.tokens.push(new Xn()), sa(), a.start = a.pos;
20890
+ a.tokens.push(new Xn()), ra(), a.start = a.pos;
20854
20891
  const t = P.charCodeAt(a.pos);
20855
20892
  if (un[t])
20856
20893
  Df();
@@ -20892,10 +20929,10 @@ function Mf(t) {
20892
20929
  if (e === r.colon || e === r.comma || e === r.parenR)
20893
20930
  return;
20894
20931
  }
20895
- Pa(t);
20932
+ Da(t);
20896
20933
  }
20897
20934
  function Bf() {
20898
- Jo(r.question), l(r.colon) && (le ? hn() : fe && Dt());
20935
+ Qo(r.question), l(r.colon) && (le ? hn() : fe && Dt());
20899
20936
  }
20900
20937
  class Of {
20901
20938
  constructor(e) {
@@ -20915,15 +20952,15 @@ function tt(t, e) {
20915
20952
  return th(), !1;
20916
20953
  (l(r.parenL) || l(r.name) || l(r._yield)) && (a.potentialArrowAt = a.start);
20917
20954
  const n = $f(t);
20918
- return e && zr(), a.type & r.IS_ASSIGN ? (E(), Ie(t), !1) : n;
20955
+ return e && Zr(), a.type & r.IS_ASSIGN ? (E(), Ie(t), !1) : n;
20919
20956
  }
20920
20957
  function $f(t) {
20921
20958
  return Vf(t) ? !0 : (jf(t), !1);
20922
20959
  }
20923
20960
  function jf(t) {
20924
- le || fe ? Mf(t) : Pa(t);
20961
+ le || fe ? Mf(t) : Da(t);
20925
20962
  }
20926
- function Pa(t) {
20963
+ function Da(t) {
20927
20964
  y(r.question) && (Ie(), w(r.colon), Ie(t));
20928
20965
  }
20929
20966
  function Vf(t) {
@@ -20933,7 +20970,7 @@ function Vf(t) {
20933
20970
  function vn(t, e, n) {
20934
20971
  if (le && (r._in & r.PRECEDENCE_MASK) > e && !De() && (xe(d._as) || xe(d._satisfies))) {
20935
20972
  const i = re(1);
20936
- ye(), ne(i), ia(), vn(t, e, n);
20973
+ ye(), ne(i), oa(), vn(t, e, n);
20937
20974
  return;
20938
20975
  }
20939
20976
  const s = a.type & r.PRECEDENCE_MASK;
@@ -20947,35 +20984,35 @@ function vn(t, e, n) {
20947
20984
  function dn() {
20948
20985
  if (le && !Hn && y(r.lessThan))
20949
20986
  return Kl(), !1;
20950
- if (V(d._module) && ea() === p.leftCurlyBrace && !Go())
20987
+ if (V(d._module) && ta() === p.leftCurlyBrace && !Yo())
20951
20988
  return nh(), !1;
20952
20989
  if (a.type & r.IS_PREFIX)
20953
20990
  return E(), dn(), !1;
20954
- if (Da())
20991
+ if (La())
20955
20992
  return !0;
20956
20993
  for (; a.type & r.IS_POSTFIX && !Be(); )
20957
20994
  a.type === r.preIncDec && (a.type = r.postIncDec), E();
20958
20995
  return !1;
20959
20996
  }
20960
- function Da() {
20997
+ function La() {
20961
20998
  const t = a.tokens.length;
20962
- return at() ? !0 : (Wr(t), a.tokens.length > t && a.tokens[t].isOptionalChainStart && (a.tokens[a.tokens.length - 1].isOptionalChainEnd = !0), !1);
20999
+ return at() ? !0 : (Yr(t), a.tokens.length > t && a.tokens[t].isOptionalChainStart && (a.tokens[a.tokens.length - 1].isOptionalChainEnd = !0), !1);
20963
21000
  }
20964
- function Wr(t, e = !1) {
20965
- fe ? Wh(t, e) : La(t, e);
21001
+ function Yr(t, e = !1) {
21002
+ fe ? Wh(t, e) : Fa(t, e);
20966
21003
  }
20967
- function La(t, e = !1) {
21004
+ function Fa(t, e = !1) {
20968
21005
  const n = new Of(!1);
20969
21006
  do
20970
21007
  qf(t, e, n);
20971
21008
  while (!n.stop && !a.error);
20972
21009
  }
20973
21010
  function qf(t, e, n) {
20974
- le ? lf(t, e, n) : fe ? Th(t, e, n) : Gr(t, e, n);
21011
+ le ? lf(t, e, n) : fe ? Th(t, e, n) : zr(t, e, n);
20975
21012
  }
20976
- function Gr(t, e, n) {
21013
+ function zr(t, e, n) {
20977
21014
  if (!e && y(r.doubleColon))
20978
- Yr(), n.stop = !0, Wr(t, e);
21015
+ Kr(), n.stop = !0, Yr(t, e);
20979
21016
  else if (l(r.questionDot)) {
20980
21017
  if (a.tokens[t].isOptionalChainStart = !0, e && _e() === r.parenL) {
20981
21018
  n.stop = !0;
@@ -20987,7 +21024,7 @@ function Gr(t, e, n) {
20987
21024
  else if (y(r.bracketL))
20988
21025
  a.tokens[a.tokens.length - 1].subscriptStartIndex = t, Te(), w(r.bracketR);
20989
21026
  else if (!e && l(r.parenL))
20990
- if (Fa()) {
21027
+ if (Ua()) {
20991
21028
  const s = a.snapshot(), i = a.tokens.length;
20992
21029
  E(), a.tokens[a.tokens.length - 1].subscriptStartIndex = t;
20993
21030
  const o = en();
@@ -20997,9 +21034,9 @@ function Gr(t, e, n) {
20997
21034
  const s = en();
20998
21035
  a.tokens[a.tokens.length - 1].contextId = s, pt(), a.tokens[a.tokens.length - 1].contextId = s;
20999
21036
  }
21000
- else l(r.backQuote) ? Kr() : n.stop = !0;
21037
+ else l(r.backQuote) ? Jr() : n.stop = !0;
21001
21038
  }
21002
- function Fa() {
21039
+ function Ua() {
21003
21040
  return a.tokens[a.tokens.length - 1].contextualKeyword === d._async && !Be();
21004
21041
  }
21005
21042
  function pt() {
@@ -21009,7 +21046,7 @@ function pt() {
21009
21046
  t = !1;
21010
21047
  else if (w(r.comma), y(r.parenR))
21011
21048
  break;
21012
- Ba(!1);
21049
+ Oa(!1);
21013
21050
  }
21014
21051
  }
21015
21052
  function Hf() {
@@ -21018,9 +21055,9 @@ function Hf() {
21018
21055
  function Xf(t) {
21019
21056
  le ? xf() : fe && qh(), w(r.arrow), rn(t);
21020
21057
  }
21021
- function Yr() {
21058
+ function Kr() {
21022
21059
  const t = a.tokens.length;
21023
- at(), Wr(t, !0);
21060
+ at(), Yr(t, !0);
21024
21061
  }
21025
21062
  function at() {
21026
21063
  if (y(r.modulo))
@@ -21028,7 +21065,7 @@ function at() {
21028
21065
  if (l(r.jsxText) || l(r.jsxEmptyText))
21029
21066
  return $t(), !1;
21030
21067
  if (l(r.lessThan) && Hn)
21031
- return a.type = r.jsxTagStart, Ca(), E(), !1;
21068
+ return a.type = r.jsxTagStart, Pa(), E(), !1;
21032
21069
  const t = a.potentialArrowAt === a.start;
21033
21070
  switch (a.type) {
21034
21071
  case r.slash:
@@ -21049,30 +21086,30 @@ function at() {
21049
21086
  return E(), l(r.dot) && (a.tokens[a.tokens.length - 1].type = r.name, E(), Q()), !1;
21050
21087
  case r.name: {
21051
21088
  const e = a.tokens.length, n = a.start, s = a.contextualKeyword;
21052
- return Q(), s === d._await ? (eh(), !1) : s === d._async && l(r._function) && !Be() ? (E(), At(n, !1), !1) : t && s === d._async && !Be() && l(r.name) ? (a.scopeDepth++, bt(!1), w(r.arrow), rn(e), !0) : l(r._do) && !Be() ? (E(), gt(), !1) : t && !Be() && l(r.arrow) ? (a.scopeDepth++, Or(!1), w(r.arrow), rn(e), !0) : (a.tokens[a.tokens.length - 1].identifierRole = G.Access, !1);
21089
+ return Q(), s === d._await ? (eh(), !1) : s === d._async && l(r._function) && !Be() ? (E(), At(n, !1), !1) : t && s === d._async && !Be() && l(r.name) ? (a.scopeDepth++, bt(!1), w(r.arrow), rn(e), !0) : l(r._do) && !Be() ? (E(), gt(), !1) : t && !Be() && l(r.arrow) ? (a.scopeDepth++, jr(!1), w(r.arrow), rn(e), !0) : (a.tokens[a.tokens.length - 1].identifierRole = G.Access, !1);
21053
21090
  }
21054
21091
  case r._do:
21055
21092
  return E(), gt(), !1;
21056
21093
  case r.parenL:
21057
- return Ua(t);
21094
+ return Na(t);
21058
21095
  case r.bracketL:
21059
- return E(), Ma(r.bracketR, !0), !1;
21096
+ return E(), Ba(r.bracketR, !0), !1;
21060
21097
  case r.braceL:
21061
- return Zr(!1, !1), !1;
21098
+ return Qr(!1, !1), !1;
21062
21099
  case r._function:
21063
21100
  return Wf(), !1;
21064
21101
  case r.at:
21065
- oi();
21102
+ ci();
21066
21103
  case r._class:
21067
21104
  return Rt(!1), !1;
21068
21105
  case r._new:
21069
21106
  return Yf(), !1;
21070
21107
  case r.backQuote:
21071
- return Kr(), !1;
21108
+ return Jr(), !1;
21072
21109
  case r.doubleColon:
21073
- return E(), Yr(), !1;
21110
+ return E(), Kr(), !1;
21074
21111
  case r.hash: {
21075
- const e = ea();
21112
+ const e = ta();
21076
21113
  return un[e] || e === p.backslash ? Nn() : E(), !1;
21077
21114
  }
21078
21115
  default:
@@ -21092,7 +21129,7 @@ function $t() {
21092
21129
  function zn() {
21093
21130
  w(r.parenL), Te(), w(r.parenR);
21094
21131
  }
21095
- function Ua(t) {
21132
+ function Na(t) {
21096
21133
  const e = a.snapshot(), n = a.tokens.length;
21097
21134
  w(r.parenL);
21098
21135
  let s = !0;
@@ -21102,23 +21139,23 @@ function Ua(t) {
21102
21139
  else if (w(r.comma), l(r.parenR))
21103
21140
  break;
21104
21141
  if (l(r.ellipsis)) {
21105
- ba(
21142
+ _a(
21106
21143
  !1
21107
21144
  /* isBlockScope */
21108
- ), zr();
21145
+ ), Zr();
21109
21146
  break;
21110
21147
  } else
21111
21148
  Ie(!1, !0);
21112
21149
  }
21113
- return w(r.parenR), t && Gf() && kr() ? (a.restoreFromSnapshot(e), a.scopeDepth++, qt(), kr(), rn(n), a.error ? (a.restoreFromSnapshot(e), Ua(!1), !1) : !0) : !1;
21150
+ return w(r.parenR), t && Gf() && vr() ? (a.restoreFromSnapshot(e), a.scopeDepth++, qt(), vr(), rn(n), a.error ? (a.restoreFromSnapshot(e), Na(!1), !1) : !0) : !1;
21114
21151
  }
21115
21152
  function Gf() {
21116
21153
  return l(r.colon) || !Be();
21117
21154
  }
21118
- function kr() {
21155
+ function vr() {
21119
21156
  return le ? If() : fe ? Xh() : y(r.arrow);
21120
21157
  }
21121
- function zr() {
21158
+ function Zr() {
21122
21159
  (le || fe) && Bf();
21123
21160
  }
21124
21161
  function Yf() {
@@ -21126,17 +21163,17 @@ function Yf() {
21126
21163
  Q();
21127
21164
  return;
21128
21165
  }
21129
- zf(), fe && Ih(), y(r.parenL) && Ma(r.parenR);
21166
+ zf(), fe && Ih(), y(r.parenL) && Ba(r.parenR);
21130
21167
  }
21131
21168
  function zf() {
21132
- Yr(), y(r.questionDot);
21169
+ Kr(), y(r.questionDot);
21133
21170
  }
21134
- function Kr() {
21171
+ function Jr() {
21135
21172
  for (dt(), dt(); !l(r.backQuote) && !a.error; )
21136
21173
  w(r.dollarBraceL), Te(), dt(), dt();
21137
21174
  E();
21138
21175
  }
21139
- function Zr(t, e) {
21176
+ function Qr(t, e) {
21140
21177
  const n = en();
21141
21178
  let s = !0;
21142
21179
  for (E(), a.tokens[a.tokens.length - 1].contextId = n; !y(r.braceR) && !a.error; ) {
@@ -21147,7 +21184,7 @@ function Zr(t, e) {
21147
21184
  let i = !1;
21148
21185
  if (l(r.ellipsis)) {
21149
21186
  const o = a.tokens.length;
21150
- if (ga(), t && (a.tokens.length === o + 2 && Or(e), y(r.braceR)))
21187
+ if (ba(), t && (a.tokens.length === o + 2 && jr(e), y(r.braceR)))
21151
21188
  break;
21152
21189
  continue;
21153
21190
  }
@@ -21164,11 +21201,11 @@ function Kf(t) {
21164
21201
  }
21165
21202
  function Zf(t, e) {
21166
21203
  const n = a.start;
21167
- return l(r.parenL) ? (t && te(), vr(
21204
+ return l(r.parenL) ? (t && te(), wr(
21168
21205
  n,
21169
21206
  /* isConstructor */
21170
21207
  !1
21171
- ), !0) : Kf(t) ? (sn(e), vr(
21208
+ ), !0) : Kf(t) ? (sn(e), wr(
21172
21209
  n,
21173
21210
  /* isConstructor */
21174
21211
  !1
@@ -21186,13 +21223,13 @@ function Qf(t, e, n) {
21186
21223
  le ? kf() : fe && Mh(), Zf(t, n) || Jf(t, e);
21187
21224
  }
21188
21225
  function sn(t) {
21189
- fe && ii(), y(r.bracketL) ? (a.tokens[a.tokens.length - 1].contextId = t, Ie(), w(r.bracketR), a.tokens[a.tokens.length - 1].contextId = t) : (l(r.num) || l(r.string) || l(r.bigint) || l(r.decimal) ? at() : Nn(), a.tokens[a.tokens.length - 1].identifierRole = G.ObjectKey, a.tokens[a.tokens.length - 1].contextId = t);
21226
+ fe && ai(), y(r.bracketL) ? (a.tokens[a.tokens.length - 1].contextId = t, Ie(), w(r.bracketR), a.tokens[a.tokens.length - 1].contextId = t) : (l(r.num) || l(r.string) || l(r.bigint) || l(r.decimal) ? at() : Nn(), a.tokens[a.tokens.length - 1].identifierRole = G.ObjectKey, a.tokens[a.tokens.length - 1].contextId = t);
21190
21227
  }
21191
- function vr(t, e) {
21228
+ function wr(t, e) {
21192
21229
  const n = en();
21193
21230
  a.scopeDepth++;
21194
21231
  const s = a.tokens.length;
21195
- qt(e, n), Na(t, n);
21232
+ qt(e, n), Ma(t, n);
21196
21233
  const o = a.tokens.length;
21197
21234
  a.scopes.push(new nt(s, o, !0)), a.scopeDepth--;
21198
21235
  }
@@ -21201,23 +21238,23 @@ function rn(t) {
21201
21238
  const e = a.tokens.length;
21202
21239
  a.scopes.push(new nt(t, e, !0)), a.scopeDepth--;
21203
21240
  }
21204
- function Na(t, e = 0) {
21241
+ function Ma(t, e = 0) {
21205
21242
  le ? uf(t, e) : fe ? Sh(e) : mn(!1, e);
21206
21243
  }
21207
21244
  function mn(t, e = 0) {
21208
21245
  t && !l(r.braceL) ? Ie() : gt(!0, e);
21209
21246
  }
21210
- function Ma(t, e = !1) {
21247
+ function Ba(t, e = !1) {
21211
21248
  let n = !0;
21212
21249
  for (; !y(t) && !a.error; ) {
21213
21250
  if (n)
21214
21251
  n = !1;
21215
21252
  else if (w(r.comma), y(t)) break;
21216
- Ba(e);
21253
+ Oa(e);
21217
21254
  }
21218
21255
  }
21219
- function Ba(t) {
21220
- t && l(r.comma) || (l(r.ellipsis) ? (ga(), zr()) : l(r.question) ? E() : Ie(!1, !0));
21256
+ function Oa(t) {
21257
+ t && l(r.comma) || (l(r.ellipsis) ? (ba(), Zr()) : l(r.question) ? E() : Ie(!1, !0));
21221
21258
  }
21222
21259
  function Q() {
21223
21260
  E(), a.tokens[a.tokens.length - 1].type = r.name;
@@ -21238,56 +21275,56 @@ function st(t) {
21238
21275
  const e = re(0);
21239
21276
  w(t || r.colon), Me(), ne(e);
21240
21277
  }
21241
- function to() {
21278
+ function so() {
21242
21279
  w(r.modulo), ve(d._checks), y(r.parenL) && (Te(), w(r.parenR));
21243
21280
  }
21244
- function Jr() {
21281
+ function ei() {
21245
21282
  const t = re(0);
21246
- w(r.colon), l(r.modulo) ? to() : (Me(), l(r.modulo) && to()), ne(t);
21283
+ w(r.colon), l(r.modulo) ? so() : (Me(), l(r.modulo) && so()), ne(t);
21247
21284
  }
21248
21285
  function rh() {
21249
- E(), Qr(
21286
+ E(), ti(
21250
21287
  /* isClass */
21251
21288
  !0
21252
21289
  );
21253
21290
  }
21254
21291
  function ih() {
21255
- E(), Q(), l(r.lessThan) && ze(), w(r.parenL), xr(), w(r.parenR), Jr(), be();
21292
+ E(), Q(), l(r.lessThan) && ze(), w(r.parenL), Er(), w(r.parenR), ei(), be();
21256
21293
  }
21257
- function wr() {
21294
+ function xr() {
21258
21295
  l(r._class) ? rh() : l(r._function) ? ih() : l(r._var) ? oh() : xe(d._module) ? y(r.dot) ? uh() : ah() : V(d._type) ? lh() : V(d._opaque) ? fh() : V(d._interface) ? hh() : l(r._export) ? ch() : te();
21259
21296
  }
21260
21297
  function oh() {
21261
- E(), Va(), be();
21298
+ E(), qa(), be();
21262
21299
  }
21263
21300
  function ah() {
21264
21301
  for (l(r.string) ? at() : Q(), w(r.braceL); !l(r.braceR) && !a.error; )
21265
- l(r._import) ? (E(), Ja()) : te();
21302
+ l(r._import) ? (E(), Qa()) : te();
21266
21303
  w(r.braceR);
21267
21304
  }
21268
21305
  function ch() {
21269
- w(r._export), y(r._default) ? l(r._function) || l(r._class) ? wr() : (Me(), be()) : l(r._var) || // declare export var ...
21306
+ w(r._export), y(r._default) ? l(r._function) || l(r._class) ? xr() : (Me(), be()) : l(r._var) || // declare export var ...
21270
21307
  l(r._function) || // declare export function ...
21271
21308
  l(r._class) || // declare export class ...
21272
- V(d._opaque) ? wr() : l(r.star) || // declare export * from ''
21309
+ V(d._opaque) ? xr() : l(r.star) || // declare export * from ''
21273
21310
  l(r.braceL) || // declare export {} ...
21274
21311
  V(d._interface) || // declare export interface ...
21275
21312
  V(d._type) || // declare export type ...
21276
- V(d._opaque) ? Ka() : te();
21313
+ V(d._opaque) ? Za() : te();
21277
21314
  }
21278
21315
  function uh() {
21279
21316
  ve(d._exports), Dt(), be();
21280
21317
  }
21281
21318
  function lh() {
21282
- E(), ti();
21319
+ E(), si();
21283
21320
  }
21284
21321
  function fh() {
21285
- E(), ni(!0);
21322
+ E(), ri(!0);
21286
21323
  }
21287
21324
  function hh() {
21288
- E(), Qr();
21325
+ E(), ti();
21289
21326
  }
21290
- function Qr(t = !1) {
21327
+ function ti(t = !1) {
21291
21328
  if (Kn(), l(r.lessThan) && ze(), y(r._extends))
21292
21329
  do
21293
21330
  wn();
@@ -21307,22 +21344,22 @@ function Qr(t = !1) {
21307
21344
  Mn(t, !1, t);
21308
21345
  }
21309
21346
  function wn() {
21310
- Oa(!1), l(r.lessThan) && It();
21347
+ $a(!1), l(r.lessThan) && It();
21311
21348
  }
21312
- function ei() {
21313
- Qr();
21349
+ function ni() {
21350
+ ti();
21314
21351
  }
21315
21352
  function Kn() {
21316
21353
  Q();
21317
21354
  }
21318
- function ti() {
21355
+ function si() {
21319
21356
  Kn(), l(r.lessThan) && ze(), st(r.eq), be();
21320
21357
  }
21321
- function ni(t) {
21358
+ function ri(t) {
21322
21359
  ve(d._type), Kn(), l(r.lessThan) && ze(), l(r.colon) && st(r.colon), t || st(r.eq), be();
21323
21360
  }
21324
21361
  function dh() {
21325
- ii(), Va(), y(r.eq) && Me();
21362
+ ai(), qa(), y(r.eq) && Me();
21326
21363
  }
21327
21364
  function ze() {
21328
21365
  const t = re(0);
@@ -21345,22 +21382,22 @@ function mh() {
21345
21382
  while (y(r.comma));
21346
21383
  Mn(!1, !1, !1);
21347
21384
  }
21348
- function si() {
21385
+ function ii() {
21349
21386
  l(r.num) || l(r.string) ? at() : Q();
21350
21387
  }
21351
21388
  function ph() {
21352
- _e() === r.colon ? (si(), st()) : Me(), w(r.bracketR), st();
21389
+ _e() === r.colon ? (ii(), st()) : Me(), w(r.bracketR), st();
21353
21390
  }
21354
21391
  function gh() {
21355
- si(), w(r.bracketR), w(r.bracketR), l(r.lessThan) || l(r.parenL) ? ri() : (y(r.question), st());
21392
+ ii(), w(r.bracketR), w(r.bracketR), l(r.lessThan) || l(r.parenL) ? oi() : (y(r.question), st());
21356
21393
  }
21357
- function ri() {
21394
+ function oi() {
21358
21395
  for (l(r.lessThan) && ze(), w(r.parenL); !l(r.parenR) && !l(r.ellipsis) && !a.error; )
21359
21396
  Bn(), l(r.parenR) || w(r.comma);
21360
21397
  y(r.ellipsis) && Bn(), w(r.parenR), st();
21361
21398
  }
21362
21399
  function bh() {
21363
- ri();
21400
+ oi();
21364
21401
  }
21365
21402
  function Mn(t, e, n) {
21366
21403
  let s;
@@ -21373,7 +21410,7 @@ function Mn(t, e, n) {
21373
21410
  const i = _e();
21374
21411
  i !== r.colon && i !== r.question && E();
21375
21412
  }
21376
- if (ii(), y(r.bracketL))
21413
+ if (ai(), y(r.bracketL))
21377
21414
  y(r.bracketL) ? gh() : ph();
21378
21415
  else if (l(r.parenL) || l(r.lessThan))
21379
21416
  bh();
@@ -21394,20 +21431,20 @@ function _h() {
21394
21431
  return;
21395
21432
  Me();
21396
21433
  } else
21397
- si(), l(r.lessThan) || l(r.parenL) ? ri() : (y(r.question), st());
21434
+ ii(), l(r.lessThan) || l(r.parenL) ? oi() : (y(r.question), st());
21398
21435
  }
21399
21436
  function yh() {
21400
21437
  !y(r.semi) && !y(r.comma) && !l(r.braceR) && !l(r.braceBarR) && te();
21401
21438
  }
21402
- function Oa(t) {
21439
+ function $a(t) {
21403
21440
  for (t || Q(); y(r.dot); )
21404
21441
  Q();
21405
21442
  }
21406
21443
  function kh() {
21407
- Oa(!0), l(r.lessThan) && It();
21444
+ $a(!0), l(r.lessThan) && It();
21408
21445
  }
21409
21446
  function vh() {
21410
- w(r._typeof), $a();
21447
+ w(r._typeof), ja();
21411
21448
  }
21412
21449
  function wh() {
21413
21450
  for (w(r.bracketL); a.pos < P.length && !l(r.bracketR) && (Me(), !l(r.bracketR)); )
@@ -21418,12 +21455,12 @@ function Bn() {
21418
21455
  const t = _e();
21419
21456
  t === r.colon || t === r.question ? (Q(), y(r.question), st()) : Me();
21420
21457
  }
21421
- function xr() {
21458
+ function Er() {
21422
21459
  for (; !l(r.parenR) && !l(r.ellipsis) && !a.error; )
21423
21460
  Bn(), l(r.parenR) || w(r.comma);
21424
21461
  y(r.ellipsis) && Bn();
21425
21462
  }
21426
- function $a() {
21463
+ function ja() {
21427
21464
  let t = !1;
21428
21465
  const e = a.noAnonFunctionType;
21429
21466
  switch (a.type) {
@@ -21445,7 +21482,7 @@ function $a() {
21445
21482
  wh();
21446
21483
  return;
21447
21484
  case r.lessThan:
21448
- ze(), w(r.parenL), xr(), w(r.parenR), w(r.arrow), Me();
21485
+ ze(), w(r.parenL), Er(), w(r.parenR), w(r.arrow), Me();
21449
21486
  return;
21450
21487
  case r.parenL:
21451
21488
  if (E(), !l(r.parenR) && !l(r.ellipsis))
@@ -21460,7 +21497,7 @@ function $a() {
21460
21497
  return;
21461
21498
  } else
21462
21499
  y(r.comma);
21463
- xr(), w(r.parenR), w(r.arrow), Me();
21500
+ Er(), w(r.parenR), w(r.arrow), Me();
21464
21501
  return;
21465
21502
  case r.minus:
21466
21503
  E(), $t();
@@ -21487,22 +21524,22 @@ function $a() {
21487
21524
  te();
21488
21525
  }
21489
21526
  function xh() {
21490
- for ($a(); !Be() && (l(r.bracketL) || l(r.questionDot)); )
21527
+ for (ja(); !Be() && (l(r.bracketL) || l(r.questionDot)); )
21491
21528
  y(r.questionDot), w(r.bracketL), y(r.bracketR) || (Me(), w(r.bracketR));
21492
21529
  }
21493
- function ja() {
21494
- y(r.question) ? ja() : xh();
21530
+ function Va() {
21531
+ y(r.question) ? Va() : xh();
21495
21532
  }
21496
- function no() {
21497
- ja(), !a.noAnonFunctionType && y(r.arrow) && Me();
21533
+ function ro() {
21534
+ Va(), !a.noAnonFunctionType && y(r.arrow) && Me();
21498
21535
  }
21499
- function so() {
21500
- for (y(r.bitwiseAND), no(); y(r.bitwiseAND); )
21501
- no();
21536
+ function io() {
21537
+ for (y(r.bitwiseAND), ro(); y(r.bitwiseAND); )
21538
+ ro();
21502
21539
  }
21503
21540
  function Eh() {
21504
- for (y(r.bitwiseOR), so(); y(r.bitwiseOR); )
21505
- so();
21541
+ for (y(r.bitwiseOR), io(); y(r.bitwiseOR); )
21542
+ io();
21506
21543
  }
21507
21544
  function Me() {
21508
21545
  Eh();
@@ -21510,14 +21547,14 @@ function Me() {
21510
21547
  function Dt() {
21511
21548
  st();
21512
21549
  }
21513
- function Va() {
21550
+ function qa() {
21514
21551
  Q(), l(r.colon) && Dt();
21515
21552
  }
21516
- function ii() {
21553
+ function ai() {
21517
21554
  (l(r.plus) || l(r.minus)) && (E(), a.tokens[a.tokens.length - 1].isType = !0);
21518
21555
  }
21519
21556
  function Sh(t) {
21520
- l(r.colon) && Jr(), mn(!1, t);
21557
+ l(r.colon) && ei(), mn(!1, t);
21521
21558
  }
21522
21559
  function Th(t, e, n) {
21523
21560
  if (l(r.questionDot) && _e() === r.lessThan) {
@@ -21534,7 +21571,7 @@ function Th(t, e, n) {
21534
21571
  else
21535
21572
  return;
21536
21573
  }
21537
- Gr(t, e, n);
21574
+ zr(t, e, n);
21538
21575
  }
21539
21576
  function Ih() {
21540
21577
  if (l(r.lessThan)) {
@@ -21545,30 +21582,30 @@ function Ih() {
21545
21582
  function Ah() {
21546
21583
  if (l(r.name) && a.contextualKeyword === d._interface) {
21547
21584
  const t = re(0);
21548
- return E(), ei(), ne(t), !0;
21585
+ return E(), ni(), ne(t), !0;
21549
21586
  } else if (V(d._enum))
21550
- return qa(), !0;
21587
+ return Ha(), !0;
21551
21588
  return !1;
21552
21589
  }
21553
21590
  function Rh() {
21554
- return V(d._enum) ? (qa(), !0) : !1;
21591
+ return V(d._enum) ? (Ha(), !0) : !1;
21555
21592
  }
21556
21593
  function Ch(t) {
21557
21594
  if (t === d._declare) {
21558
21595
  if (l(r._class) || l(r.name) || l(r._function) || l(r._var) || l(r._export)) {
21559
21596
  const e = re(1);
21560
- wr(), ne(e);
21597
+ xr(), ne(e);
21561
21598
  }
21562
21599
  } else if (l(r.name)) {
21563
21600
  if (t === d._interface) {
21564
21601
  const e = re(1);
21565
- ei(), ne(e);
21602
+ ni(), ne(e);
21566
21603
  } else if (t === d._type) {
21567
21604
  const e = re(1);
21568
- ti(), ne(e);
21605
+ si(), ne(e);
21569
21606
  } else if (t === d._opaque) {
21570
21607
  const e = re(1);
21571
- ni(!1), ne(e);
21608
+ ri(!1), ne(e);
21572
21609
  }
21573
21610
  }
21574
21611
  be();
@@ -21582,13 +21619,13 @@ function Dh() {
21582
21619
  function Lh() {
21583
21620
  if (V(d._type)) {
21584
21621
  const t = re(1);
21585
- E(), l(r.braceL) ? (ai(), on()) : ti(), ne(t);
21622
+ E(), l(r.braceL) ? (ui(), on()) : si(), ne(t);
21586
21623
  } else if (V(d._opaque)) {
21587
21624
  const t = re(1);
21588
- E(), ni(!1), ne(t);
21625
+ E(), ri(!1), ne(t);
21589
21626
  } else if (V(d._interface)) {
21590
21627
  const t = re(1);
21591
- E(), ei(), ne(t);
21628
+ E(), ni(), ne(t);
21592
21629
  } else
21593
21630
  Oe(!0);
21594
21631
  }
@@ -21598,9 +21635,9 @@ function Fh() {
21598
21635
  function Uh() {
21599
21636
  if (xe(d._type)) {
21600
21637
  const t = re(2);
21601
- Er(), ne(t);
21638
+ Sr(), ne(t);
21602
21639
  } else
21603
- Er();
21640
+ Sr();
21604
21641
  }
21605
21642
  function Nh(t) {
21606
21643
  if (t && l(r.lessThan) && It(), V(d._implements)) {
@@ -21627,7 +21664,7 @@ function Oh() {
21627
21664
  }
21628
21665
  function $h() {
21629
21666
  const t = a.contextualKeyword === d._type || a.type === r._typeof;
21630
- t ? E() : Q(), V(d._as) && !Nr(d._as) ? (Q(), t && !l(r.name) && !(a.type & r.IS_KEYWORD) || Q()) : (t && (l(r.name) || a.type & r.IS_KEYWORD) && Q(), xe(d._as) && Q());
21667
+ t ? E() : Q(), V(d._as) && !Br(d._as) ? (Q(), t && !l(r.name) && !(a.type & r.IS_KEYWORD) || Q()) : (t && (l(r.name) || a.type & r.IS_KEYWORD) && Q(), xe(d._as) && Q());
21631
21668
  }
21632
21669
  function jh() {
21633
21670
  if (l(r.lessThan)) {
@@ -21662,7 +21699,7 @@ function Hh(t, e) {
21662
21699
  function Xh() {
21663
21700
  if (l(r.colon)) {
21664
21701
  const t = re(0), e = a.snapshot(), n = a.noAnonFunctionType;
21665
- a.noAnonFunctionType = !0, Jr(), a.noAnonFunctionType = n, Be() && te(), l(r.arrow) || te(), a.error && a.restoreFromSnapshot(e), ne(t);
21702
+ a.noAnonFunctionType = !0, ei(), a.noAnonFunctionType = n, Be() && te(), l(r.arrow) || te(), a.error && a.restoreFromSnapshot(e), ne(t);
21666
21703
  }
21667
21704
  return y(r.arrow);
21668
21705
  }
@@ -21673,14 +21710,14 @@ function Wh(t, e = !1) {
21673
21710
  return;
21674
21711
  a.restoreFromSnapshot(n);
21675
21712
  }
21676
- La(t, e);
21713
+ Fa(t, e);
21677
21714
  }
21678
21715
  function Gh() {
21679
21716
  a.scopeDepth++;
21680
21717
  const t = a.tokens.length;
21681
- return qt(), kr() ? (rn(t), !0) : !1;
21718
+ return qt(), vr() ? (rn(t), !0) : !1;
21682
21719
  }
21683
- function qa() {
21720
+ function Ha() {
21684
21721
  ve(d._enum), a.tokens[a.tokens.length - 1].type = r._enum, Q(), Yh();
21685
21722
  }
21686
21723
  function Yh() {
@@ -21699,7 +21736,7 @@ function Zh() {
21699
21736
  return new Md(a.tokens, a.scopes);
21700
21737
  }
21701
21738
  function Oe(t) {
21702
- fe && Ah() || (l(r.at) && oi(), Jh(t));
21739
+ fe && Ah() || (l(r.at) && ci(), Jh(t));
21703
21740
  }
21704
21741
  function Jh(t) {
21705
21742
  if (le && pf())
@@ -21761,7 +21798,7 @@ function Jh(t) {
21761
21798
  const i = _e();
21762
21799
  if (i === r.parenL || i === r.dot)
21763
21800
  break;
21764
- E(), e === r._import ? Ja() : Ka();
21801
+ E(), e === r._import ? Qa() : Za();
21765
21802
  return;
21766
21803
  }
21767
21804
  case r.name:
@@ -21772,12 +21809,12 @@ function Jh(t) {
21772
21809
  return;
21773
21810
  } else
21774
21811
  a.restoreFromSnapshot(o);
21775
- } else if (a.contextualKeyword === d._using && !Go() && // Statements like `using[0]` and `using in foo` aren't actual using
21812
+ } else if (a.contextualKeyword === d._using && !Yo() && // Statements like `using[0]` and `using in foo` aren't actual using
21776
21813
  // declarations.
21777
21814
  _e() === r.name) {
21778
21815
  xn(!0);
21779
21816
  return;
21780
- } else if (Ha()) {
21817
+ } else if (Xa()) {
21781
21818
  ve(d._await), xn(!0);
21782
21819
  return;
21783
21820
  }
@@ -21795,17 +21832,17 @@ function Jh(t) {
21795
21832
  }
21796
21833
  y(r.colon) ? pd() : gd(s);
21797
21834
  }
21798
- function Ha() {
21835
+ function Xa() {
21799
21836
  if (!V(d._await))
21800
21837
  return !1;
21801
21838
  const t = a.snapshot();
21802
21839
  return E(), !V(d._using) || De() || (E(), !l(r.name) || De()) ? (a.restoreFromSnapshot(t), !1) : (a.restoreFromSnapshot(t), !0);
21803
21840
  }
21804
- function oi() {
21841
+ function ci() {
21805
21842
  for (; l(r.at); )
21806
- Xa();
21843
+ Wa();
21807
21844
  }
21808
- function Xa() {
21845
+ function Wa() {
21809
21846
  if (E(), y(r.parenL))
21810
21847
  Te(), w(r.parenR);
21811
21848
  else {
@@ -21815,9 +21852,9 @@ function Xa() {
21815
21852
  }
21816
21853
  }
21817
21854
  function Qh() {
21818
- le ? Rf() : Wa();
21855
+ le ? Rf() : Ga();
21819
21856
  }
21820
- function Wa() {
21857
+ function Ga() {
21821
21858
  y(r.parenL) && pt();
21822
21859
  }
21823
21860
  function ed() {
@@ -21837,7 +21874,7 @@ function sd() {
21837
21874
  a.scopes.push(new nt(t, e, !1)), a.scopeDepth--;
21838
21875
  }
21839
21876
  function rd() {
21840
- return !(!V(d._using) || Nr(d._of));
21877
+ return !(!V(d._using) || Br(d._of));
21841
21878
  }
21842
21879
  function id() {
21843
21880
  E();
@@ -21846,17 +21883,17 @@ function id() {
21846
21883
  t && te(), ir();
21847
21884
  return;
21848
21885
  }
21849
- const e = Ha();
21886
+ const e = Xa();
21850
21887
  if (e || l(r._var) || l(r._let) || l(r._const) || rd()) {
21851
- if (e && ve(d._await), E(), Ga(!0, a.type !== r._var), l(r._in) || V(d._of)) {
21852
- ro(t);
21888
+ if (e && ve(d._await), E(), Ya(!0, a.type !== r._var), l(r._in) || V(d._of)) {
21889
+ oo(t);
21853
21890
  return;
21854
21891
  }
21855
21892
  ir();
21856
21893
  return;
21857
21894
  }
21858
21895
  if (Te(!0), l(r._in) || V(d._of)) {
21859
- ro(t);
21896
+ oo(t);
21860
21897
  return;
21861
21898
  }
21862
21899
  t && te(), ir();
@@ -21905,7 +21942,7 @@ function hd() {
21905
21942
  y(r._finally) && gt();
21906
21943
  }
21907
21944
  function xn(t) {
21908
- E(), Ga(!1, t), be();
21945
+ E(), Ya(!1, t), be();
21909
21946
  }
21910
21947
  function dd() {
21911
21948
  E(), zn(), Oe(!1);
@@ -21932,10 +21969,10 @@ function Zn(t) {
21932
21969
  function ir() {
21933
21970
  w(r.semi), l(r.semi) || Te(), w(r.semi), l(r.parenR) || Te(), w(r.parenR), Oe(!1);
21934
21971
  }
21935
- function ro(t) {
21972
+ function oo(t) {
21936
21973
  t ? xe(d._of) : E(), Te(), w(r.parenR), Oe(!1);
21937
21974
  }
21938
- function Ga(t, e) {
21975
+ function Ya(t, e) {
21939
21976
  for (; ; ) {
21940
21977
  if (bd(e), y(r.eq)) {
21941
21978
  const n = a.tokens.length - 1;
@@ -21953,12 +21990,12 @@ function At(t, e, n = !1) {
21953
21990
  let s = null;
21954
21991
  l(r.name) && (e || (s = a.tokens.length, a.scopeDepth++), bt(!1));
21955
21992
  const i = a.tokens.length;
21956
- a.scopeDepth++, qt(), Na(t);
21993
+ a.scopeDepth++, qt(), Ma(t);
21957
21994
  const o = a.tokens.length;
21958
21995
  a.scopes.push(new nt(i, o, !0)), a.scopeDepth--, s !== null && (a.scopes.push(new nt(s, o, !0)), a.scopeDepth--);
21959
21996
  }
21960
21997
  function qt(t = !1, e = 0) {
21961
- le ? vf() : fe && jh(), w(r.parenL), e && (a.tokens[a.tokens.length - 1].contextId = e), $r(
21998
+ le ? vf() : fe && jh(), w(r.parenL), e && (a.tokens[a.tokens.length - 1].contextId = e), Vr(
21962
21999
  r.parenR,
21963
22000
  !1,
21964
22001
  !1,
@@ -21977,10 +22014,10 @@ function Rt(t, e = !1) {
21977
22014
  a.scopes.push(new nt(s, o, !1)), a.scopeDepth--;
21978
22015
  }
21979
22016
  }
21980
- function Ya() {
22017
+ function za() {
21981
22018
  return l(r.eq) || l(r.semi) || l(r.braceR) || l(r.bang) || l(r.colon);
21982
22019
  }
21983
- function za() {
22020
+ function Ka() {
21984
22021
  return l(r.parenL) || l(r.lessThan);
21985
22022
  }
21986
22023
  function _d(t) {
@@ -21988,7 +22025,7 @@ function _d(t) {
21988
22025
  if (y(r.semi))
21989
22026
  continue;
21990
22027
  if (l(r.at)) {
21991
- Xa();
22028
+ Wa();
21992
22029
  continue;
21993
22030
  }
21994
22031
  const e = a.start;
@@ -21996,7 +22033,7 @@ function _d(t) {
21996
22033
  }
21997
22034
  }
21998
22035
  function yd(t, e) {
21999
- le && jr([
22036
+ le && qr([
22000
22037
  d._declare,
22001
22038
  d._public,
22002
22039
  d._protected,
@@ -22005,14 +22042,14 @@ function yd(t, e) {
22005
22042
  ]);
22006
22043
  let n = !1;
22007
22044
  if (l(r.name) && a.contextualKeyword === d._static) {
22008
- if (Q(), za()) {
22045
+ if (Q(), Ka()) {
22009
22046
  zt(
22010
22047
  t,
22011
22048
  /* isConstructor */
22012
22049
  !1
22013
22050
  );
22014
22051
  return;
22015
- } else if (Ya()) {
22052
+ } else if (za()) {
22016
22053
  En();
22017
22054
  return;
22018
22055
  }
@@ -22037,7 +22074,7 @@ function kd(t, e, n) {
22037
22074
  Yt(n);
22038
22075
  let s = !1;
22039
22076
  const i = a.tokens[a.tokens.length - 1];
22040
- i.contextualKeyword === d._constructor && (s = !0), io(), za() ? zt(t, s) : Ya() ? En() : i.contextualKeyword === d._async && !Qe() ? (a.tokens[a.tokens.length - 1].type = r._async, l(r.star) && E(), Yt(n), io(), zt(
22077
+ i.contextualKeyword === d._constructor && (s = !0), ao(), Ka() ? zt(t, s) : za() ? En() : i.contextualKeyword === d._async && !Qe() ? (a.tokens[a.tokens.length - 1].type = r._async, l(r.star) && E(), Yt(n), ao(), zt(
22041
22078
  t,
22042
22079
  !1
22043
22080
  /* isConstructor */
@@ -22048,19 +22085,19 @@ function kd(t, e, n) {
22048
22085
  )) : i.contextualKeyword === d._accessor && !Qe() ? (Yt(n), En()) : Qe() ? En() : te();
22049
22086
  }
22050
22087
  function zt(t, e) {
22051
- le ? Pt() : fe && l(r.lessThan) && ze(), vr(t, e);
22088
+ le ? Pt() : fe && l(r.lessThan) && ze(), wr(t, e);
22052
22089
  }
22053
22090
  function Yt(t) {
22054
22091
  sn(t);
22055
22092
  }
22056
- function io() {
22093
+ function ao() {
22057
22094
  if (le) {
22058
22095
  const t = re(0);
22059
22096
  y(r.question), ne(t);
22060
22097
  }
22061
22098
  }
22062
22099
  function En() {
22063
- if (le ? (Jo(r.bang), jt()) : fe && l(r.colon) && Dt(), l(r.eq)) {
22100
+ if (le ? (Qo(r.bang), jt()) : fe && l(r.colon) && Dt(), l(r.eq)) {
22064
22101
  const t = a.tokens.length;
22065
22102
  E(), Ie(), a.tokens[t].rhsEndIndex = a.tokens.length;
22066
22103
  }
@@ -22071,23 +22108,23 @@ function vd(t, e = !1) {
22071
22108
  }
22072
22109
  function wd() {
22073
22110
  let t = !1;
22074
- y(r._extends) ? (Da(), t = !0) : t = !1, le ? yf(t) : fe && Nh(t);
22111
+ y(r._extends) ? (La(), t = !0) : t = !1, le ? yf(t) : fe && Nh(t);
22075
22112
  }
22076
- function Ka() {
22113
+ function Za() {
22077
22114
  const t = a.tokens.length - 1;
22078
- le && ff() || (Td() ? Id() : Sd() ? (Q(), l(r.comma) && _e() === r.star ? (w(r.comma), w(r.star), ve(d._as), Q()) : Za(), on()) : y(r._default) ? xd() : Rd() ? Ed() : (ai(), on()), a.tokens[t].rhsEndIndex = a.tokens.length);
22115
+ le && ff() || (Td() ? Id() : Sd() ? (Q(), l(r.comma) && _e() === r.star ? (w(r.comma), w(r.star), ve(d._as), Q()) : Ja(), on()) : y(r._default) ? xd() : Rd() ? Ed() : (ui(), on()), a.tokens[t].rhsEndIndex = a.tokens.length);
22079
22116
  }
22080
22117
  function xd() {
22081
22118
  if (le && mf() || fe && Rh())
22082
22119
  return;
22083
22120
  const t = a.start;
22084
- y(r._function) ? At(t, !0, !0) : V(d._async) && _e() === r._function ? (xe(d._async), y(r._function), At(t, !0, !0)) : l(r._class) ? Rt(!0, !0) : l(r.at) ? (oi(), Rt(!0, !0)) : (Ie(), be());
22121
+ y(r._function) ? At(t, !0, !0) : V(d._async) && _e() === r._function ? (xe(d._async), y(r._function), At(t, !0, !0)) : l(r._class) ? Rt(!0, !0) : l(r.at) ? (ci(), Rt(!0, !0)) : (Ie(), be());
22085
22122
  }
22086
22123
  function Ed() {
22087
22124
  le ? _f() : fe ? Lh() : Oe(!0);
22088
22125
  }
22089
22126
  function Sd() {
22090
- if (le && Ta())
22127
+ if (le && Ia())
22091
22128
  return !1;
22092
22129
  if (fe && Dh())
22093
22130
  return !1;
@@ -22095,37 +22132,37 @@ function Sd() {
22095
22132
  return a.contextualKeyword !== d._async;
22096
22133
  if (!l(r._default))
22097
22134
  return !1;
22098
- const t = Mr(), e = ln(), n = e.type === r.name && e.contextualKeyword === d._from;
22135
+ const t = Or(), e = ln(), n = e.type === r.name && e.contextualKeyword === d._from;
22099
22136
  if (e.type === r.comma)
22100
22137
  return !0;
22101
22138
  if (n) {
22102
- const s = P.charCodeAt(Qo(t + 4));
22139
+ const s = P.charCodeAt(ea(t + 4));
22103
22140
  return s === p.quotationMark || s === p.apostrophe;
22104
22141
  }
22105
22142
  return !1;
22106
22143
  }
22107
- function Za() {
22108
- y(r.comma) && ai();
22144
+ function Ja() {
22145
+ y(r.comma) && ui();
22109
22146
  }
22110
22147
  function on() {
22111
- xe(d._from) && (at(), Qa()), be();
22148
+ xe(d._from) && (at(), ec()), be();
22112
22149
  }
22113
22150
  function Td() {
22114
22151
  return fe ? Fh() : l(r.star);
22115
22152
  }
22116
22153
  function Id() {
22117
- fe ? Uh() : Er();
22154
+ fe ? Uh() : Sr();
22118
22155
  }
22119
- function Er() {
22156
+ function Sr() {
22120
22157
  w(r.star), V(d._as) ? Ad() : on();
22121
22158
  }
22122
22159
  function Ad() {
22123
- E(), a.tokens[a.tokens.length - 1].type = r._as, Q(), Za(), on();
22160
+ E(), a.tokens[a.tokens.length - 1].type = r._as, Q(), Ja(), on();
22124
22161
  }
22125
22162
  function Rd() {
22126
- return le && Ta() || fe && Ph() || a.type === r._var || a.type === r._const || a.type === r._let || a.type === r._function || a.type === r._class || V(d._async) || l(r.at);
22163
+ return le && Ia() || fe && Ph() || a.type === r._var || a.type === r._const || a.type === r._let || a.type === r._function || a.type === r._class || V(d._async) || l(r.at);
22127
22164
  }
22128
- function ai() {
22165
+ function ui() {
22129
22166
  let t = !0;
22130
22167
  for (w(r.braceL); !y(r.braceR) && !a.error; ) {
22131
22168
  if (t)
@@ -22149,34 +22186,34 @@ function Pd() {
22149
22186
  function Dd() {
22150
22187
  V(d._module) && Pd() && E();
22151
22188
  }
22152
- function Ja() {
22189
+ function Qa() {
22153
22190
  if (le && l(r.name) && _e() === r.eq) {
22154
- _r();
22191
+ yr();
22155
22192
  return;
22156
22193
  }
22157
22194
  if (le && V(d._type)) {
22158
22195
  const t = ln();
22159
22196
  if (t.type === r.name && t.contextualKeyword !== d._from) {
22160
22197
  if (ve(d._type), _e() === r.eq) {
22161
- _r();
22198
+ yr();
22162
22199
  return;
22163
22200
  }
22164
22201
  } else (t.type === r.star || t.type === r.braceL) && ve(d._type);
22165
22202
  }
22166
- l(r.string) || (Dd(), Fd(), ve(d._from)), at(), Qa(), be();
22203
+ l(r.string) || (Dd(), Fd(), ve(d._from)), at(), ec(), be();
22167
22204
  }
22168
22205
  function Ld() {
22169
22206
  return l(r.name);
22170
22207
  }
22171
- function oo() {
22208
+ function co() {
22172
22209
  Ln();
22173
22210
  }
22174
22211
  function Fd() {
22175
22212
  fe && Oh();
22176
22213
  let t = !0;
22177
- if (!(Ld() && (oo(), !y(r.comma)))) {
22214
+ if (!(Ld() && (co(), !y(r.comma)))) {
22178
22215
  if (l(r.star)) {
22179
- E(), ve(d._as), oo();
22216
+ E(), ve(d._as), co();
22180
22217
  return;
22181
22218
  }
22182
22219
  for (w(r.braceL); !y(r.braceR) && !a.error; ) {
@@ -22201,11 +22238,11 @@ function Ud() {
22201
22238
  }
22202
22239
  Ln(), V(d._as) && (a.tokens[a.tokens.length - 1].identifierRole = G.ImportAccess, E(), Ln());
22203
22240
  }
22204
- function Qa() {
22205
- (l(r._with) || V(d._assert) && !De()) && (E(), Zr(!1, !1));
22241
+ function ec() {
22242
+ (l(r._with) || V(d._assert) && !De()) && (E(), Qr(!1, !1));
22206
22243
  }
22207
22244
  function Nd() {
22208
- return a.pos === 0 && P.charCodeAt(0) === p.numberSign && P.charCodeAt(1) === p.exclamationMark && na(2), ta(), Zh();
22245
+ return a.pos === 0 && P.charCodeAt(0) === p.numberSign && P.charCodeAt(1) === p.exclamationMark && sa(2), na(), Zh();
22209
22246
  }
22210
22247
  class Md {
22211
22248
  constructor(e, n) {
@@ -22448,7 +22485,7 @@ function $d(t, e, n, s) {
22448
22485
  throw new Error("Expected non-null class context ID on class open-brace.");
22449
22486
  for (e.nextToken(); !e.matchesContextIdAndLabel(r.braceR, x); )
22450
22487
  if (e.matchesContextual(d._constructor) && !e.currentToken().isType)
22451
- ({ constructorInitializerStatements: c, constructorInsertPos: f } = ao(e));
22488
+ ({ constructorInitializerStatements: c, constructorInsertPos: f } = uo(e));
22452
22489
  else if (e.matches1(r.semi))
22453
22490
  s || g.push({ start: e.currentIndex(), end: e.currentIndex() + 1 }), e.nextToken();
22454
22491
  else if (e.currentToken().isType)
@@ -22467,7 +22504,7 @@ function $d(t, e, n, s) {
22467
22504
  continue;
22468
22505
  }
22469
22506
  if (e.matchesContextual(d._constructor) && !e.currentToken().isType) {
22470
- ({ constructorInitializerStatements: c, constructorInsertPos: f } = ao(e));
22507
+ ({ constructorInitializerStatements: c, constructorInsertPos: f } = uo(e));
22471
22508
  continue;
22472
22509
  }
22473
22510
  const K = e.currentIndex();
@@ -22528,7 +22565,7 @@ function jd(t) {
22528
22565
  t.matches1(r._extends) && !t.currentToken().isType && (o = !0), t.nextToken();
22529
22566
  return { isExpression: s, className: i, hasSuperclass: o };
22530
22567
  }
22531
- function ao(t) {
22568
+ function uo(t) {
22532
22569
  const e = [];
22533
22570
  t.nextToken();
22534
22571
  const n = t.currentToken().contextId;
@@ -22594,26 +22631,26 @@ function Vd(t) {
22594
22631
  } else
22595
22632
  t.nextToken();
22596
22633
  }
22597
- function ec(t) {
22634
+ function tc(t) {
22598
22635
  if (t.removeInitialToken(), t.removeToken(), t.removeToken(), t.removeToken(), t.matches1(r.parenL))
22599
22636
  t.removeToken(), t.removeToken(), t.removeToken();
22600
22637
  else
22601
22638
  for (; t.matches1(r.dot); )
22602
22639
  t.removeToken(), t.removeToken();
22603
22640
  }
22604
- const tc = {
22641
+ const nc = {
22605
22642
  typeDeclarations: /* @__PURE__ */ new Set(),
22606
22643
  valueDeclarations: /* @__PURE__ */ new Set()
22607
22644
  };
22608
- function nc(t) {
22645
+ function sc(t) {
22609
22646
  const e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
22610
22647
  for (let s = 0; s < t.tokens.length; s++) {
22611
22648
  const i = t.tokens[s];
22612
- i.type === r.name && Zo(i) && (i.isType ? e.add(t.identifierNameForToken(i)) : n.add(t.identifierNameForToken(i)));
22649
+ i.type === r.name && Jo(i) && (i.isType ? e.add(t.identifierNameForToken(i)) : n.add(t.identifierNameForToken(i)));
22613
22650
  }
22614
22651
  return { typeDeclarations: e, valueDeclarations: n };
22615
22652
  }
22616
- function sc(t) {
22653
+ function rc(t) {
22617
22654
  let e = t.currentIndex();
22618
22655
  for (; !t.matches1AtIndex(e, r.braceR); )
22619
22656
  e++;
@@ -22622,7 +22659,7 @@ function sc(t) {
22622
22659
  function Et(t) {
22623
22660
  (t.matches2(r._with, r.braceL) || t.matches2(r.name, r.braceL) && t.matchesContextual(d._assert)) && (t.removeToken(), t.removeToken(), t.removeBalancedCode(), t.removeToken());
22624
22661
  }
22625
- function rc(t, e, n, s) {
22662
+ function ic(t, e, n, s) {
22626
22663
  if (!t || e)
22627
22664
  return !1;
22628
22665
  const i = n.currentToken();
@@ -22648,7 +22685,7 @@ class Jt extends Ye {
22648
22685
  this.hadDefaultExport = !1;
22649
22686
  }
22650
22687
  constructor(e, n, s, i, o, c, u, h, f, m, g, x) {
22651
- super(), this.rootTransformer = e, this.tokens = n, this.importProcessor = s, this.nameManager = i, this.helperManager = o, this.reactHotLoaderTransformer = c, this.enableLegacyBabel5ModuleInterop = u, this.enableLegacyTypeScriptModuleInterop = h, this.isTypeScriptTransformEnabled = f, this.isFlowTransformEnabled = m, this.preserveDynamicImport = g, this.keepUnusedImports = x, Jt.prototype.__init.call(this), Jt.prototype.__init2.call(this), Jt.prototype.__init3.call(this), this.declarationInfo = f ? nc(n) : tc;
22688
+ super(), this.rootTransformer = e, this.tokens = n, this.importProcessor = s, this.nameManager = i, this.helperManager = o, this.reactHotLoaderTransformer = c, this.enableLegacyBabel5ModuleInterop = u, this.enableLegacyTypeScriptModuleInterop = h, this.isTypeScriptTransformEnabled = f, this.isFlowTransformEnabled = m, this.preserveDynamicImport = g, this.keepUnusedImports = x, Jt.prototype.__init.call(this), Jt.prototype.__init2.call(this), Jt.prototype.__init3.call(this), this.declarationInfo = f ? sc(n) : nc;
22652
22689
  }
22653
22690
  getPrefixCode() {
22654
22691
  let e = "";
@@ -22664,7 +22701,7 @@ module.exports = exports.default;
22664
22701
  }
22665
22702
  processImportEquals() {
22666
22703
  const e = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1);
22667
- return this.importProcessor.shouldAutomaticallyElideImportedName(e) ? ec(this.tokens) : this.tokens.replaceToken("const"), !0;
22704
+ return this.importProcessor.shouldAutomaticallyElideImportedName(e) ? tc(this.tokens) : this.tokens.replaceToken("const"), !0;
22668
22705
  }
22669
22706
  /**
22670
22707
  * Transform this:
@@ -22846,7 +22883,7 @@ module.exports = exports.default;
22846
22883
  this.tokens.removeInitialToken(), this.tokens.removeToken(), this.copyDecorators(), this.tokens.matches1(r._abstract) && this.tokens.removeToken();
22847
22884
  const n = this.rootTransformer.processNamedClass();
22848
22885
  this.tokens.appendCode(` exports.default = ${n};`);
22849
- } else if (rc(
22886
+ } else if (ic(
22850
22887
  this.isTypeScriptTransformEnabled,
22851
22888
  this.keepUnusedImports,
22852
22889
  this.tokens,
@@ -22942,7 +22979,7 @@ module.exports = exports.default;
22942
22979
  this.rootTransformer.processToken();
22943
22980
  } else {
22944
22981
  const s = this.tokens.currentToken();
22945
- if (Ko(s)) {
22982
+ if (Zo(s)) {
22946
22983
  const i = this.tokens.identifierName();
22947
22984
  let o = this.importProcessor.getIdentifierReplacement(i);
22948
22985
  if (o === null)
@@ -23019,7 +23056,7 @@ module.exports = exports.default;
23019
23056
  */
23020
23057
  processExportBindings() {
23021
23058
  this.tokens.removeInitialToken(), this.tokens.removeToken();
23022
- const e = sc(this.tokens), n = [];
23059
+ const e = rc(this.tokens), n = [];
23023
23060
  for (; ; ) {
23024
23061
  if (this.tokens.matches1(r.braceR)) {
23025
23062
  this.tokens.removeToken();
@@ -23066,7 +23103,7 @@ module.exports = exports.default;
23066
23103
  }
23067
23104
  class qd extends Ye {
23068
23105
  constructor(e, n, s, i, o, c, u, h) {
23069
- super(), this.tokens = e, this.nameManager = n, this.helperManager = s, this.reactHotLoaderTransformer = i, this.isTypeScriptTransformEnabled = o, this.isFlowTransformEnabled = c, this.keepUnusedImports = u, this.nonTypeIdentifiers = o && !u ? fa(e, h) : /* @__PURE__ */ new Set(), this.declarationInfo = o && !u ? nc(e) : tc, this.injectCreateRequireForImportRequire = !!h.injectCreateRequireForImportRequire;
23106
+ super(), this.tokens = e, this.nameManager = n, this.helperManager = s, this.reactHotLoaderTransformer = i, this.isTypeScriptTransformEnabled = o, this.isFlowTransformEnabled = c, this.keepUnusedImports = u, this.nonTypeIdentifiers = o && !u ? ha(e, h) : /* @__PURE__ */ new Set(), this.declarationInfo = o && !u ? sc(e) : nc, this.injectCreateRequireForImportRequire = !!h.injectCreateRequireForImportRequire;
23070
23107
  }
23071
23108
  process() {
23072
23109
  if (this.tokens.matches3(r._import, r.name, r.eq))
@@ -23104,7 +23141,7 @@ class qd extends Ye {
23104
23141
  }
23105
23142
  processImportEquals() {
23106
23143
  const e = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1);
23107
- return this.shouldAutomaticallyElideImportedName(e) ? ec(this.tokens) : this.injectCreateRequireForImportRequire ? (this.tokens.replaceToken("const"), this.tokens.copyToken(), this.tokens.copyToken(), this.tokens.replaceToken(this.helperManager.getHelperName("require"))) : this.tokens.replaceToken("const"), !0;
23144
+ return this.shouldAutomaticallyElideImportedName(e) ? tc(this.tokens) : this.injectCreateRequireForImportRequire ? (this.tokens.replaceToken("const"), this.tokens.copyToken(), this.tokens.copyToken(), this.tokens.replaceToken(this.helperManager.getHelperName("require"))) : this.tokens.replaceToken("const"), !0;
23108
23145
  }
23109
23146
  processImport() {
23110
23147
  if (this.tokens.matches2(r._import, r.parenL))
@@ -23154,7 +23191,7 @@ class qd extends Ye {
23154
23191
  return this.isTypeScriptTransformEnabled && !this.keepUnusedImports && !this.nonTypeIdentifiers.has(e);
23155
23192
  }
23156
23193
  processExportDefault() {
23157
- if (rc(
23194
+ if (ic(
23158
23195
  this.isTypeScriptTransformEnabled,
23159
23196
  this.keepUnusedImports,
23160
23197
  this.tokens,
@@ -23185,7 +23222,7 @@ class qd extends Ye {
23185
23222
  if (!this.isTypeScriptTransformEnabled)
23186
23223
  return !1;
23187
23224
  this.tokens.copyExpectedToken(r._export), this.tokens.copyExpectedToken(r.braceL);
23188
- const e = sc(this.tokens);
23225
+ const e = rc(this.tokens);
23189
23226
  let n = !1;
23190
23227
  for (; !this.tokens.matches1(r.braceR); ) {
23191
23228
  const s = tn(this.tokens);
@@ -23329,12 +23366,12 @@ function Xd(t) {
23329
23366
  return n;
23330
23367
  }
23331
23368
  const yn = "jest", Wd = ["mock", "unmock", "enableAutomock", "disableAutomock"];
23332
- class ci extends Ye {
23369
+ class li extends Ye {
23333
23370
  __init() {
23334
23371
  this.hoistedFunctionNames = [];
23335
23372
  }
23336
23373
  constructor(e, n, s, i) {
23337
- super(), this.rootTransformer = e, this.tokens = n, this.nameManager = s, this.importProcessor = i, ci.prototype.__init.call(this);
23374
+ super(), this.rootTransformer = e, this.tokens = n, this.nameManager = s, this.importProcessor = i, li.prototype.__init.call(this);
23338
23375
  }
23339
23376
  process() {
23340
23377
  return this.tokens.currentToken().scopeDepth === 0 && this.tokens.matches4(r.name, r.dot, r.name, r.parenL) && this.tokens.identifierName() === yn ? Xd([this, "access", (e) => e.importProcessor, "optionalAccess", (e) => e.getGlobalNames, "call", (e) => e(), "optionalAccess", (e) => e.has, "call", (e) => e(yn)]) ? !1 : this.extractHoistedCalls() : !1;
@@ -23518,12 +23555,12 @@ class Kd extends Ye {
23518
23555
  return this.tokens.matches1AtIndex(e, r.parenR) || this.tokens.matches2AtIndex(e, r.comma, r.parenR);
23519
23556
  }
23520
23557
  }
23521
- class ui extends Ye {
23558
+ class fi extends Ye {
23522
23559
  __init() {
23523
23560
  this.extractedDefaultExportName = null;
23524
23561
  }
23525
23562
  constructor(e, n) {
23526
- super(), this.tokens = e, this.filePath = n, ui.prototype.__init.call(this);
23563
+ super(), this.tokens = e, this.filePath = n, fi.prototype.__init.call(this);
23527
23564
  }
23528
23565
  setExtractedDefaultExportName(e) {
23529
23566
  this.extractedDefaultExportName = e;
@@ -23538,7 +23575,7 @@ class ui extends Ye {
23538
23575
  getSuffixCode() {
23539
23576
  const e = /* @__PURE__ */ new Set();
23540
23577
  for (const s of this.tokens.tokens)
23541
- !s.isType && Zo(s) && s.identifierRole !== G.ImportDeclaration && e.add(this.tokens.identifierNameForToken(s));
23578
+ !s.isType && Jo(s) && s.identifierRole !== G.ImportDeclaration && e.add(this.tokens.identifierNameForToken(s));
23542
23579
  const n = Array.from(e).map((s) => ({
23543
23580
  variableName: s,
23544
23581
  uniqueLocalName: s
@@ -23617,7 +23654,7 @@ const Zd = /* @__PURE__ */ new Set([
23617
23654
  "null",
23618
23655
  "true"
23619
23656
  ]);
23620
- function co(t) {
23657
+ function lo(t) {
23621
23658
  if (t.length === 0 || !un[t.charCodeAt(0)])
23622
23659
  return !1;
23623
23660
  for (let e = 1; e < t.length; e++)
@@ -23682,13 +23719,13 @@ class Jd extends Ye {
23682
23719
  const n = this.tokens.identifierNameForToken(e);
23683
23720
  return {
23684
23721
  nameStringCode: `"${n}"`,
23685
- variableName: co(n) ? n : null
23722
+ variableName: lo(n) ? n : null
23686
23723
  };
23687
23724
  } else if (e.type === r.string) {
23688
23725
  const n = this.tokens.stringValueForToken(e);
23689
23726
  return {
23690
23727
  nameStringCode: this.tokens.code.slice(e.start, e.end),
23691
- variableName: co(n) ? n : null
23728
+ variableName: lo(n) ? n : null
23692
23729
  };
23693
23730
  } else
23694
23731
  throw new Error("Expected name or string at beginning of enum element.");
@@ -23797,7 +23834,7 @@ class $n {
23797
23834
  if (n.includes("react-hot-loader")) {
23798
23835
  if (!i.filePath)
23799
23836
  throw new Error("filePath is required when using the react-hot-loader transform.");
23800
- u = new ui(o, i.filePath), this.transformers.push(u);
23837
+ u = new fi(o, i.filePath), this.transformers.push(u);
23801
23838
  }
23802
23839
  if (n.includes("imports")) {
23803
23840
  if (c === null)
@@ -23836,7 +23873,7 @@ class $n {
23836
23873
  ), n.includes("typescript") && this.transformers.push(
23837
23874
  new Jd(this, o, n.includes("imports"))
23838
23875
  ), n.includes("jest") && this.transformers.push(
23839
- new ci(this, o, this.nameManager, c)
23876
+ new li(this, o, this.nameManager, c)
23840
23877
  );
23841
23878
  }
23842
23879
  transform() {
@@ -24141,7 +24178,7 @@ function sm(t, e) {
24141
24178
  }
24142
24179
  }
24143
24180
  function rm(t, e) {
24144
- const n = e.transforms.includes("jsx"), s = e.transforms.includes("typescript"), i = e.transforms.includes("flow"), o = e.disableESTransforms === !0, c = Bd(t, n, s, i), u = c.tokens, h = c.scopes, f = new Br(t, u), m = new Dn(f), g = new Zt(
24181
+ const n = e.transforms.includes("jsx"), s = e.transforms.includes("typescript"), i = e.transforms.includes("flow"), o = e.disableESTransforms === !0, c = Bd(t, n, s, i), u = c.tokens, h = c.scopes, f = new $r(t, u), m = new Dn(f), g = new Zt(
24145
24182
  t,
24146
24183
  u,
24147
24184
  i,
@@ -24157,9 +24194,9 @@ function rm(t, e) {
24157
24194
  e.transforms.includes("typescript"),
24158
24195
  !!e.keepUnusedImports,
24159
24196
  m
24160
- ), T.preprocessTokens(), Yi(g, h, T.getGlobalNames()), e.transforms.includes("typescript") && !e.keepUnusedImports && T.pruneTypeOnlyImports()) : e.transforms.includes("typescript") && !e.keepUnusedImports && Yi(g, h, em(g)), { tokenProcessor: g, scopes: h, nameManager: f, importProcessor: T, helperManager: m };
24197
+ ), T.preprocessTokens(), Ki(g, h, T.getGlobalNames()), e.transforms.includes("typescript") && !e.keepUnusedImports && T.pruneTypeOnlyImports()) : e.transforms.includes("typescript") && !e.keepUnusedImports && Ki(g, h, em(g)), { tokenProcessor: g, scopes: h, nameManager: f, importProcessor: T, helperManager: m };
24161
24198
  }
24162
- function ic(t) {
24199
+ function oc(t) {
24163
24200
  self.postMessage({
24164
24201
  type: "error",
24165
24202
  id: `${t.code.toLowerCase()}_${Date.now()}`,
@@ -24174,7 +24211,7 @@ self.addEventListener("error", (t) => {
24174
24211
  message: s,
24175
24212
  ...n !== void 0 && { stack: n },
24176
24213
  code: "UNCAUGHT_ERROR"
24177
- }) : ic({
24214
+ }) : oc({
24178
24215
  message: s,
24179
24216
  code: "UNCAUGHT_ERROR",
24180
24217
  ...n !== void 0 && { stack: n }
@@ -24186,17 +24223,17 @@ self.addEventListener("unhandledrejection", (t) => {
24186
24223
  message: s,
24187
24224
  ...n !== void 0 && { stack: n },
24188
24225
  code: "UNHANDLED_REJECTION"
24189
- }) : ic({
24226
+ }) : oc({
24190
24227
  message: s,
24191
24228
  code: "UNHANDLED_REJECTION",
24192
24229
  ...n !== void 0 && { stack: n }
24193
24230
  }), t.preventDefault();
24194
24231
  });
24195
- const Ve = new H1(), $e = new J1((t) => self.postMessage(t));
24232
+ const Ve = new Nr(), $e = new J1((t) => self.postMessage(t));
24196
24233
  an.current = $e;
24197
24234
  Ve.setSceneErrorReporter($e);
24198
- let uo = null;
24199
- function lo(t) {
24235
+ let ar = null;
24236
+ function fo(t) {
24200
24237
  const e = sm(t, {
24201
24238
  transforms: ["typescript"],
24202
24239
  disableESTransforms: !0,
@@ -24209,7 +24246,7 @@ function lo(t) {
24209
24246
  };
24210
24247
  }
24211
24248
  async function im(t, e) {
24212
- $e.resetForSceneReload();
24249
+ $e.resetForSceneReload(), ar = null, self.renderFunction = null;
24213
24250
  try {
24214
24251
  Ve.resetParameterState();
24215
24252
  const n = er.detectRendererType(t);
@@ -24231,7 +24268,7 @@ async function im(t, e) {
24231
24268
  }
24232
24269
  Ve.sendAllParametersToHost();
24233
24270
  } else if (n === "p5") {
24234
- const s = er.detectP5CanvasMode(t), { code: i, mappings: o } = lo(t);
24271
+ const s = er.detectP5CanvasMode(t), { code: i, mappings: o } = fo(t);
24235
24272
  $e.setCurrentSourceMap(o);
24236
24273
  const c = i + `
24237
24274
  return { setup: typeof setup !== "undefined" ? setup : null, render: typeof render !== "undefined" ? render : null };`, u = new Function("viji", "p5", "console", c), h = $e.makeArtistConsole(globalThis.console), { setup: f, render: m } = u(Ve.viji, null, h);
@@ -24257,7 +24294,7 @@ return { setup: typeof setup !== "undefined" ? setup : null, render: typeof
24257
24294
  }
24258
24295
  Ve.sendAllParametersToHost();
24259
24296
  } else {
24260
- const { code: s, mappings: i } = lo(t);
24297
+ const { code: s, mappings: i } = fo(t);
24261
24298
  $e.setCurrentSourceMap(i);
24262
24299
  const o = s + `
24263
24300
  if (typeof render === "function") {
@@ -24265,7 +24302,7 @@ if (typeof render === "function") {
24265
24302
  }
24266
24303
  throw new Error("Scene code must define a render function");`, c = Object.getPrototypeOf(async function() {
24267
24304
  }).constructor, u = new c("viji", "console", o), h = $e.makeArtistConsole(globalThis.console);
24268
- uo = await u(Ve.viji, h), self.renderFunction = uo, Ve.sendAllParametersToHost();
24305
+ ar = await u(Ve.viji, h), self.renderFunction = ar, Ve.sendAllParametersToHost();
24269
24306
  }
24270
24307
  e && Ve.seedInitialValues(e);
24271
24308
  } catch (n) {
@@ -24284,4 +24321,4 @@ throw new Error("Scene code must define a render function");`, c = Object.getPro
24284
24321
  }
24285
24322
  }
24286
24323
  self.setSceneCode = im;
24287
- //# sourceMappingURL=viji.worker-BKg5vsqf.js.map
24324
+ //# sourceMappingURL=viji.worker-B1ltcEP7.js.map