@instantdb/react-common 0.22.131 → 0.22.132

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  var Ms = Object.defineProperty;
2
2
  var js = (t, e, n) => e in t ? Ms(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var p = (t, e, n) => js(t, typeof e != "symbol" ? e + "" : e, n);
4
- import br, { useRef as Ke, useCallback as le, useSyncExternalStore as Mt, useEffect as be, useMemo as jt, useState as _r } from "react";
5
- var Rt = { exports: {} }, Me = {};
4
+ import br, { useRef as Ke, useCallback as fe, useSyncExternalStore as jt, useEffect as _e, useMemo as Rt, useState as _r } from "react";
5
+ var $t = { exports: {} }, Me = {};
6
6
  /**
7
7
  * @license React
8
8
  * react-jsx-runtime.production.min.js
@@ -49,46 +49,46 @@ function $s() {
49
49
  return typeof _ == "function" ? _ : null;
50
50
  }
51
51
  var T = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
52
- function v(f) {
52
+ function S(f) {
53
53
  {
54
- for (var _ = arguments.length, S = new Array(_ > 1 ? _ - 1 : 0), O = 1; O < _; O++)
55
- S[O - 1] = arguments[O];
56
- E("error", f, S);
54
+ for (var _ = arguments.length, v = new Array(_ > 1 ? _ - 1 : 0), O = 1; O < _; O++)
55
+ v[O - 1] = arguments[O];
56
+ C("error", f, v);
57
57
  }
58
58
  }
59
- function E(f, _, S) {
59
+ function C(f, _, v) {
60
60
  {
61
61
  var O = T.ReactDebugCurrentFrame, I = O.getStackAddendum();
62
- I !== "" && (_ += "%s", S = S.concat([I]));
63
- var M = S.map(function(C) {
64
- return String(C);
62
+ I !== "" && (_ += "%s", v = v.concat([I]));
63
+ var M = v.map(function(P) {
64
+ return String(P);
65
65
  });
66
66
  M.unshift("Warning: " + _), Function.prototype.apply.call(console[f], console, M);
67
67
  }
68
68
  }
69
- var A = !1, j = !1, L = !1, q = !1, Pe = !1, We;
69
+ var A = !1, j = !1, N = !1, q = !1, ue = !1, We;
70
70
  We = Symbol.for("react.module.reference");
71
- function ht(f) {
72
- return !!(typeof f == "string" || typeof f == "function" || f === s || f === o || Pe || f === i || f === l || f === d || q || f === b || A || j || L || typeof f == "object" && f !== null && (f.$$typeof === y || f.$$typeof === h || f.$$typeof === a || f.$$typeof === c || f.$$typeof === u || // This needs to include all possible module reference object
71
+ function pt(f) {
72
+ return !!(typeof f == "string" || typeof f == "function" || f === s || f === o || ue || f === i || f === l || f === d || q || f === b || A || j || N || typeof f == "object" && f !== null && (f.$$typeof === y || f.$$typeof === h || f.$$typeof === a || f.$$typeof === c || f.$$typeof === u || // This needs to include all possible module reference object
73
73
  // types supported by any Flight configuration anywhere since
74
74
  // we don't know which Flight build this will end up being used
75
75
  // with.
76
76
  f.$$typeof === We || f.getModuleId !== void 0));
77
77
  }
78
- function pt(f, _, S) {
78
+ function yt(f, _, v) {
79
79
  var O = f.displayName;
80
80
  if (O)
81
81
  return O;
82
82
  var I = _.displayName || _.name || "";
83
- return I !== "" ? S + "(" + I + ")" : S;
83
+ return I !== "" ? v + "(" + I + ")" : v;
84
84
  }
85
- function Ce(f) {
85
+ function Qe(f) {
86
86
  return f.displayName || "Context";
87
87
  }
88
88
  function X(f) {
89
89
  if (f == null)
90
90
  return null;
91
- if (typeof f.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof f == "function")
91
+ if (typeof f.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof f == "function")
92
92
  return f.displayName || f.name || null;
93
93
  if (typeof f == "string")
94
94
  return f;
@@ -110,19 +110,19 @@ function $s() {
110
110
  switch (f.$$typeof) {
111
111
  case c:
112
112
  var _ = f;
113
- return Ce(_) + ".Consumer";
113
+ return Qe(_) + ".Consumer";
114
114
  case a:
115
- var S = f;
116
- return Ce(S._context) + ".Provider";
115
+ var v = f;
116
+ return Qe(v._context) + ".Provider";
117
117
  case u:
118
- return pt(f, f.render, "ForwardRef");
118
+ return yt(f, f.render, "ForwardRef");
119
119
  case h:
120
120
  var O = f.displayName || null;
121
121
  return O !== null ? O : X(f.type) || "Memo";
122
122
  case y: {
123
- var I = f, M = I._payload, C = I._init;
123
+ var I = f, M = I._payload, P = I._init;
124
124
  try {
125
- return X(C(M));
125
+ return X(P(M));
126
126
  } catch {
127
127
  return null;
128
128
  }
@@ -130,14 +130,14 @@ function $s() {
130
130
  }
131
131
  return null;
132
132
  }
133
- var re = Object.assign, ue = 0, fn, dn, hn, pn, yn, bn, _n;
133
+ var re = Object.assign, le = 0, Ce, dn, hn, pn, yn, bn, _n;
134
134
  function gn() {
135
135
  }
136
136
  gn.__reactDisabledLog = !0;
137
137
  function ss() {
138
138
  {
139
- if (ue === 0) {
140
- fn = console.log, dn = console.info, hn = console.warn, pn = console.error, yn = console.group, bn = console.groupCollapsed, _n = console.groupEnd;
139
+ if (le === 0) {
140
+ Ce = console.log, dn = console.info, hn = console.warn, pn = console.error, yn = console.group, bn = console.groupCollapsed, _n = console.groupEnd;
141
141
  var f = {
142
142
  configurable: !0,
143
143
  enumerable: !0,
@@ -154,12 +154,12 @@ function $s() {
154
154
  groupEnd: f
155
155
  });
156
156
  }
157
- ue++;
157
+ le++;
158
158
  }
159
159
  }
160
160
  function is() {
161
161
  {
162
- if (ue--, ue === 0) {
162
+ if (le--, le === 0) {
163
163
  var f = {
164
164
  configurable: !0,
165
165
  enumerable: !0,
@@ -167,7 +167,7 @@ function $s() {
167
167
  };
168
168
  Object.defineProperties(console, {
169
169
  log: re({}, f, {
170
- value: fn
170
+ value: Ce
171
171
  }),
172
172
  info: re({}, f, {
173
173
  value: dn
@@ -189,65 +189,65 @@ function $s() {
189
189
  })
190
190
  });
191
191
  }
192
- ue < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
192
+ le < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
193
193
  }
194
194
  }
195
- var yt = T.ReactCurrentDispatcher, bt;
196
- function Qe(f, _, S) {
195
+ var bt = T.ReactCurrentDispatcher, _t;
196
+ function Be(f, _, v) {
197
197
  {
198
- if (bt === void 0)
198
+ if (_t === void 0)
199
199
  try {
200
200
  throw Error();
201
201
  } catch (I) {
202
202
  var O = I.stack.trim().match(/\n( *(at )?)/);
203
- bt = O && O[1] || "";
203
+ _t = O && O[1] || "";
204
204
  }
205
205
  return `
206
- ` + bt + f;
206
+ ` + _t + f;
207
207
  }
208
208
  }
209
- var _t = !1, Be;
209
+ var gt = !1, Ge;
210
210
  {
211
211
  var os = typeof WeakMap == "function" ? WeakMap : Map;
212
- Be = new os();
212
+ Ge = new os();
213
213
  }
214
214
  function Tn(f, _) {
215
- if (!f || _t)
215
+ if (!f || gt)
216
216
  return "";
217
217
  {
218
- var S = Be.get(f);
219
- if (S !== void 0)
220
- return S;
218
+ var v = Ge.get(f);
219
+ if (v !== void 0)
220
+ return v;
221
221
  }
222
222
  var O;
223
- _t = !0;
223
+ gt = !0;
224
224
  var I = Error.prepareStackTrace;
225
225
  Error.prepareStackTrace = void 0;
226
226
  var M;
227
- M = yt.current, yt.current = null, ss();
227
+ M = bt.current, bt.current = null, ss();
228
228
  try {
229
229
  if (_) {
230
- var C = function() {
230
+ var P = function() {
231
231
  throw Error();
232
232
  };
233
- if (Object.defineProperty(C.prototype, "props", {
233
+ if (Object.defineProperty(P.prototype, "props", {
234
234
  set: function() {
235
235
  throw Error();
236
236
  }
237
237
  }), typeof Reflect == "object" && Reflect.construct) {
238
238
  try {
239
- Reflect.construct(C, []);
239
+ Reflect.construct(P, []);
240
240
  } catch (W) {
241
241
  O = W;
242
242
  }
243
- Reflect.construct(f, [], C);
243
+ Reflect.construct(f, [], P);
244
244
  } else {
245
245
  try {
246
- C.call();
246
+ P.call();
247
247
  } catch (W) {
248
248
  O = W;
249
249
  }
250
- f.call(C.prototype);
250
+ f.call(P.prototype);
251
251
  }
252
252
  } else {
253
253
  try {
@@ -259,59 +259,59 @@ function $s() {
259
259
  }
260
260
  } catch (W) {
261
261
  if (W && O && typeof W.stack == "string") {
262
- for (var k = W.stack.split(`
262
+ for (var E = W.stack.split(`
263
263
  `), z = O.stack.split(`
264
- `), $ = k.length - 1, x = z.length - 1; $ >= 1 && x >= 0 && k[$] !== z[x]; )
264
+ `), $ = E.length - 1, x = z.length - 1; $ >= 1 && x >= 0 && E[$] !== z[x]; )
265
265
  x--;
266
266
  for (; $ >= 1 && x >= 0; $--, x--)
267
- if (k[$] !== z[x]) {
267
+ if (E[$] !== z[x]) {
268
268
  if ($ !== 1 || x !== 1)
269
269
  do
270
- if ($--, x--, x < 0 || k[$] !== z[x]) {
270
+ if ($--, x--, x < 0 || E[$] !== z[x]) {
271
271
  var Y = `
272
- ` + k[$].replace(" at new ", " at ");
273
- return f.displayName && Y.includes("<anonymous>") && (Y = Y.replace("<anonymous>", f.displayName)), typeof f == "function" && Be.set(f, Y), Y;
272
+ ` + E[$].replace(" at new ", " at ");
273
+ return f.displayName && Y.includes("<anonymous>") && (Y = Y.replace("<anonymous>", f.displayName)), typeof f == "function" && Ge.set(f, Y), Y;
274
274
  }
275
275
  while ($ >= 1 && x >= 0);
276
276
  break;
277
277
  }
278
278
  }
279
279
  } finally {
280
- _t = !1, yt.current = M, is(), Error.prepareStackTrace = I;
280
+ gt = !1, bt.current = M, is(), Error.prepareStackTrace = I;
281
281
  }
282
- var me = f ? f.displayName || f.name : "", fe = me ? Qe(me) : "";
283
- return typeof f == "function" && Be.set(f, fe), fe;
282
+ var Se = f ? f.displayName || f.name : "", de = Se ? Be(Se) : "";
283
+ return typeof f == "function" && Ge.set(f, de), de;
284
284
  }
285
- function as(f, _, S) {
285
+ function as(f, _, v) {
286
286
  return Tn(f, !1);
287
287
  }
288
288
  function cs(f) {
289
289
  var _ = f.prototype;
290
290
  return !!(_ && _.isReactComponent);
291
291
  }
292
- function Ge(f, _, S) {
292
+ function He(f, _, v) {
293
293
  if (f == null)
294
294
  return "";
295
295
  if (typeof f == "function")
296
296
  return Tn(f, cs(f));
297
297
  if (typeof f == "string")
298
- return Qe(f);
298
+ return Be(f);
299
299
  switch (f) {
300
300
  case l:
301
- return Qe("Suspense");
301
+ return Be("Suspense");
302
302
  case d:
303
- return Qe("SuspenseList");
303
+ return Be("SuspenseList");
304
304
  }
305
305
  if (typeof f == "object")
306
306
  switch (f.$$typeof) {
307
307
  case u:
308
308
  return as(f.render);
309
309
  case h:
310
- return Ge(f.type, _, S);
310
+ return He(f.type, _, v);
311
311
  case y: {
312
312
  var O = f, I = O._payload, M = O._init;
313
313
  try {
314
- return Ge(M(I), _, S);
314
+ return He(M(I), _, v);
315
315
  } catch {
316
316
  }
317
317
  }
@@ -319,40 +319,40 @@ function $s() {
319
319
  return "";
320
320
  }
321
321
  var Ie = Object.prototype.hasOwnProperty, wn = {}, mn = T.ReactDebugCurrentFrame;
322
- function He(f) {
322
+ function Je(f) {
323
323
  if (f) {
324
- var _ = f._owner, S = Ge(f.type, f._source, _ ? _.type : null);
325
- mn.setExtraStackFrame(S);
324
+ var _ = f._owner, v = He(f.type, f._source, _ ? _.type : null);
325
+ mn.setExtraStackFrame(v);
326
326
  } else
327
327
  mn.setExtraStackFrame(null);
328
328
  }
329
- function us(f, _, S, O, I) {
329
+ function us(f, _, v, O, I) {
330
330
  {
331
331
  var M = Function.call.bind(Ie);
332
- for (var C in f)
333
- if (M(f, C)) {
334
- var k = void 0;
332
+ for (var P in f)
333
+ if (M(f, P)) {
334
+ var E = void 0;
335
335
  try {
336
- if (typeof f[C] != "function") {
337
- var z = Error((O || "React class") + ": " + S + " type `" + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof f[C] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
336
+ if (typeof f[P] != "function") {
337
+ var z = Error((O || "React class") + ": " + v + " type `" + P + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof f[P] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
338
338
  throw z.name = "Invariant Violation", z;
339
339
  }
340
- k = f[C](_, C, O, S, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
340
+ E = f[P](_, P, O, v, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
341
341
  } catch ($) {
342
- k = $;
342
+ E = $;
343
343
  }
344
- k && !(k instanceof Error) && (He(I), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", O || "React class", S, C, typeof k), He(null)), k instanceof Error && !(k.message in wn) && (wn[k.message] = !0, He(I), v("Failed %s type: %s", S, k.message), He(null));
344
+ E && !(E instanceof Error) && (Je(I), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", O || "React class", v, P, typeof E), Je(null)), E instanceof Error && !(E.message in wn) && (wn[E.message] = !0, Je(I), S("Failed %s type: %s", v, E.message), Je(null));
345
345
  }
346
346
  }
347
347
  }
348
348
  var ls = Array.isArray;
349
- function gt(f) {
349
+ function Tt(f) {
350
350
  return ls(f);
351
351
  }
352
352
  function fs(f) {
353
353
  {
354
- var _ = typeof Symbol == "function" && Symbol.toStringTag, S = _ && f[Symbol.toStringTag] || f.constructor.name || "Object";
355
- return S;
354
+ var _ = typeof Symbol == "function" && Symbol.toStringTag, v = _ && f[Symbol.toStringTag] || f.constructor.name || "Object";
355
+ return v;
356
356
  }
357
357
  }
358
358
  function ds(f) {
@@ -367,7 +367,7 @@ function $s() {
367
367
  }
368
368
  function vn(f) {
369
369
  if (ds(f))
370
- return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", fs(f)), Sn(f);
370
+ return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", fs(f)), Sn(f);
371
371
  }
372
372
  var An = T.ReactCurrentOwner, hs = {
373
373
  key: !0,
@@ -396,90 +396,90 @@ function $s() {
396
396
  }
397
397
  function _s(f, _) {
398
398
  {
399
- var S = function() {
400
- On || (On = !0, v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", _));
399
+ var v = function() {
400
+ On || (On = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", _));
401
401
  };
402
- S.isReactWarning = !0, Object.defineProperty(f, "key", {
403
- get: S,
402
+ v.isReactWarning = !0, Object.defineProperty(f, "key", {
403
+ get: v,
404
404
  configurable: !0
405
405
  });
406
406
  }
407
407
  }
408
408
  function gs(f, _) {
409
409
  {
410
- var S = function() {
411
- En || (En = !0, v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", _));
410
+ var v = function() {
411
+ En || (En = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", _));
412
412
  };
413
- S.isReactWarning = !0, Object.defineProperty(f, "ref", {
414
- get: S,
413
+ v.isReactWarning = !0, Object.defineProperty(f, "ref", {
414
+ get: v,
415
415
  configurable: !0
416
416
  });
417
417
  }
418
418
  }
419
- var Ts = function(f, _, S, O, I, M, C) {
420
- var k = {
419
+ var Ts = function(f, _, v, O, I, M, P) {
420
+ var E = {
421
421
  // This tag allows us to uniquely identify this as a React Element
422
422
  $$typeof: n,
423
423
  // Built-in properties that belong on the element
424
424
  type: f,
425
425
  key: _,
426
- ref: S,
427
- props: C,
426
+ ref: v,
427
+ props: P,
428
428
  // Record the component responsible for creating this element.
429
429
  _owner: M
430
430
  };
431
- return k._store = {}, Object.defineProperty(k._store, "validated", {
431
+ return E._store = {}, Object.defineProperty(E._store, "validated", {
432
432
  configurable: !1,
433
433
  enumerable: !1,
434
434
  writable: !0,
435
435
  value: !1
436
- }), Object.defineProperty(k, "_self", {
436
+ }), Object.defineProperty(E, "_self", {
437
437
  configurable: !1,
438
438
  enumerable: !1,
439
439
  writable: !1,
440
440
  value: O
441
- }), Object.defineProperty(k, "_source", {
441
+ }), Object.defineProperty(E, "_source", {
442
442
  configurable: !1,
443
443
  enumerable: !1,
444
444
  writable: !1,
445
445
  value: I
446
- }), Object.freeze && (Object.freeze(k.props), Object.freeze(k)), k;
446
+ }), Object.freeze && (Object.freeze(E.props), Object.freeze(E)), E;
447
447
  };
448
- function ws(f, _, S, O, I) {
448
+ function ws(f, _, v, O, I) {
449
449
  {
450
- var M, C = {}, k = null, z = null;
451
- S !== void 0 && (vn(S), k = "" + S), ys(_) && (vn(_.key), k = "" + _.key), ps(_) && (z = _.ref, bs(_, I));
450
+ var M, P = {}, E = null, z = null;
451
+ v !== void 0 && (vn(v), E = "" + v), ys(_) && (vn(_.key), E = "" + _.key), ps(_) && (z = _.ref, bs(_, I));
452
452
  for (M in _)
453
- Ie.call(_, M) && !hs.hasOwnProperty(M) && (C[M] = _[M]);
453
+ Ie.call(_, M) && !hs.hasOwnProperty(M) && (P[M] = _[M]);
454
454
  if (f && f.defaultProps) {
455
455
  var $ = f.defaultProps;
456
456
  for (M in $)
457
- C[M] === void 0 && (C[M] = $[M]);
457
+ P[M] === void 0 && (P[M] = $[M]);
458
458
  }
459
- if (k || z) {
459
+ if (E || z) {
460
460
  var x = typeof f == "function" ? f.displayName || f.name || "Unknown" : f;
461
- k && _s(C, x), z && gs(C, x);
461
+ E && _s(P, x), z && gs(P, x);
462
462
  }
463
- return Ts(f, k, z, I, O, An.current, C);
463
+ return Ts(f, E, z, I, O, An.current, P);
464
464
  }
465
465
  }
466
- var Tt = T.ReactCurrentOwner, kn = T.ReactDebugCurrentFrame;
467
- function we(f) {
466
+ var wt = T.ReactCurrentOwner, kn = T.ReactDebugCurrentFrame;
467
+ function me(f) {
468
468
  if (f) {
469
- var _ = f._owner, S = Ge(f.type, f._source, _ ? _.type : null);
470
- kn.setExtraStackFrame(S);
469
+ var _ = f._owner, v = He(f.type, f._source, _ ? _.type : null);
470
+ kn.setExtraStackFrame(v);
471
471
  } else
472
472
  kn.setExtraStackFrame(null);
473
473
  }
474
- var wt;
475
- wt = !1;
476
- function mt(f) {
474
+ var mt;
475
+ mt = !1;
476
+ function St(f) {
477
477
  return typeof f == "object" && f !== null && f.$$typeof === n;
478
478
  }
479
479
  function Pn() {
480
480
  {
481
- if (Tt.current) {
482
- var f = X(Tt.current.type);
481
+ if (wt.current) {
482
+ var f = X(wt.current.type);
483
483
  if (f)
484
484
  return `
485
485
 
@@ -496,10 +496,10 @@ Check the render method of \`` + f + "`.";
496
496
  {
497
497
  var _ = Pn();
498
498
  if (!_) {
499
- var S = typeof f == "string" ? f : f.displayName || f.name;
500
- S && (_ = `
499
+ var v = typeof f == "string" ? f : f.displayName || f.name;
500
+ v && (_ = `
501
501
 
502
- Check the top-level render call using <` + S + ">.");
502
+ Check the top-level render call using <` + v + ">.");
503
503
  }
504
504
  return _;
505
505
  }
@@ -509,30 +509,30 @@ Check the top-level render call using <` + S + ">.");
509
509
  if (!f._store || f._store.validated || f.key != null)
510
510
  return;
511
511
  f._store.validated = !0;
512
- var S = Ss(_);
513
- if (Cn[S])
512
+ var v = Ss(_);
513
+ if (Cn[v])
514
514
  return;
515
- Cn[S] = !0;
515
+ Cn[v] = !0;
516
516
  var O = "";
517
- f && f._owner && f._owner !== Tt.current && (O = " It was passed a child from " + X(f._owner.type) + "."), we(f), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', S, O), we(null);
517
+ f && f._owner && f._owner !== wt.current && (O = " It was passed a child from " + X(f._owner.type) + "."), me(f), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', v, O), me(null);
518
518
  }
519
519
  }
520
520
  function Mn(f, _) {
521
521
  {
522
522
  if (typeof f != "object")
523
523
  return;
524
- if (gt(f))
525
- for (var S = 0; S < f.length; S++) {
526
- var O = f[S];
527
- mt(O) && In(O, _);
524
+ if (Tt(f))
525
+ for (var v = 0; v < f.length; v++) {
526
+ var O = f[v];
527
+ St(O) && In(O, _);
528
528
  }
529
- else if (mt(f))
529
+ else if (St(f))
530
530
  f._store && (f._store.validated = !0);
531
531
  else if (f) {
532
532
  var I = m(f);
533
533
  if (typeof I == "function" && I !== f.entries)
534
- for (var M = I.call(f), C; !(C = M.next()).done; )
535
- mt(C.value) && In(C.value, _);
534
+ for (var M = I.call(f), P; !(P = M.next()).done; )
535
+ St(P.value) && In(P.value, _);
536
536
  }
537
537
  }
538
538
  }
@@ -541,97 +541,97 @@ Check the top-level render call using <` + S + ">.");
541
541
  var _ = f.type;
542
542
  if (_ == null || typeof _ == "string")
543
543
  return;
544
- var S;
544
+ var v;
545
545
  if (typeof _ == "function")
546
- S = _.propTypes;
546
+ v = _.propTypes;
547
547
  else if (typeof _ == "object" && (_.$$typeof === u || // Note: Memo only checks outer props here.
548
548
  // Inner props are checked in the reconciler.
549
549
  _.$$typeof === h))
550
- S = _.propTypes;
550
+ v = _.propTypes;
551
551
  else
552
552
  return;
553
- if (S) {
553
+ if (v) {
554
554
  var O = X(_);
555
- us(S, f.props, "prop", O, f);
556
- } else if (_.PropTypes !== void 0 && !wt) {
557
- wt = !0;
555
+ us(v, f.props, "prop", O, f);
556
+ } else if (_.PropTypes !== void 0 && !mt) {
557
+ mt = !0;
558
558
  var I = X(_);
559
- v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", I || "Unknown");
559
+ S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", I || "Unknown");
560
560
  }
561
- typeof _.getDefaultProps == "function" && !_.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
561
+ typeof _.getDefaultProps == "function" && !_.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
562
562
  }
563
563
  }
564
564
  function As(f) {
565
565
  {
566
- for (var _ = Object.keys(f.props), S = 0; S < _.length; S++) {
567
- var O = _[S];
566
+ for (var _ = Object.keys(f.props), v = 0; v < _.length; v++) {
567
+ var O = _[v];
568
568
  if (O !== "children" && O !== "key") {
569
- we(f), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", O), we(null);
569
+ me(f), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", O), me(null);
570
570
  break;
571
571
  }
572
572
  }
573
- f.ref !== null && (we(f), v("Invalid attribute `ref` supplied to `React.Fragment`."), we(null));
573
+ f.ref !== null && (me(f), S("Invalid attribute `ref` supplied to `React.Fragment`."), me(null));
574
574
  }
575
575
  }
576
576
  var jn = {};
577
- function Rn(f, _, S, O, I, M) {
577
+ function Rn(f, _, v, O, I, M) {
578
578
  {
579
- var C = ht(f);
580
- if (!C) {
581
- var k = "";
582
- (f === void 0 || typeof f == "object" && f !== null && Object.keys(f).length === 0) && (k += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
579
+ var P = pt(f);
580
+ if (!P) {
581
+ var E = "";
582
+ (f === void 0 || typeof f == "object" && f !== null && Object.keys(f).length === 0) && (E += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
583
583
  var z = ms();
584
- z ? k += z : k += Pn();
584
+ z ? E += z : E += Pn();
585
585
  var $;
586
- f === null ? $ = "null" : gt(f) ? $ = "array" : f !== void 0 && f.$$typeof === n ? ($ = "<" + (X(f.type) || "Unknown") + " />", k = " Did you accidentally export a JSX literal instead of a component?") : $ = typeof f, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", $, k);
586
+ f === null ? $ = "null" : Tt(f) ? $ = "array" : f !== void 0 && f.$$typeof === n ? ($ = "<" + (X(f.type) || "Unknown") + " />", E = " Did you accidentally export a JSX literal instead of a component?") : $ = typeof f, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", $, E);
587
587
  }
588
- var x = ws(f, _, S, I, M);
588
+ var x = ws(f, _, v, I, M);
589
589
  if (x == null)
590
590
  return x;
591
- if (C) {
591
+ if (P) {
592
592
  var Y = _.children;
593
593
  if (Y !== void 0)
594
594
  if (O)
595
- if (gt(Y)) {
596
- for (var me = 0; me < Y.length; me++)
597
- Mn(Y[me], f);
595
+ if (Tt(Y)) {
596
+ for (var Se = 0; Se < Y.length; Se++)
597
+ Mn(Y[Se], f);
598
598
  Object.freeze && Object.freeze(Y);
599
599
  } else
600
- v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
600
+ S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
601
601
  else
602
602
  Mn(Y, f);
603
603
  }
604
604
  if (Ie.call(_, "key")) {
605
- var fe = X(f), W = Object.keys(_).filter(function(Is) {
605
+ var de = X(f), W = Object.keys(_).filter(function(Is) {
606
606
  return Is !== "key";
607
- }), St = W.length > 0 ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}";
608
- if (!jn[fe + St]) {
607
+ }), vt = W.length > 0 ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}";
608
+ if (!jn[de + vt]) {
609
609
  var Cs = W.length > 0 ? "{" + W.join(": ..., ") + ": ...}" : "{}";
610
- v(`A props object containing a "key" prop is being spread into JSX:
610
+ S(`A props object containing a "key" prop is being spread into JSX:
611
611
  let props = %s;
612
612
  <%s {...props} />
613
613
  React keys must be passed directly to JSX without using spread:
614
614
  let props = %s;
615
- <%s key={someKey} {...props} />`, St, fe, Cs, fe), jn[fe + St] = !0;
615
+ <%s key={someKey} {...props} />`, vt, de, Cs, de), jn[de + vt] = !0;
616
616
  }
617
617
  }
618
618
  return f === s ? As(x) : vs(x), x;
619
619
  }
620
620
  }
621
- function Os(f, _, S) {
622
- return Rn(f, _, S, !0);
621
+ function Os(f, _, v) {
622
+ return Rn(f, _, v, !0);
623
623
  }
624
- function Es(f, _, S) {
625
- return Rn(f, _, S, !1);
624
+ function Es(f, _, v) {
625
+ return Rn(f, _, v, !1);
626
626
  }
627
627
  var ks = Es, Ps = Os;
628
628
  je.Fragment = s, je.jsx = ks, je.jsxs = Ps;
629
629
  }(), je;
630
630
  }
631
631
  var Ds = {};
632
- Ds.NODE_ENV === "production" ? Rt.exports = Rs() : Rt.exports = $s();
633
- var Je = Rt.exports;
634
- function F(t) {
632
+ Ds.NODE_ENV === "production" ? $t.exports = Rs() : $t.exports = $s();
633
+ var Ye = $t.exports;
634
+ function L(t) {
635
635
  if (typeof t == "number")
636
636
  return (Math.abs(t * 2654435761) >>> 0).toString(16);
637
637
  if (typeof t == "boolean")
@@ -650,7 +650,7 @@ function F(t) {
650
650
  let e = 2166136261;
651
651
  for (let n = 0; n < t.length; n++) {
652
652
  e ^= (n + 1) * 2654435761;
653
- const r = F(t[n]);
653
+ const r = L(t[n]);
654
654
  for (let s = 0; s < r.length; s++)
655
655
  e ^= r.charCodeAt(s), e *= 16777619, e = e >>> 0;
656
656
  }
@@ -660,23 +660,23 @@ function F(t) {
660
660
  let e = 2166136261;
661
661
  const n = Object.keys(t).sort();
662
662
  for (let r = 0; r < n.length; r++) {
663
- const s = n[r], i = F(s);
663
+ const s = n[r], i = L(s);
664
664
  e ^= parseInt(i, 16), e *= 16777619, e = e >>> 0;
665
- const o = F(t[s]);
665
+ const o = L(t[s]);
666
666
  e ^= parseInt(o, 16), e *= 16777619, e = e >>> 0;
667
667
  }
668
668
  return e.toString(16);
669
669
  }
670
- return F(String(t));
670
+ return L(String(t));
671
671
  }
672
672
  const D = {
673
673
  Remove: "remove",
674
674
  Replace: "replace",
675
675
  Add: "add"
676
- }, gr = Symbol.for("__MUTATIVE_PROXY_DRAFT__"), xs = Symbol("__MUTATIVE_RAW_RETURN_SYMBOL__"), tt = Symbol.iterator, J = {
676
+ }, gr = Symbol.for("__MUTATIVE_PROXY_DRAFT__"), xs = Symbol("__MUTATIVE_RAW_RETURN_SYMBOL__"), nt = Symbol.iterator, J = {
677
677
  mutable: "mutable",
678
678
  immutable: "immutable"
679
- }, Yt = {};
679
+ }, Zt = {};
680
680
  function Le(t, e) {
681
681
  return t instanceof Map ? t.has(e) : Object.prototype.hasOwnProperty.call(t, e);
682
682
  }
@@ -691,25 +691,25 @@ function xn(t, e) {
691
691
  }
692
692
  }
693
693
  }
694
- function Zt(t) {
694
+ function Xt(t) {
695
695
  return Object.getPrototypeOf(t) === Set.prototype;
696
696
  }
697
- function Xt(t) {
697
+ function en(t) {
698
698
  return Object.getPrototypeOf(t) === Map.prototype;
699
699
  }
700
700
  function H(t) {
701
701
  var e;
702
702
  return (e = t.copy) !== null && e !== void 0 ? e : t.original;
703
703
  }
704
- function _e(t) {
705
- return !!P(t);
704
+ function ge(t) {
705
+ return !!k(t);
706
706
  }
707
- function P(t) {
707
+ function k(t) {
708
708
  return typeof t != "object" ? null : t == null ? void 0 : t[gr];
709
709
  }
710
- function en(t) {
710
+ function tn(t) {
711
711
  var e;
712
- const n = P(t);
712
+ const n = k(t);
713
713
  return n ? (e = n.copy) !== null && e !== void 0 ? e : n.original : t;
714
714
  }
715
715
  function te(t, e) {
@@ -720,7 +720,7 @@ function te(t, e) {
720
720
  }
721
721
  function Tr(t, e = []) {
722
722
  if (Object.hasOwnProperty.call(t, "key")) {
723
- const n = t.parent.copy, r = P(ce(n, t.key));
723
+ const n = t.parent.copy, r = k(ce(n, t.key));
724
724
  if (r !== null && (r == null ? void 0 : r.original) !== t.original)
725
725
  return null;
726
726
  const s = t.parent.type === 3, i = s ? Array.from(t.parent.setMap.keys()).indexOf(t.key) : t.key;
@@ -738,28 +738,28 @@ function Tr(t, e = []) {
738
738
  }
739
739
  return e;
740
740
  }
741
- function ge(t) {
741
+ function Te(t) {
742
742
  return Array.isArray(t) ? 1 : t instanceof Map ? 2 : t instanceof Set ? 3 : 0;
743
743
  }
744
744
  function ce(t, e) {
745
- return ge(t) === 2 ? t.get(e) : t[e];
745
+ return Te(t) === 2 ? t.get(e) : t[e];
746
746
  }
747
747
  function ze(t, e, n) {
748
- ge(t) === 2 ? t.set(e, n) : t[e] = n;
748
+ Te(t) === 2 ? t.set(e, n) : t[e] = n;
749
749
  }
750
- function vt(t, e) {
751
- const n = P(t);
750
+ function At(t, e) {
751
+ const n = k(t);
752
752
  return (n ? H(n) : t)[e];
753
753
  }
754
754
  function ae(t, e) {
755
755
  return t === e ? t !== 0 || 1 / t === 1 / e : t !== t && e !== e;
756
756
  }
757
- function $t(t) {
757
+ function Dt(t) {
758
758
  if (t)
759
759
  for (; t.finalities.revoke.length > 0; )
760
760
  t.finalities.revoke.pop()();
761
761
  }
762
- function pe(t, e) {
762
+ function ye(t, e) {
763
763
  return e ? t : [""].concat(t).map((n) => {
764
764
  const r = `${n}`;
765
765
  return r.indexOf("/") === -1 && r.indexOf("~") === -1 ? r : r.replace(/~/g, "~0").replace(/\//g, "~1");
@@ -768,7 +768,7 @@ function pe(t, e) {
768
768
  function Us(t, e) {
769
769
  for (let n = 0; n < e.length - 1; n += 1) {
770
770
  const r = e[n];
771
- if (t = ce(ge(t) === 3 ? Array.from(t) : t, r), typeof t != "object")
771
+ if (t = ce(Te(t) === 3 ? Array.from(t) : t, r), typeof t != "object")
772
772
  throw new Error(`Cannot resolve patch at '${e.join("/")}'.`);
773
773
  }
774
774
  return t;
@@ -795,13 +795,13 @@ function wr(t, e) {
795
795
  if (Array.isArray(t))
796
796
  return Array.prototype.concat.call(t);
797
797
  if (t instanceof Set) {
798
- if (!Zt(t)) {
798
+ if (!Xt(t)) {
799
799
  const r = Object.getPrototypeOf(t).constructor;
800
800
  return new r(t.values());
801
801
  }
802
802
  return Set.prototype.difference ? Set.prototype.difference.call(t, /* @__PURE__ */ new Set()) : new Set(t.values());
