@instantdb/platform 0.22.95 → 0.22.96-experimental.add-posthog-frontend.20386914944.1

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.
@@ -19,11 +19,11 @@ const j = {
19
19
  Remove: "remove",
20
20
  Replace: "replace",
21
21
  Add: "add"
22
- }, Ms = Symbol.for("__MUTATIVE_PROXY_DRAFT__"), Xe = Symbol.iterator, ee = {
22
+ }, Ms = Symbol.for("__MUTATIVE_PROXY_DRAFT__"), Ge = Symbol.iterator, ee = {
23
23
  mutable: "mutable",
24
24
  immutable: "immutable"
25
25
  }, Bt = {};
26
- function _e(r, t) {
26
+ function Re(r, t) {
27
27
  return r instanceof Map ? r.has(t) : Object.prototype.hasOwnProperty.call(r, t);
28
28
  }
29
29
  function rs(r, t) {
@@ -53,7 +53,7 @@ function St(r) {
53
53
  function v(r) {
54
54
  return typeof r != "object" ? null : r == null ? void 0 : r[Ms];
55
55
  }
56
- function _t(r) {
56
+ function Rt(r) {
57
57
  var t;
58
58
  const s = v(r);
59
59
  return s ? (t = s.copy) !== null && t !== void 0 ? t : s.original : r;
@@ -64,18 +64,18 @@ function Se(r, t) {
64
64
  let s;
65
65
  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
66
  }
67
- function _s(r, t = []) {
67
+ function Rs(r, t = []) {
68
68
  if (Object.hasOwnProperty.call(r, "key")) {
69
69
  const s = r.parent.copy, e = v(me(s, r.key));
70
70
  if (e !== null && (e == null ? void 0 : e.original) !== r.original)
71
71
  return null;
72
72
  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)))
73
+ if (!(i && s.size > a || Re(s, a)))
74
74
  return null;
75
75
  t.push(a);
76
76
  }
77
77
  if (r.parent)
78
- return _s(r.parent, t);
78
+ return Rs(r.parent, t);
79
79
  t.reverse();
80
80
  try {
81
81
  yi(r.copy, t);
@@ -84,14 +84,14 @@ function _s(r, t = []) {
84
84
  }
85
85
  return t;
86
86
  }
87
- function ze(r) {
87
+ function Ve(r) {
88
88
  return Array.isArray(r) ? 1 : r instanceof Map ? 2 : r instanceof Set ? 3 : 0;
89
89
  }
90
90
  function me(r, t) {
91
- return ze(r) === 2 ? r.get(t) : r[t];
91
+ return Ve(r) === 2 ? r.get(t) : r[t];
92
92
  }
93
- function Rt(r, t, s) {
94
- ze(r) === 2 ? r.set(t, s) : r[t] = s;
93
+ function _t(r, t, s) {
94
+ Ve(r) === 2 ? r.set(t, s) : r[t] = s;
95
95
  }
96
96
  function yt(r, t) {
97
97
  const s = v(r);
@@ -109,7 +109,7 @@ function Te(r, t) {
109
109
  function yi(r, t) {
110
110
  for (let s = 0; s < t.length - 1; s += 1) {
111
111
  const e = t[s];
112
- if (r = me(ze(r) === 3 ? Array.from(r) : r, e), typeof r != "object")
112
+ if (r = me(Ve(r) === 3 ? Array.from(r) : r, e), typeof r != "object")
113
113
  throw new Error(`Cannot resolve patch at '${t.join("/")}'.`);
114
114
  }
115
115
  return r;
@@ -171,7 +171,7 @@ function V(r) {
171
171
  }
172
172
  function Fe(r) {
173
173
  if (!Se(r))
174
- return _t(r);
174
+ return Rt(r);
175
175
  if (Array.isArray(r))
176
176
  return r.map(Fe);
177
177
  if (r instanceof Map) {
@@ -198,7 +198,7 @@ function Fe(r) {
198
198
  t[s] = Fe(r[s]);
199
199
  return t;
200
200
  }
201
- function Ge(r) {
201
+ function Ye(r) {
202
202
  return St(r) ? Fe(r) : r;
203
203
  }
204
204
  function se(r) {
@@ -206,7 +206,7 @@ function se(r) {
206
206
  r.assignedMap = (t = r.assignedMap) !== null && t !== void 0 ? t : /* @__PURE__ */ new Map(), r.operated || (r.operated = !0, r.parent && se(r.parent));
207
207
  }
208
208
  function gi(r, t) {
209
- const s = ze(r);
209
+ const s = Ve(r);
210
210
  if (s === 0)
211
211
  Reflect.ownKeys(r).forEach((e) => {
212
212
  t(e, r[e], r);
@@ -218,7 +218,7 @@ function gi(r, t) {
218
218
  } else
219
219
  r.forEach((e, i) => t(i, e, r));
220
220
  }
221
- function Rs(r, t, s) {
221
+ function _s(r, t, s) {
222
222
  if (St(r) || !Se(r, s) || t.has(r) || Object.isFrozen(r))
223
223
  return;
224
224
  const e = r instanceof Set, i = e ? /* @__PURE__ */ new Map() : void 0;
@@ -228,9 +228,9 @@ function Rs(r, t, s) {
228
228
  const c = v(n);
229
229
  V(c);
230
230
  const h = !((o = c.assignedMap) === null || o === void 0) && o.size || c.operated ? c.copy : c.original;
231
- Rt(e ? i : r, a, h);
231
+ _t(e ? i : r, a, h);
232
232
  } else
233
- Rs(n, t, s);
233
+ _s(n, t, s);
234
234
  }), i) {
235
235
  const a = r, n = Array.from(a);
236
236
  a.clear(), n.forEach((o) => {
@@ -240,17 +240,17 @@ function Rs(r, t, s) {
240
240
  }
241
241
  function wi(r, t) {
242
242
  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);
243
+ r.finalities.revoke.length > 1 && r.assignedMap.get(t) && s && _s(me(s, t), r.finalities.handledSet, r.options);
244
244
  }
245
245
  function It(r) {
246
246
  r.type === 3 && r.copy && (r.copy.clear(), r.setMap.forEach((t) => {
247
- r.copy.add(_t(t));
247
+ r.copy.add(Rt(t));
248
248
  }));
249
249
  }
250
250
  function Et(r, t, s, e) {
251
251
  if (r.operated && r.assignedMap && r.assignedMap.size > 0 && !r.finalized) {
252
252
  if (s && e) {
253
- const a = _s(r);
253
+ const a = Rs(r);
254
254
  a && t(r, a, s, e);
255
255
  }
256
256
  r.finalized = !0;
@@ -263,7 +263,7 @@ function jt(r, t, s, e) {
263
263
  const c = r.type === 3 ? r.setMap : r.copy;
264
264
  if (Ae(me(c, t), s)) {
265
265
  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);
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)), _t(c, t, h);
267
267
  }
268
268
  }), r.options.enableAutoFreeze && i.finalities !== r.finalities && (r.options.enableAutoFreeze = !1)), Se(s, r.options) && r.finalities.draft.push(() => {
269
269
  const a = r.type === 3 ? r.setMap : r.copy;
@@ -280,12 +280,12 @@ function Ti(r, t, s, e, i) {
280
280
  op: j.Replace,
281
281
  path: p,
282
282
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
283
- value: Ge(c[h])
283
+ value: Ye(c[h])
284
284
  }), e.push({
285
285
  op: j.Replace,
286
286
  path: p,
287
287
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
288
- value: Ge(a[h])
288
+ value: Ye(a[h])
289
289
  });
290
290
  }
291
291
  for (let h = a.length; h < c.length; h += 1) {
@@ -294,7 +294,7 @@ function Ti(r, t, s, e, i) {
294
294
  op: j.Add,
295
295
  path: p,
296
296
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
297
- value: Ge(c[h])
297
+ value: Ye(c[h])
298
298
  });
299
299
  }
300
300
  if (a.length < c.length) {
@@ -318,7 +318,7 @@ function Ti(r, t, s, e, i) {
318
318
  }
319
319
  function Ai({ original: r, copy: t, assignedMap: s }, e, i, a, n) {
320
320
  s.forEach((o, c) => {
321
- const h = me(r, c), l = Ge(me(t, c)), p = o ? _e(r, c) ? j.Replace : j.Add : j.Remove;
321
+ const h = me(r, c), l = Ye(me(t, c)), p = o ? Re(r, c) ? j.Replace : j.Add : j.Remove;
322
322
  if (Ae(h, l) && p === j.Replace)
323
323
  return;
324
324
  const d = e.concat(c), f = Te(d, n);
@@ -357,7 +357,7 @@ function Si({ original: r, copy: t }, s, e, i, a) {
357
357
  n += 1;
358
358
  });
359
359
  }
360
- function je(r, t, s, e) {
360
+ function Ue(r, t, s, e) {
361
361
  const { pathAsArray: i = !0 } = r.options.enablePatches;
362
362
  switch (r.type) {
363
363
  case 0:
@@ -369,7 +369,7 @@ function je(r, t, s, e) {
369
369
  return Si(r, t, s, e, i);
370
370
  }
371
371
  }
372
- const it = (r, t, s = !1) => {
372
+ const rt = (r, t, s = !1) => {
373
373
  if (typeof r == "object" && r !== null && (!Se(r, t) || s))
374
374
  throw new Error("Strict mode: Mutable data cannot be accessed directly, please use 'unsafe(callback)' wrap.");
375
375
  }, Ct = {
@@ -381,7 +381,7 @@ const it = (r, t, s = !1) => {
381
381
  },
382
382
  set(r, t) {
383
383
  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, je)), this;
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;
385
385
  },
386
386
  delete(r) {
387
387
  if (!this.has(r))
@@ -407,7 +407,7 @@ const it = (r, t, s = !1) => {
407
407
  get(r) {
408
408
  var t, s;
409
409
  const e = v(this), i = X(e).get(r), a = ((s = (t = e.options).mark) === null || s === void 0 ? void 0 : s.call(t, i, ee)) === ee.mutable;
410
- if (e.options.strict && it(i, e.options, a), a || e.finalized || !Se(i, e.options) || i !== e.original.get(r))
410
+ if (e.options.strict && rt(i, e.options, a), a || e.finalized || !Se(i, e.options) || i !== e.original.get(r))
411
411
  return i;
412
412
  const n = Bt.createDraft({
413
413
  original: i,
@@ -424,7 +424,7 @@ const it = (r, t, s = !1) => {
424
424
  values() {
425
425
  const r = this.keys();
426
426
  return {
427
- [Xe]: () => this.values(),
427
+ [Ge]: () => this.values(),
428
428
  next: () => {
429
429
  const t = r.next();
430
430
  return t.done ? t : {
@@ -437,7 +437,7 @@ const it = (r, t, s = !1) => {
437
437
  entries() {
438
438
  const r = this.keys();
439
439
  return {
440
- [Xe]: () => this.entries(),
440
+ [Ge]: () => this.entries(),
441
441
  next: () => {
442
442
  const t = r.next();
443
443
  if (t.done)
@@ -450,7 +450,7 @@ const it = (r, t, s = !1) => {
450
450
  }
451
451
  };
452
452
  },
453
- [Xe]() {
453
+ [Ge]() {
454
454
  return this.entries();
455
455
  }
456
456
  }, Ii = Reflect.ownKeys(Ct), as = (r, t, { isValuesIterator: s }) => () => {
@@ -461,7 +461,7 @@ const it = (r, t, s = !1) => {
461
461
  const n = a.value;
462
462
  let o = r.setMap.get(n);
463
463
  const c = v(o), h = ((i = (e = r.options).mark) === null || i === void 0 ? void 0 : i.call(e, o, ee)) === ee.mutable;
464
- if (r.options.strict && it(n, r.options, h), !h && !c && Se(n, r.options) && !r.finalized && r.original.has(n)) {
464
+ if (r.options.strict && rt(n, r.options, h), !h && !c && Se(n, r.options) && !r.finalized && r.original.has(n)) {
465
465
  const l = Bt.createDraft({
466
466
  original: n,
467
467
  parentDraft: r,
@@ -475,7 +475,7 @@ const it = (r, t, s = !1) => {
475
475
  done: !1,
476
476
  value: s ? o : [o, o]
477
477
  };
478
- }, rt = {
478
+ }, at = {
479
479
  get size() {
480
480
  return v(this).setMap.size;
481
481
  },
@@ -489,7 +489,7 @@ const it = (r, t, s = !1) => {
489
489
  },
490
490
  add(r) {
491
491
  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, je)), 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;
493
493
  },
494
494
  delete(r) {
495
495
  if (!this.has(r))
@@ -531,7 +531,7 @@ const it = (r, t, s = !1) => {
531
531
  keys() {
532
532
  return this.values();
533
533
  },
534
- [Xe]() {
534
+ [Ge]() {
535
535
  return this.values();
536
536
  },
537
537
  forEach(r, t) {
@@ -541,7 +541,7 @@ const it = (r, t, s = !1) => {
541
541
  r.call(t, e.value, e.value, this), e = s.next();
542
542
  }
543
543
  };
544
- Set.prototype.difference && Object.assign(rt, {
544
+ Set.prototype.difference && Object.assign(at, {
545
545
  intersection(r) {
546
546
  return Set.prototype.intersection.call(new Set(this.values()), r);
547
547
  },
@@ -564,7 +564,7 @@ Set.prototype.difference && Object.assign(rt, {
564
564
  return Set.prototype.isDisjointFrom.call(new Set(this.values()), r);
565
565
  }
566
566
  });
567
- const Ei = Reflect.ownKeys(rt), js = /* @__PURE__ */ new WeakSet(), Us = {
567
+ const Ei = Reflect.ownKeys(at), js = /* @__PURE__ */ new WeakSet(), Us = {
568
568
  get(r, t, s) {
569
569
  var e, i;
570
570
  const a = (e = r.copy) === null || e === void 0 ? void 0 : e[t];
@@ -576,7 +576,7 @@ const Ei = Reflect.ownKeys(rt), js = /* @__PURE__ */ new WeakSet(), Us = {
576
576
  if (r.options.mark) {
577
577
  const h = t === "size" && (r.original instanceof Map || r.original instanceof Set) ? Reflect.get(r.original, t) : Reflect.get(r.original, t, s);
578
578
  if (n = r.options.mark(h, ee), n === ee.mutable)
579
- return r.options.strict && it(h, r.options, !0), h;
579
+ return r.options.strict && rt(h, r.options, !0), h;
580
580
  }
581
581
  const o = X(r);
582
582
  if (o instanceof Map && Ii.includes(t)) {
@@ -588,12 +588,12 @@ const Ei = Reflect.ownKeys(rt), js = /* @__PURE__ */ new WeakSet(), Us = {
588
588
  }
589
589
  if (o instanceof Set && Ei.includes(t)) {
590
590
  if (t === "size")
591
- return Object.getOwnPropertyDescriptor(rt, "size").get.call(r.proxy);
592
- const h = rt[t];
591
+ return Object.getOwnPropertyDescriptor(at, "size").get.call(r.proxy);
592
+ const h = at[t];
593
593
  if (h)
594
594
  return h.bind(r.proxy);
595
595
  }
596
- if (!_e(o, t)) {
596
+ if (!Re(o, t)) {
597
597
  const h = rs(o, t);
598
598
  return h ? "value" in h ? h.value : (
599
599
  // !case: support for getter
@@ -601,7 +601,7 @@ const Ei = Reflect.ownKeys(rt), js = /* @__PURE__ */ new WeakSet(), Us = {
601
601
  ) : void 0;
602
602
  }
603
603
  const c = o[t];
604
- if (r.options.strict && it(c, r.options), r.finalized || !Se(c, r.options))
604
+ if (r.options.strict && rt(c, r.options), r.finalized || !Se(c, r.options))
605
605
  return c;
606
606
  if (c === yt(r.original, t)) {
607
607
  if (V(r), r.copy[t] = $s({
@@ -629,7 +629,7 @@ const Ei = Reflect.ownKeys(rt), js = /* @__PURE__ */ new WeakSet(), Us = {
629
629
  if (a != null && a.set)
630
630
  return a.set.call(r.proxy, s), !0;
631
631
  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, je)), !0);
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 || 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, jt(r, t, s, Ue)), !0);
633
633
  },
634
634
  has(r, t) {
635
635
  return t in X(r);
@@ -661,7 +661,7 @@ const Ei = Reflect.ownKeys(rt), js = /* @__PURE__ */ new WeakSet(), Us = {
661
661
  }
662
662
  };
663
663
  function $s(r) {
664
- const { original: t, parentDraft: s, key: e, finalities: i, options: a } = r, n = ze(t), o = {
664
+ const { original: t, parentDraft: s, key: e, finalities: i, options: a } = r, n = Ve(t), o = {
665
665
  type: n,
666
666
  finalized: !1,
667
667
  parent: s,
@@ -684,7 +684,7 @@ function $s(r) {
684
684
  const E = me(F, e), k = v(E);
685
685
  if (k) {
686
686
  let B = k.original;
687
- k.operated && (B = _t(E)), It(k), Et(k, je, 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);
687
+ 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)), _t(F, e, B);
688
688
  }
689
689
  (x = A.callbacks) === null || x === void 0 || x.forEach((B) => {
690
690
  B(p, d);
@@ -693,7 +693,7 @@ function $s(r) {
693
693
  } else {
694
694
  const l = v(c);
695
695
  l.finalities.draft.push((p, d) => {
696
- It(l), Et(l, je, p, d);
696
+ It(l), Et(l, Ue, p, d);
697
697
  });
698
698
  }
699
699
  return c;
@@ -780,11 +780,11 @@ function Nt(r, t, s) {
780
780
  function Bi(r) {
781
781
  return r.startsWith("lookup__");
782
782
  }
783
- function _i(r) {
783
+ function Ri(r) {
784
784
  const [t, s, ...e] = r.split("__");
785
785
  return [s, JSON.parse(e.join("__"))];
786
786
  }
787
- function Ri(r) {
787
+ function _i(r) {
788
788
  return new Proxy({
789
789
  __etype: r
790
790
  }, {
@@ -792,14 +792,14 @@ function Ri(r) {
792
792
  if (s === "__etype")
793
793
  return r;
794
794
  const e = s;
795
- return Bi(e) ? Nt(r, _i(e), []) : Nt(r, e, []);
795
+ return Bi(e) ? Nt(r, Ri(e), []) : Nt(r, e, []);
796
796
  }
797
797
  });
798
798
  }
799
799
  function ji() {
800
800
  return new Proxy({}, {
801
801
  get(r, t) {
802
- return Ri(t);
802
+ return _i(t);
803
803
  }
804
804
  });
805
805
  }
@@ -816,20 +816,20 @@ class Ut extends Error {
816
816
  return "InstantError";
817
817
  }
818
818
  }
819
- class Ue extends Ut {
819
+ class $e extends Ut {
820
820
  constructor(t) {
821
821
  var s;
822
822
  const e = ((s = t.body) === null || s === void 0 ? void 0 : s.message) || `API Error (${t.status})`;
823
823
  super(e, t.body.hint);
824
824
  const i = new.target.prototype;
825
- Object.setPrototypeOf && Object.setPrototypeOf(this, i), Error.captureStackTrace && Error.captureStackTrace(this, Ue), this.name = "InstantAPIError", this.status = t.status, this.body = t.body;
825
+ Object.setPrototypeOf && Object.setPrototypeOf(this, i), Error.captureStackTrace && Error.captureStackTrace(this, $e), this.name = "InstantAPIError", this.status = t.status, this.body = t.body;
826
826
  }
827
827
  get [Symbol.toStringTag]() {
828
828
  return "InstantAPIError";
829
829
  }
830
830
  }
831
831
  typeof window < "u" && typeof window.localStorage < "u" && (window.localStorage.getItem("devBackend"), window.localStorage.getItem("__instantLogging"), window.localStorage.getItem("__devtoolLocalDash"));
832
- const at = "v0.22.95";
832
+ const _e = "v0.22.96-experimental.add-posthog-frontend.20386914944.1";
833
833
  class Q {
834
834
  constructor(t, s, e, i = { indexed: !1, unique: !1 }) {
835
835
  this.valueType = t, this.required = s, this.isIndexed = e, this.config = i, this.metadata = {};
@@ -1037,8 +1037,8 @@ async function rr({
1037
1037
  method: "POST",
1038
1038
  headers: {
1039
1039
  "Content-type": "application/json",
1040
- "Instant-Platform-Version": at,
1041
- "Instant-Core-Version": at
1040
+ "Instant-Platform-Version": _e,
1041
+ "Instant-Core-Version": _e
1042
1042
  },
1043
1043
  body: JSON.stringify({
1044
1044
  grant_type: "authorization_code",
@@ -1253,7 +1253,7 @@ const rules = ${s} satisfies InstantRules;
1253
1253
  export default rules;
1254
1254
  `;
1255
1255
  }
1256
- function $e(r) {
1256
+ function qe(r) {
1257
1257
  return Object.entries(r).sort(([t], [s]) => t.localeCompare(s));
1258
1258
  }
1259
1259
  function or(r) {
@@ -1265,7 +1265,7 @@ const cr = {
1265
1265
  "many-true": ["many", "one"],
1266
1266
  "one-false": ["one", "many"]
1267
1267
  };
1268
- function qe(r, t = 2) {
1268
+ function ze(r, t = 2) {
1269
1269
  if (!r)
1270
1270
  return r;
1271
1271
  const s = " ".repeat(t);
@@ -1299,13 +1299,13 @@ function ur([r, t]) {
1299
1299
  }
1300
1300
  function kt(r, t) {
1301
1301
  const s = zs(
1302
- $e(t.attrs).map(ur),
1302
+ qe(t.attrs).map(ur),
1303
1303
  `,
1304
1304
  `,
1305
1305
  ","
1306
1306
  );
1307
1307
  return `${$t(r)}: i.entity({${s.length ? `
1308
- ` : ""}${qe(s, 2)}${s.length ? `
1308
+ ` : ""}${ze(s, 2)}${s.length ? `
1309
1309
  ` : ""}})`;
1310
1310
  }
1311
1311
  function pr(r) {
@@ -1346,12 +1346,12 @@ function Pr(r, t) {
1346
1346
  function br(r) {
1347
1347
  let t = "{";
1348
1348
  if (r.presence && (t += `
1349
- ${qe(kt("presence", r.presence), 4)},`), r.topics) {
1349
+ ${ze(kt("presence", r.presence), 4)},`), r.topics) {
1350
1350
  t += `
1351
1351
  "topics": {`;
1352
1352
  for (const [s, e] of Object.entries(r.topics))
1353
1353
  t += `
1354
- ${qe(kt(s, e), 6)},`;
1354
+ ${ze(kt(s, e), 6)},`;
1355
1355
  t += `
1356
1356
  }`;
1357
1357
  }
@@ -1369,7 +1369,7 @@ function gr(r) {
1369
1369
  function Mn(r, t, s) {
1370
1370
  var d;
1371
1371
  const e = zs(
1372
- $e(t.entities).map(
1372
+ qe(t.entities).map(
1373
1373
  ([f, x]) => kt(f, x)
1374
1374
  ),
1375
1375
  `,
@@ -1380,13 +1380,13 @@ function Mn(r, t, s) {
1380
1380
  for (const x of Object.values(f.attrs))
1381
1381
  ((d = x.metadata.derivedType) == null ? void 0 : d.origin) === "inferred" && i.push(x);
1382
1382
  const a = `{
1383
- ${qe(e, 2)}
1383
+ ${ze(e, 2)}
1384
1384
  }`, n = i.length > 0 ? `// We inferred ${i.length} ${Pr("attribute", i.length)}!
1385
1385
  // Take a look at this schema, and if everything looks good,
1386
1386
  // 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
1387
  const F = A ? `${A}
1388
1388
  ${f}: ${x}` : `${f}: ${x}`;
1389
- return qe(F, 2);
1389
+ return ze(F, 2);
1390
1390
  };
1391
1391
  return `// Docs: https://www.instantdb.com/docs/modeling-data
1392
1392
 
@@ -1588,8 +1588,10 @@ async function wr({
1588
1588
  async function H(r, t) {
1589
1589
  const s = {
1590
1590
  ...(t == null ? void 0 : t.headers) || {},
1591
- "Instant-Platform-Version": at,
1592
- "Instant-Core-Version": at
1591
+ "Instant-Platform-Version": _e,
1592
+ "Instant-Core-Version": _e,
1593
+ "X-Instant-Source": "platform-sdk",
1594
+ "X-Instant-Version": _e
1593
1595
  }, e = await fetch(r, { ...t, headers: s });
1594
1596
  if (e.status === 200) {
1595
1597
  const a = await e.json();
@@ -1599,11 +1601,11 @@ async function H(r, t) {
1599
1601
  try {
1600
1602
  const a = JSON.parse(i);
1601
1603
  return Promise.reject(
1602
- new Ue({ status: e.status, body: a })
1604
+ new $e({ status: e.status, body: a })
1603
1605
  );
1604
1606
  } catch {
1605
1607
  return Promise.reject(
1606
- new Ue({
1608
+ new $e({
1607
1609
  status: e.status,
1608
1610
  body: { type: void 0, message: i }
1609
1611
  })
@@ -1639,7 +1641,7 @@ function Ar(r, t) {
1639
1641
  }
1640
1642
  function Sr(r, t) {
1641
1643
  const s = {};
1642
- for (const [e, i] of $e(r))
1644
+ for (const [e, i] of qe(r))
1643
1645
  e !== "id" && (s[e] = Ar(i, t));
1644
1646
  return q.entity(s);
1645
1647
  }
@@ -1667,10 +1669,10 @@ function Er(r) {
1667
1669
  }
1668
1670
  function nt(r, t) {
1669
1671
  const s = {};
1670
- for (const [i, a] of $e(r.blobs))
1672
+ for (const [i, a] of qe(r.blobs))
1671
1673
  s[i] = Sr(a, t);
1672
1674
  const e = {};
1673
- for (const [i, a] of $e(r.refs)) {
1675
+ for (const [i, a] of qe(r.refs)) {
1674
1676
  const n = Er(a), o = Ir(a);
1675
1677
  e[o] = n;
1676
1678
  }
@@ -1928,7 +1930,7 @@ function vt(r) {
1928
1930
  function Br(r) {
1929
1931
  return r.map((t) => vt(t));
1930
1932
  }
1931
- function _r(r, t) {
1933
+ function Rr(r, t) {
1932
1934
  const [s, e] = r;
1933
1935
  if (s === "add-attr" || s === "update-attr") {
1934
1936
  const c = vt(r);
@@ -1942,9 +1944,9 @@ function _r(r, t) {
1942
1944
  return { ...n, backgroundJob: o };
1943
1945
  }
1944
1946
  function Pt(r, t) {
1945
- return r.map((s) => _r(s, t));
1947
+ return r.map((s) => Rr(s, t));
1946
1948
  }
1947
- async function Rr(r, t, s, e) {
1949
+ async function _r(r, t, s, e) {
1948
1950
  const i = await H(
1949
1951
  `${r}/superadmin/apps/${s}/schema/push/plan`,
1950
1952
  {
@@ -2131,8 +2133,8 @@ class Ie extends Error {
2131
2133
  super("PlatformApi was not provided auth.");
2132
2134
  }
2133
2135
  }
2134
- var O, R;
2135
- class _n {
2136
+ var O, _;
2137
+ class Rn {
2136
2138
  /**
2137
2139
  * @param config – Runtime configuration.
2138
2140
  * @param config.auth.token – OAuth access-token obtained via the oauth flow
@@ -2141,8 +2143,8 @@ class _n {
2141
2143
  */
2142
2144
  constructor(t) {
2143
2145
  oe(this, O);
2144
- oe(this, R);
2145
- ce(this, O, t == null ? void 0 : t.auth), ce(this, R, (t == null ? void 0 : t.apiURI) || "https://api.instantdb.com");
2146
+ oe(this, _);
2147
+ ce(this, O, t == null ? void 0 : t.auth), ce(this, _, (t == null ? void 0 : t.apiURI) || "https://api.instantdb.com");
2146
2148
  }
2147
2149
  token() {
2148
2150
  if (!T(this, O))
@@ -2162,7 +2164,7 @@ class _n {
2162
2164
  !("clientId" in T(this, O)))
2163
2165
  return null;
2164
2166
  const t = await wr({
2165
- apiURI: T(this, R),
2167
+ apiURI: T(this, _),
2166
2168
  clientId: T(this, O).clientId,
2167
2169
  clientSecret: T(this, O).clientSecret,
2168
2170
  refreshToken: T(this, O).refreshToken
@@ -2178,7 +2180,7 @@ class _n {
2178
2180
  try {
2179
2181
  return await t(i, o, ...n);
2180
2182
  } catch (l) {
2181
- if (l instanceof Ue && (l.status === 401 || ((c = l.body) == null ? void 0 : c.type) === "record-expired" || ((h = l.body) == null ? void 0 : h.type) === "record-not-found" && l.body.hint["record-type"].match(/token/i)) && this.canRefreshToken()) {
2183
+ if (l instanceof $e && (l.status === 401 || ((c = l.body) == null ? void 0 : c.type) === "record-expired" || ((h = l.body) == null ? void 0 : h.type) === "record-not-found" && l.body.hint["record-type"].match(/token/i)) && this.canRefreshToken()) {
2182
2184
  const p = await this.refreshToken();
2183
2185
  if (p) {
2184
2186
  o = p.accessToken, e++;
@@ -2206,7 +2208,7 @@ class _n {
2206
2208
  * according to `Opts`.
2207
2209
  */
2208
2210
  async getApp(t, s) {
2209
- return this.withRetry(Or, [T(this, R), this.token(), t, s]);
2211
+ return this.withRetry(Or, [T(this, _), this.token(), t, s]);
2210
2212
  }
2211
2213
  /**
2212
2214
  * List **all apps** owned by the auth owner.
@@ -2223,7 +2225,7 @@ class _n {
2223
2225
  * @returns An array wrapper; each element’s shape follows `Opts`.
2224
2226
  */
2225
2227
  async getApps(t) {
2226
- return this.withRetry(Nr, [T(this, R), this.token(), t]);
2228
+ return this.withRetry(Nr, [T(this, _), this.token(), t]);
2227
2229
  }
2228
2230
  /**
2229
2231
  * List **all orgs** that the auth owner is a member of.
@@ -2235,7 +2237,7 @@ class _n {
2235
2237
  * @returns An array of orgs
2236
2238
  */
2237
2239
  async getOrgs() {
2238
- return this.withRetry(kr, [T(this, R), this.token()]);
2240
+ return this.withRetry(kr, [T(this, _), this.token()]);
2239
2241
  }
2240
2242
  /**
2241
2243
  * List **all apps** owned by the auth owner.
@@ -2253,7 +2255,7 @@ class _n {
2253
2255
  */
2254
2256
  async getAppsForOrg(t, s) {
2255
2257
  return this.withRetry(vr, [
2256
- T(this, R),
2258
+ T(this, _),
2257
2259
  this.token(),
2258
2260
  t,
2259
2261
  s
@@ -2269,7 +2271,7 @@ class _n {
2269
2271
  * @param appId -- UUID of the app
2270
2272
  */
2271
2273
  async getSchema(t) {
2272
- return this.withRetry(qt, [T(this, R), this.token(), t]);
2274
+ return this.withRetry(qt, [T(this, _), this.token(), t]);
2273
2275
  }
2274
2276
  /**
2275
2277
  * Gets the permissions for an app by its id.
@@ -2281,7 +2283,7 @@ class _n {
2281
2283
  * @param appId -- UUID of the app
2282
2284
  */
2283
2285
  async getPerms(t) {
2284
- return this.withRetry(Ks, [T(this, R), this.token(), t]);
2286
+ return this.withRetry(Ks, [T(this, _), this.token(), t]);
2285
2287
  }
2286
2288
  /**
2287
2289
  * Create a new app.
@@ -2310,7 +2312,7 @@ class _n {
2310
2312
  * @param fields.orgId -- Optional id of the org that the app will be placed in
2311
2313
  */
2312
2314
  async createApp(t) {
2313
- return this.withRetry(Dr, [T(this, R), this.token(), t]);
2315
+ return this.withRetry(Dr, [T(this, _), this.token(), t]);
2314
2316
  }
2315
2317
  /**
2316
2318
  * Create a new temporary app.
@@ -2335,7 +2337,7 @@ class _n {
2335
2337
  * @param fields.perms -- Optional permissions for the app
2336
2338
  */
2337
2339
  async createTemporaryApp(t) {
2338
- return Lr(T(this, R), t);
2340
+ return Lr(T(this, _), t);
2339
2341
  }
2340
2342
  /**
2341
2343
  * Update the title of an app by its id.
@@ -2351,7 +2353,7 @@ class _n {
2351
2353
  */
2352
2354
  async updateApp(t, s) {
2353
2355
  return this.withRetry(Mr, [
2354
- T(this, R),
2356
+ T(this, _),
2355
2357
  this.token(),
2356
2358
  t,
2357
2359
  s
@@ -2367,7 +2369,7 @@ class _n {
2367
2369
  * @param appId -- UUID of the app
2368
2370
  */
2369
2371
  async deleteApp(t) {
2370
- return this.withRetry(Fr, [T(this, R), this.token(), t]);
2372
+ return this.withRetry(Fr, [T(this, _), this.token(), t]);
2371
2373
  }
2372
2374
  /**
2373
2375
  * Dry-run a **schema push** and receive a _plan_ of steps the server would
@@ -2378,8 +2380,8 @@ class _n {
2378
2380
  * ```
2379
2381
  */
2380
2382
  async planSchemaPush(t, s) {
2381
- return this.withRetry(Rr, [
2382
- T(this, R),
2383
+ return this.withRetry(_r, [
2384
+ T(this, _),
2383
2385
  this.token(),
2384
2386
  t,
2385
2387
  s
@@ -2420,7 +2422,7 @@ class _n {
2420
2422
  await this.refreshToken();
2421
2423
  } catch {
2422
2424
  }
2423
- $r(T(this, R), this.token(), t, s).subscribe({
2425
+ $r(T(this, _), this.token(), t, s).subscribe({
2424
2426
  complete(n) {
2425
2427
  i(n);
2426
2428
  },
@@ -2450,15 +2452,15 @@ class _n {
2450
2452
  async pushPerms(t, s) {
2451
2453
  if (!T(this, O))
2452
2454
  throw new Ie();
2453
- return this.withRetry(qr, [T(this, R), this.token(), t, s]);
2455
+ return this.withRetry(qr, [T(this, _), this.token(), t, s]);
2454
2456
  }
2455
2457
  async tokenInfo() {
2456
2458
  if (!T(this, O))
2457
2459
  throw new Ie();
2458
- return this.withRetry(zr, [T(this, R), this.token()]);
2460
+ return this.withRetry(zr, [T(this, _), this.token()]);
2459
2461
  }
2460
2462
  }
2461
- O = new WeakMap(), R = new WeakMap();
2463
+ O = new WeakMap(), _ = new WeakMap();
2462
2464
  function Vr(r, t) {
2463
2465
  if (r == null) return {};
2464
2466
  var s = {};
@@ -2528,7 +2530,7 @@ const ms = {
2528
2530
  },
2529
2531
  VariableDeclarator: "variable declaration",
2530
2532
  YieldExpression: "yield expression"
2531
- }, Ye = (r) => r.type === "UpdateExpression" ? ms.UpdateExpression[`${r.prefix}`] : ms[r.type];
2533
+ }, Qe = (r) => r.type === "UpdateExpression" ? ms.UpdateExpression[`${r.prefix}`] : ms[r.type];
2532
2534
  var Kr = {
2533
2535
  AccessorIsGenerator: ({
2534
2536
  kind: r
@@ -2617,13 +2619,13 @@ var Kr = {
2617
2619
  }) => `Invalid identifier ${r}.`,
2618
2620
  InvalidLhs: ({
2619
2621
  ancestor: r
2620
- }) => `Invalid left-hand side in ${Ye(r)}.`,
2622
+ }) => `Invalid left-hand side in ${Qe(r)}.`,
2621
2623
  InvalidLhsBinding: ({
2622
2624
  ancestor: r
2623
- }) => `Binding invalid left-hand side in ${Ye(r)}.`,
2625
+ }) => `Binding invalid left-hand side in ${Qe(r)}.`,
2624
2626
  InvalidLhsOptionalChaining: ({
2625
2627
  ancestor: r
2626
- }) => `Invalid optional chaining in the left-hand side of ${Ye(r)}.`,
2628
+ }) => `Invalid optional chaining in the left-hand side of ${Qe(r)}.`,
2627
2629
  InvalidNumber: "Invalid number.",
2628
2630
  InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.",
2629
2631
  InvalidOrUnexpectedToken: ({
@@ -2772,7 +2774,7 @@ var Gr = Object.assign({
2772
2774
  PipeTopicUnused: "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",
2773
2775
  PipeUnparenthesizedBody: ({
2774
2776
  type: r
2775
- }) => `Hack-style pipe body cannot be an unparenthesized ${Ye({
2777
+ }) => `Hack-style pipe body cannot be an unparenthesized ${Qe({
2776
2778
  type: r
2777
2779
  })}; please wrap it in parentheses.`
2778
2780
  }, {});
@@ -3122,7 +3124,7 @@ var sa = (r) => class extends r {
3122
3124
  super.resetEndLocation(s, e), De(s);
3123
3125
  }
3124
3126
  };
3125
- class He {
3127
+ class Ke {
3126
3128
  constructor(t, s) {
3127
3129
  m(this, "token");
3128
3130
  m(this, "preserveSpace");
@@ -3130,10 +3132,10 @@ class He {
3130
3132
  }
3131
3133
  }
3132
3134
  const D = {
3133
- brace: new He("{"),
3134
- j_oTag: new He("<tag"),
3135
- j_cTag: new He("</tag"),
3136
- j_expr: new He("<tag>...</tag>", !0)
3135
+ brace: new Ke("{"),
3136
+ j_oTag: new Ke("<tag"),
3137
+ j_cTag: new Ke("</tag"),
3138
+ j_expr: new Ke("<tag>...</tag>", !0)
3137
3139
  }, I = !0, y = !0, bt = !0, Le = !0, le = !0, ia = !0;
3138
3140
  class Js {
3139
3141
  constructor(t, s = {}) {
@@ -3162,13 +3164,13 @@ function z(r, t) {
3162
3164
  binop: t
3163
3165
  });
3164
3166
  }
3165
- let Re = -1;
3167
+ let je = -1;
3166
3168
  const Vt = [], Ht = [], Kt = [], Jt = [], Wt = [], Xt = [];
3167
3169
  function g(r, t = {}) {
3168
- return ++Re, 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)), Re;
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;
3169
3171
  }
3170
3172
  function S(r, t = {}) {
3171
- return ++Re, zt.set(r, Re), 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)), Re;
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;
3172
3174
  }
3173
3175
  const ra = {
3174
3176
  bracketL: g("[", {
@@ -3613,7 +3615,7 @@ function fa(r) {
3613
3615
  function de(r) {
3614
3616
  return Ht[r];
3615
3617
  }
3616
- function Qe(r) {
3618
+ function Ze(r) {
3617
3619
  return Kt[r];
3618
3620
  }
3619
3621
  function da(r) {
@@ -5468,7 +5470,7 @@ const La = {
5468
5470
  clubs: "♣",
5469
5471
  hearts: "♥",
5470
5472
  diams: "♦"
5471
- }, Ma = /\r\n|[\r\n\u2028\u2029]/, Ke = new RegExp(Ma.source, "g");
5473
+ }, Ma = /\r\n|[\r\n\u2028\u2029]/, Je = new RegExp(Ma.source, "g");
5472
5474
  function Ne(r) {
5473
5475
  switch (r) {
5474
5476
  case 10:
@@ -5779,19 +5781,19 @@ var Ba = (r) => class extends r {
5779
5781
  this.state.canStartJSXElement = na(i);
5780
5782
  }
5781
5783
  };
5782
- class _a extends Zt {
5784
+ class Ra extends Zt {
5783
5785
  constructor() {
5784
5786
  super(...arguments);
5785
5787
  m(this, "tsNames", /* @__PURE__ */ new Map());
5786
5788
  }
5787
5789
  }
5788
- class Ra extends es {
5790
+ class _a extends es {
5789
5791
  constructor() {
5790
5792
  super(...arguments);
5791
5793
  m(this, "importsStack", []);
5792
5794
  }
5793
5795
  createScope(s) {
5794
- return this.importsStack.push(/* @__PURE__ */ new Set()), new _a(s);
5796
+ return this.importsStack.push(/* @__PURE__ */ new Set()), new Ra(s);
5795
5797
  }
5796
5798
  enter(s) {
5797
5799
  s === 512 && this.importsStack.push(/* @__PURE__ */ new Set()), super.enter(s);
@@ -5876,7 +5878,7 @@ class ja {
5876
5878
  return (this.currentFlags() & 8) > 0;
5877
5879
  }
5878
5880
  }
5879
- function Ze(r, t) {
5881
+ function et(r, t) {
5880
5882
  return (r ? 2 : 0) | (t ? 1 : 0);
5881
5883
  }
5882
5884
  class Ua {
@@ -6175,7 +6177,7 @@ var za = function(t) {
6175
6177
  const ws = {
6176
6178
  decBinOct: /* @__PURE__ */ new Set([46, 66, 69, 79, 95, 98, 101, 111]),
6177
6179
  hex: /* @__PURE__ */ new Set([46, 88, 95, 120])
6178
- }, Je = {
6180
+ }, We = {
6179
6181
  bin: (r) => r === 48 || r === 49,
6180
6182
  oct: (r) => r >= 48 && r <= 55,
6181
6183
  dec: (r) => r >= 48 && r <= 57,
@@ -6300,7 +6302,7 @@ function Lt(r, t, s, e, i, a, n, o) {
6300
6302
  };
6301
6303
  }
6302
6304
  function ii(r, t, s, e, i, a, n, o, c, h) {
6303
- const l = t, p = i === 16 ? ws.hex : ws.decBinOct, d = i === 16 ? Je.hex : i === 10 ? Je.dec : i === 8 ? Je.oct : Je.bin;
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;
6304
6306
  let f = !1, x = 0;
6305
6307
  for (let A = 0, F = a ?? 1 / 0; A < F; ++A) {
6306
6308
  const E = r.charCodeAt(t);
@@ -6497,8 +6499,8 @@ class Wa extends qa {
6497
6499
  const i = this.state.pos, a = this.input.indexOf(s, i + 2);
6498
6500
  if (a === -1)
6499
6501
  throw this.raise(u.UnterminatedComment, this.state.curPosition());
6500
- for (this.state.pos = a + s.length, Ke.lastIndex = i + 2; Ke.test(this.input) && Ke.lastIndex <= a; )
6501
- ++this.state.curLine, this.state.lineStart = Ke.lastIndex;
6502
+ for (this.state.pos = a + s.length, Je.lastIndex = i + 2; Je.test(this.input) && Je.lastIndex <= a; )
6503
+ ++this.state.curLine, this.state.lineStart = Je.lastIndex;
6502
6504
  if (this.isLookahead) return;
6503
6505
  const n = {
6504
6506
  type: "CommentBlock",
@@ -7360,7 +7362,7 @@ class tn extends Wa {
7360
7362
  s !== null && this.expectPlugin("destructuringPrivate", s);
7361
7363
  }
7362
7364
  }
7363
- class et {
7365
+ class tt {
7364
7366
  constructor() {
7365
7367
  m(this, "shorthandAssignLoc", null);
7366
7368
  m(this, "doubleProtoLoc", null);
@@ -7858,7 +7860,7 @@ var cn = (r) => class extends r {
7858
7860
  }));
7859
7861
  }
7860
7862
  getScopeHandler() {
7861
- return Ra;
7863
+ return _a;
7862
7864
  }
7863
7865
  tsIsIdentifier() {
7864
7866
  return N(this.state.type);
@@ -8748,7 +8750,7 @@ var cn = (r) => class extends r {
8748
8750
  }
8749
8751
  parseExprOp(e, i, a) {
8750
8752
  let n;
8751
- if (Qe(58) > a && !this.hasPrecedingLineBreak() && (this.isContextual(93) || (n = this.isContextual(120)))) {
8753
+ if (Ze(58) > a && !this.hasPrecedingLineBreak() && (this.isContextual(93) || (n = this.isContextual(120)))) {
8752
8754
  const o = this.startNodeAt(i);
8753
8755
  return o.expression = e, o.typeAnnotation = this.tsInType(() => (this.next(), this.match(75) ? (n && this.raise(u.UnexpectedKeyword, this.state.startLoc, {
8754
8756
  keyword: "const"
@@ -9643,7 +9645,7 @@ class yn extends rn {
9643
9645
  return s && (c = s.call(this, c, e)), c;
9644
9646
  }
9645
9647
  let a;
9646
- t ? a = !1 : (t = new et(), a = !0);
9648
+ t ? a = !1 : (t = new tt(), a = !0);
9647
9649
  const {
9648
9650
  type: n
9649
9651
  } = this.state;
@@ -9689,13 +9691,13 @@ class yn extends rn {
9689
9691
  parseExprOp(t, s, e) {
9690
9692
  if (this.isPrivateName(t)) {
9691
9693
  const a = this.getPrivateNameSV(t);
9692
- (e >= Qe(58) || !this.prodParam.hasIn || !this.match(58)) && this.raise(u.PrivateInExpectedIn, t, {
9694
+ (e >= Ze(58) || !this.prodParam.hasIn || !this.match(58)) && this.raise(u.PrivateInExpectedIn, t, {
9693
9695
  identifierName: a
9694
9696
  }), this.classScope.usePrivateName(a, t.loc.start);
9695
9697
  }
9696
9698
  const i = this.state.type;
9697
9699
  if (ha(i) && (this.prodParam.hasIn || !this.match(58))) {
9698
- let a = Qe(i);
9700
+ let a = Ze(i);
9699
9701
  if (a > e) {
9700
9702
  if (i === 39) {
9701
9703
  if (this.expectPlugin("pipelineOperator"), this.state.inFSharpPipelineDirectBody)
@@ -9705,7 +9707,7 @@ class yn extends rn {
9705
9707
  const n = this.startNodeAt(s);
9706
9708
  n.left = t, n.operator = this.state.value;
9707
9709
  const o = i === 41 || i === 42, c = i === 40;
9708
- c && (a = Qe(42)), this.next(), n.right = this.parseExprOpRightExpr(i, a);
9710
+ c && (a = Ze(42)), this.next(), n.right = this.parseExprOpRightExpr(i, a);
9709
9711
  const h = this.finishNode(n, o || c ? "LogicalExpression" : "BinaryExpression"), l = this.state.type;
9710
9712
  if (c && (l === 41 || l === 42) || o && l === 40)
9711
9713
  throw this.raise(u.MixingCoalesceWithLogical, this.state.startLoc);
@@ -9842,7 +9844,7 @@ class yn extends rn {
9842
9844
  maybeAsyncArrow: c,
9843
9845
  optionalChainMember: h
9844
9846
  } = e;
9845
- c && (this.expressionScope.enter(en()), n = new et()), h && (o.optional = i), i ? o.arguments = this.parseCallExpressionArguments(11) : o.arguments = this.parseCallExpressionArguments(11, t.type !== "Super", o, n);
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);
9846
9848
  let l = this.finishCallExpression(o, h);
9847
9849
  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;
9848
9850
  }
@@ -10022,7 +10024,7 @@ class yn extends rn {
10022
10024
  }
10023
10025
  }
10024
10026
  parseAsyncArrowUnaryFunction(t) {
10025
- this.prodParam.enter(Ze(!0, this.prodParam.hasYield));
10027
+ this.prodParam.enter(et(!0, this.prodParam.hasYield));
10026
10028
  const s = [this.parseIdentifier()];
10027
10029
  return this.prodParam.exit(), this.hasPrecedingLineBreak() && this.raise(u.LineTerminatorBeforeArrow, this.state.curPosition()), this.expect(19), this.parseArrowExpression(t, s, !0);
10028
10030
  }
@@ -10101,7 +10103,7 @@ class yn extends rn {
10101
10103
  this.next(), this.expressionScope.enter(Za());
10102
10104
  const i = this.state.maybeInArrowParameters, a = this.state.inFSharpPipelineDirectBody;
10103
10105
  this.state.maybeInArrowParameters = !0, this.state.inFSharpPipelineDirectBody = !1;
10104
- const n = this.state.startLoc, o = [], c = new et();
10106
+ const n = this.state.startLoc, o = [], c = new tt();
10105
10107
  let h = !0, l, p;
10106
10108
  for (; !this.match(11); ) {
10107
10109
  if (h)
@@ -10314,7 +10316,7 @@ class yn extends rn {
10314
10316
  t.id = null, t.generator = !1, t.async = s;
10315
10317
  }
10316
10318
  parseMethod(t, s, e, i, a, n, o = !1) {
10317
- this.initFunction(t, e), t.generator = s, this.scope.enter(18 | (o ? 64 : 0) | (a ? 32 : 0)), this.prodParam.enter(Ze(e, t.generator)), this.parseFunctionParams(t, i);
10319
+ this.initFunction(t, e), t.generator = s, this.scope.enter(18 | (o ? 64 : 0) | (a ? 32 : 0)), this.prodParam.enter(et(e, t.generator)), this.parseFunctionParams(t, i);
10318
10320
  const c = this.parseFunctionBodyAndFinish(t, n, !0);
10319
10321
  return this.prodParam.exit(), this.scope.exit(), c;
10320
10322
  }
@@ -10327,7 +10329,7 @@ class yn extends rn {
10327
10329
  }
10328
10330
  parseArrowExpression(t, s, e, i) {
10329
10331
  this.scope.enter(6);
10330
- let a = Ze(e, !1);
10332
+ let a = et(e, !1);
10331
10333
  !this.match(5) && this.prodParam.hasIn && (a |= 8), this.prodParam.enter(a), this.initFunction(t, e);
10332
10334
  const n = this.state.maybeInArrowParameters;
10333
10335
  return s && (this.state.maybeInArrowParameters = !0, this.setArrowFunctionParameters(t, s, i)), this.state.maybeInArrowParameters = !1, this.parseFunctionBody(t, !0), this.prodParam.exit(), this.scope.exit(), this.state.maybeInArrowParameters = n, this.finishNode(t, "ArrowFunctionExpression");
@@ -10891,7 +10893,7 @@ class gn extends yn {
10891
10893
  return x && h && this.raise(u.ForInUsing, f), (x || this.isContextual(102)) && f.declarations.length === 1 ? this.parseForIn(t, f, s) : (s !== null && this.unexpected(s), this.parseFor(t, f));
10892
10894
  }
10893
10895
  }
10894
- const i = this.isContextual(95), a = new et(), n = this.parseExpression(!0, a), o = this.isContextual(102);
10896
+ const i = this.isContextual(95), a = new tt(), n = this.parseExpression(!0, a), o = this.isContextual(102);
10895
10897
  if (o && (e && this.raise(u.ForOfLet, n), s === null && i && n.type === "Identifier" && this.raise(u.ForOfAsync, n)), o || this.match(58)) {
10896
10898
  this.checkDestructuringPrivate(a), this.toAssignable(n, !0);
10897
10899
  const c = o ? "ForOfStatement" : "ForInStatement";
@@ -11040,7 +11042,7 @@ class gn extends yn {
11040
11042
  const e = s & 2, i = !!(s & 1), a = i && !(s & 4), n = !!(s & 8);
11041
11043
  this.initFunction(t, n), this.match(55) && (e && this.raise(u.GeneratorInSingleStatementContext, this.state.startLoc), this.next(), t.generator = !0), i && (t.id = this.parseFunctionId(a));
11042
11044
  const o = this.state.maybeInArrowParameters;
11043
- return this.state.maybeInArrowParameters = !1, this.scope.enter(2), this.prodParam.enter(Ze(n, t.generator)), i || (t.id = this.parseFunctionId()), this.parseFunctionParams(t, !1), this.withSmartMixTopicForbiddingContext(() => {
11045
+ return this.state.maybeInArrowParameters = !1, this.scope.enter(2), this.prodParam.enter(et(n, t.generator)), i || (t.id = this.parseFunctionId()), this.parseFunctionParams(t, !1), this.withSmartMixTopicForbiddingContext(() => {
11044
11046
  this.parseFunctionBodyAndFinish(t, i ? "FunctionDeclaration" : "FunctionExpression");
11045
11047
  }), this.prodParam.exit(), this.scope.exit(), i && !e && this.registerFunctionStatementId(t), this.state.maybeInArrowParameters = o, t;
11046
11048
  }
@@ -11603,12 +11605,12 @@ function wn(r, t) {
11603
11605
  t = Object.assign({}, t);
11604
11606
  try {
11605
11607
  t.sourceType = "module";
11606
- const s = We(t, r), e = s.parse();
11608
+ const s = Xe(t, r), e = s.parse();
11607
11609
  if (s.sawUnambiguousESM)
11608
11610
  return e;
11609
11611
  if (s.ambiguousScriptDifferentAst)
11610
11612
  try {
11611
- return t.sourceType = "script", We(t, r).parse();
11613
+ return t.sourceType = "script", Xe(t, r).parse();
11612
11614
  } catch {
11613
11615
  }
11614
11616
  else
@@ -11616,13 +11618,13 @@ function wn(r, t) {
11616
11618
  return e;
11617
11619
  } catch (s) {
11618
11620
  try {
11619
- return t.sourceType = "script", We(t, r).parse();
11621
+ return t.sourceType = "script", Xe(t, r).parse();
11620
11622
  } catch {
11621
11623
  }
11622
11624
  throw s;
11623
11625
  }
11624
11626
  } else
11625
- return We(t, r).parse();
11627
+ return Xe(t, r).parse();
11626
11628
  }
11627
11629
  function Tn(r) {
11628
11630
  const t = {};
@@ -11631,7 +11633,7 @@ function Tn(r) {
11631
11633
  return t;
11632
11634
  }
11633
11635
  Tn(ra);
11634
- function We(r, t) {
11636
+ function Xe(r, t) {
11635
11637
  let s = ui;
11636
11638
  const e = /* @__PURE__ */ new Map();
11637
11639
  if (r != null && r.plugins) {
@@ -11658,7 +11660,7 @@ function An(r) {
11658
11660
  }
11659
11661
  return e;
11660
11662
  }
11661
- function tt(r) {
11663
+ function st(r) {
11662
11664
  if (!r)
11663
11665
  return null;
11664
11666
  switch (r.type) {
@@ -11676,7 +11678,7 @@ function tt(r) {
11676
11678
  throw new Error(
11677
11679
  `Unsupported key type in ObjectProperty: ${c.key.type}`
11678
11680
  );
11679
- n[h] = tt(c.value);
11681
+ n[h] = st(c.value);
11680
11682
  } else if (o.type !== "SpreadElement" && o.type !== "ObjectMethod")
11681
11683
  throw new Error(
11682
11684
  // @ts-expect-error: prop is `never` here
@@ -11689,7 +11691,7 @@ function tt(r) {
11689
11691
  case "ArrayExpression":
11690
11692
  return r.elements.map((n) => {
11691
11693
  if (!(n && n.type === "SpreadElement"))
11692
- return tt(n);
11694
+ return st(n);
11693
11695
  }).filter((n) => n !== void 0);
11694
11696
  case "ObjectProperty":
11695
11697
  const e = r;
@@ -11703,7 +11705,7 @@ function tt(r) {
11703
11705
  `Unsupported key type for standalone ObjectProperty: ${e.key.type}`
11704
11706
  );
11705
11707
  const a = {};
11706
- return a[i] = tt(e.value), a;
11708
+ return a[i] = st(e.value), a;
11707
11709
  case "StringLiteral":
11708
11710
  case "NumericLiteral":
11709
11711
  case "BooleanLiteral":
@@ -11904,7 +11906,7 @@ function En(r) {
11904
11906
  break;
11905
11907
  }
11906
11908
  case "links": {
11907
- s = tt(n.value) || {};
11909
+ s = st(n.value) || {};
11908
11910
  break;
11909
11911
  }
11910
11912
  case "rooms": {
@@ -12016,13 +12018,13 @@ const vs = (r, t, s) => ({
12016
12018
  namespace: r.reverse.on
12017
12019
  }
12018
12020
  };
12019
- }, st = (r, t) => {
12021
+ }, it = (r, t) => {
12020
12022
  const s = t.find((e) => e["forward-identity"][1] === r.namespace && e["forward-identity"][2] === r.attrName) || null;
12021
12023
  if (!s)
12022
12024
  throw new Error(`Attribute ${r.namespace}.${r.attrName} not found`);
12023
12025
  return s;
12024
12026
  }, we = (r, t) => {
12025
- const s = st(r.identifier, t);
12027
+ const s = it(r.identifier, t);
12026
12028
  return {
12027
12029
  "attr-id": s.id,
12028
12030
  "forward-identity": s["forward-identity"]
@@ -12034,9 +12036,9 @@ const vs = (r, t, s) => ({
12034
12036
  "remove-index": we,
12035
12037
  "remove-unique": we,
12036
12038
  "remove-required": we,
12037
- "delete-attr": (r, t) => st(r.identifier, t).id,
12039
+ "delete-attr": (r, t) => it(r.identifier, t).id,
12038
12040
  "update-attr": (r, t) => {
12039
- const s = st(r.identifier, t);
12041
+ const s = it(r.identifier, t);
12040
12042
  return {
12041
12043
  id: s.id,
12042
12044
  "forward-identity": r.partialAttr["forward-identity"] ? [
@@ -12103,7 +12105,7 @@ const vs = (r, t, s) => ({
12103
12105
  },
12104
12106
  "remove-data-type": we,
12105
12107
  "check-data-type": (r, t) => {
12106
- const s = st(r.identifier, t);
12108
+ const s = it(r.identifier, t);
12107
12109
  return {
12108
12110
  "attr-id": s.id,
12109
12111
  "checked-data-type": r["checked-data-type"],
@@ -12275,21 +12277,21 @@ const Hn = (r, t) => {
12275
12277
  ]);
12276
12278
  for (const P of k) {
12277
12279
  const M = E.get(P) || [], K = F.get(P) || [], xe = M.map(
12278
- (_) => A(_)
12279
- ), Ve = K.map(
12280
- (_) => A(_)
12281
- ), L = Ve.filter(
12282
- (_) => !xe.includes(_)
12280
+ (R) => A(R)
12281
+ ), He = K.map(
12282
+ (R) => A(R)
12283
+ ), L = He.filter(
12284
+ (R) => !xe.includes(R)
12283
12285
  ), Oe = xe.filter(
12284
- (_) => !Ve.includes(_)
12286
+ (R) => !He.includes(R)
12285
12287
  );
12286
12288
  xe.filter(
12287
- (_) => Ve.includes(_)
12288
- ).forEach((_) => {
12289
+ (R) => He.includes(R)
12290
+ ).forEach((R) => {
12289
12291
  const U = M.find(
12290
- (Pe) => A(Pe) === _
12292
+ (Pe) => A(Pe) === R
12291
12293
  ), J = K.find(
12292
- (Pe) => A(Pe) === _
12294
+ (Pe) => A(Pe) === R
12293
12295
  );
12294
12296
  !U || !J || i.push(
12295
12297
  ...Ds(
@@ -12312,9 +12314,9 @@ const Hn = (r, t) => {
12312
12314
  reverseEntityName: (ie = M[0]) == null ? void 0 : ie.reverse.on
12313
12315
  }
12314
12316
  );
12315
- mt.deleted.forEach((_) => {
12317
+ mt.deleted.forEach((R) => {
12316
12318
  const U = M.find(
12317
- (J) => A(J) === _
12319
+ (J) => A(J) === R
12318
12320
  );
12319
12321
  U && i.push({
12320
12322
  type: "delete-attr",
@@ -12323,16 +12325,16 @@ const Hn = (r, t) => {
12323
12325
  namespace: U.forward.on
12324
12326
  }
12325
12327
  });
12326
- }), mt.created.forEach((_) => {
12328
+ }), mt.created.forEach((R) => {
12327
12329
  const U = K.find(
12328
- (J) => A(J) === _
12330
+ (J) => A(J) === R
12329
12331
  );
12330
12332
  U && i.push(Cn(U));
12331
- }), mt.renamed.forEach((_) => {
12333
+ }), mt.renamed.forEach((R) => {
12332
12334
  const U = M.find(
12333
- (Pe) => A(Pe) === _.from
12335
+ (Pe) => A(Pe) === R.from
12334
12336
  ), J = K.find(
12335
- (Pe) => A(Pe) === _.to
12337
+ (Pe) => A(Pe) === R.to
12336
12338
  );
12337
12339
  !U || !J || (i.push({
12338
12340
  type: "update-attr",
@@ -12416,7 +12418,7 @@ const Hn = (r, t) => {
12416
12418
  export {
12417
12419
  pe as InstantOAuthError,
12418
12420
  Dn as OAuthHandler,
12419
- _n as PlatformApi,
12421
+ Rn as PlatformApi,
12420
12422
  Hs as ProgressPromise,
12421
12423
  be as SchemaValidationError,
12422
12424
  nt as apiSchemaToInstantSchemaDef,
@@ -12431,5 +12433,5 @@ export {
12431
12433
  Vn as schemaTypescriptFileToInstantSchema,
12432
12434
  Br as translatePlanSteps,
12433
12435
  Fn as validateSchema,
12434
- at as version
12436
+ _e as version
12435
12437
  };