fetchium 0.2.4 → 0.3.0
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.
- package/CHANGELOG.md +19 -0
- package/dist/cjs/development/QueryClient-QKhS8mhg.js +2 -0
- package/dist/cjs/development/QueryClient-QKhS8mhg.js.map +1 -0
- package/dist/cjs/development/index.js +1 -1
- package/dist/cjs/{production/mutation-LrsiDsl7.js → development/mutation-w67Vpuvw.js} +2 -2
- package/dist/cjs/{production/mutation-LrsiDsl7.js.map → development/mutation-w67Vpuvw.js.map} +1 -1
- package/dist/cjs/development/react/index.js +1 -1
- package/dist/cjs/development/react/index.js.map +1 -1
- package/dist/cjs/development/rest/index.js +1 -1
- package/dist/cjs/development/topic/index.js +1 -1
- package/dist/cjs/production/QueryClient-DIAqDTHF.js +2 -0
- package/dist/cjs/production/QueryClient-DIAqDTHF.js.map +1 -0
- package/dist/cjs/production/index.js +1 -1
- package/dist/cjs/{development/mutation-CUV5TC93.js → production/mutation-CgS9gXW7.js} +2 -2
- package/dist/cjs/{development/mutation-CUV5TC93.js.map → production/mutation-CgS9gXW7.js.map} +1 -1
- package/dist/cjs/production/react/index.js +1 -1
- package/dist/cjs/production/react/index.js.map +1 -1
- package/dist/cjs/production/rest/index.js +1 -1
- package/dist/cjs/production/topic/index.js +1 -1
- package/dist/esm/EntityInstance.d.ts.map +1 -1
- package/dist/esm/QueryResult.d.ts +3 -3
- package/dist/esm/QueryResult.d.ts.map +1 -1
- package/dist/esm/development/{QueryClient-WObL5AFz.js → QueryClient-C9tBdK1Z.js} +347 -330
- package/dist/esm/development/QueryClient-C9tBdK1Z.js.map +1 -0
- package/dist/esm/development/index.js +2 -2
- package/dist/esm/development/{mutation-C3e7FM9D.js → mutation-Dx63NCGk.js} +2 -2
- package/dist/esm/development/{mutation-C3e7FM9D.js.map → mutation-Dx63NCGk.js.map} +1 -1
- package/dist/esm/development/react/index.js +5 -36
- package/dist/esm/development/react/index.js.map +1 -1
- package/dist/esm/development/rest/index.js +2 -2
- package/dist/esm/development/topic/index.js +1 -1
- package/dist/esm/production/{QueryClient-DqHBCvA1.js → QueryClient-D64xo0EA.js} +319 -304
- package/dist/esm/production/QueryClient-D64xo0EA.js.map +1 -0
- package/dist/esm/production/index.js +2 -2
- package/dist/esm/production/{mutation-BOc53DJi.js → mutation-Aw1JE7VO.js} +2 -2
- package/dist/esm/production/{mutation-BOc53DJi.js.map → mutation-Aw1JE7VO.js.map} +1 -1
- package/dist/esm/production/react/index.js +5 -36
- package/dist/esm/production/react/index.js.map +1 -1
- package/dist/esm/production/rest/index.js +2 -2
- package/dist/esm/production/topic/index.js +1 -1
- package/dist/esm/react/use-query.d.ts +8 -0
- package/dist/esm/react/use-query.d.ts.map +1 -1
- package/dist/esm/types.d.ts +3 -3
- package/dist/esm/types.d.ts.map +1 -1
- package/package.json +6 -6
- package/plugin/docs/api/fetchium-react.md +5 -4
- package/plugin/docs/api/fetchium.md +2 -2
- package/dist/cjs/development/QueryClient-DjKxdY2y.js +0 -2
- package/dist/cjs/development/QueryClient-DjKxdY2y.js.map +0 -1
- package/dist/cjs/production/QueryClient-YzaJT_2g.js +0 -2
- package/dist/cjs/production/QueryClient-YzaJT_2g.js.map +0 -1
- package/dist/esm/development/QueryClient-WObL5AFz.js.map +0 -1
- package/dist/esm/production/QueryClient-DqHBCvA1.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { notifier as ut, relay as
|
|
2
|
-
import { registerCustomHash as
|
|
3
|
-
import { d as
|
|
4
|
-
import { SyncQueryStore as
|
|
1
|
+
import { notifier as ut, relay as $t, setScopeOwner as Ce, reactiveMethod as Se, signal as Lt, context as Ut, getContext as Oe, task as Re, reactiveSignal as Ae, isSignal as xe, watcher as Ne } from "signalium";
|
|
2
|
+
import { registerCustomHash as De, hashValue as N, registerCustomSnapshot as Ie } from "signalium/utils";
|
|
3
|
+
import { d as qt } from "./shared-DcuVH8Pf.js";
|
|
4
|
+
import { SyncQueryStore as ke, MemoryPersistentStore as Fe } from "./stores/sync.js";
|
|
5
5
|
var V = /* @__PURE__ */ ((e) => (e.Always = "always", e.Online = "online", e.OfflineFirst = "offlineFirst", e))(V || {}), d = /* @__PURE__ */ ((e) => (e[e.UNDEFINED = 1] = "UNDEFINED", e[e.NULL = 2] = "NULL", e[e.NUMBER = 4] = "NUMBER", e[e.STRING = 8] = "STRING", e[e.BOOLEAN = 16] = "BOOLEAN", e[e.OBJECT = 32] = "OBJECT", e[e.ARRAY = 64] = "ARRAY", e[e.ID = 128] = "ID", e[e.RECORD = 256] = "RECORD", e[e.UNION = 512] = "UNION", e[e.ENTITY = 1024] = "ENTITY", e[e.HAS_FORMAT = 4096] = "HAS_FORMAT", e[e.IS_EAGER_FORMAT = 8192] = "IS_EAGER_FORMAT", e[e.PARSE_RESULT = 16384] = "PARSE_RESULT", e[e.LIVE = 32768] = "LIVE", e))(d || {});
|
|
6
|
-
const I = /* @__PURE__ */ Symbol("array"),
|
|
6
|
+
const I = /* @__PURE__ */ Symbol("array"), k = /* @__PURE__ */ Symbol("record"), Vt = /* @__PURE__ */ Symbol("QUERY_ID");
|
|
7
7
|
var dt = /* @__PURE__ */ ((e) => (e[e.Array = 0] = "Array", e[e.Value = 1] = "Value", e))(dt || {});
|
|
8
8
|
class B {
|
|
9
9
|
type;
|
|
@@ -47,7 +47,7 @@ function T(e) {
|
|
|
47
47
|
return S.get(e);
|
|
48
48
|
}
|
|
49
49
|
var X = /* @__PURE__ */ ((e) => (e[e.Query = 0] = "Query", e[e.Entity = 1] = "Entity", e))(X || {});
|
|
50
|
-
class
|
|
50
|
+
class Me {
|
|
51
51
|
constructor(t, n, i) {
|
|
52
52
|
this._onEvict = n, this._intervalId = setInterval(this._tick, t * 6e4 * i);
|
|
53
53
|
}
|
|
@@ -70,7 +70,7 @@ class Ie {
|
|
|
70
70
|
clearInterval(this._intervalId);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
class
|
|
73
|
+
class Te {
|
|
74
74
|
_buckets = /* @__PURE__ */ new Map();
|
|
75
75
|
_nextTickEntries = /* @__PURE__ */ new Map();
|
|
76
76
|
_nextTickScheduled = !1;
|
|
@@ -88,7 +88,7 @@ class Fe {
|
|
|
88
88
|
}
|
|
89
89
|
const { _buckets: r } = this;
|
|
90
90
|
let s = r.get(n);
|
|
91
|
-
s || (s = new
|
|
91
|
+
s || (s = new Me(n, this._onEvict, this._multiplier), r.set(n, s)), s.schedule(t, i);
|
|
92
92
|
}
|
|
93
93
|
cancel(t, n) {
|
|
94
94
|
if (n !== 1 / 0) {
|
|
@@ -113,7 +113,7 @@ class Fe {
|
|
|
113
113
|
t.clear(), n.clear();
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
class
|
|
116
|
+
class Pe {
|
|
117
117
|
schedule(t, n, i) {
|
|
118
118
|
}
|
|
119
119
|
cancel(t, n) {
|
|
@@ -121,15 +121,15 @@ class Me {
|
|
|
121
121
|
destroy() {
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
const W = /* @__PURE__ */ Symbol("fieldRef"), D = /* @__PURE__ */ Symbol("fieldRefPath"), ht = /* @__PURE__ */ Symbol("DEFINITION_TARGET"), z = /* @__PURE__ */ Symbol("CANCEL_PROXY"),
|
|
125
|
-
function
|
|
124
|
+
const W = /* @__PURE__ */ Symbol("fieldRef"), D = /* @__PURE__ */ Symbol("fieldRefPath"), ht = /* @__PURE__ */ Symbol("DEFINITION_TARGET"), z = /* @__PURE__ */ Symbol("CANCEL_PROXY"), je = /\[([^\]]+)\]/g;
|
|
125
|
+
function Kt(e) {
|
|
126
126
|
const t = {
|
|
127
127
|
[W]: !0,
|
|
128
128
|
[D]: e
|
|
129
129
|
};
|
|
130
|
-
return new Proxy(t,
|
|
130
|
+
return new Proxy(t, $e);
|
|
131
131
|
}
|
|
132
|
-
const
|
|
132
|
+
const $e = {
|
|
133
133
|
get(e, t) {
|
|
134
134
|
if (t === W) return !0;
|
|
135
135
|
if (t === D) return e[D];
|
|
@@ -139,19 +139,19 @@ const Te = {
|
|
|
139
139
|
}
|
|
140
140
|
if (typeof t == "symbol") return;
|
|
141
141
|
const n = e[D];
|
|
142
|
-
return
|
|
142
|
+
return Kt([...n, t]);
|
|
143
143
|
},
|
|
144
144
|
has(e, t) {
|
|
145
145
|
return t === W || t === D;
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
|
-
function
|
|
148
|
+
function Bt(e) {
|
|
149
149
|
return typeof e == "object" && e !== null && e[W] === !0;
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function Qt(e) {
|
|
152
152
|
return e[D];
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function Yt(e) {
|
|
155
155
|
let t = !1;
|
|
156
156
|
return new Proxy(e, {
|
|
157
157
|
set(n, i, r) {
|
|
@@ -162,11 +162,11 @@ function Bt(e) {
|
|
|
162
162
|
throw new Error("Definition proxy accessed after extraction. Avoid arrow functions that capture `this`.");
|
|
163
163
|
return i === ht ? n : i === z ? () => {
|
|
164
164
|
t = !0;
|
|
165
|
-
} : typeof i == "symbol" ? n[i] :
|
|
165
|
+
} : typeof i == "symbol" ? n[i] : Kt([i]);
|
|
166
166
|
}
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function Le(e) {
|
|
170
170
|
const t = e[ht];
|
|
171
171
|
e[z]();
|
|
172
172
|
const n = {};
|
|
@@ -192,17 +192,17 @@ function lt(e, t) {
|
|
|
192
192
|
}
|
|
193
193
|
return n;
|
|
194
194
|
}
|
|
195
|
-
function
|
|
196
|
-
return e.replace(
|
|
195
|
+
function Ue(e, t) {
|
|
196
|
+
return e.replace(je, (n, i) => {
|
|
197
197
|
const r = i.split("."), s = lt(r, t);
|
|
198
198
|
return s != null ? encodeURIComponent(String(s)) : "";
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
201
|
function J(e, t) {
|
|
202
|
-
if (
|
|
203
|
-
return lt(
|
|
202
|
+
if (Bt(e))
|
|
203
|
+
return lt(Qt(e), t);
|
|
204
204
|
if (typeof e == "string")
|
|
205
|
-
return
|
|
205
|
+
return Ue(e, t);
|
|
206
206
|
if (Array.isArray(e))
|
|
207
207
|
return e.map((n) => J(n, t));
|
|
208
208
|
if (typeof e == "object" && e !== null && Object.getPrototypeOf(e) === Object.prototype) {
|
|
@@ -222,14 +222,14 @@ function it(e, t, n) {
|
|
|
222
222
|
o[a] = c.bind(o);
|
|
223
223
|
return o;
|
|
224
224
|
}
|
|
225
|
-
class
|
|
225
|
+
class yt {
|
|
226
226
|
static cache;
|
|
227
227
|
constructor() {
|
|
228
|
-
return
|
|
228
|
+
return Yt(this);
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
const
|
|
232
|
-
let
|
|
231
|
+
const Gt = Object.entries, rt = Object.keys;
|
|
232
|
+
let Ht = () => {
|
|
233
233
|
};
|
|
234
234
|
{
|
|
235
235
|
const t = (i, r) => {
|
|
@@ -266,20 +266,20 @@ let Gt = () => {
|
|
|
266
266
|
}
|
|
267
267
|
return !1;
|
|
268
268
|
};
|
|
269
|
-
|
|
269
|
+
Ht = (i, r, s, o) => {
|
|
270
270
|
if (!n(s, o))
|
|
271
271
|
throw new Error(
|
|
272
272
|
`[fetchium] Entity typename '${i}' has incompatible type for field '${r}' across different entity definitions`
|
|
273
273
|
);
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function Ot(e) {
|
|
277
277
|
return typeof e == "number" ? e | d.UNDEFINED : e instanceof m ? (e.mask & d.UNDEFINED) !== 0 ? e : m.cloneWith(e, d.UNDEFINED) : e;
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function Rt(e) {
|
|
280
280
|
return e instanceof m && (e.mask & d.OBJECT) !== 0 && (e.mask & (d.ENTITY | d.ARRAY | d.UNION | d.RECORD | d.LIVE)) === 0;
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function Wt(e, t, n) {
|
|
283
283
|
const i = /* @__PURE__ */ new Set();
|
|
284
284
|
for (const s of e)
|
|
285
285
|
if (s !== void 0)
|
|
@@ -292,13 +292,13 @@ function Ht(e, t, n) {
|
|
|
292
292
|
let f = !0;
|
|
293
293
|
for (const h of e) {
|
|
294
294
|
const u = h?.[s];
|
|
295
|
-
u !== void 0 ? (o++, a === void 0 && (a = u), a !== void 0 && u !== a && !
|
|
295
|
+
u !== void 0 ? (o++, a === void 0 && (a = u), a !== void 0 && u !== a && !Rt(u) && Ht(n, s, a, u), Rt(u) ? c.push(u.shape) : (f = !1, c.push(void 0))) : (f = !1, c.push(void 0));
|
|
296
296
|
}
|
|
297
297
|
if (f && o > 0) {
|
|
298
|
-
const h =
|
|
299
|
-
r[s] = o < t ?
|
|
298
|
+
const h = Wt(c, t, n), u = new m(d.OBJECT, h);
|
|
299
|
+
r[s] = o < t ? Ot(u) : u;
|
|
300
300
|
} else
|
|
301
|
-
r[s] = o < t ?
|
|
301
|
+
r[s] = o < t ? Ot(a) : a;
|
|
302
302
|
}
|
|
303
303
|
return r;
|
|
304
304
|
}
|
|
@@ -336,7 +336,7 @@ class m {
|
|
|
336
336
|
}
|
|
337
337
|
static merge(t) {
|
|
338
338
|
if (t.length === 1) return t[0];
|
|
339
|
-
const n = t.length, i = t.map((f) => f.shape), r = t[0].typenameValue ?? "(unknown)", s =
|
|
339
|
+
const n = t.length, i = t.map((f) => f.shape), r = t[0].typenameValue ?? "(unknown)", s = Wt(i, n, r);
|
|
340
340
|
let o, a, c;
|
|
341
341
|
for (const f of t) {
|
|
342
342
|
if (o === void 0 && f.idField !== void 0)
|
|
@@ -403,28 +403,28 @@ class $ extends Set {
|
|
|
403
403
|
return t;
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
|
-
const
|
|
407
|
-
|
|
408
|
-
let t =
|
|
406
|
+
const qe = 1128875347;
|
|
407
|
+
De($, (e) => {
|
|
408
|
+
let t = qe;
|
|
409
409
|
for (const n of e)
|
|
410
410
|
t += N(n);
|
|
411
411
|
return t >>> 0;
|
|
412
412
|
});
|
|
413
|
-
function
|
|
413
|
+
function pt(e, t) {
|
|
414
414
|
return new m(e, t);
|
|
415
415
|
}
|
|
416
|
-
function
|
|
417
|
-
return
|
|
416
|
+
function Ve(e) {
|
|
417
|
+
return pt(d.ARRAY, e);
|
|
418
418
|
}
|
|
419
|
-
function
|
|
420
|
-
return
|
|
419
|
+
function Ke(e) {
|
|
420
|
+
return pt(d.RECORD | d.OBJECT, e);
|
|
421
421
|
}
|
|
422
|
-
function
|
|
423
|
-
return
|
|
422
|
+
function Be(e) {
|
|
423
|
+
return pt(d.PARSE_RESULT, e);
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function zt(e, t) {
|
|
426
426
|
let n = e, i, r, s;
|
|
427
|
-
for (const [o, a] of
|
|
427
|
+
for (const [o, a] of Gt(t))
|
|
428
428
|
switch (typeof a) {
|
|
429
429
|
case "number":
|
|
430
430
|
if ((a & d.ID) !== 0) {
|
|
@@ -446,10 +446,10 @@ function Wt(e, t) {
|
|
|
446
446
|
}
|
|
447
447
|
return new m(n, t, void 0, r, s, i);
|
|
448
448
|
}
|
|
449
|
-
function
|
|
450
|
-
return
|
|
449
|
+
function Qe(e) {
|
|
450
|
+
return zt(d.OBJECT, e);
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function At(e, t, n) {
|
|
453
453
|
const i = e.mask;
|
|
454
454
|
if ((i & d.UNION) !== 0) {
|
|
455
455
|
const r = e;
|
|
@@ -462,7 +462,7 @@ function Rt(e, t, n) {
|
|
|
462
462
|
}
|
|
463
463
|
const s = r.shape;
|
|
464
464
|
if (s !== void 0)
|
|
465
|
-
for (const o of [...rt(s), I,
|
|
465
|
+
for (const o of [...rt(s), I, k]) {
|
|
466
466
|
const a = s[o];
|
|
467
467
|
if (t[o] !== void 0 && t[o] !== a)
|
|
468
468
|
throw new Error(
|
|
@@ -475,9 +475,9 @@ function Rt(e, t, n) {
|
|
|
475
475
|
throw new Error("Array shape already defined");
|
|
476
476
|
t[I] = e.shape;
|
|
477
477
|
} else if ((i & d.RECORD) !== 0) {
|
|
478
|
-
if (t[
|
|
478
|
+
if (t[k] !== void 0)
|
|
479
479
|
throw new Error("Record shape already defined");
|
|
480
|
-
t[
|
|
480
|
+
t[k] = e.shape;
|
|
481
481
|
} else {
|
|
482
482
|
const r = e.typenameField, s = e.typenameValue;
|
|
483
483
|
if (s === void 0)
|
|
@@ -490,7 +490,7 @@ function Rt(e, t, n) {
|
|
|
490
490
|
}
|
|
491
491
|
return n;
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function gt(...e) {
|
|
494
494
|
const t = e;
|
|
495
495
|
let n = 0, i = 0, r, s, o, a, c = 0;
|
|
496
496
|
for (const h of t) {
|
|
@@ -510,7 +510,7 @@ function pt(...e) {
|
|
|
510
510
|
r = h;
|
|
511
511
|
continue;
|
|
512
512
|
}
|
|
513
|
-
i === 2 && (o = /* @__PURE__ */ Object.create(null), a =
|
|
513
|
+
i === 2 && (o = /* @__PURE__ */ Object.create(null), a = At(r, o, a)), a = At(h, o, a);
|
|
514
514
|
}
|
|
515
515
|
if (i === 0)
|
|
516
516
|
return s === void 0 ? n : n === 0 ? s : new m(n | d.UNION, void 0, s);
|
|
@@ -519,36 +519,36 @@ function pt(...e) {
|
|
|
519
519
|
const f = n | c | d.UNION;
|
|
520
520
|
return new m(f, o, s, a);
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function mt(e, t, n) {
|
|
523
523
|
const i = e;
|
|
524
524
|
if (typeof i == "number")
|
|
525
525
|
return i | t;
|
|
526
526
|
if (i instanceof Set)
|
|
527
|
-
return
|
|
527
|
+
return gt(e, t);
|
|
528
528
|
let r = n.get(i);
|
|
529
529
|
return r === void 0 && (r = m.cloneWith(i, t), n.set(i, r)), r;
|
|
530
530
|
}
|
|
531
|
-
const
|
|
532
|
-
function
|
|
533
|
-
return
|
|
531
|
+
const Ye = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap();
|
|
532
|
+
function We(e) {
|
|
533
|
+
return mt(e, d.UNDEFINED | d.NULL, He);
|
|
534
534
|
}
|
|
535
|
-
function
|
|
536
|
-
return
|
|
535
|
+
function ze(e) {
|
|
536
|
+
return mt(e, d.UNDEFINED, Ye);
|
|
537
537
|
}
|
|
538
|
-
function
|
|
539
|
-
return
|
|
538
|
+
function Je(e) {
|
|
539
|
+
return mt(e, d.NULL, Ge);
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function Xe(e) {
|
|
542
542
|
return e;
|
|
543
543
|
}
|
|
544
|
-
function
|
|
544
|
+
function Ze(e) {
|
|
545
545
|
return /* @__PURE__ */ new Set([e]);
|
|
546
546
|
}
|
|
547
|
-
const
|
|
548
|
-
|
|
549
|
-
const
|
|
550
|
-
let
|
|
551
|
-
const st = [],
|
|
547
|
+
const Jt = ((...e) => new Set(e));
|
|
548
|
+
Jt.caseInsensitive = (...e) => new $(e);
|
|
549
|
+
const vt = 16;
|
|
550
|
+
let tn = 0;
|
|
551
|
+
const st = [], Xt = [], Zt = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ new Map(), Z = /* @__PURE__ */ new WeakSet();
|
|
552
552
|
class Q {
|
|
553
553
|
_raw;
|
|
554
554
|
_formatted;
|
|
@@ -561,26 +561,26 @@ class Q {
|
|
|
561
561
|
return this._parsed || (this._formatted = st[this._formatId](this._raw), this._parsed = !0), this._formatted;
|
|
562
562
|
}
|
|
563
563
|
toJSON() {
|
|
564
|
-
return this._parsed ?
|
|
564
|
+
return this._parsed ? Xt[this._formatId](this._formatted) : this._raw;
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
|
-
function
|
|
568
|
-
const t =
|
|
567
|
+
function en(e) {
|
|
568
|
+
const t = Zt.get(e);
|
|
569
569
|
if (t === void 0)
|
|
570
570
|
throw new Error(`Format ${e} not registered`);
|
|
571
571
|
return t;
|
|
572
572
|
}
|
|
573
573
|
function xt(e) {
|
|
574
|
-
const t = e >>
|
|
575
|
-
return
|
|
574
|
+
const t = e >> vt;
|
|
575
|
+
return te.get(t);
|
|
576
576
|
}
|
|
577
|
-
function
|
|
578
|
-
const s =
|
|
579
|
-
st[s] = n,
|
|
580
|
-
const o = r?.eager ?? !0, c = s <<
|
|
581
|
-
|
|
577
|
+
function ee(e, t, n, i, r) {
|
|
578
|
+
const s = tn++;
|
|
579
|
+
st[s] = n, Xt[s] = i, te.set(s, e);
|
|
580
|
+
const o = r?.eager ?? !0, c = s << vt | t | d.HAS_FORMAT | (o ? d.IS_EAGER_FORMAT : 0);
|
|
581
|
+
Zt.set(e, c);
|
|
582
582
|
}
|
|
583
|
-
|
|
583
|
+
ee(
|
|
584
584
|
"date",
|
|
585
585
|
d.STRING,
|
|
586
586
|
(e) => {
|
|
@@ -597,7 +597,7 @@ te(
|
|
|
597
597
|
return `${t}-${n}-${i}`;
|
|
598
598
|
}
|
|
599
599
|
);
|
|
600
|
-
|
|
600
|
+
ee(
|
|
601
601
|
"date-time",
|
|
602
602
|
d.STRING,
|
|
603
603
|
(e) => {
|
|
@@ -608,14 +608,14 @@ te(
|
|
|
608
608
|
},
|
|
609
609
|
(e) => e.toISOString()
|
|
610
610
|
);
|
|
611
|
-
const
|
|
611
|
+
const Nt = /* @__PURE__ */ new WeakMap();
|
|
612
612
|
function j(e) {
|
|
613
|
-
let t =
|
|
613
|
+
let t = Nt.get(e);
|
|
614
614
|
if (t === void 0) {
|
|
615
615
|
const n = new e(), i = n[ht] ?? n;
|
|
616
616
|
n[z] && n[z]();
|
|
617
617
|
const r = {};
|
|
618
|
-
for (const [f, h] of
|
|
618
|
+
for (const [f, h] of Gt(i)) {
|
|
619
619
|
if (!(typeof h == "number" || typeof h == "string" || h instanceof Set || h instanceof m || h instanceof $))
|
|
620
620
|
throw new Error(
|
|
621
621
|
`[fetchium] Entity '${e.name}' field '${f}' has an invalid type definition. All entity fields must be type definitions (e.g. t.string, t.number, t.entity(...), etc). Got: ${typeof h == "object" ? h?.constructor?.name ?? typeof h : typeof h}`
|
|
@@ -625,7 +625,7 @@ function j(e) {
|
|
|
625
625
|
const s = Object.getPrototypeOf(e.prototype);
|
|
626
626
|
if (s != null) {
|
|
627
627
|
const f = s.constructor;
|
|
628
|
-
if (f !==
|
|
628
|
+
if (f !== yt && typeof f == "function") {
|
|
629
629
|
const u = j(f).shape;
|
|
630
630
|
for (const l of rt(u))
|
|
631
631
|
if (l in r && r[l] !== u[l])
|
|
@@ -635,16 +635,16 @@ function j(e) {
|
|
|
635
635
|
const o = {}, a = e.prototype;
|
|
636
636
|
for (const f of Object.getOwnPropertyNames(a))
|
|
637
637
|
f !== "constructor" && typeof a[f] == "function" && (o[f] = a[f]);
|
|
638
|
-
t =
|
|
638
|
+
t = zt(d.ENTITY | d.OBJECT, r), t._entityClass = e, rt(o).length > 0 && (t._methods = o), typeof o.__subscribe == "function" && (t._entityConfig = { hasSubscribe: !0 });
|
|
639
639
|
const c = e;
|
|
640
|
-
c.cache && (t._entityCache = c.cache),
|
|
640
|
+
c.cache && (t._entityCache = c.cache), Nt.set(e, t);
|
|
641
641
|
}
|
|
642
642
|
return t;
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function nn(e) {
|
|
645
645
|
return j(e);
|
|
646
646
|
}
|
|
647
|
-
function
|
|
647
|
+
function ne(e, t) {
|
|
648
648
|
if (t == null) return;
|
|
649
649
|
const n = /* @__PURE__ */ new Map();
|
|
650
650
|
if (Array.isArray(t))
|
|
@@ -667,50 +667,50 @@ function ee(e, t) {
|
|
|
667
667
|
}
|
|
668
668
|
return n.size > 0 ? n : void 0;
|
|
669
669
|
}
|
|
670
|
-
function
|
|
670
|
+
function ie(e) {
|
|
671
671
|
return Array.isArray(e) ? e.map((t) => j(t)) : [j(e)];
|
|
672
672
|
}
|
|
673
|
-
function
|
|
674
|
-
const n =
|
|
673
|
+
function rn(e, t) {
|
|
674
|
+
const n = ie(e), i = n.length === 1 ? n[0] : gt(...n.map((o) => o)), r = d.ARRAY | d.LIVE, s = new m(r, i);
|
|
675
675
|
return s._liveConfig = B.array(
|
|
676
676
|
n,
|
|
677
|
-
|
|
677
|
+
ne(n, t?.constraints),
|
|
678
678
|
t?.sort
|
|
679
679
|
), s;
|
|
680
680
|
}
|
|
681
|
-
function
|
|
682
|
-
const i =
|
|
681
|
+
function sn(e, t, n) {
|
|
682
|
+
const i = ie(t), r = e, s = d.LIVE, o = new m(s, void 0);
|
|
683
683
|
return o._liveConfig = B.value(
|
|
684
684
|
i,
|
|
685
|
-
|
|
685
|
+
ne(i, n?.constraints),
|
|
686
686
|
r,
|
|
687
687
|
n.onCreate,
|
|
688
688
|
n.onUpdate,
|
|
689
689
|
n.onDelete
|
|
690
690
|
), o;
|
|
691
691
|
}
|
|
692
|
-
const
|
|
693
|
-
format:
|
|
694
|
-
typename:
|
|
695
|
-
const:
|
|
696
|
-
enum:
|
|
692
|
+
const on = {
|
|
693
|
+
format: en,
|
|
694
|
+
typename: Xe,
|
|
695
|
+
const: Ze,
|
|
696
|
+
enum: Jt,
|
|
697
697
|
id: d.ID | d.STRING | d.NUMBER,
|
|
698
698
|
string: d.STRING,
|
|
699
699
|
number: d.NUMBER,
|
|
700
700
|
boolean: d.BOOLEAN,
|
|
701
701
|
null: d.NULL,
|
|
702
702
|
undefined: d.UNDEFINED,
|
|
703
|
-
array:
|
|
704
|
-
object:
|
|
705
|
-
record:
|
|
706
|
-
union:
|
|
707
|
-
nullish:
|
|
708
|
-
optional:
|
|
709
|
-
nullable:
|
|
710
|
-
result:
|
|
711
|
-
entity:
|
|
712
|
-
liveArray:
|
|
713
|
-
liveValue:
|
|
703
|
+
array: Ve,
|
|
704
|
+
object: Qe,
|
|
705
|
+
record: Ke,
|
|
706
|
+
union: gt,
|
|
707
|
+
nullish: We,
|
|
708
|
+
optional: ze,
|
|
709
|
+
nullable: Je,
|
|
710
|
+
result: Be,
|
|
711
|
+
entity: nn,
|
|
712
|
+
liveArray: rn,
|
|
713
|
+
liveValue: sn
|
|
714
714
|
};
|
|
715
715
|
function K(e) {
|
|
716
716
|
if (e instanceof $)
|
|
@@ -739,9 +739,9 @@ function K(e) {
|
|
|
739
739
|
i.push(o);
|
|
740
740
|
}
|
|
741
741
|
if (n.shape !== void 0) {
|
|
742
|
-
n.shape[I] !== void 0 && i.push(`Array<${K(n.shape[I])}>`), n.shape[
|
|
742
|
+
n.shape[I] !== void 0 && i.push(`Array<${K(n.shape[I])}>`), n.shape[k] !== void 0 && i.push(`Record<string, ${K(n.shape[k])}>`);
|
|
743
743
|
for (const [s, o] of Object.entries(n.shape))
|
|
744
|
-
s !== I && s !==
|
|
744
|
+
s !== I && s !== k && i.push(s);
|
|
745
745
|
}
|
|
746
746
|
if (t = n.mask, (t & d.HAS_FORMAT) !== 0) {
|
|
747
747
|
const s = xt(t);
|
|
@@ -770,8 +770,8 @@ function q(e, t, n) {
|
|
|
770
770
|
`Validation error at ${e}: expected ${K(t)}, got ${typeof n == "object" ? n === null ? "null" : Array.isArray(n) ? "array" : "object" : typeof n}`
|
|
771
771
|
);
|
|
772
772
|
}
|
|
773
|
-
const
|
|
774
|
-
function
|
|
773
|
+
const re = Array.isArray;
|
|
774
|
+
function Dt(e) {
|
|
775
775
|
if (e === null) return d.NULL;
|
|
776
776
|
switch (typeof e) {
|
|
777
777
|
case "number":
|
|
@@ -783,18 +783,18 @@ function Nt(e) {
|
|
|
783
783
|
case "undefined":
|
|
784
784
|
return d.UNDEFINED;
|
|
785
785
|
case "object":
|
|
786
|
-
return
|
|
786
|
+
return re(e) ? d.ARRAY : d.OBJECT;
|
|
787
787
|
default:
|
|
788
788
|
throw new Error(`Invalid type: ${typeof e}`);
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function Ln(e) {
|
|
792
792
|
return P(e);
|
|
793
793
|
}
|
|
794
794
|
function P(e) {
|
|
795
795
|
if (e === null || typeof e != "object")
|
|
796
796
|
return e;
|
|
797
|
-
if (
|
|
797
|
+
if (re(e))
|
|
798
798
|
return e.map((n) => P(n));
|
|
799
799
|
if (e instanceof Date)
|
|
800
800
|
return new Date(e.getTime());
|
|
@@ -815,12 +815,12 @@ function P(e) {
|
|
|
815
815
|
t[n] = P(e[n]);
|
|
816
816
|
return t;
|
|
817
817
|
}
|
|
818
|
-
const
|
|
818
|
+
const _t = Object.entries, an = () => {
|
|
819
819
|
};
|
|
820
820
|
class ot {
|
|
821
821
|
queryClient = void 0;
|
|
822
822
|
preloadedEntities = void 0;
|
|
823
|
-
warn =
|
|
823
|
+
warn = an;
|
|
824
824
|
/** When true, missing optional fields on existing entities are set to
|
|
825
825
|
* undefined. False for mutation events (truly partial payloads). */
|
|
826
826
|
isPartialEvent = !1;
|
|
@@ -830,14 +830,14 @@ class ot {
|
|
|
830
830
|
this.queryClient = t, this.preloadedEntities = n, this.warn = i, this.isPartialEvent = r, t !== void 0 && (this.seen === void 0 ? (this.seen = /* @__PURE__ */ new Map(), this.seenByKey = /* @__PURE__ */ new Map()) : (this.seen.clear(), this.seenByKey.clear()));
|
|
831
831
|
}
|
|
832
832
|
}
|
|
833
|
-
function
|
|
834
|
-
return
|
|
833
|
+
function se(e, t, n) {
|
|
834
|
+
return F(e, t, n, "");
|
|
835
835
|
}
|
|
836
|
-
function
|
|
837
|
-
return
|
|
836
|
+
function cn(e, t, n) {
|
|
837
|
+
return wt(e, t, n);
|
|
838
838
|
}
|
|
839
|
-
function
|
|
840
|
-
const r = e >>
|
|
839
|
+
function It(e, t, n, i) {
|
|
840
|
+
const r = e >> vt;
|
|
841
841
|
if ((e & d.IS_EAGER_FORMAT) !== 0)
|
|
842
842
|
try {
|
|
843
843
|
return new Q(t, r, !0);
|
|
@@ -854,7 +854,7 @@ function Dt(e, t, n, i) {
|
|
|
854
854
|
}
|
|
855
855
|
return new Q(t, r, !1);
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function F(e, t, n, i) {
|
|
858
858
|
const r = t;
|
|
859
859
|
if (r instanceof $) {
|
|
860
860
|
const c = r.get(e);
|
|
@@ -871,7 +871,7 @@ function M(e, t, n, i) {
|
|
|
871
871
|
return e;
|
|
872
872
|
}
|
|
873
873
|
if (typeof r == "number") {
|
|
874
|
-
const c =
|
|
874
|
+
const c = Dt(e);
|
|
875
875
|
if ((r & c) === 0) {
|
|
876
876
|
if ((r & d.UNDEFINED) !== 0) {
|
|
877
877
|
n.warn("Invalid value for optional type, defaulting to undefined", { value: e, path: i });
|
|
@@ -879,18 +879,18 @@ function M(e, t, n, i) {
|
|
|
879
879
|
}
|
|
880
880
|
throw q(i, r, e);
|
|
881
881
|
}
|
|
882
|
-
return (r & d.HAS_FORMAT) !== 0 && e !== null && e !== void 0 ?
|
|
882
|
+
return (r & d.HAS_FORMAT) !== 0 && e !== null && e !== void 0 ? It(r, e, n, i) : e;
|
|
883
883
|
}
|
|
884
884
|
const s = r.mask, o = r._liveConfig;
|
|
885
885
|
if (o !== void 0 && o.type === dt.Value)
|
|
886
|
-
return o.valueType !== void 0 ?
|
|
886
|
+
return o.valueType !== void 0 ? F(e, o.valueType, n, i) : e;
|
|
887
887
|
if ((s & d.PARSE_RESULT) !== 0)
|
|
888
888
|
try {
|
|
889
|
-
return { success: !0, value:
|
|
889
|
+
return { success: !0, value: F(e, r.shape, n, i) };
|
|
890
890
|
} catch (c) {
|
|
891
891
|
return { success: !1, error: c instanceof Error ? c : new Error(String(c)) };
|
|
892
892
|
}
|
|
893
|
-
const a =
|
|
893
|
+
const a = Dt(e);
|
|
894
894
|
if ((s & a) === 0 && !r.values?.has(e)) {
|
|
895
895
|
if ((s & d.UNDEFINED) !== 0) {
|
|
896
896
|
n.warn("Invalid value for optional type, defaulting to undefined", { value: e, path: i });
|
|
@@ -898,33 +898,33 @@ function M(e, t, n, i) {
|
|
|
898
898
|
}
|
|
899
899
|
throw q(i, s, e);
|
|
900
900
|
}
|
|
901
|
-
return a < d.OBJECT ? (s & d.HAS_FORMAT) !== 0 && e !== null && e !== void 0 ?
|
|
901
|
+
return a < d.OBJECT ? (s & d.HAS_FORMAT) !== 0 && e !== null && e !== void 0 ? It(s, e, n, i) : e : (s & d.UNION) !== 0 ? fn(a, e, r, n, i) : a === d.ARRAY ? oe(e, r.shape, n, i) : (s & d.RECORD) !== 0 ? ae(e, r.shape, n, i) : (s & d.ENTITY) !== 0 && n.queryClient !== void 0 ? wt(e, r, n) : ce(e, r, n, i);
|
|
902
902
|
}
|
|
903
|
-
function
|
|
903
|
+
function fn(e, t, n, i, r) {
|
|
904
904
|
if (e === d.ARRAY) {
|
|
905
905
|
const s = n.shape[I];
|
|
906
|
-
return s === void 0 || typeof s == "number" ? t :
|
|
906
|
+
return s === void 0 || typeof s == "number" ? t : oe(t, s, i, r);
|
|
907
907
|
} else {
|
|
908
908
|
const s = n.typenameField, o = s ? t[s] : void 0;
|
|
909
909
|
if (o === void 0 || typeof o != "string") {
|
|
910
|
-
const c = n.shape[
|
|
910
|
+
const c = n.shape[k];
|
|
911
911
|
if (c === void 0)
|
|
912
912
|
throw new Error(
|
|
913
913
|
`Typename field '${s}' is required for union discrimination but was not found in the data`
|
|
914
914
|
);
|
|
915
|
-
return
|
|
915
|
+
return ae(t, c, i, r);
|
|
916
916
|
}
|
|
917
917
|
const a = n.shape[o];
|
|
918
918
|
if (a === void 0 || typeof a == "number")
|
|
919
919
|
throw new Error(`Unknown typename '${o}' in union`);
|
|
920
|
-
return a.mask & d.ENTITY && i.queryClient !== void 0 ?
|
|
920
|
+
return a.mask & d.ENTITY && i.queryClient !== void 0 ? wt(t, a, i) : ce(t, a, i, r);
|
|
921
921
|
}
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function oe(e, t, n, i) {
|
|
924
924
|
const r = [];
|
|
925
925
|
for (let s = 0; s < e.length; s++)
|
|
926
926
|
try {
|
|
927
|
-
r.push(
|
|
927
|
+
r.push(F(e[s], t, n, `${i}[${s}]`));
|
|
928
928
|
} catch (o) {
|
|
929
929
|
n.warn("Failed to parse array item, filtering out", {
|
|
930
930
|
index: s,
|
|
@@ -934,20 +934,20 @@ function se(e, t, n, i) {
|
|
|
934
934
|
}
|
|
935
935
|
return r;
|
|
936
936
|
}
|
|
937
|
-
function
|
|
938
|
-
for (const [r, s] of
|
|
939
|
-
e[r] =
|
|
937
|
+
function ae(e, t, n, i) {
|
|
938
|
+
for (const [r, s] of _t(e))
|
|
939
|
+
e[r] = F(s, t, n, `${i}["${r}"]`);
|
|
940
940
|
return e;
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function ce(e, t, n, i) {
|
|
943
943
|
if (S.has(e))
|
|
944
944
|
return e;
|
|
945
945
|
const r = t.shape;
|
|
946
|
-
for (const [s, o] of
|
|
947
|
-
e[s] =
|
|
946
|
+
for (const [s, o] of _t(r))
|
|
947
|
+
e[s] = F(e[s], o, n, `${i}.${s}`);
|
|
948
948
|
return e;
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function wt(e, t, n) {
|
|
951
951
|
const i = n.queryClient, r = n.preloadedEntities;
|
|
952
952
|
let s, o;
|
|
953
953
|
if (r !== void 0)
|
|
@@ -977,14 +977,14 @@ function _t(e, t, n) {
|
|
|
977
977
|
};
|
|
978
978
|
n.seen.set(c, u), n.seenByKey.set(s, u);
|
|
979
979
|
const l = `[[${t.typenameValue}:${o}]]`, g = t.shape;
|
|
980
|
-
for (const [p, w] of
|
|
981
|
-
h && !(p in e) || (c[p] =
|
|
980
|
+
for (const [p, w] of _t(g))
|
|
981
|
+
h && !(p in e) || (c[p] = F(e[p], w, n, `${l}.${p}`));
|
|
982
982
|
return c;
|
|
983
983
|
}
|
|
984
|
-
function
|
|
985
|
-
return
|
|
984
|
+
function un(e, t) {
|
|
985
|
+
return dn(e, t.shape, t.typenameField);
|
|
986
986
|
}
|
|
987
|
-
function
|
|
987
|
+
function dn(e, t, n) {
|
|
988
988
|
if (t === void 0) return !0;
|
|
989
989
|
for (const i of Object.keys(t)) {
|
|
990
990
|
if (i === n) continue;
|
|
@@ -999,27 +999,27 @@ function cn(e, t, n) {
|
|
|
999
999
|
}
|
|
1000
1000
|
return !0;
|
|
1001
1001
|
}
|
|
1002
|
-
const
|
|
1003
|
-
function
|
|
1002
|
+
const hn = Object.prototype, H = /* @__PURE__ */ new WeakMap();
|
|
1003
|
+
function x(e) {
|
|
1004
1004
|
if (typeof e != "object" || e === null) return e;
|
|
1005
|
-
if (Z.has(e)) return
|
|
1005
|
+
if (Z.has(e)) return x(e.getValue());
|
|
1006
1006
|
if (S.has(e)) return e;
|
|
1007
1007
|
if (Array.isArray(e)) {
|
|
1008
1008
|
let t = H.get(e);
|
|
1009
|
-
return t === void 0 && (t = new Proxy(e,
|
|
1009
|
+
return t === void 0 && (t = new Proxy(e, ln), H.set(e, t)), t;
|
|
1010
1010
|
}
|
|
1011
|
-
if (Object.getPrototypeOf(e) ===
|
|
1011
|
+
if (Object.getPrototypeOf(e) === hn) {
|
|
1012
1012
|
let t = H.get(e);
|
|
1013
|
-
return t === void 0 && (t = new Proxy(e,
|
|
1013
|
+
return t === void 0 && (t = new Proxy(e, yn), H.set(e, t)), t;
|
|
1014
1014
|
}
|
|
1015
1015
|
return e;
|
|
1016
1016
|
}
|
|
1017
|
-
const
|
|
1017
|
+
const ln = {
|
|
1018
1018
|
get(e, t, n) {
|
|
1019
1019
|
if (typeof t == "string") {
|
|
1020
1020
|
const i = Number(t);
|
|
1021
1021
|
if (Number.isInteger(i) && i >= 0 && i < e.length)
|
|
1022
|
-
return
|
|
1022
|
+
return x(e[i]);
|
|
1023
1023
|
}
|
|
1024
1024
|
return Reflect.get(e, t, n);
|
|
1025
1025
|
},
|
|
@@ -1029,9 +1029,9 @@ const un = {
|
|
|
1029
1029
|
deleteProperty() {
|
|
1030
1030
|
throw new Error("Cannot mutate a read-only array");
|
|
1031
1031
|
}
|
|
1032
|
-
},
|
|
1032
|
+
}, yn = {
|
|
1033
1033
|
get(e, t, n) {
|
|
1034
|
-
return typeof t == "string" ?
|
|
1034
|
+
return typeof t == "string" ? x(e[t]) : Reflect.get(e, t, n);
|
|
1035
1035
|
},
|
|
1036
1036
|
set() {
|
|
1037
1037
|
throw new Error("Cannot mutate a read-only object");
|
|
@@ -1048,8 +1048,23 @@ const un = {
|
|
|
1048
1048
|
getOwnPropertyDescriptor(e, t) {
|
|
1049
1049
|
return Object.getOwnPropertyDescriptor(e, t);
|
|
1050
1050
|
}
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1051
|
+
}, pn = (e, t, n) => {
|
|
1052
|
+
const i = e, r = Object.keys(i), s = t !== null && typeof t == "object" && !Array.isArray(t) ? t : void 0;
|
|
1053
|
+
let o = !s || Object.keys(s).length !== r.length;
|
|
1054
|
+
const a = {};
|
|
1055
|
+
for (let c = 0; c < r.length; c++) {
|
|
1056
|
+
const f = r[c], h = i[f];
|
|
1057
|
+
let u;
|
|
1058
|
+
typeof h == "function" ? u = h : u = n(h, s?.[f]), a[f] = u, !o && u !== s?.[f] && (o = !0);
|
|
1059
|
+
}
|
|
1060
|
+
return o ? a : s;
|
|
1061
|
+
}, kt = /* @__PURE__ */ new WeakSet();
|
|
1062
|
+
function fe(e) {
|
|
1063
|
+
const t = e.prototype;
|
|
1064
|
+
kt.has(t) || (kt.add(t), Ie(e, pn));
|
|
1065
|
+
}
|
|
1066
|
+
fe(yt);
|
|
1067
|
+
class gn {
|
|
1053
1068
|
_notifier;
|
|
1054
1069
|
_queryClient;
|
|
1055
1070
|
_proxies = /* @__PURE__ */ new Map();
|
|
@@ -1113,13 +1128,13 @@ class hn {
|
|
|
1113
1128
|
getProxy(t) {
|
|
1114
1129
|
const n = t;
|
|
1115
1130
|
let i = this._proxies.get(n);
|
|
1116
|
-
return i === void 0 && (i =
|
|
1131
|
+
return i === void 0 && (i = vn(this, this.key, t, this._notifier, this._queryClient), this._proxies.set(n, i)), i;
|
|
1117
1132
|
}
|
|
1118
1133
|
get proxy() {
|
|
1119
1134
|
return this._proxies.values().next().value;
|
|
1120
1135
|
}
|
|
1121
1136
|
satisfiesDef(t) {
|
|
1122
|
-
return this.satisfiedDefs.has(t) ? !0 :
|
|
1137
|
+
return this.satisfiedDefs.has(t) ? !0 : un(this.data, t) ? (this.satisfiedDefs.add(t), !0) : !1;
|
|
1123
1138
|
}
|
|
1124
1139
|
save() {
|
|
1125
1140
|
this._queryClient.entityMap.save(this);
|
|
@@ -1131,7 +1146,7 @@ class hn {
|
|
|
1131
1146
|
this._notifier.consume();
|
|
1132
1147
|
}
|
|
1133
1148
|
}
|
|
1134
|
-
function
|
|
1149
|
+
function mn(e, t, n) {
|
|
1135
1150
|
const i = [];
|
|
1136
1151
|
for (const r of e) {
|
|
1137
1152
|
if (typeof r != "object" || r === null) continue;
|
|
@@ -1142,10 +1157,12 @@ function ln(e, t, n) {
|
|
|
1142
1157
|
}
|
|
1143
1158
|
return i;
|
|
1144
1159
|
}
|
|
1145
|
-
function
|
|
1146
|
-
const s = n.shape ?? {}, o = n, a = o._methods, c = o._entityClass, f = o._entityConfig, h = c ? c.prototype :
|
|
1160
|
+
function vn(e, t, n, i, r) {
|
|
1161
|
+
const s = n.shape ?? {}, o = n, a = o._methods, c = o._entityClass, f = o._entityConfig, h = c ? c.prototype : yt.prototype;
|
|
1162
|
+
c !== void 0 && fe(c);
|
|
1163
|
+
const u = n.typenameField, l = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), p = () => ({ __entityRef: t });
|
|
1147
1164
|
let w;
|
|
1148
|
-
f?.hasSubscribe && a && "__subscribe" in a && (w =
|
|
1165
|
+
f?.hasSubscribe && a && "__subscribe" in a && (w = $t((E) => {
|
|
1149
1166
|
const y = (b) => {
|
|
1150
1167
|
b.__eventSource = t, r.applyMutationEvent(b);
|
|
1151
1168
|
}, _ = a.__subscribe.call(v, y);
|
|
@@ -1158,11 +1175,11 @@ function yn(e, t, n, i, r) {
|
|
|
1158
1175
|
if (O.includes("__typename") || O.push("__typename"), a)
|
|
1159
1176
|
for (const E of Object.keys(a))
|
|
1160
1177
|
O.includes(E) || O.push(E);
|
|
1161
|
-
let
|
|
1178
|
+
let M, R = O;
|
|
1162
1179
|
function L() {
|
|
1163
1180
|
const E = e._extraMethods;
|
|
1164
|
-
if (E !==
|
|
1165
|
-
if (
|
|
1181
|
+
if (E !== M) {
|
|
1182
|
+
if (M = E, R = O.slice(), E !== void 0)
|
|
1166
1183
|
for (const _ of Object.keys(E))
|
|
1167
1184
|
R.includes(_) || R.push(_);
|
|
1168
1185
|
const y = e._extraGetters;
|
|
@@ -1185,40 +1202,40 @@ function yn(e, t, n, i, r) {
|
|
|
1185
1202
|
const b = e._extraGetters;
|
|
1186
1203
|
if (b !== void 0 && y in b)
|
|
1187
1204
|
return b[y]();
|
|
1188
|
-
const
|
|
1189
|
-
if (
|
|
1205
|
+
const A = e._extraMethods;
|
|
1206
|
+
if (A !== void 0 && y in A) {
|
|
1190
1207
|
let C = l.get(y);
|
|
1191
|
-
return C || (C =
|
|
1208
|
+
return C || (C = A[y].bind(v), l.set(y, C)), C;
|
|
1192
1209
|
}
|
|
1193
1210
|
if (a && y in a) {
|
|
1194
1211
|
let C = l.get(y);
|
|
1195
|
-
return C || (C =
|
|
1212
|
+
return C || (C = Se(v, a[y].bind(v)), l.set(y, C)), C;
|
|
1196
1213
|
}
|
|
1197
1214
|
}
|
|
1198
1215
|
const _ = e.data[y];
|
|
1199
1216
|
if (typeof _ == "object" && _ !== null && Z.has(_))
|
|
1200
|
-
return
|
|
1217
|
+
return x(_.getValue());
|
|
1201
1218
|
if (Array.isArray(_) && typeof y == "string") {
|
|
1202
1219
|
const b = s[y];
|
|
1203
1220
|
if (b instanceof m && (b.mask & d.ARRAY) !== 0) {
|
|
1204
|
-
const
|
|
1205
|
-
if (
|
|
1206
|
-
const C =
|
|
1221
|
+
const A = b.shape;
|
|
1222
|
+
if (A instanceof m && (A.mask & d.ENTITY) !== 0) {
|
|
1223
|
+
const C = A.typenameValue;
|
|
1207
1224
|
if (C !== void 0) {
|
|
1208
|
-
const
|
|
1209
|
-
if (
|
|
1225
|
+
const Ct = r.getEntityDefsForTypename(C);
|
|
1226
|
+
if (Ct !== void 0 && Ct.length > 1) {
|
|
1210
1227
|
const tt = g.get(y);
|
|
1211
1228
|
if (tt !== void 0 && tt.source === _)
|
|
1212
|
-
return
|
|
1213
|
-
const
|
|
1214
|
-
return g.set(y, { source: _, filtered:
|
|
1229
|
+
return x(tt.filtered);
|
|
1230
|
+
const St = mn(_, A, r);
|
|
1231
|
+
return g.set(y, { source: _, filtered: St }), x(St);
|
|
1215
1232
|
}
|
|
1216
1233
|
}
|
|
1217
1234
|
}
|
|
1218
1235
|
}
|
|
1219
|
-
return
|
|
1236
|
+
return x(_);
|
|
1220
1237
|
}
|
|
1221
|
-
return
|
|
1238
|
+
return x(_);
|
|
1222
1239
|
},
|
|
1223
1240
|
set() {
|
|
1224
1241
|
throw new Error("Entity properties are read-only");
|
|
@@ -1253,9 +1270,9 @@ function yn(e, t, n, i, r) {
|
|
|
1253
1270
|
}
|
|
1254
1271
|
}
|
|
1255
1272
|
};
|
|
1256
|
-
return v = new Proxy({}, U), S.set(v, t),
|
|
1273
|
+
return v = new Proxy({}, U), S.set(v, t), Ce(v, r), v;
|
|
1257
1274
|
}
|
|
1258
|
-
class
|
|
1275
|
+
class _n {
|
|
1259
1276
|
instances = /* @__PURE__ */ new Map();
|
|
1260
1277
|
persistEntity;
|
|
1261
1278
|
constructor(t) {
|
|
@@ -1277,7 +1294,7 @@ class pn {
|
|
|
1277
1294
|
if (typeof a != "string" && typeof a != "number")
|
|
1278
1295
|
throw new Error(`Entity id must be string or number: ${i.typenameValue}`);
|
|
1279
1296
|
const c = i;
|
|
1280
|
-
s = new
|
|
1297
|
+
s = new gn(t, i.typenameValue, a, o, n, r), s._entityCache = c._entityCache, this.instances.set(t, s);
|
|
1281
1298
|
}
|
|
1282
1299
|
return s.parseId = r.currentParseId, s;
|
|
1283
1300
|
}
|
|
@@ -1293,13 +1310,13 @@ class pn {
|
|
|
1293
1310
|
this.persistEntity(t.key, t.data, n);
|
|
1294
1311
|
}
|
|
1295
1312
|
}
|
|
1296
|
-
class
|
|
1313
|
+
class ue {
|
|
1297
1314
|
onlineSignal;
|
|
1298
1315
|
manualOverride = void 0;
|
|
1299
1316
|
eventListenersAttached = !1;
|
|
1300
1317
|
constructor(t) {
|
|
1301
1318
|
const n = t ?? this.detectOnlineStatus();
|
|
1302
|
-
this.onlineSignal =
|
|
1319
|
+
this.onlineSignal = Lt(n), this.canAttachListeners() && this.attachEventListeners();
|
|
1303
1320
|
}
|
|
1304
1321
|
/**
|
|
1305
1322
|
* Returns true if the network is currently online
|
|
@@ -1357,8 +1374,8 @@ class ce {
|
|
|
1357
1374
|
}, window.addEventListener("online", this.handleOnline), window.addEventListener("offline", this.handleOffline), this.eventListenersAttached = !0);
|
|
1358
1375
|
}
|
|
1359
1376
|
}
|
|
1360
|
-
class
|
|
1361
|
-
static onlineSignal =
|
|
1377
|
+
class de {
|
|
1378
|
+
static onlineSignal = Lt(!0);
|
|
1362
1379
|
get isOnline() {
|
|
1363
1380
|
return !0;
|
|
1364
1381
|
}
|
|
@@ -1367,19 +1384,19 @@ class fe {
|
|
|
1367
1384
|
clearManualOverride() {
|
|
1368
1385
|
}
|
|
1369
1386
|
getOnlineSignal() {
|
|
1370
|
-
return
|
|
1387
|
+
return de.onlineSignal;
|
|
1371
1388
|
}
|
|
1372
1389
|
destroy() {
|
|
1373
1390
|
}
|
|
1374
1391
|
}
|
|
1375
|
-
const
|
|
1376
|
-
function
|
|
1392
|
+
const wn = new ue(), Un = Ut(wn);
|
|
1393
|
+
function Et(e, t = typeof window > "u") {
|
|
1377
1394
|
let n;
|
|
1378
1395
|
e === !1 ? n = 0 : e === void 0 || e === !0 ? n = t ? 0 : 3 : typeof e == "number" ? n = e : n = e.retries;
|
|
1379
1396
|
const i = typeof e == "object" && e.retryDelay ? e.retryDelay : (r) => 1e3 * Math.pow(2, r);
|
|
1380
1397
|
return { retries: n, retryDelay: i };
|
|
1381
1398
|
}
|
|
1382
|
-
class
|
|
1399
|
+
class qn {
|
|
1383
1400
|
static cache;
|
|
1384
1401
|
/**
|
|
1385
1402
|
* The adapter class responsible for sending requests for this query type.
|
|
@@ -1389,10 +1406,10 @@ class jn {
|
|
|
1389
1406
|
params;
|
|
1390
1407
|
config;
|
|
1391
1408
|
constructor() {
|
|
1392
|
-
return
|
|
1409
|
+
return Yt(this);
|
|
1393
1410
|
}
|
|
1394
1411
|
}
|
|
1395
|
-
const
|
|
1412
|
+
const Ft = /* @__PURE__ */ new WeakMap();
|
|
1396
1413
|
class G {
|
|
1397
1414
|
constructor(t, n) {
|
|
1398
1415
|
this.captured = n, this.statics = t;
|
|
@@ -1402,14 +1419,14 @@ class G {
|
|
|
1402
1419
|
return it(this.captured, t, n);
|
|
1403
1420
|
}
|
|
1404
1421
|
resolveOptions(t) {
|
|
1405
|
-
const { methods: n } = this.captured, i = n.getConfig ? n.getConfig.call(t) : t.config, r =
|
|
1422
|
+
const { methods: n } = this.captured, i = n.getConfig ? n.getConfig.call(t) : t.config, r = Et(i?.retry);
|
|
1406
1423
|
return { config: i, retryConfig: r };
|
|
1407
1424
|
}
|
|
1408
1425
|
static for(t) {
|
|
1409
|
-
let n =
|
|
1426
|
+
let n = Ft.get(t);
|
|
1410
1427
|
if (n !== void 0)
|
|
1411
1428
|
return n;
|
|
1412
|
-
const i = new t(), r =
|
|
1429
|
+
const i = new t(), r = Le(i), s = String(r.methods.getIdentityKey.call(r.fields)), o = r.fields.result, a = o instanceof m ? o : on.object(o), c = (a.mask & d.ENTITY) !== 0, f = t.cache, h = r.fields.fetchNext, u = t.adapter;
|
|
1413
1430
|
if (!u)
|
|
1414
1431
|
throw new Error(
|
|
1415
1432
|
`Query class "${t.name}" must define a static \`adapter\` property. Extend RESTQuery (from fetchium/rest) or set \`static adapter = MyAdapter\` on your query class.`
|
|
@@ -1421,21 +1438,21 @@ class G {
|
|
|
1421
1438
|
void 0,
|
|
1422
1439
|
s,
|
|
1423
1440
|
// typenameValue — unique per query class
|
|
1424
|
-
|
|
1441
|
+
Vt
|
|
1425
1442
|
// idField — symbol, injected onto payload before parse
|
|
1426
1443
|
);
|
|
1427
1444
|
return n = new G(
|
|
1428
1445
|
{ id: s, shape: g, cache: f, rawFetchNext: h, hasSendNext: l, isEntityResult: c, adapterClass: u },
|
|
1429
1446
|
r
|
|
1430
|
-
),
|
|
1447
|
+
), Ft.set(t, n), n;
|
|
1431
1448
|
}
|
|
1432
1449
|
}
|
|
1433
|
-
const
|
|
1450
|
+
const Vn = (e, t) => {
|
|
1434
1451
|
const n = G.for(e);
|
|
1435
|
-
return
|
|
1452
|
+
return bt(n, t);
|
|
1436
1453
|
};
|
|
1437
|
-
function
|
|
1438
|
-
const n = G.for(e), i =
|
|
1454
|
+
function Kn(e, ...t) {
|
|
1455
|
+
const n = G.for(e), i = Oe(Fn);
|
|
1439
1456
|
if (i === void 0)
|
|
1440
1457
|
throw new Error("QueryClient not found");
|
|
1441
1458
|
const r = t[0];
|
|
@@ -1448,7 +1465,7 @@ function at(e) {
|
|
|
1448
1465
|
const t = new Error("The operation was aborted");
|
|
1449
1466
|
return t.name = "AbortError", t;
|
|
1450
1467
|
}
|
|
1451
|
-
function
|
|
1468
|
+
function he(e, t) {
|
|
1452
1469
|
return new Promise((n, i) => {
|
|
1453
1470
|
if (t?.aborted) {
|
|
1454
1471
|
i(at(t));
|
|
@@ -1476,12 +1493,12 @@ async function ct(e, t, n) {
|
|
|
1476
1493
|
return await e();
|
|
1477
1494
|
} catch (o) {
|
|
1478
1495
|
if (r = o, s >= i) throw o;
|
|
1479
|
-
await
|
|
1496
|
+
await he(t.retryDelay(s), n);
|
|
1480
1497
|
}
|
|
1481
1498
|
}
|
|
1482
1499
|
throw r;
|
|
1483
1500
|
}
|
|
1484
|
-
class
|
|
1501
|
+
class En {
|
|
1485
1502
|
def;
|
|
1486
1503
|
queryKey;
|
|
1487
1504
|
storageKey = -1;
|
|
@@ -1499,7 +1516,7 @@ class mn {
|
|
|
1499
1516
|
debounceTimer = void 0;
|
|
1500
1517
|
/** Resolved per-instance options (depend on actual params). */
|
|
1501
1518
|
config = void 0;
|
|
1502
|
-
retryConfig =
|
|
1519
|
+
retryConfig = Et(void 0);
|
|
1503
1520
|
/** Cancels in-flight fetches and retry waits. */
|
|
1504
1521
|
_abortController = void 0;
|
|
1505
1522
|
/** Cached execution context, recreated only when storageKey (params) changes. */
|
|
@@ -1522,13 +1539,13 @@ class mn {
|
|
|
1522
1539
|
}
|
|
1523
1540
|
constructor(t, n, i, r) {
|
|
1524
1541
|
this.def = t, this.queryClient = n, this.queryKey = i, this.params = r, this._extraMethods = { __refetch: this.refetch }, t.statics.hasSendNext && (this._extraMethods.__fetchNext = this.fetchNext);
|
|
1525
|
-
const s =
|
|
1526
|
-
this._queryId = s !== void 0 ? N(s) : 0, this.relay =
|
|
1542
|
+
const s = jt(r);
|
|
1543
|
+
this._queryId = s !== void 0 ? N(s) : 0, this.relay = $t(
|
|
1527
1544
|
(o) => {
|
|
1528
1545
|
this._relayState = o;
|
|
1529
1546
|
const a = () => {
|
|
1530
1547
|
this._isActive = !1, clearTimeout(this.debounceTimer), this.debounceTimer = void 0, this._abortController?.abort(), this._abortController = void 0, this._fetchNextAbort?.abort(), this._fetchNextAbort = void 0, this._fetchNextPromise = void 0, this.unsubscribe?.(), this.unsubscribe = void 0;
|
|
1531
|
-
const f = this.config?.gcTime ??
|
|
1548
|
+
const f = this.config?.gcTime ?? qt;
|
|
1532
1549
|
this.queryClient.gcManager.schedule(this.queryKey, f, X.Query);
|
|
1533
1550
|
}, c = (f = !1) => {
|
|
1534
1551
|
const { wasPaused: h, isPaused: u, initialized: l } = this;
|
|
@@ -1537,7 +1554,7 @@ class mn {
|
|
|
1537
1554
|
return;
|
|
1538
1555
|
}
|
|
1539
1556
|
this._isActive = !0;
|
|
1540
|
-
const g =
|
|
1557
|
+
const g = jt(this.params), p = bt(this.def, g), w = p !== this.storageKey;
|
|
1541
1558
|
w && (this.currentParams = g, this.storageKey = p), this.getOrCreateExecutionContext(), this.initialized ? h || f ? (this.queryClient.activateQuery(this), f && this.updatedAt !== void 0 && this.setupSubscription(), this.relayState.isPending && this._abortController === void 0 ? this.runQueryImmediately() : (this.config?.refreshStaleOnReconnect ?? !0) && this.isStale && this.runDebounced()) : w && (this.setupSubscription(), this.runDebounced()) : (this.queryClient.activateQuery(this), this.initialize());
|
|
1542
1559
|
};
|
|
1543
1560
|
return c(!0), {
|
|
@@ -1587,7 +1604,7 @@ class mn {
|
|
|
1587
1604
|
if (!this.isPaused)
|
|
1588
1605
|
try {
|
|
1589
1606
|
if (i !== void 0 && this.setupSubscription(), i === void 0 || this.isStale) {
|
|
1590
|
-
if (await
|
|
1607
|
+
if (await he(0), this.isPaused) return;
|
|
1591
1608
|
this.runQueryImmediately();
|
|
1592
1609
|
}
|
|
1593
1610
|
} catch (r) {
|
|
@@ -1709,7 +1726,7 @@ class mn {
|
|
|
1709
1726
|
}
|
|
1710
1727
|
}
|
|
1711
1728
|
}
|
|
1712
|
-
class
|
|
1729
|
+
class bn {
|
|
1713
1730
|
def;
|
|
1714
1731
|
queryClient;
|
|
1715
1732
|
_inFlight = !1;
|
|
@@ -1718,7 +1735,7 @@ class vn {
|
|
|
1718
1735
|
this.def = t, this.queryClient = n, this.task = this.createTask();
|
|
1719
1736
|
}
|
|
1720
1737
|
createTask() {
|
|
1721
|
-
return
|
|
1738
|
+
return Re(
|
|
1722
1739
|
async (t) => {
|
|
1723
1740
|
if (this._inFlight)
|
|
1724
1741
|
throw new Error("A mutation is already in progress. Await the previous call before starting a new one.");
|
|
@@ -1739,7 +1756,7 @@ class vn {
|
|
|
1739
1756
|
return t;
|
|
1740
1757
|
const i = this.queryClient.getContext().log?.warn ?? (() => {
|
|
1741
1758
|
}), r = new ot();
|
|
1742
|
-
return r.reset(void 0, void 0, i),
|
|
1759
|
+
return r.reset(void 0, void 0, i), se(t, n, r);
|
|
1743
1760
|
}
|
|
1744
1761
|
// ======================================================
|
|
1745
1762
|
// Effects processing
|
|
@@ -1765,7 +1782,7 @@ class vn {
|
|
|
1765
1782
|
// Retry logic
|
|
1766
1783
|
// ======================================================
|
|
1767
1784
|
executeWithRetry(t) {
|
|
1768
|
-
const n =
|
|
1785
|
+
const n = Et(this.def.config?.retry, !0), i = this.queryClient.getAdapter(this.def.adapterClass);
|
|
1769
1786
|
if (!i.sendMutation)
|
|
1770
1787
|
throw new Error(
|
|
1771
1788
|
`Adapter "${this.def.adapterClass.name}" does not implement sendMutation(). Add a sendMutation() method to handle mutations.`
|
|
@@ -1780,24 +1797,24 @@ class vn {
|
|
|
1780
1797
|
}, n);
|
|
1781
1798
|
}
|
|
1782
1799
|
}
|
|
1783
|
-
function
|
|
1800
|
+
function Cn(e) {
|
|
1784
1801
|
return typeof e == "string" ? e : j(e).typenameValue;
|
|
1785
1802
|
}
|
|
1786
1803
|
function et(e, t, n) {
|
|
1787
1804
|
if (e)
|
|
1788
1805
|
for (const [i, r] of e) {
|
|
1789
|
-
const s =
|
|
1806
|
+
const s = Cn(i);
|
|
1790
1807
|
s !== void 0 && n.applyMutationEvent({ type: t, typename: s, data: r });
|
|
1791
1808
|
}
|
|
1792
1809
|
}
|
|
1793
|
-
const
|
|
1794
|
-
function
|
|
1810
|
+
const le = "__eventSource";
|
|
1811
|
+
function ye(e) {
|
|
1795
1812
|
return { field: e, segments: e.indexOf(".") !== -1 ? e.split(".") : void 0 };
|
|
1796
1813
|
}
|
|
1797
|
-
function
|
|
1798
|
-
return e.map(
|
|
1814
|
+
function Sn(e) {
|
|
1815
|
+
return e.map(ye);
|
|
1799
1816
|
}
|
|
1800
|
-
function
|
|
1817
|
+
function On(e, t) {
|
|
1801
1818
|
if (t.segments === void 0) return e[t.field];
|
|
1802
1819
|
let n = e;
|
|
1803
1820
|
for (const i of t.segments) {
|
|
@@ -1806,16 +1823,16 @@ function En(e, t) {
|
|
|
1806
1823
|
}
|
|
1807
1824
|
return n;
|
|
1808
1825
|
}
|
|
1809
|
-
function
|
|
1826
|
+
function pe(e, t) {
|
|
1810
1827
|
const n = [];
|
|
1811
1828
|
for (let i = 0; i < t.length; i++) {
|
|
1812
|
-
const r = t[i], s =
|
|
1829
|
+
const r = t[i], s = On(e, r);
|
|
1813
1830
|
if (s === void 0) return;
|
|
1814
1831
|
n.push(r.field, s);
|
|
1815
1832
|
}
|
|
1816
1833
|
return N(n);
|
|
1817
1834
|
}
|
|
1818
|
-
function
|
|
1835
|
+
function Rn(e, t) {
|
|
1819
1836
|
if (e === void 0) return;
|
|
1820
1837
|
const n = /* @__PURE__ */ new Map();
|
|
1821
1838
|
for (const [i, r] of e) {
|
|
@@ -1823,8 +1840,8 @@ function bn(e, t) {
|
|
|
1823
1840
|
let a = !0;
|
|
1824
1841
|
for (const [c, f] of s) {
|
|
1825
1842
|
let h;
|
|
1826
|
-
if (
|
|
1827
|
-
const u =
|
|
1843
|
+
if (Bt(f)) {
|
|
1844
|
+
const u = Qt(f);
|
|
1828
1845
|
h = lt(u, t);
|
|
1829
1846
|
} else
|
|
1830
1847
|
h = f;
|
|
@@ -1838,17 +1855,17 @@ function bn(e, t) {
|
|
|
1838
1855
|
}
|
|
1839
1856
|
return n.size > 0 ? n : void 0;
|
|
1840
1857
|
}
|
|
1841
|
-
function
|
|
1858
|
+
function Mt(e, t) {
|
|
1842
1859
|
const n = e.get(t);
|
|
1843
1860
|
if (n !== void 0)
|
|
1844
1861
|
return n.map(([i]) => i).sort();
|
|
1845
1862
|
}
|
|
1846
|
-
class
|
|
1863
|
+
class An {
|
|
1847
1864
|
fields;
|
|
1848
1865
|
fieldPaths;
|
|
1849
1866
|
_bindings = /* @__PURE__ */ new Map();
|
|
1850
1867
|
constructor(t) {
|
|
1851
|
-
this.fields = t, this.fieldPaths = t.map(
|
|
1868
|
+
this.fields = t, this.fieldPaths = t.map(ye);
|
|
1852
1869
|
}
|
|
1853
1870
|
register(t, n) {
|
|
1854
1871
|
let i = this._bindings.get(t);
|
|
@@ -1865,38 +1882,38 @@ class Cn {
|
|
|
1865
1882
|
return this._bindings.size === 0;
|
|
1866
1883
|
}
|
|
1867
1884
|
}
|
|
1868
|
-
function
|
|
1885
|
+
function Tt(e) {
|
|
1869
1886
|
return N(e);
|
|
1870
1887
|
}
|
|
1871
|
-
class
|
|
1888
|
+
class xn {
|
|
1872
1889
|
_groups = /* @__PURE__ */ new Map();
|
|
1873
1890
|
getOrCreateGroup(t) {
|
|
1874
|
-
const n =
|
|
1891
|
+
const n = Tt(t);
|
|
1875
1892
|
let i = this._groups.get(n);
|
|
1876
|
-
return i === void 0 && (i = new
|
|
1893
|
+
return i === void 0 && (i = new An(t), this._groups.set(n, i)), i;
|
|
1877
1894
|
}
|
|
1878
1895
|
register(t, n, i) {
|
|
1879
1896
|
this.getOrCreateGroup(n).register(t, i);
|
|
1880
1897
|
}
|
|
1881
1898
|
unregister(t, n, i) {
|
|
1882
|
-
const r =
|
|
1899
|
+
const r = Tt(n), s = this._groups.get(r);
|
|
1883
1900
|
s !== void 0 && (s.unregister(t, i), s.isEmpty && this._groups.delete(r));
|
|
1884
1901
|
}
|
|
1885
1902
|
registerBinding(t, n) {
|
|
1886
1903
|
const i = t._constraintHashes.get(n);
|
|
1887
1904
|
if (i === void 0) return;
|
|
1888
|
-
const r =
|
|
1905
|
+
const r = Mt(t._constraintFieldRefs, n);
|
|
1889
1906
|
r !== void 0 && this.register(i, r, t);
|
|
1890
1907
|
}
|
|
1891
1908
|
unregisterBinding(t, n) {
|
|
1892
1909
|
const i = t._constraintHashes.get(n);
|
|
1893
1910
|
if (i === void 0) return;
|
|
1894
|
-
const r =
|
|
1911
|
+
const r = Mt(t._constraintFieldRefs, n);
|
|
1895
1912
|
r !== void 0 && this.unregister(i, r, t);
|
|
1896
1913
|
}
|
|
1897
1914
|
routeEvent(t, n, i, r, s, o) {
|
|
1898
1915
|
for (const a of this._groups.values()) {
|
|
1899
|
-
const c =
|
|
1916
|
+
const c = pe(n, a.fieldPaths);
|
|
1900
1917
|
if (c === void 0) continue;
|
|
1901
1918
|
const f = a.getMatching(c);
|
|
1902
1919
|
if (f !== void 0)
|
|
@@ -1905,7 +1922,7 @@ class Sn {
|
|
|
1905
1922
|
}
|
|
1906
1923
|
}
|
|
1907
1924
|
}
|
|
1908
|
-
function
|
|
1925
|
+
function Pt(e) {
|
|
1909
1926
|
const t = /* @__PURE__ */ new Set();
|
|
1910
1927
|
for (const n of e)
|
|
1911
1928
|
if (typeof n == "object" && n !== null) {
|
|
@@ -1914,7 +1931,7 @@ function kt(e) {
|
|
|
1914
1931
|
}
|
|
1915
1932
|
return t;
|
|
1916
1933
|
}
|
|
1917
|
-
class
|
|
1934
|
+
class ge {
|
|
1918
1935
|
_queryClient;
|
|
1919
1936
|
_parent;
|
|
1920
1937
|
_constraintHashes;
|
|
@@ -1964,7 +1981,7 @@ class ye {
|
|
|
1964
1981
|
n !== -1 && t.splice(n, 1);
|
|
1965
1982
|
}
|
|
1966
1983
|
}
|
|
1967
|
-
class
|
|
1984
|
+
class Nn {
|
|
1968
1985
|
_notifier;
|
|
1969
1986
|
_items;
|
|
1970
1987
|
_keys;
|
|
@@ -1972,9 +1989,9 @@ class On {
|
|
|
1972
1989
|
_queryClient;
|
|
1973
1990
|
_parent;
|
|
1974
1991
|
constructor(t, n, i, r, s, o) {
|
|
1975
|
-
this._notifier = ut(), this._items = i, this._keys =
|
|
1992
|
+
this._notifier = ut(), this._items = i, this._keys = Pt(i), this._queryClient = t, this._parent = n;
|
|
1976
1993
|
const a = r !== void 0 && s !== void 0, c = o !== void 0;
|
|
1977
|
-
(a || c) && (this._outputSignal =
|
|
1994
|
+
(a || c) && (this._outputSignal = Ae(() => {
|
|
1978
1995
|
this._notifier.consume();
|
|
1979
1996
|
let f = this._items;
|
|
1980
1997
|
if (a) {
|
|
@@ -1994,7 +2011,7 @@ class On {
|
|
|
1994
2011
|
h.push(u);
|
|
1995
2012
|
continue;
|
|
1996
2013
|
}
|
|
1997
|
-
g.consume(),
|
|
2014
|
+
g.consume(), pe(g.data, r) === s && h.push(u);
|
|
1998
2015
|
}
|
|
1999
2016
|
f = h;
|
|
2000
2017
|
}
|
|
@@ -2039,7 +2056,7 @@ class On {
|
|
|
2039
2056
|
}
|
|
2040
2057
|
reset(t) {
|
|
2041
2058
|
const n = this._items, i = Array.isArray(t) ? t : [];
|
|
2042
|
-
this._items = i, this._keys =
|
|
2059
|
+
this._items = i, this._keys = Pt(i);
|
|
2043
2060
|
for (const r of i)
|
|
2044
2061
|
if (typeof r == "object" && r !== null) {
|
|
2045
2062
|
const s = T(r);
|
|
@@ -2075,7 +2092,7 @@ class On {
|
|
|
2075
2092
|
return -1;
|
|
2076
2093
|
}
|
|
2077
2094
|
}
|
|
2078
|
-
class
|
|
2095
|
+
class Dn {
|
|
2079
2096
|
_notifier;
|
|
2080
2097
|
_value;
|
|
2081
2098
|
_createdKeys;
|
|
@@ -2116,16 +2133,16 @@ class Rn {
|
|
|
2116
2133
|
append(t) {
|
|
2117
2134
|
}
|
|
2118
2135
|
}
|
|
2119
|
-
function
|
|
2136
|
+
function me(e, t, n, i, r) {
|
|
2120
2137
|
let s = e.constraintFieldRefs;
|
|
2121
2138
|
if (s === void 0) {
|
|
2122
2139
|
s = /* @__PURE__ */ new Map();
|
|
2123
2140
|
for (const f of e.entityDefs) {
|
|
2124
2141
|
const h = f.typenameValue;
|
|
2125
|
-
h !== void 0 && s.set(h, [[
|
|
2142
|
+
h !== void 0 && s.set(h, [[le, n.key]]);
|
|
2126
2143
|
}
|
|
2127
2144
|
}
|
|
2128
|
-
const o =
|
|
2145
|
+
const o = Rn(s, i) ?? /* @__PURE__ */ new Map();
|
|
2129
2146
|
let a;
|
|
2130
2147
|
if (e.type === dt.Array) {
|
|
2131
2148
|
let f, h;
|
|
@@ -2135,11 +2152,11 @@ function pe(e, t, n, i, r) {
|
|
|
2135
2152
|
if (l !== void 0) {
|
|
2136
2153
|
h = l;
|
|
2137
2154
|
const g = e.constraintFieldRefs.get(u);
|
|
2138
|
-
g !== void 0 && (f =
|
|
2155
|
+
g !== void 0 && (f = Sn(g.map(([p]) => p)));
|
|
2139
2156
|
break;
|
|
2140
2157
|
}
|
|
2141
2158
|
}
|
|
2142
|
-
a = new
|
|
2159
|
+
a = new Nn(
|
|
2143
2160
|
r,
|
|
2144
2161
|
n,
|
|
2145
2162
|
Array.isArray(t) ? t : [],
|
|
@@ -2148,7 +2165,7 @@ function pe(e, t, n, i, r) {
|
|
|
2148
2165
|
e.sort
|
|
2149
2166
|
);
|
|
2150
2167
|
} else
|
|
2151
|
-
a = new
|
|
2168
|
+
a = new Dn(
|
|
2152
2169
|
r,
|
|
2153
2170
|
n,
|
|
2154
2171
|
t,
|
|
@@ -2156,7 +2173,7 @@ function pe(e, t, n, i, r) {
|
|
|
2156
2173
|
e.onUpdate,
|
|
2157
2174
|
e.onDelete
|
|
2158
2175
|
);
|
|
2159
|
-
const c = new
|
|
2176
|
+
const c = new ge(
|
|
2160
2177
|
e.entityDefs,
|
|
2161
2178
|
s,
|
|
2162
2179
|
r,
|
|
@@ -2166,7 +2183,7 @@ function pe(e, t, n, i, r) {
|
|
|
2166
2183
|
);
|
|
2167
2184
|
return n.liveCollections.push(c), r.registerLiveCollection(c), c;
|
|
2168
2185
|
}
|
|
2169
|
-
const
|
|
2186
|
+
const ve = Object.entries, _e = Object.prototype;
|
|
2170
2187
|
function nt(e, t, n, i = !1) {
|
|
2171
2188
|
const r = e.queryClient;
|
|
2172
2189
|
r.currentParseId++;
|
|
@@ -2177,7 +2194,7 @@ function Y(e, t, n, i, r, s) {
|
|
|
2177
2194
|
if (typeof e != "object" || e === null) return e;
|
|
2178
2195
|
const o = t.get(e);
|
|
2179
2196
|
if (o !== void 0)
|
|
2180
|
-
return
|
|
2197
|
+
return In(o, t, n, i, r, s);
|
|
2181
2198
|
if (Array.isArray(e)) {
|
|
2182
2199
|
for (let a = 0; a < e.length; a++) {
|
|
2183
2200
|
const c = e[a];
|
|
@@ -2185,7 +2202,7 @@ function Y(e, t, n, i, r, s) {
|
|
|
2185
2202
|
}
|
|
2186
2203
|
return e;
|
|
2187
2204
|
}
|
|
2188
|
-
if (Object.getPrototypeOf(e) ===
|
|
2205
|
+
if (Object.getPrototypeOf(e) === _e && !S.has(e)) {
|
|
2189
2206
|
const a = e;
|
|
2190
2207
|
for (const c of Object.keys(a)) {
|
|
2191
2208
|
const f = a[c];
|
|
@@ -2194,12 +2211,12 @@ function Y(e, t, n, i, r, s) {
|
|
|
2194
2211
|
}
|
|
2195
2212
|
return e;
|
|
2196
2213
|
}
|
|
2197
|
-
function
|
|
2214
|
+
function we(e) {
|
|
2198
2215
|
return typeof e == "object" && e !== null && !(e instanceof Q) && !S.has(e);
|
|
2199
2216
|
}
|
|
2200
|
-
function
|
|
2217
|
+
function In(e, t, n, i, r, s) {
|
|
2201
2218
|
const { key: o, data: a, shape: c, rawKeys: f } = e, h = c.shape, u = n.prepareEntity(o, a, c), l = u.data, g = l !== a, p = g && f !== void 0 && u.entityRefs !== void 0 ? new Map(u.entityRefs) : /* @__PURE__ */ new Map();
|
|
2202
|
-
if (g ? (
|
|
2219
|
+
if (g ? (Ee(
|
|
2203
2220
|
h,
|
|
2204
2221
|
a,
|
|
2205
2222
|
l,
|
|
@@ -2211,13 +2228,13 @@ function xn(e, t, n, i, r, s) {
|
|
|
2211
2228
|
i,
|
|
2212
2229
|
p,
|
|
2213
2230
|
s
|
|
2214
|
-
), u.notify()) :
|
|
2231
|
+
), u.notify()) : be(h, a, u, a, t, n, i, p, s), s && u.liveCollections.length > 0)
|
|
2215
2232
|
for (const v of u.liveCollections) {
|
|
2216
2233
|
const O = v.instance.getRawValue();
|
|
2217
2234
|
if (Array.isArray(O))
|
|
2218
|
-
for (const
|
|
2219
|
-
if (typeof
|
|
2220
|
-
const R = S.get(
|
|
2235
|
+
for (const M of O) {
|
|
2236
|
+
if (typeof M != "object" || M === null) continue;
|
|
2237
|
+
const R = S.get(M);
|
|
2221
2238
|
if (R === void 0) continue;
|
|
2222
2239
|
const L = n.entityMap.getEntity(R);
|
|
2223
2240
|
L !== void 0 && p.set(L, (p.get(L) ?? 0) + 1);
|
|
@@ -2227,12 +2244,12 @@ function xn(e, t, n, i, r, s) {
|
|
|
2227
2244
|
const w = u.getProxy(c);
|
|
2228
2245
|
return r.set(u, (r.get(u) ?? 0) + 1), w;
|
|
2229
2246
|
}
|
|
2230
|
-
function
|
|
2231
|
-
for (const [u, l] of
|
|
2247
|
+
function Ee(e, t, n, i, r, s, o, a, c, f, h) {
|
|
2248
|
+
for (const [u, l] of ve(e))
|
|
2232
2249
|
if (!(i !== void 0 && !i.has(u)))
|
|
2233
|
-
if (
|
|
2250
|
+
if (we(t[u]) && (t[u] = Y(t[u], o, a, c, f, h)), l instanceof m && l._liveConfig !== void 0) {
|
|
2234
2251
|
const g = n[u];
|
|
2235
|
-
g instanceof
|
|
2252
|
+
g instanceof ge ? h ? g.append(t[u]) : g.reset(t[u]) : n[u] = me(
|
|
2236
2253
|
l._liveConfig,
|
|
2237
2254
|
t[u],
|
|
2238
2255
|
r,
|
|
@@ -2244,7 +2261,7 @@ function _e(e, t, n, i, r, s, o, a, c, f, h) {
|
|
|
2244
2261
|
if (ft(g) && ft(p)) {
|
|
2245
2262
|
const w = l instanceof m && l.shape !== void 0 ? l.shape : void 0;
|
|
2246
2263
|
if (w !== void 0)
|
|
2247
|
-
|
|
2264
|
+
Ee(
|
|
2248
2265
|
w,
|
|
2249
2266
|
g,
|
|
2250
2267
|
p,
|
|
@@ -2265,11 +2282,11 @@ function _e(e, t, n, i, r, s, o, a, c, f, h) {
|
|
|
2265
2282
|
n[u] = g;
|
|
2266
2283
|
}
|
|
2267
2284
|
}
|
|
2268
|
-
function
|
|
2269
|
-
for (const [f, h] of
|
|
2285
|
+
function be(e, t, n, i, r, s, o, a, c) {
|
|
2286
|
+
for (const [f, h] of ve(e))
|
|
2270
2287
|
if (f in t)
|
|
2271
|
-
if (
|
|
2272
|
-
t[f] =
|
|
2288
|
+
if (we(t[f]) && (t[f] = Y(t[f], r, s, o, a, c)), h instanceof m && h._liveConfig !== void 0)
|
|
2289
|
+
t[f] = me(
|
|
2273
2290
|
h._liveConfig,
|
|
2274
2291
|
t[f],
|
|
2275
2292
|
n,
|
|
@@ -2280,30 +2297,30 @@ function we(e, t, n, i, r, s, o, a, c) {
|
|
|
2280
2297
|
const u = t[f];
|
|
2281
2298
|
if (ft(u)) {
|
|
2282
2299
|
const l = h instanceof m && h.shape !== void 0 ? h.shape : void 0;
|
|
2283
|
-
l !== void 0 &&
|
|
2300
|
+
l !== void 0 && be(l, u, n, i, r, s, o, a, c);
|
|
2284
2301
|
}
|
|
2285
2302
|
}
|
|
2286
2303
|
}
|
|
2287
2304
|
function ft(e) {
|
|
2288
|
-
return typeof e == "object" && e !== null && !Array.isArray(e) && Object.getPrototypeOf(e) ===
|
|
2305
|
+
return typeof e == "object" && e !== null && !Array.isArray(e) && Object.getPrototypeOf(e) === _e && !S.has(e);
|
|
2289
2306
|
}
|
|
2290
|
-
function
|
|
2307
|
+
function Bn(e) {
|
|
2291
2308
|
if (e !== void 0)
|
|
2292
2309
|
return typeof e == "string" ? e : typeof e == "function" ? e() : e.value;
|
|
2293
2310
|
}
|
|
2294
|
-
function
|
|
2295
|
-
return
|
|
2311
|
+
function kn(e) {
|
|
2312
|
+
return xe(e);
|
|
2296
2313
|
}
|
|
2297
|
-
function
|
|
2314
|
+
function jt(e) {
|
|
2298
2315
|
if (e === void 0)
|
|
2299
2316
|
return;
|
|
2300
2317
|
const t = {};
|
|
2301
2318
|
for (const [n, i] of Object.entries(e))
|
|
2302
|
-
|
|
2319
|
+
kn(i) ? t[n] = i.value : t[n] = i;
|
|
2303
2320
|
return t;
|
|
2304
2321
|
}
|
|
2305
|
-
const
|
|
2306
|
-
class
|
|
2322
|
+
const bt = (e, t) => N([e.statics.id, t]);
|
|
2323
|
+
class Qn {
|
|
2307
2324
|
entityMap;
|
|
2308
2325
|
queryInstances = /* @__PURE__ */ new Map();
|
|
2309
2326
|
mutationInstances = /* @__PURE__ */ new Map();
|
|
@@ -2320,7 +2337,7 @@ class qn {
|
|
|
2320
2337
|
networkUnsubscribe;
|
|
2321
2338
|
constructor(t = {}) {
|
|
2322
2339
|
const {
|
|
2323
|
-
store: n = new
|
|
2340
|
+
store: n = new ke(new Fe()),
|
|
2324
2341
|
log: i,
|
|
2325
2342
|
evictionMultiplier: r,
|
|
2326
2343
|
adapters: s,
|
|
@@ -2328,10 +2345,10 @@ class qn {
|
|
|
2328
2345
|
gcManager: a,
|
|
2329
2346
|
...c
|
|
2330
2347
|
} = t;
|
|
2331
|
-
this.isServer = typeof window > "u", this.store = n, this.context = { ...c, log: i ?? console, evictionMultiplier: r }, this.gcManager = t.gcManager ?? (this.isServer ? new
|
|
2348
|
+
this.isServer = typeof window > "u", this.store = n, this.context = { ...c, log: i ?? console, evictionMultiplier: r }, this.gcManager = t.gcManager ?? (this.isServer ? new Pe() : new Te(this.handleEviction, r)), this.networkManager = t.networkManager ?? new ue(), this.entityMap = new _n((u, l, g) => this.store.saveEntity(u, l, g));
|
|
2332
2349
|
for (const u of t.adapters ?? [])
|
|
2333
2350
|
this.adapters.set(u.constructor, u), u.register(this);
|
|
2334
|
-
const f = this.networkManager.getOnlineSignal(), h =
|
|
2351
|
+
const f = this.networkManager.getOnlineSignal(), h = Ne(() => f.value);
|
|
2335
2352
|
this.networkUnsubscribe = h.addListener(
|
|
2336
2353
|
() => {
|
|
2337
2354
|
const u = f.value;
|
|
@@ -2416,7 +2433,7 @@ class qn {
|
|
|
2416
2433
|
activateQuery(t) {
|
|
2417
2434
|
const { def: n, queryKey: i, storageKey: r, config: s } = t;
|
|
2418
2435
|
this.store.activateQuery(n, r);
|
|
2419
|
-
const o = s?.gcTime ??
|
|
2436
|
+
const o = s?.gcTime ?? qt;
|
|
2420
2437
|
this.gcManager.cancel(i, o);
|
|
2421
2438
|
}
|
|
2422
2439
|
loadCachedQuery(t, n) {
|
|
@@ -2427,9 +2444,9 @@ class qn {
|
|
|
2427
2444
|
* that triggers fetches and prepopulates with cached data
|
|
2428
2445
|
*/
|
|
2429
2446
|
getQuery(t, n) {
|
|
2430
|
-
const i =
|
|
2447
|
+
const i = bt(t, n);
|
|
2431
2448
|
let r = this.queryInstances.get(i);
|
|
2432
|
-
return r === void 0 && (r = new
|
|
2449
|
+
return r === void 0 && (r = new En(t, this, i, n), this.queryInstances.set(i, r)), r.relay;
|
|
2433
2450
|
}
|
|
2434
2451
|
/**
|
|
2435
2452
|
* Gets or creates a MutationResult for the given mutation definition.
|
|
@@ -2438,7 +2455,7 @@ class qn {
|
|
|
2438
2455
|
getMutation(t) {
|
|
2439
2456
|
const n = t.id;
|
|
2440
2457
|
let i = this.mutationInstances.get(n);
|
|
2441
|
-
return i === void 0 && (i = new
|
|
2458
|
+
return i === void 0 && (i = new bn(t, this), this.mutationInstances.set(n, i)), i.task;
|
|
2442
2459
|
}
|
|
2443
2460
|
/**
|
|
2444
2461
|
* Parse data: validates, formats, produces parsed entity data objects.
|
|
@@ -2447,7 +2464,7 @@ class qn {
|
|
|
2447
2464
|
parseData(t, n, i) {
|
|
2448
2465
|
const r = this.context.log?.warn ?? (() => {
|
|
2449
2466
|
}), s = new ot();
|
|
2450
|
-
return s.reset(this, i, r), { data:
|
|
2467
|
+
return s.reset(this, i, r), { data: se(t, n, s), ctx: s };
|
|
2451
2468
|
}
|
|
2452
2469
|
/**
|
|
2453
2470
|
* Apply entities from parseData() via a single depth-first walk: creates/
|
|
@@ -2463,7 +2480,7 @@ class qn {
|
|
|
2463
2480
|
* found in the store by the standard entity pipeline).
|
|
2464
2481
|
*/
|
|
2465
2482
|
parseAndApplyRootEntity(t, n, i, r, s = !1, o) {
|
|
2466
|
-
typeof i.idField == "symbol" && typeof t == "object" && t !== null && !("__entityRef" in t) && (t[
|
|
2483
|
+
typeof i.idField == "symbol" && typeof t == "object" && t !== null && !("__entityRef" in t) && (t[Vt] = n);
|
|
2467
2484
|
const a = this.parseData(t, i, o), c = nt(a.ctx, a.data, r, s), f = S.get(c.data);
|
|
2468
2485
|
return this.entityMap.getEntity(f);
|
|
2469
2486
|
}
|
|
@@ -2496,7 +2513,7 @@ class qn {
|
|
|
2496
2513
|
/* isPartialEvent */
|
|
2497
2514
|
!0
|
|
2498
2515
|
);
|
|
2499
|
-
const O =
|
|
2516
|
+
const O = cn(h, r, v);
|
|
2500
2517
|
nt(v, O, !0);
|
|
2501
2518
|
} catch (w) {
|
|
2502
2519
|
if (this.context.log?.warn?.("Failed to apply mutation event", w), u === void 0) {
|
|
@@ -2521,7 +2538,7 @@ class qn {
|
|
|
2521
2538
|
for (const n of t) {
|
|
2522
2539
|
const i = Array.isArray(n), r = i ? n[0] : n, s = i ? n[1] : void 0, a = G.for(r).statics.id;
|
|
2523
2540
|
for (const [, c] of this.queryInstances)
|
|
2524
|
-
c.def.statics.id === a && (s === void 0 ||
|
|
2541
|
+
c.def.statics.id === a && (s === void 0 || Mn(c.resolvedParams, s)) && c.markStale();
|
|
2525
2542
|
}
|
|
2526
2543
|
}
|
|
2527
2544
|
// ======================================================
|
|
@@ -2542,7 +2559,7 @@ class qn {
|
|
|
2542
2559
|
// ======================================================
|
|
2543
2560
|
getOrCreateMatcher(t) {
|
|
2544
2561
|
let n = this.constraintRegistry.get(t);
|
|
2545
|
-
return n === void 0 && (n = new
|
|
2562
|
+
return n === void 0 && (n = new xn(), this.constraintRegistry.set(t, n)), n;
|
|
2546
2563
|
}
|
|
2547
2564
|
registerLiveCollection(t) {
|
|
2548
2565
|
for (const [n, i] of t._entityDefsByTypename)
|
|
@@ -2557,7 +2574,7 @@ class qn {
|
|
|
2557
2574
|
routeEvent(t, n, i, r, s, o, a) {
|
|
2558
2575
|
const c = this.constraintRegistry.get(t);
|
|
2559
2576
|
if (c === void 0) return;
|
|
2560
|
-
const f = s !== void 0 ? { ...n, [
|
|
2577
|
+
const f = s !== void 0 ? { ...n, [le]: s } : n;
|
|
2561
2578
|
c.routeEvent(t, f, i, r, o, a);
|
|
2562
2579
|
}
|
|
2563
2580
|
destroy() {
|
|
@@ -2567,8 +2584,8 @@ class qn {
|
|
|
2567
2584
|
this.adapters.clear(), this.queryInstances.clear(), this.mutationInstances.clear(), this.constraintRegistry.clear(), this.typenameRegistry.clear(), this.mergedDefCache.clear();
|
|
2568
2585
|
}
|
|
2569
2586
|
}
|
|
2570
|
-
const
|
|
2571
|
-
function
|
|
2587
|
+
const Fn = Ut(void 0);
|
|
2588
|
+
function Mn(e, t) {
|
|
2572
2589
|
if (e === void 0) return !1;
|
|
2573
2590
|
for (const n in t)
|
|
2574
2591
|
if (e[n] !== t[n]) return !1;
|
|
@@ -2576,31 +2593,31 @@ function Dn(e, t) {
|
|
|
2576
2593
|
}
|
|
2577
2594
|
export {
|
|
2578
2595
|
I as A,
|
|
2579
|
-
|
|
2580
|
-
|
|
2596
|
+
yt as E,
|
|
2597
|
+
Te as G,
|
|
2581
2598
|
B as L,
|
|
2582
2599
|
d as M,
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2600
|
+
ue as N,
|
|
2601
|
+
Vt as Q,
|
|
2602
|
+
k as R,
|
|
2586
2603
|
m as V,
|
|
2587
2604
|
dt as a,
|
|
2588
|
-
|
|
2605
|
+
Un as b,
|
|
2589
2606
|
V as c,
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2607
|
+
Pe as d,
|
|
2608
|
+
de as e,
|
|
2609
|
+
qn as f,
|
|
2610
|
+
Qn as g,
|
|
2611
|
+
Fn as h,
|
|
2612
|
+
wn as i,
|
|
2613
|
+
Ln as j,
|
|
2614
|
+
Kn as k,
|
|
2615
|
+
Yt as l,
|
|
2616
|
+
Le as m,
|
|
2600
2617
|
J as n,
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2618
|
+
Bn as o,
|
|
2619
|
+
Vn as q,
|
|
2620
|
+
ee as r,
|
|
2621
|
+
on as t
|
|
2605
2622
|
};
|
|
2606
|
-
//# sourceMappingURL=QueryClient-
|
|
2623
|
+
//# sourceMappingURL=QueryClient-C9tBdK1Z.js.map
|