@instantdb/platform 0.22.97 → 0.22.98

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/.turbo/turbo-build.log +8 -8
  2. package/dist/commonjs/ProgressPromise.js +45 -58
  3. package/dist/commonjs/ProgressPromise.js.map +1 -1
  4. package/dist/commonjs/api.js +366 -412
  5. package/dist/commonjs/api.js.map +1 -1
  6. package/dist/commonjs/migrationUtils.js +16 -4
  7. package/dist/commonjs/migrationUtils.js.map +1 -1
  8. package/dist/commonjs/migrations.js +10 -21
  9. package/dist/commonjs/migrations.js.map +1 -1
  10. package/dist/commonjs/oauth.js +52 -55
  11. package/dist/commonjs/oauth.js.map +1 -1
  12. package/dist/commonjs/oauthCommon.js +2 -0
  13. package/dist/commonjs/oauthCommon.js.map +1 -1
  14. package/dist/commonjs/perms.js +1 -1
  15. package/dist/commonjs/perms.js.map +1 -1
  16. package/dist/commonjs/schema.js +8 -14
  17. package/dist/commonjs/schema.js.map +1 -1
  18. package/dist/commonjs/serverOAuth.js +55 -68
  19. package/dist/commonjs/serverOAuth.js.map +1 -1
  20. package/dist/commonjs/typescript-schema.js +1 -2
  21. package/dist/commonjs/typescript-schema.js.map +1 -1
  22. package/dist/commonjs/util.js +1 -1
  23. package/dist/commonjs/util.js.map +1 -1
  24. package/dist/esm/ProgressPromise.js +45 -58
  25. package/dist/esm/ProgressPromise.js.map +1 -1
  26. package/dist/esm/api.js +366 -412
  27. package/dist/esm/api.js.map +1 -1
  28. package/dist/esm/migrationUtils.js +16 -4
  29. package/dist/esm/migrationUtils.js.map +1 -1
  30. package/dist/esm/migrations.js +10 -21
  31. package/dist/esm/migrations.js.map +1 -1
  32. package/dist/esm/oauth.js +52 -55
  33. package/dist/esm/oauth.js.map +1 -1
  34. package/dist/esm/oauthCommon.js +2 -0
  35. package/dist/esm/oauthCommon.js.map +1 -1
  36. package/dist/esm/perms.js +1 -1
  37. package/dist/esm/perms.js.map +1 -1
  38. package/dist/esm/schema.js +8 -14
  39. package/dist/esm/schema.js.map +1 -1
  40. package/dist/esm/serverOAuth.js +55 -68
  41. package/dist/esm/serverOAuth.js.map +1 -1
  42. package/dist/esm/typescript-schema.js +1 -2
  43. package/dist/esm/typescript-schema.js.map +1 -1
  44. package/dist/esm/util.js +1 -1
  45. package/dist/esm/util.js.map +1 -1
  46. package/dist/standalone/index.js +690 -660
  47. package/dist/standalone/index.umd.cjs +16 -16
  48. package/package.json +3 -3
@@ -4,18 +4,20 @@ var ss = (r) => {
4
4
  };
