@tanstack/query-devtools 5.4.2 → 5.8.2
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/build/Devtools/{KWB27UDF.jsx → G2DL2NKW.jsx} +30 -1208
- package/build/Devtools/{HESZYUBG.js → G2MVXYID.js} +16 -1200
- package/build/Devtools/{7FRXYIEA.jsx → RGHE4TS2.jsx} +29 -1210
- package/build/Devtools/{MVUALMJ4.js → VZTWBJH5.js} +16 -1201
- package/build/chunk/{Z53XT47W.js → 2CFRQNPI.js} +1200 -3
- package/build/chunk/3V52ZCRQ.js +3231 -0
- package/build/chunk/{JRAMSUCV.jsx → MJH6GUJH.jsx} +1222 -3
- package/build/chunk/SPPEWFNK.jsx +3295 -0
- package/build/dev.cjs +9913 -9895
- package/build/dev.js +7 -3
- package/build/dev.jsx +9 -4
- package/build/index.cjs +9912 -9894
- package/build/index.d.cts +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +7 -3
- package/build/index.jsx +9 -4
- package/package.json +4 -4
- package/src/index.tsx +8 -2
- package/src/utils.tsx +14 -0
|
@@ -0,0 +1,3295 @@
|
|
|
1
|
+
// ../../node_modules/.pnpm/solid-js@1.8.1/node_modules/solid-js/dist/solid.js
|
|
2
|
+
var sharedConfig = {
|
|
3
|
+
context: void 0,
|
|
4
|
+
registry: void 0
|
|
5
|
+
};
|
|
6
|
+
function setHydrateContext(context) {
|
|
7
|
+
sharedConfig.context = context;
|
|
8
|
+
}
|
|
9
|
+
function nextHydrateContext() {
|
|
10
|
+
return {
|
|
11
|
+
...sharedConfig.context,
|
|
12
|
+
id: `${sharedConfig.context.id}${sharedConfig.context.count++}-`,
|
|
13
|
+
count: 0
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
var equalFn = (a, b) => a === b;
|
|
17
|
+
var $PROXY = Symbol("solid-proxy");
|
|
18
|
+
var $TRACK = Symbol("solid-track");
|
|
19
|
+
var $DEVCOMP = Symbol("solid-dev-component");
|
|
20
|
+
var signalOptions = {
|
|
21
|
+
equals: equalFn
|
|
22
|
+
};
|
|
23
|
+
var ERROR = null;
|
|
24
|
+
var runEffects = runQueue;
|
|
25
|
+
var STALE = 1;
|
|
26
|
+
var PENDING = 2;
|
|
27
|
+
var UNOWNED = {
|
|
28
|
+
owned: null,
|
|
29
|
+
cleanups: null,
|
|
30
|
+
context: null,
|
|
31
|
+
owner: null
|
|
32
|
+
};
|
|
33
|
+
var NO_INIT = {};
|
|
34
|
+
var Owner = null;
|
|
35
|
+
var Transition = null;
|
|
36
|
+
var Scheduler = null;
|
|
37
|
+
var ExternalSourceFactory = null;
|
|
38
|
+
var Listener = null;
|
|
39
|
+
var Updates = null;
|
|
40
|
+
var Effects = null;
|
|
41
|
+
var ExecCount = 0;
|
|
42
|
+
var [transPending, setTransPending] = /* @__PURE__ */ createSignal(false);
|
|
43
|
+
function createRoot(fn, detachedOwner) {
|
|
44
|
+
const listener = Listener, owner = Owner, unowned = fn.length === 0, current = detachedOwner === void 0 ? owner : detachedOwner, root = unowned ? UNOWNED : {
|
|
45
|
+
owned: null,
|
|
46
|
+
cleanups: null,
|
|
47
|
+
context: current ? current.context : null,
|
|
48
|
+
owner: current
|
|
49
|
+
}, updateFn = unowned ? fn : () => fn(() => untrack(() => cleanNode(root)));
|
|
50
|
+
Owner = root;
|
|
51
|
+
Listener = null;
|
|
52
|
+
try {
|
|
53
|
+
return runUpdates(updateFn, true);
|
|
54
|
+
} finally {
|
|
55
|
+
Listener = listener;
|
|
56
|
+
Owner = owner;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function createSignal(value, options) {
|
|
60
|
+
options = options ? Object.assign({}, signalOptions, options) : signalOptions;
|
|
61
|
+
const s = {
|
|
62
|
+
value,
|
|
63
|
+
observers: null,
|
|
64
|
+
observerSlots: null,
|
|
65
|
+
comparator: options.equals || void 0
|
|
66
|
+
};
|
|
67
|
+
const setter = (value2) => {
|
|
68
|
+
if (typeof value2 === "function") {
|
|
69
|
+
if (Transition && Transition.running && Transition.sources.has(s))
|
|
70
|
+
value2 = value2(s.tValue);
|
|
71
|
+
else
|
|
72
|
+
value2 = value2(s.value);
|
|
73
|
+
}
|
|
74
|
+
return writeSignal(s, value2);
|
|
75
|
+
};
|
|
76
|
+
return [readSignal.bind(s), setter];
|
|
77
|
+
}
|
|
78
|
+
function createComputed(fn, value, options) {
|
|
79
|
+
const c = createComputation(fn, value, true, STALE);
|
|
80
|
+
if (Scheduler && Transition && Transition.running)
|
|
81
|
+
Updates.push(c);
|
|
82
|
+
else
|
|
83
|
+
updateComputation(c);
|
|
84
|
+
}
|
|
85
|
+
function createRenderEffect(fn, value, options) {
|
|
86
|
+
const c = createComputation(fn, value, false, STALE);
|
|
87
|
+
if (Scheduler && Transition && Transition.running)
|
|
88
|
+
Updates.push(c);
|
|
89
|
+
else
|
|
90
|
+
updateComputation(c);
|
|
91
|
+
}
|
|
92
|
+
function createEffect(fn, value, options) {
|
|
93
|
+
runEffects = runUserEffects;
|
|
94
|
+
const c = createComputation(fn, value, false, STALE), s = SuspenseContext && useContext(SuspenseContext);
|
|
95
|
+
if (s)
|
|
96
|
+
c.suspense = s;
|
|
97
|
+
if (!options || !options.render)
|
|
98
|
+
c.user = true;
|
|
99
|
+
Effects ? Effects.push(c) : updateComputation(c);
|
|
100
|
+
}
|
|
101
|
+
function createMemo(fn, value, options) {
|
|
102
|
+
options = options ? Object.assign({}, signalOptions, options) : signalOptions;
|
|
103
|
+
const c = createComputation(fn, value, true, 0);
|
|
104
|
+
c.observers = null;
|
|
105
|
+
c.observerSlots = null;
|
|
106
|
+
c.comparator = options.equals || void 0;
|
|
107
|
+
if (Scheduler && Transition && Transition.running) {
|
|
108
|
+
c.tState = STALE;
|
|
109
|
+
Updates.push(c);
|
|
110
|
+
} else
|
|
111
|
+
updateComputation(c);
|
|
112
|
+
return readSignal.bind(c);
|
|
113
|
+
}
|
|
114
|
+
function isPromise(v) {
|
|
115
|
+
return v && typeof v === "object" && "then" in v;
|
|
116
|
+
}
|
|
117
|
+
function createResource(pSource, pFetcher, pOptions) {
|
|
118
|
+
let source;
|
|
119
|
+
let fetcher;
|
|
120
|
+
let options;
|
|
121
|
+
if (arguments.length === 2 && typeof pFetcher === "object" || arguments.length === 1) {
|
|
122
|
+
source = true;
|
|
123
|
+
fetcher = pSource;
|
|
124
|
+
options = pFetcher || {};
|
|
125
|
+
} else {
|
|
126
|
+
source = pSource;
|
|
127
|
+
fetcher = pFetcher;
|
|
128
|
+
options = pOptions || {};
|
|
129
|
+
}
|
|
130
|
+
let pr = null, initP = NO_INIT, id = null, loadedUnderTransition = false, scheduled = false, resolved = "initialValue" in options, dynamic = typeof source === "function" && createMemo(source);
|
|
131
|
+
const contexts = /* @__PURE__ */ new Set(), [value, setValue] = (options.storage || createSignal)(options.initialValue), [error, setError] = createSignal(void 0), [track, trigger] = createSignal(void 0, {
|
|
132
|
+
equals: false
|
|
133
|
+
}), [state, setState] = createSignal(resolved ? "ready" : "unresolved");
|
|
134
|
+
if (sharedConfig.context) {
|
|
135
|
+
id = `${sharedConfig.context.id}${sharedConfig.context.count++}`;
|
|
136
|
+
let v;
|
|
137
|
+
if (options.ssrLoadFrom === "initial")
|
|
138
|
+
initP = options.initialValue;
|
|
139
|
+
else if (sharedConfig.load && (v = sharedConfig.load(id)))
|
|
140
|
+
initP = isPromise(v) && "value" in v ? v.value : v;
|
|
141
|
+
}
|
|
142
|
+
function loadEnd(p, v, error2, key) {
|
|
143
|
+
if (pr === p) {
|
|
144
|
+
pr = null;
|
|
145
|
+
key !== void 0 && (resolved = true);
|
|
146
|
+
if ((p === initP || v === initP) && options.onHydrated)
|
|
147
|
+
queueMicrotask(
|
|
148
|
+
() => options.onHydrated(key, {
|
|
149
|
+
value: v
|
|
150
|
+
})
|
|
151
|
+
);
|
|
152
|
+
initP = NO_INIT;
|
|
153
|
+
if (Transition && p && loadedUnderTransition) {
|
|
154
|
+
Transition.promises.delete(p);
|
|
155
|
+
loadedUnderTransition = false;
|
|
156
|
+
runUpdates(() => {
|
|
157
|
+
Transition.running = true;
|
|
158
|
+
completeLoad(v, error2);
|
|
159
|
+
}, false);
|
|
160
|
+
} else
|
|
161
|
+
completeLoad(v, error2);
|
|
162
|
+
}
|
|
163
|
+
return v;
|
|
164
|
+
}
|
|
165
|
+
function completeLoad(v, err) {
|
|
166
|
+
runUpdates(() => {
|
|
167
|
+
if (err === void 0)
|
|
168
|
+
setValue(() => v);
|
|
169
|
+
setState(err !== void 0 ? "errored" : resolved ? "ready" : "unresolved");
|
|
170
|
+
setError(err);
|
|
171
|
+
for (const c of contexts.keys())
|
|
172
|
+
c.decrement();
|
|
173
|
+
contexts.clear();
|
|
174
|
+
}, false);
|
|
175
|
+
}
|
|
176
|
+
function read() {
|
|
177
|
+
const c = SuspenseContext && useContext(SuspenseContext), v = value(), err = error();
|
|
178
|
+
if (err !== void 0 && !pr)
|
|
179
|
+
throw err;
|
|
180
|
+
if (Listener && !Listener.user && c) {
|
|
181
|
+
createComputed(() => {
|
|
182
|
+
track();
|
|
183
|
+
if (pr) {
|
|
184
|
+
if (c.resolved && Transition && loadedUnderTransition)
|
|
185
|
+
Transition.promises.add(pr);
|
|
186
|
+
else if (!contexts.has(c)) {
|
|
187
|
+
c.increment();
|
|
188
|
+
contexts.add(c);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
return v;
|
|
194
|
+
}
|
|
195
|
+
function load(refetching = true) {
|
|
196
|
+
if (refetching !== false && scheduled)
|
|
197
|
+
return;
|
|
198
|
+
scheduled = false;
|
|
199
|
+
const lookup = dynamic ? dynamic() : source;
|
|
200
|
+
loadedUnderTransition = Transition && Transition.running;
|
|
201
|
+
if (lookup == null || lookup === false) {
|
|
202
|
+
loadEnd(pr, untrack(value));
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
if (Transition && pr)
|
|
206
|
+
Transition.promises.delete(pr);
|
|
207
|
+
const p = initP !== NO_INIT ? initP : untrack(
|
|
208
|
+
() => fetcher(lookup, {
|
|
209
|
+
value: value(),
|
|
210
|
+
refetching
|
|
211
|
+
})
|
|
212
|
+
);
|
|
213
|
+
if (!isPromise(p)) {
|
|
214
|
+
loadEnd(pr, p, void 0, lookup);
|
|
215
|
+
return p;
|
|
216
|
+
}
|
|
217
|
+
pr = p;
|
|
218
|
+
scheduled = true;
|
|
219
|
+
queueMicrotask(() => scheduled = false);
|
|
220
|
+
runUpdates(() => {
|
|
221
|
+
setState(resolved ? "refreshing" : "pending");
|
|
222
|
+
trigger();
|
|
223
|
+
}, false);
|
|
224
|
+
return p.then(
|
|
225
|
+
(v) => loadEnd(p, v, void 0, lookup),
|
|
226
|
+
(e) => loadEnd(p, void 0, castError(e), lookup)
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
Object.defineProperties(read, {
|
|
230
|
+
state: {
|
|
231
|
+
get: () => state()
|
|
232
|
+
},
|
|
233
|
+
error: {
|
|
234
|
+
get: () => error()
|
|
235
|
+
},
|
|
236
|
+
loading: {
|
|
237
|
+
get() {
|
|
238
|
+
const s = state();
|
|
239
|
+
return s === "pending" || s === "refreshing";
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
latest: {
|
|
243
|
+
get() {
|
|
244
|
+
if (!resolved)
|
|
245
|
+
return read();
|
|
246
|
+
const err = error();
|
|
247
|
+
if (err && !pr)
|
|
248
|
+
throw err;
|
|
249
|
+
return value();
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
if (dynamic)
|
|
254
|
+
createComputed(() => load(false));
|
|
255
|
+
else
|
|
256
|
+
load(false);
|
|
257
|
+
return [
|
|
258
|
+
read,
|
|
259
|
+
{
|
|
260
|
+
refetch: load,
|
|
261
|
+
mutate: setValue
|
|
262
|
+
}
|
|
263
|
+
];
|
|
264
|
+
}
|
|
265
|
+
function batch(fn) {
|
|
266
|
+
return runUpdates(fn, false);
|
|
267
|
+
}
|
|
268
|
+
function untrack(fn) {
|
|
269
|
+
if (Listener === null)
|
|
270
|
+
return fn();
|
|
271
|
+
const listener = Listener;
|
|
272
|
+
Listener = null;
|
|
273
|
+
try {
|
|
274
|
+
return fn();
|
|
275
|
+
} finally {
|
|
276
|
+
Listener = listener;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
function on(deps, fn, options) {
|
|
280
|
+
const isArray3 = Array.isArray(deps);
|
|
281
|
+
let prevInput;
|
|
282
|
+
let defer = options && options.defer;
|
|
283
|
+
return (prevValue) => {
|
|
284
|
+
let input;
|
|
285
|
+
if (isArray3) {
|
|
286
|
+
input = Array(deps.length);
|
|
287
|
+
for (let i = 0; i < deps.length; i++)
|
|
288
|
+
input[i] = deps[i]();
|
|
289
|
+
} else
|
|
290
|
+
input = deps();
|
|
291
|
+
if (defer) {
|
|
292
|
+
defer = false;
|
|
293
|
+
return void 0;
|
|
294
|
+
}
|
|
295
|
+
const result = untrack(() => fn(input, prevInput, prevValue));
|
|
296
|
+
prevInput = input;
|
|
297
|
+
return result;
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
function onMount(fn) {
|
|
301
|
+
createEffect(() => untrack(fn));
|
|
302
|
+
}
|
|
303
|
+
function onCleanup(fn) {
|
|
304
|
+
if (Owner === null)
|
|
305
|
+
;
|
|
306
|
+
else if (Owner.cleanups === null)
|
|
307
|
+
Owner.cleanups = [fn];
|
|
308
|
+
else
|
|
309
|
+
Owner.cleanups.push(fn);
|
|
310
|
+
return fn;
|
|
311
|
+
}
|
|
312
|
+
function getListener() {
|
|
313
|
+
return Listener;
|
|
314
|
+
}
|
|
315
|
+
function getOwner() {
|
|
316
|
+
return Owner;
|
|
317
|
+
}
|
|
318
|
+
function runWithOwner(o, fn) {
|
|
319
|
+
const prev = Owner;
|
|
320
|
+
const prevListener = Listener;
|
|
321
|
+
Owner = o;
|
|
322
|
+
Listener = null;
|
|
323
|
+
try {
|
|
324
|
+
return runUpdates(fn, true);
|
|
325
|
+
} catch (err) {
|
|
326
|
+
handleError(err);
|
|
327
|
+
} finally {
|
|
328
|
+
Owner = prev;
|
|
329
|
+
Listener = prevListener;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
function startTransition(fn) {
|
|
333
|
+
if (Transition && Transition.running) {
|
|
334
|
+
fn();
|
|
335
|
+
return Transition.done;
|
|
336
|
+
}
|
|
337
|
+
const l = Listener;
|
|
338
|
+
const o = Owner;
|
|
339
|
+
return Promise.resolve().then(() => {
|
|
340
|
+
Listener = l;
|
|
341
|
+
Owner = o;
|
|
342
|
+
let t;
|
|
343
|
+
if (Scheduler || SuspenseContext) {
|
|
344
|
+
t = Transition || (Transition = {
|
|
345
|
+
sources: /* @__PURE__ */ new Set(),
|
|
346
|
+
effects: [],
|
|
347
|
+
promises: /* @__PURE__ */ new Set(),
|
|
348
|
+
disposed: /* @__PURE__ */ new Set(),
|
|
349
|
+
queue: /* @__PURE__ */ new Set(),
|
|
350
|
+
running: true
|
|
351
|
+
});
|
|
352
|
+
t.done || (t.done = new Promise((res) => t.resolve = res));
|
|
353
|
+
t.running = true;
|
|
354
|
+
}
|
|
355
|
+
runUpdates(fn, false);
|
|
356
|
+
Listener = Owner = null;
|
|
357
|
+
return t ? t.done : void 0;
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
function useTransition() {
|
|
361
|
+
return [transPending, startTransition];
|
|
362
|
+
}
|
|
363
|
+
function createContext(defaultValue, options) {
|
|
364
|
+
const id = Symbol("context");
|
|
365
|
+
return {
|
|
366
|
+
id,
|
|
367
|
+
Provider: createProvider(id),
|
|
368
|
+
defaultValue
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
function useContext(context) {
|
|
372
|
+
return Owner && Owner.context && Owner.context[context.id] !== void 0 ? Owner.context[context.id] : context.defaultValue;
|
|
373
|
+
}
|
|
374
|
+
function children(fn) {
|
|
375
|
+
const children2 = createMemo(fn);
|
|
376
|
+
const memo = createMemo(() => resolveChildren(children2()));
|
|
377
|
+
memo.toArray = () => {
|
|
378
|
+
const c = memo();
|
|
379
|
+
return Array.isArray(c) ? c : c != null ? [c] : [];
|
|
380
|
+
};
|
|
381
|
+
return memo;
|
|
382
|
+
}
|
|
383
|
+
var SuspenseContext;
|
|
384
|
+
function readSignal() {
|
|
385
|
+
const runningTransition = Transition && Transition.running;
|
|
386
|
+
if (this.sources && (runningTransition ? this.tState : this.state)) {
|
|
387
|
+
if ((runningTransition ? this.tState : this.state) === STALE)
|
|
388
|
+
updateComputation(this);
|
|
389
|
+
else {
|
|
390
|
+
const updates = Updates;
|
|
391
|
+
Updates = null;
|
|
392
|
+
runUpdates(() => lookUpstream(this), false);
|
|
393
|
+
Updates = updates;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
if (Listener) {
|
|
397
|
+
const sSlot = this.observers ? this.observers.length : 0;
|
|
398
|
+
if (!Listener.sources) {
|
|
399
|
+
Listener.sources = [this];
|
|
400
|
+
Listener.sourceSlots = [sSlot];
|
|
401
|
+
} else {
|
|
402
|
+
Listener.sources.push(this);
|
|
403
|
+
Listener.sourceSlots.push(sSlot);
|
|
404
|
+
}
|
|
405
|
+
if (!this.observers) {
|
|
406
|
+
this.observers = [Listener];
|
|
407
|
+
this.observerSlots = [Listener.sources.length - 1];
|
|
408
|
+
} else {
|
|
409
|
+
this.observers.push(Listener);
|
|
410
|
+
this.observerSlots.push(Listener.sources.length - 1);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
if (runningTransition && Transition.sources.has(this))
|
|
414
|
+
return this.tValue;
|
|
415
|
+
return this.value;
|
|
416
|
+
}
|
|
417
|
+
function writeSignal(node, value, isComp) {
|
|
418
|
+
let current = Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value;
|
|
419
|
+
if (!node.comparator || !node.comparator(current, value)) {
|
|
420
|
+
if (Transition) {
|
|
421
|
+
const TransitionRunning = Transition.running;
|
|
422
|
+
if (TransitionRunning || !isComp && Transition.sources.has(node)) {
|
|
423
|
+
Transition.sources.add(node);
|
|
424
|
+
node.tValue = value;
|
|
425
|
+
}
|
|
426
|
+
if (!TransitionRunning)
|
|
427
|
+
node.value = value;
|
|
428
|
+
} else
|
|
429
|
+
node.value = value;
|
|
430
|
+
if (node.observers && node.observers.length) {
|
|
431
|
+
runUpdates(() => {
|
|
432
|
+
for (let i = 0; i < node.observers.length; i += 1) {
|
|
433
|
+
const o = node.observers[i];
|
|
434
|
+
const TransitionRunning = Transition && Transition.running;
|
|
435
|
+
if (TransitionRunning && Transition.disposed.has(o))
|
|
436
|
+
continue;
|
|
437
|
+
if (TransitionRunning ? !o.tState : !o.state) {
|
|
438
|
+
if (o.pure)
|
|
439
|
+
Updates.push(o);
|
|
440
|
+
else
|
|
441
|
+
Effects.push(o);
|
|
442
|
+
if (o.observers)
|
|
443
|
+
markDownstream(o);
|
|
444
|
+
}
|
|
445
|
+
if (!TransitionRunning)
|
|
446
|
+
o.state = STALE;
|
|
447
|
+
else
|
|
448
|
+
o.tState = STALE;
|
|
449
|
+
}
|
|
450
|
+
if (Updates.length > 1e6) {
|
|
451
|
+
Updates = [];
|
|
452
|
+
if (false)
|
|
453
|
+
;
|
|
454
|
+
throw new Error();
|
|
455
|
+
}
|
|
456
|
+
}, false);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
return value;
|
|
460
|
+
}
|
|
461
|
+
function updateComputation(node) {
|
|
462
|
+
if (!node.fn)
|
|
463
|
+
return;
|
|
464
|
+
cleanNode(node);
|
|
465
|
+
const owner = Owner, listener = Listener, time = ExecCount;
|
|
466
|
+
Listener = Owner = node;
|
|
467
|
+
runComputation(
|
|
468
|
+
node,
|
|
469
|
+
Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value,
|
|
470
|
+
time
|
|
471
|
+
);
|
|
472
|
+
if (Transition && !Transition.running && Transition.sources.has(node)) {
|
|
473
|
+
queueMicrotask(() => {
|
|
474
|
+
runUpdates(() => {
|
|
475
|
+
Transition && (Transition.running = true);
|
|
476
|
+
Listener = Owner = node;
|
|
477
|
+
runComputation(node, node.tValue, time);
|
|
478
|
+
Listener = Owner = null;
|
|
479
|
+
}, false);
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
Listener = listener;
|
|
483
|
+
Owner = owner;
|
|
484
|
+
}
|
|
485
|
+
function runComputation(node, value, time) {
|
|
486
|
+
let nextValue;
|
|
487
|
+
try {
|
|
488
|
+
nextValue = node.fn(value);
|
|
489
|
+
} catch (err) {
|
|
490
|
+
if (node.pure) {
|
|
491
|
+
if (Transition && Transition.running) {
|
|
492
|
+
node.tState = STALE;
|
|
493
|
+
node.tOwned && node.tOwned.forEach(cleanNode);
|
|
494
|
+
node.tOwned = void 0;
|
|
495
|
+
} else {
|
|
496
|
+
node.state = STALE;
|
|
497
|
+
node.owned && node.owned.forEach(cleanNode);
|
|
498
|
+
node.owned = null;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
node.updatedAt = time + 1;
|
|
502
|
+
return handleError(err);
|
|
503
|
+
}
|
|
504
|
+
if (!node.updatedAt || node.updatedAt <= time) {
|
|
505
|
+
if (node.updatedAt != null && "observers" in node) {
|
|
506
|
+
writeSignal(node, nextValue, true);
|
|
507
|
+
} else if (Transition && Transition.running && node.pure) {
|
|
508
|
+
Transition.sources.add(node);
|
|
509
|
+
node.tValue = nextValue;
|
|
510
|
+
} else
|
|
511
|
+
node.value = nextValue;
|
|
512
|
+
node.updatedAt = time;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
function createComputation(fn, init, pure, state = STALE, options) {
|
|
516
|
+
const c = {
|
|
517
|
+
fn,
|
|
518
|
+
state,
|
|
519
|
+
updatedAt: null,
|
|
520
|
+
owned: null,
|
|
521
|
+
sources: null,
|
|
522
|
+
sourceSlots: null,
|
|
523
|
+
cleanups: null,
|
|
524
|
+
value: init,
|
|
525
|
+
owner: Owner,
|
|
526
|
+
context: Owner ? Owner.context : null,
|
|
527
|
+
pure
|
|
528
|
+
};
|
|
529
|
+
if (Transition && Transition.running) {
|
|
530
|
+
c.state = 0;
|
|
531
|
+
c.tState = state;
|
|
532
|
+
}
|
|
533
|
+
if (Owner === null)
|
|
534
|
+
;
|
|
535
|
+
else if (Owner !== UNOWNED) {
|
|
536
|
+
if (Transition && Transition.running && Owner.pure) {
|
|
537
|
+
if (!Owner.tOwned)
|
|
538
|
+
Owner.tOwned = [c];
|
|
539
|
+
else
|
|
540
|
+
Owner.tOwned.push(c);
|
|
541
|
+
} else {
|
|
542
|
+
if (!Owner.owned)
|
|
543
|
+
Owner.owned = [c];
|
|
544
|
+
else
|
|
545
|
+
Owner.owned.push(c);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
if (ExternalSourceFactory) {
|
|
549
|
+
const [track, trigger] = createSignal(void 0, {
|
|
550
|
+
equals: false
|
|
551
|
+
});
|
|
552
|
+
const ordinary = ExternalSourceFactory(c.fn, trigger);
|
|
553
|
+
onCleanup(() => ordinary.dispose());
|
|
554
|
+
const triggerInTransition = () => startTransition(trigger).then(() => inTransition.dispose());
|
|
555
|
+
const inTransition = ExternalSourceFactory(c.fn, triggerInTransition);
|
|
556
|
+
c.fn = (x) => {
|
|
557
|
+
track();
|
|
558
|
+
return Transition && Transition.running ? inTransition.track(x) : ordinary.track(x);
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
return c;
|
|
562
|
+
}
|
|
563
|
+
function runTop(node) {
|
|
564
|
+
const runningTransition = Transition && Transition.running;
|
|
565
|
+
if ((runningTransition ? node.tState : node.state) === 0)
|
|
566
|
+
return;
|
|
567
|
+
if ((runningTransition ? node.tState : node.state) === PENDING)
|
|
568
|
+
return lookUpstream(node);
|
|
569
|
+
if (node.suspense && untrack(node.suspense.inFallback))
|
|
570
|
+
return node.suspense.effects.push(node);
|
|
571
|
+
const ancestors = [node];
|
|
572
|
+
while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
|
|
573
|
+
if (runningTransition && Transition.disposed.has(node))
|
|
574
|
+
return;
|
|
575
|
+
if (runningTransition ? node.tState : node.state)
|
|
576
|
+
ancestors.push(node);
|
|
577
|
+
}
|
|
578
|
+
for (let i = ancestors.length - 1; i >= 0; i--) {
|
|
579
|
+
node = ancestors[i];
|
|
580
|
+
if (runningTransition) {
|
|
581
|
+
let top = node, prev = ancestors[i + 1];
|
|
582
|
+
while ((top = top.owner) && top !== prev) {
|
|
583
|
+
if (Transition.disposed.has(top))
|
|
584
|
+
return;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
if ((runningTransition ? node.tState : node.state) === STALE) {
|
|
588
|
+
updateComputation(node);
|
|
589
|
+
} else if ((runningTransition ? node.tState : node.state) === PENDING) {
|
|
590
|
+
const updates = Updates;
|
|
591
|
+
Updates = null;
|
|
592
|
+
runUpdates(() => lookUpstream(node, ancestors[0]), false);
|
|
593
|
+
Updates = updates;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
function runUpdates(fn, init) {
|
|
598
|
+
if (Updates)
|
|
599
|
+
return fn();
|
|
600
|
+
let wait = false;
|
|
601
|
+
if (!init)
|
|
602
|
+
Updates = [];
|
|
603
|
+
if (Effects)
|
|
604
|
+
wait = true;
|
|
605
|
+
else
|
|
606
|
+
Effects = [];
|
|
607
|
+
ExecCount++;
|
|
608
|
+
try {
|
|
609
|
+
const res = fn();
|
|
610
|
+
completeUpdates(wait);
|
|
611
|
+
return res;
|
|
612
|
+
} catch (err) {
|
|
613
|
+
if (!wait)
|
|
614
|
+
Effects = null;
|
|
615
|
+
Updates = null;
|
|
616
|
+
handleError(err);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
function completeUpdates(wait) {
|
|
620
|
+
if (Updates) {
|
|
621
|
+
if (Scheduler && Transition && Transition.running)
|
|
622
|
+
scheduleQueue(Updates);
|
|
623
|
+
else
|
|
624
|
+
runQueue(Updates);
|
|
625
|
+
Updates = null;
|
|
626
|
+
}
|
|
627
|
+
if (wait)
|
|
628
|
+
return;
|
|
629
|
+
let res;
|
|
630
|
+
if (Transition) {
|
|
631
|
+
if (!Transition.promises.size && !Transition.queue.size) {
|
|
632
|
+
const sources = Transition.sources;
|
|
633
|
+
const disposed = Transition.disposed;
|
|
634
|
+
Effects.push.apply(Effects, Transition.effects);
|
|
635
|
+
res = Transition.resolve;
|
|
636
|
+
for (const e2 of Effects) {
|
|
637
|
+
"tState" in e2 && (e2.state = e2.tState);
|
|
638
|
+
delete e2.tState;
|
|
639
|
+
}
|
|
640
|
+
Transition = null;
|
|
641
|
+
runUpdates(() => {
|
|
642
|
+
for (const d of disposed)
|
|
643
|
+
cleanNode(d);
|
|
644
|
+
for (const v of sources) {
|
|
645
|
+
v.value = v.tValue;
|
|
646
|
+
if (v.owned) {
|
|
647
|
+
for (let i = 0, len = v.owned.length; i < len; i++)
|
|
648
|
+
cleanNode(v.owned[i]);
|
|
649
|
+
}
|
|
650
|
+
if (v.tOwned)
|
|
651
|
+
v.owned = v.tOwned;
|
|
652
|
+
delete v.tValue;
|
|
653
|
+
delete v.tOwned;
|
|
654
|
+
v.tState = 0;
|
|
655
|
+
}
|
|
656
|
+
setTransPending(false);
|
|
657
|
+
}, false);
|
|
658
|
+
} else if (Transition.running) {
|
|
659
|
+
Transition.running = false;
|
|
660
|
+
Transition.effects.push.apply(Transition.effects, Effects);
|
|
661
|
+
Effects = null;
|
|
662
|
+
setTransPending(true);
|
|
663
|
+
return;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
const e = Effects;
|
|
667
|
+
Effects = null;
|
|
668
|
+
if (e.length)
|
|
669
|
+
runUpdates(() => runEffects(e), false);
|
|
670
|
+
if (res)
|
|
671
|
+
res();
|
|
672
|
+
}
|
|
673
|
+
function runQueue(queue) {
|
|
674
|
+
for (let i = 0; i < queue.length; i++)
|
|
675
|
+
runTop(queue[i]);
|
|
676
|
+
}
|
|
677
|
+
function scheduleQueue(queue) {
|
|
678
|
+
for (let i = 0; i < queue.length; i++) {
|
|
679
|
+
const item = queue[i];
|
|
680
|
+
const tasks = Transition.queue;
|
|
681
|
+
if (!tasks.has(item)) {
|
|
682
|
+
tasks.add(item);
|
|
683
|
+
Scheduler(() => {
|
|
684
|
+
tasks.delete(item);
|
|
685
|
+
runUpdates(() => {
|
|
686
|
+
Transition.running = true;
|
|
687
|
+
runTop(item);
|
|
688
|
+
}, false);
|
|
689
|
+
Transition && (Transition.running = false);
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
function runUserEffects(queue) {
|
|
695
|
+
let i, userLength = 0;
|
|
696
|
+
for (i = 0; i < queue.length; i++) {
|
|
697
|
+
const e = queue[i];
|
|
698
|
+
if (!e.user)
|
|
699
|
+
runTop(e);
|
|
700
|
+
else
|
|
701
|
+
queue[userLength++] = e;
|
|
702
|
+
}
|
|
703
|
+
if (sharedConfig.context) {
|
|
704
|
+
if (sharedConfig.count) {
|
|
705
|
+
sharedConfig.effects || (sharedConfig.effects = []);
|
|
706
|
+
sharedConfig.effects.push(...queue.slice(0, userLength));
|
|
707
|
+
return;
|
|
708
|
+
} else if (sharedConfig.effects) {
|
|
709
|
+
queue = [...sharedConfig.effects, ...queue];
|
|
710
|
+
userLength += sharedConfig.effects.length;
|
|
711
|
+
delete sharedConfig.effects;
|
|
712
|
+
}
|
|
713
|
+
setHydrateContext();
|
|
714
|
+
}
|
|
715
|
+
for (i = 0; i < userLength; i++)
|
|
716
|
+
runTop(queue[i]);
|
|
717
|
+
}
|
|
718
|
+
function lookUpstream(node, ignore) {
|
|
719
|
+
const runningTransition = Transition && Transition.running;
|
|
720
|
+
if (runningTransition)
|
|
721
|
+
node.tState = 0;
|
|
722
|
+
else
|
|
723
|
+
node.state = 0;
|
|
724
|
+
for (let i = 0; i < node.sources.length; i += 1) {
|
|
725
|
+
const source = node.sources[i];
|
|
726
|
+
if (source.sources) {
|
|
727
|
+
const state = runningTransition ? source.tState : source.state;
|
|
728
|
+
if (state === STALE) {
|
|
729
|
+
if (source !== ignore && (!source.updatedAt || source.updatedAt < ExecCount))
|
|
730
|
+
runTop(source);
|
|
731
|
+
} else if (state === PENDING)
|
|
732
|
+
lookUpstream(source, ignore);
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
function markDownstream(node) {
|
|
737
|
+
const runningTransition = Transition && Transition.running;
|
|
738
|
+
for (let i = 0; i < node.observers.length; i += 1) {
|
|
739
|
+
const o = node.observers[i];
|
|
740
|
+
if (runningTransition ? !o.tState : !o.state) {
|
|
741
|
+
if (runningTransition)
|
|
742
|
+
o.tState = PENDING;
|
|
743
|
+
else
|
|
744
|
+
o.state = PENDING;
|
|
745
|
+
if (o.pure)
|
|
746
|
+
Updates.push(o);
|
|
747
|
+
else
|
|
748
|
+
Effects.push(o);
|
|
749
|
+
o.observers && markDownstream(o);
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
function cleanNode(node) {
|
|
754
|
+
let i;
|
|
755
|
+
if (node.sources) {
|
|
756
|
+
while (node.sources.length) {
|
|
757
|
+
const source = node.sources.pop(), index = node.sourceSlots.pop(), obs = source.observers;
|
|
758
|
+
if (obs && obs.length) {
|
|
759
|
+
const n = obs.pop(), s = source.observerSlots.pop();
|
|
760
|
+
if (index < obs.length) {
|
|
761
|
+
n.sourceSlots[s] = index;
|
|
762
|
+
obs[index] = n;
|
|
763
|
+
source.observerSlots[index] = s;
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
if (Transition && Transition.running && node.pure) {
|
|
769
|
+
if (node.tOwned) {
|
|
770
|
+
for (i = node.tOwned.length - 1; i >= 0; i--)
|
|
771
|
+
cleanNode(node.tOwned[i]);
|
|
772
|
+
delete node.tOwned;
|
|
773
|
+
}
|
|
774
|
+
reset(node, true);
|
|
775
|
+
} else if (node.owned) {
|
|
776
|
+
for (i = node.owned.length - 1; i >= 0; i--)
|
|
777
|
+
cleanNode(node.owned[i]);
|
|
778
|
+
node.owned = null;
|
|
779
|
+
}
|
|
780
|
+
if (node.cleanups) {
|
|
781
|
+
for (i = node.cleanups.length - 1; i >= 0; i--)
|
|
782
|
+
node.cleanups[i]();
|
|
783
|
+
node.cleanups = null;
|
|
784
|
+
}
|
|
785
|
+
if (Transition && Transition.running)
|
|
786
|
+
node.tState = 0;
|
|
787
|
+
else
|
|
788
|
+
node.state = 0;
|
|
789
|
+
}
|
|
790
|
+
function reset(node, top) {
|
|
791
|
+
if (!top) {
|
|
792
|
+
node.tState = 0;
|
|
793
|
+
Transition.disposed.add(node);
|
|
794
|
+
}
|
|
795
|
+
if (node.owned) {
|
|
796
|
+
for (let i = 0; i < node.owned.length; i++)
|
|
797
|
+
reset(node.owned[i]);
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
function castError(err) {
|
|
801
|
+
if (err instanceof Error)
|
|
802
|
+
return err;
|
|
803
|
+
return new Error(typeof err === "string" ? err : "Unknown error", {
|
|
804
|
+
cause: err
|
|
805
|
+
});
|
|
806
|
+
}
|
|
807
|
+
function runErrors(err, fns, owner) {
|
|
808
|
+
try {
|
|
809
|
+
for (const f of fns)
|
|
810
|
+
f(err);
|
|
811
|
+
} catch (e) {
|
|
812
|
+
handleError(e, owner && owner.owner || null);
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
function handleError(err, owner = Owner) {
|
|
816
|
+
const fns = ERROR && owner && owner.context && owner.context[ERROR];
|
|
817
|
+
const error = castError(err);
|
|
818
|
+
if (!fns)
|
|
819
|
+
throw error;
|
|
820
|
+
if (Effects)
|
|
821
|
+
Effects.push({
|
|
822
|
+
fn() {
|
|
823
|
+
runErrors(error, fns, owner);
|
|
824
|
+
},
|
|
825
|
+
state: STALE
|
|
826
|
+
});
|
|
827
|
+
else
|
|
828
|
+
runErrors(error, fns, owner);
|
|
829
|
+
}
|
|
830
|
+
function resolveChildren(children2) {
|
|
831
|
+
if (typeof children2 === "function" && !children2.length)
|
|
832
|
+
return resolveChildren(children2());
|
|
833
|
+
if (Array.isArray(children2)) {
|
|
834
|
+
const results = [];
|
|
835
|
+
for (let i = 0; i < children2.length; i++) {
|
|
836
|
+
const result = resolveChildren(children2[i]);
|
|
837
|
+
Array.isArray(result) ? results.push.apply(results, result) : results.push(result);
|
|
838
|
+
}
|
|
839
|
+
return results;
|
|
840
|
+
}
|
|
841
|
+
return children2;
|
|
842
|
+
}
|
|
843
|
+
function createProvider(id, options) {
|
|
844
|
+
return function provider(props) {
|
|
845
|
+
let res;
|
|
846
|
+
createRenderEffect(
|
|
847
|
+
() => res = untrack(() => {
|
|
848
|
+
Owner.context = {
|
|
849
|
+
...Owner.context,
|
|
850
|
+
[id]: props.value
|
|
851
|
+
};
|
|
852
|
+
return children(() => props.children);
|
|
853
|
+
}),
|
|
854
|
+
void 0
|
|
855
|
+
);
|
|
856
|
+
return res;
|
|
857
|
+
};
|
|
858
|
+
}
|
|
859
|
+
var FALLBACK = Symbol("fallback");
|
|
860
|
+
function dispose(d) {
|
|
861
|
+
for (let i = 0; i < d.length; i++)
|
|
862
|
+
d[i]();
|
|
863
|
+
}
|
|
864
|
+
function mapArray(list, mapFn, options = {}) {
|
|
865
|
+
let items = [], mapped = [], disposers = [], len = 0, indexes = mapFn.length > 1 ? [] : null;
|
|
866
|
+
onCleanup(() => dispose(disposers));
|
|
867
|
+
return () => {
|
|
868
|
+
let newItems = list() || [], i, j;
|
|
869
|
+
newItems[$TRACK];
|
|
870
|
+
return untrack(() => {
|
|
871
|
+
let newLen = newItems.length, newIndices, newIndicesNext, temp, tempdisposers, tempIndexes, start, end, newEnd, item;
|
|
872
|
+
if (newLen === 0) {
|
|
873
|
+
if (len !== 0) {
|
|
874
|
+
dispose(disposers);
|
|
875
|
+
disposers = [];
|
|
876
|
+
items = [];
|
|
877
|
+
mapped = [];
|
|
878
|
+
len = 0;
|
|
879
|
+
indexes && (indexes = []);
|
|
880
|
+
}
|
|
881
|
+
if (options.fallback) {
|
|
882
|
+
items = [FALLBACK];
|
|
883
|
+
mapped[0] = createRoot((disposer) => {
|
|
884
|
+
disposers[0] = disposer;
|
|
885
|
+
return options.fallback();
|
|
886
|
+
});
|
|
887
|
+
len = 1;
|
|
888
|
+
}
|
|
889
|
+
} else if (len === 0) {
|
|
890
|
+
mapped = new Array(newLen);
|
|
891
|
+
for (j = 0; j < newLen; j++) {
|
|
892
|
+
items[j] = newItems[j];
|
|
893
|
+
mapped[j] = createRoot(mapper);
|
|
894
|
+
}
|
|
895
|
+
len = newLen;
|
|
896
|
+
} else {
|
|
897
|
+
temp = new Array(newLen);
|
|
898
|
+
tempdisposers = new Array(newLen);
|
|
899
|
+
indexes && (tempIndexes = new Array(newLen));
|
|
900
|
+
for (start = 0, end = Math.min(len, newLen); start < end && items[start] === newItems[start]; start++)
|
|
901
|
+
;
|
|
902
|
+
for (end = len - 1, newEnd = newLen - 1; end >= start && newEnd >= start && items[end] === newItems[newEnd]; end--, newEnd--) {
|
|
903
|
+
temp[newEnd] = mapped[end];
|
|
904
|
+
tempdisposers[newEnd] = disposers[end];
|
|
905
|
+
indexes && (tempIndexes[newEnd] = indexes[end]);
|
|
906
|
+
}
|
|
907
|
+
newIndices = /* @__PURE__ */ new Map();
|
|
908
|
+
newIndicesNext = new Array(newEnd + 1);
|
|
909
|
+
for (j = newEnd; j >= start; j--) {
|
|
910
|
+
item = newItems[j];
|
|
911
|
+
i = newIndices.get(item);
|
|
912
|
+
newIndicesNext[j] = i === void 0 ? -1 : i;
|
|
913
|
+
newIndices.set(item, j);
|
|
914
|
+
}
|
|
915
|
+
for (i = start; i <= end; i++) {
|
|
916
|
+
item = items[i];
|
|
917
|
+
j = newIndices.get(item);
|
|
918
|
+
if (j !== void 0 && j !== -1) {
|
|
919
|
+
temp[j] = mapped[i];
|
|
920
|
+
tempdisposers[j] = disposers[i];
|
|
921
|
+
indexes && (tempIndexes[j] = indexes[i]);
|
|
922
|
+
j = newIndicesNext[j];
|
|
923
|
+
newIndices.set(item, j);
|
|
924
|
+
} else
|
|
925
|
+
disposers[i]();
|
|
926
|
+
}
|
|
927
|
+
for (j = start; j < newLen; j++) {
|
|
928
|
+
if (j in temp) {
|
|
929
|
+
mapped[j] = temp[j];
|
|
930
|
+
disposers[j] = tempdisposers[j];
|
|
931
|
+
if (indexes) {
|
|
932
|
+
indexes[j] = tempIndexes[j];
|
|
933
|
+
indexes[j](j);
|
|
934
|
+
}
|
|
935
|
+
} else
|
|
936
|
+
mapped[j] = createRoot(mapper);
|
|
937
|
+
}
|
|
938
|
+
mapped = mapped.slice(0, len = newLen);
|
|
939
|
+
items = newItems.slice(0);
|
|
940
|
+
}
|
|
941
|
+
return mapped;
|
|
942
|
+
});
|
|
943
|
+
function mapper(disposer) {
|
|
944
|
+
disposers[j] = disposer;
|
|
945
|
+
if (indexes) {
|
|
946
|
+
const [s, set] = createSignal(j);
|
|
947
|
+
indexes[j] = set;
|
|
948
|
+
return mapFn(newItems[j], s);
|
|
949
|
+
}
|
|
950
|
+
return mapFn(newItems[j]);
|
|
951
|
+
}
|
|
952
|
+
};
|
|
953
|
+
}
|
|
954
|
+
function indexArray(list, mapFn, options = {}) {
|
|
955
|
+
let items = [], mapped = [], disposers = [], signals = [], len = 0, i;
|
|
956
|
+
onCleanup(() => dispose(disposers));
|
|
957
|
+
return () => {
|
|
958
|
+
const newItems = list() || [];
|
|
959
|
+
newItems[$TRACK];
|
|
960
|
+
return untrack(() => {
|
|
961
|
+
if (newItems.length === 0) {
|
|
962
|
+
if (len !== 0) {
|
|
963
|
+
dispose(disposers);
|
|
964
|
+
disposers = [];
|
|
965
|
+
items = [];
|
|
966
|
+
mapped = [];
|
|
967
|
+
len = 0;
|
|
968
|
+
signals = [];
|
|
969
|
+
}
|
|
970
|
+
if (options.fallback) {
|
|
971
|
+
items = [FALLBACK];
|
|
972
|
+
mapped[0] = createRoot((disposer) => {
|
|
973
|
+
disposers[0] = disposer;
|
|
974
|
+
return options.fallback();
|
|
975
|
+
});
|
|
976
|
+
len = 1;
|
|
977
|
+
}
|
|
978
|
+
return mapped;
|
|
979
|
+
}
|
|
980
|
+
if (items[0] === FALLBACK) {
|
|
981
|
+
disposers[0]();
|
|
982
|
+
disposers = [];
|
|
983
|
+
items = [];
|
|
984
|
+
mapped = [];
|
|
985
|
+
len = 0;
|
|
986
|
+
}
|
|
987
|
+
for (i = 0; i < newItems.length; i++) {
|
|
988
|
+
if (i < items.length && items[i] !== newItems[i]) {
|
|
989
|
+
signals[i](() => newItems[i]);
|
|
990
|
+
} else if (i >= items.length) {
|
|
991
|
+
mapped[i] = createRoot(mapper);
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
for (; i < items.length; i++) {
|
|
995
|
+
disposers[i]();
|
|
996
|
+
}
|
|
997
|
+
len = signals.length = disposers.length = newItems.length;
|
|
998
|
+
items = newItems.slice(0);
|
|
999
|
+
return mapped = mapped.slice(0, len);
|
|
1000
|
+
});
|
|
1001
|
+
function mapper(disposer) {
|
|
1002
|
+
disposers[i] = disposer;
|
|
1003
|
+
const [s, set] = createSignal(newItems[i]);
|
|
1004
|
+
signals[i] = set;
|
|
1005
|
+
return mapFn(s, i);
|
|
1006
|
+
}
|
|
1007
|
+
};
|
|
1008
|
+
}
|
|
1009
|
+
var hydrationEnabled = false;
|
|
1010
|
+
function createComponent(Comp, props) {
|
|
1011
|
+
if (hydrationEnabled) {
|
|
1012
|
+
if (sharedConfig.context) {
|
|
1013
|
+
const c = sharedConfig.context;
|
|
1014
|
+
setHydrateContext(nextHydrateContext());
|
|
1015
|
+
const r = untrack(() => Comp(props || {}));
|
|
1016
|
+
setHydrateContext(c);
|
|
1017
|
+
return r;
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
return untrack(() => Comp(props || {}));
|
|
1021
|
+
}
|
|
1022
|
+
function trueFn() {
|
|
1023
|
+
return true;
|
|
1024
|
+
}
|
|
1025
|
+
var propTraps = {
|
|
1026
|
+
get(_, property, receiver) {
|
|
1027
|
+
if (property === $PROXY)
|
|
1028
|
+
return receiver;
|
|
1029
|
+
return _.get(property);
|
|
1030
|
+
},
|
|
1031
|
+
has(_, property) {
|
|
1032
|
+
if (property === $PROXY)
|
|
1033
|
+
return true;
|
|
1034
|
+
return _.has(property);
|
|
1035
|
+
},
|
|
1036
|
+
set: trueFn,
|
|
1037
|
+
deleteProperty: trueFn,
|
|
1038
|
+
getOwnPropertyDescriptor(_, property) {
|
|
1039
|
+
return {
|
|
1040
|
+
configurable: true,
|
|
1041
|
+
enumerable: true,
|
|
1042
|
+
get() {
|
|
1043
|
+
return _.get(property);
|
|
1044
|
+
},
|
|
1045
|
+
set: trueFn,
|
|
1046
|
+
deleteProperty: trueFn
|
|
1047
|
+
};
|
|
1048
|
+
},
|
|
1049
|
+
ownKeys(_) {
|
|
1050
|
+
return _.keys();
|
|
1051
|
+
}
|
|
1052
|
+
};
|
|
1053
|
+
function resolveSource(s) {
|
|
1054
|
+
return !(s = typeof s === "function" ? s() : s) ? {} : s;
|
|
1055
|
+
}
|
|
1056
|
+
function resolveSources() {
|
|
1057
|
+
for (let i = 0, length = this.length; i < length; ++i) {
|
|
1058
|
+
const v = this[i]();
|
|
1059
|
+
if (v !== void 0)
|
|
1060
|
+
return v;
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
function mergeProps(...sources) {
|
|
1064
|
+
let proxy = false;
|
|
1065
|
+
for (let i = 0; i < sources.length; i++) {
|
|
1066
|
+
const s = sources[i];
|
|
1067
|
+
proxy = proxy || !!s && $PROXY in s;
|
|
1068
|
+
sources[i] = typeof s === "function" ? (proxy = true, createMemo(s)) : s;
|
|
1069
|
+
}
|
|
1070
|
+
if (proxy) {
|
|
1071
|
+
return new Proxy(
|
|
1072
|
+
{
|
|
1073
|
+
get(property) {
|
|
1074
|
+
for (let i = sources.length - 1; i >= 0; i--) {
|
|
1075
|
+
const v = resolveSource(sources[i])[property];
|
|
1076
|
+
if (v !== void 0)
|
|
1077
|
+
return v;
|
|
1078
|
+
}
|
|
1079
|
+
},
|
|
1080
|
+
has(property) {
|
|
1081
|
+
for (let i = sources.length - 1; i >= 0; i--) {
|
|
1082
|
+
if (property in resolveSource(sources[i]))
|
|
1083
|
+
return true;
|
|
1084
|
+
}
|
|
1085
|
+
return false;
|
|
1086
|
+
},
|
|
1087
|
+
keys() {
|
|
1088
|
+
const keys = [];
|
|
1089
|
+
for (let i = 0; i < sources.length; i++)
|
|
1090
|
+
keys.push(...Object.keys(resolveSource(sources[i])));
|
|
1091
|
+
return [...new Set(keys)];
|
|
1092
|
+
}
|
|
1093
|
+
},
|
|
1094
|
+
propTraps
|
|
1095
|
+
);
|
|
1096
|
+
}
|
|
1097
|
+
const target = {};
|
|
1098
|
+
const sourcesMap = {};
|
|
1099
|
+
const defined = /* @__PURE__ */ new Set();
|
|
1100
|
+
for (let i = sources.length - 1; i >= 0; i--) {
|
|
1101
|
+
const source = sources[i];
|
|
1102
|
+
if (!source)
|
|
1103
|
+
continue;
|
|
1104
|
+
const sourceKeys = Object.getOwnPropertyNames(source);
|
|
1105
|
+
for (let i2 = 0, length = sourceKeys.length; i2 < length; i2++) {
|
|
1106
|
+
const key = sourceKeys[i2];
|
|
1107
|
+
if (key === "__proto__" || key === "constructor")
|
|
1108
|
+
continue;
|
|
1109
|
+
const desc = Object.getOwnPropertyDescriptor(source, key);
|
|
1110
|
+
if (!defined.has(key)) {
|
|
1111
|
+
if (desc.get) {
|
|
1112
|
+
defined.add(key);
|
|
1113
|
+
Object.defineProperty(target, key, {
|
|
1114
|
+
enumerable: true,
|
|
1115
|
+
configurable: true,
|
|
1116
|
+
get: resolveSources.bind(sourcesMap[key] = [desc.get.bind(source)])
|
|
1117
|
+
});
|
|
1118
|
+
} else {
|
|
1119
|
+
if (desc.value !== void 0)
|
|
1120
|
+
defined.add(key);
|
|
1121
|
+
target[key] = desc.value;
|
|
1122
|
+
}
|
|
1123
|
+
} else {
|
|
1124
|
+
const sources2 = sourcesMap[key];
|
|
1125
|
+
if (sources2) {
|
|
1126
|
+
if (desc.get) {
|
|
1127
|
+
sources2.push(desc.get.bind(source));
|
|
1128
|
+
} else if (desc.value !== void 0) {
|
|
1129
|
+
sources2.push(() => desc.value);
|
|
1130
|
+
}
|
|
1131
|
+
} else if (target[key] === void 0)
|
|
1132
|
+
target[key] = desc.value;
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
return target;
|
|
1137
|
+
}
|
|
1138
|
+
function splitProps(props, ...keys) {
|
|
1139
|
+
if ($PROXY in props) {
|
|
1140
|
+
const blocked = new Set(keys.length > 1 ? keys.flat() : keys[0]);
|
|
1141
|
+
const res = keys.map((k) => {
|
|
1142
|
+
return new Proxy(
|
|
1143
|
+
{
|
|
1144
|
+
get(property) {
|
|
1145
|
+
return k.includes(property) ? props[property] : void 0;
|
|
1146
|
+
},
|
|
1147
|
+
has(property) {
|
|
1148
|
+
return k.includes(property) && property in props;
|
|
1149
|
+
},
|
|
1150
|
+
keys() {
|
|
1151
|
+
return k.filter((property) => property in props);
|
|
1152
|
+
}
|
|
1153
|
+
},
|
|
1154
|
+
propTraps
|
|
1155
|
+
);
|
|
1156
|
+
});
|
|
1157
|
+
res.push(
|
|
1158
|
+
new Proxy(
|
|
1159
|
+
{
|
|
1160
|
+
get(property) {
|
|
1161
|
+
return blocked.has(property) ? void 0 : props[property];
|
|
1162
|
+
},
|
|
1163
|
+
has(property) {
|
|
1164
|
+
return blocked.has(property) ? false : property in props;
|
|
1165
|
+
},
|
|
1166
|
+
keys() {
|
|
1167
|
+
return Object.keys(props).filter((k) => !blocked.has(k));
|
|
1168
|
+
}
|
|
1169
|
+
},
|
|
1170
|
+
propTraps
|
|
1171
|
+
)
|
|
1172
|
+
);
|
|
1173
|
+
return res;
|
|
1174
|
+
}
|
|
1175
|
+
const otherObject = {};
|
|
1176
|
+
const objects = keys.map(() => ({}));
|
|
1177
|
+
for (const propName of Object.getOwnPropertyNames(props)) {
|
|
1178
|
+
const desc = Object.getOwnPropertyDescriptor(props, propName);
|
|
1179
|
+
const isDefaultDesc = !desc.get && !desc.set && desc.enumerable && desc.writable && desc.configurable;
|
|
1180
|
+
let blocked = false;
|
|
1181
|
+
let objectIndex = 0;
|
|
1182
|
+
for (const k of keys) {
|
|
1183
|
+
if (k.includes(propName)) {
|
|
1184
|
+
blocked = true;
|
|
1185
|
+
isDefaultDesc ? objects[objectIndex][propName] = desc.value : Object.defineProperty(objects[objectIndex], propName, desc);
|
|
1186
|
+
}
|
|
1187
|
+
++objectIndex;
|
|
1188
|
+
}
|
|
1189
|
+
if (!blocked) {
|
|
1190
|
+
isDefaultDesc ? otherObject[propName] = desc.value : Object.defineProperty(otherObject, propName, desc);
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
return [...objects, otherObject];
|
|
1194
|
+
}
|
|
1195
|
+
function lazy(fn) {
|
|
1196
|
+
let comp;
|
|
1197
|
+
let p;
|
|
1198
|
+
const wrap = (props) => {
|
|
1199
|
+
const ctx = sharedConfig.context;
|
|
1200
|
+
if (ctx) {
|
|
1201
|
+
const [s, set] = createSignal();
|
|
1202
|
+
sharedConfig.count || (sharedConfig.count = 0);
|
|
1203
|
+
sharedConfig.count++;
|
|
1204
|
+
(p || (p = fn())).then((mod) => {
|
|
1205
|
+
setHydrateContext(ctx);
|
|
1206
|
+
sharedConfig.count--;
|
|
1207
|
+
set(() => mod.default);
|
|
1208
|
+
setHydrateContext();
|
|
1209
|
+
});
|
|
1210
|
+
comp = s;
|
|
1211
|
+
} else if (!comp) {
|
|
1212
|
+
const [s] = createResource(() => (p || (p = fn())).then((mod) => mod.default));
|
|
1213
|
+
comp = s;
|
|
1214
|
+
}
|
|
1215
|
+
let Comp;
|
|
1216
|
+
return createMemo(
|
|
1217
|
+
() => (Comp = comp()) && untrack(() => {
|
|
1218
|
+
if (false)
|
|
1219
|
+
;
|
|
1220
|
+
if (!ctx)
|
|
1221
|
+
return Comp(props);
|
|
1222
|
+
const c = sharedConfig.context;
|
|
1223
|
+
setHydrateContext(ctx);
|
|
1224
|
+
const r = Comp(props);
|
|
1225
|
+
setHydrateContext(c);
|
|
1226
|
+
return r;
|
|
1227
|
+
})
|
|
1228
|
+
);
|
|
1229
|
+
};
|
|
1230
|
+
wrap.preload = () => p || ((p = fn()).then((mod) => comp = () => mod.default), p);
|
|
1231
|
+
return wrap;
|
|
1232
|
+
}
|
|
1233
|
+
var counter = 0;
|
|
1234
|
+
function createUniqueId() {
|
|
1235
|
+
const ctx = sharedConfig.context;
|
|
1236
|
+
return ctx ? `${ctx.id}${ctx.count++}` : `cl-${counter++}`;
|
|
1237
|
+
}
|
|
1238
|
+
var narrowedError = (name) => `Stale read from <${name}>.`;
|
|
1239
|
+
function For(props) {
|
|
1240
|
+
const fallback = "fallback" in props && {
|
|
1241
|
+
fallback: () => props.fallback
|
|
1242
|
+
};
|
|
1243
|
+
return createMemo(mapArray(() => props.each, props.children, fallback || void 0));
|
|
1244
|
+
}
|
|
1245
|
+
function Index(props) {
|
|
1246
|
+
const fallback = "fallback" in props && {
|
|
1247
|
+
fallback: () => props.fallback
|
|
1248
|
+
};
|
|
1249
|
+
return createMemo(indexArray(() => props.each, props.children, fallback || void 0));
|
|
1250
|
+
}
|
|
1251
|
+
function Show(props) {
|
|
1252
|
+
const keyed = props.keyed;
|
|
1253
|
+
const condition = createMemo(() => props.when, void 0, {
|
|
1254
|
+
equals: (a, b) => keyed ? a === b : !a === !b
|
|
1255
|
+
});
|
|
1256
|
+
return createMemo(
|
|
1257
|
+
() => {
|
|
1258
|
+
const c = condition();
|
|
1259
|
+
if (c) {
|
|
1260
|
+
const child = props.children;
|
|
1261
|
+
const fn = typeof child === "function" && child.length > 0;
|
|
1262
|
+
return fn ? untrack(
|
|
1263
|
+
() => child(
|
|
1264
|
+
keyed ? c : () => {
|
|
1265
|
+
if (!untrack(condition))
|
|
1266
|
+
throw narrowedError("Show");
|
|
1267
|
+
return props.when;
|
|
1268
|
+
}
|
|
1269
|
+
)
|
|
1270
|
+
) : child;
|
|
1271
|
+
}
|
|
1272
|
+
return props.fallback;
|
|
1273
|
+
},
|
|
1274
|
+
void 0,
|
|
1275
|
+
void 0
|
|
1276
|
+
);
|
|
1277
|
+
}
|
|
1278
|
+
function Switch(props) {
|
|
1279
|
+
let keyed = false;
|
|
1280
|
+
const equals = (a, b) => a[0] === b[0] && (keyed ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2];
|
|
1281
|
+
const conditions = children(() => props.children), evalConditions = createMemo(
|
|
1282
|
+
() => {
|
|
1283
|
+
let conds = conditions();
|
|
1284
|
+
if (!Array.isArray(conds))
|
|
1285
|
+
conds = [conds];
|
|
1286
|
+
for (let i = 0; i < conds.length; i++) {
|
|
1287
|
+
const c = conds[i].when;
|
|
1288
|
+
if (c) {
|
|
1289
|
+
keyed = !!conds[i].keyed;
|
|
1290
|
+
return [i, c, conds[i]];
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
return [-1];
|
|
1294
|
+
},
|
|
1295
|
+
void 0,
|
|
1296
|
+
{
|
|
1297
|
+
equals
|
|
1298
|
+
}
|
|
1299
|
+
);
|
|
1300
|
+
return createMemo(
|
|
1301
|
+
() => {
|
|
1302
|
+
const [index, when, cond] = evalConditions();
|
|
1303
|
+
if (index < 0)
|
|
1304
|
+
return props.fallback;
|
|
1305
|
+
const c = cond.children;
|
|
1306
|
+
const fn = typeof c === "function" && c.length > 0;
|
|
1307
|
+
return fn ? untrack(
|
|
1308
|
+
() => c(
|
|
1309
|
+
keyed ? when : () => {
|
|
1310
|
+
if (untrack(evalConditions)[0] !== index)
|
|
1311
|
+
throw narrowedError("Match");
|
|
1312
|
+
return cond.when;
|
|
1313
|
+
}
|
|
1314
|
+
)
|
|
1315
|
+
) : c;
|
|
1316
|
+
},
|
|
1317
|
+
void 0,
|
|
1318
|
+
void 0
|
|
1319
|
+
);
|
|
1320
|
+
}
|
|
1321
|
+
function Match(props) {
|
|
1322
|
+
return props;
|
|
1323
|
+
}
|
|
1324
|
+
var SuspenseListContext = createContext();
|
|
1325
|
+
var DEV = void 0;
|
|
1326
|
+
|
|
1327
|
+
// ../../node_modules/.pnpm/solid-js@1.8.1/node_modules/solid-js/web/dist/web.js
|
|
1328
|
+
var booleans = [
|
|
1329
|
+
"allowfullscreen",
|
|
1330
|
+
"async",
|
|
1331
|
+
"autofocus",
|
|
1332
|
+
"autoplay",
|
|
1333
|
+
"checked",
|
|
1334
|
+
"controls",
|
|
1335
|
+
"default",
|
|
1336
|
+
"disabled",
|
|
1337
|
+
"formnovalidate",
|
|
1338
|
+
"hidden",
|
|
1339
|
+
"indeterminate",
|
|
1340
|
+
"ismap",
|
|
1341
|
+
"loop",
|
|
1342
|
+
"multiple",
|
|
1343
|
+
"muted",
|
|
1344
|
+
"nomodule",
|
|
1345
|
+
"novalidate",
|
|
1346
|
+
"open",
|
|
1347
|
+
"playsinline",
|
|
1348
|
+
"readonly",
|
|
1349
|
+
"required",
|
|
1350
|
+
"reversed",
|
|
1351
|
+
"seamless",
|
|
1352
|
+
"selected"
|
|
1353
|
+
];
|
|
1354
|
+
var Properties = /* @__PURE__ */ new Set([
|
|
1355
|
+
"className",
|
|
1356
|
+
"value",
|
|
1357
|
+
"readOnly",
|
|
1358
|
+
"formNoValidate",
|
|
1359
|
+
"isMap",
|
|
1360
|
+
"noModule",
|
|
1361
|
+
"playsInline",
|
|
1362
|
+
...booleans
|
|
1363
|
+
]);
|
|
1364
|
+
var ChildProperties = /* @__PURE__ */ new Set([
|
|
1365
|
+
"innerHTML",
|
|
1366
|
+
"textContent",
|
|
1367
|
+
"innerText",
|
|
1368
|
+
"children"
|
|
1369
|
+
]);
|
|
1370
|
+
var Aliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
1371
|
+
className: "class",
|
|
1372
|
+
htmlFor: "for"
|
|
1373
|
+
});
|
|
1374
|
+
var PropAliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
1375
|
+
class: "className",
|
|
1376
|
+
formnovalidate: {
|
|
1377
|
+
$: "formNoValidate",
|
|
1378
|
+
BUTTON: 1,
|
|
1379
|
+
INPUT: 1
|
|
1380
|
+
},
|
|
1381
|
+
ismap: {
|
|
1382
|
+
$: "isMap",
|
|
1383
|
+
IMG: 1
|
|
1384
|
+
},
|
|
1385
|
+
nomodule: {
|
|
1386
|
+
$: "noModule",
|
|
1387
|
+
SCRIPT: 1
|
|
1388
|
+
},
|
|
1389
|
+
playsinline: {
|
|
1390
|
+
$: "playsInline",
|
|
1391
|
+
VIDEO: 1
|
|
1392
|
+
},
|
|
1393
|
+
readonly: {
|
|
1394
|
+
$: "readOnly",
|
|
1395
|
+
INPUT: 1,
|
|
1396
|
+
TEXTAREA: 1
|
|
1397
|
+
}
|
|
1398
|
+
});
|
|
1399
|
+
function getPropAlias(prop, tagName) {
|
|
1400
|
+
const a = PropAliases[prop];
|
|
1401
|
+
return typeof a === "object" ? a[tagName] ? a["$"] : void 0 : a;
|
|
1402
|
+
}
|
|
1403
|
+
var DelegatedEvents = /* @__PURE__ */ new Set([
|
|
1404
|
+
"beforeinput",
|
|
1405
|
+
"click",
|
|
1406
|
+
"dblclick",
|
|
1407
|
+
"contextmenu",
|
|
1408
|
+
"focusin",
|
|
1409
|
+
"focusout",
|
|
1410
|
+
"input",
|
|
1411
|
+
"keydown",
|
|
1412
|
+
"keyup",
|
|
1413
|
+
"mousedown",
|
|
1414
|
+
"mousemove",
|
|
1415
|
+
"mouseout",
|
|
1416
|
+
"mouseover",
|
|
1417
|
+
"mouseup",
|
|
1418
|
+
"pointerdown",
|
|
1419
|
+
"pointermove",
|
|
1420
|
+
"pointerout",
|
|
1421
|
+
"pointerover",
|
|
1422
|
+
"pointerup",
|
|
1423
|
+
"touchend",
|
|
1424
|
+
"touchmove",
|
|
1425
|
+
"touchstart"
|
|
1426
|
+
]);
|
|
1427
|
+
var SVGElements = /* @__PURE__ */ new Set([
|
|
1428
|
+
"altGlyph",
|
|
1429
|
+
"altGlyphDef",
|
|
1430
|
+
"altGlyphItem",
|
|
1431
|
+
"animate",
|
|
1432
|
+
"animateColor",
|
|
1433
|
+
"animateMotion",
|
|
1434
|
+
"animateTransform",
|
|
1435
|
+
"circle",
|
|
1436
|
+
"clipPath",
|
|
1437
|
+
"color-profile",
|
|
1438
|
+
"cursor",
|
|
1439
|
+
"defs",
|
|
1440
|
+
"desc",
|
|
1441
|
+
"ellipse",
|
|
1442
|
+
"feBlend",
|
|
1443
|
+
"feColorMatrix",
|
|
1444
|
+
"feComponentTransfer",
|
|
1445
|
+
"feComposite",
|
|
1446
|
+
"feConvolveMatrix",
|
|
1447
|
+
"feDiffuseLighting",
|
|
1448
|
+
"feDisplacementMap",
|
|
1449
|
+
"feDistantLight",
|
|
1450
|
+
"feFlood",
|
|
1451
|
+
"feFuncA",
|
|
1452
|
+
"feFuncB",
|
|
1453
|
+
"feFuncG",
|
|
1454
|
+
"feFuncR",
|
|
1455
|
+
"feGaussianBlur",
|
|
1456
|
+
"feImage",
|
|
1457
|
+
"feMerge",
|
|
1458
|
+
"feMergeNode",
|
|
1459
|
+
"feMorphology",
|
|
1460
|
+
"feOffset",
|
|
1461
|
+
"fePointLight",
|
|
1462
|
+
"feSpecularLighting",
|
|
1463
|
+
"feSpotLight",
|
|
1464
|
+
"feTile",
|
|
1465
|
+
"feTurbulence",
|
|
1466
|
+
"filter",
|
|
1467
|
+
"font",
|
|
1468
|
+
"font-face",
|
|
1469
|
+
"font-face-format",
|
|
1470
|
+
"font-face-name",
|
|
1471
|
+
"font-face-src",
|
|
1472
|
+
"font-face-uri",
|
|
1473
|
+
"foreignObject",
|
|
1474
|
+
"g",
|
|
1475
|
+
"glyph",
|
|
1476
|
+
"glyphRef",
|
|
1477
|
+
"hkern",
|
|
1478
|
+
"image",
|
|
1479
|
+
"line",
|
|
1480
|
+
"linearGradient",
|
|
1481
|
+
"marker",
|
|
1482
|
+
"mask",
|
|
1483
|
+
"metadata",
|
|
1484
|
+
"missing-glyph",
|
|
1485
|
+
"mpath",
|
|
1486
|
+
"path",
|
|
1487
|
+
"pattern",
|
|
1488
|
+
"polygon",
|
|
1489
|
+
"polyline",
|
|
1490
|
+
"radialGradient",
|
|
1491
|
+
"rect",
|
|
1492
|
+
"set",
|
|
1493
|
+
"stop",
|
|
1494
|
+
"svg",
|
|
1495
|
+
"switch",
|
|
1496
|
+
"symbol",
|
|
1497
|
+
"text",
|
|
1498
|
+
"textPath",
|
|
1499
|
+
"tref",
|
|
1500
|
+
"tspan",
|
|
1501
|
+
"use",
|
|
1502
|
+
"view",
|
|
1503
|
+
"vkern"
|
|
1504
|
+
]);
|
|
1505
|
+
var SVGNamespace = {
|
|
1506
|
+
xlink: "http://www.w3.org/1999/xlink",
|
|
1507
|
+
xml: "http://www.w3.org/XML/1998/namespace"
|
|
1508
|
+
};
|
|
1509
|
+
function reconcileArrays(parentNode, a, b) {
|
|
1510
|
+
let bLength = b.length, aEnd = a.length, bEnd = bLength, aStart = 0, bStart = 0, after = a[aEnd - 1].nextSibling, map = null;
|
|
1511
|
+
while (aStart < aEnd || bStart < bEnd) {
|
|
1512
|
+
if (a[aStart] === b[bStart]) {
|
|
1513
|
+
aStart++;
|
|
1514
|
+
bStart++;
|
|
1515
|
+
continue;
|
|
1516
|
+
}
|
|
1517
|
+
while (a[aEnd - 1] === b[bEnd - 1]) {
|
|
1518
|
+
aEnd--;
|
|
1519
|
+
bEnd--;
|
|
1520
|
+
}
|
|
1521
|
+
if (aEnd === aStart) {
|
|
1522
|
+
const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;
|
|
1523
|
+
while (bStart < bEnd)
|
|
1524
|
+
parentNode.insertBefore(b[bStart++], node);
|
|
1525
|
+
} else if (bEnd === bStart) {
|
|
1526
|
+
while (aStart < aEnd) {
|
|
1527
|
+
if (!map || !map.has(a[aStart]))
|
|
1528
|
+
a[aStart].remove();
|
|
1529
|
+
aStart++;
|
|
1530
|
+
}
|
|
1531
|
+
} else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {
|
|
1532
|
+
const node = a[--aEnd].nextSibling;
|
|
1533
|
+
parentNode.insertBefore(b[bStart++], a[aStart++].nextSibling);
|
|
1534
|
+
parentNode.insertBefore(b[--bEnd], node);
|
|
1535
|
+
a[aEnd] = b[bEnd];
|
|
1536
|
+
} else {
|
|
1537
|
+
if (!map) {
|
|
1538
|
+
map = /* @__PURE__ */ new Map();
|
|
1539
|
+
let i = bStart;
|
|
1540
|
+
while (i < bEnd)
|
|
1541
|
+
map.set(b[i], i++);
|
|
1542
|
+
}
|
|
1543
|
+
const index = map.get(a[aStart]);
|
|
1544
|
+
if (index != null) {
|
|
1545
|
+
if (bStart < index && index < bEnd) {
|
|
1546
|
+
let i = aStart, sequence = 1, t;
|
|
1547
|
+
while (++i < aEnd && i < bEnd) {
|
|
1548
|
+
if ((t = map.get(a[i])) == null || t !== index + sequence)
|
|
1549
|
+
break;
|
|
1550
|
+
sequence++;
|
|
1551
|
+
}
|
|
1552
|
+
if (sequence > index - bStart) {
|
|
1553
|
+
const node = a[aStart];
|
|
1554
|
+
while (bStart < index)
|
|
1555
|
+
parentNode.insertBefore(b[bStart++], node);
|
|
1556
|
+
} else
|
|
1557
|
+
parentNode.replaceChild(b[bStart++], a[aStart++]);
|
|
1558
|
+
} else
|
|
1559
|
+
aStart++;
|
|
1560
|
+
} else
|
|
1561
|
+
a[aStart++].remove();
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
var $$EVENTS = "_$DX_DELEGATE";
|
|
1566
|
+
function render(code, element, init, options = {}) {
|
|
1567
|
+
let disposer;
|
|
1568
|
+
createRoot((dispose2) => {
|
|
1569
|
+
disposer = dispose2;
|
|
1570
|
+
element === document ? code() : insert(element, code(), element.firstChild ? null : void 0, init);
|
|
1571
|
+
}, options.owner);
|
|
1572
|
+
return () => {
|
|
1573
|
+
disposer();
|
|
1574
|
+
element.textContent = "";
|
|
1575
|
+
};
|
|
1576
|
+
}
|
|
1577
|
+
function template(html, isCE, isSVG) {
|
|
1578
|
+
let node;
|
|
1579
|
+
const create = () => {
|
|
1580
|
+
const t = document.createElement("template");
|
|
1581
|
+
t.innerHTML = html;
|
|
1582
|
+
return isSVG ? t.content.firstChild.firstChild : t.content.firstChild;
|
|
1583
|
+
};
|
|
1584
|
+
const fn = isCE ? () => untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
|
|
1585
|
+
fn.cloneNode = fn;
|
|
1586
|
+
return fn;
|
|
1587
|
+
}
|
|
1588
|
+
function delegateEvents(eventNames, document2 = window.document) {
|
|
1589
|
+
const e = document2[$$EVENTS] || (document2[$$EVENTS] = /* @__PURE__ */ new Set());
|
|
1590
|
+
for (let i = 0, l = eventNames.length; i < l; i++) {
|
|
1591
|
+
const name = eventNames[i];
|
|
1592
|
+
if (!e.has(name)) {
|
|
1593
|
+
e.add(name);
|
|
1594
|
+
document2.addEventListener(name, eventHandler);
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
function setAttribute(node, name, value) {
|
|
1599
|
+
if (sharedConfig.context)
|
|
1600
|
+
return;
|
|
1601
|
+
if (value == null)
|
|
1602
|
+
node.removeAttribute(name);
|
|
1603
|
+
else
|
|
1604
|
+
node.setAttribute(name, value);
|
|
1605
|
+
}
|
|
1606
|
+
function setAttributeNS(node, namespace, name, value) {
|
|
1607
|
+
if (sharedConfig.context)
|
|
1608
|
+
return;
|
|
1609
|
+
if (value == null)
|
|
1610
|
+
node.removeAttributeNS(namespace, name);
|
|
1611
|
+
else
|
|
1612
|
+
node.setAttributeNS(namespace, name, value);
|
|
1613
|
+
}
|
|
1614
|
+
function className(node, value) {
|
|
1615
|
+
if (sharedConfig.context)
|
|
1616
|
+
return;
|
|
1617
|
+
if (value == null)
|
|
1618
|
+
node.removeAttribute("class");
|
|
1619
|
+
else
|
|
1620
|
+
node.className = value;
|
|
1621
|
+
}
|
|
1622
|
+
function addEventListener(node, name, handler, delegate) {
|
|
1623
|
+
if (delegate) {
|
|
1624
|
+
if (Array.isArray(handler)) {
|
|
1625
|
+
node[`$$${name}`] = handler[0];
|
|
1626
|
+
node[`$$${name}Data`] = handler[1];
|
|
1627
|
+
} else
|
|
1628
|
+
node[`$$${name}`] = handler;
|
|
1629
|
+
} else if (Array.isArray(handler)) {
|
|
1630
|
+
const handlerFn = handler[0];
|
|
1631
|
+
node.addEventListener(name, handler[0] = (e) => handlerFn.call(node, handler[1], e));
|
|
1632
|
+
} else
|
|
1633
|
+
node.addEventListener(name, handler);
|
|
1634
|
+
}
|
|
1635
|
+
function classList(node, value, prev = {}) {
|
|
1636
|
+
const classKeys = Object.keys(value || {}), prevKeys = Object.keys(prev);
|
|
1637
|
+
let i, len;
|
|
1638
|
+
for (i = 0, len = prevKeys.length; i < len; i++) {
|
|
1639
|
+
const key = prevKeys[i];
|
|
1640
|
+
if (!key || key === "undefined" || value[key])
|
|
1641
|
+
continue;
|
|
1642
|
+
toggleClassKey(node, key, false);
|
|
1643
|
+
delete prev[key];
|
|
1644
|
+
}
|
|
1645
|
+
for (i = 0, len = classKeys.length; i < len; i++) {
|
|
1646
|
+
const key = classKeys[i], classValue = !!value[key];
|
|
1647
|
+
if (!key || key === "undefined" || prev[key] === classValue || !classValue)
|
|
1648
|
+
continue;
|
|
1649
|
+
toggleClassKey(node, key, true);
|
|
1650
|
+
prev[key] = classValue;
|
|
1651
|
+
}
|
|
1652
|
+
return prev;
|
|
1653
|
+
}
|
|
1654
|
+
function style(node, value, prev) {
|
|
1655
|
+
if (!value)
|
|
1656
|
+
return prev ? setAttribute(node, "style") : value;
|
|
1657
|
+
const nodeStyle = node.style;
|
|
1658
|
+
if (typeof value === "string")
|
|
1659
|
+
return nodeStyle.cssText = value;
|
|
1660
|
+
typeof prev === "string" && (nodeStyle.cssText = prev = void 0);
|
|
1661
|
+
prev || (prev = {});
|
|
1662
|
+
value || (value = {});
|
|
1663
|
+
let v, s;
|
|
1664
|
+
for (s in prev) {
|
|
1665
|
+
value[s] == null && nodeStyle.removeProperty(s);
|
|
1666
|
+
delete prev[s];
|
|
1667
|
+
}
|
|
1668
|
+
for (s in value) {
|
|
1669
|
+
v = value[s];
|
|
1670
|
+
if (v !== prev[s]) {
|
|
1671
|
+
nodeStyle.setProperty(s, v);
|
|
1672
|
+
prev[s] = v;
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
return prev;
|
|
1676
|
+
}
|
|
1677
|
+
function spread(node, props = {}, isSVG, skipChildren) {
|
|
1678
|
+
const prevProps = {};
|
|
1679
|
+
if (!skipChildren) {
|
|
1680
|
+
createRenderEffect(
|
|
1681
|
+
() => prevProps.children = insertExpression(node, props.children, prevProps.children)
|
|
1682
|
+
);
|
|
1683
|
+
}
|
|
1684
|
+
createRenderEffect(() => props.ref && props.ref(node));
|
|
1685
|
+
createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
|
|
1686
|
+
return prevProps;
|
|
1687
|
+
}
|
|
1688
|
+
function use(fn, element, arg) {
|
|
1689
|
+
return untrack(() => fn(element, arg));
|
|
1690
|
+
}
|
|
1691
|
+
function insert(parent, accessor, marker, initial) {
|
|
1692
|
+
if (marker !== void 0 && !initial)
|
|
1693
|
+
initial = [];
|
|
1694
|
+
if (typeof accessor !== "function")
|
|
1695
|
+
return insertExpression(parent, accessor, initial, marker);
|
|
1696
|
+
createRenderEffect((current) => insertExpression(parent, accessor(), current, marker), initial);
|
|
1697
|
+
}
|
|
1698
|
+
function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
|
|
1699
|
+
props || (props = {});
|
|
1700
|
+
for (const prop in prevProps) {
|
|
1701
|
+
if (!(prop in props)) {
|
|
1702
|
+
if (prop === "children")
|
|
1703
|
+
continue;
|
|
1704
|
+
prevProps[prop] = assignProp(node, prop, null, prevProps[prop], isSVG, skipRef);
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
for (const prop in props) {
|
|
1708
|
+
if (prop === "children") {
|
|
1709
|
+
if (!skipChildren)
|
|
1710
|
+
insertExpression(node, props.children);
|
|
1711
|
+
continue;
|
|
1712
|
+
}
|
|
1713
|
+
const value = props[prop];
|
|
1714
|
+
prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG, skipRef);
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
function getNextElement(template2) {
|
|
1718
|
+
let node, key;
|
|
1719
|
+
if (!sharedConfig.context || !(node = sharedConfig.registry.get(key = getHydrationKey()))) {
|
|
1720
|
+
return template2();
|
|
1721
|
+
}
|
|
1722
|
+
if (sharedConfig.completed)
|
|
1723
|
+
sharedConfig.completed.add(node);
|
|
1724
|
+
sharedConfig.registry.delete(key);
|
|
1725
|
+
return node;
|
|
1726
|
+
}
|
|
1727
|
+
function toPropertyName(name) {
|
|
1728
|
+
return name.toLowerCase().replace(/-([a-z])/g, (_, w) => w.toUpperCase());
|
|
1729
|
+
}
|
|
1730
|
+
function toggleClassKey(node, key, value) {
|
|
1731
|
+
const classNames = key.trim().split(/\s+/);
|
|
1732
|
+
for (let i = 0, nameLen = classNames.length; i < nameLen; i++)
|
|
1733
|
+
node.classList.toggle(classNames[i], value);
|
|
1734
|
+
}
|
|
1735
|
+
function assignProp(node, prop, value, prev, isSVG, skipRef) {
|
|
1736
|
+
let isCE, isProp, isChildProp, propAlias, forceProp;
|
|
1737
|
+
if (prop === "style")
|
|
1738
|
+
return style(node, value, prev);
|
|
1739
|
+
if (prop === "classList")
|
|
1740
|
+
return classList(node, value, prev);
|
|
1741
|
+
if (value === prev)
|
|
1742
|
+
return prev;
|
|
1743
|
+
if (prop === "ref") {
|
|
1744
|
+
if (!skipRef)
|
|
1745
|
+
value(node);
|
|
1746
|
+
} else if (prop.slice(0, 3) === "on:") {
|
|
1747
|
+
const e = prop.slice(3);
|
|
1748
|
+
prev && node.removeEventListener(e, prev);
|
|
1749
|
+
value && node.addEventListener(e, value);
|
|
1750
|
+
} else if (prop.slice(0, 10) === "oncapture:") {
|
|
1751
|
+
const e = prop.slice(10);
|
|
1752
|
+
prev && node.removeEventListener(e, prev, true);
|
|
1753
|
+
value && node.addEventListener(e, value, true);
|
|
1754
|
+
} else if (prop.slice(0, 2) === "on") {
|
|
1755
|
+
const name = prop.slice(2).toLowerCase();
|
|
1756
|
+
const delegate = DelegatedEvents.has(name);
|
|
1757
|
+
if (!delegate && prev) {
|
|
1758
|
+
const h = Array.isArray(prev) ? prev[0] : prev;
|
|
1759
|
+
node.removeEventListener(name, h);
|
|
1760
|
+
}
|
|
1761
|
+
if (delegate || value) {
|
|
1762
|
+
addEventListener(node, name, value, delegate);
|
|
1763
|
+
delegate && delegateEvents([name]);
|
|
1764
|
+
}
|
|
1765
|
+
} else if (prop.slice(0, 5) === "attr:") {
|
|
1766
|
+
setAttribute(node, prop.slice(5), value);
|
|
1767
|
+
} else if ((forceProp = prop.slice(0, 5) === "prop:") || (isChildProp = ChildProperties.has(prop)) || !isSVG && ((propAlias = getPropAlias(prop, node.tagName)) || (isProp = Properties.has(prop))) || (isCE = node.nodeName.includes("-"))) {
|
|
1768
|
+
if (forceProp) {
|
|
1769
|
+
prop = prop.slice(5);
|
|
1770
|
+
isProp = true;
|
|
1771
|
+
} else if (sharedConfig.context)
|
|
1772
|
+
return value;
|
|
1773
|
+
if (prop === "class" || prop === "className")
|
|
1774
|
+
className(node, value);
|
|
1775
|
+
else if (isCE && !isProp && !isChildProp)
|
|
1776
|
+
node[toPropertyName(prop)] = value;
|
|
1777
|
+
else
|
|
1778
|
+
node[propAlias || prop] = value;
|
|
1779
|
+
} else {
|
|
1780
|
+
const ns = isSVG && prop.indexOf(":") > -1 && SVGNamespace[prop.split(":")[0]];
|
|
1781
|
+
if (ns)
|
|
1782
|
+
setAttributeNS(node, ns, prop, value);
|
|
1783
|
+
else
|
|
1784
|
+
setAttribute(node, Aliases[prop] || prop, value);
|
|
1785
|
+
}
|
|
1786
|
+
return value;
|
|
1787
|
+
}
|
|
1788
|
+
function eventHandler(e) {
|
|
1789
|
+
const key = `$$${e.type}`;
|
|
1790
|
+
let node = e.composedPath && e.composedPath()[0] || e.target;
|
|
1791
|
+
if (e.target !== node) {
|
|
1792
|
+
Object.defineProperty(e, "target", {
|
|
1793
|
+
configurable: true,
|
|
1794
|
+
value: node
|
|
1795
|
+
});
|
|
1796
|
+
}
|
|
1797
|
+
Object.defineProperty(e, "currentTarget", {
|
|
1798
|
+
configurable: true,
|
|
1799
|
+
get() {
|
|
1800
|
+
return node || document;
|
|
1801
|
+
}
|
|
1802
|
+
});
|
|
1803
|
+
if (sharedConfig.registry && !sharedConfig.done)
|
|
1804
|
+
sharedConfig.done = _$HY.done = true;
|
|
1805
|
+
while (node) {
|
|
1806
|
+
const handler = node[key];
|
|
1807
|
+
if (handler && !node.disabled) {
|
|
1808
|
+
const data = node[`${key}Data`];
|
|
1809
|
+
data !== void 0 ? handler.call(node, data, e) : handler.call(node, e);
|
|
1810
|
+
if (e.cancelBubble)
|
|
1811
|
+
return;
|
|
1812
|
+
}
|
|
1813
|
+
node = node._$host || node.parentNode || node.host;
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
1817
|
+
if (sharedConfig.context) {
|
|
1818
|
+
!current && (current = [...parent.childNodes]);
|
|
1819
|
+
let cleaned = [];
|
|
1820
|
+
for (let i = 0; i < current.length; i++) {
|
|
1821
|
+
const node = current[i];
|
|
1822
|
+
if (node.nodeType === 8 && node.data.slice(0, 2) === "!$")
|
|
1823
|
+
node.remove();
|
|
1824
|
+
else
|
|
1825
|
+
cleaned.push(node);
|
|
1826
|
+
}
|
|
1827
|
+
current = cleaned;
|
|
1828
|
+
}
|
|
1829
|
+
while (typeof current === "function")
|
|
1830
|
+
current = current();
|
|
1831
|
+
if (value === current)
|
|
1832
|
+
return current;
|
|
1833
|
+
const t = typeof value, multi = marker !== void 0;
|
|
1834
|
+
parent = multi && current[0] && current[0].parentNode || parent;
|
|
1835
|
+
if (t === "string" || t === "number") {
|
|
1836
|
+
if (sharedConfig.context)
|
|
1837
|
+
return current;
|
|
1838
|
+
if (t === "number")
|
|
1839
|
+
value = value.toString();
|
|
1840
|
+
if (multi) {
|
|
1841
|
+
let node = current[0];
|
|
1842
|
+
if (node && node.nodeType === 3) {
|
|
1843
|
+
node.data = value;
|
|
1844
|
+
} else
|
|
1845
|
+
node = document.createTextNode(value);
|
|
1846
|
+
current = cleanChildren(parent, current, marker, node);
|
|
1847
|
+
} else {
|
|
1848
|
+
if (current !== "" && typeof current === "string") {
|
|
1849
|
+
current = parent.firstChild.data = value;
|
|
1850
|
+
} else
|
|
1851
|
+
current = parent.textContent = value;
|
|
1852
|
+
}
|
|
1853
|
+
} else if (value == null || t === "boolean") {
|
|
1854
|
+
if (sharedConfig.context)
|
|
1855
|
+
return current;
|
|
1856
|
+
current = cleanChildren(parent, current, marker);
|
|
1857
|
+
} else if (t === "function") {
|
|
1858
|
+
createRenderEffect(() => {
|
|
1859
|
+
let v = value();
|
|
1860
|
+
while (typeof v === "function")
|
|
1861
|
+
v = v();
|
|
1862
|
+
current = insertExpression(parent, v, current, marker);
|
|
1863
|
+
});
|
|
1864
|
+
return () => current;
|
|
1865
|
+
} else if (Array.isArray(value)) {
|
|
1866
|
+
const array = [];
|
|
1867
|
+
const currentArray = current && Array.isArray(current);
|
|
1868
|
+
if (normalizeIncomingArray(array, value, current, unwrapArray)) {
|
|
1869
|
+
createRenderEffect(() => current = insertExpression(parent, array, current, marker, true));
|
|
1870
|
+
return () => current;
|
|
1871
|
+
}
|
|
1872
|
+
if (sharedConfig.context) {
|
|
1873
|
+
if (!array.length)
|
|
1874
|
+
return current;
|
|
1875
|
+
if (marker === void 0)
|
|
1876
|
+
return [...parent.childNodes];
|
|
1877
|
+
let node = array[0];
|
|
1878
|
+
let nodes = [node];
|
|
1879
|
+
while ((node = node.nextSibling) !== marker)
|
|
1880
|
+
nodes.push(node);
|
|
1881
|
+
return current = nodes;
|
|
1882
|
+
}
|
|
1883
|
+
if (array.length === 0) {
|
|
1884
|
+
current = cleanChildren(parent, current, marker);
|
|
1885
|
+
if (multi)
|
|
1886
|
+
return current;
|
|
1887
|
+
} else if (currentArray) {
|
|
1888
|
+
if (current.length === 0) {
|
|
1889
|
+
appendNodes(parent, array, marker);
|
|
1890
|
+
} else
|
|
1891
|
+
reconcileArrays(parent, current, array);
|
|
1892
|
+
} else {
|
|
1893
|
+
current && cleanChildren(parent);
|
|
1894
|
+
appendNodes(parent, array);
|
|
1895
|
+
}
|
|
1896
|
+
current = array;
|
|
1897
|
+
} else if (value.nodeType) {
|
|
1898
|
+
if (sharedConfig.context && value.parentNode)
|
|
1899
|
+
return current = multi ? [value] : value;
|
|
1900
|
+
if (Array.isArray(current)) {
|
|
1901
|
+
if (multi)
|
|
1902
|
+
return current = cleanChildren(parent, current, marker, value);
|
|
1903
|
+
cleanChildren(parent, current, null, value);
|
|
1904
|
+
} else if (current == null || current === "" || !parent.firstChild) {
|
|
1905
|
+
parent.appendChild(value);
|
|
1906
|
+
} else
|
|
1907
|
+
parent.replaceChild(value, parent.firstChild);
|
|
1908
|
+
current = value;
|
|
1909
|
+
} else
|
|
1910
|
+
;
|
|
1911
|
+
return current;
|
|
1912
|
+
}
|
|
1913
|
+
function normalizeIncomingArray(normalized, array, current, unwrap) {
|
|
1914
|
+
let dynamic = false;
|
|
1915
|
+
for (let i = 0, len = array.length; i < len; i++) {
|
|
1916
|
+
let item = array[i], prev = current && current[i], t;
|
|
1917
|
+
if (item == null || item === true || item === false)
|
|
1918
|
+
;
|
|
1919
|
+
else if ((t = typeof item) === "object" && item.nodeType) {
|
|
1920
|
+
normalized.push(item);
|
|
1921
|
+
} else if (Array.isArray(item)) {
|
|
1922
|
+
dynamic = normalizeIncomingArray(normalized, item, prev) || dynamic;
|
|
1923
|
+
} else if (t === "function") {
|
|
1924
|
+
if (unwrap) {
|
|
1925
|
+
while (typeof item === "function")
|
|
1926
|
+
item = item();
|
|
1927
|
+
dynamic = normalizeIncomingArray(
|
|
1928
|
+
normalized,
|
|
1929
|
+
Array.isArray(item) ? item : [item],
|
|
1930
|
+
Array.isArray(prev) ? prev : [prev]
|
|
1931
|
+
) || dynamic;
|
|
1932
|
+
} else {
|
|
1933
|
+
normalized.push(item);
|
|
1934
|
+
dynamic = true;
|
|
1935
|
+
}
|
|
1936
|
+
} else {
|
|
1937
|
+
const value = String(item);
|
|
1938
|
+
if (prev && prev.nodeType === 3 && prev.data === value)
|
|
1939
|
+
normalized.push(prev);
|
|
1940
|
+
else
|
|
1941
|
+
normalized.push(document.createTextNode(value));
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
return dynamic;
|
|
1945
|
+
}
|
|
1946
|
+
function appendNodes(parent, array, marker = null) {
|
|
1947
|
+
for (let i = 0, len = array.length; i < len; i++)
|
|
1948
|
+
parent.insertBefore(array[i], marker);
|
|
1949
|
+
}
|
|
1950
|
+
function cleanChildren(parent, current, marker, replacement) {
|
|
1951
|
+
if (marker === void 0)
|
|
1952
|
+
return parent.textContent = "";
|
|
1953
|
+
const node = replacement || document.createTextNode("");
|
|
1954
|
+
if (current.length) {
|
|
1955
|
+
let inserted = false;
|
|
1956
|
+
for (let i = current.length - 1; i >= 0; i--) {
|
|
1957
|
+
const el = current[i];
|
|
1958
|
+
if (node !== el) {
|
|
1959
|
+
const isParent = el.parentNode === parent;
|
|
1960
|
+
if (!inserted && !i)
|
|
1961
|
+
isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);
|
|
1962
|
+
else
|
|
1963
|
+
isParent && el.remove();
|
|
1964
|
+
} else
|
|
1965
|
+
inserted = true;
|
|
1966
|
+
}
|
|
1967
|
+
} else
|
|
1968
|
+
parent.insertBefore(node, marker);
|
|
1969
|
+
return [node];
|
|
1970
|
+
}
|
|
1971
|
+
function getHydrationKey() {
|
|
1972
|
+
const hydrate = sharedConfig.context;
|
|
1973
|
+
return `${hydrate.id}${hydrate.count++}`;
|
|
1974
|
+
}
|
|
1975
|
+
var isServer = false;
|
|
1976
|
+
var SVG_NAMESPACE = "http://www.w3.org/2000/svg";
|
|
1977
|
+
function createElement(tagName, isSVG = false) {
|
|
1978
|
+
return isSVG ? document.createElementNS(SVG_NAMESPACE, tagName) : document.createElement(tagName);
|
|
1979
|
+
}
|
|
1980
|
+
function Portal(props) {
|
|
1981
|
+
const { useShadow } = props, marker = document.createTextNode(""), mount = () => props.mount || document.body, owner = getOwner();
|
|
1982
|
+
let content;
|
|
1983
|
+
let hydrating = !!sharedConfig.context;
|
|
1984
|
+
createEffect(
|
|
1985
|
+
() => {
|
|
1986
|
+
if (hydrating)
|
|
1987
|
+
getOwner().user = hydrating = false;
|
|
1988
|
+
content || (content = runWithOwner(owner, () => createMemo(() => props.children)));
|
|
1989
|
+
const el = mount();
|
|
1990
|
+
if (el instanceof HTMLHeadElement) {
|
|
1991
|
+
const [clean, setClean] = createSignal(false);
|
|
1992
|
+
const cleanup = () => setClean(true);
|
|
1993
|
+
createRoot((dispose2) => insert(el, () => !clean() ? content() : dispose2(), null));
|
|
1994
|
+
onCleanup(cleanup);
|
|
1995
|
+
} else {
|
|
1996
|
+
const container = createElement(props.isSVG ? "g" : "div", props.isSVG), renderRoot = useShadow && container.attachShadow ? container.attachShadow({
|
|
1997
|
+
mode: "open"
|
|
1998
|
+
}) : container;
|
|
1999
|
+
Object.defineProperty(container, "_$host", {
|
|
2000
|
+
get() {
|
|
2001
|
+
return marker.parentNode;
|
|
2002
|
+
},
|
|
2003
|
+
configurable: true
|
|
2004
|
+
});
|
|
2005
|
+
insert(renderRoot, content);
|
|
2006
|
+
el.appendChild(container);
|
|
2007
|
+
props.ref && props.ref(container);
|
|
2008
|
+
onCleanup(() => el.removeChild(container));
|
|
2009
|
+
}
|
|
2010
|
+
},
|
|
2011
|
+
void 0,
|
|
2012
|
+
{
|
|
2013
|
+
render: !hydrating
|
|
2014
|
+
}
|
|
2015
|
+
);
|
|
2016
|
+
return marker;
|
|
2017
|
+
}
|
|
2018
|
+
function Dynamic(props) {
|
|
2019
|
+
const [p, others] = splitProps(props, ["component"]);
|
|
2020
|
+
const cached = createMemo(() => p.component);
|
|
2021
|
+
return createMemo(() => {
|
|
2022
|
+
const component = cached();
|
|
2023
|
+
switch (typeof component) {
|
|
2024
|
+
case "function":
|
|
2025
|
+
return untrack(() => component(others));
|
|
2026
|
+
case "string":
|
|
2027
|
+
const isSvg = SVGElements.has(component);
|
|
2028
|
+
const el = sharedConfig.context ? getNextElement() : createElement(component, isSvg);
|
|
2029
|
+
spread(el, others, isSvg);
|
|
2030
|
+
return el;
|
|
2031
|
+
}
|
|
2032
|
+
});
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
// ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/double-indexed-kv.js
|
|
2036
|
+
var DoubleIndexedKV = (
|
|
2037
|
+
/** @class */
|
|
2038
|
+
function() {
|
|
2039
|
+
function DoubleIndexedKV2() {
|
|
2040
|
+
this.keyToValue = /* @__PURE__ */ new Map();
|
|
2041
|
+
this.valueToKey = /* @__PURE__ */ new Map();
|
|
2042
|
+
}
|
|
2043
|
+
DoubleIndexedKV2.prototype.set = function(key, value) {
|
|
2044
|
+
this.keyToValue.set(key, value);
|
|
2045
|
+
this.valueToKey.set(value, key);
|
|
2046
|
+
};
|
|
2047
|
+
DoubleIndexedKV2.prototype.getByKey = function(key) {
|
|
2048
|
+
return this.keyToValue.get(key);
|
|
2049
|
+
};
|
|
2050
|
+
DoubleIndexedKV2.prototype.getByValue = function(value) {
|
|
2051
|
+
return this.valueToKey.get(value);
|
|
2052
|
+
};
|
|
2053
|
+
DoubleIndexedKV2.prototype.clear = function() {
|
|
2054
|
+
this.keyToValue.clear();
|
|
2055
|
+
this.valueToKey.clear();
|
|
2056
|
+
};
|
|
2057
|
+
return DoubleIndexedKV2;
|
|
2058
|
+
}()
|
|
2059
|
+
);
|
|
2060
|
+
|
|
2061
|
+
// ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/registry.js
|
|
2062
|
+
var Registry = (
|
|
2063
|
+
/** @class */
|
|
2064
|
+
function() {
|
|
2065
|
+
function Registry2(generateIdentifier) {
|
|
2066
|
+
this.generateIdentifier = generateIdentifier;
|
|
2067
|
+
this.kv = new DoubleIndexedKV();
|
|
2068
|
+
}
|
|
2069
|
+
Registry2.prototype.register = function(value, identifier) {
|
|
2070
|
+
if (this.kv.getByValue(value)) {
|
|
2071
|
+
return;
|
|
2072
|
+
}
|
|
2073
|
+
if (!identifier) {
|
|
2074
|
+
identifier = this.generateIdentifier(value);
|
|
2075
|
+
}
|
|
2076
|
+
this.kv.set(identifier, value);
|
|
2077
|
+
};
|
|
2078
|
+
Registry2.prototype.clear = function() {
|
|
2079
|
+
this.kv.clear();
|
|
2080
|
+
};
|
|
2081
|
+
Registry2.prototype.getIdentifier = function(value) {
|
|
2082
|
+
return this.kv.getByValue(value);
|
|
2083
|
+
};
|
|
2084
|
+
Registry2.prototype.getValue = function(identifier) {
|
|
2085
|
+
return this.kv.getByKey(identifier);
|
|
2086
|
+
};
|
|
2087
|
+
return Registry2;
|
|
2088
|
+
}()
|
|
2089
|
+
);
|
|
2090
|
+
|
|
2091
|
+
// ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/class-registry.js
|
|
2092
|
+
var __extends = function() {
|
|
2093
|
+
var extendStatics = function(d, b) {
|
|
2094
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
2095
|
+
d2.__proto__ = b2;
|
|
2096
|
+
} || function(d2, b2) {
|
|
2097
|
+
for (var p in b2)
|
|
2098
|
+
if (Object.prototype.hasOwnProperty.call(b2, p))
|
|
2099
|
+
d2[p] = b2[p];
|
|
2100
|
+
};
|
|
2101
|
+
return extendStatics(d, b);
|
|
2102
|
+
};
|
|
2103
|
+
return function(d, b) {
|
|
2104
|
+
if (typeof b !== "function" && b !== null)
|
|
2105
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
2106
|
+
extendStatics(d, b);
|
|
2107
|
+
function __() {
|
|
2108
|
+
this.constructor = d;
|
|
2109
|
+
}
|
|
2110
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
2111
|
+
};
|
|
2112
|
+
}();
|
|
2113
|
+
var ClassRegistry = (
|
|
2114
|
+
/** @class */
|
|
2115
|
+
function(_super) {
|
|
2116
|
+
__extends(ClassRegistry2, _super);
|
|
2117
|
+
function ClassRegistry2() {
|
|
2118
|
+
var _this = _super.call(this, function(c) {
|
|
2119
|
+
return c.name;
|
|
2120
|
+
}) || this;
|
|
2121
|
+
_this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
2122
|
+
return _this;
|
|
2123
|
+
}
|
|
2124
|
+
ClassRegistry2.prototype.register = function(value, options) {
|
|
2125
|
+
if (typeof options === "object") {
|
|
2126
|
+
if (options.allowProps) {
|
|
2127
|
+
this.classToAllowedProps.set(value, options.allowProps);
|
|
2128
|
+
}
|
|
2129
|
+
_super.prototype.register.call(this, value, options.identifier);
|
|
2130
|
+
} else {
|
|
2131
|
+
_super.prototype.register.call(this, value, options);
|
|
2132
|
+
}
|
|
2133
|
+
};
|
|
2134
|
+
ClassRegistry2.prototype.getAllowedProps = function(value) {
|
|
2135
|
+
return this.classToAllowedProps.get(value);
|
|
2136
|
+
};
|
|
2137
|
+
return ClassRegistry2;
|
|
2138
|
+
}(Registry)
|
|
2139
|
+
);
|
|
2140
|
+
|
|
2141
|
+
// ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/util.js
|
|
2142
|
+
var __read = function(o, n) {
|
|
2143
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
2144
|
+
if (!m)
|
|
2145
|
+
return o;
|
|
2146
|
+
var i = m.call(o), r, ar = [], e;
|
|
2147
|
+
try {
|
|
2148
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
2149
|
+
ar.push(r.value);
|
|
2150
|
+
} catch (error) {
|
|
2151
|
+
e = { error };
|
|
2152
|
+
} finally {
|
|
2153
|
+
try {
|
|
2154
|
+
if (r && !r.done && (m = i["return"]))
|
|
2155
|
+
m.call(i);
|
|
2156
|
+
} finally {
|
|
2157
|
+
if (e)
|
|
2158
|
+
throw e.error;
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
return ar;
|
|
2162
|
+
};
|
|
2163
|
+
function valuesOfObj(record) {
|
|
2164
|
+
if ("values" in Object) {
|
|
2165
|
+
return Object.values(record);
|
|
2166
|
+
}
|
|
2167
|
+
var values = [];
|
|
2168
|
+
for (var key in record) {
|
|
2169
|
+
if (record.hasOwnProperty(key)) {
|
|
2170
|
+
values.push(record[key]);
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
return values;
|
|
2174
|
+
}
|
|
2175
|
+
function find(record, predicate) {
|
|
2176
|
+
var values = valuesOfObj(record);
|
|
2177
|
+
if ("find" in values) {
|
|
2178
|
+
return values.find(predicate);
|
|
2179
|
+
}
|
|
2180
|
+
var valuesNotNever = values;
|
|
2181
|
+
for (var i = 0; i < valuesNotNever.length; i++) {
|
|
2182
|
+
var value = valuesNotNever[i];
|
|
2183
|
+
if (predicate(value)) {
|
|
2184
|
+
return value;
|
|
2185
|
+
}
|
|
2186
|
+
}
|
|
2187
|
+
return void 0;
|
|
2188
|
+
}
|
|
2189
|
+
function forEach(record, run) {
|
|
2190
|
+
Object.entries(record).forEach(function(_a) {
|
|
2191
|
+
var _b = __read(_a, 2), key = _b[0], value = _b[1];
|
|
2192
|
+
return run(value, key);
|
|
2193
|
+
});
|
|
2194
|
+
}
|
|
2195
|
+
function includes(arr, value) {
|
|
2196
|
+
return arr.indexOf(value) !== -1;
|
|
2197
|
+
}
|
|
2198
|
+
function findArr(record, predicate) {
|
|
2199
|
+
for (var i = 0; i < record.length; i++) {
|
|
2200
|
+
var value = record[i];
|
|
2201
|
+
if (predicate(value)) {
|
|
2202
|
+
return value;
|
|
2203
|
+
}
|
|
2204
|
+
}
|
|
2205
|
+
return void 0;
|
|
2206
|
+
}
|
|
2207
|
+
|
|
2208
|
+
// ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/custom-transformer-registry.js
|
|
2209
|
+
var CustomTransformerRegistry = (
|
|
2210
|
+
/** @class */
|
|
2211
|
+
function() {
|
|
2212
|
+
function CustomTransformerRegistry2() {
|
|
2213
|
+
this.transfomers = {};
|
|
2214
|
+
}
|
|
2215
|
+
CustomTransformerRegistry2.prototype.register = function(transformer) {
|
|
2216
|
+
this.transfomers[transformer.name] = transformer;
|
|
2217
|
+
};
|
|
2218
|
+
CustomTransformerRegistry2.prototype.findApplicable = function(v) {
|
|
2219
|
+
return find(this.transfomers, function(transformer) {
|
|
2220
|
+
return transformer.isApplicable(v);
|
|
2221
|
+
});
|
|
2222
|
+
};
|
|
2223
|
+
CustomTransformerRegistry2.prototype.findByName = function(name) {
|
|
2224
|
+
return this.transfomers[name];
|
|
2225
|
+
};
|
|
2226
|
+
return CustomTransformerRegistry2;
|
|
2227
|
+
}()
|
|
2228
|
+
);
|
|
2229
|
+
|
|
2230
|
+
// ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/is.js
|
|
2231
|
+
var getType = function(payload) {
|
|
2232
|
+
return Object.prototype.toString.call(payload).slice(8, -1);
|
|
2233
|
+
};
|
|
2234
|
+
var isUndefined = function(payload) {
|
|
2235
|
+
return typeof payload === "undefined";
|
|
2236
|
+
};
|
|
2237
|
+
var isNull = function(payload) {
|
|
2238
|
+
return payload === null;
|
|
2239
|
+
};
|
|
2240
|
+
var isPlainObject = function(payload) {
|
|
2241
|
+
if (typeof payload !== "object" || payload === null)
|
|
2242
|
+
return false;
|
|
2243
|
+
if (payload === Object.prototype)
|
|
2244
|
+
return false;
|
|
2245
|
+
if (Object.getPrototypeOf(payload) === null)
|
|
2246
|
+
return true;
|
|
2247
|
+
return Object.getPrototypeOf(payload) === Object.prototype;
|
|
2248
|
+
};
|
|
2249
|
+
var isEmptyObject = function(payload) {
|
|
2250
|
+
return isPlainObject(payload) && Object.keys(payload).length === 0;
|
|
2251
|
+
};
|
|
2252
|
+
var isArray = function(payload) {
|
|
2253
|
+
return Array.isArray(payload);
|
|
2254
|
+
};
|
|
2255
|
+
var isString = function(payload) {
|
|
2256
|
+
return typeof payload === "string";
|
|
2257
|
+
};
|
|
2258
|
+
var isNumber = function(payload) {
|
|
2259
|
+
return typeof payload === "number" && !isNaN(payload);
|
|
2260
|
+
};
|
|
2261
|
+
var isBoolean = function(payload) {
|
|
2262
|
+
return typeof payload === "boolean";
|
|
2263
|
+
};
|
|
2264
|
+
var isRegExp = function(payload) {
|
|
2265
|
+
return payload instanceof RegExp;
|
|
2266
|
+
};
|
|
2267
|
+
var isMap = function(payload) {
|
|
2268
|
+
return payload instanceof Map;
|
|
2269
|
+
};
|
|
2270
|
+
var isSet = function(payload) {
|
|
2271
|
+
return payload instanceof Set;
|
|
2272
|
+
};
|
|
2273
|
+
var isSymbol = function(payload) {
|
|
2274
|
+
return getType(payload) === "Symbol";
|
|
2275
|
+
};
|
|
2276
|
+
var isDate = function(payload) {
|
|
2277
|
+
return payload instanceof Date && !isNaN(payload.valueOf());
|
|
2278
|
+
};
|
|
2279
|
+
var isError = function(payload) {
|
|
2280
|
+
return payload instanceof Error;
|
|
2281
|
+
};
|
|
2282
|
+
var isNaNValue = function(payload) {
|
|
2283
|
+
return typeof payload === "number" && isNaN(payload);
|
|
2284
|
+
};
|
|
2285
|
+
var isPrimitive = function(payload) {
|
|
2286
|
+
return isBoolean(payload) || isNull(payload) || isUndefined(payload) || isNumber(payload) || isString(payload) || isSymbol(payload);
|
|
2287
|
+
};
|
|
2288
|
+
var isBigint = function(payload) {
|
|
2289
|
+
return typeof payload === "bigint";
|
|
2290
|
+
};
|
|
2291
|
+
var isInfinite = function(payload) {
|
|
2292
|
+
return payload === Infinity || payload === -Infinity;
|
|
2293
|
+
};
|
|
2294
|
+
var isTypedArray = function(payload) {
|
|
2295
|
+
return ArrayBuffer.isView(payload) && !(payload instanceof DataView);
|
|
2296
|
+
};
|
|
2297
|
+
var isURL = function(payload) {
|
|
2298
|
+
return payload instanceof URL;
|
|
2299
|
+
};
|
|
2300
|
+
|
|
2301
|
+
// ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/pathstringifier.js
|
|
2302
|
+
var escapeKey = function(key) {
|
|
2303
|
+
return key.replace(/\./g, "\\.");
|
|
2304
|
+
};
|
|
2305
|
+
var stringifyPath = function(path) {
|
|
2306
|
+
return path.map(String).map(escapeKey).join(".");
|
|
2307
|
+
};
|
|
2308
|
+
var parsePath = function(string) {
|
|
2309
|
+
var result = [];
|
|
2310
|
+
var segment = "";
|
|
2311
|
+
for (var i = 0; i < string.length; i++) {
|
|
2312
|
+
var char = string.charAt(i);
|
|
2313
|
+
var isEscapedDot = char === "\\" && string.charAt(i + 1) === ".";
|
|
2314
|
+
if (isEscapedDot) {
|
|
2315
|
+
segment += ".";
|
|
2316
|
+
i++;
|
|
2317
|
+
continue;
|
|
2318
|
+
}
|
|
2319
|
+
var isEndOfSegment = char === ".";
|
|
2320
|
+
if (isEndOfSegment) {
|
|
2321
|
+
result.push(segment);
|
|
2322
|
+
segment = "";
|
|
2323
|
+
continue;
|
|
2324
|
+
}
|
|
2325
|
+
segment += char;
|
|
2326
|
+
}
|
|
2327
|
+
var lastSegment = segment;
|
|
2328
|
+
result.push(lastSegment);
|
|
2329
|
+
return result;
|
|
2330
|
+
};
|
|
2331
|
+
|
|
2332
|
+
// ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/transformer.js
|
|
2333
|
+
var __assign = function() {
|
|
2334
|
+
__assign = Object.assign || function(t) {
|
|
2335
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
2336
|
+
s = arguments[i];
|
|
2337
|
+
for (var p in s)
|
|
2338
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
2339
|
+
t[p] = s[p];
|
|
2340
|
+
}
|
|
2341
|
+
return t;
|
|
2342
|
+
};
|
|
2343
|
+
return __assign.apply(this, arguments);
|
|
2344
|
+
};
|
|
2345
|
+
var __read2 = function(o, n) {
|
|
2346
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
2347
|
+
if (!m)
|
|
2348
|
+
return o;
|
|
2349
|
+
var i = m.call(o), r, ar = [], e;
|
|
2350
|
+
try {
|
|
2351
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
2352
|
+
ar.push(r.value);
|
|
2353
|
+
} catch (error) {
|
|
2354
|
+
e = { error };
|
|
2355
|
+
} finally {
|
|
2356
|
+
try {
|
|
2357
|
+
if (r && !r.done && (m = i["return"]))
|
|
2358
|
+
m.call(i);
|
|
2359
|
+
} finally {
|
|
2360
|
+
if (e)
|
|
2361
|
+
throw e.error;
|
|
2362
|
+
}
|
|
2363
|
+
}
|
|
2364
|
+
return ar;
|
|
2365
|
+
};
|
|
2366
|
+
var __spreadArray = function(to, from) {
|
|
2367
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
2368
|
+
to[j] = from[i];
|
|
2369
|
+
return to;
|
|
2370
|
+
};
|
|
2371
|
+
function simpleTransformation(isApplicable, annotation, transform, untransform) {
|
|
2372
|
+
return {
|
|
2373
|
+
isApplicable,
|
|
2374
|
+
annotation,
|
|
2375
|
+
transform,
|
|
2376
|
+
untransform
|
|
2377
|
+
};
|
|
2378
|
+
}
|
|
2379
|
+
var simpleRules = [
|
|
2380
|
+
simpleTransformation(isUndefined, "undefined", function() {
|
|
2381
|
+
return null;
|
|
2382
|
+
}, function() {
|
|
2383
|
+
return void 0;
|
|
2384
|
+
}),
|
|
2385
|
+
simpleTransformation(isBigint, "bigint", function(v) {
|
|
2386
|
+
return v.toString();
|
|
2387
|
+
}, function(v) {
|
|
2388
|
+
if (typeof BigInt !== "undefined") {
|
|
2389
|
+
return BigInt(v);
|
|
2390
|
+
}
|
|
2391
|
+
console.error("Please add a BigInt polyfill.");
|
|
2392
|
+
return v;
|
|
2393
|
+
}),
|
|
2394
|
+
simpleTransformation(isDate, "Date", function(v) {
|
|
2395
|
+
return v.toISOString();
|
|
2396
|
+
}, function(v) {
|
|
2397
|
+
return new Date(v);
|
|
2398
|
+
}),
|
|
2399
|
+
simpleTransformation(isError, "Error", function(v, superJson) {
|
|
2400
|
+
var baseError = {
|
|
2401
|
+
name: v.name,
|
|
2402
|
+
message: v.message
|
|
2403
|
+
};
|
|
2404
|
+
superJson.allowedErrorProps.forEach(function(prop) {
|
|
2405
|
+
baseError[prop] = v[prop];
|
|
2406
|
+
});
|
|
2407
|
+
return baseError;
|
|
2408
|
+
}, function(v, superJson) {
|
|
2409
|
+
var e = new Error(v.message);
|
|
2410
|
+
e.name = v.name;
|
|
2411
|
+
e.stack = v.stack;
|
|
2412
|
+
superJson.allowedErrorProps.forEach(function(prop) {
|
|
2413
|
+
e[prop] = v[prop];
|
|
2414
|
+
});
|
|
2415
|
+
return e;
|
|
2416
|
+
}),
|
|
2417
|
+
simpleTransformation(isRegExp, "regexp", function(v) {
|
|
2418
|
+
return "" + v;
|
|
2419
|
+
}, function(regex) {
|
|
2420
|
+
var body = regex.slice(1, regex.lastIndexOf("/"));
|
|
2421
|
+
var flags = regex.slice(regex.lastIndexOf("/") + 1);
|
|
2422
|
+
return new RegExp(body, flags);
|
|
2423
|
+
}),
|
|
2424
|
+
simpleTransformation(
|
|
2425
|
+
isSet,
|
|
2426
|
+
"set",
|
|
2427
|
+
// (sets only exist in es6+)
|
|
2428
|
+
// eslint-disable-next-line es5/no-es6-methods
|
|
2429
|
+
function(v) {
|
|
2430
|
+
return __spreadArray([], __read2(v.values()));
|
|
2431
|
+
},
|
|
2432
|
+
function(v) {
|
|
2433
|
+
return new Set(v);
|
|
2434
|
+
}
|
|
2435
|
+
),
|
|
2436
|
+
simpleTransformation(isMap, "map", function(v) {
|
|
2437
|
+
return __spreadArray([], __read2(v.entries()));
|
|
2438
|
+
}, function(v) {
|
|
2439
|
+
return new Map(v);
|
|
2440
|
+
}),
|
|
2441
|
+
simpleTransformation(function(v) {
|
|
2442
|
+
return isNaNValue(v) || isInfinite(v);
|
|
2443
|
+
}, "number", function(v) {
|
|
2444
|
+
if (isNaNValue(v)) {
|
|
2445
|
+
return "NaN";
|
|
2446
|
+
}
|
|
2447
|
+
if (v > 0) {
|
|
2448
|
+
return "Infinity";
|
|
2449
|
+
} else {
|
|
2450
|
+
return "-Infinity";
|
|
2451
|
+
}
|
|
2452
|
+
}, Number),
|
|
2453
|
+
simpleTransformation(function(v) {
|
|
2454
|
+
return v === 0 && 1 / v === -Infinity;
|
|
2455
|
+
}, "number", function() {
|
|
2456
|
+
return "-0";
|
|
2457
|
+
}, Number),
|
|
2458
|
+
simpleTransformation(isURL, "URL", function(v) {
|
|
2459
|
+
return v.toString();
|
|
2460
|
+
}, function(v) {
|
|
2461
|
+
return new URL(v);
|
|
2462
|
+
})
|
|
2463
|
+
];
|
|
2464
|
+
function compositeTransformation(isApplicable, annotation, transform, untransform) {
|
|
2465
|
+
return {
|
|
2466
|
+
isApplicable,
|
|
2467
|
+
annotation,
|
|
2468
|
+
transform,
|
|
2469
|
+
untransform
|
|
2470
|
+
};
|
|
2471
|
+
}
|
|
2472
|
+
var symbolRule = compositeTransformation(function(s, superJson) {
|
|
2473
|
+
if (isSymbol(s)) {
|
|
2474
|
+
var isRegistered = !!superJson.symbolRegistry.getIdentifier(s);
|
|
2475
|
+
return isRegistered;
|
|
2476
|
+
}
|
|
2477
|
+
return false;
|
|
2478
|
+
}, function(s, superJson) {
|
|
2479
|
+
var identifier = superJson.symbolRegistry.getIdentifier(s);
|
|
2480
|
+
return ["symbol", identifier];
|
|
2481
|
+
}, function(v) {
|
|
2482
|
+
return v.description;
|
|
2483
|
+
}, function(_, a, superJson) {
|
|
2484
|
+
var value = superJson.symbolRegistry.getValue(a[1]);
|
|
2485
|
+
if (!value) {
|
|
2486
|
+
throw new Error("Trying to deserialize unknown symbol");
|
|
2487
|
+
}
|
|
2488
|
+
return value;
|
|
2489
|
+
});
|
|
2490
|
+
var constructorToName = [
|
|
2491
|
+
Int8Array,
|
|
2492
|
+
Uint8Array,
|
|
2493
|
+
Int16Array,
|
|
2494
|
+
Uint16Array,
|
|
2495
|
+
Int32Array,
|
|
2496
|
+
Uint32Array,
|
|
2497
|
+
Float32Array,
|
|
2498
|
+
Float64Array,
|
|
2499
|
+
Uint8ClampedArray
|
|
2500
|
+
].reduce(function(obj, ctor) {
|
|
2501
|
+
obj[ctor.name] = ctor;
|
|
2502
|
+
return obj;
|
|
2503
|
+
}, {});
|
|
2504
|
+
var typedArrayRule = compositeTransformation(isTypedArray, function(v) {
|
|
2505
|
+
return ["typed-array", v.constructor.name];
|
|
2506
|
+
}, function(v) {
|
|
2507
|
+
return __spreadArray([], __read2(v));
|
|
2508
|
+
}, function(v, a) {
|
|
2509
|
+
var ctor = constructorToName[a[1]];
|
|
2510
|
+
if (!ctor) {
|
|
2511
|
+
throw new Error("Trying to deserialize unknown typed array");
|
|
2512
|
+
}
|
|
2513
|
+
return new ctor(v);
|
|
2514
|
+
});
|
|
2515
|
+
function isInstanceOfRegisteredClass(potentialClass, superJson) {
|
|
2516
|
+
if (potentialClass === null || potentialClass === void 0 ? void 0 : potentialClass.constructor) {
|
|
2517
|
+
var isRegistered = !!superJson.classRegistry.getIdentifier(potentialClass.constructor);
|
|
2518
|
+
return isRegistered;
|
|
2519
|
+
}
|
|
2520
|
+
return false;
|
|
2521
|
+
}
|
|
2522
|
+
var classRule = compositeTransformation(isInstanceOfRegisteredClass, function(clazz, superJson) {
|
|
2523
|
+
var identifier = superJson.classRegistry.getIdentifier(clazz.constructor);
|
|
2524
|
+
return ["class", identifier];
|
|
2525
|
+
}, function(clazz, superJson) {
|
|
2526
|
+
var allowedProps = superJson.classRegistry.getAllowedProps(clazz.constructor);
|
|
2527
|
+
if (!allowedProps) {
|
|
2528
|
+
return __assign({}, clazz);
|
|
2529
|
+
}
|
|
2530
|
+
var result = {};
|
|
2531
|
+
allowedProps.forEach(function(prop) {
|
|
2532
|
+
result[prop] = clazz[prop];
|
|
2533
|
+
});
|
|
2534
|
+
return result;
|
|
2535
|
+
}, function(v, a, superJson) {
|
|
2536
|
+
var clazz = superJson.classRegistry.getValue(a[1]);
|
|
2537
|
+
if (!clazz) {
|
|
2538
|
+
throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");
|
|
2539
|
+
}
|
|
2540
|
+
return Object.assign(Object.create(clazz.prototype), v);
|
|
2541
|
+
});
|
|
2542
|
+
var customRule = compositeTransformation(function(value, superJson) {
|
|
2543
|
+
return !!superJson.customTransformerRegistry.findApplicable(value);
|
|
2544
|
+
}, function(value, superJson) {
|
|
2545
|
+
var transformer = superJson.customTransformerRegistry.findApplicable(value);
|
|
2546
|
+
return ["custom", transformer.name];
|
|
2547
|
+
}, function(value, superJson) {
|
|
2548
|
+
var transformer = superJson.customTransformerRegistry.findApplicable(value);
|
|
2549
|
+
return transformer.serialize(value);
|
|
2550
|
+
}, function(v, a, superJson) {
|
|
2551
|
+
var transformer = superJson.customTransformerRegistry.findByName(a[1]);
|
|
2552
|
+
if (!transformer) {
|
|
2553
|
+
throw new Error("Trying to deserialize unknown custom value");
|
|
2554
|
+
}
|
|
2555
|
+
return transformer.deserialize(v);
|
|
2556
|
+
});
|
|
2557
|
+
var compositeRules = [classRule, symbolRule, customRule, typedArrayRule];
|
|
2558
|
+
var transformValue = function(value, superJson) {
|
|
2559
|
+
var applicableCompositeRule = findArr(compositeRules, function(rule) {
|
|
2560
|
+
return rule.isApplicable(value, superJson);
|
|
2561
|
+
});
|
|
2562
|
+
if (applicableCompositeRule) {
|
|
2563
|
+
return {
|
|
2564
|
+
value: applicableCompositeRule.transform(value, superJson),
|
|
2565
|
+
type: applicableCompositeRule.annotation(value, superJson)
|
|
2566
|
+
};
|
|
2567
|
+
}
|
|
2568
|
+
var applicableSimpleRule = findArr(simpleRules, function(rule) {
|
|
2569
|
+
return rule.isApplicable(value, superJson);
|
|
2570
|
+
});
|
|
2571
|
+
if (applicableSimpleRule) {
|
|
2572
|
+
return {
|
|
2573
|
+
value: applicableSimpleRule.transform(value, superJson),
|
|
2574
|
+
type: applicableSimpleRule.annotation
|
|
2575
|
+
};
|
|
2576
|
+
}
|
|
2577
|
+
return void 0;
|
|
2578
|
+
};
|
|
2579
|
+
var simpleRulesByAnnotation = {};
|
|
2580
|
+
simpleRules.forEach(function(rule) {
|
|
2581
|
+
simpleRulesByAnnotation[rule.annotation] = rule;
|
|
2582
|
+
});
|
|
2583
|
+
var untransformValue = function(json, type, superJson) {
|
|
2584
|
+
if (isArray(type)) {
|
|
2585
|
+
switch (type[0]) {
|
|
2586
|
+
case "symbol":
|
|
2587
|
+
return symbolRule.untransform(json, type, superJson);
|
|
2588
|
+
case "class":
|
|
2589
|
+
return classRule.untransform(json, type, superJson);
|
|
2590
|
+
case "custom":
|
|
2591
|
+
return customRule.untransform(json, type, superJson);
|
|
2592
|
+
case "typed-array":
|
|
2593
|
+
return typedArrayRule.untransform(json, type, superJson);
|
|
2594
|
+
default:
|
|
2595
|
+
throw new Error("Unknown transformation: " + type);
|
|
2596
|
+
}
|
|
2597
|
+
} else {
|
|
2598
|
+
var transformation = simpleRulesByAnnotation[type];
|
|
2599
|
+
if (!transformation) {
|
|
2600
|
+
throw new Error("Unknown transformation: " + type);
|
|
2601
|
+
}
|
|
2602
|
+
return transformation.untransform(json, superJson);
|
|
2603
|
+
}
|
|
2604
|
+
};
|
|
2605
|
+
|
|
2606
|
+
// ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/accessDeep.js
|
|
2607
|
+
var getNthKey = function(value, n) {
|
|
2608
|
+
var keys = value.keys();
|
|
2609
|
+
while (n > 0) {
|
|
2610
|
+
keys.next();
|
|
2611
|
+
n--;
|
|
2612
|
+
}
|
|
2613
|
+
return keys.next().value;
|
|
2614
|
+
};
|
|
2615
|
+
function validatePath(path) {
|
|
2616
|
+
if (includes(path, "__proto__")) {
|
|
2617
|
+
throw new Error("__proto__ is not allowed as a property");
|
|
2618
|
+
}
|
|
2619
|
+
if (includes(path, "prototype")) {
|
|
2620
|
+
throw new Error("prototype is not allowed as a property");
|
|
2621
|
+
}
|
|
2622
|
+
if (includes(path, "constructor")) {
|
|
2623
|
+
throw new Error("constructor is not allowed as a property");
|
|
2624
|
+
}
|
|
2625
|
+
}
|
|
2626
|
+
var getDeep = function(object, path) {
|
|
2627
|
+
validatePath(path);
|
|
2628
|
+
for (var i = 0; i < path.length; i++) {
|
|
2629
|
+
var key = path[i];
|
|
2630
|
+
if (isSet(object)) {
|
|
2631
|
+
object = getNthKey(object, +key);
|
|
2632
|
+
} else if (isMap(object)) {
|
|
2633
|
+
var row = +key;
|
|
2634
|
+
var type = +path[++i] === 0 ? "key" : "value";
|
|
2635
|
+
var keyOfRow = getNthKey(object, row);
|
|
2636
|
+
switch (type) {
|
|
2637
|
+
case "key":
|
|
2638
|
+
object = keyOfRow;
|
|
2639
|
+
break;
|
|
2640
|
+
case "value":
|
|
2641
|
+
object = object.get(keyOfRow);
|
|
2642
|
+
break;
|
|
2643
|
+
}
|
|
2644
|
+
} else {
|
|
2645
|
+
object = object[key];
|
|
2646
|
+
}
|
|
2647
|
+
}
|
|
2648
|
+
return object;
|
|
2649
|
+
};
|
|
2650
|
+
var setDeep = function(object, path, mapper) {
|
|
2651
|
+
validatePath(path);
|
|
2652
|
+
if (path.length === 0) {
|
|
2653
|
+
return mapper(object);
|
|
2654
|
+
}
|
|
2655
|
+
var parent = object;
|
|
2656
|
+
for (var i = 0; i < path.length - 1; i++) {
|
|
2657
|
+
var key = path[i];
|
|
2658
|
+
if (isArray(parent)) {
|
|
2659
|
+
var index = +key;
|
|
2660
|
+
parent = parent[index];
|
|
2661
|
+
} else if (isPlainObject(parent)) {
|
|
2662
|
+
parent = parent[key];
|
|
2663
|
+
} else if (isSet(parent)) {
|
|
2664
|
+
var row = +key;
|
|
2665
|
+
parent = getNthKey(parent, row);
|
|
2666
|
+
} else if (isMap(parent)) {
|
|
2667
|
+
var isEnd = i === path.length - 2;
|
|
2668
|
+
if (isEnd) {
|
|
2669
|
+
break;
|
|
2670
|
+
}
|
|
2671
|
+
var row = +key;
|
|
2672
|
+
var type = +path[++i] === 0 ? "key" : "value";
|
|
2673
|
+
var keyOfRow = getNthKey(parent, row);
|
|
2674
|
+
switch (type) {
|
|
2675
|
+
case "key":
|
|
2676
|
+
parent = keyOfRow;
|
|
2677
|
+
break;
|
|
2678
|
+
case "value":
|
|
2679
|
+
parent = parent.get(keyOfRow);
|
|
2680
|
+
break;
|
|
2681
|
+
}
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
var lastKey = path[path.length - 1];
|
|
2685
|
+
if (isArray(parent)) {
|
|
2686
|
+
parent[+lastKey] = mapper(parent[+lastKey]);
|
|
2687
|
+
} else if (isPlainObject(parent)) {
|
|
2688
|
+
parent[lastKey] = mapper(parent[lastKey]);
|
|
2689
|
+
}
|
|
2690
|
+
if (isSet(parent)) {
|
|
2691
|
+
var oldValue = getNthKey(parent, +lastKey);
|
|
2692
|
+
var newValue = mapper(oldValue);
|
|
2693
|
+
if (oldValue !== newValue) {
|
|
2694
|
+
parent["delete"](oldValue);
|
|
2695
|
+
parent.add(newValue);
|
|
2696
|
+
}
|
|
2697
|
+
}
|
|
2698
|
+
if (isMap(parent)) {
|
|
2699
|
+
var row = +path[path.length - 2];
|
|
2700
|
+
var keyToRow = getNthKey(parent, row);
|
|
2701
|
+
var type = +lastKey === 0 ? "key" : "value";
|
|
2702
|
+
switch (type) {
|
|
2703
|
+
case "key": {
|
|
2704
|
+
var newKey = mapper(keyToRow);
|
|
2705
|
+
parent.set(newKey, parent.get(keyToRow));
|
|
2706
|
+
if (newKey !== keyToRow) {
|
|
2707
|
+
parent["delete"](keyToRow);
|
|
2708
|
+
}
|
|
2709
|
+
break;
|
|
2710
|
+
}
|
|
2711
|
+
case "value": {
|
|
2712
|
+
parent.set(keyToRow, mapper(parent.get(keyToRow)));
|
|
2713
|
+
break;
|
|
2714
|
+
}
|
|
2715
|
+
}
|
|
2716
|
+
}
|
|
2717
|
+
return object;
|
|
2718
|
+
};
|
|
2719
|
+
|
|
2720
|
+
// ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/plainer.js
|
|
2721
|
+
var __read3 = function(o, n) {
|
|
2722
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
2723
|
+
if (!m)
|
|
2724
|
+
return o;
|
|
2725
|
+
var i = m.call(o), r, ar = [], e;
|
|
2726
|
+
try {
|
|
2727
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
2728
|
+
ar.push(r.value);
|
|
2729
|
+
} catch (error) {
|
|
2730
|
+
e = { error };
|
|
2731
|
+
} finally {
|
|
2732
|
+
try {
|
|
2733
|
+
if (r && !r.done && (m = i["return"]))
|
|
2734
|
+
m.call(i);
|
|
2735
|
+
} finally {
|
|
2736
|
+
if (e)
|
|
2737
|
+
throw e.error;
|
|
2738
|
+
}
|
|
2739
|
+
}
|
|
2740
|
+
return ar;
|
|
2741
|
+
};
|
|
2742
|
+
var __spreadArray2 = function(to, from) {
|
|
2743
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
2744
|
+
to[j] = from[i];
|
|
2745
|
+
return to;
|
|
2746
|
+
};
|
|
2747
|
+
function traverse(tree, walker2, origin) {
|
|
2748
|
+
if (origin === void 0) {
|
|
2749
|
+
origin = [];
|
|
2750
|
+
}
|
|
2751
|
+
if (!tree) {
|
|
2752
|
+
return;
|
|
2753
|
+
}
|
|
2754
|
+
if (!isArray(tree)) {
|
|
2755
|
+
forEach(tree, function(subtree, key) {
|
|
2756
|
+
return traverse(subtree, walker2, __spreadArray2(__spreadArray2([], __read3(origin)), __read3(parsePath(key))));
|
|
2757
|
+
});
|
|
2758
|
+
return;
|
|
2759
|
+
}
|
|
2760
|
+
var _a = __read3(tree, 2), nodeValue = _a[0], children2 = _a[1];
|
|
2761
|
+
if (children2) {
|
|
2762
|
+
forEach(children2, function(child, key) {
|
|
2763
|
+
traverse(child, walker2, __spreadArray2(__spreadArray2([], __read3(origin)), __read3(parsePath(key))));
|
|
2764
|
+
});
|
|
2765
|
+
}
|
|
2766
|
+
walker2(nodeValue, origin);
|
|
2767
|
+
}
|
|
2768
|
+
function applyValueAnnotations(plain, annotations, superJson) {
|
|
2769
|
+
traverse(annotations, function(type, path) {
|
|
2770
|
+
plain = setDeep(plain, path, function(v) {
|
|
2771
|
+
return untransformValue(v, type, superJson);
|
|
2772
|
+
});
|
|
2773
|
+
});
|
|
2774
|
+
return plain;
|
|
2775
|
+
}
|
|
2776
|
+
function applyReferentialEqualityAnnotations(plain, annotations) {
|
|
2777
|
+
function apply(identicalPaths, path) {
|
|
2778
|
+
var object = getDeep(plain, parsePath(path));
|
|
2779
|
+
identicalPaths.map(parsePath).forEach(function(identicalObjectPath) {
|
|
2780
|
+
plain = setDeep(plain, identicalObjectPath, function() {
|
|
2781
|
+
return object;
|
|
2782
|
+
});
|
|
2783
|
+
});
|
|
2784
|
+
}
|
|
2785
|
+
if (isArray(annotations)) {
|
|
2786
|
+
var _a = __read3(annotations, 2), root = _a[0], other = _a[1];
|
|
2787
|
+
root.forEach(function(identicalPath) {
|
|
2788
|
+
plain = setDeep(plain, parsePath(identicalPath), function() {
|
|
2789
|
+
return plain;
|
|
2790
|
+
});
|
|
2791
|
+
});
|
|
2792
|
+
if (other) {
|
|
2793
|
+
forEach(other, apply);
|
|
2794
|
+
}
|
|
2795
|
+
} else {
|
|
2796
|
+
forEach(annotations, apply);
|
|
2797
|
+
}
|
|
2798
|
+
return plain;
|
|
2799
|
+
}
|
|
2800
|
+
var isDeep = function(object, superJson) {
|
|
2801
|
+
return isPlainObject(object) || isArray(object) || isMap(object) || isSet(object) || isInstanceOfRegisteredClass(object, superJson);
|
|
2802
|
+
};
|
|
2803
|
+
function addIdentity(object, path, identities) {
|
|
2804
|
+
var existingSet = identities.get(object);
|
|
2805
|
+
if (existingSet) {
|
|
2806
|
+
existingSet.push(path);
|
|
2807
|
+
} else {
|
|
2808
|
+
identities.set(object, [path]);
|
|
2809
|
+
}
|
|
2810
|
+
}
|
|
2811
|
+
function generateReferentialEqualityAnnotations(identitites) {
|
|
2812
|
+
var result = {};
|
|
2813
|
+
var rootEqualityPaths = void 0;
|
|
2814
|
+
identitites.forEach(function(paths) {
|
|
2815
|
+
if (paths.length <= 1) {
|
|
2816
|
+
return;
|
|
2817
|
+
}
|
|
2818
|
+
var _a = __read3(paths.map(function(path) {
|
|
2819
|
+
return path.map(String);
|
|
2820
|
+
}).sort(function(a, b) {
|
|
2821
|
+
return a.length - b.length;
|
|
2822
|
+
})), shortestPath = _a[0], identicalPaths = _a.slice(1);
|
|
2823
|
+
if (shortestPath.length === 0) {
|
|
2824
|
+
rootEqualityPaths = identicalPaths.map(stringifyPath);
|
|
2825
|
+
} else {
|
|
2826
|
+
result[stringifyPath(shortestPath)] = identicalPaths.map(stringifyPath);
|
|
2827
|
+
}
|
|
2828
|
+
});
|
|
2829
|
+
if (rootEqualityPaths) {
|
|
2830
|
+
if (isEmptyObject(result)) {
|
|
2831
|
+
return [rootEqualityPaths];
|
|
2832
|
+
} else {
|
|
2833
|
+
return [rootEqualityPaths, result];
|
|
2834
|
+
}
|
|
2835
|
+
} else {
|
|
2836
|
+
return isEmptyObject(result) ? void 0 : result;
|
|
2837
|
+
}
|
|
2838
|
+
}
|
|
2839
|
+
var walker = function(object, identities, superJson, path, objectsInThisPath) {
|
|
2840
|
+
var _a;
|
|
2841
|
+
if (path === void 0) {
|
|
2842
|
+
path = [];
|
|
2843
|
+
}
|
|
2844
|
+
if (objectsInThisPath === void 0) {
|
|
2845
|
+
objectsInThisPath = [];
|
|
2846
|
+
}
|
|
2847
|
+
if (!isPrimitive(object)) {
|
|
2848
|
+
addIdentity(object, path, identities);
|
|
2849
|
+
}
|
|
2850
|
+
if (!isDeep(object, superJson)) {
|
|
2851
|
+
var transformed_1 = transformValue(object, superJson);
|
|
2852
|
+
if (transformed_1) {
|
|
2853
|
+
return {
|
|
2854
|
+
transformedValue: transformed_1.value,
|
|
2855
|
+
annotations: [transformed_1.type]
|
|
2856
|
+
};
|
|
2857
|
+
} else {
|
|
2858
|
+
return {
|
|
2859
|
+
transformedValue: object
|
|
2860
|
+
};
|
|
2861
|
+
}
|
|
2862
|
+
}
|
|
2863
|
+
if (includes(objectsInThisPath, object)) {
|
|
2864
|
+
return {
|
|
2865
|
+
transformedValue: null
|
|
2866
|
+
};
|
|
2867
|
+
}
|
|
2868
|
+
var transformationResult = transformValue(object, superJson);
|
|
2869
|
+
var transformed = (_a = transformationResult === null || transformationResult === void 0 ? void 0 : transformationResult.value) !== null && _a !== void 0 ? _a : object;
|
|
2870
|
+
if (!isPrimitive(object)) {
|
|
2871
|
+
objectsInThisPath = __spreadArray2(__spreadArray2([], __read3(objectsInThisPath)), [object]);
|
|
2872
|
+
}
|
|
2873
|
+
var transformedValue = isArray(transformed) ? [] : {};
|
|
2874
|
+
var innerAnnotations = {};
|
|
2875
|
+
forEach(transformed, function(value, index) {
|
|
2876
|
+
var recursiveResult = walker(value, identities, superJson, __spreadArray2(__spreadArray2([], __read3(path)), [index]), objectsInThisPath);
|
|
2877
|
+
transformedValue[index] = recursiveResult.transformedValue;
|
|
2878
|
+
if (isArray(recursiveResult.annotations)) {
|
|
2879
|
+
innerAnnotations[index] = recursiveResult.annotations;
|
|
2880
|
+
} else if (isPlainObject(recursiveResult.annotations)) {
|
|
2881
|
+
forEach(recursiveResult.annotations, function(tree, key) {
|
|
2882
|
+
innerAnnotations[escapeKey(index) + "." + key] = tree;
|
|
2883
|
+
});
|
|
2884
|
+
}
|
|
2885
|
+
});
|
|
2886
|
+
if (isEmptyObject(innerAnnotations)) {
|
|
2887
|
+
return {
|
|
2888
|
+
transformedValue,
|
|
2889
|
+
annotations: !!transformationResult ? [transformationResult.type] : void 0
|
|
2890
|
+
};
|
|
2891
|
+
} else {
|
|
2892
|
+
return {
|
|
2893
|
+
transformedValue,
|
|
2894
|
+
annotations: !!transformationResult ? [transformationResult.type, innerAnnotations] : innerAnnotations
|
|
2895
|
+
};
|
|
2896
|
+
}
|
|
2897
|
+
};
|
|
2898
|
+
|
|
2899
|
+
// ../../node_modules/.pnpm/is-what@4.1.15/node_modules/is-what/dist/index.js
|
|
2900
|
+
function getType2(payload) {
|
|
2901
|
+
return Object.prototype.toString.call(payload).slice(8, -1);
|
|
2902
|
+
}
|
|
2903
|
+
function isUndefined2(payload) {
|
|
2904
|
+
return getType2(payload) === "Undefined";
|
|
2905
|
+
}
|
|
2906
|
+
function isNull2(payload) {
|
|
2907
|
+
return getType2(payload) === "Null";
|
|
2908
|
+
}
|
|
2909
|
+
function isPlainObject2(payload) {
|
|
2910
|
+
if (getType2(payload) !== "Object")
|
|
2911
|
+
return false;
|
|
2912
|
+
const prototype = Object.getPrototypeOf(payload);
|
|
2913
|
+
return !!prototype && prototype.constructor === Object && prototype === Object.prototype;
|
|
2914
|
+
}
|
|
2915
|
+
function isArray2(payload) {
|
|
2916
|
+
return getType2(payload) === "Array";
|
|
2917
|
+
}
|
|
2918
|
+
var isNullOrUndefined = isOneOf(isNull2, isUndefined2);
|
|
2919
|
+
function isOneOf(a, b, c, d, e) {
|
|
2920
|
+
return (value) => a(value) || b(value) || !!c && c(value) || !!d && d(value) || !!e && e(value);
|
|
2921
|
+
}
|
|
2922
|
+
|
|
2923
|
+
// ../../node_modules/.pnpm/copy-anything@3.0.5/node_modules/copy-anything/dist/index.js
|
|
2924
|
+
function assignProp2(carry, key, newVal, originalObject, includeNonenumerable) {
|
|
2925
|
+
const propType = {}.propertyIsEnumerable.call(originalObject, key) ? "enumerable" : "nonenumerable";
|
|
2926
|
+
if (propType === "enumerable")
|
|
2927
|
+
carry[key] = newVal;
|
|
2928
|
+
if (includeNonenumerable && propType === "nonenumerable") {
|
|
2929
|
+
Object.defineProperty(carry, key, {
|
|
2930
|
+
value: newVal,
|
|
2931
|
+
enumerable: false,
|
|
2932
|
+
writable: true,
|
|
2933
|
+
configurable: true
|
|
2934
|
+
});
|
|
2935
|
+
}
|
|
2936
|
+
}
|
|
2937
|
+
function copy(target, options = {}) {
|
|
2938
|
+
if (isArray2(target)) {
|
|
2939
|
+
return target.map((item) => copy(item, options));
|
|
2940
|
+
}
|
|
2941
|
+
if (!isPlainObject2(target)) {
|
|
2942
|
+
return target;
|
|
2943
|
+
}
|
|
2944
|
+
const props = Object.getOwnPropertyNames(target);
|
|
2945
|
+
const symbols = Object.getOwnPropertySymbols(target);
|
|
2946
|
+
return [...props, ...symbols].reduce((carry, key) => {
|
|
2947
|
+
if (isArray2(options.props) && !options.props.includes(key)) {
|
|
2948
|
+
return carry;
|
|
2949
|
+
}
|
|
2950
|
+
const val = target[key];
|
|
2951
|
+
const newVal = copy(val, options);
|
|
2952
|
+
assignProp2(carry, key, newVal, target, options.nonenumerable);
|
|
2953
|
+
return carry;
|
|
2954
|
+
}, {});
|
|
2955
|
+
}
|
|
2956
|
+
|
|
2957
|
+
// ../../node_modules/.pnpm/superjson@1.12.4/node_modules/superjson/dist/esm/index.js
|
|
2958
|
+
var __assign2 = function() {
|
|
2959
|
+
__assign2 = Object.assign || function(t) {
|
|
2960
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
2961
|
+
s = arguments[i];
|
|
2962
|
+
for (var p in s)
|
|
2963
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
2964
|
+
t[p] = s[p];
|
|
2965
|
+
}
|
|
2966
|
+
return t;
|
|
2967
|
+
};
|
|
2968
|
+
return __assign2.apply(this, arguments);
|
|
2969
|
+
};
|
|
2970
|
+
var __read4 = function(o, n) {
|
|
2971
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
2972
|
+
if (!m)
|
|
2973
|
+
return o;
|
|
2974
|
+
var i = m.call(o), r, ar = [], e;
|
|
2975
|
+
try {
|
|
2976
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
2977
|
+
ar.push(r.value);
|
|
2978
|
+
} catch (error) {
|
|
2979
|
+
e = { error };
|
|
2980
|
+
} finally {
|
|
2981
|
+
try {
|
|
2982
|
+
if (r && !r.done && (m = i["return"]))
|
|
2983
|
+
m.call(i);
|
|
2984
|
+
} finally {
|
|
2985
|
+
if (e)
|
|
2986
|
+
throw e.error;
|
|
2987
|
+
}
|
|
2988
|
+
}
|
|
2989
|
+
return ar;
|
|
2990
|
+
};
|
|
2991
|
+
var __spreadArray3 = function(to, from) {
|
|
2992
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
2993
|
+
to[j] = from[i];
|
|
2994
|
+
return to;
|
|
2995
|
+
};
|
|
2996
|
+
var SuperJSON = (
|
|
2997
|
+
/** @class */
|
|
2998
|
+
function() {
|
|
2999
|
+
function SuperJSON2() {
|
|
3000
|
+
this.classRegistry = new ClassRegistry();
|
|
3001
|
+
this.symbolRegistry = new Registry(function(s) {
|
|
3002
|
+
var _a;
|
|
3003
|
+
return (_a = s.description) !== null && _a !== void 0 ? _a : "";
|
|
3004
|
+
});
|
|
3005
|
+
this.customTransformerRegistry = new CustomTransformerRegistry();
|
|
3006
|
+
this.allowedErrorProps = [];
|
|
3007
|
+
}
|
|
3008
|
+
SuperJSON2.prototype.serialize = function(object) {
|
|
3009
|
+
var identities = /* @__PURE__ */ new Map();
|
|
3010
|
+
var output = walker(object, identities, this);
|
|
3011
|
+
var res = {
|
|
3012
|
+
json: output.transformedValue
|
|
3013
|
+
};
|
|
3014
|
+
if (output.annotations) {
|
|
3015
|
+
res.meta = __assign2(__assign2({}, res.meta), { values: output.annotations });
|
|
3016
|
+
}
|
|
3017
|
+
var equalityAnnotations = generateReferentialEqualityAnnotations(identities);
|
|
3018
|
+
if (equalityAnnotations) {
|
|
3019
|
+
res.meta = __assign2(__assign2({}, res.meta), { referentialEqualities: equalityAnnotations });
|
|
3020
|
+
}
|
|
3021
|
+
return res;
|
|
3022
|
+
};
|
|
3023
|
+
SuperJSON2.prototype.deserialize = function(payload) {
|
|
3024
|
+
var json = payload.json, meta = payload.meta;
|
|
3025
|
+
var result = copy(json);
|
|
3026
|
+
if (meta === null || meta === void 0 ? void 0 : meta.values) {
|
|
3027
|
+
result = applyValueAnnotations(result, meta.values, this);
|
|
3028
|
+
}
|
|
3029
|
+
if (meta === null || meta === void 0 ? void 0 : meta.referentialEqualities) {
|
|
3030
|
+
result = applyReferentialEqualityAnnotations(result, meta.referentialEqualities);
|
|
3031
|
+
}
|
|
3032
|
+
return result;
|
|
3033
|
+
};
|
|
3034
|
+
SuperJSON2.prototype.stringify = function(object) {
|
|
3035
|
+
return JSON.stringify(this.serialize(object));
|
|
3036
|
+
};
|
|
3037
|
+
SuperJSON2.prototype.parse = function(string) {
|
|
3038
|
+
return this.deserialize(JSON.parse(string));
|
|
3039
|
+
};
|
|
3040
|
+
SuperJSON2.prototype.registerClass = function(v, options) {
|
|
3041
|
+
this.classRegistry.register(v, options);
|
|
3042
|
+
};
|
|
3043
|
+
SuperJSON2.prototype.registerSymbol = function(v, identifier) {
|
|
3044
|
+
this.symbolRegistry.register(v, identifier);
|
|
3045
|
+
};
|
|
3046
|
+
SuperJSON2.prototype.registerCustom = function(transformer, name) {
|
|
3047
|
+
this.customTransformerRegistry.register(__assign2({ name }, transformer));
|
|
3048
|
+
};
|
|
3049
|
+
SuperJSON2.prototype.allowErrorProps = function() {
|
|
3050
|
+
var _a;
|
|
3051
|
+
var props = [];
|
|
3052
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3053
|
+
props[_i] = arguments[_i];
|
|
3054
|
+
}
|
|
3055
|
+
(_a = this.allowedErrorProps).push.apply(_a, __spreadArray3([], __read4(props)));
|
|
3056
|
+
};
|
|
3057
|
+
SuperJSON2.defaultInstance = new SuperJSON2();
|
|
3058
|
+
SuperJSON2.serialize = SuperJSON2.defaultInstance.serialize.bind(SuperJSON2.defaultInstance);
|
|
3059
|
+
SuperJSON2.deserialize = SuperJSON2.defaultInstance.deserialize.bind(SuperJSON2.defaultInstance);
|
|
3060
|
+
SuperJSON2.stringify = SuperJSON2.defaultInstance.stringify.bind(SuperJSON2.defaultInstance);
|
|
3061
|
+
SuperJSON2.parse = SuperJSON2.defaultInstance.parse.bind(SuperJSON2.defaultInstance);
|
|
3062
|
+
SuperJSON2.registerClass = SuperJSON2.defaultInstance.registerClass.bind(SuperJSON2.defaultInstance);
|
|
3063
|
+
SuperJSON2.registerSymbol = SuperJSON2.defaultInstance.registerSymbol.bind(SuperJSON2.defaultInstance);
|
|
3064
|
+
SuperJSON2.registerCustom = SuperJSON2.defaultInstance.registerCustom.bind(SuperJSON2.defaultInstance);
|
|
3065
|
+
SuperJSON2.allowErrorProps = SuperJSON2.defaultInstance.allowErrorProps.bind(SuperJSON2.defaultInstance);
|
|
3066
|
+
return SuperJSON2;
|
|
3067
|
+
}()
|
|
3068
|
+
);
|
|
3069
|
+
var serialize = SuperJSON.serialize;
|
|
3070
|
+
var deserialize = SuperJSON.deserialize;
|
|
3071
|
+
var stringify = SuperJSON.stringify;
|
|
3072
|
+
var parse = SuperJSON.parse;
|
|
3073
|
+
var registerClass = SuperJSON.registerClass;
|
|
3074
|
+
var registerCustom = SuperJSON.registerCustom;
|
|
3075
|
+
var registerSymbol = SuperJSON.registerSymbol;
|
|
3076
|
+
var allowErrorProps = SuperJSON.allowErrorProps;
|
|
3077
|
+
|
|
3078
|
+
// src/utils.tsx
|
|
3079
|
+
function getQueryStatusLabel(query) {
|
|
3080
|
+
return query.state.fetchStatus === "fetching" ? "fetching" : !query.getObserversCount() ? "inactive" : query.state.fetchStatus === "paused" ? "paused" : query.isStale() ? "stale" : "fresh";
|
|
3081
|
+
}
|
|
3082
|
+
function getSidedProp(prop, side) {
|
|
3083
|
+
return `${prop}${side.charAt(0).toUpperCase() + side.slice(1)}`;
|
|
3084
|
+
}
|
|
3085
|
+
function getQueryStatusColor({
|
|
3086
|
+
queryState,
|
|
3087
|
+
observerCount,
|
|
3088
|
+
isStale
|
|
3089
|
+
}) {
|
|
3090
|
+
return queryState.fetchStatus === "fetching" ? "blue" : !observerCount ? "gray" : queryState.fetchStatus === "paused" ? "purple" : isStale ? "yellow" : "green";
|
|
3091
|
+
}
|
|
3092
|
+
function getMutationStatusColor({
|
|
3093
|
+
status,
|
|
3094
|
+
isPaused
|
|
3095
|
+
}) {
|
|
3096
|
+
return isPaused ? "purple" : status === "error" ? "red" : status === "pending" ? "yellow" : status === "success" ? "green" : "gray";
|
|
3097
|
+
}
|
|
3098
|
+
function getQueryStatusColorByLabel(label) {
|
|
3099
|
+
return label === "fresh" ? "green" : label === "stale" ? "yellow" : label === "paused" ? "purple" : label === "inactive" ? "gray" : "blue";
|
|
3100
|
+
}
|
|
3101
|
+
var displayValue = (value, beautify = false) => {
|
|
3102
|
+
const { json } = serialize(value);
|
|
3103
|
+
return JSON.stringify(json, null, beautify ? 2 : void 0);
|
|
3104
|
+
};
|
|
3105
|
+
var getStatusRank = (q) => q.state.fetchStatus !== "idle" ? 0 : !q.getObserversCount() ? 3 : q.isStale() ? 2 : 1;
|
|
3106
|
+
var queryHashSort = (a, b) => a.queryHash.localeCompare(b.queryHash);
|
|
3107
|
+
var dateSort = (a, b) => a.state.dataUpdatedAt < b.state.dataUpdatedAt ? 1 : -1;
|
|
3108
|
+
var statusAndDateSort = (a, b) => {
|
|
3109
|
+
if (getStatusRank(a) === getStatusRank(b)) {
|
|
3110
|
+
return dateSort(a, b);
|
|
3111
|
+
}
|
|
3112
|
+
return getStatusRank(a) > getStatusRank(b) ? 1 : -1;
|
|
3113
|
+
};
|
|
3114
|
+
var sortFns = {
|
|
3115
|
+
status: statusAndDateSort,
|
|
3116
|
+
"query hash": queryHashSort,
|
|
3117
|
+
"last updated": dateSort
|
|
3118
|
+
};
|
|
3119
|
+
var getMutationStatusRank = (m) => m.state.isPaused ? 0 : m.state.status === "error" ? 2 : m.state.status === "pending" ? 1 : 3;
|
|
3120
|
+
var mutationDateSort = (a, b) => a.state.submittedAt < b.state.submittedAt ? 1 : -1;
|
|
3121
|
+
var mutationStatusSort = (a, b) => {
|
|
3122
|
+
if (getMutationStatusRank(a) === getMutationStatusRank(b)) {
|
|
3123
|
+
return mutationDateSort(a, b);
|
|
3124
|
+
}
|
|
3125
|
+
return getMutationStatusRank(a) > getMutationStatusRank(b) ? 1 : -1;
|
|
3126
|
+
};
|
|
3127
|
+
var mutationSortFns = {
|
|
3128
|
+
status: mutationStatusSort,
|
|
3129
|
+
"last updated": mutationDateSort
|
|
3130
|
+
};
|
|
3131
|
+
var convertRemToPixels = (rem) => {
|
|
3132
|
+
return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
3133
|
+
};
|
|
3134
|
+
var getPreferredColorScheme = () => {
|
|
3135
|
+
const [colorScheme, setColorScheme] = createSignal("dark");
|
|
3136
|
+
onMount(() => {
|
|
3137
|
+
const query = window.matchMedia("(prefers-color-scheme: dark)");
|
|
3138
|
+
setColorScheme(query.matches ? "dark" : "light");
|
|
3139
|
+
const listener = (e) => {
|
|
3140
|
+
setColorScheme(e.matches ? "dark" : "light");
|
|
3141
|
+
};
|
|
3142
|
+
query.addEventListener("change", listener);
|
|
3143
|
+
onCleanup(() => query.removeEventListener("change", listener));
|
|
3144
|
+
});
|
|
3145
|
+
return colorScheme;
|
|
3146
|
+
};
|
|
3147
|
+
var updateNestedDataByPath = (oldData, updatePath, value) => {
|
|
3148
|
+
if (updatePath.length === 0) {
|
|
3149
|
+
return value;
|
|
3150
|
+
}
|
|
3151
|
+
if (oldData instanceof Map) {
|
|
3152
|
+
const newData = new Map(oldData);
|
|
3153
|
+
if (updatePath.length === 1) {
|
|
3154
|
+
newData.set(updatePath[0], value);
|
|
3155
|
+
return newData;
|
|
3156
|
+
}
|
|
3157
|
+
const [head, ...tail] = updatePath;
|
|
3158
|
+
newData.set(head, updateNestedDataByPath(newData.get(head), tail, value));
|
|
3159
|
+
return newData;
|
|
3160
|
+
}
|
|
3161
|
+
if (oldData instanceof Set) {
|
|
3162
|
+
const setAsArray = updateNestedDataByPath(
|
|
3163
|
+
Array.from(oldData),
|
|
3164
|
+
updatePath,
|
|
3165
|
+
value
|
|
3166
|
+
);
|
|
3167
|
+
return new Set(setAsArray);
|
|
3168
|
+
}
|
|
3169
|
+
if (Array.isArray(oldData)) {
|
|
3170
|
+
const newData = [...oldData];
|
|
3171
|
+
if (updatePath.length === 1) {
|
|
3172
|
+
newData[updatePath[0]] = value;
|
|
3173
|
+
return newData;
|
|
3174
|
+
}
|
|
3175
|
+
const [head, ...tail] = updatePath;
|
|
3176
|
+
newData[head] = updateNestedDataByPath(newData[head], tail, value);
|
|
3177
|
+
return newData;
|
|
3178
|
+
}
|
|
3179
|
+
if (oldData instanceof Object) {
|
|
3180
|
+
const newData = { ...oldData };
|
|
3181
|
+
if (updatePath.length === 1) {
|
|
3182
|
+
newData[updatePath[0]] = value;
|
|
3183
|
+
return newData;
|
|
3184
|
+
}
|
|
3185
|
+
const [head, ...tail] = updatePath;
|
|
3186
|
+
newData[head] = updateNestedDataByPath(newData[head], tail, value);
|
|
3187
|
+
return newData;
|
|
3188
|
+
}
|
|
3189
|
+
return oldData;
|
|
3190
|
+
};
|
|
3191
|
+
var deleteNestedDataByPath = (oldData, deletePath) => {
|
|
3192
|
+
if (oldData instanceof Map) {
|
|
3193
|
+
const newData = new Map(oldData);
|
|
3194
|
+
if (deletePath.length === 1) {
|
|
3195
|
+
newData.delete(deletePath[0]);
|
|
3196
|
+
return newData;
|
|
3197
|
+
}
|
|
3198
|
+
const [head, ...tail] = deletePath;
|
|
3199
|
+
newData.set(head, deleteNestedDataByPath(newData.get(head), tail));
|
|
3200
|
+
return newData;
|
|
3201
|
+
}
|
|
3202
|
+
if (oldData instanceof Set) {
|
|
3203
|
+
const setAsArray = deleteNestedDataByPath(Array.from(oldData), deletePath);
|
|
3204
|
+
return new Set(setAsArray);
|
|
3205
|
+
}
|
|
3206
|
+
if (Array.isArray(oldData)) {
|
|
3207
|
+
const newData = [...oldData];
|
|
3208
|
+
if (deletePath.length === 1) {
|
|
3209
|
+
return newData.filter((_, idx) => idx.toString() !== deletePath[0]);
|
|
3210
|
+
}
|
|
3211
|
+
const [head, ...tail] = deletePath;
|
|
3212
|
+
newData[head] = deleteNestedDataByPath(newData[head], tail);
|
|
3213
|
+
return newData;
|
|
3214
|
+
}
|
|
3215
|
+
if (oldData instanceof Object) {
|
|
3216
|
+
const newData = { ...oldData };
|
|
3217
|
+
if (deletePath.length === 1) {
|
|
3218
|
+
delete newData[deletePath[0]];
|
|
3219
|
+
return newData;
|
|
3220
|
+
}
|
|
3221
|
+
const [head, ...tail] = deletePath;
|
|
3222
|
+
newData[head] = deleteNestedDataByPath(newData[head], tail);
|
|
3223
|
+
return newData;
|
|
3224
|
+
}
|
|
3225
|
+
return oldData;
|
|
3226
|
+
};
|
|
3227
|
+
var setupStyleSheet = (nonce) => {
|
|
3228
|
+
if (!nonce)
|
|
3229
|
+
return;
|
|
3230
|
+
const styleExists = document.querySelector("#_goober");
|
|
3231
|
+
if (styleExists)
|
|
3232
|
+
return;
|
|
3233
|
+
const styleTag = document.createElement("style");
|
|
3234
|
+
const textNode = document.createTextNode("");
|
|
3235
|
+
styleTag.appendChild(textNode);
|
|
3236
|
+
styleTag.id = "_goober";
|
|
3237
|
+
styleTag.setAttribute("nonce", nonce);
|
|
3238
|
+
document.head.appendChild(styleTag);
|
|
3239
|
+
};
|
|
3240
|
+
|
|
3241
|
+
export {
|
|
3242
|
+
$PROXY,
|
|
3243
|
+
$TRACK,
|
|
3244
|
+
createRoot,
|
|
3245
|
+
createSignal,
|
|
3246
|
+
createComputed,
|
|
3247
|
+
createRenderEffect,
|
|
3248
|
+
createEffect,
|
|
3249
|
+
createMemo,
|
|
3250
|
+
batch,
|
|
3251
|
+
untrack,
|
|
3252
|
+
on,
|
|
3253
|
+
onMount,
|
|
3254
|
+
onCleanup,
|
|
3255
|
+
getListener,
|
|
3256
|
+
getOwner,
|
|
3257
|
+
useTransition,
|
|
3258
|
+
createContext,
|
|
3259
|
+
useContext,
|
|
3260
|
+
children,
|
|
3261
|
+
createComponent,
|
|
3262
|
+
mergeProps,
|
|
3263
|
+
splitProps,
|
|
3264
|
+
lazy,
|
|
3265
|
+
createUniqueId,
|
|
3266
|
+
For,
|
|
3267
|
+
Index,
|
|
3268
|
+
Show,
|
|
3269
|
+
Switch,
|
|
3270
|
+
Match,
|
|
3271
|
+
DEV,
|
|
3272
|
+
render,
|
|
3273
|
+
template,
|
|
3274
|
+
delegateEvents,
|
|
3275
|
+
setAttribute,
|
|
3276
|
+
spread,
|
|
3277
|
+
use,
|
|
3278
|
+
isServer,
|
|
3279
|
+
Portal,
|
|
3280
|
+
Dynamic,
|
|
3281
|
+
stringify,
|
|
3282
|
+
getQueryStatusLabel,
|
|
3283
|
+
getSidedProp,
|
|
3284
|
+
getQueryStatusColor,
|
|
3285
|
+
getMutationStatusColor,
|
|
3286
|
+
getQueryStatusColorByLabel,
|
|
3287
|
+
displayValue,
|
|
3288
|
+
sortFns,
|
|
3289
|
+
mutationSortFns,
|
|
3290
|
+
convertRemToPixels,
|
|
3291
|
+
getPreferredColorScheme,
|
|
3292
|
+
updateNestedDataByPath,
|
|
3293
|
+
deleteNestedDataByPath,
|
|
3294
|
+
setupStyleSheet
|
|
3295
|
+
};
|