803
803
  } else if (t instanceof Map) {
804
- if (!Xt(t)) {
804
+ if (!en(t)) {
805
805
  const r = Object.getPrototypeOf(t).constructor;
806
806
  return new r(t);
807
807
  }
@@ -830,7 +830,7 @@ function V(t) {
830
830
  }
831
831
  function $e(t) {
832
832
  if (!te(t))
833
- return en(t);
833
+ return tn(t);
834
834
  if (Array.isArray(t))
835
835
  return t.map($e);
836
836
  if (t instanceof Map) {
@@ -838,7 +838,7 @@ function $e(t) {
838
838
  r,
839
839
  $e(s)
840
840
  ]);
841
- if (!Xt(t)) {
841
+ if (!en(t)) {
842
842
  const r = Object.getPrototypeOf(t).constructor;
843
843
  return new r(n);
844
844
  }
@@ -846,7 +846,7 @@ function $e(t) {
846
846
  }
847
847
  if (t instanceof Set) {
848
848
  const n = Array.from(t).map($e);
849
- if (!Zt(t)) {
849
+ if (!Xt(t)) {
850
850
  const r = Object.getPrototypeOf(t).constructor;
851
851
  return new r(n);
852
852
  }
@@ -857,8 +857,8 @@ function $e(t) {
857
857
  e[n] = $e(t[n]);
858
858
  return e;
859
859
  }
860
- function nt(t) {
861
- return _e(t) ? $e(t) : t;
860
+ function rt(t) {
861
+ return ge(t) ? $e(t) : t;
862
862
  }
863
863
  function se(t) {
864
864
  var e;
@@ -867,7 +867,7 @@ function se(t) {
867
867
  function Un() {
868
868
  throw new Error("Cannot modify frozen object");
869
869
  }
870
- function Se(t, e, n, r, s) {
870
+ function ve(t, e, n, r, s) {
871
871
  {
872
872
  n = n ?? /* @__PURE__ */ new WeakMap(), r = r ?? [], s = s ?? [];
873
873
  const o = n.has(t) ? n.get(t) : t;
@@ -884,37 +884,37 @@ function Se(t, e, n, r, s) {
884
884
  } else
885
885
  r.push(o);
886
886
  }
887
- if (Object.isFrozen(t) || _e(t)) {
887
+ if (Object.isFrozen(t) || ge(t)) {
888
888
  r.pop(), s.pop();
889
889
  return;
890
890
  }
891
- switch (ge(t)) {
891
+ switch (Te(t)) {
892
892
  case 2:
893
893
  for (const [a, c] of t)
894
- Se(a, a, n, r, s), Se(c, a, n, r, s);
894
+ ve(a, a, n, r, s), ve(c, a, n, r, s);
895
895
  t.set = t.clear = t.delete = Un;
896
896
  break;
897
897
  case 3:
898
898
  for (const a of t)
899
- Se(a, a, n, r, s);
899
+ ve(a, a, n, r, s);
900
900
  t.add = t.clear = t.delete = Un;
901
901
  break;
902
902
  case 1:
903
903
  Object.freeze(t);
904
904
  let o = 0;
905
905
  for (const a of t)
906
- Se(a, o, n, r, s), o += 1;
906
+ ve(a, o, n, r, s), o += 1;
907
907
  break;
908
908
  default:
909
909
  Object.freeze(t), Object.keys(t).forEach((a) => {
910
910
  const c = t[a];
911
- Se(c, a, n, r, s);
911
+ ve(c, a, n, r, s);
912
912
  });
913
913
  }
914
914
  r.pop(), s.pop();
915
915
  }
916
- function tn(t, e) {
917
- const n = ge(t);
916
+ function nn(t, e) {
917
+ const n = Te(t);
918
918
  if (n === 0)
919
919
  Reflect.ownKeys(t).forEach((r) => {
920
920
  e(r, t[r], t);
@@ -927,13 +927,13 @@ function tn(t, e) {
927
927
  t.forEach((r, s) => e(s, r, t));
928
928
  }
929
929
  function mr(t, e, n) {
930
- if (_e(t) || !te(t, n) || e.has(t) || Object.isFrozen(t))
930
+ if (ge(t) || !te(t, n) || e.has(t) || Object.isFrozen(t))
931
931
  return;
932
932
  const r = t instanceof Set, s = r ? /* @__PURE__ */ new Map() : void 0;
933
- if (e.add(t), tn(t, (i, o) => {
933
+ if (e.add(t), nn(t, (i, o) => {
934
934
  var a;
935
- if (_e(o)) {
936
- const c = P(o);
935
+ if (ge(o)) {
936
+ const c = k(o);
937
937
  V(c);
938
938
  const u = !((a = c.assignedMap) === null || a === void 0) && a.size || c.operated ? c.copy : c.original;
939
939
  ze(r ? s : t, i, u);
@@ -950,12 +950,12 @@ function Ns(t, e) {
950
950
  const n = t.type === 3 ? t.setMap : t.copy;
951
951
  t.finalities.revoke.length > 1 && t.assignedMap.get(e) && n && mr(ce(n, e), t.finalities.handledSet, t.options);
952
952
  }
953
- function Dt(t) {
953
+ function xt(t) {
954
954
  t.type === 3 && t.copy && (t.copy.clear(), t.setMap.forEach((e) => {
955
- t.copy.add(en(e));
955
+ t.copy.add(tn(e));
956
956
  }));
957
957
  }
958
- function xt(t, e, n, r) {
958
+ function Ut(t, e, n, r) {
959
959
  if (t.operated && t.assignedMap && t.assignedMap.size > 0 && !t.finalized) {
960
960
  if (n && r) {
961
961
  const i = Tr(t);
@@ -964,14 +964,14 @@ function xt(t, e, n, r) {
964
964
  t.finalized = !0;
965
965
  }
966
966
  }
967
- function nn(t, e, n, r) {
968
- const s = P(n);
967
+ function rn(t, e, n, r) {
968
+ const s = k(n);
969
969
  s && (s.callbacks || (s.callbacks = []), s.callbacks.push((i, o) => {
970
970
  var a;
971
971
  const c = t.type === 3 ? t.setMap : t.copy;
972
972
  if (ae(ce(c, e), n)) {
973
973
  let u = s.original;
974
- s.copy && (u = s.copy), Dt(t), xt(t, r, i, o), t.options.enableAutoFreeze && (t.options.updatedValues = (a = t.options.updatedValues) !== null && a !== void 0 ? a : /* @__PURE__ */ new WeakMap(), t.options.updatedValues.set(u, s.original)), ze(c, e, u);
974
+ s.copy && (u = s.copy), xt(t), Ut(t, r, i, o), t.options.enableAutoFreeze && (t.options.updatedValues = (a = t.options.updatedValues) !== null && a !== void 0 ? a : /* @__PURE__ */ new WeakMap(), t.options.updatedValues.set(u, s.original)), ze(c, e, u);
975
975
  }
976
976
  }), t.options.enableAutoFreeze && s.finalities !== t.finalities && (t.options.enableAutoFreeze = !1)), te(n, t.options) && t.finalities.draft.push(() => {
977
977
  const i = t.type === 3 ? t.setMap : t.copy;
@@ -983,32 +983,32 @@ function Ks(t, e, n, r, s) {
983
983
  c.length < i.length && ([i, c] = [c, i], [n, r] = [r, n]);
984
984
  for (let u = 0; u < i.length; u += 1)
985
985
  if (o.get(u.toString()) && c[u] !== i[u]) {
986
- const l = e.concat([u]), d = pe(l, s);
986
+ const l = e.concat([u]), d = ye(l, s);
987
987
  n.push({
988
988
  op: D.Replace,
989
989
  path: d,
990
990
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
991
- value: nt(c[u])
991
+ value: rt(c[u])
992
992
  }), r.push({
993
993
  op: D.Replace,
994
994
  path: d,
995
995
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
996
- value: nt(i[u])
996
+ value: rt(i[u])
997
997
  });
998
998
  }
999
999
  for (let u = i.length; u < c.length; u += 1) {
1000
- const l = e.concat([u]), d = pe(l, s);
1000
+ const l = e.concat([u]), d = ye(l, s);
1001
1001
  n.push({
1002
1002
  op: D.Add,
1003
1003
  path: d,
1004
1004
  // If it is a draft, it needs to be deep cloned, and it may also be non-draft.
1005
- value: nt(c[u])
1005
+ value: rt(c[u])
1006
1006
  });
1007
1007
  }
1008
1008
  if (i.length < c.length) {
1009
1009
  const { arrayLengthAssignment: u = !0 } = a.enablePatches;
1010
1010
  if (u) {
1011
- const l = e.concat(["length"]), d = pe(l, s);
1011
+ const l = e.concat(["length"]), d = ye(l, s);
1012
1012
  r.push({
1013
1013
  op: D.Replace,
1014
1014
  path: d,
@@ -1016,7 +1016,7 @@ function Ks(t, e, n, r, s) {
1016
1016
  });
1017
1017
  } else
1018
1018
  for (let l = c.length; i.length < l; l -= 1) {
1019
- const d = e.concat([l - 1]), h = pe(d, s);
1019
+ const d = e.concat([l - 1]), h = ye(d, s);
1020
1020
  r.push({
1021
1021
  op: D.Remove,
1022
1022
  path: h
@@ -1026,10 +1026,10 @@ function Ks(t, e, n, r, s) {
1026
1026
  }
1027
1027
  function qs({ original: t, copy: e, assignedMap: n }, r, s, i, o) {
1028
1028
  n.forEach((a, c) => {
1029
- const u = ce(t, c), l = nt(ce(e, c)), d = a ? Le(t, c) ? D.Replace : D.Add : D.Remove;
1029
+ const u = ce(t, c), l = rt(ce(e, c)), d = a ? Le(t, c) ? D.Replace : D.Add : D.Remove;
1030
1030
  if (ae(u, l) && d === D.Replace)
1031
1031
  return;
1032
- const h = r.concat(c), y = pe(h, o);
1032
+ const h = r.concat(c), y = ye(h, o);
1033
1033
  s.push(d === D.Remove ? { op: d, path: y } : { op: d, path: y, value: l }), i.push(d === D.Add ? { op: D.Remove, path: y } : d === D.Remove ? { op: D.Add, path: y, value: u } : { op: D.Replace, path: y, value: u });
1034
1034
  });
1035
1035
  }
@@ -1037,7 +1037,7 @@ function zs({ original: t, copy: e }, n, r, s, i) {
1037
1037
  let o = 0;
1038
1038
  t.forEach((a) => {
1039
1039
  if (!e.has(a)) {
1040
- const c = n.concat([o]), u = pe(c, i);
1040
+ const c = n.concat([o]), u = ye(c, i);
1041
1041
  r.push({
1042
1042
  op: D.Remove,
1043
1043
  path: u,
@@ -1051,7 +1051,7 @@ function zs({ original: t, copy: e }, n, r, s, i) {
1051
1051
  o += 1;
1052
1052
  }), o = 0, e.forEach((a) => {
1053
1053
  if (!t.has(a)) {
1054
- const c = n.concat([o]), u = pe(c, i);
1054
+ const c = n.concat([o]), u = ye(c, i);
1055
1055
  r.push({
1056
1056
  op: D.Add,
1057
1057
  path: u,
@@ -1077,28 +1077,28 @@ function qe(t, e, n, r) {
1077
1077
  return zs(t, e, n, r, s);
1078
1078
  }
1079
1079
  }
1080
- const it = (t, e, n = !1) => {
1080
+ const ot = (t, e, n = !1) => {
1081
1081
  if (typeof t == "object" && t !== null && (!te(t, e) || n))
1082
1082
  throw new Error("Strict mode: Mutable data cannot be accessed directly, please use 'unsafe(callback)' wrap.");
1083
- }, Ut = {
1083
+ }, Lt = {
1084
1084
  get size() {
1085
- return H(P(this)).size;
1085
+ return H(k(this)).size;
1086
1086
  },
1087
1087
  has(t) {
1088
- return H(P(this)).has(t);
1088
+ return H(k(this)).has(t);
1089
1089
  },
1090
1090
  set(t, e) {
1091
- const n = P(this), r = H(n);
1092
- return (!r.has(t) || !ae(r.get(t), e)) && (V(n), se(n), n.assignedMap.set(t, !0), n.copy.set(t, e), nn(n, t, e, qe)), this;
1091
+ const n = k(this), r = H(n);
1092
+ return (!r.has(t) || !ae(r.get(t), e)) && (V(n), se(n), n.assignedMap.set(t, !0), n.copy.set(t, e), rn(n, t, e, qe)), this;
1093
1093
  },
1094
1094
  delete(t) {
1095
1095
  if (!this.has(t))
1096
1096
  return !1;
1097
- const e = P(this);
1097
+ const e = k(this);
1098
1098
  return V(e), se(e), e.original.has(t) ? e.assignedMap.set(t, !1) : e.assignedMap.delete(t), e.copy.delete(t), !0;
1099
1099
  },
1100
1100
  clear() {
1101
- const t = P(this);
1101
+ const t = k(this);
1102
1102
  if (this.size) {
1103
1103
  V(t), se(t), t.assignedMap = /* @__PURE__ */ new Map();
1104
1104
  for (const [e] of t.original)
@@ -1107,17 +1107,17 @@ const it = (t, e, n = !1) => {
1107
1107
  }
1108
1108
  },
1109
1109
  forEach(t, e) {
1110
- const n = P(this);
1110
+ const n = k(this);
1111
1111
  H(n).forEach((r, s) => {
1112
1112
  t.call(e, this.get(s), s, this);
1113
1113
  });
1114
1114
  },
1115
1115
  get(t) {
1116
1116
  var e, n;
1117
- const r = P(this), s = H(r).get(t), i = ((n = (e = r.options).mark) === null || n === void 0 ? void 0 : n.call(e, s, J)) === J.mutable;
1118
- if (r.options.strict && it(s, r.options, i), i || r.finalized || !te(s, r.options) || s !== r.original.get(t))
1117
+ const r = k(this), s = H(r).get(t), i = ((n = (e = r.options).mark) === null || n === void 0 ? void 0 : n.call(e, s, J)) === J.mutable;
1118
+ if (r.options.strict && ot(s, r.options, i), i || r.finalized || !te(s, r.options) || s !== r.original.get(t))
1119
1119
  return s;
1120
- const o = Yt.createDraft({
1120
+ const o = Zt.createDraft({
1121
1121
  original: s,
1122
1122
  parentDraft: r,
1123
1123
  key: t,
@@ -1127,12 +1127,12 @@ const it = (t, e, n = !1) => {
1127
1127
  return V(r), r.copy.set(t, o), o;
1128
1128
  },
1129
1129
  keys() {
1130
- return H(P(this)).keys();
1130
+ return H(k(this)).keys();
1131
1131
  },
1132
1132
  values() {
1133
1133
  const t = this.keys();
1134
1134
  return {
1135
- [tt]: () => this.values(),
1135
+ [nt]: () => this.values(),
1136
1136
  next: () => {
1137
1137
  const e = t.next();
1138
1138
  return e.done ? e : {
@@ -1145,7 +1145,7 @@ const it = (t, e, n = !1) => {
1145
1145
  entries() {
1146
1146
  const t = this.keys();
1147
1147
  return {
1148
- [tt]: () => this.entries(),
1148
+ [nt]: () => this.entries(),
1149
1149
  next: () => {
1150
1150
  const e = t.next();
1151
1151
  if (e.done)
@@ -1158,19 +1158,19 @@ const it = (t, e, n = !1) => {
1158
1158
  }
1159
1159
  };
1160
1160
  },
1161
- [tt]() {
1161
+ [nt]() {
1162
1162
  return this.entries();
1163
1163
  }
1164
- }, Vs = Reflect.ownKeys(Ut), Ln = (t, e, { isValuesIterator: n }) => () => {
1164
+ }, Vs = Reflect.ownKeys(Lt), Ln = (t, e, { isValuesIterator: n }) => () => {
1165
1165
  var r, s;
1166
1166
  const i = e.next();
1167
1167
  if (i.done)
1168
1168
  return i;
1169
1169
  const o = i.value;
1170
1170
  let a = t.setMap.get(o);
1171
- const c = P(a), u = ((s = (r = t.options).mark) === null || s === void 0 ? void 0 : s.call(r, a, J)) === J.mutable;
1172
- if (t.options.strict && it(o, t.options, u), !u && !c && te(o, t.options) && !t.finalized && t.original.has(o)) {
1173
- const l = Yt.createDraft({
1171
+ const c = k(a), u = ((s = (r = t.options).mark) === null || s === void 0 ? void 0 : s.call(r, a, J)) === J.mutable;
1172
+ if (t.options.strict && ot(o, t.options, u), !u && !c && te(o, t.options) && !t.finalized && t.original.has(o)) {
1173
+ const l = Zt.createDraft({
1174
1174
  original: o,
1175
1175
  parentDraft: t,
1176
1176
  key: o,
@@ -1183,41 +1183,41 @@ const it = (t, e, n = !1) => {
1183
1183
  done: !1,
1184
1184
  value: n ? a : [a, a]
1185
1185
  };
1186
- }, ot = {
1186
+ }, at = {
1187
1187
  get size() {
1188
- return P(this).setMap.size;
1188
+ return k(this).setMap.size;
1189
1189
  },
1190
1190
  has(t) {
1191
- const e = P(this);
1191
+ const e = k(this);
1192
1192
  if (e.setMap.has(t))
1193
1193
  return !0;
1194
1194
  V(e);
1195
- const n = P(t);
1195
+ const n = k(t);
1196
1196
  return !!(n && e.setMap.has(n.original));
1197
1197
  },
1198
1198
  add(t) {
1199
- const e = P(this);
1200
- return this.has(t) || (V(e), se(e), e.assignedMap.set(t, !0), e.setMap.set(t, t), nn(e, t, t, qe)), this;
1199
+ const e = k(this);
1200
+ return this.has(t) || (V(e), se(e), e.assignedMap.set(t, !0), e.setMap.set(t, t), rn(e, t, t, qe)), this;
1201
1201
  },
1202
1202
  delete(t) {
1203
1203
  if (!this.has(t))
1204
1204
  return !1;
1205
- const e = P(this);
1205
+ const e = k(this);
1206
1206
  V(e), se(e);
1207
- const n = P(t);
1207
+ const n = k(t);
1208
1208
  return n && e.setMap.has(n.original) ? (e.assignedMap.set(n.original, !1), e.setMap.delete(n.original)) : (!n && e.setMap.has(t) ? e.assignedMap.set(t, !1) : e.assignedMap.delete(t), e.setMap.delete(t));
1209
1209
  },
1210
1210
  clear() {
1211
1211
  if (!this.size)
1212
1212
  return;
1213
- const t = P(this);
1213
+ const t = k(this);
1214
1214
  V(t), se(t);
1215
1215
  for (const e of t.original)
1216
1216
  t.assignedMap.set(e, !1);
1217
1217
  t.setMap.clear();
1218
1218
  },
1219
1219
  values() {
1220
- const t = P(this);
1220
+ const t = k(this);
1221
1221
  V(t);
1222
1222
  const e = t.setMap.keys();
1223
1223
  return {
@@ -1226,7 +1226,7 @@ const it = (t, e, n = !1) => {
1226
1226
  };
1227
1227
  },
1228
1228
  entries() {
1229
- const t = P(this);
1229
+ const t = k(this);
1230
1230
  V(t);
1231
1231
  const e = t.setMap.keys();
1232
1232
  return {
@@ -1239,7 +1239,7 @@ const it = (t, e, n = !1) => {
1239
1239
  keys() {
1240
1240
  return this.values();
1241
1241
  },
1242
- [tt]() {
1242
+ [nt]() {
1243
1243
  return this.values();
1244
1244
  },
1245
1245
  forEach(t, e) {
@@ -1249,7 +1249,7 @@ const it = (t, e, n = !1) => {
1249
1249
  t.call(e, r.value, r.value, this), r = n.next();
1250
1250
  }
1251
1251
  };
1252
- Set.prototype.difference && Object.assign(ot, {
1252
+ Set.prototype.difference && Object.assign(at, {
1253
1253
  intersection(t) {
1254
1254
  return Set.prototype.intersection.call(new Set(this.values()), t);
1255
1255
  },
@@ -1272,7 +1272,7 @@ Set.prototype.difference && Object.assign(ot, {
1272
1272
  return Set.prototype.isDisjointFrom.call(new Set(this.values()), t);
1273
1273
  }
1274
1274
  });
1275
- const Ws = Reflect.ownKeys(ot), Sr = /* @__PURE__ */ new WeakSet(), vr = {
1275
+ const Ws = Reflect.ownKeys(at), Sr = /* @__PURE__ */ new WeakSet(), vr = {
1276
1276
  get(t, e, n) {
1277
1277
  var r, s;
1278
1278
  const i = (r = t.copy) === null || r === void 0 ? void 0 : r[e];
@@ -1284,20 +1284,20 @@ const Ws = Reflect.ownKeys(ot), Sr = /* @__PURE__ */ new WeakSet(), vr = {
1284
1284
  if (t.options.mark) {
1285
1285
  const u = e === "size" && (t.original instanceof Map || t.original instanceof Set) ? Reflect.get(t.original, e) : Reflect.get(t.original, e, n);
1286
1286
  if (o = t.options.mark(u, J), o === J.mutable)
1287
- return t.options.strict && it(u, t.options, !0), u;
1287
+ return t.options.strict && ot(u, t.options, !0), u;
1288
1288
  }
1289
1289
  const a = H(t);
1290
1290
  if (a instanceof Map && Vs.includes(e)) {
1291
1291
  if (e === "size")
1292
- return Object.getOwnPropertyDescriptor(Ut, "size").get.call(t.proxy);
1293
- const u = Ut[e];
1292
+ return Object.getOwnPropertyDescriptor(Lt, "size").get.call(t.proxy);
1293
+ const u = Lt[e];
1294
1294
  if (u)
1295
1295
  return u.bind(t.proxy);
1296
1296
  }
1297
1297
  if (a instanceof Set && Ws.includes(e)) {
1298
1298
  if (e === "size")
1299
- return Object.getOwnPropertyDescriptor(ot, "size").get.call(t.proxy);
1300
- const u = ot[e];
1299
+ return Object.getOwnPropertyDescriptor(at, "size").get.call(t.proxy);
1300
+ const u = at[e];
1301
1301
  if (u)
1302
1302
  return u.bind(t.proxy);
1303
1303
  }
@@ -1309,17 +1309,17 @@ const Ws = Reflect.ownKeys(ot), Sr = /* @__PURE__ */ new WeakSet(), vr = {
1309
1309
  ) : void 0;
1310
1310
  }
1311
1311
  const c = a[e];
1312
- if (t.options.strict && it(c, t.options), t.finalized || !te(c, t.options))
1312
+ if (t.options.strict && ot(c, t.options), t.finalized || !te(c, t.options))
1313
1313
  return c;
1314
- if (c === vt(t.original, e)) {
1315
- if (V(t), t.copy[e] = rn({
1314
+ if (c === At(t.original, e)) {
1315
+ if (V(t), t.copy[e] = sn({
1316
1316
  original: t.original[e],
1317
1317
  parentDraft: t,
1318
1318
  key: t.type === 1 ? Number(e) : e,
1319
1319
  finalities: t.finalities,
1320
1320
  options: t.options
1321
1321
  }), typeof o == "function") {
1322
- const u = P(t.copy[e]);
1322
+ const u = k(t.copy[e]);
1323
1323
  return V(u), se(u), u.copy;
1324
1324
  }
1325
1325
  return t.copy[e];
@@ -1336,8 +1336,8 @@ const Ws = Reflect.ownKeys(ot), Sr = /* @__PURE__ */ new WeakSet(), vr = {
1336
1336
  const i = xn(H(t), e);
1337
1337
  if (i != null && i.set)
1338
1338
  return i.set.call(t.proxy, n), !0;
1339
- const o = vt(H(t), e), a = P(o);
1340
- return a && ae(a.original, n) ? (t.copy[e] = n, t.assignedMap = (r = t.assignedMap) !== null && r !== void 0 ? r : /* @__PURE__ */ new Map(), t.assignedMap.set(e, !1), !0) : (ae(n, o) && (n !== void 0 || Le(t.original, e)) || (V(t), se(t), Le(t.original, e) && ae(n, t.original[e]) ? t.assignedMap.delete(e) : t.assignedMap.set(e, !0), t.copy[e] = n, nn(t, e, n, qe)), !0);
1339
+ const o = At(H(t), e), a = k(o);
1340
+ return a && ae(a.original, n) ? (t.copy[e] = n, t.assignedMap = (r = t.assignedMap) !== null && r !== void 0 ? r : /* @__PURE__ */ new Map(), t.assignedMap.set(e, !1), !0) : (ae(n, o) && (n !== void 0 || Le(t.original, e)) || (V(t), se(t), Le(t.original, e) && ae(n, t.original[e]) ? t.assignedMap.delete(e) : t.assignedMap.set(e, !0), t.copy[e] = n, rn(t, e, n, qe)), !0);
1341
1341
  },
1342
1342
  has(t, e) {
1343
1343
  return e in H(t);
@@ -1365,11 +1365,11 @@ const Ws = Reflect.ownKeys(ot), Sr = /* @__PURE__ */ new WeakSet(), vr = {
1365
1365
  },
1366
1366
  deleteProperty(t, e) {
1367
1367
  var n;
1368
- return t.type === 1 ? vr.set.call(this, t, e, void 0, t.proxy) : (vt(t.original, e) !== void 0 || e in t.original ? (V(t), se(t), t.assignedMap.set(e, !1)) : (t.assignedMap = (n = t.assignedMap) !== null && n !== void 0 ? n : /* @__PURE__ */ new Map(), t.assignedMap.delete(e)), t.copy && delete t.copy[e], !0);
1368
+ return t.type === 1 ? vr.set.call(this, t, e, void 0, t.proxy) : (At(t.original, e) !== void 0 || e in t.original ? (V(t), se(t), t.assignedMap.set(e, !1)) : (t.assignedMap = (n = t.assignedMap) !== null && n !== void 0 ? n : /* @__PURE__ */ new Map(), t.assignedMap.delete(e)), t.copy && delete t.copy[e], !0);
1369
1369
  }
1370
1370
  };
1371
- function rn(t) {
1372
- const { original: e, parentDraft: n, key: r, finalities: s, options: i } = t, o = ge(e), a = {
1371
+ function sn(t) {
1372
+ const { original: e, parentDraft: n, key: r, finalities: s, options: i } = t, o = Te(e), a = {
1373
1373
  type: o,
1374
1374
  finalized: !1,
1375
1375
  parent: n,
@@ -1387,34 +1387,34 @@ function rn(t) {
1387
1387
  const l = n;
1388
1388
  l.finalities.draft.push((d, h) => {
1389
1389
  var y, b;
1390
- const g = P(c);
1390
+ const g = k(c);
1391
1391
  let w = l.type === 3 ? l.setMap : l.copy;
1392
- const m = ce(w, r), T = P(m);
1392
+ const m = ce(w, r), T = k(m);
1393
1393
  if (T) {
1394
- let v = T.original;
1395
- T.operated && (v = en(m)), Dt(T), xt(T, qe, d, h), l.options.enableAutoFreeze && (l.options.updatedValues = (y = l.options.updatedValues) !== null && y !== void 0 ? y : /* @__PURE__ */ new WeakMap(), l.options.updatedValues.set(v, T.original)), ze(w, r, v);
1394
+ let S = T.original;
1395
+ T.operated && (S = tn(m)), xt(T), Ut(T, qe, d, h), l.options.enableAutoFreeze && (l.options.updatedValues = (y = l.options.updatedValues) !== null && y !== void 0 ? y : /* @__PURE__ */ new WeakMap(), l.options.updatedValues.set(S, T.original)), ze(w, r, S);
1396
1396
  }
1397
- (b = g.callbacks) === null || b === void 0 || b.forEach((v) => {
1398
- v(d, h);
1397
+ (b = g.callbacks) === null || b === void 0 || b.forEach((S) => {
1398
+ S(d, h);
1399
1399
  });
1400
1400
  });
1401
1401
  } else {
1402
- const l = P(c);
1402
+ const l = k(c);
1403
1403
  l.finalities.draft.push((d, h) => {
1404
- Dt(l), xt(l, qe, d, h);
1404
+ xt(l), Ut(l, qe, d, h);
1405
1405
  });
1406
1406
  }
1407
1407
  return c;
1408
1408
  }
1409
- Yt.createDraft = rn;
1409
+ Zt.createDraft = sn;
1410
1410
  function Qs(t, e, n, r, s) {
1411
1411
  var i;
1412
- const o = P(t), a = (i = o == null ? void 0 : o.original) !== null && i !== void 0 ? i : t, c = !!e.length;
1412
+ const o = k(t), a = (i = o == null ? void 0 : o.original) !== null && i !== void 0 ? i : t, c = !!e.length;
1413
1413
  if (o != null && o.operated)
1414
1414
  for (; o.finalities.draft.length > 0; )
1415
1415
  o.finalities.draft.pop()(n, r);
1416
1416
  const u = c ? e[0] : o ? o.operated ? o.copy : o.original : t;
1417
- return o && $t(o), s && Se(u, u, o == null ? void 0 : o.options.updatedValues), [
1417
+ return o && Dt(o), s && ve(u, u, o == null ? void 0 : o.options.updatedValues), [
1418
1418
  u,
1419
1419
  n && c ? [{ op: D.Replace, path: [], value: e[0] }] : n,
1420
1420
  r && c ? [{ op: D.Replace, path: [], value: a }] : r
@@ -1429,7 +1429,7 @@ function Bs(t, e) {
1429
1429
  };
1430
1430
  let s, i;
1431
1431
  e.enablePatches && (s = [], i = []);
1432
- const a = ((n = e.mark) === null || n === void 0 ? void 0 : n.call(e, t, J)) === J.mutable || !te(t, e) ? t : rn({
1432
+ const a = ((n = e.mark) === null || n === void 0 ? void 0 : n.call(e, t, J)) === J.mutable || !te(t, e) ? t : sn({
1433
1433
  original: t,
1434
1434
  parentDraft: null,
1435
1435
  finalities: r,
@@ -1443,10 +1443,10 @@ function Bs(t, e) {
1443
1443
  }
1444
1444
  ];
1445
1445
  }
1446
- function Lt(t) {
1446
+ function Ft(t) {
1447
1447
  const { rootDraft: e, value: n, useRawReturn: r = !1, isRoot: s = !0 } = t;
1448
- tn(n, (i, o, a) => {
1449
- const c = P(o);
1448
+ nn(n, (i, o, a) => {
1449
+ const c = k(o);
1450
1450
  if (c && e && c.finalities === e.finalities) {
1451
1451
  t.isContainDraft = !0;
1452
1452
  const u = c.original;
@@ -1455,20 +1455,20 @@ function Lt(t) {
1455
1455
  a.clear(), l.forEach((d) => a.add(i === d ? u : d));
1456
1456
  } else
1457
1457
  ze(a, i, u);
1458
- } else typeof o == "object" && o !== null && (t.value = o, t.isRoot = !1, Lt(t));
1458
+ } else typeof o == "object" && o !== null && (t.value = o, t.isRoot = !1, Ft(t));
1459
1459
  }), s && (t.isContainDraft || console.warn("The return value does not contain any draft, please use 'rawReturn()' to wrap the return value to improve performance."), r && console.warn("The return value contains drafts, please don't use 'rawReturn()' to wrap the return value."));
1460
1460
  }
1461
1461
  function Ar(t) {
1462
1462
  var e;
1463
- const n = P(t);
1463
+ const n = k(t);
1464
1464
  if (!te(t, n == null ? void 0 : n.options))
1465
1465
  return t;
1466
- const r = ge(t);
1466
+ const r = Te(t);
1467
1467
  if (n && !n.operated)
1468
1468
  return n.original;
1469
1469
  let s;
1470
1470
  function i() {
1471
- s = r === 2 ? Xt(t) ? new Map(t) : new (Object.getPrototypeOf(t)).constructor(t) : r === 3 ? Array.from(n.setMap.values()) : wr(t, n == null ? void 0 : n.options);
1471
+ s = r === 2 ? en(t) ? new Map(t) : new (Object.getPrototypeOf(t)).constructor(t) : r === 3 ? Array.from(n.setMap.values()) : wr(t, n == null ? void 0 : n.options);
1472
1472
  }
1473
1473
  if (n) {
1474
1474
  n.finalized = !0;
@@ -1479,19 +1479,19 @@ function Ar(t) {
1479
1479
  }
1480
1480
  } else
1481
1481
  s = t;
1482
- if (tn(s, (o, a) => {
1482
+ if (nn(s, (o, a) => {
1483
1483
  if (n && ae(ce(n.original, o), a))
1484
1484
  return;
1485
1485
  const c = Ar(a);
1486
1486
  c !== a && (s === t && i(), ze(s, o, c));
1487
1487
  }), r === 3) {
1488
1488
  const o = (e = n == null ? void 0 : n.original) !== null && e !== void 0 ? e : s;
1489
- return Zt(o) ? new Set(s) : new (Object.getPrototypeOf(o)).constructor(s);
1489
+ return Xt(o) ? new Set(s) : new (Object.getPrototypeOf(o)).constructor(s);
1490
1490
  }
1491
1491
  return s;
1492
1492
  }
1493
1493
  function Fn(t) {
1494
- if (!_e(t))
1494
+ if (!ge(t))
1495
1495
  throw new Error(`current() is only used for Draft, parameter: ${t}`);
1496
1496
  return Ar(t);
1497
1497
  }
@@ -1499,18 +1499,18 @@ const Gs = (t) => function e(n, r, s) {
1499
1499
  var i, o, a;
1500
1500
  if (typeof n == "function" && typeof r != "function")
1501
1501
  return function(A, ...j) {
1502
- return e(A, (L) => n.call(this, L, ...j), r);
1502
+ return e(A, (N) => n.call(this, N, ...j), r);
1503
1503
  };
1504
1504
  const c = n, u = r;
1505
1505
  let l = s;
1506
1506
  if (typeof r != "function" && (l = r), l !== void 0 && Object.prototype.toString.call(l) !== "[object Object]")
1507
1507
  throw new Error(`Invalid options: ${l}, 'options' should be an object.`);
1508
1508
  l = Object.assign(Object.assign({}, t), l);
1509
- const d = _e(c) ? Fn(c) : c, h = Array.isArray(l.mark) ? (A, j) => {
1510
- for (const L of l.mark) {
1511
- if (typeof L != "function")
1512
- throw new Error(`Invalid mark: ${L}, 'mark' should be a function.`);
1513
- const q = L(A, j);
1509
+ const d = ge(c) ? Fn(c) : c, h = Array.isArray(l.mark) ? (A, j) => {
1510
+ for (const N of l.mark) {
1511
+ if (typeof N != "function")
1512
+ throw new Error(`Invalid mark: ${N}, 'mark' should be a function.`);
1513
+ const q = N(A, j);
1514
1514
  if (q)
1515
1515
  return q;
1516
1516
  }
@@ -1528,43 +1528,43 @@ const Gs = (t) => function e(n, r, s) {
1528
1528
  throw new Error("Invalid base state: create() only supports plain objects, arrays, Set, Map or using mark() to mark the state as immutable.");
1529
1529
  return [m, T];
1530
1530
  }
1531
- let v;
1531
+ let S;
1532
1532
  try {
1533
- v = u(m);
1533
+ S = u(m);
1534
1534
  } catch (A) {
1535
- throw $t(P(m)), A;
1535
+ throw Dt(k(m)), A;
1536
1536
  }
1537
- const E = (A) => {
1538
- const j = P(m);
1539
- if (!_e(A)) {
1537
+ const C = (A) => {
1538
+ const j = k(m);
1539
+ if (!ge(A)) {
1540
1540
  if (A !== void 0 && !ae(A, m) && (j != null && j.operated))
1541
1541
  throw new Error("Either the value is returned as a new non-draft value, or only the draft is modified without returning any value.");
1542
1542
  const q = A == null ? void 0 : A[xs];
1543
1543
  if (q) {
1544
- const Pe = q[0];
1545
- return w.strict && typeof A == "object" && A !== null && Lt({
1544
+ const ue = q[0];
1545
+ return w.strict && typeof A == "object" && A !== null && Ft({
1546
1546
  rootDraft: j,
1547
1547
  value: A,
1548
1548
  useRawReturn: !0
1549
- }), T([Pe]);
1549
+ }), T([ue]);
1550
1550
  }
1551
1551
  if (A !== void 0)
1552
- return typeof A == "object" && A !== null && Lt({ rootDraft: j, value: A }), T([A]);
1552
+ return typeof A == "object" && A !== null && Ft({ rootDraft: j, value: A }), T([A]);
1553
1553
  }
1554
1554
  if (A === m || A === void 0)
1555
1555
  return T([]);
1556
- const L = P(A);
1557
- if (w === L.options) {
1558
- if (L.operated)
1556
+ const N = k(A);
1557
+ if (w === N.options) {
1558
+ if (N.operated)
1559
1559
  throw new Error("Cannot return a modified child draft.");
1560
1560
  return T([Fn(A)]);
1561
1561
  }
1562
1562
  return T([A]);
1563
1563
  };
1564
- return v instanceof Promise ? v.then(E, (A) => {
1565
- throw $t(P(m)), A;
1566
- }) : E(v);
1567
- }, at = Gs();
1564
+ return S instanceof Promise ? S.then(C, (A) => {
1565
+ throw Dt(k(m)), A;
1566
+ }) : C(S);
1567
+ }, ct = Gs();
1568
1568
  Object.prototype.constructor.toString();
1569
1569
  function Or(t, e) {
1570
1570
  const n = Object.keys(t), r = Object.keys(e);
@@ -1573,10 +1573,10 @@ function Or(t, e) {
1573
1573
  function Nn(t, e) {
1574
1574
  return Object.keys(t).length === Object.keys(e).length && Object.keys(t).every((n) => e.hasOwnProperty(n) && t[n] === e[n]);
1575
1575
  }
1576
- function rt(t, e) {
1577
- return typeof t != "object" || typeof e != "object" || t === null || e === null ? t === e : Or(t, e) ? Object.keys(t).every((n) => rt(t[n], e[n])) : !1;
1576
+ function st(t, e) {
1577
+ return typeof t != "object" || typeof e != "object" || t === null || e === null ? t === e : Or(t, e) ? Object.keys(t).every((n) => st(t[n], e[n])) : !1;
1578
1578
  }
1579
- function sn(t) {
1579
+ function on(t) {
1580
1580
  if (!De(t))
1581
1581
  return t;
1582
1582
  const e = {};
@@ -1931,7 +1931,7 @@ function di(t, e) {
1931
1931
  return null;
1932
1932
  }
1933
1933
  }
1934
- function Ft(t) {
1934
+ function Nt(t) {
1935
1935
  for (const e of fi) {
1936
1936
  const n = di(e, t);
1937
1937
  if (n)
@@ -1942,19 +1942,19 @@ function Ft(t) {
1942
1942
  function hi(t) {
1943
1943
  try {
1944
1944
  const e = JSON.parse(t);
1945
- return typeof e == "string" ? Ft(e) : null;
1945
+ return typeof e == "string" ? Nt(e) : null;
1946
1946
  } catch {
1947
1947
  return null;
1948
1948
  }
1949
1949
  }
1950
- function lt(t) {
1950
+ function ft(t) {
1951
1951
  if (t !== void 0) {
1952
1952
  if (t === null)
1953
1953
  return null;
1954
1954
  if (t instanceof Date)
1955
1955
  return t;
1956
1956
  if (typeof t == "string") {
1957
- const e = Ft(t) || hi(t) || Ft(t.trim());
1957
+ const e = Nt(t) || hi(t) || Nt(t.trim());
1958
1958
  if (!e)
1959
1959
  throw new Error(`Unable to parse \`${t}\` as a date.`);
1960
1960
  return e;
@@ -1963,7 +1963,7 @@ function lt(t) {
1963
1963
  throw new Error(`Invalid date value \`${t}\`. Expected a date, number, or string, got type ${typeof t}.`);
1964
1964
  }
1965
1965
  }
1966
- class ye {
1966
+ class be {
1967
1967
  constructor(e, n) {
1968
1968
  p(this, "attrs");
1969
1969
  p(this, "linkIndex");
@@ -1994,7 +1994,7 @@ class ye {
1994
1994
  return this._blobAttrs;
1995
1995
  this._blobAttrs = /* @__PURE__ */ new Map();
1996
1996
  for (const e of Object.values(this.attrs))
1997
- if (an(e)) {
1997
+ if (cn(e)) {
1998
1998
  const [n, r, s] = e["forward-identity"];
1999
1999
  Q(this.blobAttrs, [r, s], e);
2000
2000
  }
@@ -2041,13 +2041,13 @@ class ye {
2041
2041
  function pi(t) {
2042
2042
  return t.cardinality === "one";
2043
2043
  }
2044
- function on(t) {
2044
+ function an(t) {
2045
2045
  return t["value-type"] === "ref";
2046
2046
  }
2047
- function an(t) {
2047
+ function cn(t) {
2048
2048
  return t["value-type"] === "blob";
2049
2049
  }
2050
- function ke(t, e) {
2050
+ function Pe(t, e) {
2051
2051
  return e.reduce((n, r) => n && n.get(r), t);
2052
2052
  }
2053
2053
  function ee(t, e) {
@@ -2079,7 +2079,7 @@ function Pr(t, e, n) {
2079
2079
  console.warn("no such attr", c, a);
2080
2080
  continue;
2081
2081
  }
2082
- l["checked-data-type"] === "date" && n && (u = lt(u), o[2] = u), on(l) && Q(i, [u, c, a], o), Q(r, [a, c, u], o), Q(s, [c, a, u], o);
2082
+ l["checked-data-type"] === "date" && n && (u = ft(u), o[2] = u), an(l) && Q(i, [u, c, a], o), Q(r, [a, c, u], o), Q(s, [c, a, u], o);
2083
2083
  }
2084
2084
  return { eav: r, aev: s, vae: i };
2085
2085
  }
@@ -2096,12 +2096,12 @@ function Ir(t, e) {
2096
2096
  }
2097
2097
  function Mr(t, e) {
2098
2098
  if (t)
2099
- return new ye(t.attrs, t.linkIndex);
2099
+ return new be(t.attrs, t.linkIndex);
2100
2100
  if (e && "__type" in e)
2101
- return new ye(e.attrs, e.linkIndex);
2101
+ return new be(e.attrs, e.linkIndex);
2102
2102
  }
2103
2103
  function yi(t, e) {
2104
- return ke(t.eav, [e]) !== void 0;
2104
+ return Pe(t.eav, [e]) !== void 0;
2105
2105
  }
2106
2106
  function xe(t, e, n, r) {
2107
2107
  const s = Pr(t, e, r);
@@ -2139,13 +2139,13 @@ function jr(t, e, n) {
2139
2139
  if (!r)
2140
2140
  return;
2141
2141
  const [s, i, o] = r, a = e.getAttr(i);
2142
- a && (ee(t.eav, [s, i, o]), ee(t.aev, [i, s, o]), on(a) && ee(t.vae, [o, i, s]));
2142
+ a && (ee(t.eav, [s, i, o]), ee(t.aev, [i, s, o]), an(a) && ee(t.vae, [o, i, s]));
2143
2143
  }
2144
2144
  let bi = 0;
2145
2145
  function Rr(t, e, n) {
2146
2146
  const [r, s, i] = n;
2147
2147
  let o;
2148
- const a = ke(t.eav, [r, s, i]);
2148
+ const a = Pe(t.eav, [r, s, i]);
2149
2149
  return a && (o = a[3]), o || Date.now() * 10 + bi++;
2150
2150
  }
2151
2151
  function $r(t, e, n) {
@@ -2156,9 +2156,9 @@ function $r(t, e, n) {
2156
2156
  const a = e.getAttr(i);
2157
2157
  if (!a)
2158
2158
  return;
2159
- a["checked-data-type"] === "date" && t.useDateObjects && (o = lt(o));
2160
- const c = ke(t.eav, [s, i, o]), u = (c == null ? void 0 : c[3]) ?? Rr(t, a, r), l = [s, i, o, u];
2161
- pi(a) ? (Q(t.eav, [s, i], /* @__PURE__ */ new Map([[o, l]])), Q(t.aev, [i, s], /* @__PURE__ */ new Map([[o, l]]))) : (Q(t.eav, [s, i, o], l), Q(t.aev, [i, s, o], l)), on(a) && Q(t.vae, [o, i, s], l);
2159
+ a["checked-data-type"] === "date" && t.useDateObjects && (o = ft(o));
2160
+ const c = Pe(t.eav, [s, i, o]), u = (c == null ? void 0 : c[3]) ?? Rr(t, a, r), l = [s, i, o, u];
2161
+ pi(a) ? (Q(t.eav, [s, i], /* @__PURE__ */ new Map([[o, l]])), Q(t.aev, [i, s], /* @__PURE__ */ new Map([[o, l]]))) : (Q(t.eav, [s, i, o], l), Q(t.aev, [i, s, o], l)), an(a) && Q(t.vae, [o, i, s], l);
2162
2162
  }
2163
2163
  function _i(t, e, n) {
2164
2164
  var y;
@@ -2168,9 +2168,9 @@ function _i(t, e, n) {
2168
2168
  const [s, i, o] = r, a = e.getAttr(i);
2169
2169
  if (!a)
2170
2170
  return;
2171
- if (!an(a))
2171
+ if (!cn(a))
2172
2172
  throw new Error("merge operation is not supported for links");
2173
- const c = ke(t.eav, [s, i]);
2173
+ const c = Pe(t.eav, [s, i]);
2174
2174
  if (!c)
2175
2175
  return;
2176
2176
  const u = (y = c.values().next()) == null ? void 0 : y.value;
@@ -2184,7 +2184,7 @@ function _i(t, e, n) {
2184
2184
  ];
2185
2185
  Q(t.eav, [s, i], /* @__PURE__ */ new Map([[d, h]])), Q(t.aev, [i, s], /* @__PURE__ */ new Map([[d, h]]));
2186
2186
  }
2187
- function Nt(t, e, n) {
2187
+ function Kt(t, e, n) {
2188
2188
  var u, l;
2189
2189
  const [r, s] = n, i = Ve(t, [r]);
2190
2190
  if (!i)
@@ -2195,7 +2195,7 @@ function Nt(t, e, n) {
2195
2195
  const h = e.getAttr(d);
2196
2196
  h && h["on-delete-reverse"] === "cascade" && B(a.get(d), 1).forEach(([y, b, g]) => {
2197
2197
  var w;
2198
- return Nt(t, e, [g, (w = h["reverse-identity"]) == null ? void 0 : w[1]]);
2198
+ return Kt(t, e, [g, (w = h["reverse-identity"]) == null ? void 0 : w[1]]);
2199
2199
  }), // Fall back to deleting everything if we've rehydrated tx-steps from
2200
2200
  // the store that didn't set `etype` in deleteEntity
2201
2201
  (!s || // If we don't know about the attr, let's just get rid of it
@@ -2208,7 +2208,7 @@ function Nt(t, e, n) {
2208
2208
  c && c.forEach((d) => {
2209
2209
  var w, m, T;
2210
2210
  const [h, y, b] = d, g = e.getAttr(y);
2211
- (!s || !g || ((w = g["reverse-identity"]) == null ? void 0 : w[1]) === s) && (ee(t.eav, [h, y, b]), ee(t.aev, [y, h, b]), ee(t.vae, [b, y, h])), g && g["on-delete"] === "cascade" && ((m = g["reverse-identity"]) == null ? void 0 : m[1]) === s && Nt(t, e, [h, (T = g["forward-identity"]) == null ? void 0 : T[1]]);
2211
+ (!s || !g || ((w = g["reverse-identity"]) == null ? void 0 : w[1]) === s) && (ee(t.eav, [h, y, b]), ee(t.aev, [y, h, b]), ee(t.vae, [b, y, h])), g && g["on-delete"] === "cascade" && ((m = g["reverse-identity"]) == null ? void 0 : m[1]) === s && Kt(t, e, [h, (T = g["forward-identity"]) == null ? void 0 : T[1]]);
2212
2212
  }), ((l = t.vae.get(o)) == null ? void 0 : l.size) === 0 && ee(t.vae, [o]);
2213
2213
  }
2214
2214
  function Dr(t, e, n) {
@@ -2245,7 +2245,7 @@ function mi(t, e, n) {
2245
2245
  jr(t, e, s);
2246
2246
  break;
2247
2247
  case "delete-entity":
2248
- Nt(t, e, s);
2248
+ Kt(t, e, s);
2249
2249
  break;
2250
2250
  case "add-attr":
2251
2251
  gi(e, s);
@@ -2276,7 +2276,7 @@ function B(t, e, n = []) {
2276
2276
  B(r, e - 1, n);
2277
2277
  return n;
2278
2278
  }
2279
- function Ye(t, e, n) {
2279
+ function Ze(t, e, n) {
2280
2280
  var i;
2281
2281
  const r = [];
2282
2282
  if (n != null && n.hasOwnProperty("$not")) {
@@ -2326,7 +2326,7 @@ function vi(t, [e, n, r]) {
2326
2326
  }
2327
2327
  case "eav": {
2328
2328
  const a = (o = t.eav.get(e)) == null ? void 0 : o.get(n);
2329
- return a ? Ye(t, a, r) : [];
2329
+ return a ? Ze(t, a, r) : [];
2330
2330
  }
2331
2331
  case "ev": {
2332
2332
  const a = t.eav.get(e);
@@ -2334,7 +2334,7 @@ function vi(t, [e, n, r]) {
2334
2334
  return [];
2335
2335
  const c = [];
2336
2336
  for (const u of a.values())
2337
- c.push(...Ye(t, u, r));
2337
+ c.push(...Ze(t, u, r));
2338
2338
  return c;
2339
2339
  }
2340
2340
  case "a": {
@@ -2347,14 +2347,14 @@ function vi(t, [e, n, r]) {
2347
2347
  return [];
2348
2348
  const c = [];
2349
2349
  for (const u of a.values())
2350
- c.push(...Ye(t, u, r));
2350
+ c.push(...Ze(t, u, r));
2351
2351
  return c;
2352
2352
  }
2353
2353
  case "v": {
2354
2354
  const a = [];
2355
2355
  for (const c of t.eav.values())
2356
2356
  for (const u of c.values())
2357
- a.push(...Ye(t, u, r));
2357
+ a.push(...Ze(t, u, r));
2358
2358
  return a;
2359
2359
  }
2360
2360
  default:
@@ -2377,7 +2377,7 @@ function U(t, e, n) {
2377
2377
  var r;
2378
2378
  return (r = t.forwardIdents.get(e)) == null ? void 0 : r.get(n);
2379
2379
  }
2380
- function Te(t, e, n) {
2380
+ function we(t, e, n) {
2381
2381
  var r;
2382
2382
  return (r = t.revIdents.get(e)) == null ? void 0 : r.get(n);
2383
2383
  }
@@ -2395,7 +2395,7 @@ function Ei(t, e, n) {
2395
2395
  return;
2396
2396
  const [s, i, o] = r;
2397
2397
  if (e.getAttr(i))
2398
- return ke(t.eav, [s, i]);
2398
+ return Pe(t.eav, [s, i]);
2399
2399
  }
2400
2400
  function ki(t, e, n) {
2401
2401
  const r = n.filter(([s, i, o, a, c]) => {
@@ -2416,13 +2416,13 @@ function ki(t, e, n) {
2416
2416
  }
2417
2417
  return !(u === "create" && l || u === "update" && !l);
2418
2418
  });
2419
- return at({ store: t, attrsStore: e }, (s) => {
2419
+ return ct({ store: t, attrsStore: e }, (s) => {
2420
2420
  r.forEach((i) => {
2421
2421
  mi(s.store, s.attrsStore, i);
2422
2422
  });
2423
2423
  }, {
2424
2424
  mark: (s) => {
2425
- if (s instanceof ye)
2425
+ if (s instanceof be)
2426
2426
  return "immutable";
2427
2427
  }
2428
2428
  });
@@ -2475,22 +2475,22 @@ function $i(t, e, n) {
2475
2475
  return Ui(t, e, n).map((r) => Ri(e, r, n)).filter((r) => r);
2476
2476
  }
2477
2477
  function Di(t, e, n) {
2478
- return e.or ? e.or.patterns.flatMap((r) => Kt(t, r, n)) : e.and ? e.and.patterns.reduce((r, s) => Kt(t, s, r), n) : n.flatMap((r) => $i(t, e, r));
2478
+ return e.or ? e.or.patterns.flatMap((r) => qt(t, r, n)) : e.and ? e.and.patterns.reduce((r, s) => qt(t, s, r), n) : n.flatMap((r) => $i(t, e, r));
2479
2479
  }
2480
- function Kt(t, e, n = [{}]) {
2480
+ function qt(t, e, n = [{}]) {
2481
2481
  return e.reduce((r, s) => Di(t, s, r), n);
2482
2482
  }
2483
- function cn(t, e) {
2484
- return Array.isArray(e) ? e.map((n) => cn(t, n)) : Pi(e) ? t[e] : e;
2483
+ function un(t, e) {
2484
+ return Array.isArray(e) ? e.map((n) => un(t, n)) : Pi(e) ? t[e] : e;
2485
2485
  }
2486
2486
  function xi(t, { find: e, where: n }) {
2487
- return Kt(t, n).map((s) => cn(s, e));
2487
+ return qt(t, n).map((s) => un(s, e));
2488
2488
  }
2489
2489
  function Ui(t, e, n) {
2490
- return vi(t, cn(n, e));
2490
+ return vi(t, un(n, e));
2491
2491
  }
2492
2492
  const Li = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
2493
- function Ae(t) {
2493
+ function Oe(t) {
2494
2494
  return typeof t == "string" && Li.test(t);
2495
2495
  }
2496
2496
  const K = [];
@@ -2499,15 +2499,15 @@ for (let t = 0; t < 256; ++t)
2499
2499
  function Fi(t, e = 0) {
2500
2500
  return (K[t[e + 0]] + K[t[e + 1]] + K[t[e + 2]] + K[t[e + 3]] + "-" + K[t[e + 4]] + K[t[e + 5]] + "-" + K[t[e + 6]] + K[t[e + 7]] + "-" + K[t[e + 8]] + K[t[e + 9]] + "-" + K[t[e + 10]] + K[t[e + 11]] + K[t[e + 12]] + K[t[e + 13]] + K[t[e + 14]] + K[t[e + 15]]).toLowerCase();
2501
2501
  }
2502
- let At;
2502
+ let Ot;
2503
2503
  const Ni = new Uint8Array(16);
2504
2504
  function Ki() {
2505
- if (!At) {
2505
+ if (!Ot) {
2506
2506
  if (typeof crypto > "u" || !crypto.getRandomValues)
2507
2507
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
2508
- At = crypto.getRandomValues.bind(crypto);
2508
+ Ot = crypto.getRandomValues.bind(crypto);
2509
2509
  }
2510
- return At(Ni);
2510
+ return Ot(Ni);
2511
2511
  }
2512
2512
  const qi = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Vn = { randomUUID: qi };
2513
2513
  function zi(t, e, n) {
@@ -2538,7 +2538,7 @@ function Vi(t, e) {
2538
2538
  function Wi(t, e) {
2539
2539
  return Vi(Wn(t), Wn(e));
2540
2540
  }
2541
- function N() {
2541
+ function F() {
2542
2542
  return zi();
2543
2543
  }
2544
2544
  function Qi(t, e) {
@@ -2556,12 +2556,12 @@ function Bi() {
2556
2556
  const Gi = Bi();
2557
2557
  let Hi = 0;
2558
2558
  function Fe(t) {
2559
- return ft(`_${t}`, Hi++);
2559
+ return dt(`_${t}`, Hi++);
2560
2560
  }
2561
- function ft(t, e) {
2561
+ function dt(t, e) {
2562
2562
  return `?${t}-${e}`;
2563
2563
  }
2564
- class Oe extends Error {
2564
+ class Ee extends Error {
2565
2565
  constructor(e) {
2566
2566
  super(e), this.name = "AttrNotFoundError";
2567
2567
  }
@@ -2569,7 +2569,7 @@ class Oe extends Error {
2569
2569
  function Ji(t, e) {
2570
2570
  const n = Ur(t, e);
2571
2571
  if (!n)
2572
- throw new Oe(`Could not find id attr for ${e}`);
2572
+ throw new Ee(`Could not find id attr for ${e}`);
2573
2573
  return n;
2574
2574
  }
2575
2575
  function Qn(t, e, n, r) {
@@ -2587,9 +2587,9 @@ function Zi(t, e, n) {
2587
2587
  return t.map((r) => r === e ? n : r);
2588
2588
  }
2589
2589
  function Fr(t, e, n, r, s) {
2590
- const i = U(e, n, s), o = Te(e, n, s), a = i || o;
2590
+ const i = U(e, n, s), o = we(e, n, s), a = i || o;
2591
2591
  if (!a)
2592
- throw new Oe(`Could not find attr for ${[n, s]}`);
2592
+ throw new Ee(`Could not find attr for ${[n, s]}`);
2593
2593
  if (a["value-type"] !== "ref")
2594
2594
  throw new Error(`Attr ${a.id} is not a ref`);
2595
2595
  const [c, u] = a["forward-identity"], [l, d] = a["reverse-identity"], h = r + 1, y = i ? [
@@ -2676,13 +2676,13 @@ function Xi(t, e) {
2676
2676
  return e;
2677
2677
  }
2678
2678
  function eo(t, e, n, r, s, i) {
2679
- const o = U(e, n, s), a = Te(e, n, s), c = o || a;
2679
+ const o = U(e, n, s), a = we(e, n, s), c = o || a;
2680
2680
  if (!c)
2681
- throw new Oe(`No attr for etype = ${n} label = ${s}`);
2681
+ throw new Ee(`No attr for etype = ${n} label = ${s}`);
2682
2682
  if (i != null && i.hasOwnProperty("$isNull")) {
2683
2683
  const u = U(e, n, "id");
2684
2684
  if (!u)
2685
- throw new Oe(`No attr for etype = ${n} label = id`);
2685
+ throw new Ee(`No attr for etype = ${n} label = id`);
2686
2686
  return [
2687
2687
  t(n, r),
2688
2688
  u.id,
@@ -2704,7 +2704,7 @@ function to(t, e, n, r, s) {
2704
2704
  }, [n, r, []]);
2705
2705
  return [i, o, a];
2706
2706
  }
2707
- function qt(t, e, n, r, s, i) {
2707
+ function zt(t, e, n, r, s, i) {
2708
2708
  const o = s.slice(0, s.length - 1), a = s[s.length - 1], [c, u, l] = to(t, e, n, r, o), d = eo(t, e, c, u, a, i);
2709
2709
  return l.concat([d]);
2710
2710
  }
@@ -2737,7 +2737,7 @@ function oo(t) {
2737
2737
  return e;
2738
2738
  }
2739
2739
  function Hn(t, e, n, r, s) {
2740
- return oo(s).map((i) => qt(t, e, n, r, i, {
2740
+ return oo(s).map((i) => zt(t, e, n, r, i, {
2741
2741
  $isNull: !0
2742
2742
  }));
2743
2743
  }
@@ -2751,7 +2751,7 @@ function Nr(t, e, n, r, s) {
2751
2751
  return [];
2752
2752
  const a = i.split(".");
2753
2753
  if (o != null && o.hasOwnProperty("$ne") && (o = { ...o, $not: o.$ne }, delete o.$ne), o != null && o.hasOwnProperty("$not")) {
2754
- const c = qt(t, e, n, r, a, o), u = Hn(t, e, n, r, a);
2754
+ const c = zt(t, e, n, r, a, o), u = Hn(t, e, n, r, a);
2755
2755
  return [
2756
2756
  {
2757
2757
  or: {
@@ -2768,11 +2768,11 @@ function Nr(t, e, n, r, s) {
2768
2768
  joinSym: t(n, r)
2769
2769
  }
2770
2770
  }
2771
- ] : qt(t, e, n, r, a, o);
2771
+ ] : zt(t, e, n, r, a, o);
2772
2772
  });
2773
2773
  }
2774
2774
  function ao(t, e, n, r) {
2775
- const s = ft;
2775
+ const s = dt;
2776
2776
  return r ? Nr(s, t, e, n, r).concat(Qn(s, t, e, n)) : Qn(s, t, e, n);
2777
2777
  }
2778
2778
  function co(t, e, n) {
@@ -2789,15 +2789,15 @@ function lo(t, e, n, { etype: r, level: s, form: i }, o) {
2789
2789
  var g, w, m;
2790
2790
  const b = !!(e.cardinalityInference && ((m = (w = (g = n.linkIndex) == null ? void 0 : g[r]) == null ? void 0 : w[y]) != null && m.isSingular));
2791
2791
  try {
2792
- const [T, v, E] = uo(t, n, r, s, y, u), A = qr(e, n, {
2792
+ const [T, S, C] = uo(t, n, r, s, y, u), A = qr(e, n, {
2793
2793
  etype: T,
2794
- level: v,
2794
+ level: S,
2795
2795
  form: i[y],
2796
- join: E
2796
+ join: C
2797
2797
  }), j = b ? A[0] : A;
2798
2798
  return { [y]: j };
2799
2799
  } catch (T) {
2800
- if (T instanceof Oe)
2800
+ if (T instanceof Ee)
2801
2801
  return { [y]: b ? void 0 : [] };
2802
2802
  throw T;
2803
2803
  }
@@ -2812,19 +2812,19 @@ function fo(t, e, n) {
2812
2812
  function Ue(t, e, n, r, s) {
2813
2813
  return e === r || e == null && r == null ? Wi(t, n) : r == null ? 1 : e == null ? -1 : fo(e, r, s);
2814
2814
  }
2815
- function ct([t, e], [n, r], s) {
2815
+ function ut([t, e], [n, r], s) {
2816
2816
  return Ue(t, e, n, r, s);
2817
2817
  }
2818
- function zt(t) {
2818
+ function Vt(t) {
2819
2819
  return t == null ? t : new Date(t).getTime();
2820
2820
  }
2821
2821
  function ho(t, e, n, r) {
2822
2822
  var b;
2823
2823
  const [s, i, o, a] = t, c = n === "desc" ? 1 : -1;
2824
2824
  if (((b = e["forward-identity"]) == null ? void 0 : b[2]) === "id")
2825
- return ct(r, [s, a], null) === c;
2826
- const [u, l] = r, d = e["checked-data-type"], h = d === "date" ? zt(l) : l, y = d === "date" ? zt(o) : o;
2827
- return ct([u, h], [s, y], d) === c;
2825
+ return ut(r, [s, a], null) === c;
2826
+ const [u, l] = r, d = e["checked-data-type"], h = d === "date" ? Vt(l) : l, y = d === "date" ? Vt(o) : o;
2827
+ return ut([u, h], [s, y], d) === c;
2828
2828
  }
2829
2829
  function po(t, e) {
2830
2830
  const n = e[1];
@@ -2847,7 +2847,7 @@ function _o(t, e, n) {
2847
2847
  const r = /* @__PURE__ */ new Map();
2848
2848
  for (const o of n.fields) {
2849
2849
  const a = U(t, e, o), c = (s = a == null ? void 0 : a["forward-identity"]) == null ? void 0 : s[2];
2850
- c && an(a) && r.set(c, a);
2850
+ c && cn(a) && r.set(c, a);
2851
2851
  }
2852
2852
  if (!r.has("id")) {
2853
2853
  const o = U(t, e, "id"), a = (i = o == null ? void 0 : o["forward-identity"]) == null ? void 0 : i[2];
@@ -2863,15 +2863,15 @@ function go(t, e, { etype: n, pageInfo: r, dq: s, form: i }) {
2863
2863
  if (d && ((g = d == null ? void 0 : d["forward-identity"]) == null ? void 0 : g[2]) !== "id") {
2864
2864
  const w = d["checked-data-type"] === "date", m = d.id;
2865
2865
  u = u.map(([T]) => {
2866
- var E, A, j, L, q;
2867
- let v = (q = (L = (j = (A = (E = t.eav.get(T)) == null ? void 0 : E.get(m)) == null ? void 0 : A.values()) == null ? void 0 : j.next()) == null ? void 0 : L.value) == null ? void 0 : q[2];
2868
- return w && (v = zt(v)), [T, v];
2866
+ var C, A, j, N, q;
2867
+ let S = (q = (N = (j = (A = (C = t.eav.get(T)) == null ? void 0 : C.get(m)) == null ? void 0 : A.values()) == null ? void 0 : j.next()) == null ? void 0 : N.value) == null ? void 0 : q[2];
2868
+ return w && (S = Vt(S)), [T, S];
2869
2869
  });
2870
2870
  }
2871
2871
  u.sort(c === "asc" ? function(m, T) {
2872
- return ct(m, T, d == null ? void 0 : d["checked-data-type"]);
2872
+ return ut(m, T, d == null ? void 0 : d["checked-data-type"]);
2873
2873
  } : function(m, T) {
2874
- return ct(T, m, d == null ? void 0 : d["checked-data-type"]);
2874
+ return ut(T, m, d == null ? void 0 : d["checked-data-type"]);
2875
2875
  });
2876
2876
  let h = {};
2877
2877
  const y = _o(e, n, s);
@@ -2898,7 +2898,7 @@ function wo(t, e, { etype: n, level: r, form: s, join: i, pageInfo: o }) {
2898
2898
  var h, y, b, g, w;
2899
2899
  if (!Kr(s) && (!o || !o["start-cursor"]))
2900
2900
  return [];
2901
- const a = no(ao(e, n, r, (h = s.$) == null ? void 0 : h.where), i), c = co(ft, n, r), u = (y = s.$) == null ? void 0 : y.fields, l = go(t, e, {
2901
+ const a = no(ao(e, n, r, (h = s.$) == null ? void 0 : h.where), i), c = co(dt, n, r), u = (y = s.$) == null ? void 0 : y.fields, l = go(t, e, {
2902
2902
  etype: n,
2903
2903
  pageInfo: o,
2904
2904
  form: s,
@@ -2915,14 +2915,14 @@ function mo(t, e, n) {
2915
2915
  try {
2916
2916
  return wo(t, e, n);
2917
2917
  } catch (r) {
2918
- if (r instanceof Oe)
2918
+ if (r instanceof Ee)
2919
2919
  return {};
2920
2920
  throw r;
2921
2921
  }
2922
2922
  }
2923
2923
  function qr(t, e, n) {
2924
2924
  const r = mo(t, e, n);
2925
- return lo(ft, t, e, n, r);
2925
+ return lo(dt, t, e, n, r);
2926
2926
  }
2927
2927
  function So(t) {
2928
2928
  const e = {};
@@ -2961,7 +2961,7 @@ function vo() {
2961
2961
  return new Set(Object.keys(e));
2962
2962
  }
2963
2963
  const Ao = vo();
2964
- function st(t, e, n) {
2964
+ function it(t, e, n) {
2965
2965
  const r = {
2966
2966
  __etype: t,
2967
2967
  __ops: n
@@ -2973,7 +2973,7 @@ function st(t, e, n) {
2973
2973
  if (i === "__etype")
2974
2974
  return t;
2975
2975
  if (Ao.has(i))
2976
- return (o, a) => st(t, e, [
2976
+ return (o, a) => it(t, e, [
2977
2977
  ...n,
2978
2978
  a ? [i, t, e, o, a] : [i, t, e, o]
2979
2979
  ]);
@@ -2983,10 +2983,10 @@ function st(t, e, n) {
2983
2983
  function Oo(t, e) {
2984
2984
  return `lookup__${t}__${JSON.stringify(e)}`;
2985
2985
  }
2986
- function ut(t) {
2986
+ function lt(t) {
2987
2987
  return t.startsWith("lookup__");
2988
2988
  }
2989
- function Vt(t) {
2989
+ function Wt(t) {
2990
2990
  const [e, n, ...r] = t.split("__");
2991
2991
  return [n, JSON.parse(r.join("__"))];
2992
2992
  }
@@ -2996,22 +2996,22 @@ function Eo(t) {
2996
2996
  }, {
2997
2997
  get(e, n) {
2998
2998
  if (n === "lookup")
2999
- return (s, i) => st(t, Vt(Oo(s, i)), []);
2999
+ return (s, i) => it(t, Wt(Oo(s, i)), []);
3000
3000
  if (n === "__etype")
3001
3001
  return t;
3002
3002
  const r = n;
3003
- return ut(r) ? st(t, Vt(r), []) : st(t, r, []);
3003
+ return lt(r) ? it(t, Wt(r), []) : it(t, r, []);
3004
3004
  }
3005
3005
  });
3006
3006
  }
3007
- function un() {
3007
+ function ln() {
3008
3008
  return new Proxy({}, {
3009
3009
  get(t, e) {
3010
3010
  return Eo(e);
3011
3011
  }
3012
3012
  });
3013
3013
  }
3014
- un();
3014
+ ln();
3015
3015
  function ko(t) {
3016
3016
  return t.__ops;
3017
3017
  }
@@ -3047,7 +3047,7 @@ function Io(t, e, n) {
3047
3047
  // before assuming it's a ref lookup.
3048
3048
  !U(t, e, n);
3049
3049
  }
3050
- function Wt(t) {
3050
+ function Qt(t) {
3051
3051
  const [e, n, ...r] = t.split(".");
3052
3052
  if (r.length > 0 || n !== "id")
3053
3053
  throw new Error(`${t} is not a valid lookup attribute.`);
@@ -3056,16 +3056,16 @@ function Wt(t) {
3056
3056
  function Mo(t, e, n) {
3057
3057
  if (!Io(t, e, n))
3058
3058
  return U(t, e, n);
3059
- const r = Wt(n), s = U(t, e, r) || Te(t, e, r);
3059
+ const r = Qt(n), s = U(t, e, r) || we(t, e, r);
3060
3060
  if (s && s["value-type"] !== "ref")
3061
3061
  throw new Error(`${n} does not reference a valid link attribute.`);
3062
3062
  return s;
3063
3063
  }
3064
- function Qt(t) {
3065
- return typeof t == "string" && !ut(t) ? null : typeof t == "string" && ut(t) ? Vt(t) : Co(t);
3064
+ function Bt(t) {
3065
+ return typeof t == "string" && !lt(t) ? null : typeof t == "string" && lt(t) ? Wt(t) : Co(t);
3066
3066
  }
3067
3067
  function G(t, e, n) {
3068
- const r = Qt(n);
3068
+ const r = Bt(n);
3069
3069
  if (r === null)
3070
3070
  return n;
3071
3071
  const [s, i] = r, o = Mo(t, e, s);
@@ -3085,7 +3085,7 @@ function Vr(t, e, n, r) {
3085
3085
  }
3086
3086
  function jo({ attrsStore: t }, [e, n, r]) {
3087
3087
  const s = Object.entries(r).flatMap(([i, o]) => {
3088
- const a = Array.isArray(o) ? o : [o], c = U(t, e, i), u = Te(t, e, i);
3088
+ const a = Array.isArray(o) ? o : [o], c = U(t, e, i), u = we(t, e, i);
3089
3089
  return a.map((l) => c ? [
3090
3090
  "add-triple",
3091
3091
  G(t, e, n),
@@ -3106,7 +3106,7 @@ function jo({ attrsStore: t }, [e, n, r]) {
3106
3106
  }
3107
3107
  function Ro({ attrsStore: t }, [e, n, r]) {
3108
3108
  const s = Object.entries(r).flatMap(([i, o]) => {
3109
- const a = Array.isArray(o) ? o : [o], c = U(t, e, i), u = Te(t, e, i);
3109
+ const a = Array.isArray(o) ? o : [o], c = U(t, e, i), u = we(t, e, i);
3110
3110
  return a.map((l) => c ? [
3111
3111
  "retract-triple",
3112
3112
  G(t, e, n),
@@ -3152,17 +3152,17 @@ function Wr({ stores: t, attrsStore: e }, [n, r, s, i]) {
3152
3152
  return (i == null ? void 0 : i.upsert) === !1 ? { mode: "update" } : (i == null ? void 0 : i.upsert) === !0 ? null : $o(t, e, n, r) ? { mode: "update" } : null;
3153
3153
  }
3154
3154
  function Do(t, e) {
3155
- const { attrsStore: n } = t, [r, s, i, o] = e, a = sn(i), c = G(n, r, s);
3155
+ const { attrsStore: n } = t, [r, s, i, o] = e, a = on(i), c = G(n, r, s);
3156
3156
  return [["id", c]].concat(Object.entries(a)).map(([l, d]) => {
3157
3157
  const h = U(n, r, l);
3158
- return h["checked-data-type"] === "date" && t.useDateObjects && (d = lt(d)), ["add-triple", c, h.id, d, { mode: "create" }];
3158
+ return h["checked-data-type"] === "date" && t.useDateObjects && (d = ft(d)), ["add-triple", c, h.id, d, { mode: "create" }];
3159
3159
  });
3160
3160
  }
3161
3161
  function xo(t, e) {
3162
- const { attrsStore: n } = t, [r, s, i, o] = e, a = sn(i), c = G(n, r, s), u = Wr(t, [r, c, i, o]);
3162
+ const { attrsStore: n } = t, [r, s, i, o] = e, a = on(i), c = G(n, r, s), u = Wr(t, [r, c, i, o]);
3163
3163
  return [["id", c]].concat(Object.entries(a)).map(([d, h]) => {
3164
3164
  const y = U(n, r, d);
3165
- return y["checked-data-type"] === "date" && t.useDateObjects && (h = lt(h)), [
3165
+ return y["checked-data-type"] === "date" && t.useDateObjects && (h = ft(h)), [
3166
3166
  "add-triple",
3167
3167
  c,
3168
3168
  y.id,
@@ -3175,7 +3175,7 @@ function Uo({ attrsStore: t }, [e, n]) {
3175
3175
  return [["delete-entity", G(t, e, n), e]];
3176
3176
  }
3177
3177
  function Lo(t, e) {
3178
- const { attrsStore: n } = t, [r, s, i, o] = e, a = sn(i), c = G(n, r, s), u = Wr(t, [r, c, i, o]), l = Object.entries(a).map(([h, y]) => {
3178
+ const { attrsStore: n } = t, [r, s, i, o] = e, a = on(i), c = G(n, r, s), u = Wr(t, [r, c, i, o]), l = Object.entries(a).map(([h, y]) => {
3179
3179
  const b = U(n, r, h);
3180
3180
  return [
3181
3181
  "deep-merge-triple",
@@ -3249,8 +3249,8 @@ function zo(t, e, n) {
3249
3249
  "checked-data-type": o
3250
3250
  };
3251
3251
  }
3252
- function Ze(t, e, n, r) {
3253
- const s = t ? zo(t, e, n) : null, i = N(), a = [N(), e, n];
3252
+ function Xe(t, e, n, r) {
3253
+ const s = t ? zo(t, e, n) : null, i = F(), a = [F(), e, n];
3254
3254
  return {
3255
3255
  id: i,
3256
3256
  "forward-identity": a,
@@ -3272,8 +3272,8 @@ function Wo(t, e, n) {
3272
3272
  throw new Error(`Couldn't find the link ${e}.${n} in your schema`);
3273
3273
  const { forward: s, reverse: i } = r;
3274
3274
  return {
3275
- "forward-identity": [N(), s.on, s.label],
3276
- "reverse-identity": [N(), i.on, i.label],
3275
+ "forward-identity": [F(), s.on, s.label],
3276
+ "reverse-identity": [F(), i.on, i.label],
3277
3277
  cardinality: s.has === "one" ? "one" : "many",
3278
3278
  "unique?": i.has === "one",
3279
3279
  "on-delete": s.onDelete,
@@ -3281,7 +3281,7 @@ function Wo(t, e, n) {
3281
3281
  };
3282
3282
  }
3283
3283
  function Jn(t, e, n, r) {
3284
- const s = t ? Wo(t, e, n) : null, i = N(), o = [N(), e, n], a = [N(), n, e];
3284
+ const s = t ? Wo(t, e, n) : null, i = F(), o = [F(), e, n], a = [F(), n, e];
3285
3285
  return {
3286
3286
  id: i,
3287
3287
  // @ts-ignore: ts thinks it's any[]
@@ -3306,20 +3306,20 @@ const Qo = /* @__PURE__ */ new Set(["create", "update", "merge", "link", "unlink
3306
3306
  "merge",
3307
3307
  "delete",
3308
3308
  "ruleParams"
3309
- ]), Bt = { "unique?": !0, "index?": !0 }, Jo = {
3310
- ...Bt,
3309
+ ]), Gt = { "unique?": !0, "index?": !0 }, Jo = {
3310
+ ...Gt,
3311
3311
  cardinality: "one"
3312
3312
  };
3313
3313
  function Yo(t) {
3314
3314
  const e = [], [n, r, s, i] = t;
3315
3315
  if (!Ho.has(n))
3316
3316
  return e;
3317
- const o = Qt(s);
3317
+ const o = Bt(s);
3318
3318
  if (o && e.push({ etype: r, lookupPair: o }), n === "link")
3319
3319
  for (const [a, c] of Object.entries(i)) {
3320
3320
  const u = Array.isArray(c) ? c : [c];
3321
3321
  for (const l of u) {
3322
- const d = Qt(l);
3322
+ const d = Bt(l);
3323
3323
  d && e.push({
3324
3324
  etype: r,
3325
3325
  lookupPair: d,
@@ -3336,7 +3336,7 @@ function Zo({ attrsStore: t, schema: e }, n) {
3336
3336
  return U(t, b, g) || s.find((w) => w["forward-identity"][1] === b && w["forward-identity"][2] === g);
3337
3337
  }
3338
3338
  function a(b, g) {
3339
- return Te(t, b, g) || s.find((w) => {
3339
+ return we(t, b, g) || s.find((w) => {
3340
3340
  var m, T;
3341
3341
  return ((m = w["reverse-identity"]) == null ? void 0 : m[1]) === b && ((T = w["reverse-identity"]) == null ? void 0 : T[2]) === g;
3342
3342
  });
@@ -3361,32 +3361,32 @@ function Zo({ attrsStore: t, schema: e }, n) {
3361
3361
  const T = w[0];
3362
3362
  if (m) {
3363
3363
  d(g, m);
3364
- const v = o(g, m), E = a(g, m);
3365
- u(v), u(E);
3366
- const A = ((h = v == null ? void 0 : v["reverse-identity"]) == null ? void 0 : h[1]) || ((y = E == null ? void 0 : E["forward-identity"]) == null ? void 0 : y[1]) || m;
3364
+ const S = o(g, m), C = a(g, m);
3365
+ u(S), u(C);
3366
+ const A = ((h = S == null ? void 0 : S["reverse-identity"]) == null ? void 0 : h[1]) || ((y = C == null ? void 0 : C["forward-identity"]) == null ? void 0 : y[1]) || m;
3367
3367
  if (l(A, T))
3368
- d(A, Wt(T));
3368
+ d(A, Qt(T));
3369
3369
  else {
3370
3370
  const j = o(A, T);
3371
- j || c(Ze(e, A, T, Bt)), u(j);
3371
+ j || c(Xe(e, A, T, Gt)), u(j);
3372
3372
  }
3373
3373
  } else if (l(g, T))
3374
- d(g, Wt(T));
3374
+ d(g, Qt(T));
3375
3375
  else {
3376
- const v = o(g, T);
3377
- v || c(Ze(e, g, T, Bt)), u(v);
3376
+ const S = o(g, T);
3377
+ S || c(Xe(e, g, T, Gt)), u(S);
3378
3378
  }
3379
3379
  }
3380
3380
  for (const b of n) {
3381
3381
  const [g, w, m, T] = b;
3382
3382
  if (Qo.has(g)) {
3383
- const v = o(w, "id");
3384
- u(v), v || c(Ze(e, w, "id", { "unique?": !0 }));
3385
- for (const E of Object.keys(T)) {
3386
- const A = o(w, E);
3387
- if (u(A), Go.has(g) && (A || c(Ze(e, w, E, E === "id" ? { "unique?": !0 } : null))), Bo.has(g)) {
3388
- const j = a(w, E);
3389
- !A && !j && c(Jn(e, w, E)), u(j);
3383
+ const S = o(w, "id");
3384
+ u(S), S || c(Xe(e, w, "id", { "unique?": !0 }));
3385
+ for (const C of Object.keys(T)) {
3386
+ const A = o(w, C);
3387
+ if (u(A), Go.has(g) && (A || c(Xe(e, w, C, C === "id" ? { "unique?": !0 } : null))), Bo.has(g)) {
3388
+ const j = a(w, C);
3389
+ !A && !j && c(Jn(e, w, C)), u(j);
3390
3390
  }
3391
3391
  }
3392
3392
  }
@@ -3395,7 +3395,7 @@ function Zo({ attrsStore: t, schema: e }, n) {
3395
3395
  const b = { ...t.attrs };
3396
3396
  for (const g of s)
3397
3397
  b[g.id] = g;
3398
- return [new ye(b, t.linkIndex), i];
3398
+ return [new be(b, t.linkIndex), i];
3399
3399
  }
3400
3400
  return [t, i];
3401
3401
  }
@@ -3411,7 +3411,7 @@ class ea {
3411
3411
  constructor(e, n) {
3412
3412
  }
3413
3413
  }
3414
- class Gt {
3414
+ class Ht {
3415
3415
  constructor(e) {
3416
3416
  p(this, "currentValue");
3417
3417
  p(this, "_subs", []);
@@ -3633,7 +3633,7 @@ class Gt {
3633
3633
  // so that we know which entries we need to persist to the store.
3634
3634
  updateInPlace(e) {
3635
3635
  this._version++;
3636
- const [n, r] = at(this.currentValue, e, {
3636
+ const [n, r] = ct(this.currentValue, e, {
3637
3637
  enablePatches: !0
3638
3638
  });
3639
3639
  for (const s of r) {
@@ -3871,19 +3871,19 @@ class Br {
3871
3871
  };
3872
3872
  }
3873
3873
  }
3874
- class Ee extends Error {
3874
+ class ke extends Error {
3875
3875
  constructor(n, r) {
3876
3876
  super(n);
3877
3877
  p(this, "hint");
3878
3878
  this.hint = r;
3879
3879
  const s = new.target.prototype;
3880
- Object.setPrototypeOf && Object.setPrototypeOf(this, s), Error.captureStackTrace && Error.captureStackTrace(this, Ee), this.name = "InstantError";
3880
+ Object.setPrototypeOf && Object.setPrototypeOf(this, s), Error.captureStackTrace && Error.captureStackTrace(this, ke), this.name = "InstantError";
3881
3881
  }
3882
3882
  get [Symbol.toStringTag]() {
3883
3883
  return "InstantError";
3884
3884
  }
3885
3885
  }
3886
- class dt extends Ee {
3886
+ class ht extends ke {
3887
3887
  constructor(n) {
3888
3888
  var i;
3889
3889
  const r = ((i = n.body) == null ? void 0 : i.message) || `API Error (${n.status})`;
@@ -3891,7 +3891,7 @@ class dt extends Ee {
3891
3891
  p(this, "body");
3892
3892
  p(this, "status");
3893
3893
  const s = new.target.prototype;
3894
- Object.setPrototypeOf && Object.setPrototypeOf(this, s), Error.captureStackTrace && Error.captureStackTrace(this, dt), this.name = "InstantAPIError", this.status = n.status, this.body = n.body;
3894
+ Object.setPrototypeOf && Object.setPrototypeOf(this, s), Error.captureStackTrace && Error.captureStackTrace(this, ht), this.name = "InstantAPIError", this.status = n.status, this.body = n.body;
3895
3895
  }
3896
3896
  get [Symbol.toStringTag]() {
3897
3897
  return "InstantAPIError";
@@ -3899,7 +3899,7 @@ class dt extends Ee {
3899
3899
  }
3900
3900
  async function ne(t, e) {
3901
3901
  const n = await fetch(t, e), r = await n.json();
3902
- return n.status === 200 ? Promise.resolve(r) : Promise.reject(new dt({ status: n.status, body: r }));
3902
+ return n.status === 200 ? Promise.resolve(r) : Promise.reject(new ht({ status: n.status, body: r }));
3903
3903
  }
3904
3904
  function aa({ apiURI: t, appId: e, email: n }) {
3905
3905
  return ne(`${t}/runtime/auth/send_magic_code`, {
@@ -4032,8 +4032,8 @@ async function _a({ apiURI: t, appId: e, path: n, refreshToken: r }) {
4032
4032
  });
4033
4033
  return s;
4034
4034
  }
4035
- let ln = !1, Gr = !1, Hr = !1;
4036
- typeof window < "u" && typeof window.localStorage < "u" && (ln = !!window.localStorage.getItem("devBackend"), Gr = !!window.localStorage.getItem("__instantLogging"), Hr = !!window.localStorage.getItem("__devtoolLocalDash"));
4035
+ let fn = !1, Gr = !1, Hr = !1;
4036
+ typeof window < "u" && typeof window.localStorage < "u" && (fn = !!window.localStorage.getItem("devBackend"), Gr = !!window.localStorage.getItem("__instantLogging"), Hr = !!window.localStorage.getItem("__devtoolLocalDash"));
4037
4037
  function tr(t, e) {
4038
4038
  if (!e)
4039
4039
  return t;
@@ -4110,7 +4110,7 @@ function sr(t) {
4110
4110
  }, e;
4111
4111
  }, {});
4112
4112
  }
4113
- const Yr = "v0.22.131";
4113
+ const Yr = "v0.22.132";
4114
4114
  function wa(t, e) {
4115
4115
  return {
4116
4116
  info: t ? (...n) => console.info(...n, e()) : () => {
@@ -4218,7 +4218,7 @@ const ir = [
4218
4218
  default:
4219
4219
  throw new R(`Unknown operator '${t}' for attribute '${r}' in entity '${s}'`, o);
4220
4220
  }
4221
- }, ve = (t, e, n, r, s) => {
4221
+ }, Ae = (t, e, n, r, s) => {
4222
4222
  const i = ma(n), o = n.valueType === "json";
4223
4223
  if (typeof t == "object" && t !== null && !Array.isArray(t)) {
4224
4224
  if (o)
@@ -4248,23 +4248,23 @@ const ir = [
4248
4248
  if (!c)
4249
4249
  throw new R(`Target entity '${o}' does not exist in schema for dot notation path '${t}'.`, s);
4250
4250
  if (a === "id") {
4251
- if (typeof e == "string" && !Ae(e))
4251
+ if (typeof e == "string" && !Oe(e))
4252
4252
  throw new R(`Invalid value for id field in entity '${o}'. Expected a UUID, but received: ${e}`, s);
4253
- ve(e, t, new oe("string", !1, !0), n, s);
4253
+ Ae(e, t, new oe("string", !1, !0), n, s);
4254
4254
  return;
4255
4255
  }
4256
4256
  const u = c.attrs[a];
4257
4257
  if (Object.keys(c.links).includes(a)) {
4258
- if (typeof e == "string" && !Ae(e))
4258
+ if (typeof e == "string" && !Oe(e))
4259
4259
  throw new R(`Invalid value for link '${a}' in entity '${o}'. Expected a UUID, but received: ${e}`, s);
4260
- ve(e, t, new oe("string", !1, !0), n, s);
4260
+ Ae(e, t, new oe("string", !1, !0), n, s);
4261
4261
  return;
4262
4262
  }
4263
4263
  if (!u) {
4264
4264
  const l = Object.keys(c.attrs);
4265
4265
  throw new R(`Attribute '${a}' does not exist on entity '${o}' in dot notation path '${t}'. Available attributes: ${l.length > 0 ? l.join(", ") + ", id" : "id"}`, s);
4266
4266
  }
4267
- ve(e, t, u, n, s);
4267
+ Ae(e, t, u, n, s);
4268
4268
  }, Xr = (t, e, n, r) => {
4269
4269
  for (const [s, i] of Object.entries(t)) {
4270
4270
  if (s === "or" || s === "and") {
@@ -4274,7 +4274,7 @@ const ir = [
4274
4274
  continue;
4275
4275
  }
4276
4276
  if (s === "id") {
4277
- ve(i, "id", new oe("string", !1, !0), e, `${r}.id`);
4277
+ Ae(i, "id", new oe("string", !1, !0), e, `${r}.id`);
4278
4278
  continue;
4279
4279
  }
4280
4280
  if (s.includes(".")) {
@@ -4290,12 +4290,12 @@ const ir = [
4290
4290
  throw new R(`Attribute or link '${s}' does not exist on entity '${e}'. Available attributes: ${u.length > 0 ? u.join(", ") : "none"}. Available links: ${l.length > 0 ? l.join(", ") : "none"}`, `${r}.${s}`);
4291
4291
  }
4292
4292
  if (a)
4293
- ve(i, s, a, e, `${r}.${s}`);
4293
+ Ae(i, s, a, e, `${r}.${s}`);
4294
4294
  else if (c) {
4295
- if (typeof i == "string" && !Ae(i))
4295
+ if (typeof i == "string" && !Oe(i))
4296
4296
  throw new R(`Invalid value for link '${s}' in entity '${e}'. Expected a UUID, but received: ${i}`, `${r}.${s}`);
4297
4297
  const u = new oe("string", !1, !0);
4298
- ve(i, s, u, e, `${r}.${s}`);
4298
+ Ae(i, s, u, e, `${r}.${s}`);
4299
4299
  }
4300
4300
  }
4301
4301
  }, Aa = (t, e, n, r, s = 0) => {
@@ -4358,13 +4358,13 @@ const ir = [
4358
4358
  es(n[r], r, e, r, 0);
4359
4359
  }
4360
4360
  }
4361
- }, ar = (t) => typeof t != "string" ? !1 : ut(t) ? !0 : Ae(t);
4361
+ }, ar = (t) => typeof t != "string" ? !1 : lt(t) ? !0 : Oe(t);
4362
4362
  class Z extends Error {
4363
4363
  constructor(e) {
4364
4364
  super(e), this.name = "TransactionValidationError";
4365
4365
  }
4366
4366
  }
4367
- const ts = (t) => t.length > 0 ? t.join(", ") : "none", Oa = (t, e) => new Z(`Entity '${t}' does not exist in schema. Available entities: ${ts(e)}`), Ot = {
4367
+ const ts = (t) => t.length > 0 ? t.join(", ") : "none", Oa = (t, e) => new Z(`Entity '${t}' does not exist in schema. Available entities: ${ts(e)}`), Et = {
4368
4368
  string: (t) => typeof t == "string",
4369
4369
  number: (t) => typeof t == "number" && !isNaN(t),
4370
4370
  boolean: (t) => typeof t == "boolean",
@@ -4372,13 +4372,13 @@ const ts = (t) => t.length > 0 ? t.join(", ") : "none", Oa = (t, e) => new Z(`En
4372
4372
  json: () => !0
4373
4373
  }, Ea = (t, e) => {
4374
4374
  var n;
4375
- return t == null ? !0 : ((n = Ot[e.valueType]) == null ? void 0 : n.call(Ot, t)) ?? !1;
4375
+ return t == null ? !0 : ((n = Et[e.valueType]) == null ? void 0 : n.call(Et, t)) ?? !1;
4376
4376
  }, ns = (t, e) => {
4377
4377
  const n = e.entities[t];
4378
4378
  if (!n)
4379
4379
  throw Oa(t, Object.keys(e.entities));
4380
4380
  return n;
4381
- }, Et = (t, e, n) => {
4381
+ }, kt = (t, e, n) => {
4382
4382
  const r = ns(t, n);
4383
4383
  if (typeof e != "object" || e === null)
4384
4384
  throw new Z(`Arguments for data operation on entity '${t}' must be an object, but received: ${typeof e}`);
@@ -4408,9 +4408,9 @@ const ts = (t) => t.length > 0 ? t.join(", ") : "none", Oa = (t, e) => new Z(`En
4408
4408
  }
4409
4409
  }
4410
4410
  }, ka = {
4411
- create: Et,
4412
- update: Et,
4413
- merge: Et,
4411
+ create: kt,
4412
+ update: kt,
4413
+ merge: kt,
4414
4414
  link: cr,
4415
4415
  unlink: cr,
4416
4416
  delete: () => {
@@ -4419,7 +4419,7 @@ const ts = (t) => t.length > 0 ? t.join(", ") : "none", Oa = (t, e) => new Z(`En
4419
4419
  if (!e)
4420
4420
  return;
4421
4421
  const [n, r, s, i] = t;
4422
- if (!Array.isArray(s) && !Ae(s))
4422
+ if (!Array.isArray(s) && !Oe(s))
4423
4423
  throw new Z(`Invalid id for entity '${r}'. Expected a UUID, but received: ${s}`);
4424
4424
  if (typeof r != "string")
4425
4425
  throw new Z(`Entity name must be a string, but received: ${typeof r}`);
@@ -4603,7 +4603,7 @@ function Ra(t, e, n) {
4603
4603
  const r = (i = e == null ? void 0 : e.state) == null ? void 0 : i.txId, s = (o = n == null ? void 0 : n.state) == null ? void 0 : o.txId;
4604
4604
  return r && (!s || r > s) ? e : s && (!r || s > r) ? n : e || n;
4605
4605
  }
4606
- function kt(t, e, n) {
4606
+ function Pt(t, e, n) {
4607
4607
  return zr({ store: e, attrsStore: n, pageInfo: null, aggregate: null }, t.query).data[t.table][0];
4608
4608
  }
4609
4609
  function lr(t, e, n, r) {
@@ -4611,7 +4611,7 @@ function lr(t, e, n, r) {
4611
4611
  const s = (o = U(n, t.table, "id")) == null ? void 0 : o.id;
4612
4612
  if (!s)
4613
4613
  return -1;
4614
- const i = ke(e.eav, [r, s, r]);
4614
+ const i = Pe(e.eav, [r, s, r]);
4615
4615
  return i ? i[3] : -1;
4616
4616
  }
4617
4617
  function fr(t, e, n) {
@@ -4650,7 +4650,7 @@ function $a(t, e, n) {
4650
4650
  u === l && delete a[c];
4651
4651
  return r;
4652
4652
  }
4653
- function Xe(t, e) {
4653
+ function et(t, e) {
4654
4654
  return { [t.table]: e.map((n) => n.entity) };
4655
4655
  }
4656
4656
  function Da(t, e) {
@@ -4677,10 +4677,10 @@ function xa(t, e, n) {
4677
4677
  return Ue(a.entity.id, a.entity[s], o.entity.id, o.entity[s], r);
4678
4678
  });
4679
4679
  }
4680
- var de;
4680
+ var he;
4681
4681
  (function(t) {
4682
4682
  t.InitialSyncBatch = "InitialSyncBatch", t.InitialSyncComplete = "InitialSyncComplete", t.LoadFromStorage = "LoadFromStorage", t.SyncTransaction = "SyncTransaction", t.Error = "Error";
4683
- })(de || (de = {}));
4683
+ })(he || (he = {}));
4684
4684
  class Ua {
4685
4685
  constructor(e, n, r, s, i, o) {
4686
4686
  p(this, "trySend");
@@ -4692,7 +4692,7 @@ class Ua {
4692
4692
  p(this, "log");
4693
4693
  p(this, "createStore");
4694
4694
  p(this, "getAttrs");
4695
- this.trySend = e, this.config = r, this.log = s, this.createStore = i, this.getAttrs = o, this.subs = new Gt({
4695
+ this.trySend = e, this.config = r, this.log = s, this.createStore = i, this.getAttrs = o, this.subs = new Ht({
4696
4696
  persister: n,
4697
4697
  merge: Ra,
4698
4698
  serialize: ja,
@@ -4716,7 +4716,7 @@ class Ua {
4716
4716
  this.subs.flush();
4717
4717
  }
4718
4718
  subscribe(e, n) {
4719
- const r = F(e);
4719
+ const r = L(e);
4720
4720
  return this.callbacks[r] = this.callbacks[r] || [], this.callbacks[r].push(n), this.initSubscription(e, r, n), (s) => {
4721
4721
  this.unsubscribe(r, n, s == null ? void 0 : s.keepSubscription);
4722
4722
  };
@@ -4732,7 +4732,7 @@ class Ua {
4732
4732
  }
4733
4733
  }
4734
4734
  sendStart(e) {
4735
- this.trySend(N(), {
4735
+ this.trySend(F(), {
4736
4736
  op: "start-sync",
4737
4737
  q: e
4738
4738
  });
@@ -4746,7 +4746,7 @@ class Ua {
4746
4746
  });
4747
4747
  }
4748
4748
  sendRemove(e, n) {
4749
- this.trySend(N(), {
4749
+ this.trySend(F(), {
4750
4750
  op: "remove-sync",
4751
4751
  "subscription-id": e.subscriptionId,
4752
4752
  "keep-subscription": n
@@ -4758,8 +4758,8 @@ class Ua {
4758
4758
  const s = this.subs.currentValue[n];
4759
4759
  if (s && s.state && s.state.txId) {
4760
4760
  this.sendResync(s, s.state, s.state.txId), (u = s.values) != null && u.entities && r && r({
4761
- type: de.LoadFromStorage,
4762
- data: Xe(s, (l = s.values) == null ? void 0 : l.entities)
4761
+ type: he.LoadFromStorage,
4762
+ data: et(s, (l = s.values) == null ? void 0 : l.entities)
4763
4763
  });
4764
4764
  return;
4765
4765
  }
@@ -4784,7 +4784,7 @@ class Ua {
4784
4784
  }
4785
4785
  }
4786
4786
  onStartSyncOk(e) {
4787
- const n = e["subscription-id"], r = e.q, s = F(r);
4787
+ const n = e["subscription-id"], r = e.q, s = L(r);
4788
4788
  this.idToHash[n] = s, this.subs.updateInPlace((i) => {
4789
4789
  const o = i[s];
4790
4790
  if (!o)
@@ -4817,7 +4817,7 @@ class Ua {
4817
4817
  o.values = a;
4818
4818
  const c = a.entities;
4819
4819
  for (const u of r) {
4820
- const l = this.createStore(u), d = kt(o, l, a.attrsStore);
4820
+ const l = this.createStore(u), d = Pt(o, l, a.attrsStore);
4821
4821
  c.push({
4822
4822
  store: l,
4823
4823
  entity: d,
@@ -4827,8 +4827,8 @@ class Ua {
4827
4827
  this.subs.updateInPlace((u) => {
4828
4828
  u[s] = o, u[s].updatedAt = Date.now();
4829
4829
  }), o.values && this.notifyCbs(s, {
4830
- type: de.InitialSyncBatch,
4831
- data: Xe(o, o.values.entities),
4830
+ type: he.InitialSyncBatch,
4831
+ data: et(o, o.values.entities),
4832
4832
  batch: i
4833
4833
  });
4834
4834
  }
@@ -4852,8 +4852,8 @@ class Ua {
4852
4852
  });
4853
4853
  const s = this.subs.currentValue[r];
4854
4854
  s && this.notifyCbs(r, {
4855
- type: de.InitialSyncComplete,
4856
- data: Xe(s, ((i = s.values) == null ? void 0 : i.entities) || [])
4855
+ type: he.InitialSyncComplete,
4856
+ data: et(s, ((i = s.values) == null ? void 0 : i.entities) || [])
4857
4857
  });
4858
4858
  }
4859
4859
  onSyncUpdateTriples(e) {
@@ -4890,15 +4890,15 @@ class Ua {
4890
4890
  const h = [];
4891
4891
  e: for (const [w, m] of Object.entries(u))
4892
4892
  for (let T = 0; T < d.length; T++) {
4893
- const v = d[T];
4894
- if (yi(v.store, w)) {
4895
- fr(v.store, l.attrsStore, m);
4896
- const E = kt(s, v.store, l.attrsStore), A = $a(v.store, l.attrsStore, m)[w];
4897
- E ? (h.push({
4898
- oldEntity: v.entity,
4899
- newEntity: E,
4893
+ const S = d[T];
4894
+ if (yi(S.store, w)) {
4895
+ fr(S.store, l.attrsStore, m);
4896
+ const C = Pt(s, S.store, l.attrsStore), A = $a(S.store, l.attrsStore, m)[w];
4897
+ C ? (h.push({
4898
+ oldEntity: S.entity,
4899
+ newEntity: C,
4900
4900
  changedFields: A || {}
4901
- }), v.entity = E) : c.push(T), delete u[w];
4901
+ }), S.entity = C) : c.push(T), delete u[w];
4902
4902
  continue e;
4903
4903
  }
4904
4904
  }
@@ -4906,8 +4906,8 @@ class Ua {
4906
4906
  for (const [w, m] of Object.entries(u)) {
4907
4907
  const T = this.createStore([]);
4908
4908
  fr(T, l.attrsStore, m);
4909
- const v = kt(s, T, l.attrsStore);
4910
- if (!v) {
4909
+ const S = Pt(s, T, l.attrsStore);
4910
+ if (!S) {
4911
4911
  this.log.error("No entity found after applying change", {
4912
4912
  sub: s,
4913
4913
  changes: m,
@@ -4917,17 +4917,17 @@ class Ua {
4917
4917
  }
4918
4918
  d.push({
4919
4919
  store: T,
4920
- entity: v,
4921
- serverCreatedAt: lr(s, T, l.attrsStore, v.id)
4922
- }), y.push(v);
4920
+ entity: S,
4921
+ serverCreatedAt: lr(s, T, l.attrsStore, S.id)
4922
+ }), y.push(S);
4923
4923
  }
4924
4924
  const b = [];
4925
4925
  for (const w of c.sort().reverse())
4926
4926
  b.push(d[w].entity), d.splice(w, 1);
4927
4927
  const g = Da(s, this.getAttrs);
4928
4928
  xa(s, g, d), this.notifyCbs(r, {
4929
- type: de.SyncTransaction,
4930
- data: Xe(s, (o = s.values) == null ? void 0 : o.entities),
4929
+ type: he.SyncTransaction,
4930
+ data: et(s, (o = s.values) == null ? void 0 : o.entities),
4931
4931
  added: y,
4932
4932
  removed: b,
4933
4933
  updated: h
@@ -4949,14 +4949,14 @@ class Ua {
4949
4949
  }
4950
4950
  }
4951
4951
  onStartSyncError(e) {
4952
- const n = F(e["original-event"].q), r = {
4952
+ const n = L(e["original-event"].q), r = {
4953
4953
  message: e.message || "Uh-oh, something went wrong. Ping Joe & Stopa.",
4954
4954
  status: e.status,
4955
4955
  type: e.type,
4956
4956
  hint: e.hint
4957
4957
  }, s = Object.keys(e["original-event"].q)[0];
4958
4958
  this.notifyCbs(n, {
4959
- type: de.Error,
4959
+ type: he.Error,
4960
4960
  data: { [s]: [] },
4961
4961
  error: r
4962
4962
  });
@@ -4975,7 +4975,7 @@ const ie = {
4975
4975
  }, La = 3e4, Fa = 3e4, Na = 200, Ka = 1e3 * 60, qa = {
4976
4976
  apiURI: "https://api.instantdb.com",
4977
4977
  websocketURI: "wss://api.instantdb.com/runtime/session"
4978
- }, Pt = "_instant_oauth_redirect", Re = "currentUser";
4978
+ }, Ct = "_instant_oauth_redirect", Re = "currentUser";
4979
4979
  function za({ transportType: t, appId: e, apiURI: n, wsURI: r, EventSourceImpl: s }) {
4980
4980
  if (!s)
4981
4981
  return new ur(`${r}?app_id=${e}`);
@@ -5047,7 +5047,7 @@ function Ha(t, e, n) {
5047
5047
  const r = e == null ? void 0 : e.result, s = n == null ? void 0 : n.result;
5048
5048
  return r && !s && n && (n.result = r), n || e;
5049
5049
  }
5050
- function Ct(t) {
5050
+ function It(t) {
5051
5051
  return [...t].sort((e, n) => {
5052
5052
  const [r, s] = e, [i, o] = n, a = s.order || 0, c = o.order || 0;
5053
5053
  return a == c ? r < i ? -1 : r > i ? 1 : 0 : a - c;
@@ -5094,7 +5094,7 @@ class Ja {
5094
5094
  p(this, "_linkIndex", null);
5095
5095
  /** @type BroadcastChannel | undefined */
5096
5096
  p(this, "_broadcastChannel");
5097
- /** @type {Record<string, {isConnected: boolean; error: any}>} */
5097
+ /** @type {Record<string, {roomType: string; isConnected: boolean; error: any}>} */
5098
5098
  p(this, "_rooms", {});
5099
5099
  /** @type {Record<string, boolean>} */
5100
5100
  p(this, "_roomsPendingLeave", {});
@@ -5127,14 +5127,14 @@ class Ja {
5127
5127
  // Queries
5128
5128
  p(this, "getPreviousResult", (e) => {
5129
5129
  var r;
5130
- const n = F(e);
5130
+ const n = L(e);
5131
5131
  return (r = this.dataForQuery(n)) == null ? void 0 : r.data;
5132
5132
  });
5133
5133
  /** Re-run instaql and call all callbacks with new data */
5134
5134
  p(this, "notifyOne", (e) => {
5135
5135
  var i;
5136
5136
  const n = this.queryCbs[e] ?? [], r = (i = this._dataForQueryCache[e]) == null ? void 0 : i.data, s = this.dataForQuery(e);
5137
- s != null && s.data && (this._dataForQueryCache[e] = s, !rt(s.data, r) && n.forEach((o) => o.cb(s.data)));
5137
+ s != null && s.data && (this._dataForQueryCache[e] = s, !st(s.data, r) && n.forEach((o) => o.cb(s.data)));
5138
5138
  });
5139
5139
  p(this, "notifyOneQueryOnce", (e) => {
5140
5140
  var s;
@@ -5170,7 +5170,7 @@ class Ja {
5170
5170
  * @returns
5171
5171
  */
5172
5172
  p(this, "pushOps", (e, n) => {
5173
- const r = N(), s = [...this._pendingMutations().values()], i = Math.max(0, ...s.map((c) => c.order || 0)) + 1, o = {
5173
+ const r = F(), s = [...this._pendingMutations().values()], i = Math.max(0, ...s.map((c) => c.order || 0)) + 1, o = {
5174
5174
  op: "transact",
5175
5175
  "tx-steps": e,
5176
5176
  created: Date.now(),
@@ -5191,7 +5191,7 @@ class Ja {
5191
5191
  }
5192
5192
  this._log.info("[socket][open]", this._transport.id), this._setStatus(ie.OPENED), this.getCurrentUser().then((r) => {
5193
5193
  var s;
5194
- this._trySend(N(), {
5194
+ this._trySend(F(), {
5195
5195
  op: "init",
5196
5196
  "app-id": this.config.appId,
5197
5197
  "refresh-token": (s = r.user) == null ? void 0 : s.refresh_token,
@@ -5251,10 +5251,10 @@ class Ja {
5251
5251
  }
5252
5252
  this._log.info("[socket][close]", n.id, "schedule reconnect, ms =", this._reconnectTimeoutMs), this._scheduleReconnect();
5253
5253
  });
5254
- if (this._EventSource = i, this.config = { ...qa, ...e }, this.queryCacheLimit = this.config.queryCacheLimit ?? 10, this._pendingTxCleanupTimeout = this.config.pendingTxCleanupTimeout ?? Fa, this._pendingMutationCleanupThreshold = this.config.pendingMutationCleanupThreshold ?? Na, this._log = wa(e.verbose || ln || Gr, () => this._reactorStats()), this.versions = { ...s || {}, "@instantdb/core": Yr }, this.config.schema && (this._linkIndex = sr(this.config.schema)), !!Va()) {
5254
+ if (this._EventSource = i, this.config = { ...qa, ...e }, this.queryCacheLimit = this.config.queryCacheLimit ?? 10, this._pendingTxCleanupTimeout = this.config.pendingTxCleanupTimeout ?? Fa, this._pendingMutationCleanupThreshold = this.config.pendingMutationCleanupThreshold ?? Na, this._log = wa(e.verbose || fn || Gr, () => this._reactorStats()), this.versions = { ...s || {}, "@instantdb/core": Yr }, this.config.schema && (this._linkIndex = sr(this.config.schema)), !!Va()) {
5255
5255
  if (!e.appId)
5256
5256
  throw new Error("Instant must be initialized with an appId.");
5257
- if (!Ae(e.appId))
5257
+ if (!Oe(e.appId))
5258
5258
  throw new Error(`Instant must be initialized with a valid appId. \`${e.appId}\` is not a valid uuid.`);
5259
5259
  typeof BroadcastChannel == "function" && (this._broadcastChannel = new BroadcastChannel("@instantdb"), this._broadcastChannel.addEventListener("message", async (o) => {
5260
5260
  var a;
@@ -5305,7 +5305,7 @@ class Ja {
5305
5305
  this.kv.waitForKeyToLoad("pendingMutations").then(() => this.notifyOne(e));
5306
5306
  }
5307
5307
  _initStorage(e) {
5308
- this.querySubs = new Gt({
5308
+ this.querySubs = new Ht({
5309
5309
  persister: new e(this.config.appId, "querySubs"),
5310
5310
  merge: Ha,
5311
5311
  serialize: Qa,
@@ -5325,7 +5325,7 @@ class Ja {
5325
5325
  maxSize: 1e6
5326
5326
  // 1 million triples
5327
5327
  }
5328
- }), this.querySubs.onKeyLoaded = (n) => this._onQuerySubLoaded(n), this.kv = new Gt({
5328
+ }), this.querySubs.onKeyLoaded = (n) => this._onQuerySubLoaded(n), this.kv = new Ht({
5329
5329
  persister: new e(this.config.appId, "kv"),
5330
5330
  merge: this._onMergeKv,
5331
5331
  serialize: Ga,
@@ -5361,13 +5361,13 @@ class Ja {
5361
5361
  s.resolve({ status: e, eventId: n });
5362
5362
  else if (r != null && r.type) {
5363
5363
  const { status: o, ...a } = r;
5364
- s.reject(new dt({
5364
+ s.reject(new ht({
5365
5365
  // @ts-expect-error body.type is not constant typed
5366
5366
  body: a,
5367
5367
  status: o ?? 0
5368
5368
  }));
5369
5369
  } else
5370
- s.reject(new Ee((r == null ? void 0 : r.message) || "Unknown error", r == null ? void 0 : r.hint));
5370
+ s.reject(new ke((r == null ? void 0 : r.message) || "Unknown error", r == null ? void 0 : r.hint));
5371
5371
  }
5372
5372
  _setStatus(e, n) {
5373
5373
  this.status = e, this._errorMessage = n, this.notifyConnectionStatusSubs(e);
@@ -5391,7 +5391,7 @@ class Ja {
5391
5391
  _addQueryData(e, n, r) {
5392
5392
  if (!this.attrs)
5393
5393
  throw new Error("Attrs in reactor have not been set");
5394
- const s = F(e), i = this.ensureAttrs(), o = xe(this.attrs, n.triples, r, this.config.useDateObjects);
5394
+ const s = L(e), i = this.ensureAttrs(), o = xe(this.attrs, n.triples, r, this.config.useDateObjects);
5395
5395
  this.querySubs.updateInPlace((a) => {
5396
5396
  a[s] = {
5397
5397
  result: {
@@ -5406,39 +5406,39 @@ class Ja {
5406
5406
  }), this._cleanupPendingMutationsQueries(), this.notifyOne(s), this.notifyOneQueryOnce(s), this._cleanupPendingMutationsTimeout();
5407
5407
  }
5408
5408
  _handleReceive(e, n) {
5409
- var s, i, o, a, c, u;
5409
+ var s, i, o, a, c, u, l;
5410
5410
  const r = !!this.config.schema && ("cardinalityInference" in this.config ? !!this.config.cardinalityInference : !0);
5411
5411
  switch (dr[n.op] || this._log.info("[receive]", e, n.op, n), n.op) {
5412
5412
  case "init-ok": {
5413
5413
  this._setStatus(ie.AUTHENTICATED), this._reconnectTimeoutMs = 0, this._setAttrs(n.attrs), this._flushPendingMessages(), this._sessionId = n["session-id"];
5414
- for (const h of Object.keys(this._rooms)) {
5415
- const y = (i = (s = this._presence[h]) == null ? void 0 : s.result) == null ? void 0 : i.user;
5416
- this._tryJoinRoom(h, y);
5414
+ for (const y of Object.keys(this._rooms)) {
5415
+ const b = (i = (s = this._presence[y]) == null ? void 0 : s.result) == null ? void 0 : i.user, g = (o = this._rooms[y]) == null ? void 0 : o.roomType;
5416
+ this._tryJoinRoom(g, y, b);
5417
5417
  }
5418
5418
  break;
5419
5419
  }
5420
5420
  case "add-query-exists": {
5421
- this.notifyOneQueryOnce(F(n.q));
5421
+ this.notifyOneQueryOnce(L(n.q));
5422
5422
  break;
5423
5423
  }
5424
5424
  case "add-query-ok": {
5425
- const { q: h, result: y } = n, b = F(h);
5426
- if (!this._hasQueryListeners() && !this.querySubs.currentValue[b])
5425
+ const { q: y, result: b } = n, g = L(y);
5426
+ if (!this._hasQueryListeners() && !this.querySubs.currentValue[g])
5427
5427
  break;
5428
- const g = (a = (o = y == null ? void 0 : y[0]) == null ? void 0 : o.data) == null ? void 0 : a["page-info"], w = (u = (c = y == null ? void 0 : y[0]) == null ? void 0 : c.data) == null ? void 0 : u.aggregate, m = rr(y), T = this.ensureAttrs(), v = xe(T, m, r, this.config.useDateObjects);
5429
- this.querySubs.updateInPlace((E) => {
5430
- if (!E[b]) {
5431
- this._log.info("Missing value in querySubs", { hash: b, q: h });
5428
+ const w = (c = (a = b == null ? void 0 : b[0]) == null ? void 0 : a.data) == null ? void 0 : c["page-info"], m = (l = (u = b == null ? void 0 : b[0]) == null ? void 0 : u.data) == null ? void 0 : l.aggregate, T = rr(b), S = this.ensureAttrs(), C = xe(S, T, r, this.config.useDateObjects);
5429
+ this.querySubs.updateInPlace((A) => {
5430
+ if (!A[g]) {
5431
+ this._log.info("Missing value in querySubs", { hash: g, q: y });
5432
5432
  return;
5433
5433
  }
5434
- E[b].result = {
5435
- store: v,
5436
- attrsStore: T,
5437
- pageInfo: g,
5438
- aggregate: w,
5434
+ A[g].result = {
5435
+ store: C,
5436
+ attrsStore: S,
5437
+ pageInfo: w,
5438
+ aggregate: m,
5439
5439
  processedTxId: n["processed-tx-id"]
5440
5440
  };
5441
- }), this._cleanupPendingMutationsQueries(), this.notifyOne(b), this.notifyOneQueryOnce(b), this._cleanupPendingMutationsTimeout();
5441
+ }), this._cleanupPendingMutationsQueries(), this.notifyOne(g), this.notifyOneQueryOnce(g), this._cleanupPendingMutationsTimeout();
5442
5442
  break;
5443
5443
  }
5444
5444
  case "start-sync-ok": {
@@ -5458,101 +5458,101 @@ class Ja {
5458
5458
  break;
5459
5459
  }
5460
5460
  case "refresh-ok": {
5461
- const { computations: h, attrs: y } = n, b = n["processed-tx-id"];
5462
- y && this._setAttrs(y), this._cleanupPendingMutationsTimeout();
5463
- const g = this._rewriteMutations(this.ensureAttrs(), this._pendingMutations(), b);
5464
- g !== this._pendingMutations() && this.kv.updateInPlace((T) => {
5465
- T.pendingMutations = g;
5461
+ const { computations: y, attrs: b } = n, g = n["processed-tx-id"];
5462
+ b && this._setAttrs(b), this._cleanupPendingMutationsTimeout();
5463
+ const w = this._rewriteMutations(this.ensureAttrs(), this._pendingMutations(), g);
5464
+ w !== this._pendingMutations() && this.kv.updateInPlace((S) => {
5465
+ S.pendingMutations = w;
5466
5466
  });
5467
- const w = Ct(g.entries()), m = h.map((T) => {
5468
- var Ce, X, re, ue;
5469
- const v = T["instaql-query"], E = T["instaql-result"], A = F(v), j = rr(E), L = this.ensureAttrs(), q = xe(L, j, r, this.config.useDateObjects), { store: Pe, attrsStore: We } = this._applyOptimisticUpdates(q, L, w, b), ht = (X = (Ce = E == null ? void 0 : E[0]) == null ? void 0 : Ce.data) == null ? void 0 : X["page-info"], pt = (ue = (re = E == null ? void 0 : E[0]) == null ? void 0 : re.data) == null ? void 0 : ue.aggregate;
5467
+ const m = It(w.entries()), T = y.map((S) => {
5468
+ var X, re, le, Ce;
5469
+ const C = S["instaql-query"], A = S["instaql-result"], j = L(C), N = rr(A), q = this.ensureAttrs(), ue = xe(q, N, r, this.config.useDateObjects), { store: We, attrsStore: pt } = this._applyOptimisticUpdates(ue, q, m, g), yt = (re = (X = A == null ? void 0 : A[0]) == null ? void 0 : X.data) == null ? void 0 : re["page-info"], Qe = (Ce = (le = A == null ? void 0 : A[0]) == null ? void 0 : le.data) == null ? void 0 : Ce.aggregate;
5470
5470
  return {
5471
- q: v,
5472
- hash: A,
5473
- store: Pe,
5474
- attrsStore: We,
5475
- pageInfo: ht,
5476
- aggregate: pt
5471
+ q: C,
5472
+ hash: j,
5473
+ store: We,
5474
+ attrsStore: pt,
5475
+ pageInfo: yt,
5476
+ aggregate: Qe
5477
5477
  };
5478
5478
  });
5479
- m.forEach(({ hash: T, q: v, store: E, attrsStore: A, pageInfo: j, aggregate: L }) => {
5480
- this.querySubs.updateInPlace((q) => {
5481
- if (!q[T]) {
5482
- this._log.error("Missing value in querySubs", { hash: T, q: v });
5479
+ T.forEach(({ hash: S, q: C, store: A, attrsStore: j, pageInfo: N, aggregate: q }) => {
5480
+ this.querySubs.updateInPlace((ue) => {
5481
+ if (!ue[S]) {
5482
+ this._log.error("Missing value in querySubs", { hash: S, q: C });
5483
5483
  return;
5484
5484
  }
5485
- q[T].result = {
5486
- store: E,
5487
- attrsStore: A,
5488
- pageInfo: j,
5489
- aggregate: L,
5490
- processedTxId: b
5485
+ ue[S].result = {
5486
+ store: A,
5487
+ attrsStore: j,
5488
+ pageInfo: N,
5489
+ aggregate: q,
5490
+ processedTxId: g
5491
5491
  };
5492
5492
  });
5493
- }), this._cleanupPendingMutationsQueries(), m.forEach(({ hash: T }) => {
5494
- this.notifyOne(T);
5493
+ }), this._cleanupPendingMutationsQueries(), T.forEach(({ hash: S }) => {
5494
+ this.notifyOne(S);
5495
5495
  });
5496
5496
  break;
5497
5497
  }
5498
5498
  case "transact-ok": {
5499
- const { "client-event-id": h, "tx-id": y } = n;
5500
- this._inFlightMutationEventIds.delete(h);
5501
- const g = this._rewriteMutations(this.ensureAttrs(), this._pendingMutations()).get(h);
5502
- if (!g)
5499
+ const { "client-event-id": y, "tx-id": b } = n;
5500
+ this._inFlightMutationEventIds.delete(y);
5501
+ const w = this._rewriteMutations(this.ensureAttrs(), this._pendingMutations()).get(y);
5502
+ if (!w)
5503
5503
  break;
5504
- this._updatePendingMutations((m) => {
5505
- m.set(h, {
5506
- ...m.get(h),
5507
- "tx-id": y,
5504
+ this._updatePendingMutations((T) => {
5505
+ T.set(y, {
5506
+ ...T.get(y),
5507
+ "tx-id": b,
5508
5508
  confirmed: Date.now()
5509
5509
  });
5510
5510
  });
5511
- const w = [];
5512
- for (const m of g["tx-steps"])
5513
- if (m[0] === "add-attr") {
5514
- const T = m[1];
5515
- w.push(T);
5511
+ const m = [];
5512
+ for (const T of w["tx-steps"])
5513
+ if (T[0] === "add-attr") {
5514
+ const S = T[1];
5515
+ m.push(S);
5516
5516
  }
5517
- if (w.length) {
5518
- const m = Object.values(this.ensureAttrs().attrs);
5519
- this._setAttrs([...m, ...w]);
5517
+ if (m.length) {
5518
+ const T = Object.values(this.ensureAttrs().attrs);
5519
+ this._setAttrs([...T, ...m]);
5520
5520
  }
5521
- this._finishTransaction("synced", h), this._cleanupPendingMutationsTimeout();
5521
+ this._finishTransaction("synced", y), this._cleanupPendingMutationsTimeout();
5522
5522
  break;
5523
5523
  }
5524
5524
  case "patch-presence": {
5525
- const h = n["room-id"];
5526
- this._trySetRoomConnected(h, !0), this._patchPresencePeers(h, n.edits), this._notifyPresenceSubs(h);
5525
+ const y = n["room-id"];
5526
+ this._trySetRoomConnected(y, !0), this._patchPresencePeers(y, n.edits), this._notifyPresenceSubs(y);
5527
5527
  break;
5528
5528
  }
5529
5529
  case "refresh-presence": {
5530
- const h = n["room-id"];
5531
- this._trySetRoomConnected(h, !0), this._setPresencePeers(h, n.data), this._notifyPresenceSubs(h);
5530
+ const y = n["room-id"];
5531
+ this._trySetRoomConnected(y, !0), this._setPresencePeers(y, n.data), this._notifyPresenceSubs(y);
5532
5532
  break;
5533
5533
  }
5534
5534
  case "server-broadcast": {
5535
- const h = n["room-id"], y = n.topic;
5536
- this._trySetRoomConnected(h, !0), this._notifyBroadcastSubs(h, y, n);
5535
+ const y = n["room-id"], b = n.topic;
5536
+ this._trySetRoomConnected(y, !0), this._notifyBroadcastSubs(y, b, n);
5537
5537
  break;
5538
5538
  }
5539
5539
  case "join-room-ok": {
5540
- const h = n["room-id"];
5541
- if (!this._rooms[h]) {
5542
- this._roomsPendingLeave[h] && (this._tryLeaveRoom(h), delete this._roomsPendingLeave[h]);
5540
+ const y = n["room-id"];
5541
+ if (!this._rooms[y]) {
5542
+ this._roomsPendingLeave[y] && (this._tryLeaveRoom(y), delete this._roomsPendingLeave[y]);
5543
5543
  break;
5544
5544
  }
5545
- this._trySetRoomConnected(h, !0), this._flushEnqueuedRoomData(h);
5545
+ this._trySetRoomConnected(y, !0), this._flushEnqueuedRoomData(y);
5546
5546
  break;
5547
5547
  }
5548
5548
  case "leave-room-ok": {
5549
- const h = n["room-id"];
5550
- this._trySetRoomConnected(h, !1);
5549
+ const y = n["room-id"];
5550
+ this._trySetRoomConnected(y, !1);
5551
5551
  break;
5552
5552
  }
5553
5553
  case "join-room-error":
5554
- const l = n["room-id"], d = this._rooms[l];
5555
- d && (d.error = n.error), this._notifyPresenceSubs(l);
5554
+ const d = n["room-id"], h = this._rooms[d];
5555
+ h && (h.error = n.error), this._notifyPresenceSubs(d);
5556
5556
  break;
5557
5557
  case "error":
5558
5558
  this._handleReceiveError(n);
@@ -5600,8 +5600,8 @@ class Ja {
5600
5600
  return;
5601
5601
  }
5602
5602
  if ((a = e["original-event"]) != null && a.hasOwnProperty("q") && ((c = e["original-event"]) == null ? void 0 : c.op) === "add-query") {
5603
- const b = (u = e["original-event"]) == null ? void 0 : u.q, g = F(b);
5604
- this.notifyQueryError(F(b), s), this.notifyQueryOnceError(b, g, n, s);
5603
+ const b = (u = e["original-event"]) == null ? void 0 : u.q, g = L(b);
5604
+ this.notifyQueryError(L(b), s), this.notifyQueryOnceError(b, g, n, s);
5605
5605
  return;
5606
5606
  }
5607
5607
  if (((l = e["original-event"]) == null ? void 0 : l.op) === "init") {
@@ -5630,10 +5630,10 @@ class Ja {
5630
5630
  i && (i.dfd.reject(s), this._completeQueryOnce(e, n, i.dfd));
5631
5631
  }
5632
5632
  _setAttrs(e) {
5633
- this.attrs = new ye(e.reduce((n, r) => (n[r.id] = r, n), {}), this._linkIndex), this.notifyAttrsSubs();
5633
+ this.attrs = new be(e.reduce((n, r) => (n[r.id] = r, n), {}), this._linkIndex), this.notifyAttrsSubs();
5634
5634
  }
5635
5635
  _startQuerySub(e, n) {
5636
- const r = N();
5636
+ const r = F();
5637
5637
  return this.querySubs.updateInPlace((s) => {
5638
5638
  s[n] = s[n] || { q: e, result: null, eventId: r }, s[n].lastAccessed = Date.now();
5639
5639
  }), this._trySendAuthed(r, { op: "add-query", q: e }), r;
@@ -5653,7 +5653,7 @@ class Ja {
5653
5653
  */
5654
5654
  subscribeQuery(e, n, r) {
5655
5655
  this.config.disableValidation || or(e, this.config.schema), r && "ruleParams" in r && (e = { $$ruleParams: r.ruleParams, ...e });
5656
- const s = F(e), i = this.getPreviousResult(e);
5656
+ const s = L(e), i = this.getPreviousResult(e);
5657
5657
  return i && n(i), this.queryCbs[s] = this.queryCbs[s] ?? [], this.queryCbs[s].push({ q: e, cb: n }), this._startQuerySub(e, s), () => {
5658
5658
  this._unsubQuery(e, s, n);
5659
5659
  };
@@ -5665,7 +5665,7 @@ class Ja {
5665
5665
  return r.reject(new Error("We can't run `queryOnce`, because the device is offline.")), r.promise;
5666
5666
  if (!this.querySubs)
5667
5667
  return r.reject(new Error("We can't run `queryOnce` on the backend. Use adminAPI.query instead: https://www.instantdb.com/docs/backend#query")), r.promise;
5668
- const s = F(e), i = this._startQuerySub(e, s);
5668
+ const s = L(e), i = this._startQuerySub(e, s);
5669
5669
  return this.queryOnceDfds[s] = this.queryOnceDfds[s] ?? [], this.queryOnceDfds[s].push({ q: e, dfd: r, eventId: i }), setTimeout(() => r.reject(new Error("Query timed out")), La), r.promise;
5670
5670
  }
5671
5671
  _completeQueryOnce(e, n, r) {
@@ -5679,7 +5679,7 @@ class Ja {
5679
5679
  return !!((n = this.queryCbs[e]) != null && n.length || (r = this.queryOnceDfds[e]) != null && r.length);
5680
5680
  }
5681
5681
  _cleanupQuery(e, n) {
5682
- this._hasQueryListeners(n) || (delete this.queryCbs[n], delete this.queryOnceDfds[n], delete this._dataForQueryCache[n], this.querySubs.unloadKey(n), this._trySendAuthed(N(), { op: "remove-query", q: e }));
5682
+ this._hasQueryListeners(n) || (delete this.queryCbs[n], delete this.queryOnceDfds[n], delete this._dataForQueryCache[n], this.querySubs.unloadKey(n), this._trySendAuthed(F(), { op: "remove-query", q: e }));
5683
5683
  }
5684
5684
  // When we `pushTx`, it's possible that we don't yet have `this.attrs`
5685
5685
  // This means that `tx-steps` in `pendingMutations` will include `add-attr`
@@ -5708,7 +5708,7 @@ class Ja {
5708
5708
  return U(e, h, y);
5709
5709
  }, i = (l) => {
5710
5710
  const [d, h, y] = l["forward-identity"];
5711
- return Te(e, h, y);
5711
+ return we(e, h, y);
5712
5712
  }, o = { attrIdMap: {}, refSwapAttrIds: /* @__PURE__ */ new Set() };
5713
5713
  let a = !1;
5714
5714
  const c = (l, d) => {
@@ -5722,9 +5722,9 @@ class Ja {
5722
5722
  continue;
5723
5723
  }
5724
5724
  if (m["value-type"] === "ref") {
5725
- const v = i(m);
5726
- if (v) {
5727
- o.attrIdMap[m.id] = v.id, o.refSwapAttrIds.add(m.id), a = !0;
5725
+ const S = i(m);
5726
+ if (S) {
5727
+ o.attrIdMap[m.id] = S.id, o.refSwapAttrIds.add(m.id), a = !0;
5728
5728
  continue;
5729
5729
  }
5730
5730
  }
@@ -5746,7 +5746,7 @@ class Ja {
5746
5746
  return a ? u : n;
5747
5747
  }
5748
5748
  _rewriteMutationsSorted(e, n) {
5749
- return Ct(this._rewriteMutations(e, n).entries());
5749
+ return It(this._rewriteMutations(e, n).entries());
5750
5750
  }
5751
5751
  // ---------------------------
5752
5752
  // Transact
@@ -5764,13 +5764,13 @@ class Ja {
5764
5764
  r.push(u);
5765
5765
  }
5766
5766
  if (!n.size && !r.length)
5767
- return this.attrs || new ye({}, this._linkIndex);
5767
+ return this.attrs || new be({}, this._linkIndex);
5768
5768
  const s = { ...((o = this.attrs) == null ? void 0 : o.attrs) || {} };
5769
5769
  for (const a of r)
5770
5770
  s[a.id] = a;
5771
5771
  for (const a of n)
5772
5772
  delete s[a];
5773
- return new ye(s, this._linkIndex);
5773
+ return new be(s, this._linkIndex);
5774
5774
  }
5775
5775
  /** Runs instaql on a query and a store */
5776
5776
  dataForQuery(e, n = !0) {
@@ -5855,7 +5855,7 @@ class Ja {
5855
5855
  const r = this._rewriteMutations(this.ensureAttrs(), this._pendingMutations());
5856
5856
  r !== this._pendingMutations() && this.kv.updateInPlace((i) => {
5857
5857
  i.pendingMutations = r;
5858
- }), Ct(r.entries()).forEach(([i, o]) => {
5858
+ }), It(r.entries()).forEach(([i, o]) => {
5859
5859
  o["tx-id"] || this._sendMutation(i, o);
5860
5860
  }), this._syncTable.flushPending();
5861
5861
  }
@@ -5934,7 +5934,7 @@ class Ja {
5934
5934
  const r = await this.kv.waitForKeyToLoad(n);
5935
5935
  if (r)
5936
5936
  return r;
5937
- const s = N();
5937
+ const s = F();
5938
5938
  return this.kv.updateInPlace((i) => {
5939
5939
  i[n] || (i[n] = s);
5940
5940
  }), await this.kv.waitForKeyToLoad(n);
@@ -5945,9 +5945,9 @@ class Ja {
5945
5945
  if (typeof URL > "u")
5946
5946
  return;
5947
5947
  const e = new URL(window.location.href);
5948
- if (e.searchParams.get(Pt)) {
5948
+ if (e.searchParams.get(Ct)) {
5949
5949
  const n = e.toString();
5950
- e.searchParams.delete(Pt), e.searchParams.delete("code"), e.searchParams.delete("error");
5950
+ e.searchParams.delete(Ct), e.searchParams.delete("code"), e.searchParams.delete("error");
5951
5951
  const r = e.pathname + (e.searchParams.size ? "?" + e.searchParams : "") + e.hash;
5952
5952
  if (history.replaceState(history.state, "", r), // @ts-ignore (waiting for ts support)
5953
5953
  typeof navigation == "object" && // @ts-ignore (waiting for ts support)
@@ -5971,7 +5971,7 @@ class Ja {
5971
5971
  if (typeof window > "u" || typeof window.location > "u" || typeof URLSearchParams > "u")
5972
5972
  return null;
5973
5973
  const e = new URLSearchParams(window.location.search);
5974
- if (!e.get(Pt))
5974
+ if (!e.get(Ct))
5975
5975
  return null;
5976
5976
  const n = e.get("error");
5977
5977
  if (n)
@@ -6006,7 +6006,7 @@ class Ja {
6006
6006
  n.isLoading || e(this._currentUserCached);
6007
6007
  let r = !1;
6008
6008
  return this.getCurrentUser().then((s) => {
6009
- r || rt(s, n) || e(s);
6009
+ r || st(s, n) || e(s);
6010
6010
  }), () => {
6011
6011
  r = !0, this.authCbs = this.authCbs.filter((s) => s !== e);
6012
6012
  };
@@ -6014,7 +6014,7 @@ class Ja {
6014
6014
  async getAuth() {
6015
6015
  const { user: e, error: n } = await this.getCurrentUser();
6016
6016
  if (n)
6017
- throw new Ee("Could not get current user: " + n.message);
6017
+ throw new ke("Could not get current user: " + n.message);
6018
6018
  return e;
6019
6019
  }
6020
6020
  subscribeConnectionStatus(e) {
@@ -6081,7 +6081,7 @@ class Ja {
6081
6081
  async changeCurrentUser(e) {
6082
6082
  var r;
6083
6083
  const { user: n } = await this.getCurrentUser();
6084
- if (!rt(n, e)) {
6084
+ if (!st(n, e)) {
6085
6085
  await this.setCurrentUser(e), await this.updateUser(e);
6086
6086
  try {
6087
6087
  (r = this._broadcastChannel) == null || r.postMessage({ type: "auth" });
@@ -6229,19 +6229,21 @@ class Ja {
6229
6229
  // --------
6230
6230
  // Rooms
6231
6231
  /**
6232
+ * @param {string} roomType
6232
6233
  * @param {string} roomId
6233
6234
  * @param {any | null | undefined} [initialPresence] -- initial presence data to send when joining the room
6234
6235
  * @returns () => void
6235
6236
  */
6236
- joinRoom(e, n) {
6237
- let r = !1;
6238
- this._rooms[e] || (r = !0, this._rooms[e] = {
6237
+ joinRoom(e, n, r) {
6238
+ let s = !1;
6239
+ this._rooms[n] || (s = !0, this._rooms[n] = {
6240
+ roomType: e,
6239
6241
  isConnected: !1,
6240
6242
  error: void 0
6241
- }), this._presence[e] = this._presence[e] || {};
6242
- const s = this._presence[e].result;
6243
- return n && !s && (this._presence[e].result = this._presence[e].result || {}, this._presence[e].result.user = n, this._notifyPresenceSubs(e)), r && this._tryJoinRoom(e, n), () => {
6244
- this._cleanupRoom(e);
6243
+ }), this._presence[n] = this._presence[n] || {};
6244
+ const i = this._presence[n].result;
6245
+ return r && !i && (this._presence[n].result = this._presence[n].result || {}, this._presence[n].result.user = r, this._notifyPresenceSubs(n)), s && this._tryJoinRoom(e, n, r), () => {
6246
+ this._cleanupRoom(n);
6245
6247
  };
6246
6248
  }
6247
6249
  _cleanupRoom(e) {
@@ -6275,17 +6277,22 @@ class Ja {
6275
6277
  i.result.user = o, s.isConnected && (this._trySetPresence(n, o), this._notifyPresenceSubs(n));
6276
6278
  }
6277
6279
  _trySetPresence(e, n) {
6278
- this._trySendAuthed(N(), {
6280
+ this._trySendAuthed(F(), {
6279
6281
  op: "set-presence",
6280
6282
  "room-id": e,
6281
6283
  data: n
6282
6284
  });
6283
6285
  }
6284
- _tryJoinRoom(e, n) {
6285
- this._trySendAuthed(N(), { op: "join-room", "room-id": e, data: n }), delete this._roomsPendingLeave[e];
6286
+ _tryJoinRoom(e, n, r) {
6287
+ this._trySendAuthed(F(), {
6288
+ op: "join-room",
6289
+ "room-type": e,
6290
+ "room-id": n,
6291
+ data: r
6292
+ }), delete this._roomsPendingLeave[n];
6286
6293
  }
6287
6294
  _tryLeaveRoom(e) {
6288
- this._trySendAuthed(N(), { op: "leave-room", "room-id": e });
6295
+ this._trySendAuthed(F(), { op: "leave-room", "room-id": e });
6289
6296
  }
6290
6297
  _trySetRoomConnected(e, n) {
6291
6298
  const r = this._rooms[e];
@@ -6294,6 +6301,7 @@ class Ja {
6294
6301
  // TODO: look into typing again
6295
6302
  subscribePresence(e, n, r, s) {
6296
6303
  const i = this.joinRoom(
6304
+ e,
6297
6305
  n,
6298
6306
  // Oct 28, 2025
6299
6307
  // Note: initialData is deprecated.
@@ -6320,7 +6328,7 @@ class Ja {
6320
6328
  const r = ((a = (o = this._presence[e]) == null ? void 0 : o.result) == null ? void 0 : a.peers) || {};
6321
6329
  let s = Object.fromEntries(Object.entries(r).map(([u, l]) => [u, { data: l }]));
6322
6330
  (c = this._presence[e]) == null || c.result;
6323
- const i = at(s, (u) => {
6331
+ const i = ct(s, (u) => {
6324
6332
  for (let [l, d, h] of n)
6325
6333
  switch (d) {
6326
6334
  case "+":
@@ -6341,7 +6349,7 @@ class Ja {
6341
6349
  const r = { ...n };
6342
6350
  delete r[this._sessionId];
6343
6351
  const s = Object.fromEntries(Object.entries(r).map(([i, o]) => [i, o.data]));
6344
- this._presence = at(this._presence, (i) => {
6352
+ this._presence = ct(this._presence, (i) => {
6345
6353
  Kn(i, [e, "result", "peers"], s);
6346
6354
  });
6347
6355
  }
@@ -6358,7 +6366,7 @@ class Ja {
6358
6366
  }
6359
6367
  }
6360
6368
  _tryBroadcast(e, n, r, s) {
6361
- this._trySendAuthed(N(), {
6369
+ this._trySendAuthed(F(), {
6362
6370
  op: "client-broadcast",
6363
6371
  "room-id": e,
6364
6372
  roomType: n,
@@ -6366,10 +6374,10 @@ class Ja {
6366
6374
  data: s
6367
6375
  });
6368
6376
  }
6369
- subscribeTopic(e, n, r) {
6370
- const s = this.joinRoom(e);
6371
- return this._broadcastSubs[e] = this._broadcastSubs[e] || {}, this._broadcastSubs[e][n] = this._broadcastSubs[e][n] || [], this._broadcastSubs[e][n].push(r), this._presence[e] = this._presence[e] || {}, () => {
6372
- this._broadcastSubs[e][n] = this._broadcastSubs[e][n].filter((i) => i !== r), this._broadcastSubs[e][n].length || delete this._broadcastSubs[e][n], s();
6377
+ subscribeTopic(e, n, r, s) {
6378
+ const i = this.joinRoom(e, n);
6379
+ return this._broadcastSubs[n] = this._broadcastSubs[n] || {}, this._broadcastSubs[n][r] = this._broadcastSubs[n][r] || [], this._broadcastSubs[n][r].push(s), this._presence[n] = this._presence[n] || {}, () => {
6380
+ this._broadcastSubs[n][r] = this._broadcastSubs[n][r].filter((o) => o !== s), this._broadcastSubs[n][r].length || delete this._broadcastSubs[n][r], i();
6373
6381
  };
6374
6382
  }
6375
6383
  _notifyBroadcastSubs(e, n, r) {
@@ -6427,9 +6435,9 @@ class Ja {
6427
6435
  });
6428
6436
  }
6429
6437
  }
6430
- let et;
6438
+ let tt;
6431
6439
  function Ya(t, e) {
6432
- et == null || et.dispose();
6440
+ tt == null || tt.dispose();
6433
6441
  const n = rc(e), r = ec(e, a), s = Xa(Za(t));
6434
6442
  function i(l) {
6435
6443
  var d;
@@ -6446,14 +6454,14 @@ function Ya(t, e) {
6446
6454
  n.element.remove(), r.element.remove(), removeEventListener("keydown", o), removeEventListener("message", i);
6447
6455
  }
6448
6456
  function u() {
6449
- document.body.appendChild(n.element), document.body.appendChild(r.element), addEventListener("keydown", o), addEventListener("message", i), et = {
6457
+ document.body.appendChild(n.element), document.body.appendChild(r.element), addEventListener("keydown", o), addEventListener("message", i), tt = {
6450
6458
  dispose: c
6451
6459
  };
6452
6460
  }
6453
6461
  return u();
6454
6462
  }
6455
6463
  function Za(t) {
6456
- return `${ln || Hr ? "http://localhost:3000" : "https://instantdb.com"}/_devtool?appId=${t}`;
6464
+ return `${fn || Hr ? "http://localhost:3000" : "https://instantdb.com"}/_devtool?appId=${t}`;
6457
6465
  }
6458
6466
  function Xa(t) {
6459
6467
  const e = document.createElement("iframe");
@@ -6540,11 +6548,11 @@ function ic() {
6540
6548
  function oc() {
6541
6549
  return globalThis.__instantDbStore = globalThis.__instantDbStore ?? {}, globalThis.__instantDbStore;
6542
6550
  }
6543
- function Ht(t) {
6551
+ function Jt(t) {
6544
6552
  const e = t.__adminToken;
6545
6553
  return t.appId + "_" + (t.websocketURI || "default_ws_uri") + "_" + (t.apiURI || "default_api_uri") + "_" + (e || "client_only") + "_" + t.useDateObjects;
6546
6554
  }
6547
- const Jt = oc(), hr = ic();
6555
+ const Yt = oc(), hr = ic();
6548
6556
  class ac {
6549
6557
  constructor(e) {
6550
6558
  p(this, "db");
@@ -6719,7 +6727,7 @@ class lc {
6719
6727
  p(this, "_reactor");
6720
6728
  p(this, "auth");
6721
6729
  p(this, "storage");
6722
- p(this, "tx", un());
6730
+ p(this, "tx", ln());
6723
6731
  this._reactor = e, this.auth = new ac(this._reactor), this.storage = new cc(this._reactor);
6724
6732
  }
6725
6733
  /**
@@ -6852,8 +6860,8 @@ class lc {
6852
6860
  */
6853
6861
  joinRoom(e = "_defaultRoomType", n = "_defaultRoomId", r) {
6854
6862
  return {
6855
- leaveRoom: this._reactor.joinRoom(n, r == null ? void 0 : r.initialPresence),
6856
- subscribeTopic: (i, o) => this._reactor.subscribeTopic(n, i, o),
6863
+ leaveRoom: this._reactor.joinRoom(e, n, r == null ? void 0 : r.initialPresence),
6864
+ subscribeTopic: (i, o) => this._reactor.subscribeTopic(e, n, i, o),
6857
6865
  subscribePresence: (i, o) => this._reactor.subscribePresence(e, n, i, o),
6858
6866
  publishTopic: (i, o) => this._reactor.publishTopic({ roomType: e, roomId: n, topic: i, data: o }),
6859
6867
  publishPresence: (i) => this._reactor.publishPresence(e, n, i),
@@ -6861,7 +6869,7 @@ class lc {
6861
6869
  };
6862
6870
  }
6863
6871
  shutdown() {
6864
- delete Jt[Ht(this._reactor.config)], this._reactor.shutdown();
6872
+ delete Yt[Jt(this._reactor.config)], this._reactor.shutdown();
6865
6873
  }
6866
6874
  /**
6867
6875
  * Use this for one-off queries.
@@ -6900,7 +6908,7 @@ function pr(t) {
6900
6908
  const e = hr.get(t);
6901
6909
  if (e)
6902
6910
  return e;
6903
- const n = F(t);
6911
+ const n = L(t);
6904
6912
  return hr.set(t, n), n;
6905
6913
  }
6906
6914
  function fc(t, e) {
@@ -6912,7 +6920,7 @@ function dc(t, e, n, r, s) {
6912
6920
  ...t,
6913
6921
  appId: (u = t.appId) == null ? void 0 : u.trim(),
6914
6922
  useDateObjects: t.useDateObjects ?? !1
6915
- }, o = Jt[Ht(i)];
6923
+ }, o = Yt[Jt(i)];
6916
6924
  if (o)
6917
6925
  return fc(o, i.schema) && o._reactor.updateSchema(i.schema), o;
6918
6926
  const a = new Ja({
@@ -6920,7 +6928,7 @@ function dc(t, e, n, r, s) {
6920
6928
  ...i,
6921
6929
  cardinalityInference: !!i.schema
6922
6930
  }, e || Qr, n || Br, { ...r || {}, "@instantdb/core": Yr }, s), c = new lc(a);
6923
- return Jt[Ht(i)] = c, hc(i.appId, i.devtool), c;
6931
+ return Yt[Jt(i)] = c, hc(i.appId, i.devtool), c;
6924
6932
  }
6925
6933
  function hc(t, e) {
6926
6934
  if (typeof window > "u" || typeof window.location > "u" || typeof document > "u" || typeof e == "boolean" && !e)
@@ -6949,9 +6957,9 @@ function yr(t) {
6949
6957
  }
6950
6958
  function yc(t, e, n) {
6951
6959
  e && n && "ruleParams" in n && (e = { $$ruleParams: n.ruleParams, ...e });
6952
- const r = e ? uc(e) : null, s = F(r), i = Ke(
6960
+ const r = e ? uc(e) : null, s = L(r), i = Ke(
6953
6961
  yr(t._reactor.getPreviousResult(r))
6954
- ), o = le(
6962
+ ), o = fe(
6955
6963
  (c) => (i.current = yr(
6956
6964
  t._reactor.getPreviousResult(r)
6957
6965
  ), c(), r ? t.subscribeQuery(r, (l) => {
@@ -6970,7 +6978,7 @@ function yc(t, e, n) {
6970
6978
  // Build a new subscribe function if the query changes
6971
6979
  [s]
6972
6980
  );
6973
- return { state: Mt(
6981
+ return { state: jt(
6974
6982
  o,
6975
6983
  () => i.current,
6976
6984
  () => pc
@@ -6978,7 +6986,7 @@ function yc(t, e, n) {
6978
6986
  }
6979
6987
  function bc() {
6980
6988
  const t = Ke(null);
6981
- be(() => {
6989
+ _e(() => {
6982
6990
  n();
6983
6991
  }, []);
6984
6992
  function e(r, s) {
@@ -6992,7 +7000,8 @@ function bc() {
6992
7000
  const _c = 1e3;
6993
7001
  function gc(t, e, n) {
6994
7002
  const r = Ke(n);
6995
- r.current = n, be(() => t.core._reactor.subscribeTopic(
7003
+ r.current = n, _e(() => t.core._reactor.subscribeTopic(
7004
+ t.type,
6996
7005
  t.id,
6997
7006
  e,
6998
7007
  (i, o) => {
@@ -7001,7 +7010,7 @@ function gc(t, e, n) {
7001
7010
  ), [t.id, e]);
7002
7011
  }
7003
7012
  function Tc(t, e) {
7004
- return be(() => t.core._reactor.joinRoom(t.id), [t.id]), le(
7013
+ return _e(() => t.core._reactor.joinRoom(t.type, t.id), [t.id]), fe(
7005
7014
  (r) => {
7006
7015
  t.core._reactor.publishTopic({
7007
7016
  roomType: t.type,
@@ -7019,7 +7028,7 @@ function wc(t, e = {}) {
7019
7028
  peers: {},
7020
7029
  isLoading: !0
7021
7030
  });
7022
- be(() => t.core._reactor.subscribePresence(
7031
+ _e(() => t.core._reactor.subscribePresence(
7023
7032
  t.type,
7024
7033
  t.id,
7025
7034
  e,
@@ -7027,24 +7036,27 @@ function wc(t, e = {}) {
7027
7036
  r(u);
7028
7037
  }
7029
7038
  ), [t.id, e.user, (o = e.peers) == null ? void 0 : o.join(), (a = e.keys) == null ? void 0 : a.join()]);
7030
- const s = le(
7039
+ const s = fe(
7031
7040
  (c) => {
7032
7041
  t.core._reactor.publishPresence(t.type, t.id, c);
7033
7042
  },
7034
7043
  [t.type, t.id]
7035
7044
  );
7036
- return jt(() => ({
7045
+ return Rt(() => ({
7037
7046
  ...n,
7038
7047
  publishPresence: s
7039
7048
  }), [n, s]);
7040
7049
  }
7041
7050
  function mc(t, e, n) {
7042
- be(() => t.core._reactor.joinRoom(t.id, e), [t.id]), be(() => t.core._reactor.publishPresence(t.type, t.id, e), [t.type, t.id, n ?? JSON.stringify(e)]);
7051
+ _e(
7052
+ () => t.core._reactor.joinRoom(t.type, t.id, e),
7053
+ [t.id]
7054
+ ), _e(() => t.core._reactor.publishPresence(t.type, t.id, e), [t.type, t.id, n ?? JSON.stringify(e)]);
7043
7055
  }
7044
7056
  function Sc(t, e, n = {}) {
7045
- const r = bc(), s = he.usePresence(t, {
7057
+ const r = bc(), s = pe.usePresence(t, {
7046
7058
  keys: [e]
7047
- }), i = jt(() => {
7059
+ }), i = Rt(() => {
7048
7060
  const l = t._core._reactor.getPresence(
7049
7061
  t.type,
7050
7062
  t.id
@@ -7052,7 +7064,7 @@ function Sc(t, e, n = {}) {
7052
7064
  return n != null && n.writeOnly ? [] : Object.values((l == null ? void 0 : l.peers) ?? {}).filter(
7053
7065
  (d) => d[e] === !0
7054
7066
  );
7055
- }, [n == null ? void 0 : n.writeOnly, s]), o = le(
7067
+ }, [n == null ? void 0 : n.writeOnly, s]), o = fe(
7056
7068
  (l) => {
7057
7069
  t.core._reactor.publishPresence(t.type, t.id, {
7058
7070
  [e]: l
@@ -7063,22 +7075,22 @@ function Sc(t, e, n = {}) {
7063
7075
  }));
7064
7076
  },
7065
7077
  [t.type, t.id, e, n == null ? void 0 : n.timeout, r]
7066
- ), a = le(
7078
+ ), a = fe(
7067
7079
  (l) => {
7068
7080
  const h = !((n == null ? void 0 : n.stopOnEnter) && l.key === "Enter");
7069
7081
  o(h);
7070
7082
  },
7071
7083
  [n.stopOnEnter, o]
7072
- ), c = le(() => {
7084
+ ), c = fe(() => {
7073
7085
  o(!1);
7074
- }, [o]), u = jt(() => ({ onKeyDown: a, onBlur: c }), [a, c]);
7086
+ }, [o]), u = Rt(() => ({ onKeyDown: a, onBlur: c }), [a, c]);
7075
7087
  return {
7076
7088
  active: i,
7077
7089
  setActive: o,
7078
7090
  inputProps: u
7079
7091
  };
7080
7092
  }
7081
- const he = {
7093
+ const pe = {
7082
7094
  useTopicEffect: gc,
7083
7095
  usePublishTopic: Tc,
7084
7096
  usePresence: wc,
@@ -7107,7 +7119,7 @@ class vc {
7107
7119
  * db.rooms.useTopicEffect(room, 'emoji', (message, peer) => { });
7108
7120
  */
7109
7121
  p(this, "useTopicEffect", (e, n) => {
7110
- he.useTopicEffect(this, e, n);
7122
+ pe.useTopicEffect(this, e, n);
7111
7123
  });
7112
7124
  /**
7113
7125
  * @deprecated
@@ -7123,7 +7135,7 @@ class vc {
7123
7135
  * const room = db.room('chat', 'room-id');
7124
7136
  * const publish = db.rooms.usePublishTopic(room, 'emoji');
7125
7137
  */
7126
- p(this, "usePublishTopic", (e) => he.usePublishTopic(this, e));
7138
+ p(this, "usePublishTopic", (e) => pe.usePublishTopic(this, e));
7127
7139
  /**
7128
7140
  * @deprecated
7129
7141
  * `db.room(...).usePresence` is deprecated. You can replace it with `db.rooms.usePresence`.
@@ -7138,7 +7150,7 @@ class vc {
7138
7150
  * const room = db.room('chat', 'room-id');
7139
7151
  * const { peers } = db.rooms.usePresence(room, { keys: ["name", "avatar"] });
7140
7152
  */
7141
- p(this, "usePresence", (e = {}) => he.usePresence(this, e));
7153
+ p(this, "usePresence", (e = {}) => pe.usePresence(this, e));
7142
7154
  /**
7143
7155
  * @deprecated
7144
7156
  * `db.room(...).useSyncPresence` is deprecated. You can replace it with `db.rooms.useSyncPresence`.
@@ -7153,7 +7165,7 @@ class vc {
7153
7165
  * const room = db.room('chat', 'room-id');
7154
7166
  * db.rooms.useSyncPresence(room, { nickname });
7155
7167
  */
7156
- p(this, "useSyncPresence", (e, n) => he.useSyncPresence(this, e, n));
7168
+ p(this, "useSyncPresence", (e, n) => pe.useSyncPresence(this, e, n));
7157
7169
  /**
7158
7170
  * @deprecated
7159
7171
  * `db.room(...).useTypingIndicator` is deprecated. You can replace it with `db.rooms.useTypingIndicator`.
@@ -7168,7 +7180,7 @@ class vc {
7168
7180
  * const room = db.room('chat', 'room-id');
7169
7181
  * const typing = db.rooms.useTypingIndiactor(room, 'chat-input');
7170
7182
  */
7171
- p(this, "useTypingIndicator", (e, n = {}) => he.useTypingIndicator(this, e, n));
7183
+ p(this, "useTypingIndicator", (e, n = {}) => pe.useTypingIndicator(this, e, n));
7172
7184
  this.core = e, this._core = this.core, this.type = n, this.id = r;
7173
7185
  }
7174
7186
  }
@@ -7177,9 +7189,9 @@ const Ac = {
7177
7189
  user: void 0,
7178
7190
  error: void 0
7179
7191
  };
7180
- class It {
7192
+ class Mt {
7181
7193
  constructor(e, n) {
7182
- p(this, "tx", un());
7194
+ p(this, "tx", ln());
7183
7195
  p(this, "auth");
7184
7196
  p(this, "storage");
7185
7197
  p(this, "core");
@@ -7208,7 +7220,7 @@ class It {
7208
7220
  */
7209
7221
  p(this, "useLocalId", (e) => {
7210
7222
  const [n, r] = _r(null);
7211
- return be(() => {
7223
+ return _e(() => {
7212
7224
  (async () => {
7213
7225
  const i = await this.getLocalId(e);
7214
7226
  r(i);
@@ -7226,7 +7238,7 @@ class It {
7226
7238
  * const publish = db.rooms.usePublishTopic(room, 'emoji');
7227
7239
  * // ...
7228
7240
  */
7229
- p(this, "rooms", he);
7241
+ p(this, "rooms", pe);
7230
7242
  /**
7231
7243
  * Use this to write data! You can create, update, delete, and link objects
7232
7244
  *
@@ -7322,7 +7334,7 @@ class It {
7322
7334
  p(this, "useUser", () => {
7323
7335
  const { user: e } = this.useAuth();
7324
7336
  if (!e)
7325
- throw new Ee(
7337
+ throw new ke(
7326
7338
  "useUser must be used within an auth-protected route"
7327
7339
  );
7328
7340
  return e;
@@ -7352,10 +7364,10 @@ class It {
7352
7364
  p(this, "useConnectionStatus", () => {
7353
7365
  const e = Ke(
7354
7366
  this.core._reactor.status
7355
- ), n = le((s) => this.core.subscribeConnectionStatus((o) => {
7367
+ ), n = fe((s) => this.core.subscribeConnectionStatus((o) => {
7356
7368
  o !== e.current && (e.current = o, s());
7357
7369
  }), []);
7358
- return Mt(
7370
+ return jt(
7359
7371
  n,
7360
7372
  () => e.current,
7361
7373
  // For SSR, always return 'connecting' as the initial state
@@ -7388,7 +7400,7 @@ class It {
7388
7400
  */
7389
7401
  p(this, "SignedIn", ({ children: e }) => {
7390
7402
  const n = this.useAuth();
7391
- return n.isLoading || n.error || !n.user ? null : /* @__PURE__ */ Je.jsx(Je.Fragment, { children: e });
7403
+ return n.isLoading || n.error || !n.user ? null : /* @__PURE__ */ Ye.jsx(Ye.Fragment, { children: e });
7392
7404
  });
7393
7405
  /**
7394
7406
  * Only render children if the user is signed out.
@@ -7402,7 +7414,7 @@ class It {
7402
7414
  */
7403
7415
  p(this, "SignedOut", ({ children: e }) => {
7404
7416
  const n = this.useAuth();
7405
- return n.isLoading || n.error || n.user ? null : /* @__PURE__ */ Je.jsx(Je.Fragment, { children: e });
7417
+ return n.isLoading || n.error || n.user ? null : /* @__PURE__ */ Ye.jsx(Ye.Fragment, { children: e });
7406
7418
  });
7407
7419
  this.core = dc(
7408
7420
  e,
@@ -7433,10 +7445,10 @@ class It {
7433
7445
  _useAuth() {
7434
7446
  const e = Ke(
7435
7447
  this.core._reactor._currentUserCached
7436
- ), n = le((s) => this.core.subscribeAuth((o) => {
7448
+ ), n = fe((s) => this.core.subscribeAuth((o) => {
7437
7449
  e.current = { isLoading: !1, ...o }, s();
7438
7450
  }), []);
7439
- return Mt(
7451
+ return jt(
7440
7452
  n,
7441
7453
  () => e.current,
7442
7454
  () => Ac
@@ -7456,7 +7468,7 @@ class It {
7456
7468
  return this.core.getAuth();
7457
7469
  }
7458
7470
  }
7459
- p(It, "Store"), p(It, "NetworkListener"), p(It, "EventSourceImpl");
7471
+ p(Mt, "Store"), p(Mt, "NetworkListener"), p(Mt, "EventSourceImpl");
7460
7472
  export {
7461
- It as InstantReactAbstractDatabase
7473
+ Mt as InstantReactAbstractDatabase
7462
7474
  };