5
5
  var mi = (r, t, s) => t in r ? di(r, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[t] = s;
6
6
  var m = (r, t, s) => mi(r, typeof t != "symbol" ? t + "" : t, s), is = (r, t, s) => t.has(r) || ss("Cannot " + s);
7
- var T = (r, t, s) => (is(r, t, "read from private field"), s ? s.call(r) : t.get(r)), oe = (r, t, s) => t.has(r) ? ss("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, s), ce = (r, t, s, e) => (is(r, t, "write to private field"), e ? e.call(r, s) : t.set(r, s), s);
7
+ var w = (r, t, s) => (is(r, t, "read from private field"), s ? s.call(r) : t.get(r)), oe = (r, t, s) => t.has(r) ? ss("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, s), ce = (r, t, s, e) => (is(r, t, "write to private field"), e ? e.call(r, s) : t.set(r, s), s);
8
8
  class pe extends Error {
9
- constructor(t) {
10
- super(t.message);
11
- const s = new.target.prototype;
12
- Object.setPrototypeOf && Object.setPrototypeOf(this, s), Error.captureStackTrace && Error.captureStackTrace(this, pe), this.name = "InstantOAuthError", this.error = t.error, this.errorDescription = t.errorDescription;
9
+ constructor(s) {
10
+ super(s.message);
11
+ m(this, "error");
12
+ m(this, "errorDescription");
13
+ const e = new.target.prototype;
14
+ Object.setPrototypeOf && Object.setPrototypeOf(this, e), Error.captureStackTrace && Error.captureStackTrace(this, pe), this.name = "InstantOAuthError", this.error = s.error, this.errorDescription = s.errorDescription;
13
15
  }
14
16
  get [Symbol.toStringTag]() {
15
17
  return "InstantAPIError";
16
18
  }
17
19
  }
18
- const j = {
20
+ const _ = {
19
21
  Remove: "remove",
20
22
  Replace: "replace",
21
23
  Add: "add"
@@ -23,7 +25,7 @@ const j = {
23
25
  mutable: "mutable",
24
26
  immutable: "immutable"
25
27
  }, Bt = {};
26
- function _e(r, t) {
28
+ function Re(r, t) {
27
29
  return r instanceof Map ? r.has(t) : Object.prototype.hasOwnProperty.call(r, t);
28
30
  }
29
31
  function rs(r, t) {
@@ -53,7 +55,7 @@ function St(r) {
53
55
  function v(r) {
54
56
  return typeof r != "object" ? null : r == null ? void 0 : r[Ms];
55
57
  }
56
- function _t(r) {
58
+ function Rt(r) {
57
59
  var t;
58
60
  const s = v(r);
59
61
  return s ? (t = s.copy) !== null && t !== void 0 ? t : s.original : r;
@@ -64,18 +66,18 @@ function Se(r, t) {
64
66
  let s;
65
67
  return Object.getPrototypeOf(r) === Object.prototype || Array.isArray(r) || r instanceof Map || r instanceof Set || !!(t != null && t.mark) && ((s = t.mark(r, ee)) === ee.immutable || typeof s == "function");
66
68
  }
67
- function _s(r, t = []) {
69
+ function Rs(r, t = []) {
68
70
  if (Object.hasOwnProperty.call(r, "key")) {
69
71
  const s = r.parent.copy, e = v(me(s, r.key));
70
72
  if (e !== null && (e == null ? void 0 : e.original) !== r.original)
71
73
  return null;
72
74
  const i = r.parent.type === 3, a = i ? Array.from(r.parent.setMap.keys()).indexOf(r.key) : r.key;
73
- if (!(i && s.size > a || _e(s, a)))
75
+ if (!(i && s.size > a || Re(s, a)))
74
76
  return null;
75
77
  t.push(a);
76
78
  }
77
79
  if (r.parent)
78
- return _s(r.parent, t);
80
+ return Rs(r.parent, t);
79
81
  t.reverse();
80
82
  try {
81
83
  yi(r.copy, t);
@@ -90,7 +92,7 @@ function Ve(r) {
90
92
  function me(r, t) {
91
93
  return Ve(r) === 2 ? r.get(t) : r[t];
92
94
  }
93
- function Rt(r, t, s) {
95
+ function jt(r, t, s) {
94
96
  Ve(r) === 2 ? r.set(t, s) : r[t] = s;
95
97
  }
96
98
  function yt(r, t) {
@@ -100,7 +102,7 @@ function yt(r, t) {
100
102
  function Ae(r, t) {
101
103
  return r === t ? r !== 0 || 1 / r === 1 / t : r !== r && t !== t;
102
104
  }
103
- function Te(r, t) {
105
+ function we(r, t) {
104
106
  return t ? r : [""].concat(r).map((s) => {
105
107
  const e = `${s}`;
106
108
  return e.indexOf("/") === -1 && e.indexOf("~") === -1 ? e : e.replace(/~/g, "~0").replace(/\//g, "~1");
@@ -131,7 +133,7 @@ function xi(r) {
131
133
  }), t;
132
134
  }
133
135
  const Pi = Object.prototype.propertyIsEnumerable;
134
- function bi(r, t) {
136
+ function gi(r, t) {
135
137
  let s;
136
138
  if (Array.isArray(r))
137
139
  return Array.prototype.concat.call(r);
@@ -167,11 +169,11 @@ function bi(r, t) {
167
169
  throw new Error("Please check mark() to ensure that it is a stable marker draftable function.");
168
170
  }
169
171
  function V(r) {
170
- r.copy || (r.copy = bi(r.original, r.options));
172
+ r.copy || (r.copy = gi(r.original, r.options));
171
173
  }
172
174
  function Fe(r) {
173
175
  if (!Se(r))
174
- return _t(r);
176
+ return Rt(r);
175
177
  if (Array.isArray(r))
176
178
  return r.map(Fe);
177
179
  if (r instanceof Map) {
@@ -205,7 +207,7 @@ function se(r) {
205
207
  var t;
206
208
  r.assignedMap = (t = r.assignedMap) !== null && t !== void 0 ? t : /* @__PURE__ */ new Map(), r.operated || (r.operated = !0, r.parent && se(r.parent));
207
209
  }
208
- function gi(r, t) {
210
+ function bi(r, t) {
209
211
  const s = Ve(r);
210
212
  if (s === 0)
211
213
  Reflect.ownKeys(r).forEach((e) => {
@@ -218,19 +220,19 @@ function gi(r, t) {
218
220
  } else
219
221
  r.forEach((e, i) => t(i, e, r));
220
222
  }
221
- function Rs(r, t, s) {
223
+ function js(r, t, s) {
222
224
  if (St(r) || !Se(r, s) || t.has(r) || Object.isFrozen(r))
223
225
  return;
224
226
  const e = r instanceof Set, i = e ? /* @__PURE__ */ new Map() : void 0;
225
- if (t.add(r), gi(r, (a, n) => {
227
+ if (t.add(r), bi(r, (a, n) => {
226
228
  var o;
227
229
  if (St(n)) {
228
230
  const c = v(n);
229
231
  V(c);
230
232
  const h = !((o = c.assignedMap) === null || o === void 0) && o.size || c.operated ? c.copy : c.original;
231
- Rt(e ? i : r, a, h);
233
+ jt(e ? i : r, a, h);
232
234
  } else
233
- Rs(n, t, s);
235
+ js(n, t, s);
234
236
  }), i) {
235
237
  const a = r, n = Array.from(a);
236
238
  a.clear(), n.forEach((o) => {
@@ -238,60 +240,60 @@ function Rs(r, t, s) {
238
240
  });
239
241
  }
240
242
  }
241
- function wi(r, t) {
243
+ function Ti(r, t) {
242
244
  const s = r.type === 3 ? r.setMap : r.copy;
243
- r.finalities.revoke.length > 1 && r.assignedMap.get(t) && s && Rs(me(s, t), r.finalities.handledSet, r.options);
245
+ r.finalities.revoke.length > 1 && r.assignedMap.get(t) && s && js(me(s, t), r.finalities.handledSet, r.options);
244
246
  }
245
247
  function It(r) {
246
248
  r.type === 3 && r.copy && (r.copy.clear(), r.setMap.forEach((t) => {
247
- r.copy.add(_t(t));
249
+ r.copy.add(Rt(t));
248
250
  }));
249
251
  }
250
252
  function Et(r, t, s, e) {
251
253
  if (r.operated && r.assignedMap && r.assignedMap.size > 0 && !r.finalized) {
252
254
  if (s && e) {
253
- const a = _s(r);
255
+ const a = Rs(r);
254
256
  a && t(r, a, s, e);
255
257
  }
256
258
  r.finalized = !0;
257
259
  }
258
260
  }
259
- function jt(r, t, s, e) {
261
+ function _t(r, t, s, e) {
260
262
  const i = v(s);
261
263
  i && (i.callbacks || (i.callbacks = []), i.callbacks.push((a, n) => {
262
264
  var o;
263
265
  const c = r.type === 3 ? r.setMap : r.copy;
264
266
  if (Ae(me(c, t), s)) {
265
267
  let h = i.original;
266
- i.copy && (h = i.copy), It(r), Et(r, e, a, n), r.options.enableAutoFreeze && (r.options.updatedValues = (o = r.options.updatedValues) !== null && o !== void 0 ? o : /* @__PURE__ */ new WeakMap(), r.options.updatedValues.set(h, i.original)), Rt(c, t, h);
268
+ i.copy && (h = i.copy), It(r), Et(r, e, a, n), r.options.enableAutoFreeze && (r.options.updatedValues = (o = r.options.updatedValues) !== null && o !== void 0 ? o : /* @__PURE__ */ new WeakMap(), r.options.updatedValues.set(h, i.original)), jt(c, t, h);
267
269
  }
268
270
  }), r.options.enableAutoFreeze && i.finalities !== r.finalities && (r.options.enableAutoFreeze = !1)), Se(s, r.options) && r.finalities.draft.push(() => {
269
271
  const a = r.type === 3 ? r.setMap : r.copy;
270
- Ae(me(a, t), s) && wi(r, t);
272
+ Ae(me(a, t), s) && Ti(r, t);
271
273
  });
272
274
  }
273
- function Ti(r, t, s, e, i) {
275
+ function wi(r, t, s, e, i) {
274
276
  let { original: a, assignedMap: n, options: o } = r, c = r.copy;
275
277
  c.length < a.length && ([a, c] = [c, a], [s, e] = [e, s]);
276
278
  for (let h = 0; h < a.length; h += 1)
277
279
  if (n.get(h.toString()) && c[h] !== a[h]) {
278
- const l = t.concat([h]), p = Te(l, i);
280
+ const l = t.concat([h]), p = we(l, i);
279
281
  s.push({
280
- op: j.Replace,
282
+ op: _.Replace,
281
283
  path: p,
282
284
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
283
285
  value: Ye(c[h])
284
286
  }), e.push({
285
- op: j.Replace,
287
+ op: _.Replace,
286
288
  path: p,
287
289
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
288
290
  value: Ye(a[h])
289
291
  });
290
292
  }
291
293
  for (let h = a.length; h < c.length; h += 1) {
292
- const l = t.concat([h]), p = Te(l, i);
294
+ const l = t.concat([h]), p = we(l, i);
293
295
  s.push({
294
- op: j.Add,
296
+ op: _.Add,
295
297
  path: p,
296
298
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
297
299
  value: Ye(c[h])
@@ -300,17 +302,17 @@ function Ti(r, t, s, e, i) {
300
302
  if (a.length < c.length) {
301
303
  const { arrayLengthAssignment: h = !0 } = o.enablePatches;
302
304
  if (h) {
303
- const l = t.concat(["length"]), p = Te(l, i);
305
+ const l = t.concat(["length"]), p = we(l, i);
304
306
  e.push({
305
- op: j.Replace,
307
+ op: _.Replace,
306
308
  path: p,
307
309
  value: a.length
308
310
  });
309
311
  } else
310
312
  for (let l = c.length; a.length < l; l -= 1) {
311
- const p = t.concat([l - 1]), d = Te(p, i);
313
+ const p = t.concat([l - 1]), d = we(p, i);
312
314
  e.push({
313
- op: j.Remove,
315
+ op: _.Remove,
314
316
  path: d
315
317
  });
316
318
  }
@@ -318,24 +320,24 @@ function Ti(r, t, s, e, i) {
318
320
  }
319
321
  function Ai({ original: r, copy: t, assignedMap: s }, e, i, a, n) {
320
322
  s.forEach((o, c) => {
321
- const h = me(r, c), l = Ye(me(t, c)), p = o ? _e(r, c) ? j.Replace : j.Add : j.Remove;
322
- if (Ae(h, l) && p === j.Replace)
323
+ const h = me(r, c), l = Ye(me(t, c)), p = o ? Re(r, c) ? _.Replace : _.Add : _.Remove;
324
+ if (Ae(h, l) && p === _.Replace)
323
325
  return;
324
- const d = e.concat(c), f = Te(d, n);
325
- i.push(p === j.Remove ? { op: p, path: f } : { op: p, path: f, value: l }), a.push(p === j.Add ? { op: j.Remove, path: f } : p === j.Remove ? { op: j.Add, path: f, value: h } : { op: j.Replace, path: f, value: h });
326
+ const d = e.concat(c), f = we(d, n);
327
+ i.push(p === _.Remove ? { op: p, path: f } : { op: p, path: f, value: l }), a.push(p === _.Add ? { op: _.Remove, path: f } : p === _.Remove ? { op: _.Add, path: f, value: h } : { op: _.Replace, path: f, value: h });
326
328
  });
327
329
  }
328
330
  function Si({ original: r, copy: t }, s, e, i, a) {
329
331
  let n = 0;
330
332
  r.forEach((o) => {
331
333
  if (!t.has(o)) {
332
- const c = s.concat([n]), h = Te(c, a);
334
+ const c = s.concat([n]), h = we(c, a);
333
335
  e.push({
334
- op: j.Remove,
336
+ op: _.Remove,
335
337
  path: h,
336
338
  value: o
337
339
  }), i.unshift({
338
- op: j.Add,
340
+ op: _.Add,
339
341
  path: h,
340
342
  value: o
341
343
  });
@@ -343,13 +345,13 @@ function Si({ original: r, copy: t }, s, e, i, a) {
343
345
  n += 1;
344
346
  }), n = 0, t.forEach((o) => {
345
347
  if (!r.has(o)) {
346
- const c = s.concat([n]), h = Te(c, a);
348
+ const c = s.concat([n]), h = we(c, a);
347
349
  e.push({
348
- op: j.Add,
350
+ op: _.Add,
349
351
  path: h,
350
352
  value: o
351
353
  }), i.unshift({
352
- op: j.Remove,
354
+ op: _.Remove,
353
355
  path: h,
354
356
  value: o
355
357
  });
@@ -364,7 +366,7 @@ function Ue(r, t, s, e) {
364
366
  case 2:
365
367
  return Ai(r, t, s, e, i);
366
368
  case 1:
367
- return Ti(r, t, s, e, i);
369
+ return wi(r, t, s, e, i);
368
370
  case 3:
369
371
  return Si(r, t, s, e, i);
370
372
  }
@@ -381,7 +383,7 @@ const rt = (r, t, s = !1) => {
381
383
  },
382
384
  set(r, t) {
383
385
  const s = v(this), e = X(s);
384
- return (!e.has(r) || !Ae(e.get(r), t)) && (V(s), se(s), s.assignedMap.set(r, !0), s.copy.set(r, t), jt(s, r, t, Ue)), this;
386
+ return (!e.has(r) || !Ae(e.get(r), t)) && (V(s), se(s), s.assignedMap.set(r, !0), s.copy.set(r, t), _t(s, r, t, Ue)), this;
385
387
  },
386
388
  delete(r) {
387
389
  if (!this.has(r))
@@ -489,7 +491,7 @@ const rt = (r, t, s = !1) => {
489
491
  },
490
492
  add(r) {
491
493
  const t = v(this);
492
- return this.has(r) || (V(t), se(t), t.assignedMap.set(r, !0), t.setMap.set(r, r), jt(t, r, r, Ue)), this;
494
+ return this.has(r) || (V(t), se(t), t.assignedMap.set(r, !0), t.setMap.set(r, r), _t(t, r, r, Ue)), this;
493
495
  },
494
496
  delete(r) {
495
497
  if (!this.has(r))
@@ -564,11 +566,11 @@ Set.prototype.difference && Object.assign(at, {
564
566
  return Set.prototype.isDisjointFrom.call(new Set(this.values()), r);
565
567
  }
566
568
  });
567
- const Ei = Reflect.ownKeys(at), js = /* @__PURE__ */ new WeakSet(), Us = {
569
+ const Ei = Reflect.ownKeys(at), _s = /* @__PURE__ */ new WeakSet(), Us = {
568
570
  get(r, t, s) {
569
571
  var e, i;
570
572
  const a = (e = r.copy) === null || e === void 0 ? void 0 : e[t];
571
- if (a && js.has(a))
573
+ if (a && _s.has(a))
572
574
  return a;
573
575
  if (t === Ms)
574
576
  return r;
@@ -593,7 +595,7 @@ const Ei = Reflect.ownKeys(at), js = /* @__PURE__ */ new WeakSet(), Us = {
593
595
  if (h)
594
596
  return h.bind(r.proxy);
595
597
  }
596
- if (!_e(o, t)) {
598
+ if (!Re(o, t)) {
597
599
  const h = rs(o, t);
598
600
  return h ? "value" in h ? h.value : (
599
601
  // !case: support for getter
@@ -629,7 +631,7 @@ const Ei = Reflect.ownKeys(at), js = /* @__PURE__ */ new WeakSet(), Us = {
629
631
  if (a != null && a.set)
630
632
  return a.set.call(r.proxy, s), !0;
631
633
  const n = yt(X(r), t), o = v(n);
632
- return o && Ae(o.original, s) ? (r.copy[t] = s, r.assignedMap = (e = r.assignedMap) !== null && e !== void 0 ? e : /* @__PURE__ */ new Map(), r.assignedMap.set(t, !1), !0) : (Ae(s, n) && (s !== void 0 || _e(r.original, t)) || (V(r), se(r), _e(r.original, t) && Ae(s, r.original[t]) ? r.assignedMap.delete(t) : r.assignedMap.set(t, !0), r.copy[t] = s, jt(r, t, s, Ue)), !0);
634
+ return o && Ae(o.original, s) ? (r.copy[t] = s, r.assignedMap = (e = r.assignedMap) !== null && e !== void 0 ? e : /* @__PURE__ */ new Map(), r.assignedMap.set(t, !1), !0) : (Ae(s, n) && (s !== void 0 || Re(r.original, t)) || (V(r), se(r), Re(r.original, t) && Ae(s, r.original[t]) ? r.assignedMap.delete(t) : r.assignedMap.set(t, !0), r.copy[t] = s, _t(r, t, s, Ue)), !0);
633
635
  },
634
636
  has(r, t) {
635
637
  return t in X(r);
@@ -675,7 +677,7 @@ function $s(r) {
675
677
  };
676
678
  (e || "key" in r) && (o.key = e);
677
679
  const { proxy: c, revoke: h } = Proxy.revocable(n === 1 ? Object.assign([], o) : o, Us);
678
- if (i.revoke.push(h), js.add(c), o.proxy = c, s) {
680
+ if (i.revoke.push(h), _s.add(c), o.proxy = c, s) {
679
681
  const l = s;
680
682
  l.finalities.draft.push((p, d) => {
681
683
  var f, x;
@@ -684,7 +686,7 @@ function $s(r) {
684
686
  const E = me(F, e), k = v(E);
685
687
  if (k) {
686
688
  let B = k.original;
687
- k.operated && (B = _t(E)), It(k), Et(k, Ue, p, d), l.options.enableAutoFreeze && (l.options.updatedValues = (f = l.options.updatedValues) !== null && f !== void 0 ? f : /* @__PURE__ */ new WeakMap(), l.options.updatedValues.set(B, k.original)), Rt(F, e, B);
689
+ k.operated && (B = Rt(E)), It(k), Et(k, Ue, p, d), l.options.enableAutoFreeze && (l.options.updatedValues = (f = l.options.updatedValues) !== null && f !== void 0 ? f : /* @__PURE__ */ new WeakMap(), l.options.updatedValues.set(B, k.original)), jt(F, e, B);
688
690
  }
689
691
  (x = A.callbacks) === null || x === void 0 || x.forEach((B) => {
690
692
  B(p, d);
@@ -717,7 +719,7 @@ function ki() {
717
719
  return xt(Ni);
718
720
  }
719
721
  const vi = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ns = { randomUUID: vi };
720
- function Oi(r, t, s) {
722
+ function Di(r, t, s) {
721
723
  var i;
722
724
  if (ns.randomUUID && !r)
723
725
  return ns.randomUUID();
@@ -728,13 +730,13 @@ function Oi(r, t, s) {
728
730
  return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, Ci(e);
729
731
  }
730
732
  function os() {
731
- return Oi();
733
+ return Di();
732
734
  }
733
- function Di(r, t) {
735
+ function Oi(r, t) {
734
736
  return r.localeCompare(t);
735
737
  }
736
738
  function Li() {
737
- let r = Di;
739
+ let r = Oi;
738
740
  if (typeof Intl == "object" && Intl.hasOwnProperty("Collator"))
739
741
  try {
740
742
  r = Intl.Collator("en-US").compare;
@@ -780,11 +782,11 @@ function Nt(r, t, s) {
780
782
  function Bi(r) {
781
783
  return r.startsWith("lookup__");
782
784
  }
783
- function _i(r) {
785
+ function Ri(r) {
784
786
  const [t, s, ...e] = r.split("__");
785
787
  return [s, JSON.parse(e.join("__"))];
786
788
  }
787
- function Ri(r) {
789
+ function ji(r) {
788
790
  return new Proxy({
789
791
  __etype: r
790
792
  }, {
@@ -792,47 +794,54 @@ function Ri(r) {
792
794
  if (s === "__etype")
793
795
  return r;
794
796
  const e = s;
795
- return Bi(e) ? Nt(r, _i(e), []) : Nt(r, e, []);
797
+ return Bi(e) ? Nt(r, Ri(e), []) : Nt(r, e, []);
796
798
  }
797
799
  });
798
800
  }
799
- function ji() {
801
+ function _i() {
800
802
  return new Proxy({}, {
801
803
  get(r, t) {
802
- return Ri(t);
804
+ return ji(t);
803
805
  }
804
806
  });
805
807
  }
806
- ji();
807
- const Ui = { "unique?": !0, "index?": !0 };
808
- Object.assign(Object.assign({}, Ui), { cardinality: "one" });
808
+ _i();
809
809
  class Ut extends Error {
810
- constructor(t, s) {
811
- super(t), this.hint = s;
812
- const e = new.target.prototype;
813
- Object.setPrototypeOf && Object.setPrototypeOf(this, e), Error.captureStackTrace && Error.captureStackTrace(this, Ut), this.name = "InstantError";
810
+ constructor(s, e) {
811
+ super(s);
812
+ m(this, "hint");
813
+ this.hint = e;
814
+ const i = new.target.prototype;
815
+ Object.setPrototypeOf && Object.setPrototypeOf(this, i), Error.captureStackTrace && Error.captureStackTrace(this, Ut), this.name = "InstantError";
814
816
  }
815
817
  get [Symbol.toStringTag]() {
816
818
  return "InstantError";
817
819
  }
818
820
  }
819
821
  class $e extends Ut {
820
- constructor(t) {
821
- var s;
822
- const e = ((s = t.body) === null || s === void 0 ? void 0 : s.message) || `API Error (${t.status})`;
823
- super(e, t.body.hint);
822
+ constructor(s) {
823
+ var a;
824
+ const e = ((a = s.body) == null ? void 0 : a.message) || `API Error (${s.status})`;
825
+ super(e, s.body.hint);
826
+ m(this, "body");
827
+ m(this, "status");
824
828
  const i = new.target.prototype;
825
- Object.setPrototypeOf && Object.setPrototypeOf(this, i), Error.captureStackTrace && Error.captureStackTrace(this, $e), this.name = "InstantAPIError", this.status = t.status, this.body = t.body;
829
+ Object.setPrototypeOf && Object.setPrototypeOf(this, i), Error.captureStackTrace && Error.captureStackTrace(this, $e), this.name = "InstantAPIError", this.status = s.status, this.body = s.body;
826
830
  }
827
831
  get [Symbol.toStringTag]() {
828
832
  return "InstantAPIError";
829
833
  }
830
834
  }
831
835
  typeof window < "u" && typeof window.localStorage < "u" && (window.localStorage.getItem("devBackend"), window.localStorage.getItem("__instantLogging"), window.localStorage.getItem("__devtoolLocalDash"));
832
- const Re = "v0.22.97";
836
+ const je = "v0.22.98";
833
837
  class Q {
834
838
  constructor(t, s, e, i = { indexed: !1, unique: !1 }) {
835
- this.valueType = t, this.required = s, this.isIndexed = e, this.config = i, this.metadata = {};
839
+ m(this, "valueType");
840
+ m(this, "required");
841
+ m(this, "isIndexed");
842
+ m(this, "config");
843
+ m(this, "metadata", {});
844
+ this.valueType = t, this.required = s, this.isIndexed = e, this.config = i;
836
845
  }
837
846
  /**
838
847
  * @deprecated Only use this temporarily for attributes that you want
@@ -846,14 +855,22 @@ class Q {
846
855
  return new Q(this.valueType, !1, this.isIndexed, this.config);
847
856
  }
848
857
  unique() {
849
- return new Q(this.valueType, this.required, this.isIndexed, Object.assign(Object.assign({}, this.config), { unique: !0 }));
858
+ return new Q(this.valueType, this.required, this.isIndexed, {
859
+ ...this.config,
860
+ unique: !0
861
+ });
850
862
  }
851
863
  indexed() {
852
- return new Q(this.valueType, this.required, !0, Object.assign(Object.assign({}, this.config), { indexed: !0 }));
864
+ return new Q(this.valueType, this.required, !0, {
865
+ ...this.config,
866
+ indexed: !0
867
+ });
853
868
  }
854
869
  }
855
870
  class pt {
856
871
  constructor(t, s) {
872
+ m(this, "attrs");
873
+ m(this, "links");
857
874
  this.attrs = t, this.links = s;
858
875
  }
859
876
  asType() {
@@ -862,6 +879,9 @@ class pt {
862
879
  }
863
880
  class ft {
864
881
  constructor(t, s, e) {
882
+ m(this, "entities");
883
+ m(this, "links");
884
+ m(this, "rooms");
865
885
  this.entities = t, this.links = s, this.rooms = e;
866
886
  }
867
887
  /**
@@ -891,7 +911,7 @@ var cs;
891
911
  (function(r) {
892
912
  r.InitialSyncBatch = "InitialSyncBatch", r.InitialSyncComplete = "InitialSyncComplete", r.LoadFromStorage = "LoadFromStorage", r.SyncTransaction = "SyncTransaction", r.Error = "Error";
893
913
  })(cs || (cs = {}));
894
- function $i(r, t) {
914
+ function Ui(r, t) {
895
915
  return new ft(
896
916
  qs(r, t),
897
917
  // (XXX): LinksDef<any> stems from TypeScript’s inability to reconcile the
@@ -903,44 +923,47 @@ function $i(r, t) {
903
923
  void 0
904
924
  );
905
925
  }
906
- function qi(r) {
926
+ function $i(r) {
907
927
  return new pt(r, {});
908
928
  }
909
- function zi() {
929
+ function qi() {
910
930
  return new Q("string", !0, !1);
911
931
  }
912
- function Vi() {
932
+ function zi() {
913
933
  return new Q("number", !0, !1);
914
934
  }
915
- function Hi() {
935
+ function Vi() {
916
936
  return new Q("boolean", !0, !1);
917
937
  }
918
- function Ki() {
938
+ function Hi() {
919
939
  return new Q("date", !0, !1);
920
940
  }
921
- function Ji() {
941
+ function Ki() {
922
942
  return new Q("json", !0, !1);
923
943
  }
924
- function Wi() {
944
+ function Ji() {
925
945
  return new Q("json", !0, !1);
926
946
  }
927
947
  function qs(r, t) {
928
- var s, e, i, a;
929
- const n = { fwd: {}, rev: {} };
948
+ var i, a, n, o;
949
+ const s = { fwd: {}, rev: {} };
930
950
  for (const c of Object.values(t))
931
- (s = n.fwd)[e = c.forward.on] || (s[e] = {}), (i = n.rev)[a = c.reverse.on] || (i[a] = {}), n.fwd[c.forward.on][c.forward.label] = {
951
+ (i = s.fwd)[a = c.forward.on] || (i[a] = {}), (n = s.rev)[o = c.reverse.on] || (n[o] = {}), s.fwd[c.forward.on][c.forward.label] = {
932
952
  entityName: c.reverse.on,
933
953
  cardinality: c.forward.has
934
- }, n.rev[c.reverse.on][c.reverse.label] = {
954
+ }, s.rev[c.reverse.on][c.reverse.label] = {
935
955
  entityName: c.forward.on,
936
956
  cardinality: c.reverse.has
937
957
  };
938
958
  return Object.fromEntries(Object.entries(r).map(([c, h]) => [
939
959
  c,
940
- new pt(h.attrs, Object.assign(Object.assign({}, n.fwd[c]), n.rev[c]))
960
+ new pt(h.attrs, {
961
+ ...s.fwd[c],
962
+ ...s.rev[c]
963
+ })
941
964
  ]));
942
965
  }
943
- function Xi({ entities: r, links: t, rooms: s }) {
966
+ function Wi({ entities: r, links: t, rooms: s }) {
944
967
  const e = t ?? {}, i = s ?? {};
945
968
  return new ft(
946
969
  qs(r, e),
@@ -955,46 +978,44 @@ function Xi({ entities: r, links: t, rooms: s }) {
955
978
  }
956
979
  const q = {
957
980
  // constructs
958
- graph: $i,
959
- schema: Xi,
960
- entity: qi,
981
+ graph: Ui,
982
+ schema: Wi,
983
+ entity: $i,
961
984
  // value types
962
- string: zi,
963
- number: Vi,
964
- boolean: Hi,
965
- date: Ki,
966
- json: Ji,
967
- any: Wi
985
+ string: qi,
986
+ number: zi,
987
+ boolean: Vi,
988
+ date: Hi,
989
+ json: Ki,
990
+ any: Ji
968
991
  };
969
- function Gi() {
970
- var r;
971
- return globalThis.__instantDbSchemaHashStore = (r = globalThis.__instantDbSchemaHashStore) !== null && r !== void 0 ? r : /* @__PURE__ */ new WeakMap(), globalThis.__instantDbSchemaHashStore;
992
+ function Xi() {
993
+ return globalThis.__instantDbSchemaHashStore = globalThis.__instantDbSchemaHashStore ?? /* @__PURE__ */ new WeakMap(), globalThis.__instantDbSchemaHashStore;
972
994
  }
973
- function Yi() {
974
- var r;
975
- return globalThis.__instantDbStore = (r = globalThis.__instantDbStore) !== null && r !== void 0 ? r : {}, globalThis.__instantDbStore;
995
+ function Gi() {
996
+ return globalThis.__instantDbStore = globalThis.__instantDbStore ?? {}, globalThis.__instantDbStore;
976
997
  }
977
- Yi();
978
998
  Gi();
979
- function Qi() {
999
+ Xi();
1000
+ function Yi() {
980
1001
  const r = "0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz-._~";
981
1002
  let t = "";
982
1003
  for (const s of crypto.getRandomValues(new Uint8Array(64)))
983
1004
  t = t + r[s % r.length];
984
1005
  return t;
985
1006
  }
986
- function Zi(r) {
1007
+ function Qi(r) {
987
1008
  return crypto.subtle.digest({ name: "SHA-256" }, new TextEncoder().encode(r));
988
1009
  }
989
- function er(r) {
1010
+ function Zi(r) {
990
1011
  return r.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
991
1012
  }
992
- function tr(r) {
993
- return Zi(r).then((t) => er(
1013
+ function er(r) {
1014
+ return Qi(r).then((t) => Zi(
994
1015
  btoa(String.fromCharCode(...Array.from(new Uint8Array(t))))
995
1016
  ));
996
1017
  }
997
- function sr() {
1018
+ function tr() {
998
1019
  const r = Math.min(800, Math.floor(window.outerWidth * 0.8)), t = Math.min(630, Math.floor(window.outerHeight * 0.5)), s = {
999
1020
  width: r,
1000
1021
  height: t,
@@ -1015,7 +1036,7 @@ function sr() {
1015
1036
  return Object.keys(e).map((i) => `${i}=${e[i]}`).join(",");
1016
1037
  }
1017
1038
  let hs = null;
1018
- function ir({
1039
+ function sr({
1019
1040
  clientId: r,
1020
1041
  state: t,
1021
1042
  codeChallenge: s,
@@ -1026,7 +1047,7 @@ function ir({
1026
1047
  const n = new URL(`${e}/platform/oauth/start`);
1027
1048
  return n.searchParams.set("client_id", r), n.searchParams.set("redirect_uri", i), n.searchParams.set("scope", a.join(" ")), n.searchParams.set("state", t), n.searchParams.set("response_type", "code"), n.searchParams.set("code_challenge", s), n.searchParams.set("code_challenge_method", "S256"), n.toString();
1028
1049
  }
1029
- async function rr({
1050
+ async function ir({
1030
1051
  code: r,
1031
1052
  clientId: t,
1032
1053
  verifier: s,
@@ -1037,8 +1058,8 @@ async function rr({
1037
1058
  method: "POST",
1038
1059
  headers: {
1039
1060
  "Content-type": "application/json",
1040
- "Instant-Platform-Version": Re,
1041
- "Instant-Core-Version": Re
1061
+ "Instant-Platform-Version": je,
1062
+ "Instant-Core-Version": je
1042
1063
  },
1043
1064
  body: JSON.stringify({
1044
1065
  grant_type: "authorization_code",
@@ -1072,7 +1093,7 @@ async function rr({
1072
1093
  expiresAt: new Date(Date.now() + (n.expires_in - 30) * 1e3)
1073
1094
  };
1074
1095
  }
1075
- function ar() {
1096
+ function rr() {
1076
1097
  if (typeof window > "u")
1077
1098
  throw new Error("This function may only be used in a browser context.");
1078
1099
  const r = new URL(window.location.href).searchParams, t = r.get("state"), s = r.get("error"), e = r.get("error_description"), i = r.get("code");
@@ -1091,7 +1112,7 @@ function ar() {
1091
1112
  a.close();
1092
1113
  };
1093
1114
  }
1094
- function nr({
1115
+ function ar({
1095
1116
  clientId: r,
1096
1117
  apiURI: t,
1097
1118
  redirectUri: s,
@@ -1101,7 +1122,7 @@ function nr({
1101
1122
  throw new Error("OAuth flow can only be started on the client.");
1102
1123
  const i = hs;
1103
1124
  i && i.close();
1104
- const a = crypto.randomUUID(), n = Qi(), o = new BroadcastChannel(a), c = new Promise(
1125
+ const a = crypto.randomUUID(), n = Yi(), o = new BroadcastChannel(a), c = new Promise(
1105
1126
  (l, p) => {
1106
1127
  o.addEventListener("message", async (d) => {
1107
1128
  if (d.data.type !== "oauth-redirect")
@@ -1115,7 +1136,7 @@ function nr({
1115
1136
  if (!(!f || f !== a)) {
1116
1137
  if (A)
1117
1138
  try {
1118
- const E = await rr({
1139
+ const E = await ir({
1119
1140
  clientId: r,
1120
1141
  code: A,
1121
1142
  verifier: n,
@@ -1150,10 +1171,10 @@ function nr({
1150
1171
  "",
1151
1172
  // A unqiue name prevents orphaned popups from stealing our window.open
1152
1173
  `instantdb_oauth_${Math.random()}`.replace(".", ""),
1153
- sr()
1174
+ tr()
1154
1175
  );
1155
- return h ? (hs = h, tr(n).then((l) => {
1156
- const p = ir({
1176
+ return h ? (hs = h, er(n).then((l) => {
1177
+ const p = sr({
1157
1178
  clientId: r,
1158
1179
  state: a,
1159
1180
  codeChallenge: l,
@@ -1166,6 +1187,15 @@ function nr({
1166
1187
  }
1167
1188
  class Dn {
1168
1189
  constructor(t) {
1190
+ /** Redirect URI that the provider will call back into. */
1191
+ m(this, "redirectUri");
1192
+ /** OAuth client ID. */
1193
+ m(this, "clientId");
1194
+ /**
1195
+ * Base URL for InstantDB’s REST API.
1196
+ * Defaults to `https://api.instantdb.com`.
1197
+ */
1198
+ m(this, "apiURI");
1169
1199
  this.redirectUri = t.redirectUri, this.apiURI = t.apiURI ?? "https://api.instantdb.com", this.clientId = t.clientId;
1170
1200
  }
1171
1201
  /**
@@ -1193,7 +1223,7 @@ class Dn {
1193
1223
  * }
1194
1224
  */
1195
1225
  startClientOnlyFlow(t) {
1196
- return nr({
1226
+ return ar({
1197
1227
  clientId: this.clientId,
1198
1228
  apiURI: this.apiURI,
1199
1229
  redirectUri: this.redirectUri,
@@ -1221,10 +1251,10 @@ class Dn {
1221
1251
  * ```
1222
1252
  */
1223
1253
  handleClientRedirect() {
1224
- return ar();
1254
+ return rr();
1225
1255
  }
1226
1256
  }
1227
- function Ln(r, t) {
1257
+ function On(r, t) {
1228
1258
  const s = r && Object.keys(r).length ? JSON.stringify(r, null, 2) : `{
1229
1259
  /**
1230
1260
  * Welcome to Instant's permission system!
@@ -1256,10 +1286,10 @@ export default rules;
1256
1286
  function qe(r) {
1257
1287
  return Object.entries(r).sort(([t], [s]) => t.localeCompare(s));
1258
1288
  }
1259
- function or(r) {
1289
+ function nr(r) {
1260
1290
  return r.charAt(0).toUpperCase() + r.slice(1);
1261
1291
  }
1262
- const cr = {
1292
+ const or = {
1263
1293
  "many-false": ["many", "many"],
1264
1294
  "one-true": ["one", "one"],
1265
1295
  "many-true": ["many", "one"],
@@ -1277,29 +1307,29 @@ function zs(r, t, s = t) {
1277
1307
  const e = r.join(t);
1278
1308
  return r.length ? e + s : e;
1279
1309
  }
1280
- function hr(r) {
1310
+ function cr(r) {
1281
1311
  if (r.catalog === "system")
1282
1312
  return null;
1283
1313
  const t = r["inferred-types"];
1284
1314
  return (t == null ? void 0 : t.length) === 1 ? t[0] : null;
1285
1315
  }
1286
- function lr(r, t) {
1316
+ function hr(r, t) {
1287
1317
  if (r["checked-data-type"])
1288
1318
  return { type: r["checked-data-type"], origin: "checked" };
1289
- const s = hr(r);
1319
+ const s = cr(r);
1290
1320
  return s && !t ? { type: s, origin: "inferred" } : { type: "any", origin: "unknown" };
1291
1321
  }
1292
1322
  function $t(r) {
1293
1323
  return `"${r}"`;
1294
1324
  }
1295
- function ur([r, t]) {
1325
+ function lr([r, t]) {
1296
1326
  var n;
1297
1327
  const s = ((n = t.metadata.derivedType) == null ? void 0 : n.type) || t.valueType || "any", e = t.config.unique ? ".unique()" : "", i = t.config.indexed ? ".indexed()" : "", a = t.required ? "" : ".optional()";
1298
1328
  return `${$t(r)}: i.${s}()${e}${i}${a}`;
1299
1329
  }
1300
1330
  function kt(r, t) {
1301
1331
  const s = zs(
1302
- qe(t.attrs).map(ur),
1332
+ qe(t.attrs).map(lr),
1303
1333
  `,
1304
1334
  `,
1305
1335
  ","
@@ -1308,42 +1338,42 @@ function kt(r, t) {
1308
1338
  ` : ""}${ze(s, 2)}${s.length ? `
1309
1339
  ` : ""}})`;
1310
1340
  }
1311
- function pr(r) {
1341
+ function ur(r) {
1312
1342
  return r[1];
1313
1343
  }
1314
- function fr(r) {
1344
+ function pr(r) {
1315
1345
  return r[2];
1316
1346
  }
1317
1347
  function he(r) {
1318
- return `${pr(r)}.${fr(r)}`;
1348
+ return `${ur(r)}.${pr(r)}`;
1319
1349
  }
1320
1350
  function Vs(r) {
1321
1351
  var t;
1322
1352
  return (t = r["forward-identity"]) == null ? void 0 : t[2];
1323
1353
  }
1324
- function dr(r) {
1354
+ function fr(r) {
1325
1355
  var t;
1326
1356
  return (t = r["forward-identity"]) == null ? void 0 : t[1];
1327
1357
  }
1328
- function mr(r) {
1358
+ function dr(r) {
1329
1359
  var t;
1330
1360
  return (t = r["reverse-identity"]) == null ? void 0 : t[2];
1331
1361
  }
1332
- function yr(r) {
1362
+ function mr(r) {
1333
1363
  var t;
1334
1364
  return (t = r["reverse-identity"]) == null ? void 0 : t[1];
1335
1365
  }
1336
1366
  function ls(r) {
1337
- return `${dr(r)}.${Vs(r)}`;
1367
+ return `${fr(r)}.${Vs(r)}`;
1338
1368
  }
1339
- function xr(r) {
1369
+ function yr(r) {
1340
1370
  if (r["reverse-identity"])
1341
- return `${yr(r)}.${mr(r)}`;
1371
+ return `${mr(r)}.${dr(r)}`;
1342
1372
  }
1343
- function Pr(r, t) {
1373
+ function xr(r, t) {
1344
1374
  return t === 1 ? r : r + "s";
1345
1375
  }
1346
- function br(r) {
1376
+ function Pr(r) {
1347
1377
  let t = "{";
1348
1378
  if (r.presence && (t += `
1349
1379
  ${ze(kt("presence", r.presence), 4)},`), r.topics) {
@@ -1362,11 +1392,11 @@ function gr(r) {
1362
1392
  let t = "{";
1363
1393
  for (const [s, e] of Object.entries(r))
1364
1394
  t += `
1365
- ${$t(s)}: ${br(e)},`;
1395
+ ${$t(s)}: ${Pr(e)},`;
1366
1396
  return t += t === "{" ? "}" : `
1367
1397
  }`, t;
1368
1398
  }
1369
- function Mn(r, t, s) {
1399
+ function Ln(r, t, s) {
1370
1400
  var d;
1371
1401
  const e = zs(
1372
1402
  qe(t.entities).map(
@@ -1381,7 +1411,7 @@ function Mn(r, t, s) {
1381
1411
  ((d = x.metadata.derivedType) == null ? void 0 : d.origin) === "inferred" && i.push(x);
1382
1412
  const a = `{
1383
1413
  ${ze(e, 2)}
1384
- }`, n = i.length > 0 ? `// We inferred ${i.length} ${Pr("attribute", i.length)}!
1414
+ }`, n = i.length > 0 ? `// We inferred ${i.length} ${xr("attribute", i.length)}!
1385
1415
  // Take a look at this schema, and if everything looks good,
1386
1416
  // run \`push schema\` again to enforce the types.` : "", o = JSON.stringify(t.links, null, 2).trim(), c = (r == null ? void 0 : r.rooms) || {}, h = gr(c), l = (f, x, A) => {
1387
1417
  const F = A ? `${A}
@@ -1407,23 +1437,23 @@ export type { AppSchema }
1407
1437
  export default schema;
1408
1438
  `;
1409
1439
  }
1410
- class be extends Error {
1440
+ class ge extends Error {
1411
1441
  constructor(t) {
1412
1442
  super(t), this.name = "SchemaValidationError";
1413
1443
  }
1414
1444
  }
1415
- const Fn = (r, t) => {
1445
+ const Mn = (r, t) => {
1416
1446
  const s = Object.keys(r.entities);
1417
1447
  for (const [e, i] of Object.entries(r.entities))
1418
1448
  if (e.startsWith("$")) {
1419
1449
  if (!t[e])
1420
- throw new be(
1450
+ throw new ge(
1421
1451
  `The $ keyword is reserved for system namespaces.
1422
1452
  You can't create '${e}'. Perhaps call it '${e.slice(1)}' instead?`
1423
1453
  );
1424
1454
  for (const [a, n] of Object.entries(i.attrs))
1425
1455
  if (!t[e].has(a) && n.required)
1426
- throw new be(
1456
+ throw new ge(
1427
1457
  `The '${e}' namespace is managed by the system and can't modify required constraints yet.
1428
1458
  Make sure to set ${e}.${a} as optional.
1429
1459
  i.e { ${a}: i.${n.valueType}().optional() }`
@@ -1431,26 +1461,26 @@ Make sure to set ${e}.${a} as optional.
1431
1461
  }
1432
1462
  for (const e of Object.values(r.links)) {
1433
1463
  if (t[e.forward.on] && !t[e.forward.on].has(e.forward.label) && e.forward.required)
1434
- throw new be(
1464
+ throw new ge(
1435
1465
  `The ${e.forward.on} namespace is managed by the system and can't modify required constraints yet.
1436
1466
  Make sure to set ${e.forward.on}${e.forward.label} as 'optional'.
1437
1467
  i.e { 'on': '${e.forward.on}', 'label': ${e.forward.label}, 'required': false }`
1438
1468
  );
1439
1469
  if (e.forward.has === "many" && e.forward.onDelete === "cascade")
1440
- throw new be(
1470
+ throw new ge(
1441
1471
  `${e.forward.on}${e.forward.label} -> ${e.reverse.on}${e.reverse.label} has onDelete: "cascade" with has: "many"`
1442
1472
  );
1443
1473
  if (e.reverse.has === "many" && e.reverse.onDelete === "cascade")
1444
- throw new be(
1474
+ throw new ge(
1445
1475
  `${e.forward.on}${e.forward.label} -> ${e.reverse.on}${e.reverse.label} has onDelete: "cascade" with has: "many"`
1446
1476
  );
1447
1477
  const i = `${e.forward.on}${e.forward.label} -> ${e.reverse.on}${e.reverse.label}`;
1448
1478
  if (!s.includes(e.forward.on))
1449
- throw new be(
1479
+ throw new ge(
1450
1480
  `${i} connects to non existing entity "${e.forward.on}".`
1451
1481
  );
1452
1482
  if (!s.includes(e.reverse.on))
1453
- throw new be(
1483
+ throw new ge(
1454
1484
  `${i} connects to non existing entity "${e.forward.on}".`
1455
1485
  );
1456
1486
  }
@@ -1461,17 +1491,17 @@ class Hs {
1461
1491
  oe(this, Y, []);
1462
1492
  oe(this, W, null);
1463
1493
  oe(this, ht, (t) => {
1464
- if (!T(this, W))
1465
- for (const s of T(this, Y))
1494
+ if (!w(this, W))
1495
+ for (const s of w(this, Y))
1466
1496
  try {
1467
1497
  s.next && s.next(t);
1468
1498
  } catch {
1469
1499
  }
1470
1500
  });
1471
1501
  oe(this, lt, (t) => {
1472
- if (!T(this, W)) {
1502
+ if (!w(this, W)) {
1473
1503
  ce(this, W, { type: "error", error: t });
1474
- for (const s of T(this, Y))
1504
+ for (const s of w(this, Y))
1475
1505
  try {
1476
1506
  s.error && s.error(t);
1477
1507
  } catch {
@@ -1480,9 +1510,9 @@ class Hs {
1480
1510
  }
1481
1511
  });
1482
1512
  oe(this, ut, (t) => {
1483
- if (!T(this, W)) {
1513
+ if (!w(this, W)) {
1484
1514
  ce(this, W, { type: "complete", result: t });
1485
- for (const s of T(this, Y))
1515
+ for (const s of w(this, Y))
1486
1516
  try {
1487
1517
  s.complete && s.complete(t);
1488
1518
  } catch {
@@ -1490,19 +1520,19 @@ class Hs {
1490
1520
  ce(this, Y, []);
1491
1521
  }
1492
1522
  });
1493
- t(T(this, ht), T(this, ut), T(this, lt));
1523
+ t(w(this, ht), w(this, ut), w(this, lt));
1494
1524
  }
1495
1525
  subscribe(t) {
1496
- if (T(this, W)) {
1526
+ if (w(this, W)) {
1497
1527
  const s = { unsubscribe: () => null };
1498
- if (T(this, W).type === "error")
1499
- return t.error && t.error(T(this, W).error), s;
1500
- if (T(this, W).type === "complete")
1501
- return t.complete && t.complete(T(this, W).result), s;
1528
+ if (w(this, W).type === "error")
1529
+ return t.error && t.error(w(this, W).error), s;
1530
+ if (w(this, W).type === "complete")
1531
+ return t.complete && t.complete(w(this, W).result), s;
1502
1532
  }
1503
- return T(this, Y).push(t), {
1533
+ return w(this, Y).push(t), {
1504
1534
  unsubscribe: () => {
1505
- ce(this, Y, T(this, Y).filter((s) => s !== t));
1535
+ ce(this, Y, w(this, Y).filter((s) => s !== t));
1506
1536
  }
1507
1537
  };
1508
1538
  }
@@ -1517,7 +1547,7 @@ class Hs {
1517
1547
  }
1518
1548
  }
1519
1549
  Y = new WeakMap(), W = new WeakMap(), ht = new WeakMap(), lt = new WeakMap(), ut = new WeakMap();
1520
- async function Bn({
1550
+ async function Fn({
1521
1551
  code: r,
1522
1552
  clientId: t,
1523
1553
  clientSecret: s,
@@ -1562,7 +1592,7 @@ async function Bn({
1562
1592
  tokenType: n.token_type
1563
1593
  };
1564
1594
  }
1565
- async function wr({
1595
+ async function br({
1566
1596
  clientId: r,
1567
1597
  clientSecret: t,
1568
1598
  refreshToken: s,
@@ -1588,10 +1618,10 @@ async function wr({
1588
1618
  async function H(r, t) {
1589
1619
  const s = {
1590
1620
  ...(t == null ? void 0 : t.headers) || {},
1591
- "Instant-Platform-Version": Re,
1592
- "Instant-Core-Version": Re,
1621
+ "Instant-Platform-Version": je,
1622
+ "Instant-Core-Version": je,
1593
1623
  "X-Instant-Source": "platform-sdk",
1594
- "X-Instant-Version": Re
1624
+ "X-Instant-Version": je
1595
1625
  }, e = await fetch(r, { ...t, headers: s });
1596
1626
  if (e.status === 200) {
1597
1627
  const a = await e.json();
@@ -1632,25 +1662,25 @@ function Tr(r) {
1632
1662
  }
1633
1663
  }
1634
1664
  }
1635
- function Ar(r, t) {
1636
- const s = lr(r, t == null ? void 0 : t.disableTypeInference);
1665
+ function wr(r, t) {
1666
+ const s = hr(r, t == null ? void 0 : t.disableTypeInference);
1637
1667
  let e = Tr(
1638
1668
  s.type
1639
1669
  );
1640
1670
  return r["unique?"] && (e = e.unique()), r["index?"] && (e = e.indexed()), r["required?"] || (e = e.optional()), e.metadata.derivedType = s, e;
1641
1671
  }
1642
- function Sr(r, t) {
1672
+ function Ar(r, t) {
1643
1673
  const s = {};
1644
1674
  for (const [e, i] of qe(r))
1645
- e !== "id" && (s[e] = Ar(i, t));
1675
+ e !== "id" && (s[e] = wr(i, t));
1646
1676
  return q.entity(s);
1647
1677
  }
1648
- function Ir(r) {
1678
+ function Sr(r) {
1649
1679
  const [, t, s] = r["forward-identity"];
1650
- return `${t}${or(s)}`;
1680
+ return `${t}${nr(s)}`;
1651
1681
  }
1652
- function Er(r) {
1653
- const [, t, s] = r["forward-identity"], [, e, i] = r["reverse-identity"], [a, n] = cr[`${r.cardinality}-${r["unique?"]}`];
1682
+ function Ir(r) {
1683
+ const [, t, s] = r["forward-identity"], [, e, i] = r["reverse-identity"], [a, n] = or[`${r.cardinality}-${r["unique?"]}`];
1654
1684
  return {
1655
1685
  forward: {
1656
1686
  on: t,
@@ -1670,10 +1700,10 @@ function Er(r) {
1670
1700
  function nt(r, t) {
1671
1701
  const s = {};
1672
1702
  for (const [i, a] of qe(r.blobs))
1673
- s[i] = Sr(a, t);
1703
+ s[i] = Ar(a, t);
1674
1704
  const e = {};
1675
1705
  for (const [i, a] of qe(r.refs)) {
1676
- const n = Er(a), o = Ir(a);
1706
+ const n = Ir(a), o = Sr(a);
1677
1707
  e[o] = n;
1678
1708
  }
1679
1709
  return q.schema({ entities: s, links: e });
@@ -1692,14 +1722,14 @@ function ye(r) {
1692
1722
  } : {};
1693
1723
  return { ...t, ...s, ...e };
1694
1724
  }
1695
- function Cr(r) {
1725
+ function Er(r) {
1696
1726
  return {
1697
1727
  id: r.id,
1698
1728
  title: r.title,
1699
1729
  createdAt: new Date(r.created_at)
1700
1730
  };
1701
1731
  }
1702
- async function Nr(r, t, s) {
1732
+ async function Cr(r, t, s) {
1703
1733
  const e = new URL(`${r}/superadmin/apps`), i = [];
1704
1734
  return s != null && s.includePerms && i.push("perms"), s != null && s.includeSchema && i.push("schema"), i.length && e.searchParams.set("include", i.join(",")), { apps: (await H(
1705
1735
  e.toString(),
@@ -1711,16 +1741,16 @@ async function Nr(r, t, s) {
1711
1741
  }
1712
1742
  )).apps.map(ye) };
1713
1743
  }
1714
- async function kr(r, t) {
1744
+ async function Nr(r, t) {
1715
1745
  const s = new URL(`${r}/superadmin/orgs`);
1716
1746
  return { orgs: (await H(s.toString(), {
1717
1747
  method: "GET",
1718
1748
  headers: {
1719
1749
  Authorization: `Bearer ${t}`
1720
1750
  }
1721
- })).orgs.map(Cr) };
1751
+ })).orgs.map(Er) };
1722
1752
  }
1723
- async function vr(r, t, s, e) {
1753
+ async function kr(r, t, s, e) {
1724
1754
  const i = new URL(`${r}/superadmin/orgs/${s}/apps`), a = [];
1725
1755
  return e != null && e.includePerms && a.push("perms"), e != null && e.includeSchema && a.push("schema"), a.length && i.searchParams.set("include", a.join(",")), { apps: (await H(
1726
1756
  i.toString(),
@@ -1755,7 +1785,7 @@ async function Ks(r, t, s) {
1755
1785
  }
1756
1786
  );
1757
1787
  }
1758
- async function Or(r, t, s, e) {
1788
+ async function vr(r, t, s, e) {
1759
1789
  let i = null, a = null;
1760
1790
  e != null && e.includePerms && (i = Ks(r, t, s)), e != null && e.includeSchema && (a = qt(r, t, s));
1761
1791
  const { app: n } = await H(
@@ -1793,7 +1823,7 @@ async function Dr(r, t, s) {
1793
1823
  }
1794
1824
  };
1795
1825
  }
1796
- async function Lr(r, t) {
1826
+ async function Or(r, t) {
1797
1827
  const s = await H(
1798
1828
  `${r}/dash/apps/ephemeral`,
1799
1829
  {
@@ -1812,7 +1842,7 @@ async function Lr(r, t) {
1812
1842
  expiresMs: s.expires_ms
1813
1843
  };
1814
1844
  }
1815
- async function Mr(r, t, s, e) {
1845
+ async function Lr(r, t, s, e) {
1816
1846
  const { app: i } = await H(
1817
1847
  `${r}/superadmin/apps/${s}`,
1818
1848
  {
@@ -1826,7 +1856,7 @@ async function Mr(r, t, s, e) {
1826
1856
  );
1827
1857
  return { app: ye(i) };
1828
1858
  }
1829
- async function Fr(r, t, s) {
1859
+ async function Mr(r, t, s) {
1830
1860
  const { app: e } = await H(
1831
1861
  `${r}/superadmin/apps/${s}`,
1832
1862
  {
@@ -1844,7 +1874,7 @@ function vt(r) {
1844
1874
  switch (t) {
1845
1875
  case "add-attr": {
1846
1876
  const e = s, i = ls(e);
1847
- return { type: "add-attr", friendlyDescription: e["value-type"] === "blob" ? Vs(e) === "id" ? `Create new entity ${i}.` : `Add attribute ${i}.` : `Link ${i} to ${xr(e)}.`, attr: e };
1877
+ return { type: "add-attr", friendlyDescription: e["value-type"] === "blob" ? Vs(e) === "id" ? `Create new entity ${i}.` : `Add attribute ${i}.` : `Link ${i} to ${yr(e)}.`, attr: e };
1848
1878
  }
1849
1879
  case "update-attr": {
1850
1880
  const e = s;
@@ -1927,10 +1957,10 @@ function vt(r) {
1927
1957
  }
1928
1958
  }
1929
1959
  }
1930
- function Br(r) {
1960
+ function Fr(r) {
1931
1961
  return r.map((t) => vt(t));
1932
1962
  }
1933
- function _r(r, t) {
1963
+ function Br(r, t) {
1934
1964
  const [s, e] = r;
1935
1965
  if (s === "add-attr" || s === "update-attr") {
1936
1966
  const c = vt(r);
@@ -1938,13 +1968,13 @@ function _r(r, t) {
1938
1968
  throw new Error("Invalid step.");
1939
1969
  return c;
1940
1970
  }
1941
- const i = e["job-id"], a = t.find((c) => c.id === i), n = vt(r), o = Ur(a);
1971
+ const i = e["job-id"], a = t.find((c) => c.id === i), n = vt(r), o = _r(a);
1942
1972
  if (n.type !== o.type)
1943
1973
  throw new Error("Invalid type");
1944
1974
  return { ...n, backgroundJob: o };
1945
1975
  }
1946
1976
  function Pt(r, t) {
1947
- return r.map((s) => _r(s, t));
1977
+ return r.map((s) => Br(s, t));
1948
1978
  }
1949
1979
  async function Rr(r, t, s, e) {
1950
1980
  const i = await H(
@@ -1965,7 +1995,7 @@ async function Rr(r, t, s, e) {
1965
1995
  return {
1966
1996
  newSchema: nt(i["new-schema"]),
1967
1997
  currentSchema: nt(i["current-schema"]),
1968
- steps: Br(i.steps)
1998
+ steps: Fr(i.steps)
1969
1999
  };
1970
2000
  }
1971
2001
  function us(r) {
@@ -2010,7 +2040,7 @@ async function jr(r, t, s, e, i, a) {
2010
2040
  }
2011
2041
  return o;
2012
2042
  }
2013
- function Ur(r) {
2043
+ function _r(r) {
2014
2044
  var s;
2015
2045
  const t = {
2016
2046
  id: r.id,
@@ -2068,7 +2098,7 @@ function fs(r) {
2068
2098
  erroredSteps: e
2069
2099
  };
2070
2100
  }
2071
- function $r(r, t, s, e) {
2101
+ function Ur(r, t, s, e) {
2072
2102
  return new Hs(async (i, a, n) => {
2073
2103
  try {
2074
2104
  const o = await H(
@@ -2105,7 +2135,7 @@ function $r(r, t, s, e) {
2105
2135
  }
2106
2136
  });
2107
2137
  }
2108
- async function qr(r, t, s, e) {
2138
+ async function $r(r, t, s, e) {
2109
2139
  return { perms: (await H(
2110
2140
  `${r}/superadmin/apps/${s}/perms`,
2111
2141
  {
@@ -2118,7 +2148,7 @@ async function qr(r, t, s, e) {
2118
2148
  }
2119
2149
  )).rules.code };
2120
2150
  }
2121
- async function zr(r, t) {
2151
+ async function qr(r, t) {
2122
2152
  const s = await H(`${r}/platform/oauth/token-info?access_token=${t}`, {
2123
2153
  method: "GET"
2124
2154
  });
@@ -2133,8 +2163,8 @@ class Ie extends Error {
2133
2163
  super("PlatformApi was not provided auth.");
2134
2164
  }
2135
2165
  }
2136
- var O, R;
2137
- class _n {
2166
+ var D, j;
2167
+ class Bn {
2138
2168
  /**
2139
2169
  * @param config – Runtime configuration.
2140
2170
  * @param config.auth.token – OAuth access-token obtained via the oauth flow
@@ -2142,34 +2172,34 @@ class _n {
2142
2172
  * @throws {Error} When `token` is missing.
2143
2173
  */
2144
2174
  constructor(t) {
2145
- oe(this, O);
2146
- oe(this, R);
2147
- ce(this, O, t == null ? void 0 : t.auth), ce(this, R, (t == null ? void 0 : t.apiURI) || "https://api.instantdb.com");
2175
+ oe(this, D);
2176
+ oe(this, j);
2177
+ ce(this, D, t == null ? void 0 : t.auth), ce(this, j, (t == null ? void 0 : t.apiURI) || "https://api.instantdb.com");
2148
2178
  }
2149
2179
  token() {
2150
- if (!T(this, O))
2180
+ if (!w(this, D))
2151
2181
  throw new Ie();
2152
- return "token" in T(this, O) ? T(this, O).token : T(this, O).accessToken;
2182
+ return "token" in w(this, D) ? w(this, D).token : w(this, D).accessToken;
2153
2183
  }
2154
2184
  canRefreshToken() {
2155
- if (!T(this, O))
2185
+ if (!w(this, D))
2156
2186
  throw new Ie();
2157
- return "refreshToken" in T(this, O) && "clientId" in T(this, O) && "clientSecret" in T(this, O) && T(this, O).refreshToken != null && T(this, O).clientId != null && T(this, O).clientSecret != null;
2187
+ return "refreshToken" in w(this, D) && "clientId" in w(this, D) && "clientSecret" in w(this, D) && w(this, D).refreshToken != null && w(this, D).clientId != null && w(this, D).clientSecret != null;
2158
2188
  }
2159
2189
  async refreshToken() {
2160
- if (!T(this, O))
2190
+ if (!w(this, D))
2161
2191
  throw new Ie();
2162
2192
  if (!this.canRefreshToken() || // Checked in canRefreshToken, but this lets
2163
2193
  // typescript refine this.#auth here
2164
- !("clientId" in T(this, O)))
2194
+ !("clientId" in w(this, D)))
2165
2195
  return null;
2166
- const t = await wr({
2167
- apiURI: T(this, R),
2168
- clientId: T(this, O).clientId,
2169
- clientSecret: T(this, O).clientSecret,
2170
- refreshToken: T(this, O).refreshToken
2196
+ const t = await br({
2197
+ apiURI: w(this, j),
2198
+ clientId: w(this, D).clientId,
2199
+ clientSecret: w(this, D).clientSecret,
2200
+ refreshToken: w(this, D).refreshToken
2171
2201
  });
2172
- return T(this, O).accessToken = t.accessToken, T(this, O).onRefresh && await T(this, O).onRefresh(t), t;
2202
+ return w(this, D).accessToken = t.accessToken, w(this, D).onRefresh && await w(this, D).onRefresh(t), t;
2173
2203
  }
2174
2204
  async withRetry(t, s) {
2175
2205
  var c, h;
@@ -2208,7 +2238,7 @@ class _n {
2208
2238
  * according to `Opts`.
2209
2239
  */
2210
2240
  async getApp(t, s) {
2211
- return this.withRetry(Or, [T(this, R), this.token(), t, s]);
2241
+ return this.withRetry(vr, [w(this, j), this.token(), t, s]);
2212
2242
  }
2213
2243
  /**
2214
2244
  * List **all apps** owned by the auth owner.
@@ -2225,7 +2255,7 @@ class _n {
2225
2255
  * @returns An array wrapper; each element’s shape follows `Opts`.
2226
2256
  */
2227
2257
  async getApps(t) {
2228
- return this.withRetry(Nr, [T(this, R), this.token(), t]);
2258
+ return this.withRetry(Cr, [w(this, j), this.token(), t]);
2229
2259
  }
2230
2260
  /**
2231
2261
  * List **all orgs** that the auth owner is a member of.
@@ -2237,7 +2267,7 @@ class _n {
2237
2267
  * @returns An array of orgs
2238
2268
  */
2239
2269
  async getOrgs() {
2240
- return this.withRetry(kr, [T(this, R), this.token()]);
2270
+ return this.withRetry(Nr, [w(this, j), this.token()]);
2241
2271
  }
2242
2272
  /**
2243
2273
  * List **all apps** owned by the auth owner.
@@ -2254,8 +2284,8 @@ class _n {
2254
2284
  * @returns An array wrapper; each element’s shape follows `Opts`.
2255
2285
  */
2256
2286
  async getAppsForOrg(t, s) {
2257
- return this.withRetry(vr, [
2258
- T(this, R),
2287
+ return this.withRetry(kr, [
2288
+ w(this, j),
2259
2289
  this.token(),
2260
2290
  t,
2261
2291
  s
@@ -2271,7 +2301,7 @@ class _n {
2271
2301
  * @param appId -- UUID of the app
2272
2302
  */
2273
2303
  async getSchema(t) {
2274
- return this.withRetry(qt, [T(this, R), this.token(), t]);
2304
+ return this.withRetry(qt, [w(this, j), this.token(), t]);
2275
2305
  }
2276
2306
  /**
2277
2307
  * Gets the permissions for an app by its id.
@@ -2283,7 +2313,7 @@ class _n {
2283
2313
  * @param appId -- UUID of the app
2284
2314
  */
2285
2315
  async getPerms(t) {
2286
- return this.withRetry(Ks, [T(this, R), this.token(), t]);
2316
+ return this.withRetry(Ks, [w(this, j), this.token(), t]);
2287
2317
  }
2288
2318
  /**
2289
2319
  * Create a new app.
@@ -2312,7 +2342,7 @@ class _n {
2312
2342
  * @param fields.orgId -- Optional id of the org that the app will be placed in
2313
2343
  */
2314
2344
  async createApp(t) {
2315
- return this.withRetry(Dr, [T(this, R), this.token(), t]);
2345
+ return this.withRetry(Dr, [w(this, j), this.token(), t]);
2316
2346
  }
2317
2347
  /**
2318
2348
  * Create a new temporary app.
@@ -2337,7 +2367,7 @@ class _n {
2337
2367
  * @param fields.perms -- Optional permissions for the app
2338
2368
  */
2339
2369
  async createTemporaryApp(t) {
2340
- return Lr(T(this, R), t);
2370
+ return Or(w(this, j), t);
2341
2371
  }
2342
2372
  /**
2343
2373
  * Update the title of an app by its id.
@@ -2352,8 +2382,8 @@ class _n {
2352
2382
  * @param fields.title -- New title for the app
2353
2383
  */
2354
2384
  async updateApp(t, s) {
2355
- return this.withRetry(Mr, [
2356
- T(this, R),
2385
+ return this.withRetry(Lr, [
2386
+ w(this, j),
2357
2387
  this.token(),
2358
2388
  t,
2359
2389
  s
@@ -2369,7 +2399,7 @@ class _n {
2369
2399
  * @param appId -- UUID of the app
2370
2400
  */
2371
2401
  async deleteApp(t) {
2372
- return this.withRetry(Fr, [T(this, R), this.token(), t]);
2402
+ return this.withRetry(Mr, [w(this, j), this.token(), t]);
2373
2403
  }
2374
2404
  /**
2375
2405
  * Dry-run a **schema push** and receive a _plan_ of steps the server would
@@ -2381,7 +2411,7 @@ class _n {
2381
2411
  */
2382
2412
  async planSchemaPush(t, s) {
2383
2413
  return this.withRetry(Rr, [
2384
- T(this, R),
2414
+ w(this, j),
2385
2415
  this.token(),
2386
2416
  t,
2387
2417
  s
@@ -2414,7 +2444,7 @@ class _n {
2414
2444
  * ```
2415
2445
  */
2416
2446
  schemaPush(t, s) {
2417
- if (!T(this, O))
2447
+ if (!w(this, D))
2418
2448
  throw new Ie();
2419
2449
  return new Hs(async (e, i, a) => {
2420
2450
  if (this.canRefreshToken())
@@ -2422,7 +2452,7 @@ class _n {
2422
2452
  await this.refreshToken();
2423
2453
  } catch {
2424
2454
  }
2425
- $r(T(this, R), this.token(), t, s).subscribe({
2455
+ Ur(w(this, j), this.token(), t, s).subscribe({
2426
2456
  complete(n) {
2427
2457
  i(n);
2428
2458
  },
@@ -2450,18 +2480,18 @@ class _n {
2450
2480
  * ```
2451
2481
  */
2452
2482
  async pushPerms(t, s) {
2453
- if (!T(this, O))
2483
+ if (!w(this, D))
2454
2484
  throw new Ie();
2455
- return this.withRetry(qr, [T(this, R), this.token(), t, s]);
2485
+ return this.withRetry($r, [w(this, j), this.token(), t, s]);
2456
2486
  }
2457
2487
  async tokenInfo() {
2458
- if (!T(this, O))
2488
+ if (!w(this, D))
2459
2489
  throw new Ie();
2460
- return this.withRetry(zr, [T(this, R), this.token()]);
2490
+ return this.withRetry(qr, [w(this, j), this.token()]);
2461
2491
  }
2462
2492
  }
2463
- O = new WeakMap(), R = new WeakMap();
2464
- function Vr(r, t) {
2493
+ D = new WeakMap(), j = new WeakMap();
2494
+ function zr(r, t) {
2465
2495
  if (r == null) return {};
2466
2496
  var s = {};
2467
2497
  for (var e in r) if ({}.hasOwnProperty.call(r, e)) {
@@ -2496,7 +2526,7 @@ function G(r, t) {
2496
2526
  return new fe(s, e + t, i + t);
2497
2527
  }
2498
2528
  const ds = "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";
2499
- var Hr = {
2529
+ var Vr = {
2500
2530
  ImportMetaOutsideModule: {
2501
2531
  message: `import.meta may appear only with 'sourceType: "module"'`,
2502
2532
  code: ds
@@ -2531,7 +2561,7 @@ const ms = {
2531
2561
  VariableDeclarator: "variable declaration",
2532
2562
  YieldExpression: "yield expression"
2533
2563
  }, Qe = (r) => r.type === "UpdateExpression" ? ms.UpdateExpression[`${r.prefix}`] : ms[r.type];
2534
- var Kr = {
2564
+ var Hr = {
2535
2565
  AccessorIsGenerator: ({
2536
2566
  kind: r
2537
2567
  }) => `A ${r}ter cannot be a generator.`,
@@ -2745,7 +2775,7 @@ var Kr = {
2745
2775
  YieldInParameter: "Yield expression is not allowed in formal parameters.",
2746
2776
  YieldNotInGeneratorFunction: "'yield' is only allowed within generator functions.",
2747
2777
  ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0."
2748
- }, Jr = {
2778
+ }, Kr = {
2749
2779
  StrictDelete: "Deleting local variable in strict mode.",
2750
2780
  StrictEvalArguments: ({
2751
2781
  referenceName: r
@@ -2757,14 +2787,14 @@ var Kr = {
2757
2787
  StrictNumericEscape: "The only valid numeric escape in strict mode is '\\0'.",
2758
2788
  StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode.",
2759
2789
  StrictWith: "'with' in strict mode."
2760
- }, Wr = {
2790
+ }, Jr = {
2761
2791
  ParseExpressionEmptyInput: "Unexpected parseExpression() input: The input is empty or contains only comments.",
2762
2792
  ParseExpressionExpectsEOF: ({
2763
2793
  unexpected: r
2764
2794
  }) => `Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(r)}\`.`
2765
2795
  };
2766
- const Xr = /* @__PURE__ */ new Set(["ArrowFunctionExpression", "AssignmentExpression", "ConditionalExpression", "YieldExpression"]);
2767
- var Gr = Object.assign({
2796
+ const Wr = /* @__PURE__ */ new Set(["ArrowFunctionExpression", "AssignmentExpression", "ConditionalExpression", "YieldExpression"]);
2797
+ var Xr = Object.assign({
2768
2798
  PipeBodyIsTighter: "Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",
2769
2799
  PipeTopicRequiresHackPipes: 'Topic references are only supported when using the `"proposal": "hack"` version of the pipeline proposal.',
2770
2800
  PipeTopicUnbound: "Topic reference is unbound; it must be inside a pipe body.",
@@ -2778,7 +2808,7 @@ var Gr = Object.assign({
2778
2808
  type: r
2779
2809
  })}; please wrap it in parentheses.`
2780
2810
  }, {});
2781
- const Yr = ["message"];
2811
+ const Gr = ["message"];
2782
2812
  function ys(r, t, s) {
2783
2813
  Object.defineProperty(r, t, {
2784
2814
  enumerable: !1,
@@ -2786,7 +2816,7 @@ function ys(r, t, s) {
2786
2816
  value: s
2787
2817
  });
2788
2818
  }
2789
- function Qr({
2819
+ function Yr({
2790
2820
  toMessage: r,
2791
2821
  code: t,
2792
2822
  reasonCode: s,
@@ -2828,8 +2858,8 @@ function te(r, t) {
2828
2858
  message: i
2829
2859
  } : i, {
2830
2860
  message: n
2831
- } = a, o = Vr(a, Yr), c = typeof n == "string" ? () => n : n;
2832
- s[e] = Qr(Object.assign({
2861
+ } = a, o = zr(a, Gr), c = typeof n == "string" ? () => n : n;
2862
+ s[e] = Yr(Object.assign({
2833
2863
  code: "BABEL_PARSER_SYNTAX_ERROR",
2834
2864
  reasonCode: e,
2835
2865
  toMessage: c
@@ -2839,8 +2869,8 @@ function te(r, t) {
2839
2869
  }
2840
2870
  return s;
2841
2871
  }
2842
- const u = Object.assign({}, te(Hr), te(Kr), te(Jr), te(Wr), te`pipelineOperator`(Gr));
2843
- function Zr() {
2872
+ const u = Object.assign({}, te(Vr), te(Hr), te(Kr), te(Jr), te`pipelineOperator`(Xr));
2873
+ function Qr() {
2844
2874
  return {
2845
2875
  sourceType: "script",
2846
2876
  sourceFilename: void 0,
@@ -2865,8 +2895,8 @@ function Zr() {
2865
2895
  annexB: !0
2866
2896
  };
2867
2897
  }
2868
- function ea(r) {
2869
- const t = Zr();
2898
+ function Zr(r) {
2899
+ const t = Qr();
2870
2900
  if (r == null)
2871
2901
  return t;
2872
2902
  if (r.annexB != null && r.annexB !== !1)
@@ -2880,20 +2910,20 @@ function ea(r) {
2880
2910
  return t;
2881
2911
  }
2882
2912
  const {
2883
- defineProperty: ta
2913
+ defineProperty: ea
2884
2914
  } = Object, xs = (r, t) => {
2885
- r && ta(r, t, {
2915
+ r && ea(r, t, {
2886
2916
  enumerable: !1,
2887
2917
  value: r[t]
2888
2918
  });
2889
2919
  };
2890
- function De(r) {
2920
+ function Oe(r) {
2891
2921
  return xs(r.loc.start, "index"), xs(r.loc.end, "index"), r;
2892
2922
  }
2893
- var sa = (r) => class extends r {
2923
+ var ta = (r) => class extends r {
2894
2924
  parse() {
2895
- const s = De(super.parse());
2896
- return this.optionFlags & 256 && (s.tokens = s.tokens.map(De)), s;
2925
+ const s = Oe(super.parse());
2926
+ return this.optionFlags & 256 && (s.tokens = s.tokens.map(Oe)), s;
2897
2927
  }
2898
2928
  parseRegExpLiteral({
2899
2929
  pattern: s,
@@ -3111,17 +3141,17 @@ var sa = (r) => class extends r {
3111
3141
  return s.type === "Literal" ? this.cloneEstreeStringLiteral(s) : super.cloneStringLiteral(s);
3112
3142
  }
3113
3143
  finishNodeAt(s, e, i) {
3114
- return De(super.finishNodeAt(s, e, i));
3144
+ return Oe(super.finishNodeAt(s, e, i));
3115
3145
  }
3116
3146
  finishNode(s, e) {
3117
3147
  const i = super.finishNode(s, e);
3118
3148
  return this.fillOptionalPropertiesForTSESLint(i), i;
3119
3149
  }
3120
3150
  resetStartLocation(s, e) {
3121
- super.resetStartLocation(s, e), De(s);
3151
+ super.resetStartLocation(s, e), Oe(s);
3122
3152
  }
3123
3153
  resetEndLocation(s, e = this.state.lastTokEndLoc) {
3124
- super.resetEndLocation(s, e), De(s);
3154
+ super.resetEndLocation(s, e), Oe(s);
3125
3155
  }
3126
3156
  };
3127
3157
  class Ke {
@@ -3131,12 +3161,12 @@ class Ke {
3131
3161
  this.token = t, this.preserveSpace = !!s;
3132
3162
  }
3133
3163
  }
3134
- const D = {
3164
+ const O = {
3135
3165
  brace: new Ke("{"),
3136
3166
  j_oTag: new Ke("<tag"),
3137
3167
  j_cTag: new Ke("</tag"),
3138
3168
  j_expr: new Ke("<tag>...</tag>", !0)
3139
- }, I = !0, y = !0, bt = !0, Le = !0, le = !0, ia = !0;
3169
+ }, I = !0, y = !0, gt = !0, Le = !0, le = !0, sa = !0;
3140
3170
  class Js {
3141
3171
  constructor(t, s = {}) {
3142
3172
  m(this, "label");
@@ -3155,139 +3185,139 @@ class Js {
3155
3185
  const zt = /* @__PURE__ */ new Map();
3156
3186
  function C(r, t = {}) {
3157
3187
  t.keyword = r;
3158
- const s = g(r, t);
3188
+ const s = b(r, t);
3159
3189
  return zt.set(r, s), s;
3160
3190
  }
3161
3191
  function z(r, t) {
3162
- return g(r, {
3192
+ return b(r, {
3163
3193
  beforeExpr: I,
3164
3194
  binop: t
3165
3195
  });
3166
3196
  }
3167
- let je = -1;
3197
+ let _e = -1;
3168
3198
  const Vt = [], Ht = [], Kt = [], Jt = [], Wt = [], Xt = [];
3169
- function g(r, t = {}) {
3170
- return ++je, Ht.push(r), Kt.push(t.binop ?? -1), Jt.push(t.beforeExpr ?? !1), Wt.push(t.startsExpr ?? !1), Xt.push(t.prefix ?? !1), Vt.push(new Js(r, t)), je;
3199
+ function b(r, t = {}) {
3200
+ return ++_e, Ht.push(r), Kt.push(t.binop ?? -1), Jt.push(t.beforeExpr ?? !1), Wt.push(t.startsExpr ?? !1), Xt.push(t.prefix ?? !1), Vt.push(new Js(r, t)), _e;
3171
3201
  }
3172
3202
  function S(r, t = {}) {
3173
- return ++je, zt.set(r, je), Ht.push(r), Kt.push(t.binop ?? -1), Jt.push(t.beforeExpr ?? !1), Wt.push(t.startsExpr ?? !1), Xt.push(t.prefix ?? !1), Vt.push(new Js("name", t)), je;
3203
+ return ++_e, zt.set(r, _e), Ht.push(r), Kt.push(t.binop ?? -1), Jt.push(t.beforeExpr ?? !1), Wt.push(t.startsExpr ?? !1), Xt.push(t.prefix ?? !1), Vt.push(new Js("name", t)), _e;
3174
3204
  }
3175
- const ra = {
3176
- bracketL: g("[", {
3205
+ const ia = {
3206
+ bracketL: b("[", {
3177
3207
  beforeExpr: I,
3178
3208
  startsExpr: y
3179
3209
  }),
3180
- bracketHashL: g("#[", {
3210
+ bracketHashL: b("#[", {
3181
3211
  beforeExpr: I,
3182
3212
  startsExpr: y
3183
3213
  }),
3184
- bracketBarL: g("[|", {
3214
+ bracketBarL: b("[|", {
3185
3215
  beforeExpr: I,
3186
3216
  startsExpr: y
3187
3217
  }),
3188
- bracketR: g("]"),
3189
- bracketBarR: g("|]"),
3190
- braceL: g("{", {
3218
+ bracketR: b("]"),
3219
+ bracketBarR: b("|]"),
3220
+ braceL: b("{", {
3191
3221
  beforeExpr: I,
3192
3222
  startsExpr: y
3193
3223
  }),
3194
- braceBarL: g("{|", {
3224
+ braceBarL: b("{|", {
3195
3225
  beforeExpr: I,
3196
3226
  startsExpr: y
3197
3227
  }),
3198
- braceHashL: g("#{", {
3228
+ braceHashL: b("#{", {
3199
3229
  beforeExpr: I,
3200
3230
  startsExpr: y
3201
3231
  }),
3202
- braceR: g("}"),
3203
- braceBarR: g("|}"),
3204
- parenL: g("(", {
3232
+ braceR: b("}"),
3233
+ braceBarR: b("|}"),
3234
+ parenL: b("(", {
3205
3235
  beforeExpr: I,
3206
3236
  startsExpr: y
3207
3237
  }),
3208
- parenR: g(")"),
3209
- comma: g(",", {
3238
+ parenR: b(")"),
3239
+ comma: b(",", {
3210
3240
  beforeExpr: I
3211
3241
  }),
3212
- semi: g(";", {
3242
+ semi: b(";", {
3213
3243
  beforeExpr: I
3214
3244
  }),
3215
- colon: g(":", {
3245
+ colon: b(":", {
3216
3246
  beforeExpr: I
3217
3247
  }),
3218
- doubleColon: g("::", {
3248
+ doubleColon: b("::", {
3219
3249
  beforeExpr: I
3220
3250
  }),
3221
- dot: g("."),
3222
- question: g("?", {
3251
+ dot: b("."),
3252
+ question: b("?", {
3223
3253
  beforeExpr: I
3224
3254
  }),
3225
- questionDot: g("?."),
3226
- arrow: g("=>", {
3255
+ questionDot: b("?."),
3256
+ arrow: b("=>", {
3227
3257
  beforeExpr: I
3228
3258
  }),
3229
- template: g("template"),
3230
- ellipsis: g("...", {
3259
+ template: b("template"),
3260
+ ellipsis: b("...", {
3231
3261
  beforeExpr: I
3232
3262
  }),
3233
- backQuote: g("`", {
3263
+ backQuote: b("`", {
3234
3264
  startsExpr: y
3235
3265
  }),
3236
- dollarBraceL: g("${", {
3266
+ dollarBraceL: b("${", {
3237
3267
  beforeExpr: I,
3238
3268
  startsExpr: y
3239
3269
  }),
3240
- templateTail: g("...`", {
3270
+ templateTail: b("...`", {
3241
3271
  startsExpr: y
3242
3272
  }),
3243
- templateNonTail: g("...${", {
3273
+ templateNonTail: b("...${", {
3244
3274
  beforeExpr: I,
3245
3275
  startsExpr: y
3246
3276
  }),
3247
- at: g("@"),
3248
- hash: g("#", {
3277
+ at: b("@"),
3278
+ hash: b("#", {
3249
3279
  startsExpr: y
3250
3280
  }),
3251
- interpreterDirective: g("#!..."),
3252
- eq: g("=", {
3281
+ interpreterDirective: b("#!..."),
3282
+ eq: b("=", {
3253
3283
  beforeExpr: I,
3254
3284
  isAssign: Le
3255
3285
  }),
3256
- assign: g("_=", {
3286
+ assign: b("_=", {
3257
3287
  beforeExpr: I,
3258
3288
  isAssign: Le
3259
3289
  }),
3260
- slashAssign: g("_=", {
3290
+ slashAssign: b("_=", {
3261
3291
  beforeExpr: I,
3262
3292
  isAssign: Le
3263
3293
  }),
3264
- xorAssign: g("_=", {
3294
+ xorAssign: b("_=", {
3265
3295
  beforeExpr: I,
3266
3296
  isAssign: Le
3267
3297
  }),
3268
- moduloAssign: g("_=", {
3298
+ moduloAssign: b("_=", {
3269
3299
  beforeExpr: I,
3270
3300
  isAssign: Le
3271
3301
  }),
3272
- incDec: g("++/--", {
3302
+ incDec: b("++/--", {
3273
3303
  prefix: le,
3274
- postfix: ia,
3304
+ postfix: sa,
3275
3305
  startsExpr: y
3276
3306
  }),
3277
- bang: g("!", {
3307
+ bang: b("!", {
3278
3308
  beforeExpr: I,
3279
3309
  prefix: le,
3280
3310
  startsExpr: y
3281
3311
  }),
3282
- tilde: g("~", {
3312
+ tilde: b("~", {
3283
3313
  beforeExpr: I,
3284
3314
  prefix: le,
3285
3315
  startsExpr: y
3286
3316
  }),
3287
- doubleCaret: g("^^", {
3317
+ doubleCaret: b("^^", {
3288
3318
  startsExpr: y
3289
3319
  }),
3290
- doubleAt: g("@@", {
3320
+ doubleAt: b("@@", {
3291
3321
  startsExpr: y
3292
3322
  }),
3293
3323
  pipeline: z("|>", 0),
@@ -3304,21 +3334,21 @@ const ra = {
3304
3334
  bitShift: z("<</>>/>>>", 8),
3305
3335
  bitShiftL: z("<</>>/>>>", 8),
3306
3336
  bitShiftR: z("<</>>/>>>", 8),
3307
- plusMin: g("+/-", {
3337
+ plusMin: b("+/-", {
3308
3338
  beforeExpr: I,
3309
3339
  binop: 9,
3310
3340
  prefix: le,
3311
3341
  startsExpr: y
3312
3342
  }),
3313
- modulo: g("%", {
3343
+ modulo: b("%", {
3314
3344
  binop: 10,
3315
3345
  startsExpr: y
3316
3346
  }),
3317
- star: g("*", {
3347
+ star: b("*", {
3318
3348
  binop: 10
3319
3349
  }),
3320
3350
  slash: z("/", 10),
3321
- exponent: g("**", {
3351
+ exponent: b("**", {
3322
3352
  beforeExpr: I,
3323
3353
  binop: 11,
3324
3354
  rightAssociative: !0
@@ -3407,14 +3437,14 @@ const ra = {
3407
3437
  startsExpr: y
3408
3438
  }),
3409
3439
  _do: C("do", {
3410
- isLoop: bt,
3440
+ isLoop: gt,
3411
3441
  beforeExpr: I
3412
3442
  }),
3413
3443
  _for: C("for", {
3414
- isLoop: bt
3444
+ isLoop: gt
3415
3445
  }),
3416
3446
  _while: C("while", {
3417
- isLoop: bt
3447
+ isLoop: gt
3418
3448
  }),
3419
3449
  _as: S("as", {
3420
3450
  startsExpr: y
@@ -3533,44 +3563,44 @@ const ra = {
3533
3563
  _opaque: S("opaque", {
3534
3564
  startsExpr: y
3535
3565
  }),
3536
- name: g("name", {
3566
+ name: b("name", {
3537
3567
  startsExpr: y
3538
3568
  }),
3539
- placeholder: g("%%", {
3569
+ placeholder: b("%%", {
3540
3570
  startsExpr: !0
3541
3571
  }),
3542
- string: g("string", {
3572
+ string: b("string", {
3543
3573
  startsExpr: y
3544
3574
  }),
3545
- num: g("num", {
3575
+ num: b("num", {
3546
3576
  startsExpr: y
3547
3577
  }),
3548
- bigint: g("bigint", {
3578
+ bigint: b("bigint", {
3549
3579
  startsExpr: y
3550
3580
  }),
3551
- decimal: g("decimal", {
3581
+ decimal: b("decimal", {
3552
3582
  startsExpr: y
3553
3583
  }),
3554
- regexp: g("regexp", {
3584
+ regexp: b("regexp", {
3555
3585
  startsExpr: y
3556
3586
  }),
3557
- privateName: g("#name", {
3587
+ privateName: b("#name", {
3558
3588
  startsExpr: y
3559
3589
  }),
3560
- eof: g("eof"),
3561
- jsxName: g("jsxName"),
3562
- jsxText: g("jsxText", {
3590
+ eof: b("eof"),
3591
+ jsxName: b("jsxName"),
3592
+ jsxText: b("jsxText", {
3563
3593
  beforeExpr: !0
3564
3594
  }),
3565
- jsxTagStart: g("jsxTagStart", {
3595
+ jsxTagStart: b("jsxTagStart", {
3566
3596
  startsExpr: !0
3567
3597
  }),
3568
- jsxTagEnd: g("jsxTagEnd")
3598
+ jsxTagEnd: b("jsxTagEnd")
3569
3599
  };
3570
3600
  function N(r) {
3571
3601
  return r >= 93 && r <= 133;
3572
3602
  }
3573
- function aa(r) {
3603
+ function ra(r) {
3574
3604
  return r <= 92;
3575
3605
  }
3576
3606
  function Z(r) {
@@ -3579,37 +3609,37 @@ function Z(r) {
3579
3609
  function Ws(r) {
3580
3610
  return r >= 58 && r <= 137;
3581
3611
  }
3582
- function na(r) {
3612
+ function aa(r) {
3583
3613
  return Jt[r];
3584
3614
  }
3585
3615
  function Be(r) {
3586
3616
  return Wt[r];
3587
3617
  }
3588
- function oa(r) {
3618
+ function na(r) {
3589
3619
  return r >= 29 && r <= 33;
3590
3620
  }
3591
3621
  function Ps(r) {
3592
3622
  return r >= 129 && r <= 131;
3593
3623
  }
3594
- function ca(r) {
3624
+ function oa(r) {
3595
3625
  return r >= 90 && r <= 92;
3596
3626
  }
3597
3627
  function Gt(r) {
3598
3628
  return r >= 58 && r <= 92;
3599
3629
  }
3600
- function ha(r) {
3630
+ function ca(r) {
3601
3631
  return r >= 39 && r <= 59;
3602
3632
  }
3603
- function la(r) {
3633
+ function ha(r) {
3604
3634
  return r === 34;
3605
3635
  }
3606
- function ua(r) {
3636
+ function la(r) {
3607
3637
  return Xt[r];
3608
3638
  }
3609
- function pa(r) {
3639
+ function ua(r) {
3610
3640
  return r >= 121 && r <= 123;
3611
3641
  }
3612
- function fa(r) {
3642
+ function pa(r) {
3613
3643
  return r >= 124 && r <= 130;
3614
3644
  }
3615
3645
  function de(r) {
@@ -3618,20 +3648,20 @@ function de(r) {
3618
3648
  function Ze(r) {
3619
3649
  return Kt[r];
3620
3650
  }
3621
- function da(r) {
3651
+ function fa(r) {
3622
3652
  return r === 57;
3623
3653
  }
3624
- function Ot(r) {
3654
+ function Dt(r) {
3625
3655
  return r >= 24 && r <= 25;
3626
3656
  }
3627
3657
  function Xs(r) {
3628
3658
  return Vt[r];
3629
3659
  }
3630
3660
  let Yt = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", Gs = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";
3631
- const ma = new RegExp("[" + Yt + "]"), ya = new RegExp("[" + Yt + Gs + "]");
3661
+ const da = new RegExp("[" + Yt + "]"), ma = new RegExp("[" + Yt + Gs + "]");
3632
3662
  Yt = Gs = null;
3633
- const Ys = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191], xa = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
3634
- function Dt(r, t) {
3663
+ const Ys = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191], ya = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
3664
+ function Ot(r, t) {
3635
3665
  let s = 65536;
3636
3666
  for (let e = 0, i = t.length; e < i; e += 2) {
3637
3667
  if (s += t[e], s > r) return !1;
@@ -3640,21 +3670,21 @@ function Dt(r, t) {
3640
3670
  return !1;
3641
3671
  }
3642
3672
  function ne(r) {
3643
- return r < 65 ? r === 36 : r <= 90 ? !0 : r < 97 ? r === 95 : r <= 122 ? !0 : r <= 65535 ? r >= 170 && ma.test(String.fromCharCode(r)) : Dt(r, Ys);
3673
+ return r < 65 ? r === 36 : r <= 90 ? !0 : r < 97 ? r === 95 : r <= 122 ? !0 : r <= 65535 ? r >= 170 && da.test(String.fromCharCode(r)) : Ot(r, Ys);
3644
3674
  }
3645
3675
  function Ce(r) {
3646
- return r < 48 ? r === 36 : r < 58 ? !0 : r < 65 ? !1 : r <= 90 ? !0 : r < 97 ? r === 95 : r <= 122 ? !0 : r <= 65535 ? r >= 170 && ya.test(String.fromCharCode(r)) : Dt(r, Ys) || Dt(r, xa);
3676
+ return r < 48 ? r === 36 : r < 58 ? !0 : r < 65 ? !1 : r <= 90 ? !0 : r < 97 ? r === 95 : r <= 122 ? !0 : r <= 65535 ? r >= 170 && ma.test(String.fromCharCode(r)) : Ot(r, Ys) || Ot(r, ya);
3647
3677
  }
3648
3678
  const Qt = {
3649
3679
  keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
3650
3680
  strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
3651
3681
  strictBind: ["eval", "arguments"]
3652
- }, Pa = new Set(Qt.keyword), ba = new Set(Qt.strict), ga = new Set(Qt.strictBind);
3682
+ }, xa = new Set(Qt.keyword), Pa = new Set(Qt.strict), ga = new Set(Qt.strictBind);
3653
3683
  function Qs(r, t) {
3654
3684
  return t && r === "await" || r === "enum";
3655
3685
  }
3656
3686
  function Zs(r, t) {
3657
- return Qs(r, t) || ba.has(r);
3687
+ return Qs(r, t) || Pa.has(r);
3658
3688
  }
3659
3689
  function ei(r) {
3660
3690
  return ga.has(r);
@@ -3662,15 +3692,15 @@ function ei(r) {
3662
3692
  function ti(r, t) {
3663
3693
  return Zs(r, t) || ei(r);
3664
3694
  }
3665
- function wa(r) {
3666
- return Pa.has(r);
3695
+ function ba(r) {
3696
+ return xa.has(r);
3667
3697
  }
3668
3698
  function Ta(r, t, s) {
3669
3699
  return r === 64 && t === 64 && ne(s);
3670
3700
  }
3671
- const Aa = /* @__PURE__ */ new Set(["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "eval", "arguments", "enum", "await"]);
3672
- function Sa(r) {
3673
- return Aa.has(r);
3701
+ const wa = /* @__PURE__ */ new Set(["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "eval", "arguments", "enum", "await"]);
3702
+ function Aa(r) {
3703
+ return wa.has(r);
3674
3704
  }
3675
3705
  class Zt {
3676
3706
  constructor(t) {
@@ -3793,15 +3823,15 @@ class es {
3793
3823
  }
3794
3824
  }
3795
3825
  }
3796
- class Ia extends Zt {
3826
+ class Sa extends Zt {
3797
3827
  constructor() {
3798
3828
  super(...arguments);
3799
3829
  m(this, "declareFunctions", /* @__PURE__ */ new Set());
3800
3830
  }
3801
3831
  }
3802
- class Ea extends es {
3832
+ class Ia extends es {
3803
3833
  createScope(t) {
3804
- return new Ia(t);
3834
+ return new Sa(t);
3805
3835
  }
3806
3836
  declareName(t, s, e) {
3807
3837
  const i = this.currentScope();
@@ -3823,7 +3853,7 @@ class Ea extends es {
3823
3853
  this.scopeStack[0].declareFunctions.has(t.name) || super.checkLocalExport(t);
3824
3854
  }
3825
3855
  }
3826
- const Ca = /* @__PURE__ */ new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]), w = te`flow`({
3856
+ const Ea = /* @__PURE__ */ new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]), T = te`flow`({
3827
3857
  AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",
3828
3858
  AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",
3829
3859
  AssignReservedType: ({
@@ -3914,32 +3944,32 @@ const Ca = /* @__PURE__ */ new Set(["_", "any", "bool", "boolean", "empty", "ext
3914
3944
  UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.",
3915
3945
  UnterminatedFlowComment: "Unterminated flow-comment."
3916
3946
  });
3917
- function Na(r) {
3947
+ function Ca(r) {
3918
3948
  return r.type === "DeclareExportAllDeclaration" || r.type === "DeclareExportDeclaration" && (!r.declaration || r.declaration.type !== "TypeAlias" && r.declaration.type !== "InterfaceDeclaration");
3919
3949
  }
3920
- function bs(r) {
3950
+ function gs(r) {
3921
3951
  return r.importKind === "type" || r.importKind === "typeof";
3922
3952
  }
3923
- const ka = {
3953
+ const Na = {
3924
3954
  const: "declare export var",
3925
3955
  let: "declare export var",
3926
3956
  type: "export type",
3927
3957
  interface: "export interface"
3928
3958
  };
3929
- function va(r, t) {
3959
+ function ka(r, t) {
3930
3960
  const s = [], e = [];
3931
3961
  for (let i = 0; i < r.length; i++)
3932
3962
  (t(r[i], i, r) ? s : e).push(r[i]);
3933
3963
  return [s, e];
3934
3964
  }
3935
- const Oa = /\*?\s*@((?:no)?flow)\b/;
3965
+ const va = /\*?\s*@((?:no)?flow)\b/;
3936
3966
  var Da = (r) => class extends r {
3937
3967
  constructor() {
3938
3968
  super(...arguments);
3939
3969
  m(this, "flowPragma");
3940
3970
  }
3941
3971
  getScopeHandler() {
3942
- return Ea;
3972
+ return Ia;
3943
3973
  }
3944
3974
  shouldParseTypes() {
3945
3975
  return this.getPluginOption("flow", "all") || this.flowPragma === "flow";
@@ -3949,7 +3979,7 @@ var Da = (r) => class extends r {
3949
3979
  }
3950
3980
  addComment(e) {
3951
3981
  if (this.flowPragma === void 0) {
3952
- const i = Oa.exec(e.value);
3982
+ const i = va.exec(e.value);
3953
3983
  if (i) if (i[1] === "flow")
3954
3984
  this.flowPragma = "flow";
3955
3985
  else if (i[1] === "noflow")
@@ -3967,7 +3997,7 @@ var Da = (r) => class extends r {
3967
3997
  }
3968
3998
  flowParsePredicate() {
3969
3999
  const e = this.startNode(), i = this.state.startLoc;
3970
- return this.next(), this.expectContextual(110), this.state.lastTokStartLoc.index > i.index + 1 && this.raise(w.UnexpectedSpaceBetweenModuloChecks, i), this.eat(10) ? (e.value = super.parseExpression(), this.expect(11), this.finishNode(e, "DeclaredPredicate")) : this.finishNode(e, "InferredPredicate");
4000
+ return this.next(), this.expectContextual(110), this.state.lastTokStartLoc.index > i.index + 1 && this.raise(T.UnexpectedSpaceBetweenModuloChecks, i), this.eat(10) ? (e.value = super.parseExpression(), this.expect(11), this.finishNode(e, "DeclaredPredicate")) : this.finishNode(e, "InferredPredicate");
3971
4001
  }
3972
4002
  flowParseTypeAndPredicateInitialiser() {
3973
4003
  const e = this.state.inType;
@@ -3993,7 +4023,7 @@ var Da = (r) => class extends r {
3993
4023
  if (this.match(74))
3994
4024
  return this.flowParseDeclareVariable(e);
3995
4025
  if (this.eatContextual(127))
3996
- return this.match(16) ? this.flowParseDeclareModuleExports(e) : (i && this.raise(w.NestedDeclareModule, this.state.lastTokStartLoc), this.flowParseDeclareModule(e));
4026
+ return this.match(16) ? this.flowParseDeclareModuleExports(e) : (i && this.raise(T.NestedDeclareModule, this.state.lastTokStartLoc), this.flowParseDeclareModule(e));
3997
4027
  if (this.isContextual(130))
3998
4028
  return this.flowParseDeclareTypeAlias(e);
3999
4029
  if (this.isContextual(131))
@@ -4012,12 +4042,12 @@ var Da = (r) => class extends r {
4012
4042
  const i = e.body = this.startNode(), a = i.body = [];
4013
4043
  for (this.expect(5); !this.match(8); ) {
4014
4044
  let c = this.startNode();
4015
- this.match(83) ? (this.next(), !this.isContextual(130) && !this.match(87) && this.raise(w.InvalidNonTypeImportInDeclareModule, this.state.lastTokStartLoc), super.parseImport(c)) : (this.expectContextual(125, w.UnsupportedStatementInDeclareModule), c = this.flowParseDeclare(c, !0)), a.push(c);
4045
+ this.match(83) ? (this.next(), !this.isContextual(130) && !this.match(87) && this.raise(T.InvalidNonTypeImportInDeclareModule, this.state.lastTokStartLoc), super.parseImport(c)) : (this.expectContextual(125, T.UnsupportedStatementInDeclareModule), c = this.flowParseDeclare(c, !0)), a.push(c);
4016
4046
  }
4017
4047
  this.scope.exit(), this.expect(8), this.finishNode(i, "BlockStatement");
4018
4048
  let n = null, o = !1;
4019
4049
  return a.forEach((c) => {
4020
- Na(c) ? (n === "CommonJS" && this.raise(w.AmbiguousDeclareModuleKind, c), n = "ES") : c.type === "DeclareModuleExports" && (o && this.raise(w.DuplicateDeclareModuleExports, c), n === "ES" && this.raise(w.AmbiguousDeclareModuleKind, c), n = "CommonJS", o = !0);
4050
+ Ca(c) ? (n === "CommonJS" && this.raise(T.AmbiguousDeclareModuleKind, c), n = "ES") : c.type === "DeclareModuleExports" && (o && this.raise(T.DuplicateDeclareModuleExports, c), n === "ES" && this.raise(T.AmbiguousDeclareModuleKind, c), n = "CommonJS", o = !0);
4021
4051
  }), e.kind = n || "CommonJS", this.finishNode(e, "DeclareModule");
4022
4052
  }
4023
4053
  flowParseDeclareExportDeclaration(e, i) {
@@ -4025,9 +4055,9 @@ var Da = (r) => class extends r {
4025
4055
  return this.match(68) || this.match(80) ? e.declaration = this.flowParseDeclare(this.startNode()) : (e.declaration = this.flowParseType(), this.semicolon()), e.default = !0, this.finishNode(e, "DeclareExportDeclaration");
4026
4056
  if (this.match(75) || this.isLet() || (this.isContextual(130) || this.isContextual(129)) && !i) {
4027
4057
  const a = this.state.value;
4028
- throw this.raise(w.UnsupportedDeclareExportKind, this.state.startLoc, {
4058
+ throw this.raise(T.UnsupportedDeclareExportKind, this.state.startLoc, {
4029
4059
  unsupportedExportKind: a,
4030
- suggestion: ka[a]
4060
+ suggestion: Na[a]
4031
4061
  });
4032
4062
  }
4033
4063
  if (this.match(74) || this.match(68) || this.match(80) || this.isContextual(131))
@@ -4083,10 +4113,10 @@ var Da = (r) => class extends r {
4083
4113
  return this.flowParseInterfaceish(e, !1), this.finishNode(e, "InterfaceDeclaration");
4084
4114
  }
4085
4115
  checkNotUnderscore(e) {
4086
- e === "_" && this.raise(w.UnexpectedReservedUnderscore, this.state.startLoc);
4116
+ e === "_" && this.raise(T.UnexpectedReservedUnderscore, this.state.startLoc);
4087
4117
  }
4088
4118
  checkReservedType(e, i, a) {
4089
- Ca.has(e) && this.raise(a ? w.AssignReservedType : w.UnexpectedReservedType, i, {
4119
+ Ea.has(e) && this.raise(a ? T.AssignReservedType : T.UnexpectedReservedType, i, {
4090
4120
  reservedType: e
4091
4121
  });
4092
4122
  }
@@ -4101,7 +4131,7 @@ var Da = (r) => class extends r {
4101
4131
  }
4102
4132
  flowParseTypeParameter(e = !1) {
4103
4133
  const i = this.state.startLoc, a = this.startNode(), n = this.flowParseVariance(), o = this.flowParseTypeAnnotatableIdentifier();
4104
- return a.name = o.name, a.variance = n, a.bound = o.typeAnnotation, this.match(29) ? (this.eat(29), a.default = this.flowParseType()) : e && this.raise(w.MissingTypeParamDefault, i), this.finishNode(a, "TypeParameter");
4134
+ return a.name = o.name, a.variance = n, a.bound = o.typeAnnotation, this.match(29) ? (this.eat(29), a.default = this.flowParseType()) : e && this.raise(T.MissingTypeParamDefault, i), this.finishNode(a, "TypeParameter");
4105
4135
  }
4106
4136
  flowParseTypeParameterDeclaration() {
4107
4137
  const e = this.state.inType, i = this.startNode();
@@ -4114,7 +4144,7 @@ var Da = (r) => class extends r {
4114
4144
  return this.expect(48), this.state.inType = e, this.finishNode(i, "TypeParameterDeclaration");
4115
4145
  }
4116
4146
  flowInTopLevelContext(e) {
4117
- if (this.curContext() !== D.brace) {
4147
+ if (this.curContext() !== O.brace) {
4118
4148
  const i = this.state.context;
4119
4149
  this.state.context = [i[0]];
4120
4150
  try {
@@ -4137,7 +4167,7 @@ var Da = (r) => class extends r {
4137
4167
  for (this.state.noAnonFunctionType = !1; !this.match(48); )
4138
4168
  e.params.push(this.flowParseType()), this.match(48) || this.expect(12);
4139
4169
  this.state.noAnonFunctionType = a;
4140
- }), this.state.inType = i, !this.state.inType && this.curContext() === D.brace && this.reScan_lt_gt(), this.expect(48), this.finishNode(e, "TypeParameterInstantiation");
4170
+ }), this.state.inType = i, !this.state.inType && this.curContext() === O.brace && this.reScan_lt_gt(), this.expect(48), this.finishNode(e, "TypeParameterInstantiation");
4141
4171
  }
4142
4172
  flowParseTypeParameterInstantiationCallOrNew() {
4143
4173
  if (this.reScan_lt() !== 47) return;
@@ -4215,7 +4245,7 @@ var Da = (r) => class extends r {
4215
4245
  const ie = this.flowParseObjectTypeProperty(E, x, A, k, B, a, o ?? !p);
4216
4246
  ie === null ? (d = !0, F = this.state.lastTokStartLoc) : h.properties.push(ie);
4217
4247
  }
4218
- this.flowObjectTypeSemicolon(), F && !this.match(8) && !this.match(9) && this.raise(w.UnexpectedExplicitInexactInObject, F);
4248
+ this.flowObjectTypeSemicolon(), F && !this.match(8) && !this.match(9) && this.raise(T.UnexpectedExplicitInexactInObject, F);
4219
4249
  }
4220
4250
  this.expect(l), a && (h.inexact = d);
4221
4251
  const f = this.finishNode(h, "ObjectTypeAnnotation");
@@ -4223,16 +4253,16 @@ var Da = (r) => class extends r {
4223
4253
  }
4224
4254
  flowParseObjectTypeProperty(e, i, a, n, o, c, h) {
4225
4255
  if (this.eat(21))
4226
- return this.match(12) || this.match(13) || this.match(8) || this.match(9) ? (c ? h || this.raise(w.InexactInsideExact, this.state.lastTokStartLoc) : this.raise(w.InexactInsideNonObject, this.state.lastTokStartLoc), n && this.raise(w.InexactVariance, n), null) : (c || this.raise(w.UnexpectedSpreadType, this.state.lastTokStartLoc), a != null && this.unexpected(a), n && this.raise(w.SpreadVariance, n), e.argument = this.flowParseType(), this.finishNode(e, "ObjectTypeSpreadProperty"));
4256
+ return this.match(12) || this.match(13) || this.match(8) || this.match(9) ? (c ? h || this.raise(T.InexactInsideExact, this.state.lastTokStartLoc) : this.raise(T.InexactInsideNonObject, this.state.lastTokStartLoc), n && this.raise(T.InexactVariance, n), null) : (c || this.raise(T.UnexpectedSpreadType, this.state.lastTokStartLoc), a != null && this.unexpected(a), n && this.raise(T.SpreadVariance, n), e.argument = this.flowParseType(), this.finishNode(e, "ObjectTypeSpreadProperty"));
4227
4257
  {
4228
4258
  e.key = this.flowParseObjectPropertyKey(), e.static = i, e.proto = a != null, e.kind = o;
4229
4259
  let l = !1;
4230
- return this.match(47) || this.match(10) ? (e.method = !0, a != null && this.unexpected(a), n && this.unexpected(n.loc.start), e.value = this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)), (o === "get" || o === "set") && this.flowCheckGetterSetterParams(e), !c && e.key.name === "constructor" && e.value.this && this.raise(w.ThisParamBannedInConstructor, e.value.this)) : (o !== "init" && this.unexpected(), e.method = !1, this.eat(17) && (l = !0), e.value = this.flowParseTypeInitialiser(), e.variance = n), e.optional = l, this.finishNode(e, "ObjectTypeProperty");
4260
+ return this.match(47) || this.match(10) ? (e.method = !0, a != null && this.unexpected(a), n && this.unexpected(n.loc.start), e.value = this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)), (o === "get" || o === "set") && this.flowCheckGetterSetterParams(e), !c && e.key.name === "constructor" && e.value.this && this.raise(T.ThisParamBannedInConstructor, e.value.this)) : (o !== "init" && this.unexpected(), e.method = !1, this.eat(17) && (l = !0), e.value = this.flowParseTypeInitialiser(), e.variance = n), e.optional = l, this.finishNode(e, "ObjectTypeProperty");
4231
4261
  }
4232
4262
  }
4233
4263
  flowCheckGetterSetterParams(e) {
4234
4264
  const i = e.kind === "get" ? 0 : 1, a = e.value.params.length + (e.value.rest ? 1 : 0);
4235
- e.value.this && this.raise(e.kind === "get" ? w.GetterMayNotHaveThisParam : w.SetterMayNotHaveThisParam, e.value.this), a !== i && this.raise(e.kind === "get" ? u.BadGetterArity : u.BadSetterArity, e), e.kind === "set" && e.value.rest && this.raise(u.BadSetterRestParameter, e);
4265
+ e.value.this && this.raise(e.kind === "get" ? T.GetterMayNotHaveThisParam : T.SetterMayNotHaveThisParam, e.value.this), a !== i && this.raise(e.kind === "get" ? u.BadGetterArity : u.BadSetterArity, e), e.kind === "set" && e.value.rest && this.raise(u.BadSetterRestParameter, e);
4236
4266
  }
4237
4267
  flowObjectTypeSemicolon() {
4238
4268
  !this.eat(13) && !this.eat(12) && !this.match(8) && !this.match(9) && this.unexpected();
@@ -4263,7 +4293,7 @@ var Da = (r) => class extends r {
4263
4293
  flowParseFunctionTypeParam(e) {
4264
4294
  let i = null, a = !1, n = null;
4265
4295
  const o = this.startNode(), c = this.lookahead(), h = this.state.type === 78;
4266
- return c.type === 14 || c.type === 17 ? (h && !e && this.raise(w.ThisParamMustBeFirst, o), i = this.parseIdentifier(h), this.eat(17) && (a = !0, h && this.raise(w.ThisParamMayNotBeOptional, o)), n = this.flowParseTypeInitialiser()) : n = this.flowParseType(), o.name = i, o.optional = a, o.typeAnnotation = n, this.finishNode(o, "FunctionTypeParam");
4296
+ return c.type === 14 || c.type === 17 ? (h && !e && this.raise(T.ThisParamMustBeFirst, o), i = this.parseIdentifier(h), this.eat(17) && (a = !0, h && this.raise(T.ThisParamMayNotBeOptional, o)), n = this.flowParseTypeInitialiser()) : n = this.flowParseType(), o.name = i, o.optional = a, o.typeAnnotation = n, this.finishNode(o, "FunctionTypeParam");
4267
4297
  }
4268
4298
  reinterpretTypeAsFunctionTypeParam(e) {
4269
4299
  const i = this.startNodeAt(e.loc.start);
@@ -4353,7 +4383,7 @@ var Da = (r) => class extends r {
4353
4383
  return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", i);
4354
4384
  if (this.match(136))
4355
4385
  return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", i);
4356
- throw this.raise(w.UnexpectedSubtractionOperand, this.state.startLoc);
4386
+ throw this.raise(T.UnexpectedSubtractionOperand, this.state.startLoc);
4357
4387
  }
4358
4388
  this.unexpected();
4359
4389
  return;
@@ -4532,7 +4562,7 @@ var Da = (r) => class extends r {
4532
4562
  failed: l
4533
4563
  } = this.tryParseConditionalConsequent()), [p, d] = this.getArrowLikeExpressions(h);
4534
4564
  }
4535
- l && p.length > 1 && this.raise(w.AmbiguousConditionalArrow, n.startLoc), l && p.length === 1 && (this.state = n, f.push(p[0].start), this.state.noArrowAt = f, {
4565
+ l && p.length > 1 && this.raise(T.AmbiguousConditionalArrow, n.startLoc), l && p.length === 1 && (this.state = n, f.push(p[0].start), this.state.noArrowAt = f, {
4536
4566
  consequent: h,
4537
4567
  failed: l
4538
4568
  } = this.tryParseConditionalConsequent());
@@ -4553,7 +4583,7 @@ var Da = (r) => class extends r {
4553
4583
  const o = a.pop();
4554
4584
  o.type === "ArrowFunctionExpression" && o.body.type !== "BlockStatement" ? (o.typeParameters || !o.returnType ? this.finishArrowValidation(o) : n.push(o), a.push(o.body)) : o.type === "ConditionalExpression" && (a.push(o.consequent), a.push(o.alternate));
4555
4585
  }
4556
- return i ? (n.forEach((o) => this.finishArrowValidation(o)), [n, []]) : va(n, (o) => o.params.every((c) => this.isAssignable(c, !0)));
4586
+ return i ? (n.forEach((o) => this.finishArrowValidation(o)), [n, []]) : ka(n, (o) => o.params.every((c) => this.isAssignable(c, !0)));
4557
4587
  }
4558
4588
  finishArrowValidation(e) {
4559
4589
  var i;
@@ -4615,7 +4645,7 @@ var Da = (r) => class extends r {
4615
4645
  return;
4616
4646
  i.declare = !0;
4617
4647
  }
4618
- super.parseClassMember(e, i, a), i.declare && (i.type !== "ClassProperty" && i.type !== "ClassPrivateProperty" && i.type !== "PropertyDefinition" ? this.raise(w.DeclareClassElement, n) : i.value && this.raise(w.DeclareClassFieldInitializer, i.value));
4648
+ super.parseClassMember(e, i, a), i.declare && (i.type !== "ClassProperty" && i.type !== "ClassPrivateProperty" && i.type !== "PropertyDefinition" ? this.raise(T.DeclareClassElement, n) : i.value && this.raise(T.DeclareClassFieldInitializer, i.value));
4619
4649
  }
4620
4650
  isIterator(e) {
4621
4651
  return e === "iterator" || e === "asyncIterator";
@@ -4647,7 +4677,7 @@ var Da = (r) => class extends r {
4647
4677
  var a;
4648
4678
  for (let n = 0; n < e.length; n++) {
4649
4679
  const o = e[n];
4650
- o && o.type === "TypeCastExpression" && !((a = o.extra) != null && a.parenthesized) && (e.length > 1 || !i) && this.raise(w.TypeCastInPattern, o.typeAnnotation);
4680
+ o && o.type === "TypeCastExpression" && !((a = o.extra) != null && a.parenthesized) && (e.length > 1 || !i) && this.raise(T.TypeCastInPattern, o.typeAnnotation);
4651
4681
  }
4652
4682
  return e;
4653
4683
  }
@@ -4676,10 +4706,10 @@ var Da = (r) => class extends r {
4676
4706
  pushClassMethod(e, i, a, n, o, c) {
4677
4707
  if (i.variance && this.unexpected(i.variance.loc.start), delete i.variance, this.match(47) && (i.typeParameters = this.flowParseTypeParameterDeclaration()), super.pushClassMethod(e, i, a, n, o, c), i.params && o) {
4678
4708
  const h = i.params;
4679
- h.length > 0 && this.isThisParam(h[0]) && this.raise(w.ThisParamBannedInConstructor, i);
4709
+ h.length > 0 && this.isThisParam(h[0]) && this.raise(T.ThisParamBannedInConstructor, i);
4680
4710
  } else if (i.type === "MethodDefinition" && o && i.value.params) {
4681
4711
  const h = i.value.params;
4682
- h.length > 0 && this.isThisParam(h[0]) && this.raise(w.ThisParamBannedInConstructor, i);
4712
+ h.length > 0 && this.isThisParam(h[0]) && this.raise(T.ThisParamBannedInConstructor, i);
4683
4713
  }
4684
4714
  }
4685
4715
  pushClassPrivateMethod(e, i, a, n) {
@@ -4700,7 +4730,7 @@ var Da = (r) => class extends r {
4700
4730
  const i = this.getObjectOrClassMethodParams(e);
4701
4731
  if (i.length > 0) {
4702
4732
  const a = i[0];
4703
- this.isThisParam(a) && e.kind === "get" ? this.raise(w.GetterMayNotHaveThisParam, a) : this.isThisParam(a) && this.raise(w.SetterMayNotHaveThisParam, a);
4733
+ this.isThisParam(a) && e.kind === "get" ? this.raise(T.GetterMayNotHaveThisParam, a) : this.isThisParam(a) && this.raise(T.SetterMayNotHaveThisParam, a);
4704
4734
  }
4705
4735
  }
4706
4736
  parsePropertyNamePrefixOperator(e) {
@@ -4714,17 +4744,17 @@ var Da = (r) => class extends r {
4714
4744
  return l && ((p.value || p).typeParameters = l), p;
4715
4745
  }
4716
4746
  parseFunctionParamType(e) {
4717
- return this.eat(17) && (e.type !== "Identifier" && this.raise(w.PatternIsOptional, e), this.isThisParam(e) && this.raise(w.ThisParamMayNotBeOptional, e), e.optional = !0), this.match(14) ? e.typeAnnotation = this.flowParseTypeAnnotation() : this.isThisParam(e) && this.raise(w.ThisParamAnnotationRequired, e), this.match(29) && this.isThisParam(e) && this.raise(w.ThisParamNoDefault, e), this.resetEndLocation(e), e;
4747
+ return this.eat(17) && (e.type !== "Identifier" && this.raise(T.PatternIsOptional, e), this.isThisParam(e) && this.raise(T.ThisParamMayNotBeOptional, e), e.optional = !0), this.match(14) ? e.typeAnnotation = this.flowParseTypeAnnotation() : this.isThisParam(e) && this.raise(T.ThisParamAnnotationRequired, e), this.match(29) && this.isThisParam(e) && this.raise(T.ThisParamNoDefault, e), this.resetEndLocation(e), e;
4718
4748
  }
4719
4749
  parseMaybeDefault(e, i) {
4720
4750
  const a = super.parseMaybeDefault(e, i);
4721
- return a.type === "AssignmentPattern" && a.typeAnnotation && a.right.start < a.typeAnnotation.start && this.raise(w.TypeBeforeInitializer, a.typeAnnotation), a;
4751
+ return a.type === "AssignmentPattern" && a.typeAnnotation && a.right.start < a.typeAnnotation.start && this.raise(T.TypeBeforeInitializer, a.typeAnnotation), a;
4722
4752
  }
4723
4753
  checkImportReflection(e) {
4724
- super.checkImportReflection(e), e.module && e.importKind !== "value" && this.raise(w.ImportReflectionHasImportType, e.specifiers[0].loc.start);
4754
+ super.checkImportReflection(e), e.module && e.importKind !== "value" && this.raise(T.ImportReflectionHasImportType, e.specifiers[0].loc.start);
4725
4755
  }
4726
4756
  parseImportSpecifierLocal(e, i, a) {
4727
- i.local = bs(e) ? this.flowParseRestrictedIdentifier(!0, !0) : this.parseIdentifier(), e.specifiers.push(this.finishImportSpecifier(i, a));
4757
+ i.local = gs(e) ? this.flowParseRestrictedIdentifier(!0, !0) : this.parseIdentifier(), e.specifiers.push(this.finishImportSpecifier(i, a));
4728
4758
  }
4729
4759
  isPotentialImportPhase(e) {
4730
4760
  if (super.isPotentialImportPhase(e)) return !0;
@@ -4763,8 +4793,8 @@ var Da = (r) => class extends r {
4763
4793
  }
4764
4794
  this.eatContextual(93) ? e.local = this.parseIdentifier() : (l = !0, e.local = this.cloneIdentifier(e.imported));
4765
4795
  }
4766
- const p = bs(e);
4767
- return a && p && this.raise(w.ImportTypeShorthandOnlyInPureImport, e), (a || p) && this.checkReservedType(e.local.name, e.local.loc.start, !0), l && !a && !p && this.checkReservedWord(e.local.name, e.loc.start, !0, !0), this.finishImportSpecifier(e, "ImportSpecifier");
4796
+ const p = gs(e);
4797
+ return a && p && this.raise(T.ImportTypeShorthandOnlyInPureImport, e), (a || p) && this.checkReservedType(e.local.name, e.local.loc.start, !0), l && !a && !p && this.checkReservedWord(e.local.name, e.loc.start, !0, !0), this.finishImportSpecifier(e, "ImportSpecifier");
4768
4798
  }
4769
4799
  parseBindingAtom() {
4770
4800
  switch (this.state.type) {
@@ -4798,7 +4828,7 @@ var Da = (r) => class extends r {
4798
4828
  const {
4799
4829
  context: o
4800
4830
  } = this.state, c = o[o.length - 1];
4801
- (c === D.j_oTag || c === D.j_expr) && o.pop();
4831
+ (c === O.j_oTag || c === O.j_expr) && o.pop();
4802
4832
  }
4803
4833
  if (n != null && n.error || this.match(47)) {
4804
4834
  a = a || this.state.clone();
@@ -4817,14 +4847,14 @@ var Da = (r) => class extends r {
4817
4847
  let h = null;
4818
4848
  if (c.node && this.maybeUnwrapTypeCastExpression(c.node).type === "ArrowFunctionExpression") {
4819
4849
  if (!c.error && !c.aborted)
4820
- return c.node.async && this.raise(w.UnexpectedTypeParameterBeforeAsyncArrowFunction, o), c.node;
4850
+ return c.node.async && this.raise(T.UnexpectedTypeParameterBeforeAsyncArrowFunction, o), c.node;
4821
4851
  h = c.node;
4822
4852
  }
4823
4853
  if (n != null && n.node)
4824
4854
  return this.state = n.failState, n.node;
4825
4855
  if (h)
4826
4856
  return this.state = c.failState, h;
4827
- throw n != null && n.thrown ? n.error : c.thrown ? c.error : this.raise(w.UnexpectedTokenAfterTypeParameter, o);
4857
+ throw n != null && n.thrown ? n.error : c.thrown ? c.error : this.raise(T.UnexpectedTokenAfterTypeParameter, o);
4828
4858
  }
4829
4859
  return super.parseMaybeAssign(e, i);
4830
4860
  }
@@ -4850,7 +4880,7 @@ var Da = (r) => class extends r {
4850
4880
  checkParams(e, i, a, n = !0) {
4851
4881
  if (!(a && this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start)))) {
4852
4882
  for (let o = 0; o < e.params.length; o++)
4853
- this.isThisParam(e.params[o]) && o > 0 && this.raise(w.ThisParamMustBeFirst, e.params[o]);
4883
+ this.isThisParam(e.params[o]) && o > 0 && this.raise(T.ThisParamMustBeFirst, e.params[o]);
4854
4884
  super.checkParams(e, i, a, n);
4855
4885
  }
4856
4886
  }
@@ -4919,12 +4949,12 @@ var Da = (r) => class extends r {
4919
4949
  }
4920
4950
  parseTopLevel(e, i) {
4921
4951
  const a = super.parseTopLevel(e, i);
4922
- return this.state.hasFlowComment && this.raise(w.UnterminatedFlowComment, this.state.curPosition()), a;
4952
+ return this.state.hasFlowComment && this.raise(T.UnterminatedFlowComment, this.state.curPosition()), a;
4923
4953
  }
4924
4954
  skipBlockComment() {
4925
4955
  if (this.hasPlugin("flowComments") && this.skipFlowComment()) {
4926
4956
  if (this.state.hasFlowComment)
4927
- throw this.raise(w.NestedFlowComment, this.state.startLoc);
4957
+ throw this.raise(T.NestedFlowComment, this.state.startLoc);
4928
4958
  this.hasFlowCommentCompletion();
4929
4959
  const e = this.skipFlowComment();
4930
4960
  e && (this.state.pos += e, this.state.hasFlowComment = !0);
@@ -4950,19 +4980,19 @@ var Da = (r) => class extends r {
4950
4980
  enumName: i,
4951
4981
  memberName: a
4952
4982
  }) {
4953
- this.raise(w.EnumBooleanMemberNotInitialized, e, {
4983
+ this.raise(T.EnumBooleanMemberNotInitialized, e, {
4954
4984
  memberName: a,
4955
4985
  enumName: i
4956
4986
  });
4957
4987
  }
4958
4988
  flowEnumErrorInvalidMemberInitializer(e, i) {
4959
- return this.raise(i.explicitType ? i.explicitType === "symbol" ? w.EnumInvalidMemberInitializerSymbolType : w.EnumInvalidMemberInitializerPrimaryType : w.EnumInvalidMemberInitializerUnknownType, e, i);
4989
+ return this.raise(i.explicitType ? i.explicitType === "symbol" ? T.EnumInvalidMemberInitializerSymbolType : T.EnumInvalidMemberInitializerPrimaryType : T.EnumInvalidMemberInitializerUnknownType, e, i);
4960
4990
  }
4961
4991
  flowEnumErrorNumberMemberNotInitialized(e, i) {
4962
- this.raise(w.EnumNumberMemberNotInitialized, e, i);
4992
+ this.raise(T.EnumNumberMemberNotInitialized, e, i);
4963
4993
  }
4964
4994
  flowEnumErrorStringMemberInconsistentlyInitialized(e, i) {
4965
- this.raise(w.EnumStringMemberInconsistentlyInitialized, e, i);
4995
+ this.raise(T.EnumStringMemberInconsistentlyInitialized, e, i);
4966
4996
  }
4967
4997
  flowEnumMemberInit() {
4968
4998
  const e = this.state.startLoc, i = () => this.match(12) || this.match(8);
@@ -5046,11 +5076,11 @@ var Da = (r) => class extends r {
5046
5076
  } = this.flowEnumMemberRaw(), p = h.name;
5047
5077
  if (p === "")
5048
5078
  continue;
5049
- /^[a-z]/.test(p) && this.raise(w.EnumInvalidMemberName, h, {
5079
+ /^[a-z]/.test(p) && this.raise(T.EnumInvalidMemberName, h, {
5050
5080
  memberName: p,
5051
5081
  suggestion: p[0].toUpperCase() + p.slice(1),
5052
5082
  enumName: e
5053
- }), a.has(p) && this.raise(w.EnumDuplicateMemberName, h, {
5083
+ }), a.has(p) && this.raise(T.EnumDuplicateMemberName, h, {
5054
5084
  memberName: p,
5055
5085
  enumName: e
5056
5086
  }), a.add(p);
@@ -5119,13 +5149,13 @@ var Da = (r) => class extends r {
5119
5149
  }) {
5120
5150
  if (!this.eatContextual(102)) return null;
5121
5151
  if (!N(this.state.type))
5122
- throw this.raise(w.EnumInvalidExplicitTypeUnknownSupplied, this.state.startLoc, {
5152
+ throw this.raise(T.EnumInvalidExplicitTypeUnknownSupplied, this.state.startLoc, {
5123
5153
  enumName: e
5124
5154
  });
5125
5155
  const {
5126
5156
  value: i
5127
5157
  } = this.state;
5128
- return this.next(), i !== "boolean" && i !== "number" && i !== "string" && i !== "symbol" && this.raise(w.EnumInvalidExplicitType, this.state.startLoc, {
5158
+ return this.next(), i !== "boolean" && i !== "number" && i !== "string" && i !== "symbol" && this.raise(T.EnumInvalidExplicitType, this.state.startLoc, {
5129
5159
  enumName: e,
5130
5160
  invalidEnumType: i
5131
5161
  }), i;
@@ -5178,7 +5208,7 @@ var Da = (r) => class extends r {
5178
5208
  });
5179
5209
  return e.members = c.numberMembers, this.expect(8), this.finishNode(e, "EnumNumberBody");
5180
5210
  } else
5181
- return this.raise(w.EnumInconsistentMemberValues, n, {
5211
+ return this.raise(T.EnumInconsistentMemberValues, n, {
5182
5212
  enumName: a
5183
5213
  }), l();
5184
5214
  }
@@ -5215,7 +5245,7 @@ var Da = (r) => class extends r {
5215
5245
  return e.type === "TypeCastExpression" ? e.expression : e;
5216
5246
  }
5217
5247
  };
5218
- const La = {
5248
+ const Oa = {
5219
5249
  __proto__: null,
5220
5250
  quot: '"',
5221
5251
  amp: "&",
@@ -5470,7 +5500,7 @@ const La = {
5470
5500
  clubs: "♣",
5471
5501
  hearts: "♥",
5472
5502
  diams: "♦"
5473
- }, Ma = /\r\n|[\r\n\u2028\u2029]/, Je = new RegExp(Ma.source, "g");
5503
+ }, La = /\r\n|[\r\n\u2028\u2029]/, Je = new RegExp(La.source, "g");
5474
5504
  function Ne(r) {
5475
5505
  switch (r) {
5476
5506
  case 10:
@@ -5482,14 +5512,14 @@ function Ne(r) {
5482
5512
  return !1;
5483
5513
  }
5484
5514
  }
5485
- function gs(r, t, s) {
5515
+ function bs(r, t, s) {
5486
5516
  for (let e = t; e < s; e++)
5487
5517
  if (Ne(r.charCodeAt(e)))
5488
5518
  return !0;
5489
5519
  return !1;
5490
5520
  }
5491
- const gt = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, wt = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;
5492
- function Fa(r) {
5521
+ const bt = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, Tt = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;
5522
+ function Ma(r) {
5493
5523
  switch (r) {
5494
5524
  case 9:
5495
5525
  case 11:
@@ -5544,7 +5574,7 @@ function Ee(r) {
5544
5574
  return Ee(r.object) + "." + Ee(r.property);
5545
5575
  throw new Error("Node had unexpected type: " + r.type);
5546
5576
  }
5547
- var Ba = (r) => class extends r {
5577
+ var Fa = (r) => class extends r {
5548
5578
  jsxReadToken() {
5549
5579
  let s = "", e = this.state.pos;
5550
5580
  for (; ; ) {
@@ -5606,7 +5636,7 @@ var Ba = (r) => class extends r {
5606
5636
  for (; e++ < 10 && this.state.pos < this.length && !(i = this.codePointAtPos(this.state.pos) === 59); )
5607
5637
  ++this.state.pos;
5608
5638
  if (i) {
5609
- const a = this.input.slice(s, this.state.pos), n = La[a];
5639
+ const a = this.input.slice(s, this.state.pos), n = Oa[a];
5610
5640
  if (++this.state.pos, n)
5611
5641
  return n;
5612
5642
  }
@@ -5646,7 +5676,7 @@ var Ba = (r) => class extends r {
5646
5676
  let s;
5647
5677
  switch (this.state.type) {
5648
5678
  case 5:
5649
- return s = this.startNode(), this.setContext(D.brace), this.next(), s = this.jsxParseExpressionContainer(s, D.j_oTag), s.expression.type === "JSXEmptyExpression" && this.raise(re.AttributeIsEmpty, s), s;
5679
+ return s = this.startNode(), this.setContext(O.brace), this.next(), s = this.jsxParseExpressionContainer(s, O.j_oTag), s.expression.type === "JSXEmptyExpression" && this.raise(re.AttributeIsEmpty, s), s;
5650
5680
  case 143:
5651
5681
  case 134:
5652
5682
  return this.parseExprAtom();
@@ -5659,7 +5689,7 @@ var Ba = (r) => class extends r {
5659
5689
  return this.finishNodeAt(s, "JSXEmptyExpression", this.state.startLoc);
5660
5690
  }
5661
5691
  jsxParseSpreadChild(s) {
5662
- return this.next(), s.expression = this.parseExpression(), this.setContext(D.j_expr), this.state.canStartJSXElement = !0, this.expect(8), this.finishNode(s, "JSXSpreadChild");
5692
+ return this.next(), s.expression = this.parseExpression(), this.setContext(O.j_expr), this.state.canStartJSXElement = !0, this.expect(8), this.finishNode(s, "JSXSpreadChild");
5663
5693
  }
5664
5694
  jsxParseExpressionContainer(s, e) {
5665
5695
  var i;
@@ -5673,7 +5703,7 @@ var Ba = (r) => class extends r {
5673
5703
  }
5674
5704
  jsxParseAttribute() {
5675
5705
  const s = this.startNode();
5676
- return this.match(5) ? (this.setContext(D.brace), this.next(), this.expect(21), s.argument = this.parseMaybeAssignAllowIn(), this.setContext(D.j_oTag), this.state.canStartJSXElement = !0, this.expect(8), this.finishNode(s, "JSXSpreadAttribute")) : (s.name = this.jsxParseNamespacedName(), s.value = this.eat(29) ? this.jsxParseAttributeValue() : null, this.finishNode(s, "JSXAttribute"));
5706
+ return this.match(5) ? (this.setContext(O.brace), this.next(), this.expect(21), s.argument = this.parseMaybeAssignAllowIn(), this.setContext(O.j_oTag), this.state.canStartJSXElement = !0, this.expect(8), this.finishNode(s, "JSXSpreadAttribute")) : (s.name = this.jsxParseNamespacedName(), s.value = this.eat(29) ? this.jsxParseAttributeValue() : null, this.finishNode(s, "JSXAttribute"));
5677
5707
  }
5678
5708
  jsxParseOpeningElementAt(s) {
5679
5709
  const e = this.startNodeAt(s);
@@ -5707,7 +5737,7 @@ var Ba = (r) => class extends r {
5707
5737
  break;
5708
5738
  case 5: {
5709
5739
  const o = this.startNode();
5710
- this.setContext(D.brace), this.next(), this.match(21) ? i.push(this.jsxParseSpreadChild(o)) : i.push(this.jsxParseExpressionContainer(o, D.j_expr));
5740
+ this.setContext(O.brace), this.next(), this.match(21) ? i.push(this.jsxParseSpreadChild(o)) : i.push(this.jsxParseExpressionContainer(o, O.j_expr));
5711
5741
  break;
5712
5742
  }
5713
5743
  default:
@@ -5741,11 +5771,11 @@ var Ba = (r) => class extends r {
5741
5771
  }
5742
5772
  getTokenFromCode(s) {
5743
5773
  const e = this.curContext();
5744
- if (e === D.j_expr) {
5774
+ if (e === O.j_expr) {
5745
5775
  this.jsxReadToken();
5746
5776
  return;
5747
5777
  }
5748
- if (e === D.j_oTag || e === D.j_cTag) {
5778
+ if (e === O.j_oTag || e === O.j_cTag) {
5749
5779
  if (ne(s)) {
5750
5780
  this.jsxReadWord();
5751
5781
  return;
@@ -5754,7 +5784,7 @@ var Ba = (r) => class extends r {
5754
5784
  ++this.state.pos, this.finishToken(144);
5755
5785
  return;
5756
5786
  }
5757
- if ((s === 34 || s === 39) && e === D.j_oTag) {
5787
+ if ((s === 34 || s === 39) && e === O.j_oTag) {
5758
5788
  this.jsxReadString(s);
5759
5789
  return;
5760
5790
  }
@@ -5771,17 +5801,17 @@ var Ba = (r) => class extends r {
5771
5801
  type: i
5772
5802
  } = this.state;
5773
5803
  if (i === 56 && s === 143)
5774
- e.splice(-2, 2, D.j_cTag), this.state.canStartJSXElement = !1;
5804
+ e.splice(-2, 2, O.j_cTag), this.state.canStartJSXElement = !1;
5775
5805
  else if (i === 143)
5776
- e.push(D.j_oTag);
5806
+ e.push(O.j_oTag);
5777
5807
  else if (i === 144) {
5778
5808
  const a = e[e.length - 1];
5779
- a === D.j_oTag && s === 56 || a === D.j_cTag ? (e.pop(), this.state.canStartJSXElement = e[e.length - 1] === D.j_expr) : (this.setContext(D.j_expr), this.state.canStartJSXElement = !0);
5809
+ a === O.j_oTag && s === 56 || a === O.j_cTag ? (e.pop(), this.state.canStartJSXElement = e[e.length - 1] === O.j_expr) : (this.setContext(O.j_expr), this.state.canStartJSXElement = !0);
5780
5810
  } else
5781
- this.state.canStartJSXElement = na(i);
5811
+ this.state.canStartJSXElement = aa(i);
5782
5812
  }
5783
5813
  };
5784
- class _a extends Zt {
5814
+ class Ba extends Zt {
5785
5815
  constructor() {
5786
5816
  super(...arguments);
5787
5817
  m(this, "tsNames", /* @__PURE__ */ new Map());
@@ -5793,7 +5823,7 @@ class Ra extends es {
5793
5823
  m(this, "importsStack", []);
5794
5824
  }
5795
5825
  createScope(s) {
5796
- return this.importsStack.push(/* @__PURE__ */ new Set()), new _a(s);
5826
+ return this.importsStack.push(/* @__PURE__ */ new Set()), new Ba(s);
5797
5827
  }
5798
5828
  enter(s) {
5799
5829
  s === 512 && this.importsStack.push(/* @__PURE__ */ new Set()), super.enter(s);
@@ -5881,7 +5911,7 @@ class ja {
5881
5911
  function et(r, t) {
5882
5912
  return (r ? 2 : 0) | (t ? 1 : 0);
5883
5913
  }
5884
- class Ua {
5914
+ class _a {
5885
5915
  constructor() {
5886
5916
  m(this, "sawUnambiguousESM", !1);
5887
5917
  m(this, "ambiguousScriptDifferentAst", !1);
@@ -5914,19 +5944,19 @@ class Ua {
5914
5944
  function si(r, t) {
5915
5945
  r.trailingComments === void 0 ? r.trailingComments = t : r.trailingComments.unshift(...t);
5916
5946
  }
5917
- function $a(r, t) {
5947
+ function Ua(r, t) {
5918
5948
  r.leadingComments === void 0 ? r.leadingComments = t : r.leadingComments.unshift(...t);
5919
5949
  }
5920
5950
  function ke(r, t) {
5921
5951
  r.innerComments === void 0 ? r.innerComments = t : r.innerComments.unshift(...t);
5922
5952
  }
5923
- function ge(r, t, s) {
5953
+ function be(r, t, s) {
5924
5954
  let e = null, i = t.length;
5925
5955
  for (; e === null && i > 0; )
5926
5956
  e = t[--i];
5927
5957
  e === null || e.start > s.start ? ke(r, s.comments) : si(e, s.comments);
5928
5958
  }
5929
- class qa extends Ua {
5959
+ class $a extends _a {
5930
5960
  addComment(t) {
5931
5961
  this.filename && (t.loc.filename = this.filename);
5932
5962
  const {
@@ -5960,7 +5990,7 @@ class qa extends Ua {
5960
5990
  comments: s
5961
5991
  } = t;
5962
5992
  if (t.leadingNode !== null || t.trailingNode !== null)
5963
- t.leadingNode !== null && si(t.leadingNode, s), t.trailingNode !== null && $a(t.trailingNode, s);
5993
+ t.leadingNode !== null && si(t.leadingNode, s), t.trailingNode !== null && Ua(t.trailingNode, s);
5964
5994
  else {
5965
5995
  const {
5966
5996
  containingNode: e,
@@ -5971,14 +6001,14 @@ class qa extends Ua {
5971
6001
  case "ObjectExpression":
5972
6002
  case "ObjectPattern":
5973
6003
  case "RecordExpression":
5974
- ge(e, e.properties, t);
6004
+ be(e, e.properties, t);
5975
6005
  break;
5976
6006
  case "CallExpression":
5977
6007
  case "OptionalCallExpression":
5978
- ge(e, e.arguments, t);
6008
+ be(e, e.arguments, t);
5979
6009
  break;
5980
6010
  case "ImportExpression":
5981
- ge(e, [e.source, e.options ?? null], t);
6011
+ be(e, [e.source, e.options ?? null], t);
5982
6012
  break;
5983
6013
  case "FunctionDeclaration":
5984
6014
  case "FunctionExpression":
@@ -5986,22 +6016,22 @@ class qa extends Ua {
5986
6016
  case "ObjectMethod":
5987
6017
  case "ClassMethod":
5988
6018
  case "ClassPrivateMethod":
5989
- ge(e, e.params, t);
6019
+ be(e, e.params, t);
5990
6020
  break;
5991
6021
  case "ArrayExpression":
5992
6022
  case "ArrayPattern":
5993
6023
  case "TupleExpression":
5994
- ge(e, e.elements, t);
6024
+ be(e, e.elements, t);
5995
6025
  break;
5996
6026
  case "ExportNamedDeclaration":
5997
6027
  case "ImportDeclaration":
5998
- ge(e, e.specifiers, t);
6028
+ be(e, e.specifiers, t);
5999
6029
  break;
6000
6030
  case "TSEnumDeclaration":
6001
6031
  ke(e, s);
6002
6032
  break;
6003
6033
  case "TSEnumBody":
6004
- ge(e, e.members, t);
6034
+ be(e, e.members, t);
6005
6035
  break;
6006
6036
  default:
6007
6037
  ke(e, s);
@@ -6071,7 +6101,7 @@ class ts {
6071
6101
  m(this, "end", 0);
6072
6102
  m(this, "lastTokEndLoc", null);
6073
6103
  m(this, "lastTokStartLoc", null);
6074
- m(this, "context", [D.brace]);
6104
+ m(this, "context", [O.brace]);
6075
6105
  m(this, "firstInvalidTemplateEscapePos", null);
6076
6106
  m(this, "strictErrors", /* @__PURE__ */ new Map());
6077
6107
  m(this, "tokensLength", 0);
@@ -6171,10 +6201,10 @@ class ts {
6171
6201
  return t.flags = this.flags, t.startIndex = this.startIndex, t.curLine = this.curLine, t.lineStart = this.lineStart, t.startLoc = this.startLoc, t.endLoc = this.endLoc, t.errors = this.errors.slice(), t.potentialArrowAt = this.potentialArrowAt, t.noArrowAt = this.noArrowAt.slice(), t.noArrowParamsConversionAt = this.noArrowParamsConversionAt.slice(), t.topicContext = this.topicContext, t.labels = this.labels.slice(), t.commentsLen = this.commentsLen, t.commentStack = this.commentStack.slice(), t.pos = this.pos, t.type = this.type, t.value = this.value, t.start = this.start, t.end = this.end, t.lastTokEndLoc = this.lastTokEndLoc, t.lastTokStartLoc = this.lastTokStartLoc, t.context = this.context.slice(), t.firstInvalidTemplateEscapePos = this.firstInvalidTemplateEscapePos, t.strictErrors = this.strictErrors, t.tokensLength = this.tokensLength, t;
6172
6202
  }
6173
6203
  }
6174
- var za = function(t) {
6204
+ var qa = function(t) {
6175
6205
  return t >= 48 && t <= 57;
6176
6206
  };
6177
- const ws = {
6207
+ const Ts = {
6178
6208
  decBinOct: /* @__PURE__ */ new Set([46, 66, 69, 79, 95, 98, 101, 111]),
6179
6209
  hex: /* @__PURE__ */ new Set([46, 88, 95, 120])
6180
6210
  }, We = {
@@ -6183,7 +6213,7 @@ const ws = {
6183
6213
  dec: (r) => r >= 48 && r <= 57,
6184
6214
  hex: (r) => r >= 48 && r <= 57 || r >= 65 && r <= 70 || r >= 97 && r <= 102
6185
6215
  };
6186
- function Ts(r, t, s, e, i, a) {
6216
+ function ws(r, t, s, e, i, a) {
6187
6217
  const n = s, o = e, c = i;
6188
6218
  let h = "", l = null, p = s;
6189
6219
  const {
@@ -6195,13 +6225,13 @@ function Ts(r, t, s, e, i, a) {
6195
6225
  break;
6196
6226
  }
6197
6227
  const f = t.charCodeAt(s);
6198
- if (Va(r, f, t, s)) {
6228
+ if (za(r, f, t, s)) {
6199
6229
  h += t.slice(p, s);
6200
6230
  break;
6201
6231
  }
6202
6232
  if (f === 92) {
6203
6233
  h += t.slice(p, s);
6204
- const x = Ha(t, s, e, i, r === "template", a);
6234
+ const x = Va(t, s, e, i, r === "template", a);
6205
6235
  x.ch === null && !l ? l = {
6206
6236
  pos: s,
6207
6237
  lineStart: e,
@@ -6222,10 +6252,10 @@ function Ts(r, t, s, e, i, a) {
6222
6252
  curLine: i
6223
6253
  };
6224
6254
  }
6225
- function Va(r, t, s, e) {
6255
+ function za(r, t, s, e) {
6226
6256
  return r === "template" ? t === 96 || t === 36 && s.charCodeAt(e + 1) === 123 : t === (r === "double" ? 34 : 39);
6227
6257
  }
6228
- function Ha(r, t, s, e, i, a) {
6258
+ function Va(r, t, s, e, i, a) {
6229
6259
  const n = !i;
6230
6260
  t++;
6231
6261
  const o = (h) => ({
@@ -6302,7 +6332,7 @@ function Lt(r, t, s, e, i, a, n, o) {
6302
6332
  };
6303
6333
  }
6304
6334
  function ii(r, t, s, e, i, a, n, o, c, h) {
6305
- const l = t, p = i === 16 ? ws.hex : ws.decBinOct, d = i === 16 ? We.hex : i === 10 ? We.dec : i === 8 ? We.oct : We.bin;
6335
+ const l = t, p = i === 16 ? Ts.hex : Ts.decBinOct, d = i === 16 ? We.hex : i === 10 ? We.dec : i === 8 ? We.oct : We.bin;
6306
6336
  let f = !1, x = 0;
6307
6337
  for (let A = 0, F = a ?? 1 / 0; A < F; ++A) {
6308
6338
  const E = r.charCodeAt(t);
@@ -6327,7 +6357,7 @@ function ii(r, t, s, e, i, a, n, o, c, h) {
6327
6357
  ++t;
6328
6358
  continue;
6329
6359
  }
6330
- if (E >= 97 ? k = E - 97 + 10 : E >= 65 ? k = E - 65 + 10 : za(E) ? k = E - 48 : k = 1 / 0, k >= i) {
6360
+ if (E >= 97 ? k = E - 97 + 10 : E >= 65 ? k = E - 65 + 10 : qa(E) ? k = E - 48 : k = 1 / 0, k >= i) {
6331
6361
  if (k <= 9 && h)
6332
6362
  return {
6333
6363
  n: null,
@@ -6378,14 +6408,14 @@ function ri(r, t, s, e, i, a) {
6378
6408
  function Me(r, t, s) {
6379
6409
  return new fe(s, r - t, r);
6380
6410
  }
6381
- const Ka = /* @__PURE__ */ new Set([103, 109, 115, 105, 121, 117, 100, 118]);
6382
- class Ja {
6411
+ const Ha = /* @__PURE__ */ new Set([103, 109, 115, 105, 121, 117, 100, 118]);
6412
+ class Ka {
6383
6413
  constructor(t) {
6384
6414
  const s = t.startIndex || 0;
6385
6415
  this.type = t.type, this.value = t.value, this.start = s + t.start, this.end = s + t.end, this.loc = new ot(t.startLoc, t.endLoc);
6386
6416
  }
6387
6417
  }
6388
- class Wa extends qa {
6418
+ class Ja extends $a {
6389
6419
  constructor(s, e) {
6390
6420
  super();
6391
6421
  m(this, "isLookahead");
@@ -6421,7 +6451,7 @@ class Wa extends qa {
6421
6451
  this.tokens.length = this.state.tokensLength, this.tokens.push(s), ++this.state.tokensLength;
6422
6452
  }
6423
6453
  next() {
6424
- this.checkKeywordEscapes(), this.optionFlags & 256 && this.pushToken(new Ja(this.state)), this.state.lastTokEndLoc = this.state.endLoc, this.state.lastTokStartLoc = this.state.startLoc, this.nextToken();
6454
+ this.checkKeywordEscapes(), this.optionFlags & 256 && this.pushToken(new Ka(this.state)), this.state.lastTokEndLoc = this.state.endLoc, this.state.lastTokStartLoc = this.state.startLoc, this.nextToken();
6425
6455
  }
6426
6456
  eat(s) {
6427
6457
  return this.match(s) ? (this.next(), !0) : !1;
@@ -6455,7 +6485,7 @@ class Wa extends qa {
6455
6485
  return this.nextTokenStartSince(this.state.pos);
6456
6486
  }
6457
6487
  nextTokenStartSince(s) {
6458
- return gt.lastIndex = s, gt.test(this.input) ? gt.lastIndex : s;
6488
+ return bt.lastIndex = s, bt.test(this.input) ? bt.lastIndex : s;
6459
6489
  }
6460
6490
  lookaheadCharCode() {
6461
6491
  return this.lookaheadCharCodeSince(this.state.pos);
@@ -6467,7 +6497,7 @@ class Wa extends qa {
6467
6497
  return this.nextTokenInLineStartSince(this.state.pos);
6468
6498
  }
6469
6499
  nextTokenInLineStartSince(s) {
6470
- return wt.lastIndex = s, wt.test(this.input) ? wt.lastIndex : s;
6500
+ return Tt.lastIndex = s, Tt.test(this.input) ? Tt.lastIndex : s;
6471
6501
  }
6472
6502
  lookaheadInLineCharCode() {
6473
6503
  return this.input.charCodeAt(this.nextTokenInLineStart());
@@ -6563,7 +6593,7 @@ class Wa extends qa {
6563
6593
  }
6564
6594
  break;
6565
6595
  default:
6566
- if (Fa(i))
6596
+ if (Ma(i))
6567
6597
  ++this.state.pos;
6568
6598
  else if (i === 45 && !this.inModule && this.optionFlags & 8192) {
6569
6599
  const a = this.state.pos;
@@ -6877,7 +6907,7 @@ class Wa extends qa {
6877
6907
  const h = () => G(s, n + 2 - e);
6878
6908
  for (; n < this.length; ) {
6879
6909
  const l = this.codePointAtPos(n), p = String.fromCharCode(l);
6880
- if (Ka.has(l))
6910
+ if (Ha.has(l))
6881
6911
  l === 118 ? c.includes("u") && this.raise(u.IncompatibleRegExpUVFlags, h()) : l === 117 && c.includes("v") && this.raise(u.IncompatibleRegExpUVFlags, h()), c.includes(p) && this.raise(u.DuplicateRegExpFlags, h());
6882
6912
  else if (Ce(l) || l === 92)
6883
6913
  this.raise(u.MalformedRegExpFlags, h());
@@ -6956,7 +6986,7 @@ class Wa extends qa {
6956
6986
  pos: i,
6957
6987
  curLine: a,
6958
6988
  lineStart: n
6959
- } = Ts(s === 34 ? "double" : "single", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_string);
6989
+ } = ws(s === 34 ? "double" : "single", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_string);
6960
6990
  this.state.pos = i + 1, this.state.lineStart = n, this.state.curLine = a, this.finishToken(134, e);
6961
6991
  }
6962
6992
  readTemplateContinuation() {
@@ -6969,7 +6999,7 @@ class Wa extends qa {
6969
6999
  pos: a,
6970
7000
  curLine: n,
6971
7001
  lineStart: o
6972
- } = Ts("template", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_template);
7002
+ } = ws("template", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_template);
6973
7003
  this.state.pos = a + 1, this.state.lineStart = o, this.state.curLine = n, i && (this.state.firstInvalidTemplateEscapePos = new fe(i.curLine, i.pos - i.lineStart, this.sourceToOffsetPos(i.pos))), this.input.codePointAt(a) === 96 ? this.finishToken(24, i ? null : s + e + "`") : (this.state.pos++, this.finishToken(25, i ? null : s + e + "${"));
6974
7004
  }
6975
7005
  recordStrictModeErrors(s, e) {
@@ -7053,14 +7083,14 @@ class Wa extends qa {
7053
7083
  };
7054
7084
  }
7055
7085
  }
7056
- class Xa {
7086
+ class Wa {
7057
7087
  constructor() {
7058
7088
  m(this, "privateNames", /* @__PURE__ */ new Set());
7059
7089
  m(this, "loneAccessors", /* @__PURE__ */ new Map());
7060
7090
  m(this, "undefinedPrivateNames", /* @__PURE__ */ new Map());
7061
7091
  }
7062
7092
  }
7063
- class Ga {
7093
+ class Xa {
7064
7094
  constructor(t) {
7065
7095
  m(this, "parser");
7066
7096
  m(this, "stack", []);
@@ -7071,7 +7101,7 @@ class Ga {
7071
7101
  return this.stack[this.stack.length - 1];
7072
7102
  }
7073
7103
  enter() {
7074
- this.stack.push(new Xa());
7104
+ this.stack.push(new Wa());
7075
7105
  }
7076
7106
  exit() {
7077
7107
  const t = this.stack.pop(), s = this.current();
@@ -7134,7 +7164,7 @@ class ai extends dt {
7134
7164
  this.declarationErrors.forEach(s);
7135
7165
  }
7136
7166
  }
7137
- class Ya {
7167
+ class Ga {
7138
7168
  constructor(t) {
7139
7169
  m(this, "parser");
7140
7170
  m(this, "stack", [new dt()]);
@@ -7191,19 +7221,19 @@ class Ya {
7191
7221
  });
7192
7222
  }
7193
7223
  }
7194
- function Qa() {
7224
+ function Ya() {
7195
7225
  return new dt(3);
7196
7226
  }
7197
- function Za() {
7227
+ function Qa() {
7198
7228
  return new ai(1);
7199
7229
  }
7200
- function en() {
7230
+ function Za() {
7201
7231
  return new ai(2);
7202
7232
  }
7203
7233
  function ni() {
7204
7234
  return new dt();
7205
7235
  }
7206
- class tn extends Wa {
7236
+ class en extends Ja {
7207
7237
  addExtra(t, s, e, i = !0) {
7208
7238
  if (!t) return;
7209
7239
  let {
@@ -7243,10 +7273,10 @@ class tn extends Wa {
7243
7273
  return this.match(140) || this.match(8) || this.hasPrecedingLineBreak();
7244
7274
  }
7245
7275
  hasPrecedingLineBreak() {
7246
- return gs(this.input, this.offsetToSourcePos(this.state.lastTokEndLoc.index), this.state.start);
7276
+ return bs(this.input, this.offsetToSourcePos(this.state.lastTokEndLoc.index), this.state.start);
7247
7277
  }
7248
7278
  hasFollowingLineBreak() {
7249
- return gs(this.input, this.state.end, this.nextTokenStart());
7279
+ return bs(this.input, this.state.end, this.nextTokenStart());
7250
7280
  }
7251
7281
  isLineTerminator() {
7252
7282
  return this.eat(13) || this.canInsertSemicolon();
@@ -7345,9 +7375,9 @@ class tn extends Wa {
7345
7375
  const o = this.prodParam;
7346
7376
  this.prodParam = new ja();
7347
7377
  const c = this.classScope;
7348
- this.classScope = new Ga(this);
7378
+ this.classScope = new Xa(this);
7349
7379
  const h = this.expressionScope;
7350
- return this.expressionScope = new Ya(this), () => {
7380
+ return this.expressionScope = new Ga(this), () => {
7351
7381
  this.state.labels = s, this.exportedIdentifiers = e, this.inModule = i, this.scope = a, this.prodParam = o, this.classScope = c, this.expressionScope = h;
7352
7382
  };
7353
7383
  }
@@ -7377,7 +7407,7 @@ class Mt {
7377
7407
  }
7378
7408
  }
7379
7409
  const As = Mt.prototype;
7380
- class sn extends tn {
7410
+ class tn extends en {
7381
7411
  startNode() {
7382
7412
  const t = this.state.startLoc;
7383
7413
  return new Mt(this, t.index, t);
@@ -7430,7 +7460,7 @@ class sn extends tn {
7430
7460
  }
7431
7461
  }
7432
7462
  const oi = (r) => r.type === "ParenthesizedExpression" ? oi(r.expression) : r;
7433
- class rn extends sn {
7463
+ class sn extends tn {
7434
7464
  toAssignable(t, s = !1) {
7435
7465
  var i, a, n;
7436
7466
  let e;
@@ -7688,7 +7718,7 @@ class rn extends sn {
7688
7718
  return this.match(12) ? (this.raise(this.lookaheadCharCode() === t ? u.RestTrailingComma : u.ElementAfterRest, this.state.startLoc), !0) : !1;
7689
7719
  }
7690
7720
  }
7691
- function an(r) {
7721
+ function rn(r) {
7692
7722
  if (r == null)
7693
7723
  throw new Error(`Unexpected ${r} value.`);
7694
7724
  return r;
@@ -7697,7 +7727,7 @@ function Ss(r) {
7697
7727
  if (!r)
7698
7728
  throw new Error("Assert fail");
7699
7729
  }
7700
- const b = te`typescript`({
7730
+ const g = te`typescript`({
7701
7731
  AbstractMethodHasImplementation: ({
7702
7732
  methodName: r
7703
7733
  }) => `Method '${r}' cannot have an implementation because it is marked abstract.`,
@@ -7793,7 +7823,7 @@ const b = te`typescript`({
7793
7823
  type: r
7794
7824
  }) => `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${r}.`
7795
7825
  });
7796
- function nn(r) {
7826
+ function an(r) {
7797
7827
  switch (r) {
7798
7828
  case "any":
7799
7829
  return "TSAnyKeyword";
@@ -7822,7 +7852,7 @@ function nn(r) {
7822
7852
  function Is(r) {
7823
7853
  return r === "private" || r === "public" || r === "protected";
7824
7854
  }
7825
- function on(r) {
7855
+ function nn(r) {
7826
7856
  return r === "in" || r === "out";
7827
7857
  }
7828
7858
  function Ft(r) {
@@ -7840,23 +7870,23 @@ function Ft(r) {
7840
7870
  return !1;
7841
7871
  }
7842
7872
  }
7843
- var cn = (r) => class extends r {
7873
+ var on = (r) => class extends r {
7844
7874
  constructor() {
7845
7875
  super(...arguments);
7846
7876
  m(this, "tsParseInOutModifiers", this.tsParseModifiers.bind(this, {
7847
7877
  allowedModifiers: ["in", "out"],
7848
7878
  disallowedModifiers: ["const", "public", "private", "protected", "readonly", "declare", "abstract", "override"],
7849
- errorTemplate: b.InvalidModifierOnTypeParameter
7879
+ errorTemplate: g.InvalidModifierOnTypeParameter
7850
7880
  }));
7851
7881
  m(this, "tsParseConstModifier", this.tsParseModifiers.bind(this, {
7852
7882
  allowedModifiers: ["const"],
7853
7883
  disallowedModifiers: ["in", "out"],
7854
- errorTemplate: b.InvalidModifierOnTypeParameterPositions
7884
+ errorTemplate: g.InvalidModifierOnTypeParameterPositions
7855
7885
  }));
7856
7886
  m(this, "tsParseInOutConstModifiers", this.tsParseModifiers.bind(this, {
7857
7887
  allowedModifiers: ["in", "out", "const"],
7858
7888
  disallowedModifiers: ["public", "private", "protected", "readonly", "declare", "abstract", "override"],
7859
- errorTemplate: b.InvalidModifierOnTypeParameter
7889
+ errorTemplate: g.InvalidModifierOnTypeParameter
7860
7890
  }));
7861
7891
  }
7862
7892
  getScopeHandler() {
@@ -7889,14 +7919,14 @@ var cn = (r) => class extends r {
7889
7919
  allowedModifiers: e,
7890
7920
  disallowedModifiers: i,
7891
7921
  stopOnStartOfClassStaticBlock: a,
7892
- errorTemplate: n = b.InvalidModifierOnTypeMember
7922
+ errorTemplate: n = g.InvalidModifierOnTypeMember
7893
7923
  }, o) {
7894
7924
  const c = (l, p, d, f) => {
7895
- p === d && o[f] && this.raise(b.InvalidModifiersOrder, l, {
7925
+ p === d && o[f] && this.raise(g.InvalidModifiersOrder, l, {
7896
7926
  orderedModifiers: [d, f]
7897
7927
  });
7898
7928
  }, h = (l, p, d, f) => {
7899
- (o[d] && p === f || o[f] && p === d) && this.raise(b.IncompatibleModifiers, l, {
7929
+ (o[d] && p === f || o[f] && p === d) && this.raise(g.IncompatibleModifiers, l, {
7900
7930
  modifiers: [d, f]
7901
7931
  });
7902
7932
  };
@@ -7905,11 +7935,11 @@ var cn = (r) => class extends r {
7905
7935
  startLoc: l
7906
7936
  } = this.state, p = this.tsParseModifier(e.concat(i ?? []), a, o.static);
7907
7937
  if (!p) break;
7908
- Is(p) ? o.accessibility ? this.raise(b.DuplicateAccessibilityModifier, l, {
7938
+ Is(p) ? o.accessibility ? this.raise(g.DuplicateAccessibilityModifier, l, {
7909
7939
  modifier: p
7910
- }) : (c(l, p, p, "override"), c(l, p, p, "static"), c(l, p, p, "readonly"), o.accessibility = p) : on(p) ? (o[p] && this.raise(b.DuplicateModifier, l, {
7940
+ }) : (c(l, p, p, "override"), c(l, p, p, "static"), c(l, p, p, "readonly"), o.accessibility = p) : nn(p) ? (o[p] && this.raise(g.DuplicateModifier, l, {
7911
7941
  modifier: p
7912
- }), o[p] = !0, c(l, p, "in", "out")) : (Object.hasOwn(o, p) ? this.raise(b.DuplicateModifier, l, {
7942
+ }), o[p] = !0, c(l, p, "in", "out")) : (Object.hasOwn(o, p) ? this.raise(g.DuplicateModifier, l, {
7913
7943
  modifier: p
7914
7944
  }) : (c(l, p, "static", "readonly"), c(l, p, "static", "override"), c(l, p, "override", "readonly"), c(l, p, "abstract", "override"), h(l, p, "declare", "override"), h(l, p, "static", "abstract")), o[p] = !0), i != null && i.includes(p) && this.raise(n, l, {
7915
7945
  modifier: p
@@ -7936,7 +7966,7 @@ var cn = (r) => class extends r {
7936
7966
  return a;
7937
7967
  }
7938
7968
  tsParseDelimitedList(e, i, a) {
7939
- return an(this.tsParseDelimitedListWorker(e, i, !0, a));
7969
+ return rn(this.tsParseDelimitedListWorker(e, i, !0, a));
7940
7970
  }
7941
7971
  tsParseDelimitedListWorker(e, i, a, n) {
7942
7972
  const o = [];
@@ -7964,7 +7994,7 @@ var cn = (r) => class extends r {
7964
7994
  }
7965
7995
  tsParseImportType() {
7966
7996
  const e = this.startNode();
7967
- return this.expect(83), this.expect(10), this.match(134) ? e.argument = this.tsParseLiteralTypeNode() : (this.raise(b.UnsupportedImportTypeArgument, this.state.startLoc), e.argument = this.tsParseNonConditionalType()), this.eat(12) ? e.options = this.tsParseImportTypeOptions() : e.options = null, this.expect(11), this.eat(16) && (e.qualifier = this.tsParseEntityName(3)), this.match(47) && (e.typeArguments = this.tsParseTypeArguments()), this.finishNode(e, "TSImportType");
7997
+ return this.expect(83), this.expect(10), this.match(134) ? e.argument = this.tsParseLiteralTypeNode() : (this.raise(g.UnsupportedImportTypeArgument, this.state.startLoc), e.argument = this.tsParseNonConditionalType()), this.eat(12) ? e.options = this.tsParseImportTypeOptions() : e.options = null, this.expect(11), this.eat(16) && (e.qualifier = this.tsParseEntityName(3)), this.match(47) && (e.typeArguments = this.tsParseTypeArguments()), this.finishNode(e, "TSImportType");
7968
7998
  }
7969
7999
  tsParseImportTypeOptions() {
7970
8000
  const e = this.startNode();
@@ -8028,7 +8058,7 @@ var cn = (r) => class extends r {
8028
8058
  const a = {
8029
8059
  value: -1
8030
8060
  };
8031
- return i.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, e), !1, !0, a), i.params.length === 0 && this.raise(b.EmptyTypeParameters, i), a.value !== -1 && this.addExtra(i, "trailingComma", a.value), this.finishNode(i, "TSTypeParameterDeclaration");
8061
+ return i.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, e), !1, !0, a), i.params.length === 0 && this.raise(g.EmptyTypeParameters, i), a.value !== -1 && this.addExtra(i, "trailingComma", a.value), this.finishNode(i, "TSTypeParameterDeclaration");
8032
8062
  }
8033
8063
  tsFillSignature(e, i) {
8034
8064
  const a = e === 19, n = "params", o = "returnType";
@@ -8040,7 +8070,7 @@ var cn = (r) => class extends r {
8040
8070
  const {
8041
8071
  type: a
8042
8072
  } = i;
8043
- (a === "AssignmentPattern" || a === "TSParameterProperty") && this.raise(b.UnsupportedSignatureParameterKind, i, {
8073
+ (a === "AssignmentPattern" || a === "TSParameterProperty") && this.raise(g.UnsupportedSignatureParameterKind, i, {
8044
8074
  type: a
8045
8075
  });
8046
8076
  }
@@ -8066,20 +8096,20 @@ var cn = (r) => class extends r {
8066
8096
  }
8067
8097
  tsParsePropertyOrMethodSignature(e, i) {
8068
8098
  if (this.eat(17) && (e.optional = !0), this.match(10) || this.match(47)) {
8069
- i && this.raise(b.ReadonlyForMethodSignature, e);
8099
+ i && this.raise(g.ReadonlyForMethodSignature, e);
8070
8100
  const a = e;
8071
- a.kind && this.match(47) && this.raise(b.AccessorCannotHaveTypeParameters, this.state.curPosition()), this.tsFillSignature(14, a), this.tsParseTypeMemberSemicolon();
8101
+ a.kind && this.match(47) && this.raise(g.AccessorCannotHaveTypeParameters, this.state.curPosition()), this.tsFillSignature(14, a), this.tsParseTypeMemberSemicolon();
8072
8102
  const n = "params", o = "returnType";
8073
8103
  if (a.kind === "get")
8074
- a[n].length > 0 && (this.raise(u.BadGetterArity, this.state.curPosition()), this.isThisParam(a[n][0]) && this.raise(b.AccessorCannotDeclareThisParameter, this.state.curPosition()));
8104
+ a[n].length > 0 && (this.raise(u.BadGetterArity, this.state.curPosition()), this.isThisParam(a[n][0]) && this.raise(g.AccessorCannotDeclareThisParameter, this.state.curPosition()));
8075
8105
  else if (a.kind === "set") {
8076
8106
  if (a[n].length !== 1)
8077
8107
  this.raise(u.BadSetterArity, this.state.curPosition());
8078
8108
  else {
8079
8109
  const c = a[n][0];
8080
- this.isThisParam(c) && this.raise(b.AccessorCannotDeclareThisParameter, this.state.curPosition()), c.type === "Identifier" && c.optional && this.raise(b.SetAccessorCannotHaveOptionalParameter, this.state.curPosition()), c.type === "RestElement" && this.raise(b.SetAccessorCannotHaveRestParameter, this.state.curPosition());
8110
+ this.isThisParam(c) && this.raise(g.AccessorCannotDeclareThisParameter, this.state.curPosition()), c.type === "Identifier" && c.optional && this.raise(g.SetAccessorCannotHaveOptionalParameter, this.state.curPosition()), c.type === "RestElement" && this.raise(g.SetAccessorCannotHaveRestParameter, this.state.curPosition());
8081
8111
  }
8082
- a[o] && this.raise(b.SetAccessorCannotHaveReturnType, a[o]);
8112
+ a[o] && this.raise(g.SetAccessorCannotHaveReturnType, a[o]);
8083
8113
  } else
8084
8114
  a.kind = "method";
8085
8115
  return this.finishNode(a, "TSMethodSignature");
@@ -8129,7 +8159,7 @@ var cn = (r) => class extends r {
8129
8159
  const {
8130
8160
  type: n
8131
8161
  } = a;
8132
- i && n !== "TSRestType" && n !== "TSOptionalType" && !(n === "TSNamedTupleMember" && a.optional) && this.raise(b.OptionalTypeBeforeRequired, a), i || (i = n === "TSNamedTupleMember" && a.optional || n === "TSOptionalType");
8162
+ i && n !== "TSRestType" && n !== "TSOptionalType" && !(n === "TSNamedTupleMember" && a.optional) && this.raise(g.OptionalTypeBeforeRequired, a), i || (i = n === "TSNamedTupleMember" && a.optional || n === "TSOptionalType");
8133
8163
  }), this.finishNode(e, "TSTupleType");
8134
8164
  }
8135
8165
  tsParseTupleElementType() {
@@ -8148,7 +8178,7 @@ var cn = (r) => class extends r {
8148
8178
  h = this.tsParseType(), c = this.eat(17), n = this.eat(14);
8149
8179
  if (n) {
8150
8180
  let d;
8151
- o ? (d = this.startNodeAt(a), d.optional = c, d.label = o, d.elementType = h, this.eat(17) && (d.optional = !0, this.raise(b.TupleOptionalAfterType, this.state.lastTokStartLoc))) : (d = this.startNodeAt(a), d.optional = c, this.raise(b.InvalidTupleMemberLabel, h), d.label = h, d.elementType = this.tsParseType()), h = this.finishNode(d, "TSNamedTupleMember");
8181
+ o ? (d = this.startNodeAt(a), d.optional = c, d.label = o, d.elementType = h, this.eat(17) && (d.optional = !0, this.raise(g.TupleOptionalAfterType, this.state.lastTokStartLoc))) : (d = this.startNodeAt(a), d.optional = c, this.raise(g.InvalidTupleMemberLabel, h), d.label = h, d.elementType = this.tsParseType()), h = this.finishNode(d, "TSNamedTupleMember");
8152
8182
  } else if (c) {
8153
8183
  const d = this.startNodeAt(a);
8154
8184
  d.typeAnnotation = h, h = this.finishNode(d, "TSOptionalType");
@@ -8246,7 +8276,7 @@ var cn = (r) => class extends r {
8246
8276
  type: e
8247
8277
  } = this.state;
8248
8278
  if (N(e) || e === 88 || e === 84) {
8249
- const i = e === 88 ? "TSVoidKeyword" : e === 84 ? "TSNullKeyword" : nn(this.state.value);
8279
+ const i = e === 88 ? "TSVoidKeyword" : e === 84 ? "TSNullKeyword" : an(this.state.value);
8250
8280
  if (i !== void 0 && this.lookaheadCharCode() !== 46) {
8251
8281
  const a = this.startNode();
8252
8282
  return this.next(), this.finishNode(a, i);
@@ -8282,7 +8312,7 @@ var cn = (r) => class extends r {
8282
8312
  case "TSArrayType":
8283
8313
  return;
8284
8314
  default:
8285
- this.raise(b.UnexpectedReadonly, e);
8315
+ this.raise(g.UnexpectedReadonly, e);
8286
8316
  }
8287
8317
  }
8288
8318
  tsParseInferType() {
@@ -8299,7 +8329,7 @@ var cn = (r) => class extends r {
8299
8329
  }
8300
8330
  }
8301
8331
  tsParseTypeOperatorOrHigher() {
8302
- return pa(this.state.type) && !this.state.containsEsc ? this.tsParseTypeOperator() : this.isContextual(115) ? this.tsParseInferType() : this.tsInAllowConditionalTypesContext(() => this.tsParseArrayTypeOrHigher());
8332
+ return ua(this.state.type) && !this.state.containsEsc ? this.tsParseTypeOperator() : this.isContextual(115) ? this.tsParseInferType() : this.tsInAllowConditionalTypesContext(() => this.tsParseArrayTypeOrHigher());
8303
8333
  }
8304
8334
  tsParseUnionOrIntersectionType(e, i, a) {
8305
8335
  const n = this.startNode(), o = this.eat(a), c = [];
@@ -8406,7 +8436,7 @@ var cn = (r) => class extends r {
8406
8436
  return this.tsIsStartOfFunctionType() ? this.tsParseFunctionOrConstructorType("TSFunctionType") : this.match(77) ? this.tsParseFunctionOrConstructorType("TSConstructorType") : this.isAbstractConstructorSignature() ? this.tsParseFunctionOrConstructorType("TSConstructorType", !0) : this.tsParseUnionTypeOrHigher();
8407
8437
  }
8408
8438
  tsParseTypeAssertion() {
8409
- this.getPluginOption("typescript", "disallowAmbiguousJSXLike") && this.raise(b.ReservedTypeAssertion, this.state.startLoc);
8439
+ this.getPluginOption("typescript", "disallowAmbiguousJSXLike") && this.raise(g.ReservedTypeAssertion, this.state.startLoc);
8410
8440
  const e = this.startNode();
8411
8441
  return e.typeAnnotation = this.tsInType(() => (this.next(), this.match(75) ? this.tsParseTypeReference() : this.tsParseType())), this.expect(48), e.expression = this.parseMaybeUnary(), this.finishNode(e, "TSTypeAssertion");
8412
8442
  }
@@ -8414,7 +8444,7 @@ var cn = (r) => class extends r {
8414
8444
  const i = this.state.startLoc, a = this.tsParseDelimitedList("HeritageClauseElement", () => {
8415
8445
  {
8416
8446
  const n = super.parseExprSubscripts();
8417
- Ft(n) || this.raise(b.InvalidHeritageClauseType, n.loc.start, {
8447
+ Ft(n) || this.raise(g.InvalidHeritageClauseType, n.loc.start, {
8418
8448
  token: e
8419
8449
  });
8420
8450
  const o = e === "extends" ? "TSInterfaceHeritage" : "TSClassImplements";
@@ -8424,13 +8454,13 @@ var cn = (r) => class extends r {
8424
8454
  return c.expression = n, (this.match(47) || this.match(51)) && (c.typeArguments = this.tsParseTypeArgumentsInExpression()), this.finishNode(c, o);
8425
8455
  }
8426
8456
  });
8427
- return a.length || this.raise(b.EmptyHeritageClauseType, i, {
8457
+ return a.length || this.raise(g.EmptyHeritageClauseType, i, {
8428
8458
  token: e
8429
8459
  }), a;
8430
8460
  }
8431
8461
  tsParseInterfaceDeclaration(e, i = {}) {
8432
8462
  if (this.hasFollowingLineBreak()) return null;
8433
- this.expectContextual(129), i.declare && (e.declare = !0), N(this.state.type) ? (e.id = this.parseIdentifier(), this.checkIdentifier(e.id, 130)) : (e.id = null, this.raise(b.MissingInterfaceName, this.state.startLoc)), e.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers), this.eat(81) && (e.extends = this.tsParseHeritageClause("extends"));
8463
+ this.expectContextual(129), i.declare && (e.declare = !0), N(this.state.type) ? (e.id = this.parseIdentifier(), this.checkIdentifier(e.id, 130)) : (e.id = null, this.raise(g.MissingInterfaceName, this.state.startLoc)), e.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers), this.eat(81) && (e.extends = this.tsParseHeritageClause("extends"));
8434
8464
  const a = this.startNode();
8435
8465
  return a.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)), e.body = this.finishNode(a, "TSInterfaceBody"), this.finishNode(e, "TSInterfaceDeclaration");
8436
8466
  }
@@ -8444,7 +8474,7 @@ var cn = (r) => class extends r {
8444
8474
  }), this.semicolon(), this.finishNode(e, "TSTypeAliasDeclaration");
8445
8475
  }
8446
8476
  tsInTopLevelContext(e) {
8447
- if (this.curContext() !== D.brace) {
8477
+ if (this.curContext() !== O.brace) {
8448
8478
  const i = this.state.context;
8449
8479
  this.state.context = [i[0]];
8450
8480
  try {
@@ -8516,7 +8546,7 @@ var cn = (r) => class extends r {
8516
8546
  tsParseImportEqualsDeclaration(e, i, a) {
8517
8547
  e.id = i || this.parseIdentifier(), this.checkIdentifier(e.id, 4096), this.expect(29);
8518
8548
  const n = this.tsParseModuleReference();
8519
- return e.importKind === "type" && n.type !== "TSExternalModuleReference" && this.raise(b.ImportAliasHasImportType, n), e.moduleReference = n, this.semicolon(), this.finishNode(e, "TSImportEqualsDeclaration");
8549
+ return e.importKind === "type" && n.type !== "TSExternalModuleReference" && this.raise(g.ImportAliasHasImportType, n), e.moduleReference = n, this.semicolon(), this.finishNode(e, "TSImportEqualsDeclaration");
8520
8550
  }
8521
8551
  tsIsExternalModuleReference() {
8522
8552
  return this.isContextual(119) && this.lookaheadCharCode() === 40;
@@ -8641,10 +8671,10 @@ var cn = (r) => class extends r {
8641
8671
  }
8642
8672
  tsParseTypeArguments() {
8643
8673
  const e = this.startNode();
8644
- return e.params = this.tsInType(() => this.tsInTopLevelContext(() => (this.expect(47), this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this))))), e.params.length === 0 ? this.raise(b.EmptyTypeArguments, e) : !this.state.inType && this.curContext() === D.brace && this.reScan_lt_gt(), this.expect(48), this.finishNode(e, "TSTypeParameterInstantiation");
8674
+ return e.params = this.tsInType(() => this.tsInTopLevelContext(() => (this.expect(47), this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this))))), e.params.length === 0 ? this.raise(g.EmptyTypeArguments, e) : !this.state.inType && this.curContext() === O.brace && this.reScan_lt_gt(), this.expect(48), this.finishNode(e, "TSTypeParameterInstantiation");
8645
8675
  }
8646
8676
  tsIsDeclarationStart() {
8647
- return fa(this.state.type);
8677
+ return pa(this.state.type);
8648
8678
  }
8649
8679
  isExportDefaultSpecifier() {
8650
8680
  return this.tsIsDeclarationStart() ? !1 : super.isExportDefaultSpecifier();
@@ -8655,13 +8685,13 @@ var cn = (r) => class extends r {
8655
8685
  allowedModifiers: ["public", "private", "protected", "override", "readonly"]
8656
8686
  }, n);
8657
8687
  const o = n.accessibility, c = n.override, h = n.readonly;
8658
- !(e & 4) && (o || h || c) && this.raise(b.UnexpectedParameterModifier, a);
8688
+ !(e & 4) && (o || h || c) && this.raise(g.UnexpectedParameterModifier, a);
8659
8689
  const l = this.parseMaybeDefault();
8660
8690
  e & 2 && this.parseFunctionParamType(l);
8661
8691
  const p = this.parseMaybeDefault(l.loc.start, l);
8662
8692
  if (o || h || c) {
8663
8693
  const d = this.startNodeAt(a);
8664
- return i.length && (d.decorators = i), o && (d.accessibility = o), h && (d.readonly = h), c && (d.override = c), p.type !== "Identifier" && p.type !== "AssignmentPattern" && this.raise(b.UnsupportedParameterPropertyKind, d), d.parameter = p, this.finishNode(d, "TSParameterProperty");
8694
+ return i.length && (d.decorators = i), o && (d.accessibility = o), h && (d.readonly = h), c && (d.override = c), p.type !== "Identifier" && p.type !== "AssignmentPattern" && this.raise(g.UnsupportedParameterPropertyKind, d), d.parameter = p, this.finishNode(d, "TSParameterProperty");
8665
8695
  }
8666
8696
  return i.length && (l.decorators = i), p;
8667
8697
  }
@@ -8670,7 +8700,7 @@ var cn = (r) => class extends r {
8670
8700
  }
8671
8701
  tsDisallowOptionalPattern(e) {
8672
8702
  for (const i of e.params)
8673
- i.type !== "Identifier" && i.optional && !this.state.isAmbientContext && this.raise(b.PatternIsOptional, i);
8703
+ i.type !== "Identifier" && i.optional && !this.state.isAmbientContext && this.raise(g.PatternIsOptional, i);
8674
8704
  }
8675
8705
  setArrowFunctionParameters(e, i, a) {
8676
8706
  super.setArrowFunctionParameters(e, i, a), this.tsDisallowOptionalPattern(e);
@@ -8678,14 +8708,14 @@ var cn = (r) => class extends r {
8678
8708
  parseFunctionBodyAndFinish(e, i, a = !1) {
8679
8709
  this.match(14) && (e.returnType = this.tsParseTypeOrTypePredicateAnnotation(14));
8680
8710
  const n = i === "FunctionDeclaration" ? "TSDeclareFunction" : i === "ClassMethod" || i === "ClassPrivateMethod" ? "TSDeclareMethod" : void 0;
8681
- return n && !this.match(5) && this.isLineTerminator() ? this.finishNode(e, n) : n === "TSDeclareFunction" && this.state.isAmbientContext && (this.raise(b.DeclareFunctionHasImplementation, e), e.declare) ? super.parseFunctionBodyAndFinish(e, n, a) : (this.tsDisallowOptionalPattern(e), super.parseFunctionBodyAndFinish(e, i, a));
8711
+ return n && !this.match(5) && this.isLineTerminator() ? this.finishNode(e, n) : n === "TSDeclareFunction" && this.state.isAmbientContext && (this.raise(g.DeclareFunctionHasImplementation, e), e.declare) ? super.parseFunctionBodyAndFinish(e, n, a) : (this.tsDisallowOptionalPattern(e), super.parseFunctionBodyAndFinish(e, i, a));
8682
8712
  }
8683
8713
  registerFunctionStatementId(e) {
8684
8714
  !e.body && e.id ? this.checkIdentifier(e.id, 1024) : super.registerFunctionStatementId(e);
8685
8715
  }
8686
8716
  tsCheckForInvalidTypeCasts(e) {
8687
8717
  e.forEach((i) => {
8688
- (i == null ? void 0 : i.type) === "TSTypeCastExpression" && this.raise(b.UnexpectedTypeAnnotation, i.typeAnnotation);
8718
+ (i == null ? void 0 : i.type) === "TSTypeCastExpression" && this.raise(g.UnexpectedTypeAnnotation, i.typeAnnotation);
8689
8719
  });
8690
8720
  }
8691
8721
  toReferencedList(e, i) {
@@ -8721,7 +8751,7 @@ var cn = (r) => class extends r {
8721
8751
  c = this.state.curPosition();
8722
8752
  return;
8723
8753
  }
8724
- if (Ot(this.state.type)) {
8754
+ if (Dt(this.state.type)) {
8725
8755
  const f = super.parseTaggedTemplateExpression(e, i, n);
8726
8756
  return f.typeArguments = l, f;
8727
8757
  }
@@ -8736,7 +8766,7 @@ var cn = (r) => class extends r {
8736
8766
  return d.expression = e, d.typeArguments = l, this.finishNode(d, "TSInstantiationExpression");
8737
8767
  });
8738
8768
  if (c && this.unexpected(c, 10), h)
8739
- return h.type === "TSInstantiationExpression" && ((this.match(16) || this.match(18) && this.lookaheadCharCode() !== 40) && this.raise(b.InvalidPropertyAccessAfterInstantiationExpression, this.state.startLoc), !this.match(16) && !this.match(18) && (h.expression = super.stopParseSubscript(e, n))), h;
8769
+ return h.type === "TSInstantiationExpression" && ((this.match(16) || this.match(18) && this.lookaheadCharCode() !== 40) && this.raise(g.InvalidPropertyAccessAfterInstantiationExpression, this.state.startLoc), !this.match(16) && !this.match(18) && (h.expression = super.stopParseSubscript(e, n))), h;
8740
8770
  }
8741
8771
  return super.parseSubscript(e, i, a, n);
8742
8772
  }
@@ -8762,7 +8792,7 @@ var cn = (r) => class extends r {
8762
8792
  this.state.isAmbientContext || super.checkReservedWord(e, i, a, n);
8763
8793
  }
8764
8794
  checkImportReflection(e) {
8765
- super.checkImportReflection(e), e.module && e.importKind !== "value" && this.raise(b.ImportReflectionHasImportType, e.specifiers[0].loc.start);
8795
+ super.checkImportReflection(e), e.module && e.importKind !== "value" && this.raise(g.ImportReflectionHasImportType, e.specifiers[0].loc.start);
8766
8796
  }
8767
8797
  checkDuplicateExports() {
8768
8798
  }
@@ -8790,7 +8820,7 @@ var cn = (r) => class extends r {
8790
8820
  i = super.parseImportSpecifiersAndAfter(e, a);
8791
8821
  } else
8792
8822
  i = super.parseImport(e);
8793
- return i.importKind === "type" && i.specifiers.length > 1 && i.specifiers[0].type === "ImportDefaultSpecifier" && this.raise(b.TypeImportCannotSpecifyDefaultAndNamed, i), i;
8823
+ return i.importKind === "type" && i.specifiers.length > 1 && i.specifiers[0].type === "ImportDefaultSpecifier" && this.raise(g.TypeImportCannotSpecifyDefaultAndNamed, i), i;
8794
8824
  }
8795
8825
  parseExport(e, i) {
8796
8826
  if (this.match(83)) {
@@ -8832,7 +8862,7 @@ var cn = (r) => class extends r {
8832
8862
  id: c,
8833
8863
  init: h
8834
8864
  } of o.declarations)
8835
- h && (i === "var" || i === "let" || c.typeAnnotation ? this.raise(b.InitializerNotAllowedInAmbientContext, h) : ln(h, this.hasPlugin("estree")) || this.raise(b.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference, h));
8865
+ h && (i === "var" || i === "let" || c.typeAnnotation ? this.raise(g.InitializerNotAllowedInAmbientContext, h) : hn(h, this.hasPlugin("estree")) || this.raise(g.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference, h));
8836
8866
  return o;
8837
8867
  }
8838
8868
  parseStatementContent(e, i) {
@@ -8865,25 +8895,25 @@ var cn = (r) => class extends r {
8865
8895
  allowedModifiers: n,
8866
8896
  disallowedModifiers: ["in", "out"],
8867
8897
  stopOnStartOfClassStaticBlock: !0,
8868
- errorTemplate: b.InvalidModifierOnTypeParameterPositions
8898
+ errorTemplate: g.InvalidModifierOnTypeParameterPositions
8869
8899
  }, i);
8870
8900
  const o = () => {
8871
- this.tsIsStartOfStaticBlocks() ? (this.next(), this.next(), this.tsHasSomeModifiers(i, n) && this.raise(b.StaticBlockCannotHaveModifier, this.state.curPosition()), super.parseClassStaticBlock(e, i)) : this.parseClassMemberWithIsStatic(e, i, a, !!i.static);
8901
+ this.tsIsStartOfStaticBlocks() ? (this.next(), this.next(), this.tsHasSomeModifiers(i, n) && this.raise(g.StaticBlockCannotHaveModifier, this.state.curPosition()), super.parseClassStaticBlock(e, i)) : this.parseClassMemberWithIsStatic(e, i, a, !!i.static);
8872
8902
  };
8873
8903
  i.declare ? this.tsInAmbientContext(o) : o();
8874
8904
  }
8875
8905
  parseClassMemberWithIsStatic(e, i, a, n) {
8876
8906
  const o = this.tsTryParseIndexSignature(i);
8877
8907
  if (o) {
8878
- e.body.push(o), i.abstract && this.raise(b.IndexSignatureHasAbstract, i), i.accessibility && this.raise(b.IndexSignatureHasAccessibility, i, {
8908
+ e.body.push(o), i.abstract && this.raise(g.IndexSignatureHasAbstract, i), i.accessibility && this.raise(g.IndexSignatureHasAccessibility, i, {
8879
8909
  modifier: i.accessibility
8880
- }), i.declare && this.raise(b.IndexSignatureHasDeclare, i), i.override && this.raise(b.IndexSignatureHasOverride, i);
8910
+ }), i.declare && this.raise(g.IndexSignatureHasDeclare, i), i.override && this.raise(g.IndexSignatureHasOverride, i);
8881
8911
  return;
8882
8912
  }
8883
- !this.state.inAbstractClass && i.abstract && this.raise(b.NonAbstractClassHasAbstractMethod, i), i.override && (a.hadSuperClass || this.raise(b.OverrideNotInSubClass, i)), super.parseClassMemberWithIsStatic(e, i, a, n);
8913
+ !this.state.inAbstractClass && i.abstract && this.raise(g.NonAbstractClassHasAbstractMethod, i), i.override && (a.hadSuperClass || this.raise(g.OverrideNotInSubClass, i)), super.parseClassMemberWithIsStatic(e, i, a, n);
8884
8914
  }
8885
8915
  parsePostMemberNameModifiers(e) {
8886
- this.eat(17) && (e.optional = !0), e.readonly && this.match(10) && this.raise(b.ClassMethodHasReadonly, e), e.declare && this.match(10) && this.raise(b.ClassMethodHasDeclare, e);
8916
+ this.eat(17) && (e.optional = !0), e.readonly && this.match(10) && this.raise(g.ClassMethodHasReadonly, e), e.declare && this.match(10) && this.raise(g.ClassMethodHasDeclare, e);
8887
8917
  }
8888
8918
  parseExpressionStatement(e, i, a) {
8889
8919
  return (i.type === "Identifier" ? this.tsParseExpressionStatement(e, i, a) : void 0) || super.parseExpressionStatement(e, i, a);
@@ -8913,7 +8943,7 @@ var cn = (r) => class extends r {
8913
8943
  return this.tsInAmbientContext(() => this.parseExportDeclaration(e));
8914
8944
  const i = this.state.startLoc, a = this.eatContextual(125);
8915
8945
  if (a && (this.isContextual(125) || !this.shouldParseExportDeclaration()))
8916
- throw this.raise(b.ExpectedAmbientAfterExportDeclare, this.state.startLoc);
8946
+ throw this.raise(g.ExpectedAmbientAfterExportDeclare, this.state.startLoc);
8917
8947
  const o = N(this.state.type) && this.tsTryParseExportDeclaration() || super.parseExportDeclaration(e);
8918
8948
  return o ? ((o.type === "TSInterfaceDeclaration" || o.type === "TSTypeAliasDeclaration" || a) && (e.exportKind = "type"), a && o.type !== "TSImportEqualsDeclaration" && (this.resetStartLocation(o, i), o.declare = !0), o) : null;
8919
8949
  }
@@ -8930,32 +8960,32 @@ var cn = (r) => class extends r {
8930
8960
  i && (e.typeAnnotation = i);
8931
8961
  }
8932
8962
  parseClassProperty(e) {
8933
- if (this.parseClassPropertyAnnotation(e), this.state.isAmbientContext && !(e.readonly && !e.typeAnnotation) && this.match(29) && this.raise(b.DeclareClassFieldHasInitializer, this.state.startLoc), e.abstract && this.match(29)) {
8963
+ if (this.parseClassPropertyAnnotation(e), this.state.isAmbientContext && !(e.readonly && !e.typeAnnotation) && this.match(29) && this.raise(g.DeclareClassFieldHasInitializer, this.state.startLoc), e.abstract && this.match(29)) {
8934
8964
  const {
8935
8965
  key: i
8936
8966
  } = e;
8937
- this.raise(b.AbstractPropertyHasInitializer, this.state.startLoc, {
8967
+ this.raise(g.AbstractPropertyHasInitializer, this.state.startLoc, {
8938
8968
  propertyName: i.type === "Identifier" && !e.computed ? i.name : `[${this.input.slice(this.offsetToSourcePos(i.start), this.offsetToSourcePos(i.end))}]`
8939
8969
  });
8940
8970
  }
8941
8971
  return super.parseClassProperty(e);
8942
8972
  }
8943
8973
  parseClassPrivateProperty(e) {
8944
- return e.abstract && this.raise(b.PrivateElementHasAbstract, e), e.accessibility && this.raise(b.PrivateElementHasAccessibility, e, {
8974
+ return e.abstract && this.raise(g.PrivateElementHasAbstract, e), e.accessibility && this.raise(g.PrivateElementHasAccessibility, e, {
8945
8975
  modifier: e.accessibility
8946
8976
  }), this.parseClassPropertyAnnotation(e), super.parseClassPrivateProperty(e);
8947
8977
  }
8948
8978
  parseClassAccessorProperty(e) {
8949
- return this.parseClassPropertyAnnotation(e), e.optional && this.raise(b.AccessorCannotBeOptional, e), super.parseClassAccessorProperty(e);
8979
+ return this.parseClassPropertyAnnotation(e), e.optional && this.raise(g.AccessorCannotBeOptional, e), super.parseClassAccessorProperty(e);
8950
8980
  }
8951
8981
  pushClassMethod(e, i, a, n, o, c) {
8952
8982
  const h = this.tsTryParseTypeParameters(this.tsParseConstModifier);
8953
- h && o && this.raise(b.ConstructorHasTypeParameters, h);
8983
+ h && o && this.raise(g.ConstructorHasTypeParameters, h);
8954
8984
  const {
8955
8985
  declare: l = !1,
8956
8986
  kind: p
8957
8987
  } = i;
8958
- l && (p === "get" || p === "set") && this.raise(b.DeclareAccessor, i, {
8988
+ l && (p === "get" || p === "set") && this.raise(g.DeclareAccessor, i, {
8959
8989
  kind: p
8960
8990
  }), h && (i.typeParameters = h), super.pushClassMethod(e, i, a, n, o, c);
8961
8991
  }
@@ -8992,7 +9022,7 @@ var cn = (r) => class extends r {
8992
9022
  const {
8993
9023
  context: l
8994
9024
  } = this.state, p = l[l.length - 1];
8995
- (p === D.j_oTag || p === D.j_expr) && l.pop();
9025
+ (p === O.j_oTag || p === O.j_expr) && l.pop();
8996
9026
  }
8997
9027
  if (!(n != null && n.error) && !this.match(47))
8998
9028
  return super.parseMaybeAssign(e, i);
@@ -9004,7 +9034,7 @@ var cn = (r) => class extends r {
9004
9034
  const p = super.parseMaybeAssign(e, i);
9005
9035
  if ((p.type !== "ArrowFunctionExpression" || (d = p.extra) != null && d.parenthesized) && l(), (c == null ? void 0 : c.params.length) !== 0 && this.resetStartLocationFromNode(p, c), p.typeParameters = c, this.hasPlugin("jsx") && p.typeParameters.params.length === 1 && !((f = p.typeParameters.extra) != null && f.trailingComma)) {
9006
9036
  const x = p.typeParameters.params[0];
9007
- x.constraint || this.raise(b.SingleTypeParameterWithoutTrailingComma, G(x.loc.end, 1), {
9037
+ x.constraint || this.raise(g.SingleTypeParameterWithoutTrailingComma, G(x.loc.end, 1), {
9008
9038
  typeParameterName: x.name.name
9009
9039
  });
9010
9040
  }
@@ -9024,7 +9054,7 @@ var cn = (r) => class extends r {
9024
9054
  }
9025
9055
  reportReservedArrowTypeParam(e) {
9026
9056
  var i;
9027
- e.params.length === 1 && !e.params[0].constraint && !((i = e.extra) != null && i.trailingComma) && this.getPluginOption("typescript", "disallowAmbiguousJSXLike") && this.raise(b.ReservedArrowTypeParam, e);
9057
+ e.params.length === 1 && !e.params[0].constraint && !((i = e.extra) != null && i.trailingComma) && this.getPluginOption("typescript", "disallowAmbiguousJSXLike") && this.raise(g.ReservedArrowTypeParam, e);
9028
9058
  }
9029
9059
  parseMaybeUnary(e, i) {
9030
9060
  return !this.hasPlugin("jsx") && this.match(47) ? this.tsParseTypeAssertion() : super.parseMaybeUnary(e, i);
@@ -9064,7 +9094,7 @@ var cn = (r) => class extends r {
9064
9094
  case "TSSatisfiesExpression":
9065
9095
  case "TSNonNullExpression":
9066
9096
  case "TSTypeAssertion":
9067
- i ? this.expressionScope.recordArrowParameterBindingError(b.UnexpectedTypeCastInParameter, e) : this.raise(b.UnexpectedTypeCastInParameter, e), this.toAssignable(e.expression, i);
9097
+ i ? this.expressionScope.recordArrowParameterBindingError(g.UnexpectedTypeCastInParameter, e) : this.raise(g.UnexpectedTypeCastInParameter, e), this.toAssignable(e.expression, i);
9068
9098
  break;
9069
9099
  case "AssignmentExpression":
9070
9100
  !i && e.left.type === "TSTypeCastExpression" && (e.left = this.typeCastToParameter(e.left));
@@ -9138,7 +9168,7 @@ var cn = (r) => class extends r {
9138
9168
  }
9139
9169
  parseMaybeDefault(e, i) {
9140
9170
  const a = super.parseMaybeDefault(e, i);
9141
- return a.type === "AssignmentPattern" && a.typeAnnotation && a.right.start < a.typeAnnotation.start && this.raise(b.TypeAnnotationAfterAssign, a.typeAnnotation), a;
9171
+ return a.type === "AssignmentPattern" && a.typeAnnotation && a.right.start < a.typeAnnotation.start && this.raise(g.TypeAnnotationAfterAssign, a.typeAnnotation), a;
9142
9172
  }
9143
9173
  getTokenFromCode(e) {
9144
9174
  if (this.state.inType) {
@@ -9222,7 +9252,7 @@ var cn = (r) => class extends r {
9222
9252
  return e.abstract = !0, this.maybeTakeDecorators(i, this.parseClass(e, !0, !1));
9223
9253
  if (this.isContextual(129)) {
9224
9254
  if (!this.hasFollowingLineBreak())
9225
- return e.abstract = !0, this.raise(b.NonClassMethodPropertyHasAbstractModifier, e), this.tsParseInterfaceDeclaration(e);
9255
+ return e.abstract = !0, this.raise(g.NonClassMethodPropertyHasAbstractModifier, e), this.tsParseInterfaceDeclaration(e);
9226
9256
  } else
9227
9257
  this.unexpected(null, 80);
9228
9258
  }
@@ -9232,7 +9262,7 @@ var cn = (r) => class extends r {
9232
9262
  const {
9233
9263
  key: f
9234
9264
  } = l;
9235
- this.raise(b.AbstractMethodHasImplementation, l, {
9265
+ this.raise(g.AbstractMethodHasImplementation, l, {
9236
9266
  methodName: f.type === "Identifier" && !l.computed ? f.name : `[${this.input.slice(this.offsetToSourcePos(f.start), this.offsetToSourcePos(f.end))}]`
9237
9267
  });
9238
9268
  }
@@ -9267,7 +9297,7 @@ var cn = (r) => class extends r {
9267
9297
  Z(this.state.type) ? (l = !0, c = x, h = i ? this.parseIdentifier() : this.parseModuleExportName(), p = !1) : (h = A, p = !1);
9268
9298
  } else Z(this.state.type) ? (p = !1, h = i ? this.parseIdentifier() : this.parseModuleExportName()) : (l = !0, c = x);
9269
9299
  } else Z(this.state.type) && (l = !0, i ? (c = this.parseIdentifier(!0), this.isContextual(93) || this.checkReservedWord(c.name, c.loc.start, !0, !0)) : c = this.parseModuleExportName());
9270
- l && a && this.raise(i ? b.TypeModifierIsUsedInTypeImports : b.TypeModifierIsUsedInTypeExports, d), e[n] = c, e[o] = h;
9300
+ l && a && this.raise(i ? g.TypeModifierIsUsedInTypeImports : g.TypeModifierIsUsedInTypeExports, d), e[n] = c, e[o] = h;
9271
9301
  const f = i ? "importKind" : "exportKind";
9272
9302
  e[f] = l ? "type" : "value", p && this.eatContextual(93) && (e[o] = i ? this.parseIdentifier() : this.parseModuleExportName()), e[o] || (e[o] = this.cloneIdentifier(e[n])), i && this.checkIdentifier(e[o], l ? 4098 : 4096);
9273
9303
  }
@@ -9347,7 +9377,7 @@ var cn = (r) => class extends r {
9347
9377
  }
9348
9378
  }
9349
9379
  };
9350
- function hn(r) {
9380
+ function cn(r) {
9351
9381
  if (r.type !== "MemberExpression") return !1;
9352
9382
  const {
9353
9383
  computed: t,
@@ -9355,7 +9385,7 @@ function hn(r) {
9355
9385
  } = r;
9356
9386
  return t && s.type !== "StringLiteral" && (s.type !== "TemplateLiteral" || s.expressions.length > 0) ? !1 : hi(r.object);
9357
9387
  }
9358
- function ln(r, t) {
9388
+ function hn(r, t) {
9359
9389
  var e;
9360
9390
  const {
9361
9391
  type: s
@@ -9372,12 +9402,12 @@ function ln(r, t) {
9372
9402
  }
9373
9403
  } else if (s === "StringLiteral" || s === "BooleanLiteral")
9374
9404
  return !0;
9375
- return !!(ci(r, t) || un(r, t) || s === "TemplateLiteral" && r.expressions.length === 0 || hn(r));
9405
+ return !!(ci(r, t) || ln(r, t) || s === "TemplateLiteral" && r.expressions.length === 0 || cn(r));
9376
9406
  }
9377
9407
  function ci(r, t) {
9378
9408
  return t ? r.type === "Literal" && (typeof r.value == "number" || "bigint" in r) : r.type === "NumericLiteral" || r.type === "BigIntLiteral";
9379
9409
  }
9380
- function un(r, t) {
9410
+ function ln(r, t) {
9381
9411
  if (r.type === "UnaryExpression") {
9382
9412
  const {
9383
9413
  operator: s,
@@ -9395,7 +9425,7 @@ const Es = te`placeholders`({
9395
9425
  ClassNameIsRequired: "A class name is required.",
9396
9426
  UnexpectedSpace: "Unexpected space in placeholder."
9397
9427
  });
9398
- var pn = (r) => class extends r {
9428
+ var un = (r) => class extends r {
9399
9429
  parsePlaceholder(s) {
9400
9430
  if (this.match(133)) {
9401
9431
  const e = this.startNode();
@@ -9516,7 +9546,7 @@ var pn = (r) => class extends r {
9516
9546
  assertNoSpace() {
9517
9547
  this.state.start > this.offsetToSourcePos(this.state.lastTokEndLoc.index) && this.raise(Es.UnexpectedSpace, this.state.lastTokEndLoc);
9518
9548
  }
9519
- }, fn = (r) => class extends r {
9549
+ }, pn = (r) => class extends r {
9520
9550
  parseV8Intrinsic() {
9521
9551
  if (this.match(54)) {
9522
9552
  const s = this.state.startLoc, e = this.startNode();
@@ -9533,7 +9563,7 @@ var pn = (r) => class extends r {
9533
9563
  }
9534
9564
  };
9535
9565
  const Cs = ["fsharp", "hack"], Ns = ["^^", "@@", "^", "%", "#"];
9536
- function dn(r) {
9566
+ function fn(r) {
9537
9567
  if (r.has("decorators")) {
9538
9568
  if (r.has("decorators-legacy"))
9539
9569
  throw new Error("Cannot use the decorators and decorators-legacy plugin together");
@@ -9588,14 +9618,14 @@ function dn(r) {
9588
9618
  }
9589
9619
  }
9590
9620
  const li = {
9591
- estree: sa,
9592
- jsx: Ba,
9621
+ estree: ta,
9622
+ jsx: Fa,
9593
9623
  flow: Da,
9594
- typescript: cn,
9595
- v8intrinsic: fn,
9596
- placeholders: pn
9597
- }, mn = Object.keys(li);
9598
- class yn extends rn {
9624
+ typescript: on,
9625
+ v8intrinsic: pn,
9626
+ placeholders: un
9627
+ }, dn = Object.keys(li);
9628
+ class mn extends sn {
9599
9629
  checkProto(t, s, e, i) {
9600
9630
  if (t.type === "SpreadElement" || this.isObjectMethod(t) || t.computed || t.shorthand)
9601
9631
  return e;
@@ -9651,7 +9681,7 @@ class yn extends rn {
9651
9681
  } = this.state;
9652
9682
  (n === 10 || N(n)) && (this.state.potentialArrowAt = this.state.start);
9653
9683
  let o = this.parseMaybeConditional(t);
9654
- if (s && (o = s.call(this, o, e)), oa(this.state.type)) {
9684
+ if (s && (o = s.call(this, o, e)), na(this.state.type)) {
9655
9685
  const c = this.startNodeAt(e), h = this.state.value;
9656
9686
  if (c.operator = h, this.match(29)) {
9657
9687
  this.toAssignable(o, !0), c.left = o;
@@ -9696,7 +9726,7 @@ class yn extends rn {
9696
9726
  }), this.classScope.usePrivateName(a, t.loc.start);
9697
9727
  }
9698
9728
  const i = this.state.type;
9699
- if (ha(i) && (this.prodParam.hasIn || !this.match(58))) {
9729
+ if (ca(i) && (this.prodParam.hasIn || !this.match(58))) {
9700
9730
  let a = Ze(i);
9701
9731
  if (a > e) {
9702
9732
  if (i === 39) {
@@ -9731,14 +9761,14 @@ class yn extends rn {
9731
9761
  }
9732
9762
  parseExprOpBaseRightExpr(t, s) {
9733
9763
  const e = this.state.startLoc;
9734
- return this.parseExprOp(this.parseMaybeUnaryOrPrivate(), e, da(t) ? s - 1 : s);
9764
+ return this.parseExprOp(this.parseMaybeUnaryOrPrivate(), e, fa(t) ? s - 1 : s);
9735
9765
  }
9736
9766
  parseHackPipeBody() {
9737
9767
  var i;
9738
9768
  const {
9739
9769
  startLoc: t
9740
9770
  } = this.state, s = this.parseMaybeAssign();
9741
- return Xr.has(s.type) && !((i = s.extra) != null && i.parenthesized) && this.raise(u.PipeUnparenthesizedBody, t, {
9771
+ return Wr.has(s.type) && !((i = s.extra) != null && i.parenthesized) && this.raise(u.PipeUnparenthesizedBody, t, {
9742
9772
  type: s.type
9743
9773
  }), this.topicReferenceWasUsedInCurrentContext() || this.raise(u.PipeTopicUnused, t), s;
9744
9774
  }
@@ -9753,7 +9783,7 @@ class yn extends rn {
9753
9783
  return s || this.checkExponentialAfterUnary(c), c;
9754
9784
  }
9755
9785
  const a = this.match(34), n = this.startNode();
9756
- if (ua(this.state.type)) {
9786
+ if (la(this.state.type)) {
9757
9787
  n.operator = this.state.value, n.prefix = !0, this.match(72) && this.expectPlugin("throwExpressions");
9758
9788
  const c = this.match(89);
9759
9789
  if (this.next(), n.argument = this.parseMaybeUnary(null, !0), this.checkExpressionErrors(t, !0), this.state.strict && c) {
@@ -9781,7 +9811,7 @@ class yn extends rn {
9781
9811
  const i = this.state.startLoc;
9782
9812
  let a = this.parseExprSubscripts(e);
9783
9813
  if (this.checkExpressionErrors(e, !1)) return a;
9784
- for (; la(this.state.type) && !this.canInsertSemicolon(); ) {
9814
+ for (; ha(this.state.type) && !this.canInsertSemicolon(); ) {
9785
9815
  const n = this.startNodeAt(i);
9786
9816
  n.operator = this.state.value, n.prefix = !1, n.argument = a, this.next(), this.checkLVal(a, a = this.finishNode(n, "UpdateExpression"));
9787
9817
  }
@@ -9808,7 +9838,7 @@ class yn extends rn {
9808
9838
  } = this.state;
9809
9839
  if (!e && a === 15)
9810
9840
  return this.parseBind(t, s, e, i);
9811
- if (Ot(a))
9841
+ if (Dt(a))
9812
9842
  return this.parseTaggedTemplateExpression(t, s, i);
9813
9843
  let n = !1;
9814
9844
  if (a === 18) {
@@ -9844,7 +9874,7 @@ class yn extends rn {
9844
9874
  maybeAsyncArrow: c,
9845
9875
  optionalChainMember: h
9846
9876
  } = e;
9847
- c && (this.expressionScope.enter(en()), n = new tt()), h && (o.optional = i), i ? o.arguments = this.parseCallExpressionArguments(11) : o.arguments = this.parseCallExpressionArguments(11, t.type !== "Super", o, n);
9877
+ c && (this.expressionScope.enter(Za()), n = new tt()), h && (o.optional = i), i ? o.arguments = this.parseCallExpressionArguments(11) : o.arguments = this.parseCallExpressionArguments(11, t.type !== "Super", o, n);
9848
9878
  let l = this.finishCallExpression(o, h);
9849
9879
  return c && this.shouldParseAsyncArrow() && !i ? (e.stop = !0, this.checkDestructuringPrivate(n), this.expressionScope.validateAsPattern(), this.expressionScope.exit(), l = this.parseAsyncArrowFromCallExpression(this.startNodeAt(s), l)) : (c && (this.checkExpressionErrors(n, !0), this.expressionScope.exit()), this.toReferencedArguments(l)), this.state.maybeInArrowParameters = a, l;
9850
9880
  }
@@ -10100,7 +10130,7 @@ class yn extends rn {
10100
10130
  parseParenAndDistinguishExpression(t) {
10101
10131
  const s = this.state.startLoc;
10102
10132
  let e;
10103
- this.next(), this.expressionScope.enter(Za());
10133
+ this.next(), this.expressionScope.enter(Qa());
10104
10134
  const i = this.state.maybeInArrowParameters, a = this.state.inFSharpPipelineDirectBody;
10105
10135
  this.state.maybeInArrowParameters = !0, this.state.inFSharpPipelineDirectBody = !1;
10106
10136
  const n = this.state.startLoc, o = [], c = new tt();
@@ -10418,13 +10448,13 @@ class yn extends rn {
10418
10448
  type: i
10419
10449
  } = this.state;
10420
10450
  Z(i) ? s = this.state.value : this.unexpected();
10421
- const a = aa(i);
10451
+ const a = ra(i);
10422
10452
  return t ? a && this.replaceToken(132) : this.checkReservedWord(s, e, a, !1), this.next(), s;
10423
10453
  }
10424
10454
  checkReservedWord(t, s, e, i) {
10425
- if (t.length > 10 || !Sa(t))
10455
+ if (t.length > 10 || !Aa(t))
10426
10456
  return;
10427
- if (e && wa(t)) {
10457
+ if (e && ba(t)) {
10428
10458
  this.raise(u.UnexpectedKeyword, s, {
10429
10459
  keyword: t
10430
10460
  });
@@ -10468,7 +10498,7 @@ class yn extends rn {
10468
10498
  const {
10469
10499
  type: t
10470
10500
  } = this.state;
10471
- return t === 53 || t === 10 || t === 0 || Ot(t) || t === 102 && !this.state.containsEsc || t === 138 || t === 56 || this.hasPlugin("v8intrinsic") && t === 54;
10501
+ return t === 53 || t === 10 || t === 0 || Dt(t) || t === 102 && !this.state.containsEsc || t === 138 || t === 56 || this.hasPlugin("v8intrinsic") && t === 54;
10472
10502
  }
10473
10503
  parseYield(t) {
10474
10504
  const s = this.startNodeAt(t);
@@ -10615,12 +10645,12 @@ class yn extends rn {
10615
10645
  parsePropertyNamePrefixOperator(t) {
10616
10646
  }
10617
10647
  }
10618
- const Tt = {
10648
+ const wt = {
10619
10649
  kind: 1
10620
- }, xn = {
10650
+ }, yn = {
10621
10651
  kind: 2
10622
- }, Pn = /[\uD800-\uDFFF]/u, At = /in(?:stanceof)?/y;
10623
- function bn(r, t, s) {
10652
+ }, xn = /[\uD800-\uDFFF]/u, At = /in(?:stanceof)?/y;
10653
+ function Pn(r, t, s) {
10624
10654
  for (let e = 0; e < r.length; e++) {
10625
10655
  const i = r[e], {
10626
10656
  type: a
@@ -10629,9 +10659,9 @@ function bn(r, t, s) {
10629
10659
  }
10630
10660
  return r;
10631
10661
  }
10632
- class gn extends yn {
10662
+ class gn extends mn {
10633
10663
  parseTopLevel(t, s) {
10634
- return t.program = this.parseProgram(s), t.comments = this.comments, this.optionFlags & 256 && (t.tokens = bn(this.tokens, this.input, this.startIndex)), this.finishNode(t, "File");
10664
+ return t.program = this.parseProgram(s), t.comments = this.comments, this.optionFlags & 256 && (t.tokens = Pn(this.tokens, this.input, this.startIndex)), this.finishNode(t, "File");
10635
10665
  }
10636
10666
  parseProgram(t, s = 140, e = this.options.sourceType) {
10637
10667
  if (t.sourceType = e, t.interpreter = this.parseInterpreterDirective(), this.parseBlockBody(t, !0, !0, s), this.inModule) {
@@ -10875,10 +10905,10 @@ class gn extends yn {
10875
10905
  return this.expect(11), t;
10876
10906
  }
10877
10907
  parseDoWhileStatement(t) {
10878
- return this.next(), this.state.labels.push(Tt), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.state.labels.pop(), this.expect(92), t.test = this.parseHeaderExpression(), this.eat(13), this.finishNode(t, "DoWhileStatement");
10908
+ return this.next(), this.state.labels.push(wt), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.state.labels.pop(), this.expect(92), t.test = this.parseHeaderExpression(), this.eat(13), this.finishNode(t, "DoWhileStatement");
10879
10909
  }
10880
10910
  parseForStatement(t) {
10881
- this.next(), this.state.labels.push(Tt);
10911
+ this.next(), this.state.labels.push(wt);
10882
10912
  let s = null;
10883
10913
  if (this.isContextual(96) && this.recordAwaitIfAllowed() && (s = this.state.startLoc, this.next()), this.scope.enter(0), this.expect(10), this.match(13))
10884
10914
  return s !== null && this.unexpected(s), this.parseFor(t, null);
@@ -10916,7 +10946,7 @@ class gn extends yn {
10916
10946
  parseSwitchStatement(t) {
10917
10947
  this.next(), t.discriminant = this.parseHeaderExpression();
10918
10948
  const s = t.cases = [];
10919
- this.expect(5), this.state.labels.push(xn), this.scope.enter(256);
10949
+ this.expect(5), this.state.labels.push(yn), this.scope.enter(256);
10920
10950
  let e;
10921
10951
  for (let i; !this.match(8); )
10922
10952
  if (this.match(61) || this.match(65)) {
@@ -10946,7 +10976,7 @@ class gn extends yn {
10946
10976
  return this.next(), this.parseVar(t, !1, s, e), this.semicolon(), this.finishNode(t, "VariableDeclaration");
10947
10977
  }
10948
10978
  parseWhileStatement(t) {
10949
- return this.next(), t.test = this.parseHeaderExpression(), this.state.labels.push(Tt), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.state.labels.pop(), this.finishNode(t, "WhileStatement");
10979
+ return this.next(), t.test = this.parseHeaderExpression(), this.state.labels.push(wt), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.state.labels.pop(), this.finishNode(t, "WhileStatement");
10950
10980
  }
10951
10981
  parseWithStatement(t) {
10952
10982
  return this.state.strict && this.raise(u.StrictWith, this.state.startLoc), this.next(), t.object = this.parseHeaderExpression(), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.finishNode(t, "WithStatement");
@@ -10959,7 +10989,7 @@ class gn extends yn {
10959
10989
  n.name === s && this.raise(u.LabelRedeclaration, e, {
10960
10990
  labelName: s
10961
10991
  });
10962
- const a = ca(this.state.type) ? 1 : this.match(71) ? 2 : null;
10992
+ const a = oa(this.state.type) ? 1 : this.match(71) ? 2 : null;
10963
10993
  for (let n = this.state.labels.length - 1; n >= 0; n--) {
10964
10994
  const o = this.state.labels[n];
10965
10995
  if (o.statementStart === t.start)
@@ -11050,7 +11080,7 @@ class gn extends yn {
11050
11080
  return t || N(this.state.type) ? this.parseIdentifier() : null;
11051
11081
  }
11052
11082
  parseFunctionParams(t, s) {
11053
- this.expect(10), this.expressionScope.enter(Qa()), t.params = this.parseBindingList(11, 41, 2 | (s ? 4 : 0)), this.expressionScope.exit();
11083
+ this.expect(10), this.expressionScope.enter(Ya()), t.params = this.parseBindingList(11, 41, 2 | (s ? 4 : 0)), this.expressionScope.exit();
11054
11084
  }
11055
11085
  registerFunctionStatementId(t) {
11056
11086
  t.id && this.scope.declareName(t.id.name, !this.options.annexB || this.state.strict || t.generator || t.async ? this.scope.treatFunctionsAsVar ? 5 : 8201 : 17, t.id.loc.start);
@@ -11422,7 +11452,7 @@ class gn extends yn {
11422
11452
  }
11423
11453
  parseModuleExportName() {
11424
11454
  if (this.match(134)) {
11425
- const t = this.parseStringLiteral(this.state.value), s = Pn.exec(t.value);
11455
+ const t = this.parseStringLiteral(this.state.value), s = xn.exec(t.value);
11426
11456
  return s && this.raise(u.ModuleExportNameHasLoneSurrogate, t, {
11427
11457
  surrogateCharCode: s[0].charCodeAt(0)
11428
11458
  }), t;
@@ -11587,7 +11617,7 @@ class gn extends yn {
11587
11617
  }
11588
11618
  class ui extends gn {
11589
11619
  constructor(t, s, e) {
11590
- t = ea(t), super(t, s), this.options = t, this.initializeScopes(), this.plugins = e, this.filename = t.sourceFilename, this.startIndex = t.startIndex;
11620
+ t = Zr(t), super(t, s), this.options = t, this.initializeScopes(), this.plugins = e, this.filename = t.sourceFilename, this.startIndex = t.startIndex;
11591
11621
  let i = 0;
11592
11622
  t.allowAwaitOutsideFunction && (i |= 1), t.allowReturnOutsideFunction && (i |= 2), t.allowImportExportEverywhere && (i |= 8), t.allowSuperOutsideMethod && (i |= 16), t.allowUndeclaredExports && (i |= 64), t.allowNewTargetOutsideFunction && (i |= 4), t.allowYieldOutsideFunction && (i |= 32), t.ranges && (i |= 128), t.tokens && (i |= 256), t.createImportExpressions && (i |= 512), t.createParenthesizedExpressions && (i |= 1024), t.errorRecovery && (i |= 2048), t.attachComment && (i |= 4096), t.annexB && (i |= 8192), this.optionFlags = i;
11593
11623
  }
@@ -11600,7 +11630,7 @@ class ui extends gn {
11600
11630
  return this.nextToken(), t.errors = null, this.parseTopLevel(t, s), t.errors = this.state.errors, t.comments.length = this.state.commentsLen, t;
11601
11631
  }
11602
11632
  }
11603
- function wn(r, t) {
11633
+ function bn(r, t) {
11604
11634
  if ((t == null ? void 0 : t.sourceType) === "unambiguous") {
11605
11635
  t = Object.assign({}, t);
11606
11636
  try {
@@ -11632,7 +11662,7 @@ function Tn(r) {
11632
11662
  t[s] = Xs(r[s]);
11633
11663
  return t;
11634
11664
  }
11635
- Tn(ra);
11665
+ Tn(ia);
11636
11666
  function Xe(r, t) {
11637
11667
  let s = ui;
11638
11668
  const e = /* @__PURE__ */ new Map();
@@ -11641,14 +11671,14 @@ function Xe(r, t) {
11641
11671
  let a, n;
11642
11672
  typeof i == "string" ? a = i : [a, n] = i, e.has(a) || e.set(a, n || {});
11643
11673
  }
11644
- dn(e), s = An(e);
11674
+ fn(e), s = wn(e);
11645
11675
  }
11646
11676
  return new s(r, t, e);
11647
11677
  }
11648
11678
  const ks = /* @__PURE__ */ new Map();
11649
- function An(r) {
11679
+ function wn(r) {
11650
11680
  const t = [];
11651
- for (const i of mn)
11681
+ for (const i of dn)
11652
11682
  r.has(i) && t.push(i);
11653
11683
  const s = t.join("|");
11654
11684
  let e = ks.get(s);
@@ -11827,7 +11857,7 @@ function fi(r) {
11827
11857
  }
11828
11858
  return t;
11829
11859
  }
11830
- function Sn(r, t) {
11860
+ function An(r, t) {
11831
11861
  let s = null, e;
11832
11862
  for (const i of t.properties) {
11833
11863
  if (i.type !== "ObjectProperty")
@@ -11864,7 +11894,7 @@ function Sn(r, t) {
11864
11894
  );
11865
11895
  return { presence: s, topics: e };
11866
11896
  }
11867
- function In(r) {
11897
+ function Sn(r) {
11868
11898
  const t = {};
11869
11899
  for (const s of r.properties) {
11870
11900
  if (s.type !== "ObjectProperty")
@@ -11876,11 +11906,11 @@ function In(r) {
11876
11906
  throw new Error(
11877
11907
  `Could not extract room \`${e}\`. Expected an object with topics and presence keys, got \`${s.value.type}\`.`
11878
11908
  );
11879
- t[e] = Sn(e, s.value);
11909
+ t[e] = An(e, s.value);
11880
11910
  }
11881
11911
  return t;
11882
11912
  }
11883
- function En(r) {
11913
+ function In(r) {
11884
11914
  let t = null, s = {}, e = {};
11885
11915
  for (const i of r.program.body) {
11886
11916
  if (i.type !== "VariableDeclaration" || i.declarations.length !== 1 || i.declarations[0].id.type !== "Identifier" || i.declarations[0].id.name !== "_schema")
@@ -11910,7 +11940,7 @@ function En(r) {
11910
11940
  break;
11911
11941
  }
11912
11942
  case "rooms": {
11913
- e = In(n.value);
11943
+ e = Sn(n.value);
11914
11944
  break;
11915
11945
  }
11916
11946
  }
@@ -11920,9 +11950,9 @@ function En(r) {
11920
11950
  throw new Error("Could not extract schema, did not find any entities.");
11921
11951
  return q.schema({ entities: t, links: s, rooms: e });
11922
11952
  }
11923
- function Vn(r, t = "instant.schema.ts") {
11953
+ function zn(r, t = "instant.schema.ts") {
11924
11954
  var e;
11925
- const s = wn(r, {
11955
+ const s = bn(r, {
11926
11956
  sourceFilename: t,
11927
11957
  sourceType: "module",
11928
11958
  errorRecovery: !1,
@@ -11932,7 +11962,7 @@ function Vn(r, t = "instant.schema.ts") {
11932
11962
  throw new Error(
11933
11963
  `Could not parse schema file. ${s.errors[0].reasonCode}.`
11934
11964
  );
11935
- return En(s);
11965
+ return In(s);
11936
11966
  }
11937
11967
  const ct = {
11938
11968
  /**
@@ -11994,7 +12024,7 @@ const vs = (r, t, s) => ({
11994
12024
  },
11995
12025
  "index?": r.config.indexed,
11996
12026
  "checked-data-type": r.valueType !== "json" ? r.valueType : null
11997
- }), Cn = (r) => {
12027
+ }), En = (r) => {
11998
12028
  const t = `${r.forward.has}-${r.reverse.has}`;
11999
12029
  return {
12000
12030
  "checked-data-type": null,
@@ -12023,19 +12053,19 @@ const vs = (r, t, s) => ({
12023
12053
  if (!s)
12024
12054
  throw new Error(`Attribute ${r.namespace}.${r.attrName} not found`);
12025
12055
  return s;
12026
- }, we = (r, t) => {
12056
+ }, Te = (r, t) => {
12027
12057
  const s = it(r.identifier, t);
12028
12058
  return {
12029
12059
  "attr-id": s.id,
12030
12060
  "forward-identity": s["forward-identity"]
12031
12061
  };
12032
- }, Nn = {
12033
- index: we,
12034
- unique: we,
12035
- required: we,
12036
- "remove-index": we,
12037
- "remove-unique": we,
12038
- "remove-required": we,
12062
+ }, Cn = {
12063
+ index: Te,
12064
+ unique: Te,
12065
+ required: Te,
12066
+ "remove-index": Te,
12067
+ "remove-unique": Te,
12068
+ "remove-required": Te,
12039
12069
  "delete-attr": (r, t) => it(r.identifier, t).id,
12040
12070
  "update-attr": (r, t) => {
12041
12071
  const s = it(r.identifier, t);
@@ -12103,7 +12133,7 @@ const vs = (r, t, s) => ({
12103
12133
  }
12104
12134
  ]), i;
12105
12135
  },
12106
- "remove-data-type": we,
12136
+ "remove-data-type": Te,
12107
12137
  "check-data-type": (r, t) => {
12108
12138
  const s = it(r.identifier, t);
12109
12139
  return {
@@ -12117,18 +12147,18 @@ function ae(r, t, s) {
12117
12147
  var e;
12118
12148
  return !!((e = r[t]) != null && e.has(s));
12119
12149
  }
12120
- const Hn = (r, t) => {
12150
+ const Vn = (r, t) => {
12121
12151
  if (!t)
12122
12152
  throw new Error("Existing attributes are required");
12123
12153
  const s = [];
12124
12154
  return r.forEach((e) => {
12125
- const i = Nn[e.type];
12155
+ const i = Cn[e.type];
12126
12156
  if (!i)
12127
12157
  throw new Error(`Unknown transaction type: ${e.type}`);
12128
12158
  const a = i(e, t);
12129
12159
  Array.isArray(a) ? s.push(...a) : s.push([e.type, a]);
12130
12160
  }), s;
12131
- }, Kn = async (r, t, s, e) => {
12161
+ }, Hn = async (r, t, s, e) => {
12132
12162
  var B, ie;
12133
12163
  const i = [], a = r.entities, n = t.entities, o = Object.keys(a), c = Object.keys(n), h = o.filter(
12134
12164
  (P) => !c.includes(P)
@@ -12201,7 +12231,7 @@ const Hn = (r, t) => {
12201
12231
  (L) => Object.keys(n[P].attrs).includes(L)
12202
12232
  ).forEach((L) => {
12203
12233
  ae(e, P, L) || i.push(
12204
- ...Os(
12234
+ ...Ds(
12205
12235
  {
12206
12236
  attrName: L,
12207
12237
  namespace: P
@@ -12219,9 +12249,9 @@ const Hn = (r, t) => {
12219
12249
  }
12220
12250
  });
12221
12251
  }), xe.created.forEach((L) => {
12222
- const Oe = t.entities[P].attrs[L];
12252
+ const De = t.entities[P].attrs[L];
12223
12253
  i.push(
12224
- vs(Oe, P, L)
12254
+ vs(De, P, L)
12225
12255
  );
12226
12256
  }), xe.renamed.forEach((L) => {
12227
12257
  i.push({
@@ -12239,7 +12269,7 @@ const Hn = (r, t) => {
12239
12269
  }
12240
12270
  }
12241
12271
  }), i.push(
12242
- ...Os(
12272
+ ...Ds(
12243
12273
  {
12244
12274
  attrName: L.from,
12245
12275
  namespace: P
@@ -12277,24 +12307,24 @@ const Hn = (r, t) => {
12277
12307
  ]);
12278
12308
  for (const P of k) {
12279
12309
  const M = E.get(P) || [], K = F.get(P) || [], xe = M.map(
12280
- (_) => A(_)
12310
+ (R) => A(R)
12281
12311
  ), He = K.map(
12282
- (_) => A(_)
12312
+ (R) => A(R)
12283
12313
  ), L = He.filter(
12284
- (_) => !xe.includes(_)
12285
- ), Oe = xe.filter(
12286
- (_) => !He.includes(_)
12314
+ (R) => !xe.includes(R)
12315
+ ), De = xe.filter(
12316
+ (R) => !He.includes(R)
12287
12317
  );
12288
12318
  xe.filter(
12289
- (_) => He.includes(_)
12290
- ).forEach((_) => {
12319
+ (R) => He.includes(R)
12320
+ ).forEach((R) => {
12291
12321
  const U = M.find(
12292
- (Pe) => A(Pe) === _
12322
+ (Pe) => A(Pe) === R
12293
12323
  ), J = K.find(
12294
- (Pe) => A(Pe) === _
12324
+ (Pe) => A(Pe) === R
12295
12325
  );
12296
12326
  !U || !J || i.push(
12297
- ...Ds(
12327
+ ...Os(
12298
12328
  {
12299
12329
  namespace: U.forward.on,
12300
12330
  attrName: U.forward.label
@@ -12306,7 +12336,7 @@ const Hn = (r, t) => {
12306
12336
  });
12307
12337
  const mt = await Ls(
12308
12338
  L,
12309
- Oe,
12339
+ De,
12310
12340
  s,
12311
12341
  {
12312
12342
  type: "link",
@@ -12314,9 +12344,9 @@ const Hn = (r, t) => {
12314
12344
  reverseEntityName: (ie = M[0]) == null ? void 0 : ie.reverse.on
12315
12345
  }
12316
12346
  );
12317
- mt.deleted.forEach((_) => {
12347
+ mt.deleted.forEach((R) => {
12318
12348
  const U = M.find(
12319
- (J) => A(J) === _
12349
+ (J) => A(J) === R
12320
12350
  );
12321
12351
  U && i.push({
12322
12352
  type: "delete-attr",
@@ -12325,16 +12355,16 @@ const Hn = (r, t) => {
12325
12355
  namespace: U.forward.on
12326
12356
  }
12327
12357
  });
12328
- }), mt.created.forEach((_) => {
12358
+ }), mt.created.forEach((R) => {
12329
12359
  const U = K.find(
12330
- (J) => A(J) === _
12360
+ (J) => A(J) === R
12331
12361
  );
12332
- U && i.push(Cn(U));
12333
- }), mt.renamed.forEach((_) => {
12362
+ U && i.push(En(U));
12363
+ }), mt.renamed.forEach((R) => {
12334
12364
  const U = M.find(
12335
- (Pe) => A(Pe) === _.from
12365
+ (Pe) => A(Pe) === R.from
12336
12366
  ), J = K.find(
12337
- (Pe) => A(Pe) === _.to
12367
+ (Pe) => A(Pe) === R.to
12338
12368
  );
12339
12369
  !U || !J || (i.push({
12340
12370
  type: "update-attr",
@@ -12355,7 +12385,7 @@ const Hn = (r, t) => {
12355
12385
  }
12356
12386
  }
12357
12387
  }), i.push(
12358
- ...Ds(
12388
+ ...Os(
12359
12389
  {
12360
12390
  attrName: U.forward.label,
12361
12391
  namespace: U.forward.on
@@ -12367,7 +12397,7 @@ const Hn = (r, t) => {
12367
12397
  });
12368
12398
  }
12369
12399
  return i;
12370
- }, Os = (r, t, s) => {
12400
+ }, Ds = (r, t, s) => {
12371
12401
  const e = [], i = (a) => {
12372
12402
  e.push({
12373
12403
  type: a,
@@ -12382,7 +12412,7 @@ const Hn = (r, t) => {
12382
12412
  identifier: r,
12383
12413
  "checked-data-type": s.valueType
12384
12414
  }), e;
12385
- }, Ds = (r, t, s) => {
12415
+ }, Os = (r, t, s) => {
12386
12416
  const e = [], i = `${t.forward.has}-${t.reverse.has}`, { cardinality: a, "unique?": n } = ct[i], o = `${s.forward.has}-${s.reverse.has}`, { cardinality: c, "unique?": h } = ct[o];
12387
12417
  return !n && h && e.push({
12388
12418
  type: "unique",
@@ -12400,7 +12430,7 @@ const Hn = (r, t) => {
12400
12430
  cardinality: c
12401
12431
  }
12402
12432
  }), e;
12403
- }, kn = (r) => typeof r == "object", Ls = async (r, t, s, e) => {
12433
+ }, Nn = (r) => typeof r == "object", Ls = async (r, t, s, e) => {
12404
12434
  if (t.length === 0 || r.length === 0)
12405
12435
  return {
12406
12436
  created: r,
@@ -12411,27 +12441,27 @@ const Hn = (r, t) => {
12411
12441
  let a = 0, n = [...t];
12412
12442
  do {
12413
12443
  const o = r[a], c = n.map((p) => ({ from: p, to: o })), h = [o, ...c], l = await s(o, h, e);
12414
- kn(l) ? (l.from !== l.to && i.renamed.push(l), delete n[n.indexOf(l.from)], n = n.filter(Boolean)) : i.created.push(o), a += 1;
12444
+ Nn(l) ? (l.from !== l.to && i.renamed.push(l), delete n[n.indexOf(l.from)], n = n.filter(Boolean)) : i.created.push(o), a += 1;
12415
12445
  } while (a < r.length);
12416
12446
  return i.deleted.push(...n), i;
12417
12447
  };
12418
12448
  export {
12419
12449
  pe as InstantOAuthError,
12420
12450
  Dn as OAuthHandler,
12421
- _n as PlatformApi,
12451
+ Bn as PlatformApi,
12422
12452
  Hs as ProgressPromise,
12423
- be as SchemaValidationError,
12453
+ ge as SchemaValidationError,
12424
12454
  nt as apiSchemaToInstantSchemaDef,
12425
- Hn as convertTxSteps,
12426
- Kn as diffSchemas,
12427
- Bn as exchangeCodeForToken,
12428
- wr as exchangeRefreshToken,
12429
- Ln as generatePermsTypescriptFile,
12430
- Mn as generateSchemaTypescriptFile,
12455
+ Vn as convertTxSteps,
12456
+ Hn as diffSchemas,
12457
+ Fn as exchangeCodeForToken,
12458
+ br as exchangeRefreshToken,
12459
+ On as generatePermsTypescriptFile,
12460
+ Ln as generateSchemaTypescriptFile,
12431
12461
  q as i,
12432
- kn as isRenamePromptItem,
12433
- Vn as schemaTypescriptFileToInstantSchema,
12434
- Br as translatePlanSteps,
12435
- Fn as validateSchema,
12436
- Re as version
12462
+ Nn as isRenamePromptItem,
12463
+ zn as schemaTypescriptFileToInstantSchema,
12464
+ Fr as translatePlanSteps,
12465
+ Mn as validateSchema,
12466
+ je as version
12437
12467
  };