@pie-players/pie-section-player-tools-shared 0.3.13 → 0.3.16
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/DebugPanelToggles.svelte +64 -0
- package/SessionDbPanel.svelte +546 -0
- package/dist/DebugPanelToggles.svelte.d.ts +1 -0
- package/dist/SessionDbPanel.svelte.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1551 -976
- package/index.ts +2 -0
- package/package.json +11 -3
package/dist/index.js
CHANGED
|
@@ -1,70 +1,82 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var rs = Object.defineProperty;
|
|
2
|
+
var Vn = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
typeof window < "u" && ((
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
const
|
|
5
|
+
var ss = (e, t, n) => t in e ? rs(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var Le = (e, t, n) => ss(e, typeof t != "symbol" ? t + "" : t, n), sn = (e, t, n) => t.has(e) || Vn("Cannot " + n);
|
|
7
|
+
var h = (e, t, n) => (sn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), O = (e, t, n) => t.has(e) ? Vn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Se = (e, t, n, r) => (sn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), ke = (e, t, n) => (sn(e, t, "access private method"), n);
|
|
8
|
+
var $n;
|
|
9
|
+
typeof window < "u" && (($n = window.__svelte ?? (window.__svelte = {})).v ?? ($n.v = /* @__PURE__ */ new Set())).add("5");
|
|
10
|
+
const is = 1, os = 2, er = 4, ls = 8, as = 16, fs = 1, us = 2, j = /* @__PURE__ */ Symbol(), tr = "http://www.w3.org/1999/xhtml", dn = !1;
|
|
11
|
+
var nr = Array.isArray, cs = Array.prototype.indexOf, vt = Array.prototype.includes, En = Array.from, on = Object.getOwnPropertyDescriptor, ds = Object.getOwnPropertyDescriptors, vs = Object.prototype, hs = Array.prototype, rr = Object.getPrototypeOf;
|
|
12
|
+
const Vt = () => {
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function _s(e) {
|
|
15
15
|
for (var t = 0; t < e.length; t++)
|
|
16
16
|
e[t]();
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
var e, t, n = new Promise((r,
|
|
20
|
-
e = r, t =
|
|
18
|
+
function sr() {
|
|
19
|
+
var e, t, n = new Promise((r, s) => {
|
|
20
|
+
e = r, t = s;
|
|
21
21
|
});
|
|
22
22
|
return { promise: n, resolve: e, reject: t };
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const V = 2, wt = 4, Tt = 8, Sn = 1 << 24, Ye = 16, pe = 32, bt = 64, ps = 128, ae = 512, B = 1024, X = 2048, Ee = 4096, U = 8192, Te = 16384, yt = 32768, ht = 65536, Yn = 1 << 17, ms = 1 << 18, Kt = 1 << 19, gs = 1 << 20, ye = 1 << 25, et = 65536, vn = 1 << 21, kn = 1 << 22, je = 1 << 23, ln = /* @__PURE__ */ Symbol("$state"), ws = /* @__PURE__ */ Symbol(""), Ge = new class extends Error {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments);
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
Le(this, "name", "StaleReactionError");
|
|
28
|
+
Le(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
29
29
|
}
|
|
30
|
-
}()
|
|
31
|
-
|
|
30
|
+
}(), bs = (
|
|
31
|
+
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
32
|
+
!!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml")
|
|
33
|
+
);
|
|
34
|
+
function ir(e) {
|
|
32
35
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
33
36
|
}
|
|
34
|
-
function
|
|
37
|
+
function ys() {
|
|
35
38
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
36
39
|
}
|
|
37
|
-
function
|
|
40
|
+
function xs(e, t, n) {
|
|
41
|
+
throw new Error("https://svelte.dev/e/each_key_duplicate");
|
|
42
|
+
}
|
|
43
|
+
function Es(e) {
|
|
38
44
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
39
45
|
}
|
|
40
|
-
function
|
|
46
|
+
function Ss() {
|
|
41
47
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
42
48
|
}
|
|
43
|
-
function
|
|
49
|
+
function ks(e) {
|
|
44
50
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
45
51
|
}
|
|
46
|
-
function
|
|
52
|
+
function Ms() {
|
|
47
53
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
48
54
|
}
|
|
49
|
-
function
|
|
55
|
+
function Cs() {
|
|
50
56
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
51
57
|
}
|
|
52
|
-
function
|
|
58
|
+
function Ts() {
|
|
53
59
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
54
60
|
}
|
|
55
|
-
function
|
|
61
|
+
function As() {
|
|
56
62
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
57
63
|
}
|
|
58
|
-
function
|
|
64
|
+
function or(e) {
|
|
59
65
|
return e === this.v;
|
|
60
66
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
67
|
+
function Rs(e, t) {
|
|
68
|
+
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
69
|
+
}
|
|
70
|
+
function lr(e) {
|
|
71
|
+
return !Rs(e, this.v);
|
|
64
72
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
73
|
+
let Is = !1, ue = null;
|
|
74
|
+
function Xt(e) {
|
|
75
|
+
ue = e;
|
|
76
|
+
}
|
|
77
|
+
function Mn(e, t = !1, n) {
|
|
78
|
+
ue = {
|
|
79
|
+
p: ue,
|
|
68
80
|
i: !1,
|
|
69
81
|
c: null,
|
|
70
82
|
e: null,
|
|
@@ -73,48 +85,48 @@ function tn(e, t = !1, n) {
|
|
|
73
85
|
l: null
|
|
74
86
|
};
|
|
75
87
|
}
|
|
76
|
-
function
|
|
88
|
+
function Cn(e) {
|
|
77
89
|
var t = (
|
|
78
90
|
/** @type {ComponentContext} */
|
|
79
|
-
|
|
91
|
+
ue
|
|
80
92
|
), n = t.e;
|
|
81
93
|
if (n !== null) {
|
|
82
94
|
t.e = null;
|
|
83
95
|
for (var r of n)
|
|
84
|
-
|
|
96
|
+
yr(r);
|
|
85
97
|
}
|
|
86
|
-
return t.i = !0,
|
|
98
|
+
return t.i = !0, ue = t.p, /** @type {T} */
|
|
87
99
|
{};
|
|
88
100
|
}
|
|
89
|
-
function
|
|
101
|
+
function ar() {
|
|
90
102
|
return !0;
|
|
91
103
|
}
|
|
92
|
-
let
|
|
93
|
-
function
|
|
94
|
-
var e =
|
|
95
|
-
|
|
104
|
+
let st = [];
|
|
105
|
+
function Ds() {
|
|
106
|
+
var e = st;
|
|
107
|
+
st = [], _s(e);
|
|
96
108
|
}
|
|
97
|
-
function
|
|
98
|
-
if (
|
|
99
|
-
var t =
|
|
109
|
+
function hn(e) {
|
|
110
|
+
if (st.length === 0) {
|
|
111
|
+
var t = st;
|
|
100
112
|
queueMicrotask(() => {
|
|
101
|
-
t ===
|
|
113
|
+
t === st && Ds();
|
|
102
114
|
});
|
|
103
115
|
}
|
|
104
|
-
|
|
116
|
+
st.push(e);
|
|
105
117
|
}
|
|
106
|
-
function
|
|
107
|
-
var t =
|
|
118
|
+
function Ps(e) {
|
|
119
|
+
var t = C;
|
|
108
120
|
if (t === null)
|
|
109
|
-
return
|
|
110
|
-
if ((t.f &
|
|
121
|
+
return x.f |= je, e;
|
|
122
|
+
if ((t.f & yt) === 0 && (t.f & wt) === 0)
|
|
111
123
|
throw e;
|
|
112
|
-
|
|
124
|
+
Wt(e, t);
|
|
113
125
|
}
|
|
114
|
-
function
|
|
126
|
+
function Wt(e, t) {
|
|
115
127
|
for (; t !== null; ) {
|
|
116
|
-
if ((t.f &
|
|
117
|
-
if ((t.f &
|
|
128
|
+
if ((t.f & ps) !== 0) {
|
|
129
|
+
if ((t.f & yt) === 0)
|
|
118
130
|
throw e;
|
|
119
131
|
try {
|
|
120
132
|
t.b.error(e);
|
|
@@ -127,79 +139,79 @@ function $e(e, t) {
|
|
|
127
139
|
}
|
|
128
140
|
throw e;
|
|
129
141
|
}
|
|
130
|
-
const
|
|
131
|
-
function
|
|
132
|
-
e.f = e.f &
|
|
142
|
+
const Ns = -7169;
|
|
143
|
+
function q(e, t) {
|
|
144
|
+
e.f = e.f & Ns | t;
|
|
133
145
|
}
|
|
134
|
-
function
|
|
135
|
-
(e.f &
|
|
146
|
+
function Tn(e) {
|
|
147
|
+
(e.f & ae) !== 0 || e.deps === null ? q(e, B) : q(e, Ee);
|
|
136
148
|
}
|
|
137
|
-
function
|
|
149
|
+
function fr(e) {
|
|
138
150
|
if (e !== null)
|
|
139
151
|
for (const t of e)
|
|
140
|
-
(t.f &
|
|
152
|
+
(t.f & V) === 0 || (t.f & et) === 0 || (t.f ^= et, fr(
|
|
141
153
|
/** @type {Derived} */
|
|
142
154
|
t.deps
|
|
143
155
|
));
|
|
144
156
|
}
|
|
145
|
-
function
|
|
146
|
-
(e.f &
|
|
157
|
+
function Ls(e, t, n) {
|
|
158
|
+
(e.f & X) !== 0 ? t.add(e) : (e.f & Ee) !== 0 && n.add(e), fr(e.deps), q(e, B);
|
|
147
159
|
}
|
|
148
|
-
const
|
|
149
|
-
let
|
|
150
|
-
var
|
|
151
|
-
const
|
|
160
|
+
const Ht = /* @__PURE__ */ new Set();
|
|
161
|
+
let D = null, ve = null, oe = [], An = null, _t = null, qs = 1;
|
|
162
|
+
var Oe, at, Ke, ft, ut, ct, ze, we, dt, Q, _n, pn, mn, gn;
|
|
163
|
+
const Fn = class Fn {
|
|
152
164
|
constructor() {
|
|
153
|
-
|
|
165
|
+
O(this, Q);
|
|
154
166
|
// for debugging. TODO remove once async is stable
|
|
155
|
-
|
|
167
|
+
Le(this, "id", qs++);
|
|
156
168
|
/**
|
|
157
169
|
* The current values of any sources that are updated in this batch
|
|
158
170
|
* They keys of this map are identical to `this.#previous`
|
|
159
171
|
* @type {Map<Source, any>}
|
|
160
172
|
*/
|
|
161
|
-
|
|
173
|
+
Le(this, "current", /* @__PURE__ */ new Map());
|
|
162
174
|
/**
|
|
163
175
|
* The values of any sources that are updated in this batch _before_ those updates took place.
|
|
164
176
|
* They keys of this map are identical to `this.#current`
|
|
165
177
|
* @type {Map<Source, any>}
|
|
166
178
|
*/
|
|
167
|
-
|
|
179
|
+
Le(this, "previous", /* @__PURE__ */ new Map());
|
|
168
180
|
/**
|
|
169
181
|
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
170
182
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
171
183
|
* @type {Set<(batch: Batch) => void>}
|
|
172
184
|
*/
|
|
173
|
-
|
|
185
|
+
O(this, Oe, /* @__PURE__ */ new Set());
|
|
174
186
|
/**
|
|
175
187
|
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
176
188
|
* @type {Set<(batch: Batch) => void>}
|
|
177
189
|
*/
|
|
178
|
-
|
|
190
|
+
O(this, at, /* @__PURE__ */ new Set());
|
|
179
191
|
/**
|
|
180
192
|
* The number of async effects that are currently in flight
|
|
181
193
|
*/
|
|
182
|
-
|
|
194
|
+
O(this, Ke, 0);
|
|
183
195
|
/**
|
|
184
196
|
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
185
197
|
*/
|
|
186
|
-
|
|
198
|
+
O(this, ft, 0);
|
|
187
199
|
/**
|
|
188
200
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
189
201
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
190
202
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
191
203
|
*/
|
|
192
|
-
|
|
204
|
+
O(this, ut, null);
|
|
193
205
|
/**
|
|
194
206
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
195
207
|
* @type {Set<Effect>}
|
|
196
208
|
*/
|
|
197
|
-
|
|
209
|
+
O(this, ct, /* @__PURE__ */ new Set());
|
|
198
210
|
/**
|
|
199
211
|
* Deferred effects that are MAYBE_DIRTY
|
|
200
212
|
* @type {Set<Effect>}
|
|
201
213
|
*/
|
|
202
|
-
|
|
214
|
+
O(this, ze, /* @__PURE__ */ new Set());
|
|
203
215
|
/**
|
|
204
216
|
* A map of branches that still exist, but will be destroyed when this batch
|
|
205
217
|
* is committed — we skip over these during `process`.
|
|
@@ -207,16 +219,16 @@ const Dt = class Dt {
|
|
|
207
219
|
* so they can be rescheduled if the branch survives.
|
|
208
220
|
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
209
221
|
*/
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
222
|
+
O(this, we, /* @__PURE__ */ new Map());
|
|
223
|
+
Le(this, "is_fork", !1);
|
|
224
|
+
O(this, dt, !1);
|
|
213
225
|
}
|
|
214
226
|
/**
|
|
215
227
|
* Add an effect to the #skipped_branches map and reset its children
|
|
216
228
|
* @param {Effect} effect
|
|
217
229
|
*/
|
|
218
230
|
skip_effect(t) {
|
|
219
|
-
|
|
231
|
+
h(this, we).has(t) || h(this, we).set(t, { d: [], m: [] });
|
|
220
232
|
}
|
|
221
233
|
/**
|
|
222
234
|
* Remove an effect from the #skipped_branches map and reschedule
|
|
@@ -224,13 +236,13 @@ const Dt = class Dt {
|
|
|
224
236
|
* @param {Effect} effect
|
|
225
237
|
*/
|
|
226
238
|
unskip_effect(t) {
|
|
227
|
-
var n =
|
|
239
|
+
var n = h(this, we).get(t);
|
|
228
240
|
if (n) {
|
|
229
|
-
|
|
241
|
+
h(this, we).delete(t);
|
|
230
242
|
for (var r of n.d)
|
|
231
|
-
|
|
243
|
+
q(r, X), He(r);
|
|
232
244
|
for (r of n.m)
|
|
233
|
-
|
|
245
|
+
q(r, Ee), He(r);
|
|
234
246
|
}
|
|
235
247
|
}
|
|
236
248
|
/**
|
|
@@ -238,20 +250,20 @@ const Dt = class Dt {
|
|
|
238
250
|
* @param {Effect[]} root_effects
|
|
239
251
|
*/
|
|
240
252
|
process(t) {
|
|
241
|
-
|
|
242
|
-
var n =
|
|
243
|
-
for (const
|
|
244
|
-
|
|
245
|
-
if (
|
|
246
|
-
|
|
247
|
-
for (const [
|
|
248
|
-
|
|
253
|
+
oe = [], this.apply();
|
|
254
|
+
var n = _t = [], r = [];
|
|
255
|
+
for (const s of t)
|
|
256
|
+
ke(this, Q, pn).call(this, s, n, r);
|
|
257
|
+
if (_t = null, ke(this, Q, _n).call(this)) {
|
|
258
|
+
ke(this, Q, mn).call(this, r), ke(this, Q, mn).call(this, n);
|
|
259
|
+
for (const [s, i] of h(this, we))
|
|
260
|
+
dr(s, i);
|
|
249
261
|
} else {
|
|
250
|
-
|
|
251
|
-
for (const
|
|
252
|
-
|
|
262
|
+
D = null;
|
|
263
|
+
for (const s of h(this, Oe)) s(this);
|
|
264
|
+
h(this, Oe).clear(), h(this, Ke) === 0 && ke(this, Q, gn).call(this), Xn(r), Xn(n), h(this, ct).clear(), h(this, ze).clear(), h(this, ut)?.resolve();
|
|
253
265
|
}
|
|
254
|
-
|
|
266
|
+
ve = null;
|
|
255
267
|
}
|
|
256
268
|
/**
|
|
257
269
|
* Associate a change to a given source with the current
|
|
@@ -260,75 +272,75 @@ const Dt = class Dt {
|
|
|
260
272
|
* @param {any} value
|
|
261
273
|
*/
|
|
262
274
|
capture(t, n) {
|
|
263
|
-
n !==
|
|
275
|
+
n !== j && !this.previous.has(t) && this.previous.set(t, n), (t.f & je) === 0 && (this.current.set(t, t.v), ve?.set(t, t.v));
|
|
264
276
|
}
|
|
265
277
|
activate() {
|
|
266
|
-
|
|
278
|
+
D = this, this.apply();
|
|
267
279
|
}
|
|
268
280
|
deactivate() {
|
|
269
|
-
|
|
281
|
+
D === this && (D = null, ve = null);
|
|
270
282
|
}
|
|
271
283
|
flush() {
|
|
272
|
-
if (
|
|
273
|
-
|
|
274
|
-
else if (
|
|
275
|
-
for (const t of
|
|
276
|
-
|
|
284
|
+
if (oe.length > 0)
|
|
285
|
+
D = this, Fs();
|
|
286
|
+
else if (h(this, Ke) === 0 && !this.is_fork) {
|
|
287
|
+
for (const t of h(this, Oe)) t(this);
|
|
288
|
+
h(this, Oe).clear(), ke(this, Q, gn).call(this), h(this, ut)?.resolve();
|
|
277
289
|
}
|
|
278
290
|
this.deactivate();
|
|
279
291
|
}
|
|
280
292
|
discard() {
|
|
281
|
-
for (const t of
|
|
282
|
-
|
|
293
|
+
for (const t of h(this, at)) t(this);
|
|
294
|
+
h(this, at).clear();
|
|
283
295
|
}
|
|
284
296
|
/**
|
|
285
297
|
*
|
|
286
298
|
* @param {boolean} blocking
|
|
287
299
|
*/
|
|
288
300
|
increment(t) {
|
|
289
|
-
|
|
301
|
+
Se(this, Ke, h(this, Ke) + 1), t && Se(this, ft, h(this, ft) + 1);
|
|
290
302
|
}
|
|
291
303
|
/**
|
|
292
304
|
*
|
|
293
305
|
* @param {boolean} blocking
|
|
294
306
|
*/
|
|
295
307
|
decrement(t) {
|
|
296
|
-
|
|
297
|
-
|
|
308
|
+
Se(this, Ke, h(this, Ke) - 1), t && Se(this, ft, h(this, ft) - 1), !h(this, dt) && (Se(this, dt, !0), hn(() => {
|
|
309
|
+
Se(this, dt, !1), ke(this, Q, _n).call(this) ? oe.length > 0 && this.flush() : this.revive();
|
|
298
310
|
}));
|
|
299
311
|
}
|
|
300
312
|
revive() {
|
|
301
|
-
for (const t of
|
|
302
|
-
|
|
303
|
-
for (const t of
|
|
304
|
-
|
|
313
|
+
for (const t of h(this, ct))
|
|
314
|
+
h(this, ze).delete(t), q(t, X), He(t);
|
|
315
|
+
for (const t of h(this, ze))
|
|
316
|
+
q(t, Ee), He(t);
|
|
305
317
|
this.flush();
|
|
306
318
|
}
|
|
307
319
|
/** @param {(batch: Batch) => void} fn */
|
|
308
320
|
oncommit(t) {
|
|
309
|
-
|
|
321
|
+
h(this, Oe).add(t);
|
|
310
322
|
}
|
|
311
323
|
/** @param {(batch: Batch) => void} fn */
|
|
312
324
|
ondiscard(t) {
|
|
313
|
-
|
|
325
|
+
h(this, at).add(t);
|
|
314
326
|
}
|
|
315
327
|
settled() {
|
|
316
|
-
return (
|
|
328
|
+
return (h(this, ut) ?? Se(this, ut, sr())).promise;
|
|
317
329
|
}
|
|
318
330
|
static ensure() {
|
|
319
|
-
if (
|
|
320
|
-
const t =
|
|
321
|
-
|
|
322
|
-
|
|
331
|
+
if (D === null) {
|
|
332
|
+
const t = D = new Fn();
|
|
333
|
+
Ht.add(D), hn(() => {
|
|
334
|
+
D === t && t.flush();
|
|
323
335
|
});
|
|
324
336
|
}
|
|
325
|
-
return
|
|
337
|
+
return D;
|
|
326
338
|
}
|
|
327
339
|
apply() {
|
|
328
340
|
}
|
|
329
341
|
};
|
|
330
|
-
|
|
331
|
-
return this.is_fork ||
|
|
342
|
+
Oe = new WeakMap(), at = new WeakMap(), Ke = new WeakMap(), ft = new WeakMap(), ut = new WeakMap(), ct = new WeakMap(), ze = new WeakMap(), we = new WeakMap(), dt = new WeakMap(), Q = new WeakSet(), _n = function() {
|
|
343
|
+
return this.is_fork || h(this, ft) > 0;
|
|
332
344
|
}, /**
|
|
333
345
|
* Traverse the effect tree, executing effects or stashing
|
|
334
346
|
* them for later execution as appropriate
|
|
@@ -336,334 +348,339 @@ ie = new WeakMap(), Ce = new WeakMap(), pe = new WeakMap(), Te = new WeakMap(),
|
|
|
336
348
|
* @param {Effect[]} effects
|
|
337
349
|
* @param {Effect[]} render_effects
|
|
338
350
|
*/
|
|
339
|
-
|
|
340
|
-
t.f ^=
|
|
341
|
-
for (var
|
|
342
|
-
var
|
|
343
|
-
if (!f &&
|
|
344
|
-
|
|
345
|
-
var
|
|
346
|
-
if (
|
|
347
|
-
|
|
351
|
+
pn = function(t, n, r) {
|
|
352
|
+
t.f ^= B;
|
|
353
|
+
for (var s = t.first; s !== null; ) {
|
|
354
|
+
var i = s.f, o = (i & (pe | bt)) !== 0, a = o && (i & B) !== 0, l = (i & U) !== 0, f = a || h(this, we).has(s);
|
|
355
|
+
if (!f && s.fn !== null) {
|
|
356
|
+
o ? l || (s.f ^= B) : (i & wt) !== 0 ? n.push(s) : (i & (Tt | Sn)) !== 0 && l ? r.push(s) : qt(s) && (gt(s), (i & Ye) !== 0 && (h(this, ze).add(s), l && q(s, X)));
|
|
357
|
+
var u = s.first;
|
|
358
|
+
if (u !== null) {
|
|
359
|
+
s = u;
|
|
348
360
|
continue;
|
|
349
361
|
}
|
|
350
362
|
}
|
|
351
|
-
for (;
|
|
352
|
-
var
|
|
353
|
-
if (
|
|
354
|
-
|
|
363
|
+
for (; s !== null; ) {
|
|
364
|
+
var c = s.next;
|
|
365
|
+
if (c !== null) {
|
|
366
|
+
s = c;
|
|
355
367
|
break;
|
|
356
368
|
}
|
|
357
|
-
|
|
369
|
+
s = s.parent;
|
|
358
370
|
}
|
|
359
371
|
}
|
|
360
372
|
}, /**
|
|
361
373
|
* @param {Effect[]} effects
|
|
362
374
|
*/
|
|
363
|
-
|
|
375
|
+
mn = function(t) {
|
|
364
376
|
for (var n = 0; n < t.length; n += 1)
|
|
365
|
-
|
|
366
|
-
},
|
|
367
|
-
var
|
|
368
|
-
if (
|
|
377
|
+
Ls(t[n], h(this, ct), h(this, ze));
|
|
378
|
+
}, gn = function() {
|
|
379
|
+
var i;
|
|
380
|
+
if (Ht.size > 1) {
|
|
369
381
|
this.previous.clear();
|
|
370
|
-
var t =
|
|
371
|
-
for (const
|
|
372
|
-
if (
|
|
382
|
+
var t = D, n = ve, r = !0;
|
|
383
|
+
for (const o of Ht) {
|
|
384
|
+
if (o === this) {
|
|
373
385
|
r = !1;
|
|
374
386
|
continue;
|
|
375
387
|
}
|
|
376
388
|
const a = [];
|
|
377
|
-
for (const [f,
|
|
378
|
-
if (
|
|
379
|
-
if (r &&
|
|
380
|
-
|
|
389
|
+
for (const [f, u] of this.current) {
|
|
390
|
+
if (o.current.has(f))
|
|
391
|
+
if (r && u !== o.current.get(f))
|
|
392
|
+
o.current.set(f, u);
|
|
381
393
|
else
|
|
382
394
|
continue;
|
|
383
395
|
a.push(f);
|
|
384
396
|
}
|
|
385
397
|
if (a.length === 0)
|
|
386
398
|
continue;
|
|
387
|
-
const
|
|
388
|
-
if (
|
|
389
|
-
var
|
|
390
|
-
|
|
391
|
-
const f = /* @__PURE__ */ new Set(),
|
|
392
|
-
for (const
|
|
393
|
-
|
|
394
|
-
if (
|
|
395
|
-
|
|
396
|
-
for (const
|
|
397
|
-
|
|
398
|
-
|
|
399
|
+
const l = [...o.current.keys()].filter((f) => !this.current.has(f));
|
|
400
|
+
if (l.length > 0) {
|
|
401
|
+
var s = oe;
|
|
402
|
+
oe = [];
|
|
403
|
+
const f = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Map();
|
|
404
|
+
for (const c of a)
|
|
405
|
+
ur(c, l, f, u);
|
|
406
|
+
if (oe.length > 0) {
|
|
407
|
+
D = o, o.apply();
|
|
408
|
+
for (const c of oe)
|
|
409
|
+
ke(i = o, Q, pn).call(i, c, [], []);
|
|
410
|
+
o.deactivate();
|
|
399
411
|
}
|
|
400
|
-
|
|
412
|
+
oe = s;
|
|
401
413
|
}
|
|
402
414
|
}
|
|
403
|
-
|
|
415
|
+
D = t, ve = n;
|
|
404
416
|
}
|
|
405
|
-
|
|
417
|
+
h(this, we).clear(), Ht.delete(this);
|
|
406
418
|
};
|
|
407
|
-
let
|
|
408
|
-
function
|
|
419
|
+
let Ut = Fn;
|
|
420
|
+
function Fs() {
|
|
409
421
|
var e = null;
|
|
410
422
|
try {
|
|
411
|
-
for (var t = 0;
|
|
412
|
-
var n =
|
|
423
|
+
for (var t = 0; oe.length > 0; ) {
|
|
424
|
+
var n = Ut.ensure();
|
|
413
425
|
if (t++ > 1e3) {
|
|
414
|
-
var r,
|
|
415
|
-
|
|
426
|
+
var r, s;
|
|
427
|
+
Os();
|
|
416
428
|
}
|
|
417
|
-
n.process(
|
|
429
|
+
n.process(oe), Be.clear();
|
|
418
430
|
}
|
|
419
431
|
} finally {
|
|
420
|
-
|
|
432
|
+
oe = [], An = null, _t = null;
|
|
421
433
|
}
|
|
422
434
|
}
|
|
423
|
-
function
|
|
435
|
+
function Os() {
|
|
424
436
|
try {
|
|
425
|
-
|
|
437
|
+
Ms();
|
|
426
438
|
} catch (e) {
|
|
427
|
-
|
|
439
|
+
Wt(e, An);
|
|
428
440
|
}
|
|
429
441
|
}
|
|
430
|
-
let
|
|
431
|
-
function
|
|
442
|
+
let Me = null;
|
|
443
|
+
function Xn(e) {
|
|
432
444
|
var t = e.length;
|
|
433
445
|
if (t !== 0) {
|
|
434
446
|
for (var n = 0; n < t; ) {
|
|
435
447
|
var r = e[n++];
|
|
436
|
-
if ((r.f & (
|
|
437
|
-
|
|
438
|
-
for (const
|
|
439
|
-
if ((
|
|
440
|
-
const
|
|
441
|
-
let
|
|
442
|
-
for (;
|
|
443
|
-
|
|
444
|
-
for (let a =
|
|
445
|
-
const
|
|
446
|
-
(
|
|
448
|
+
if ((r.f & (Te | U)) === 0 && qt(r) && (Me = /* @__PURE__ */ new Set(), gt(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Er(r), Me?.size > 0)) {
|
|
449
|
+
Be.clear();
|
|
450
|
+
for (const s of Me) {
|
|
451
|
+
if ((s.f & (Te | U)) !== 0) continue;
|
|
452
|
+
const i = [s];
|
|
453
|
+
let o = s.parent;
|
|
454
|
+
for (; o !== null; )
|
|
455
|
+
Me.has(o) && (Me.delete(o), i.push(o)), o = o.parent;
|
|
456
|
+
for (let a = i.length - 1; a >= 0; a--) {
|
|
457
|
+
const l = i[a];
|
|
458
|
+
(l.f & (Te | U)) === 0 && gt(l);
|
|
447
459
|
}
|
|
448
460
|
}
|
|
449
|
-
|
|
461
|
+
Me.clear();
|
|
450
462
|
}
|
|
451
463
|
}
|
|
452
|
-
|
|
464
|
+
Me = null;
|
|
453
465
|
}
|
|
454
466
|
}
|
|
455
|
-
function
|
|
467
|
+
function ur(e, t, n, r) {
|
|
456
468
|
if (!n.has(e) && (n.add(e), e.reactions !== null))
|
|
457
|
-
for (const
|
|
458
|
-
const
|
|
459
|
-
(
|
|
469
|
+
for (const s of e.reactions) {
|
|
470
|
+
const i = s.f;
|
|
471
|
+
(i & V) !== 0 ? ur(
|
|
460
472
|
/** @type {Derived} */
|
|
461
|
-
|
|
473
|
+
s,
|
|
462
474
|
t,
|
|
463
475
|
n,
|
|
464
476
|
r
|
|
465
|
-
) : (
|
|
477
|
+
) : (i & (kn | Ye)) !== 0 && (i & X) === 0 && cr(s, t, r) && (q(s, X), He(
|
|
466
478
|
/** @type {Effect} */
|
|
467
|
-
|
|
479
|
+
s
|
|
468
480
|
));
|
|
469
481
|
}
|
|
470
482
|
}
|
|
471
|
-
function
|
|
483
|
+
function cr(e, t, n) {
|
|
472
484
|
const r = n.get(e);
|
|
473
485
|
if (r !== void 0) return r;
|
|
474
486
|
if (e.deps !== null)
|
|
475
|
-
for (const
|
|
476
|
-
if (
|
|
487
|
+
for (const s of e.deps) {
|
|
488
|
+
if (vt.call(t, s))
|
|
477
489
|
return !0;
|
|
478
|
-
if ((
|
|
490
|
+
if ((s.f & V) !== 0 && cr(
|
|
479
491
|
/** @type {Derived} */
|
|
480
|
-
|
|
492
|
+
s,
|
|
481
493
|
t,
|
|
482
494
|
n
|
|
483
495
|
))
|
|
484
496
|
return n.set(
|
|
485
497
|
/** @type {Derived} */
|
|
486
|
-
|
|
498
|
+
s,
|
|
487
499
|
!0
|
|
488
500
|
), !0;
|
|
489
501
|
}
|
|
490
502
|
return n.set(e, !1), !1;
|
|
491
503
|
}
|
|
492
|
-
function
|
|
493
|
-
var t =
|
|
494
|
-
if (n?.is_pending && (e.f & (
|
|
504
|
+
function He(e) {
|
|
505
|
+
var t = An = e, n = t.b;
|
|
506
|
+
if (n?.is_pending && (e.f & (wt | Tt | Sn)) !== 0 && (e.f & yt) === 0) {
|
|
495
507
|
n.defer_effect(e);
|
|
496
508
|
return;
|
|
497
509
|
}
|
|
498
510
|
for (; t.parent !== null; ) {
|
|
499
511
|
t = t.parent;
|
|
500
512
|
var r = t.f;
|
|
501
|
-
if (
|
|
513
|
+
if (_t !== null && t === C && (e.f & Tt) === 0)
|
|
502
514
|
return;
|
|
503
|
-
if ((r & (
|
|
504
|
-
if ((r &
|
|
515
|
+
if ((r & (bt | pe)) !== 0) {
|
|
516
|
+
if ((r & B) === 0)
|
|
505
517
|
return;
|
|
506
|
-
t.f ^=
|
|
518
|
+
t.f ^= B;
|
|
507
519
|
}
|
|
508
520
|
}
|
|
509
|
-
|
|
521
|
+
oe.push(t);
|
|
510
522
|
}
|
|
511
|
-
function
|
|
512
|
-
if (!((e.f &
|
|
513
|
-
(e.f &
|
|
523
|
+
function dr(e, t) {
|
|
524
|
+
if (!((e.f & pe) !== 0 && (e.f & B) !== 0)) {
|
|
525
|
+
(e.f & X) !== 0 ? t.d.push(e) : (e.f & Ee) !== 0 && t.m.push(e), q(e, B);
|
|
514
526
|
for (var n = e.first; n !== null; )
|
|
515
|
-
|
|
527
|
+
dr(n, t), n = n.next;
|
|
516
528
|
}
|
|
517
529
|
}
|
|
518
|
-
function
|
|
519
|
-
const
|
|
520
|
-
var
|
|
521
|
-
if (n.length === 0 &&
|
|
522
|
-
r(t.map(
|
|
530
|
+
function zs(e, t, n, r) {
|
|
531
|
+
const s = Rn;
|
|
532
|
+
var i = e.filter((c) => !c.settled);
|
|
533
|
+
if (n.length === 0 && i.length === 0) {
|
|
534
|
+
r(t.map(s));
|
|
523
535
|
return;
|
|
524
536
|
}
|
|
525
|
-
var
|
|
537
|
+
var o = (
|
|
526
538
|
/** @type {Effect} */
|
|
527
|
-
|
|
528
|
-
), a =
|
|
529
|
-
function f(
|
|
539
|
+
C
|
|
540
|
+
), a = Hs(), l = i.length === 1 ? i[0].promise : i.length > 1 ? Promise.all(i.map((c) => c.promise)) : null;
|
|
541
|
+
function f(c) {
|
|
530
542
|
a();
|
|
531
543
|
try {
|
|
532
|
-
r(
|
|
533
|
-
} catch (
|
|
534
|
-
(
|
|
544
|
+
r(c);
|
|
545
|
+
} catch (v) {
|
|
546
|
+
(o.f & Te) === 0 && Wt(v, o);
|
|
535
547
|
}
|
|
536
|
-
|
|
548
|
+
wn();
|
|
537
549
|
}
|
|
538
550
|
if (n.length === 0) {
|
|
539
|
-
|
|
551
|
+
l.then(() => f(t.map(s)));
|
|
540
552
|
return;
|
|
541
553
|
}
|
|
542
|
-
function
|
|
543
|
-
a(), Promise.all(n.map((
|
|
554
|
+
function u() {
|
|
555
|
+
a(), Promise.all(n.map((c) => /* @__PURE__ */ Bs(c))).then((c) => f([...t.map(s), ...c])).catch((c) => Wt(c, o));
|
|
544
556
|
}
|
|
545
|
-
|
|
557
|
+
l ? l.then(u) : u();
|
|
546
558
|
}
|
|
547
|
-
function
|
|
548
|
-
var e =
|
|
549
|
-
return function(
|
|
550
|
-
|
|
559
|
+
function Hs() {
|
|
560
|
+
var e = C, t = x, n = ue, r = D;
|
|
561
|
+
return function(i = !0) {
|
|
562
|
+
mt(e), Ve(t), Xt(n), i && r?.activate();
|
|
551
563
|
};
|
|
552
564
|
}
|
|
553
|
-
function
|
|
554
|
-
|
|
565
|
+
function wn(e = !0) {
|
|
566
|
+
mt(null), Ve(null), Xt(null), e && D?.deactivate();
|
|
555
567
|
}
|
|
556
|
-
function
|
|
568
|
+
function js() {
|
|
557
569
|
var e = (
|
|
558
570
|
/** @type {Boundary} */
|
|
559
571
|
/** @type {Effect} */
|
|
560
|
-
|
|
572
|
+
C.b
|
|
561
573
|
), t = (
|
|
562
574
|
/** @type {Batch} */
|
|
563
|
-
|
|
575
|
+
D
|
|
564
576
|
), n = e.is_rendered();
|
|
565
577
|
return e.update_pending_count(1), t.increment(n), () => {
|
|
566
578
|
e.update_pending_count(-1), t.decrement(n);
|
|
567
579
|
};
|
|
568
580
|
}
|
|
569
581
|
// @__NO_SIDE_EFFECTS__
|
|
570
|
-
function
|
|
571
|
-
var t =
|
|
582
|
+
function Rn(e) {
|
|
583
|
+
var t = V | X, n = x !== null && (x.f & V) !== 0 ? (
|
|
572
584
|
/** @type {Derived} */
|
|
573
|
-
|
|
585
|
+
x
|
|
574
586
|
) : null;
|
|
575
|
-
return
|
|
576
|
-
ctx:
|
|
587
|
+
return C !== null && (C.f |= Kt), {
|
|
588
|
+
ctx: ue,
|
|
577
589
|
deps: null,
|
|
578
590
|
effects: null,
|
|
579
|
-
equals:
|
|
591
|
+
equals: or,
|
|
580
592
|
f: t,
|
|
581
593
|
fn: e,
|
|
582
594
|
reactions: null,
|
|
583
595
|
rv: 0,
|
|
584
596
|
v: (
|
|
585
597
|
/** @type {V} */
|
|
586
|
-
|
|
598
|
+
j
|
|
587
599
|
),
|
|
588
600
|
wv: 0,
|
|
589
|
-
parent: n ??
|
|
601
|
+
parent: n ?? C,
|
|
590
602
|
ac: null
|
|
591
603
|
};
|
|
592
604
|
}
|
|
593
605
|
// @__NO_SIDE_EFFECTS__
|
|
594
|
-
function
|
|
606
|
+
function Bs(e, t, n) {
|
|
595
607
|
/** @type {Effect | null} */
|
|
596
|
-
|
|
597
|
-
var
|
|
608
|
+
C === null && ys();
|
|
609
|
+
var s = (
|
|
598
610
|
/** @type {Promise<V>} */
|
|
599
611
|
/** @type {unknown} */
|
|
600
612
|
void 0
|
|
601
|
-
),
|
|
613
|
+
), i = At(
|
|
602
614
|
/** @type {V} */
|
|
603
|
-
|
|
604
|
-
),
|
|
605
|
-
return
|
|
606
|
-
var
|
|
607
|
-
|
|
615
|
+
j
|
|
616
|
+
), o = !x, a = /* @__PURE__ */ new Map();
|
|
617
|
+
return ri(() => {
|
|
618
|
+
var l = sr();
|
|
619
|
+
s = l.promise;
|
|
608
620
|
try {
|
|
609
|
-
Promise.resolve(e()).then(
|
|
610
|
-
} catch (
|
|
611
|
-
|
|
621
|
+
Promise.resolve(e()).then(l.resolve, l.reject).finally(wn);
|
|
622
|
+
} catch (v) {
|
|
623
|
+
l.reject(v), wn();
|
|
612
624
|
}
|
|
613
625
|
var f = (
|
|
614
626
|
/** @type {Batch} */
|
|
615
|
-
|
|
627
|
+
D
|
|
616
628
|
);
|
|
617
|
-
if (
|
|
618
|
-
var
|
|
619
|
-
a.get(f)?.reject(
|
|
629
|
+
if (o) {
|
|
630
|
+
var u = js();
|
|
631
|
+
a.get(f)?.reject(Ge), a.delete(f), a.set(f, l);
|
|
620
632
|
}
|
|
621
|
-
const
|
|
622
|
-
if (f.activate(),
|
|
623
|
-
|
|
633
|
+
const c = (v, g = void 0) => {
|
|
634
|
+
if (f.activate(), g)
|
|
635
|
+
g !== Ge && (i.f |= je, Rt(i, g));
|
|
624
636
|
else {
|
|
625
|
-
(
|
|
626
|
-
for (const [
|
|
627
|
-
if (a.delete(
|
|
628
|
-
|
|
637
|
+
(i.f & je) !== 0 && (i.f ^= je), Rt(i, v);
|
|
638
|
+
for (const [p, T] of a) {
|
|
639
|
+
if (a.delete(p), p === f) break;
|
|
640
|
+
T.reject(Ge);
|
|
629
641
|
}
|
|
630
642
|
}
|
|
631
|
-
|
|
643
|
+
u && u();
|
|
632
644
|
};
|
|
633
|
-
|
|
634
|
-
}),
|
|
635
|
-
for (const
|
|
636
|
-
|
|
637
|
-
}), new Promise((
|
|
638
|
-
function f(
|
|
639
|
-
function
|
|
640
|
-
|
|
645
|
+
l.promise.then(c, (v) => c(null, v || "unknown"));
|
|
646
|
+
}), ti(() => {
|
|
647
|
+
for (const l of a.values())
|
|
648
|
+
l.reject(Ge);
|
|
649
|
+
}), new Promise((l) => {
|
|
650
|
+
function f(u) {
|
|
651
|
+
function c() {
|
|
652
|
+
u === s ? l(i) : f(s);
|
|
641
653
|
}
|
|
642
|
-
|
|
654
|
+
u.then(c, c);
|
|
643
655
|
}
|
|
644
|
-
f(
|
|
656
|
+
f(s);
|
|
645
657
|
});
|
|
646
658
|
}
|
|
647
659
|
// @__NO_SIDE_EFFECTS__
|
|
648
|
-
function
|
|
649
|
-
const t = /* @__PURE__ */
|
|
650
|
-
return
|
|
660
|
+
function it(e) {
|
|
661
|
+
const t = /* @__PURE__ */ Rn(e);
|
|
662
|
+
return Cr(t), t;
|
|
651
663
|
}
|
|
652
|
-
|
|
664
|
+
// @__NO_SIDE_EFFECTS__
|
|
665
|
+
function Vs(e) {
|
|
666
|
+
const t = /* @__PURE__ */ Rn(e);
|
|
667
|
+
return t.equals = lr, t;
|
|
668
|
+
}
|
|
669
|
+
function Ys(e) {
|
|
653
670
|
var t = e.effects;
|
|
654
671
|
if (t !== null) {
|
|
655
672
|
e.effects = null;
|
|
656
673
|
for (var n = 0; n < t.length; n += 1)
|
|
657
|
-
|
|
674
|
+
Ae(
|
|
658
675
|
/** @type {Effect} */
|
|
659
676
|
t[n]
|
|
660
677
|
);
|
|
661
678
|
}
|
|
662
679
|
}
|
|
663
|
-
function
|
|
680
|
+
function Xs(e) {
|
|
664
681
|
for (var t = e.parent; t !== null; ) {
|
|
665
|
-
if ((t.f &
|
|
666
|
-
return (t.f &
|
|
682
|
+
if ((t.f & V) === 0)
|
|
683
|
+
return (t.f & Te) === 0 ? (
|
|
667
684
|
/** @type {Effect} */
|
|
668
685
|
t
|
|
669
686
|
) : null;
|
|
@@ -671,302 +688,310 @@ function Ar(e) {
|
|
|
671
688
|
}
|
|
672
689
|
return null;
|
|
673
690
|
}
|
|
674
|
-
function
|
|
675
|
-
var t, n =
|
|
676
|
-
|
|
691
|
+
function In(e) {
|
|
692
|
+
var t, n = C;
|
|
693
|
+
mt(Xs(e));
|
|
677
694
|
try {
|
|
678
|
-
e.f &= ~
|
|
695
|
+
e.f &= ~et, Ys(e), t = Ir(e);
|
|
679
696
|
} finally {
|
|
680
|
-
|
|
697
|
+
mt(n);
|
|
681
698
|
}
|
|
682
699
|
return t;
|
|
683
700
|
}
|
|
684
|
-
function
|
|
685
|
-
var t =
|
|
686
|
-
if (!e.equals(t) && (e.wv =
|
|
687
|
-
|
|
701
|
+
function vr(e) {
|
|
702
|
+
var t = In(e);
|
|
703
|
+
if (!e.equals(t) && (e.wv = Ar(), (!D?.is_fork || e.deps === null) && (e.v = t, e.deps === null))) {
|
|
704
|
+
q(e, B);
|
|
688
705
|
return;
|
|
689
706
|
}
|
|
690
|
-
|
|
707
|
+
tt || (ve !== null ? (br() || D?.is_fork) && ve.set(e, t) : Tn(e));
|
|
691
708
|
}
|
|
692
|
-
function
|
|
709
|
+
function Ws(e) {
|
|
693
710
|
if (e.effects !== null)
|
|
694
711
|
for (const t of e.effects)
|
|
695
|
-
(t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(
|
|
712
|
+
(t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Ge), t.teardown = Vt, t.ac = null, Dt(t, 0), Pn(t));
|
|
696
713
|
}
|
|
697
|
-
function
|
|
714
|
+
function hr(e) {
|
|
698
715
|
if (e.effects !== null)
|
|
699
716
|
for (const t of e.effects)
|
|
700
|
-
t.teardown &&
|
|
717
|
+
t.teardown && gt(t);
|
|
701
718
|
}
|
|
702
|
-
let
|
|
703
|
-
const
|
|
704
|
-
let
|
|
705
|
-
function
|
|
719
|
+
let bn = /* @__PURE__ */ new Set();
|
|
720
|
+
const Be = /* @__PURE__ */ new Map();
|
|
721
|
+
let _r = !1;
|
|
722
|
+
function At(e, t) {
|
|
706
723
|
var n = {
|
|
707
724
|
f: 0,
|
|
708
725
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
709
726
|
v: e,
|
|
710
727
|
reactions: null,
|
|
711
|
-
equals:
|
|
728
|
+
equals: or,
|
|
712
729
|
rv: 0,
|
|
713
730
|
wv: 0
|
|
714
731
|
};
|
|
715
732
|
return n;
|
|
716
733
|
}
|
|
717
734
|
// @__NO_SIDE_EFFECTS__
|
|
718
|
-
function
|
|
719
|
-
const n =
|
|
720
|
-
return
|
|
735
|
+
function I(e, t) {
|
|
736
|
+
const n = At(e);
|
|
737
|
+
return Cr(n), n;
|
|
738
|
+
}
|
|
739
|
+
// @__NO_SIDE_EFFECTS__
|
|
740
|
+
function Us(e, t = !1, n = !0) {
|
|
741
|
+
const r = At(e);
|
|
742
|
+
return t || (r.equals = lr), r;
|
|
721
743
|
}
|
|
722
|
-
function
|
|
723
|
-
|
|
744
|
+
function b(e, t, n = !1) {
|
|
745
|
+
x !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
724
746
|
// to ensure we error if state is set inside an inspect effect
|
|
725
|
-
(!
|
|
726
|
-
let r = n ?
|
|
727
|
-
return
|
|
747
|
+
(!he || (x.f & Yn) !== 0) && ar() && (x.f & (V | Ye | kn | Yn)) !== 0 && (fe === null || !vt.call(fe, e)) && As();
|
|
748
|
+
let r = n ? Ce(t) : t;
|
|
749
|
+
return Rt(e, r);
|
|
728
750
|
}
|
|
729
|
-
function
|
|
751
|
+
function Rt(e, t) {
|
|
730
752
|
if (!e.equals(t)) {
|
|
731
753
|
var n = e.v;
|
|
732
|
-
|
|
733
|
-
var r =
|
|
734
|
-
if (r.capture(e, n), (e.f &
|
|
735
|
-
const
|
|
754
|
+
tt ? Be.set(e, t) : Be.set(e, n), e.v = t;
|
|
755
|
+
var r = Ut.ensure();
|
|
756
|
+
if (r.capture(e, n), (e.f & V) !== 0) {
|
|
757
|
+
const s = (
|
|
736
758
|
/** @type {Derived} */
|
|
737
759
|
e
|
|
738
760
|
);
|
|
739
|
-
(e.f &
|
|
761
|
+
(e.f & X) !== 0 && In(s), Tn(s);
|
|
740
762
|
}
|
|
741
|
-
e.wv =
|
|
763
|
+
e.wv = Ar(), pr(e, X), C !== null && (C.f & B) !== 0 && (C.f & (pe | bt)) === 0 && (ie === null ? oi([e]) : ie.push(e)), !r.is_fork && bn.size > 0 && !_r && Gs();
|
|
742
764
|
}
|
|
743
765
|
return t;
|
|
744
766
|
}
|
|
745
|
-
function
|
|
746
|
-
|
|
747
|
-
for (const e of
|
|
748
|
-
(e.f &
|
|
749
|
-
|
|
767
|
+
function Gs() {
|
|
768
|
+
_r = !1;
|
|
769
|
+
for (const e of bn)
|
|
770
|
+
(e.f & B) !== 0 && q(e, Ee), qt(e) && gt(e);
|
|
771
|
+
bn.clear();
|
|
750
772
|
}
|
|
751
|
-
function
|
|
752
|
-
|
|
773
|
+
function an(e) {
|
|
774
|
+
b(e, e.v + 1);
|
|
753
775
|
}
|
|
754
|
-
function
|
|
776
|
+
function pr(e, t) {
|
|
755
777
|
var n = e.reactions;
|
|
756
778
|
if (n !== null)
|
|
757
|
-
for (var r = n.length,
|
|
758
|
-
var
|
|
759
|
-
if (a &&
|
|
760
|
-
var
|
|
779
|
+
for (var r = n.length, s = 0; s < r; s++) {
|
|
780
|
+
var i = n[s], o = i.f, a = (o & X) === 0;
|
|
781
|
+
if (a && q(i, t), (o & V) !== 0) {
|
|
782
|
+
var l = (
|
|
761
783
|
/** @type {Derived} */
|
|
762
|
-
|
|
784
|
+
i
|
|
763
785
|
);
|
|
764
|
-
|
|
765
|
-
} else a && ((
|
|
786
|
+
ve?.delete(l), (o & et) === 0 && (o & ae && (i.f |= et), pr(l, Ee));
|
|
787
|
+
} else a && ((o & Ye) !== 0 && Me !== null && Me.add(
|
|
766
788
|
/** @type {Effect} */
|
|
767
|
-
|
|
768
|
-
),
|
|
789
|
+
i
|
|
790
|
+
), He(
|
|
769
791
|
/** @type {Effect} */
|
|
770
|
-
|
|
792
|
+
i
|
|
771
793
|
));
|
|
772
794
|
}
|
|
773
795
|
}
|
|
774
|
-
function
|
|
775
|
-
if (typeof e != "object" || e === null ||
|
|
796
|
+
function Ce(e) {
|
|
797
|
+
if (typeof e != "object" || e === null || ln in e)
|
|
776
798
|
return e;
|
|
777
|
-
const t =
|
|
778
|
-
if (t !==
|
|
799
|
+
const t = rr(e);
|
|
800
|
+
if (t !== vs && t !== hs)
|
|
779
801
|
return e;
|
|
780
|
-
var n = /* @__PURE__ */ new Map(), r =
|
|
781
|
-
if (
|
|
802
|
+
var n = /* @__PURE__ */ new Map(), r = nr(e), s = /* @__PURE__ */ I(0), i = Qe, o = (a) => {
|
|
803
|
+
if (Qe === i)
|
|
782
804
|
return a();
|
|
783
|
-
var
|
|
784
|
-
|
|
785
|
-
var
|
|
786
|
-
return
|
|
805
|
+
var l = x, f = Qe;
|
|
806
|
+
Ve(null), Un(i);
|
|
807
|
+
var u = a();
|
|
808
|
+
return Ve(l), Un(f), u;
|
|
787
809
|
};
|
|
788
|
-
return r && n.set("length", /* @__PURE__ */
|
|
810
|
+
return r && n.set("length", /* @__PURE__ */ I(
|
|
789
811
|
/** @type {any[]} */
|
|
790
812
|
e.length
|
|
791
813
|
)), new Proxy(
|
|
792
814
|
/** @type {any} */
|
|
793
815
|
e,
|
|
794
816
|
{
|
|
795
|
-
defineProperty(a,
|
|
796
|
-
(!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) &&
|
|
797
|
-
var
|
|
798
|
-
return
|
|
799
|
-
var
|
|
800
|
-
return n.set(
|
|
801
|
-
}) :
|
|
817
|
+
defineProperty(a, l, f) {
|
|
818
|
+
(!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) && Cs();
|
|
819
|
+
var u = n.get(l);
|
|
820
|
+
return u === void 0 ? o(() => {
|
|
821
|
+
var c = /* @__PURE__ */ I(f.value);
|
|
822
|
+
return n.set(l, c), c;
|
|
823
|
+
}) : b(u, f.value, !0), !0;
|
|
802
824
|
},
|
|
803
|
-
deleteProperty(a,
|
|
804
|
-
var f = n.get(
|
|
825
|
+
deleteProperty(a, l) {
|
|
826
|
+
var f = n.get(l);
|
|
805
827
|
if (f === void 0) {
|
|
806
|
-
if (
|
|
807
|
-
const
|
|
808
|
-
n.set(
|
|
828
|
+
if (l in a) {
|
|
829
|
+
const u = o(() => /* @__PURE__ */ I(j));
|
|
830
|
+
n.set(l, u), an(s);
|
|
809
831
|
}
|
|
810
832
|
} else
|
|
811
|
-
|
|
833
|
+
b(f, j), an(s);
|
|
812
834
|
return !0;
|
|
813
835
|
},
|
|
814
|
-
get(a,
|
|
815
|
-
if (
|
|
836
|
+
get(a, l, f) {
|
|
837
|
+
if (l === ln)
|
|
816
838
|
return e;
|
|
817
|
-
var
|
|
818
|
-
if (
|
|
819
|
-
var
|
|
820
|
-
return
|
|
821
|
-
}), n.set(
|
|
822
|
-
var
|
|
823
|
-
return
|
|
839
|
+
var u = n.get(l), c = l in a;
|
|
840
|
+
if (u === void 0 && (!c || on(a, l)?.writable) && (u = o(() => {
|
|
841
|
+
var g = Ce(c ? a[l] : j), p = /* @__PURE__ */ I(g);
|
|
842
|
+
return p;
|
|
843
|
+
}), n.set(l, u)), u !== void 0) {
|
|
844
|
+
var v = _(u);
|
|
845
|
+
return v === j ? void 0 : v;
|
|
824
846
|
}
|
|
825
|
-
return Reflect.get(a,
|
|
847
|
+
return Reflect.get(a, l, f);
|
|
826
848
|
},
|
|
827
|
-
getOwnPropertyDescriptor(a,
|
|
828
|
-
var f = Reflect.getOwnPropertyDescriptor(a,
|
|
849
|
+
getOwnPropertyDescriptor(a, l) {
|
|
850
|
+
var f = Reflect.getOwnPropertyDescriptor(a, l);
|
|
829
851
|
if (f && "value" in f) {
|
|
830
|
-
var
|
|
831
|
-
|
|
852
|
+
var u = n.get(l);
|
|
853
|
+
u && (f.value = _(u));
|
|
832
854
|
} else if (f === void 0) {
|
|
833
|
-
var
|
|
834
|
-
if (
|
|
855
|
+
var c = n.get(l), v = c?.v;
|
|
856
|
+
if (c !== void 0 && v !== j)
|
|
835
857
|
return {
|
|
836
858
|
enumerable: !0,
|
|
837
859
|
configurable: !0,
|
|
838
|
-
value:
|
|
860
|
+
value: v,
|
|
839
861
|
writable: !0
|
|
840
862
|
};
|
|
841
863
|
}
|
|
842
864
|
return f;
|
|
843
865
|
},
|
|
844
|
-
has(a,
|
|
845
|
-
if (
|
|
866
|
+
has(a, l) {
|
|
867
|
+
if (l === ln)
|
|
846
868
|
return !0;
|
|
847
|
-
var f = n.get(
|
|
848
|
-
if (f !== void 0 ||
|
|
849
|
-
f === void 0 && (f =
|
|
850
|
-
var
|
|
851
|
-
return
|
|
852
|
-
}), n.set(
|
|
853
|
-
var
|
|
854
|
-
if (
|
|
869
|
+
var f = n.get(l), u = f !== void 0 && f.v !== j || Reflect.has(a, l);
|
|
870
|
+
if (f !== void 0 || C !== null && (!u || on(a, l)?.writable)) {
|
|
871
|
+
f === void 0 && (f = o(() => {
|
|
872
|
+
var v = u ? Ce(a[l]) : j, g = /* @__PURE__ */ I(v);
|
|
873
|
+
return g;
|
|
874
|
+
}), n.set(l, f));
|
|
875
|
+
var c = _(f);
|
|
876
|
+
if (c === j)
|
|
855
877
|
return !1;
|
|
856
878
|
}
|
|
857
|
-
return
|
|
879
|
+
return u;
|
|
858
880
|
},
|
|
859
|
-
set(a,
|
|
860
|
-
var
|
|
861
|
-
if (r &&
|
|
862
|
-
for (var
|
|
863
|
-
|
|
864
|
-
var
|
|
865
|
-
|
|
881
|
+
set(a, l, f, u) {
|
|
882
|
+
var c = n.get(l), v = l in a;
|
|
883
|
+
if (r && l === "length")
|
|
884
|
+
for (var g = f; g < /** @type {Source<number>} */
|
|
885
|
+
c.v; g += 1) {
|
|
886
|
+
var p = n.get(g + "");
|
|
887
|
+
p !== void 0 ? b(p, j) : g in a && (p = o(() => /* @__PURE__ */ I(j)), n.set(g + "", p));
|
|
866
888
|
}
|
|
867
|
-
if (
|
|
868
|
-
(!
|
|
889
|
+
if (c === void 0)
|
|
890
|
+
(!v || on(a, l)?.writable) && (c = o(() => /* @__PURE__ */ I(void 0)), b(c, Ce(f)), n.set(l, c));
|
|
869
891
|
else {
|
|
870
|
-
|
|
871
|
-
var
|
|
872
|
-
|
|
892
|
+
v = c.v !== j;
|
|
893
|
+
var T = o(() => Ce(f));
|
|
894
|
+
b(c, T);
|
|
873
895
|
}
|
|
874
|
-
var
|
|
875
|
-
if (
|
|
876
|
-
if (r && typeof
|
|
877
|
-
var
|
|
896
|
+
var d = Reflect.getOwnPropertyDescriptor(a, l);
|
|
897
|
+
if (d?.set && d.set.call(u, f), !v) {
|
|
898
|
+
if (r && typeof l == "string") {
|
|
899
|
+
var w = (
|
|
878
900
|
/** @type {Source<number>} */
|
|
879
901
|
n.get("length")
|
|
880
|
-
),
|
|
881
|
-
Number.isInteger(
|
|
902
|
+
), L = Number(l);
|
|
903
|
+
Number.isInteger(L) && L >= w.v && b(w, L + 1);
|
|
882
904
|
}
|
|
883
|
-
|
|
905
|
+
an(s);
|
|
884
906
|
}
|
|
885
907
|
return !0;
|
|
886
908
|
},
|
|
887
909
|
ownKeys(a) {
|
|
888
|
-
|
|
889
|
-
var
|
|
890
|
-
var
|
|
891
|
-
return
|
|
910
|
+
_(s);
|
|
911
|
+
var l = Reflect.ownKeys(a).filter((c) => {
|
|
912
|
+
var v = n.get(c);
|
|
913
|
+
return v === void 0 || v.v !== j;
|
|
892
914
|
});
|
|
893
|
-
for (var [f,
|
|
894
|
-
|
|
895
|
-
return
|
|
915
|
+
for (var [f, u] of n)
|
|
916
|
+
u.v !== j && !(f in a) && l.push(f);
|
|
917
|
+
return l;
|
|
896
918
|
},
|
|
897
919
|
setPrototypeOf() {
|
|
898
|
-
|
|
920
|
+
Ts();
|
|
899
921
|
}
|
|
900
922
|
}
|
|
901
923
|
);
|
|
902
924
|
}
|
|
903
|
-
var
|
|
904
|
-
function
|
|
925
|
+
var Zs, Ks, Js;
|
|
926
|
+
function ot(e = "") {
|
|
905
927
|
return document.createTextNode(e);
|
|
906
928
|
}
|
|
907
929
|
// @__NO_SIDE_EFFECTS__
|
|
908
|
-
function
|
|
930
|
+
function pt(e) {
|
|
909
931
|
return (
|
|
910
932
|
/** @type {TemplateNode | null} */
|
|
911
|
-
|
|
933
|
+
Ks.call(e)
|
|
912
934
|
);
|
|
913
935
|
}
|
|
914
936
|
// @__NO_SIDE_EFFECTS__
|
|
915
|
-
function
|
|
937
|
+
function Lt(e) {
|
|
916
938
|
return (
|
|
917
939
|
/** @type {TemplateNode | null} */
|
|
918
|
-
|
|
940
|
+
Js.call(e)
|
|
919
941
|
);
|
|
920
942
|
}
|
|
921
|
-
function
|
|
922
|
-
return /* @__PURE__ */
|
|
943
|
+
function E(e, t) {
|
|
944
|
+
return /* @__PURE__ */ pt(e);
|
|
923
945
|
}
|
|
924
|
-
function
|
|
946
|
+
function lt(e, t = !1) {
|
|
925
947
|
{
|
|
926
|
-
var n = /* @__PURE__ */
|
|
927
|
-
return n instanceof Comment && n.data === "" ? /* @__PURE__ */
|
|
948
|
+
var n = /* @__PURE__ */ pt(e);
|
|
949
|
+
return n instanceof Comment && n.data === "" ? /* @__PURE__ */ Lt(n) : n;
|
|
928
950
|
}
|
|
929
951
|
}
|
|
930
|
-
function
|
|
952
|
+
function R(e, t = 1, n = !1) {
|
|
931
953
|
let r = e;
|
|
932
954
|
for (; t--; )
|
|
933
955
|
r = /** @type {TemplateNode} */
|
|
934
|
-
/* @__PURE__ */
|
|
956
|
+
/* @__PURE__ */ Lt(r);
|
|
935
957
|
return r;
|
|
936
958
|
}
|
|
937
|
-
function
|
|
959
|
+
function Qs(e) {
|
|
960
|
+
e.textContent = "";
|
|
961
|
+
}
|
|
962
|
+
function mr() {
|
|
938
963
|
return !1;
|
|
939
964
|
}
|
|
940
|
-
function
|
|
965
|
+
function gr(e, t, n) {
|
|
941
966
|
return (
|
|
942
967
|
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
943
|
-
document.createElementNS(
|
|
968
|
+
document.createElementNS(tr, e, void 0)
|
|
944
969
|
);
|
|
945
970
|
}
|
|
946
|
-
function
|
|
947
|
-
var t =
|
|
948
|
-
|
|
971
|
+
function wr(e) {
|
|
972
|
+
var t = x, n = C;
|
|
973
|
+
Ve(null), mt(null);
|
|
949
974
|
try {
|
|
950
975
|
return e();
|
|
951
976
|
} finally {
|
|
952
|
-
|
|
977
|
+
Ve(t), mt(n);
|
|
953
978
|
}
|
|
954
979
|
}
|
|
955
|
-
function
|
|
956
|
-
|
|
980
|
+
function $s(e) {
|
|
981
|
+
C === null && (x === null && ks(), Ss()), tt && Es();
|
|
957
982
|
}
|
|
958
|
-
function
|
|
983
|
+
function ei(e, t) {
|
|
959
984
|
var n = t.last;
|
|
960
985
|
n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
|
|
961
986
|
}
|
|
962
|
-
function
|
|
963
|
-
var n =
|
|
964
|
-
n !== null && (n.f &
|
|
987
|
+
function nt(e, t) {
|
|
988
|
+
var n = C;
|
|
989
|
+
n !== null && (n.f & U) !== 0 && (e |= U);
|
|
965
990
|
var r = {
|
|
966
|
-
ctx:
|
|
991
|
+
ctx: ue,
|
|
967
992
|
deps: null,
|
|
968
993
|
nodes: null,
|
|
969
|
-
f: e |
|
|
994
|
+
f: e | X | ae,
|
|
970
995
|
first: null,
|
|
971
996
|
fn: t,
|
|
972
997
|
last: null,
|
|
@@ -977,508 +1002,512 @@ function Ee(e, t) {
|
|
|
977
1002
|
teardown: null,
|
|
978
1003
|
wv: 0,
|
|
979
1004
|
ac: null
|
|
980
|
-
},
|
|
981
|
-
if ((e &
|
|
982
|
-
|
|
1005
|
+
}, s = r;
|
|
1006
|
+
if ((e & wt) !== 0)
|
|
1007
|
+
_t !== null ? _t.push(r) : He(r);
|
|
983
1008
|
else if (t !== null) {
|
|
984
1009
|
try {
|
|
985
|
-
|
|
986
|
-
} catch (
|
|
987
|
-
throw
|
|
1010
|
+
gt(r);
|
|
1011
|
+
} catch (o) {
|
|
1012
|
+
throw Ae(r), o;
|
|
988
1013
|
}
|
|
989
|
-
|
|
990
|
-
(
|
|
1014
|
+
s.deps === null && s.teardown === null && s.nodes === null && s.first === s.last && // either `null`, or a singular child
|
|
1015
|
+
(s.f & Kt) === 0 && (s = s.first, (e & Ye) !== 0 && (e & ht) !== 0 && s !== null && (s.f |= ht));
|
|
991
1016
|
}
|
|
992
|
-
if (
|
|
993
|
-
var
|
|
1017
|
+
if (s !== null && (s.parent = n, n !== null && ei(s, n), x !== null && (x.f & V) !== 0 && (e & bt) === 0)) {
|
|
1018
|
+
var i = (
|
|
994
1019
|
/** @type {Derived} */
|
|
995
|
-
|
|
1020
|
+
x
|
|
996
1021
|
);
|
|
997
|
-
(
|
|
1022
|
+
(i.effects ?? (i.effects = [])).push(s);
|
|
998
1023
|
}
|
|
999
1024
|
return r;
|
|
1000
1025
|
}
|
|
1001
|
-
function
|
|
1002
|
-
return
|
|
1026
|
+
function br() {
|
|
1027
|
+
return x !== null && !he;
|
|
1003
1028
|
}
|
|
1004
|
-
function
|
|
1005
|
-
const t =
|
|
1006
|
-
return
|
|
1029
|
+
function ti(e) {
|
|
1030
|
+
const t = nt(Tt, null);
|
|
1031
|
+
return q(t, B), t.teardown = e, t;
|
|
1007
1032
|
}
|
|
1008
|
-
function
|
|
1009
|
-
|
|
1033
|
+
function yn(e) {
|
|
1034
|
+
$s();
|
|
1010
1035
|
var t = (
|
|
1011
1036
|
/** @type {Effect} */
|
|
1012
|
-
|
|
1013
|
-
), n = !
|
|
1037
|
+
C.f
|
|
1038
|
+
), n = !x && (t & pe) !== 0 && (t & yt) === 0;
|
|
1014
1039
|
if (n) {
|
|
1015
1040
|
var r = (
|
|
1016
1041
|
/** @type {ComponentContext} */
|
|
1017
|
-
|
|
1042
|
+
ue
|
|
1018
1043
|
);
|
|
1019
1044
|
(r.e ?? (r.e = [])).push(e);
|
|
1020
1045
|
} else
|
|
1021
|
-
return
|
|
1046
|
+
return yr(e);
|
|
1022
1047
|
}
|
|
1023
|
-
function
|
|
1024
|
-
return
|
|
1048
|
+
function yr(e) {
|
|
1049
|
+
return nt(wt | gs, e);
|
|
1025
1050
|
}
|
|
1026
|
-
function
|
|
1027
|
-
return
|
|
1051
|
+
function ni(e) {
|
|
1052
|
+
return nt(wt, e);
|
|
1028
1053
|
}
|
|
1029
|
-
function
|
|
1030
|
-
return
|
|
1054
|
+
function ri(e) {
|
|
1055
|
+
return nt(kn | Kt, e);
|
|
1031
1056
|
}
|
|
1032
|
-
function
|
|
1033
|
-
|
|
1034
|
-
|
|
1057
|
+
function Y(e, t = [], n = [], r = []) {
|
|
1058
|
+
zs(r, t, n, (s) => {
|
|
1059
|
+
nt(Tt, () => e(...s.map(_)));
|
|
1035
1060
|
});
|
|
1036
1061
|
}
|
|
1037
|
-
function
|
|
1038
|
-
var n =
|
|
1062
|
+
function Dn(e, t = 0) {
|
|
1063
|
+
var n = nt(Ye | t, e);
|
|
1039
1064
|
return n;
|
|
1040
1065
|
}
|
|
1041
|
-
function
|
|
1042
|
-
return
|
|
1066
|
+
function It(e) {
|
|
1067
|
+
return nt(pe | Kt, e);
|
|
1043
1068
|
}
|
|
1044
|
-
function
|
|
1069
|
+
function xr(e) {
|
|
1045
1070
|
var t = e.teardown;
|
|
1046
1071
|
if (t !== null) {
|
|
1047
|
-
const n =
|
|
1048
|
-
|
|
1072
|
+
const n = tt, r = x;
|
|
1073
|
+
Wn(!0), Ve(null);
|
|
1049
1074
|
try {
|
|
1050
1075
|
t.call(null);
|
|
1051
1076
|
} finally {
|
|
1052
|
-
|
|
1077
|
+
Wn(n), Ve(r);
|
|
1053
1078
|
}
|
|
1054
1079
|
}
|
|
1055
1080
|
}
|
|
1056
|
-
function
|
|
1081
|
+
function Pn(e, t = !1) {
|
|
1057
1082
|
var n = e.first;
|
|
1058
1083
|
for (e.first = e.last = null; n !== null; ) {
|
|
1059
|
-
const
|
|
1060
|
-
|
|
1061
|
-
|
|
1084
|
+
const s = n.ac;
|
|
1085
|
+
s !== null && wr(() => {
|
|
1086
|
+
s.abort(Ge);
|
|
1062
1087
|
});
|
|
1063
1088
|
var r = n.next;
|
|
1064
|
-
(n.f &
|
|
1089
|
+
(n.f & bt) !== 0 ? n.parent = null : Ae(n, t), n = r;
|
|
1065
1090
|
}
|
|
1066
1091
|
}
|
|
1067
|
-
function
|
|
1092
|
+
function si(e) {
|
|
1068
1093
|
for (var t = e.first; t !== null; ) {
|
|
1069
1094
|
var n = t.next;
|
|
1070
|
-
(t.f &
|
|
1095
|
+
(t.f & pe) === 0 && Ae(t), t = n;
|
|
1071
1096
|
}
|
|
1072
1097
|
}
|
|
1073
|
-
function
|
|
1098
|
+
function Ae(e, t = !0) {
|
|
1074
1099
|
var n = !1;
|
|
1075
|
-
(t || (e.f &
|
|
1100
|
+
(t || (e.f & ms) !== 0) && e.nodes !== null && e.nodes.end !== null && (ii(
|
|
1076
1101
|
e.nodes.start,
|
|
1077
1102
|
/** @type {TemplateNode} */
|
|
1078
1103
|
e.nodes.end
|
|
1079
|
-
), n = !0),
|
|
1104
|
+
), n = !0), Pn(e, t && !n), Dt(e, 0), q(e, Te);
|
|
1080
1105
|
var r = e.nodes && e.nodes.t;
|
|
1081
1106
|
if (r !== null)
|
|
1082
|
-
for (const
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
var
|
|
1086
|
-
|
|
1107
|
+
for (const i of r)
|
|
1108
|
+
i.stop();
|
|
1109
|
+
xr(e);
|
|
1110
|
+
var s = e.parent;
|
|
1111
|
+
s !== null && s.first !== null && Er(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
|
|
1087
1112
|
}
|
|
1088
|
-
function
|
|
1113
|
+
function ii(e, t) {
|
|
1089
1114
|
for (; e !== null; ) {
|
|
1090
|
-
var n = e === t ? null : /* @__PURE__ */
|
|
1115
|
+
var n = e === t ? null : /* @__PURE__ */ Lt(e);
|
|
1091
1116
|
e.remove(), e = n;
|
|
1092
1117
|
}
|
|
1093
1118
|
}
|
|
1094
|
-
function
|
|
1119
|
+
function Er(e) {
|
|
1095
1120
|
var t = e.parent, n = e.prev, r = e.next;
|
|
1096
1121
|
n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
|
|
1097
1122
|
}
|
|
1098
|
-
function
|
|
1123
|
+
function Nn(e, t, n = !0) {
|
|
1099
1124
|
var r = [];
|
|
1100
|
-
|
|
1101
|
-
var
|
|
1102
|
-
n &&
|
|
1103
|
-
},
|
|
1104
|
-
if (
|
|
1105
|
-
var
|
|
1125
|
+
Sr(e, r, !0);
|
|
1126
|
+
var s = () => {
|
|
1127
|
+
n && Ae(e), t && t();
|
|
1128
|
+
}, i = r.length;
|
|
1129
|
+
if (i > 0) {
|
|
1130
|
+
var o = () => --i || s();
|
|
1106
1131
|
for (var a of r)
|
|
1107
|
-
a.out(
|
|
1132
|
+
a.out(o);
|
|
1108
1133
|
} else
|
|
1109
|
-
|
|
1134
|
+
s();
|
|
1110
1135
|
}
|
|
1111
|
-
function
|
|
1112
|
-
if ((e.f &
|
|
1113
|
-
e.f ^=
|
|
1136
|
+
function Sr(e, t, n) {
|
|
1137
|
+
if ((e.f & U) === 0) {
|
|
1138
|
+
e.f ^= U;
|
|
1114
1139
|
var r = e.nodes && e.nodes.t;
|
|
1115
1140
|
if (r !== null)
|
|
1116
1141
|
for (const a of r)
|
|
1117
1142
|
(a.is_global || n) && t.push(a);
|
|
1118
|
-
for (var
|
|
1119
|
-
var
|
|
1143
|
+
for (var s = e.first; s !== null; ) {
|
|
1144
|
+
var i = s.next, o = (s.f & ht) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1120
1145
|
// it means the parent block effect was pruned. In that case,
|
|
1121
1146
|
// transparency information was transferred to the branch effect.
|
|
1122
|
-
(
|
|
1123
|
-
|
|
1147
|
+
(s.f & pe) !== 0 && (e.f & Ye) !== 0;
|
|
1148
|
+
Sr(s, t, o ? n : !1), s = i;
|
|
1124
1149
|
}
|
|
1125
1150
|
}
|
|
1126
1151
|
}
|
|
1127
|
-
function
|
|
1128
|
-
|
|
1152
|
+
function Ln(e) {
|
|
1153
|
+
kr(e, !0);
|
|
1129
1154
|
}
|
|
1130
|
-
function
|
|
1131
|
-
if ((e.f &
|
|
1132
|
-
e.f ^=
|
|
1155
|
+
function kr(e, t) {
|
|
1156
|
+
if ((e.f & U) !== 0) {
|
|
1157
|
+
e.f ^= U;
|
|
1133
1158
|
for (var n = e.first; n !== null; ) {
|
|
1134
|
-
var r = n.next,
|
|
1135
|
-
|
|
1159
|
+
var r = n.next, s = (n.f & ht) !== 0 || (n.f & pe) !== 0;
|
|
1160
|
+
kr(n, s ? t : !1), n = r;
|
|
1136
1161
|
}
|
|
1137
|
-
var
|
|
1138
|
-
if (
|
|
1139
|
-
for (const
|
|
1140
|
-
(
|
|
1162
|
+
var i = e.nodes && e.nodes.t;
|
|
1163
|
+
if (i !== null)
|
|
1164
|
+
for (const o of i)
|
|
1165
|
+
(o.is_global || t) && o.in();
|
|
1141
1166
|
}
|
|
1142
1167
|
}
|
|
1143
|
-
function
|
|
1168
|
+
function Mr(e, t) {
|
|
1144
1169
|
if (e.nodes)
|
|
1145
1170
|
for (var n = e.nodes.start, r = e.nodes.end; n !== null; ) {
|
|
1146
|
-
var
|
|
1147
|
-
t.append(n), n =
|
|
1171
|
+
var s = n === r ? null : /* @__PURE__ */ Lt(n);
|
|
1172
|
+
t.append(n), n = s;
|
|
1148
1173
|
}
|
|
1149
1174
|
}
|
|
1150
|
-
let
|
|
1151
|
-
function
|
|
1152
|
-
|
|
1175
|
+
let Yt = !1, tt = !1;
|
|
1176
|
+
function Wn(e) {
|
|
1177
|
+
tt = e;
|
|
1153
1178
|
}
|
|
1154
|
-
let
|
|
1155
|
-
function
|
|
1156
|
-
|
|
1179
|
+
let x = null, he = !1;
|
|
1180
|
+
function Ve(e) {
|
|
1181
|
+
x = e;
|
|
1157
1182
|
}
|
|
1158
|
-
let
|
|
1159
|
-
function
|
|
1160
|
-
|
|
1183
|
+
let C = null;
|
|
1184
|
+
function mt(e) {
|
|
1185
|
+
C = e;
|
|
1161
1186
|
}
|
|
1162
|
-
let
|
|
1163
|
-
function
|
|
1164
|
-
|
|
1187
|
+
let fe = null;
|
|
1188
|
+
function Cr(e) {
|
|
1189
|
+
x !== null && (fe === null ? fe = [e] : fe.push(e));
|
|
1165
1190
|
}
|
|
1166
|
-
let
|
|
1167
|
-
function
|
|
1168
|
-
|
|
1191
|
+
let J = null, ee = 0, ie = null;
|
|
1192
|
+
function oi(e) {
|
|
1193
|
+
ie = e;
|
|
1169
1194
|
}
|
|
1170
|
-
let
|
|
1171
|
-
function
|
|
1172
|
-
|
|
1195
|
+
let Tr = 1, Ze = 0, Qe = Ze;
|
|
1196
|
+
function Un(e) {
|
|
1197
|
+
Qe = e;
|
|
1173
1198
|
}
|
|
1174
|
-
function
|
|
1175
|
-
return ++
|
|
1199
|
+
function Ar() {
|
|
1200
|
+
return ++Tr;
|
|
1176
1201
|
}
|
|
1177
|
-
function
|
|
1202
|
+
function qt(e) {
|
|
1178
1203
|
var t = e.f;
|
|
1179
|
-
if ((t &
|
|
1204
|
+
if ((t & X) !== 0)
|
|
1180
1205
|
return !0;
|
|
1181
|
-
if (t &
|
|
1206
|
+
if (t & V && (e.f &= ~et), (t & Ee) !== 0) {
|
|
1182
1207
|
for (var n = (
|
|
1183
1208
|
/** @type {Value[]} */
|
|
1184
1209
|
e.deps
|
|
1185
|
-
), r = n.length,
|
|
1186
|
-
var
|
|
1187
|
-
if (
|
|
1210
|
+
), r = n.length, s = 0; s < r; s++) {
|
|
1211
|
+
var i = n[s];
|
|
1212
|
+
if (qt(
|
|
1188
1213
|
/** @type {Derived} */
|
|
1189
|
-
|
|
1190
|
-
) &&
|
|
1214
|
+
i
|
|
1215
|
+
) && vr(
|
|
1191
1216
|
/** @type {Derived} */
|
|
1192
|
-
|
|
1193
|
-
),
|
|
1217
|
+
i
|
|
1218
|
+
), i.wv > e.wv)
|
|
1194
1219
|
return !0;
|
|
1195
1220
|
}
|
|
1196
|
-
(t &
|
|
1221
|
+
(t & ae) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1197
1222
|
// traversal of the graph in the other batches still happens
|
|
1198
|
-
|
|
1223
|
+
ve === null && q(e, B);
|
|
1199
1224
|
}
|
|
1200
1225
|
return !1;
|
|
1201
1226
|
}
|
|
1202
|
-
function
|
|
1227
|
+
function Rr(e, t, n = !0) {
|
|
1203
1228
|
var r = e.reactions;
|
|
1204
|
-
if (r !== null && !(
|
|
1205
|
-
for (var
|
|
1206
|
-
var
|
|
1207
|
-
(
|
|
1229
|
+
if (r !== null && !(fe !== null && vt.call(fe, e)))
|
|
1230
|
+
for (var s = 0; s < r.length; s++) {
|
|
1231
|
+
var i = r[s];
|
|
1232
|
+
(i.f & V) !== 0 ? Rr(
|
|
1208
1233
|
/** @type {Derived} */
|
|
1209
|
-
|
|
1234
|
+
i,
|
|
1210
1235
|
t,
|
|
1211
1236
|
!1
|
|
1212
|
-
) : t ===
|
|
1237
|
+
) : t === i && (n ? q(i, X) : (i.f & B) !== 0 && q(i, Ee), He(
|
|
1213
1238
|
/** @type {Effect} */
|
|
1214
|
-
|
|
1239
|
+
i
|
|
1215
1240
|
));
|
|
1216
1241
|
}
|
|
1217
1242
|
}
|
|
1218
|
-
function
|
|
1219
|
-
var
|
|
1220
|
-
var t =
|
|
1221
|
-
|
|
1222
|
-
null,
|
|
1223
|
-
e.ac.abort(
|
|
1243
|
+
function Ir(e) {
|
|
1244
|
+
var T;
|
|
1245
|
+
var t = J, n = ee, r = ie, s = x, i = fe, o = ue, a = he, l = Qe, f = e.f;
|
|
1246
|
+
J = /** @type {null | Value[]} */
|
|
1247
|
+
null, ee = 0, ie = null, x = (f & (pe | bt)) === 0 ? e : null, fe = null, Xt(e.ctx), he = !1, Qe = ++Ze, e.ac !== null && (wr(() => {
|
|
1248
|
+
e.ac.abort(Ge);
|
|
1224
1249
|
}), e.ac = null);
|
|
1225
1250
|
try {
|
|
1226
|
-
e.f |=
|
|
1227
|
-
var
|
|
1251
|
+
e.f |= vn;
|
|
1252
|
+
var u = (
|
|
1228
1253
|
/** @type {Function} */
|
|
1229
1254
|
e.fn
|
|
1230
|
-
),
|
|
1231
|
-
e.f |=
|
|
1232
|
-
var
|
|
1233
|
-
if (
|
|
1234
|
-
var
|
|
1235
|
-
if (
|
|
1236
|
-
for (
|
|
1237
|
-
|
|
1255
|
+
), c = u();
|
|
1256
|
+
e.f |= yt;
|
|
1257
|
+
var v = e.deps, g = D?.is_fork;
|
|
1258
|
+
if (J !== null) {
|
|
1259
|
+
var p;
|
|
1260
|
+
if (g || Dt(e, ee), v !== null && ee > 0)
|
|
1261
|
+
for (v.length = ee + J.length, p = 0; p < J.length; p++)
|
|
1262
|
+
v[ee + p] = J[p];
|
|
1238
1263
|
else
|
|
1239
|
-
e.deps =
|
|
1240
|
-
if (
|
|
1241
|
-
for (
|
|
1242
|
-
((
|
|
1243
|
-
} else !
|
|
1244
|
-
if (
|
|
1245
|
-
for (
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1264
|
+
e.deps = v = J;
|
|
1265
|
+
if (br() && (e.f & ae) !== 0)
|
|
1266
|
+
for (p = ee; p < v.length; p++)
|
|
1267
|
+
((T = v[p]).reactions ?? (T.reactions = [])).push(e);
|
|
1268
|
+
} else !g && v !== null && ee < v.length && (Dt(e, ee), v.length = ee);
|
|
1269
|
+
if (ar() && ie !== null && !he && v !== null && (e.f & (V | Ee | X)) === 0)
|
|
1270
|
+
for (p = 0; p < /** @type {Source[]} */
|
|
1271
|
+
ie.length; p++)
|
|
1272
|
+
Rr(
|
|
1273
|
+
ie[p],
|
|
1249
1274
|
/** @type {Effect} */
|
|
1250
1275
|
e
|
|
1251
1276
|
);
|
|
1252
|
-
if (
|
|
1253
|
-
if (
|
|
1254
|
-
for (let
|
|
1255
|
-
|
|
1277
|
+
if (s !== null && s !== e) {
|
|
1278
|
+
if (Ze++, s.deps !== null)
|
|
1279
|
+
for (let d = 0; d < n; d += 1)
|
|
1280
|
+
s.deps[d].rv = Ze;
|
|
1256
1281
|
if (t !== null)
|
|
1257
|
-
for (const
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1282
|
+
for (const d of t)
|
|
1283
|
+
d.rv = Ze;
|
|
1284
|
+
ie !== null && (r === null ? r = ie : r.push(.../** @type {Source[]} */
|
|
1285
|
+
ie));
|
|
1261
1286
|
}
|
|
1262
|
-
return (e.f &
|
|
1263
|
-
} catch (
|
|
1264
|
-
return
|
|
1287
|
+
return (e.f & je) !== 0 && (e.f ^= je), c;
|
|
1288
|
+
} catch (d) {
|
|
1289
|
+
return Ps(d);
|
|
1265
1290
|
} finally {
|
|
1266
|
-
e.f ^=
|
|
1291
|
+
e.f ^= vn, J = t, ee = n, ie = r, x = s, fe = i, Xt(o), he = a, Qe = l;
|
|
1267
1292
|
}
|
|
1268
1293
|
}
|
|
1269
|
-
function
|
|
1294
|
+
function li(e, t) {
|
|
1270
1295
|
let n = t.reactions;
|
|
1271
1296
|
if (n !== null) {
|
|
1272
|
-
var r =
|
|
1297
|
+
var r = cs.call(n, e);
|
|
1273
1298
|
if (r !== -1) {
|
|
1274
|
-
var
|
|
1275
|
-
|
|
1299
|
+
var s = n.length - 1;
|
|
1300
|
+
s === 0 ? n = t.reactions = null : (n[r] = n[s], n.pop());
|
|
1276
1301
|
}
|
|
1277
1302
|
}
|
|
1278
|
-
if (n === null && (t.f &
|
|
1303
|
+
if (n === null && (t.f & V) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1279
1304
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1280
1305
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1281
|
-
(
|
|
1282
|
-
var
|
|
1306
|
+
(J === null || !vt.call(J, t))) {
|
|
1307
|
+
var i = (
|
|
1283
1308
|
/** @type {Derived} */
|
|
1284
1309
|
t
|
|
1285
1310
|
);
|
|
1286
|
-
(
|
|
1311
|
+
(i.f & ae) !== 0 && (i.f ^= ae, i.f &= ~et), Tn(i), Ws(i), Dt(i, 0);
|
|
1287
1312
|
}
|
|
1288
1313
|
}
|
|
1289
|
-
function
|
|
1314
|
+
function Dt(e, t) {
|
|
1290
1315
|
var n = e.deps;
|
|
1291
1316
|
if (n !== null)
|
|
1292
1317
|
for (var r = t; r < n.length; r++)
|
|
1293
|
-
|
|
1318
|
+
li(e, n[r]);
|
|
1294
1319
|
}
|
|
1295
|
-
function
|
|
1320
|
+
function gt(e) {
|
|
1296
1321
|
var t = e.f;
|
|
1297
|
-
if ((t &
|
|
1298
|
-
|
|
1299
|
-
var n =
|
|
1300
|
-
|
|
1322
|
+
if ((t & Te) === 0) {
|
|
1323
|
+
q(e, B);
|
|
1324
|
+
var n = C, r = Yt;
|
|
1325
|
+
C = e, Yt = !0;
|
|
1301
1326
|
try {
|
|
1302
|
-
(t & (
|
|
1303
|
-
var
|
|
1304
|
-
e.teardown = typeof
|
|
1305
|
-
var
|
|
1306
|
-
|
|
1327
|
+
(t & (Ye | Sn)) !== 0 ? si(e) : Pn(e), xr(e);
|
|
1328
|
+
var s = Ir(e);
|
|
1329
|
+
e.teardown = typeof s == "function" ? s : null, e.wv = Tr;
|
|
1330
|
+
var i;
|
|
1331
|
+
dn && Is && (e.f & X) !== 0 && e.deps;
|
|
1307
1332
|
} finally {
|
|
1308
|
-
|
|
1333
|
+
Yt = r, C = n;
|
|
1309
1334
|
}
|
|
1310
1335
|
}
|
|
1311
1336
|
}
|
|
1312
|
-
function
|
|
1313
|
-
var t = e.f, n = (t &
|
|
1314
|
-
if (
|
|
1315
|
-
var r =
|
|
1316
|
-
if (!r && (
|
|
1317
|
-
var
|
|
1318
|
-
if ((
|
|
1319
|
-
e.rv <
|
|
1337
|
+
function _(e) {
|
|
1338
|
+
var t = e.f, n = (t & V) !== 0;
|
|
1339
|
+
if (x !== null && !he) {
|
|
1340
|
+
var r = C !== null && (C.f & Te) !== 0;
|
|
1341
|
+
if (!r && (fe === null || !vt.call(fe, e))) {
|
|
1342
|
+
var s = x.deps;
|
|
1343
|
+
if ((x.f & vn) !== 0)
|
|
1344
|
+
e.rv < Ze && (e.rv = Ze, J === null && s !== null && s[ee] === e ? ee++ : J === null ? J = [e] : J.push(e));
|
|
1320
1345
|
else {
|
|
1321
|
-
(
|
|
1322
|
-
var
|
|
1323
|
-
|
|
1346
|
+
(x.deps ?? (x.deps = [])).push(e);
|
|
1347
|
+
var i = e.reactions;
|
|
1348
|
+
i === null ? e.reactions = [x] : vt.call(i, x) || i.push(x);
|
|
1324
1349
|
}
|
|
1325
1350
|
}
|
|
1326
1351
|
}
|
|
1327
|
-
if (
|
|
1328
|
-
return
|
|
1352
|
+
if (tt && Be.has(e))
|
|
1353
|
+
return Be.get(e);
|
|
1329
1354
|
if (n) {
|
|
1330
|
-
var
|
|
1355
|
+
var o = (
|
|
1331
1356
|
/** @type {Derived} */
|
|
1332
1357
|
e
|
|
1333
1358
|
);
|
|
1334
|
-
if (
|
|
1335
|
-
var a =
|
|
1336
|
-
return ((
|
|
1359
|
+
if (tt) {
|
|
1360
|
+
var a = o.v;
|
|
1361
|
+
return ((o.f & B) === 0 && o.reactions !== null || Pr(o)) && (a = In(o)), Be.set(o, a), a;
|
|
1337
1362
|
}
|
|
1338
|
-
var
|
|
1339
|
-
|
|
1363
|
+
var l = (o.f & ae) === 0 && !he && x !== null && (Yt || (x.f & ae) !== 0), f = (o.f & yt) === 0;
|
|
1364
|
+
qt(o) && (l && (o.f |= ae), vr(o)), l && !f && (hr(o), Dr(o));
|
|
1340
1365
|
}
|
|
1341
|
-
if (
|
|
1342
|
-
return
|
|
1343
|
-
if ((e.f &
|
|
1366
|
+
if (ve?.has(e))
|
|
1367
|
+
return ve.get(e);
|
|
1368
|
+
if ((e.f & je) !== 0)
|
|
1344
1369
|
throw e.v;
|
|
1345
1370
|
return e.v;
|
|
1346
1371
|
}
|
|
1347
|
-
function
|
|
1348
|
-
if (e.f |=
|
|
1372
|
+
function Dr(e) {
|
|
1373
|
+
if (e.f |= ae, e.deps !== null)
|
|
1349
1374
|
for (const t of e.deps)
|
|
1350
|
-
(t.reactions ?? (t.reactions = [])).push(e), (t.f &
|
|
1375
|
+
(t.reactions ?? (t.reactions = [])).push(e), (t.f & V) !== 0 && (t.f & ae) === 0 && (hr(
|
|
1351
1376
|
/** @type {Derived} */
|
|
1352
1377
|
t
|
|
1353
|
-
),
|
|
1378
|
+
), Dr(
|
|
1354
1379
|
/** @type {Derived} */
|
|
1355
1380
|
t
|
|
1356
1381
|
));
|
|
1357
1382
|
}
|
|
1358
|
-
function
|
|
1359
|
-
if (e.v ===
|
|
1383
|
+
function Pr(e) {
|
|
1384
|
+
if (e.v === j) return !0;
|
|
1360
1385
|
if (e.deps === null) return !1;
|
|
1361
1386
|
for (const t of e.deps)
|
|
1362
|
-
if (
|
|
1387
|
+
if (Be.has(t) || (t.f & V) !== 0 && Pr(
|
|
1363
1388
|
/** @type {Derived} */
|
|
1364
1389
|
t
|
|
1365
1390
|
))
|
|
1366
1391
|
return !0;
|
|
1367
1392
|
return !1;
|
|
1368
1393
|
}
|
|
1369
|
-
function
|
|
1370
|
-
var t =
|
|
1394
|
+
function Ct(e) {
|
|
1395
|
+
var t = he;
|
|
1371
1396
|
try {
|
|
1372
|
-
return
|
|
1397
|
+
return he = !0, e();
|
|
1373
1398
|
} finally {
|
|
1374
|
-
|
|
1399
|
+
he = t;
|
|
1375
1400
|
}
|
|
1376
1401
|
}
|
|
1377
|
-
const
|
|
1378
|
-
function
|
|
1379
|
-
(t[
|
|
1402
|
+
const fn = /* @__PURE__ */ Symbol("events"), ai = /* @__PURE__ */ new Set(), fi = /* @__PURE__ */ new Set();
|
|
1403
|
+
function _e(e, t, n) {
|
|
1404
|
+
(t[fn] ?? (t[fn] = {}))[e] = n;
|
|
1380
1405
|
}
|
|
1381
|
-
function
|
|
1406
|
+
function Ft(e) {
|
|
1382
1407
|
for (var t = 0; t < e.length; t++)
|
|
1383
|
-
|
|
1384
|
-
for (var n of
|
|
1408
|
+
ai.add(e[t]);
|
|
1409
|
+
for (var n of fi)
|
|
1385
1410
|
n(e);
|
|
1386
1411
|
}
|
|
1387
|
-
const
|
|
1412
|
+
const ui = (
|
|
1388
1413
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
1389
1414
|
globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
1390
1415
|
/** @param {string} html */
|
|
1391
1416
|
createHTML: (e) => e
|
|
1392
1417
|
})
|
|
1393
1418
|
);
|
|
1394
|
-
function
|
|
1419
|
+
function ci(e) {
|
|
1395
1420
|
return (
|
|
1396
1421
|
/** @type {string} */
|
|
1397
|
-
|
|
1422
|
+
ui?.createHTML(e) ?? e
|
|
1398
1423
|
);
|
|
1399
1424
|
}
|
|
1400
|
-
function
|
|
1401
|
-
var t =
|
|
1402
|
-
return t.innerHTML =
|
|
1425
|
+
function Nr(e) {
|
|
1426
|
+
var t = gr("template");
|
|
1427
|
+
return t.innerHTML = ci(e.replaceAll("<!>", "<!---->")), t.content;
|
|
1403
1428
|
}
|
|
1404
|
-
function
|
|
1429
|
+
function Gt(e, t) {
|
|
1405
1430
|
var n = (
|
|
1406
1431
|
/** @type {Effect} */
|
|
1407
|
-
|
|
1432
|
+
C
|
|
1408
1433
|
);
|
|
1409
1434
|
n.nodes === null && (n.nodes = { start: e, end: t, a: null, t: null });
|
|
1410
1435
|
}
|
|
1411
1436
|
// @__NO_SIDE_EFFECTS__
|
|
1412
|
-
function
|
|
1413
|
-
var n = (t &
|
|
1437
|
+
function z(e, t) {
|
|
1438
|
+
var n = (t & fs) !== 0, r = (t & us) !== 0, s, i = !e.startsWith("<!>");
|
|
1414
1439
|
return () => {
|
|
1415
|
-
|
|
1416
|
-
/* @__PURE__ */
|
|
1417
|
-
var
|
|
1440
|
+
s === void 0 && (s = Nr(i ? e : "<!>" + e), n || (s = /** @type {TemplateNode} */
|
|
1441
|
+
/* @__PURE__ */ pt(s)));
|
|
1442
|
+
var o = (
|
|
1418
1443
|
/** @type {TemplateNode} */
|
|
1419
|
-
r ||
|
|
1444
|
+
r || Zs ? document.importNode(s, !0) : s.cloneNode(!0)
|
|
1420
1445
|
);
|
|
1421
1446
|
if (n) {
|
|
1422
1447
|
var a = (
|
|
1423
1448
|
/** @type {TemplateNode} */
|
|
1424
|
-
/* @__PURE__ */
|
|
1425
|
-
),
|
|
1449
|
+
/* @__PURE__ */ pt(o)
|
|
1450
|
+
), l = (
|
|
1426
1451
|
/** @type {TemplateNode} */
|
|
1427
|
-
|
|
1452
|
+
o.lastChild
|
|
1428
1453
|
);
|
|
1429
|
-
|
|
1454
|
+
Gt(a, l);
|
|
1430
1455
|
} else
|
|
1431
|
-
|
|
1432
|
-
return
|
|
1456
|
+
Gt(o, o);
|
|
1457
|
+
return o;
|
|
1433
1458
|
};
|
|
1434
1459
|
}
|
|
1435
1460
|
// @__NO_SIDE_EFFECTS__
|
|
1436
|
-
function
|
|
1437
|
-
var r = !e.startsWith("<!>"),
|
|
1461
|
+
function di(e, t, n = "svg") {
|
|
1462
|
+
var r = !e.startsWith("<!>"), s = `<${n}>${r ? e : "<!>" + e}</${n}>`, i;
|
|
1438
1463
|
return () => {
|
|
1439
|
-
if (!
|
|
1440
|
-
var
|
|
1464
|
+
if (!i) {
|
|
1465
|
+
var o = (
|
|
1441
1466
|
/** @type {DocumentFragment} */
|
|
1442
|
-
|
|
1467
|
+
Nr(s)
|
|
1443
1468
|
), a = (
|
|
1444
1469
|
/** @type {Element} */
|
|
1445
|
-
/* @__PURE__ */
|
|
1470
|
+
/* @__PURE__ */ pt(o)
|
|
1446
1471
|
);
|
|
1447
|
-
|
|
1448
|
-
/* @__PURE__ */
|
|
1472
|
+
i = /** @type {Element} */
|
|
1473
|
+
/* @__PURE__ */ pt(a);
|
|
1449
1474
|
}
|
|
1450
|
-
var
|
|
1475
|
+
var l = (
|
|
1451
1476
|
/** @type {TemplateNode} */
|
|
1452
|
-
|
|
1477
|
+
i.cloneNode(!0)
|
|
1453
1478
|
);
|
|
1454
|
-
return
|
|
1479
|
+
return Gt(l, l), l;
|
|
1455
1480
|
};
|
|
1456
1481
|
}
|
|
1457
1482
|
// @__NO_SIDE_EFFECTS__
|
|
1458
|
-
function
|
|
1459
|
-
return /* @__PURE__ */
|
|
1483
|
+
function Lr(e, t) {
|
|
1484
|
+
return /* @__PURE__ */ di(e, t, "svg");
|
|
1485
|
+
}
|
|
1486
|
+
function vi() {
|
|
1487
|
+
var e = document.createDocumentFragment(), t = document.createComment(""), n = ot();
|
|
1488
|
+
return e.append(t, n), Gt(t, n), e;
|
|
1460
1489
|
}
|
|
1461
|
-
function
|
|
1490
|
+
function N(e, t) {
|
|
1462
1491
|
e !== null && e.before(
|
|
1463
1492
|
/** @type {Node} */
|
|
1464
1493
|
t
|
|
1465
1494
|
);
|
|
1466
1495
|
}
|
|
1467
|
-
function
|
|
1496
|
+
function se(e, t) {
|
|
1468
1497
|
var n = t == null ? "" : typeof t == "object" ? `${t}` : t;
|
|
1469
1498
|
n !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = n, e.nodeValue = `${n}`);
|
|
1470
1499
|
}
|
|
1471
|
-
var
|
|
1472
|
-
class
|
|
1500
|
+
var de, be, te, Je, Pt, Nt, Zt;
|
|
1501
|
+
class qr {
|
|
1473
1502
|
/**
|
|
1474
1503
|
* @param {TemplateNode} anchor
|
|
1475
1504
|
* @param {boolean} transition
|
|
1476
1505
|
*/
|
|
1477
1506
|
constructor(t, n = !0) {
|
|
1478
1507
|
/** @type {TemplateNode} */
|
|
1479
|
-
|
|
1508
|
+
Le(this, "anchor");
|
|
1480
1509
|
/** @type {Map<Batch, Key>} */
|
|
1481
|
-
|
|
1510
|
+
O(this, de, /* @__PURE__ */ new Map());
|
|
1482
1511
|
/**
|
|
1483
1512
|
* Map of keys to effects that are currently rendered in the DOM.
|
|
1484
1513
|
* These effects are visible and actively part of the document tree.
|
|
@@ -1493,68 +1522,68 @@ class Dn {
|
|
|
1493
1522
|
* Can result in the entries `true->Effect` and `false->Effect`
|
|
1494
1523
|
* @type {Map<Key, Effect>}
|
|
1495
1524
|
*/
|
|
1496
|
-
|
|
1525
|
+
O(this, be, /* @__PURE__ */ new Map());
|
|
1497
1526
|
/**
|
|
1498
1527
|
* Similar to #onscreen with respect to the keys, but contains branches that are not yet
|
|
1499
1528
|
* in the DOM, because their insertion is deferred.
|
|
1500
1529
|
* @type {Map<Key, Branch>}
|
|
1501
1530
|
*/
|
|
1502
|
-
|
|
1531
|
+
O(this, te, /* @__PURE__ */ new Map());
|
|
1503
1532
|
/**
|
|
1504
1533
|
* Keys of effects that are currently outroing
|
|
1505
1534
|
* @type {Set<Key>}
|
|
1506
1535
|
*/
|
|
1507
|
-
|
|
1536
|
+
O(this, Je, /* @__PURE__ */ new Set());
|
|
1508
1537
|
/**
|
|
1509
1538
|
* Whether to pause (i.e. outro) on change, or destroy immediately.
|
|
1510
1539
|
* This is necessary for `<svelte:element>`
|
|
1511
1540
|
*/
|
|
1512
|
-
|
|
1541
|
+
O(this, Pt, !0);
|
|
1513
1542
|
/**
|
|
1514
1543
|
* @param {Batch} batch
|
|
1515
1544
|
*/
|
|
1516
|
-
|
|
1517
|
-
if (
|
|
1545
|
+
O(this, Nt, (t) => {
|
|
1546
|
+
if (h(this, de).has(t)) {
|
|
1518
1547
|
var n = (
|
|
1519
1548
|
/** @type {Key} */
|
|
1520
|
-
|
|
1521
|
-
), r =
|
|
1549
|
+
h(this, de).get(t)
|
|
1550
|
+
), r = h(this, be).get(n);
|
|
1522
1551
|
if (r)
|
|
1523
|
-
|
|
1552
|
+
Ln(r), h(this, Je).delete(n);
|
|
1524
1553
|
else {
|
|
1525
|
-
var
|
|
1526
|
-
|
|
1554
|
+
var s = h(this, te).get(n);
|
|
1555
|
+
s && (s.effect.f & U) === 0 && (h(this, be).set(n, s.effect), h(this, te).delete(n), s.fragment.lastChild.remove(), this.anchor.before(s.fragment), r = s.effect);
|
|
1527
1556
|
}
|
|
1528
|
-
for (const [
|
|
1529
|
-
if (
|
|
1557
|
+
for (const [i, o] of h(this, de)) {
|
|
1558
|
+
if (h(this, de).delete(i), i === t)
|
|
1530
1559
|
break;
|
|
1531
|
-
const a =
|
|
1532
|
-
a && (
|
|
1560
|
+
const a = h(this, te).get(o);
|
|
1561
|
+
a && (Ae(a.effect), h(this, te).delete(o));
|
|
1533
1562
|
}
|
|
1534
|
-
for (const [
|
|
1535
|
-
if (
|
|
1563
|
+
for (const [i, o] of h(this, be)) {
|
|
1564
|
+
if (i === n || h(this, Je).has(i) || (o.f & U) !== 0) continue;
|
|
1536
1565
|
const a = () => {
|
|
1537
|
-
if (Array.from(
|
|
1566
|
+
if (Array.from(h(this, de).values()).includes(i)) {
|
|
1538
1567
|
var f = document.createDocumentFragment();
|
|
1539
|
-
|
|
1568
|
+
Mr(o, f), f.append(ot()), h(this, te).set(i, { effect: o, fragment: f });
|
|
1540
1569
|
} else
|
|
1541
|
-
|
|
1542
|
-
|
|
1570
|
+
Ae(o);
|
|
1571
|
+
h(this, Je).delete(i), h(this, be).delete(i);
|
|
1543
1572
|
};
|
|
1544
|
-
|
|
1573
|
+
h(this, Pt) || !r ? (h(this, Je).add(i), Nn(o, a, !1)) : a();
|
|
1545
1574
|
}
|
|
1546
1575
|
}
|
|
1547
1576
|
});
|
|
1548
1577
|
/**
|
|
1549
1578
|
* @param {Batch} batch
|
|
1550
1579
|
*/
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
const n = Array.from(
|
|
1554
|
-
for (const [r,
|
|
1555
|
-
n.includes(r) || (
|
|
1580
|
+
O(this, Zt, (t) => {
|
|
1581
|
+
h(this, de).delete(t);
|
|
1582
|
+
const n = Array.from(h(this, de).values());
|
|
1583
|
+
for (const [r, s] of h(this, te))
|
|
1584
|
+
n.includes(r) || (Ae(s.effect), h(this, te).delete(r));
|
|
1556
1585
|
});
|
|
1557
|
-
this.anchor = t,
|
|
1586
|
+
this.anchor = t, Se(this, Pt, n);
|
|
1558
1587
|
}
|
|
1559
1588
|
/**
|
|
1560
1589
|
*
|
|
@@ -1564,64 +1593,283 @@ class Dn {
|
|
|
1564
1593
|
ensure(t, n) {
|
|
1565
1594
|
var r = (
|
|
1566
1595
|
/** @type {Batch} */
|
|
1567
|
-
|
|
1568
|
-
),
|
|
1569
|
-
if (n && !
|
|
1570
|
-
if (
|
|
1571
|
-
var
|
|
1572
|
-
|
|
1573
|
-
effect:
|
|
1574
|
-
fragment:
|
|
1596
|
+
D
|
|
1597
|
+
), s = mr();
|
|
1598
|
+
if (n && !h(this, be).has(t) && !h(this, te).has(t))
|
|
1599
|
+
if (s) {
|
|
1600
|
+
var i = document.createDocumentFragment(), o = ot();
|
|
1601
|
+
i.append(o), h(this, te).set(t, {
|
|
1602
|
+
effect: It(() => n(o)),
|
|
1603
|
+
fragment: i
|
|
1575
1604
|
});
|
|
1576
1605
|
} else
|
|
1577
|
-
|
|
1606
|
+
h(this, be).set(
|
|
1578
1607
|
t,
|
|
1579
|
-
|
|
1608
|
+
It(() => n(this.anchor))
|
|
1580
1609
|
);
|
|
1581
|
-
if (
|
|
1582
|
-
for (const [a,
|
|
1583
|
-
a === t ? r.unskip_effect(
|
|
1584
|
-
for (const [a,
|
|
1585
|
-
a === t ? r.unskip_effect(
|
|
1586
|
-
r.oncommit(
|
|
1610
|
+
if (h(this, de).set(r, t), s) {
|
|
1611
|
+
for (const [a, l] of h(this, be))
|
|
1612
|
+
a === t ? r.unskip_effect(l) : r.skip_effect(l);
|
|
1613
|
+
for (const [a, l] of h(this, te))
|
|
1614
|
+
a === t ? r.unskip_effect(l.effect) : r.skip_effect(l.effect);
|
|
1615
|
+
r.oncommit(h(this, Nt)), r.ondiscard(h(this, Zt));
|
|
1587
1616
|
} else
|
|
1588
|
-
|
|
1617
|
+
h(this, Nt).call(this, r);
|
|
1589
1618
|
}
|
|
1590
1619
|
}
|
|
1591
|
-
|
|
1592
|
-
function
|
|
1593
|
-
var r = new
|
|
1594
|
-
|
|
1595
|
-
const
|
|
1596
|
-
r.ensure(
|
|
1597
|
-
},
|
|
1620
|
+
de = new WeakMap(), be = new WeakMap(), te = new WeakMap(), Je = new WeakMap(), Pt = new WeakMap(), Nt = new WeakMap(), Zt = new WeakMap();
|
|
1621
|
+
function un(e, t, ...n) {
|
|
1622
|
+
var r = new qr(e);
|
|
1623
|
+
Dn(() => {
|
|
1624
|
+
const s = t() ?? null;
|
|
1625
|
+
r.ensure(s, s && ((i) => s(i, ...n)));
|
|
1626
|
+
}, ht);
|
|
1598
1627
|
}
|
|
1599
|
-
function
|
|
1600
|
-
|
|
1601
|
-
const t =
|
|
1628
|
+
function qn(e) {
|
|
1629
|
+
ue === null && ir(), yn(() => {
|
|
1630
|
+
const t = Ct(e);
|
|
1602
1631
|
if (typeof t == "function") return (
|
|
1603
1632
|
/** @type {() => void} */
|
|
1604
1633
|
t
|
|
1605
1634
|
);
|
|
1606
1635
|
});
|
|
1607
1636
|
}
|
|
1608
|
-
function
|
|
1609
|
-
|
|
1610
|
-
}
|
|
1611
|
-
function
|
|
1612
|
-
var r = new
|
|
1613
|
-
function
|
|
1614
|
-
r.ensure(
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
var
|
|
1618
|
-
t((a,
|
|
1619
|
-
|
|
1620
|
-
}),
|
|
1621
|
-
},
|
|
1622
|
-
}
|
|
1623
|
-
function
|
|
1624
|
-
|
|
1637
|
+
function hi(e) {
|
|
1638
|
+
ue === null && ir(), qn(() => () => Ct(e));
|
|
1639
|
+
}
|
|
1640
|
+
function Fe(e, t, n = !1) {
|
|
1641
|
+
var r = new qr(e), s = n ? ht : 0;
|
|
1642
|
+
function i(o, a) {
|
|
1643
|
+
r.ensure(o, a);
|
|
1644
|
+
}
|
|
1645
|
+
Dn(() => {
|
|
1646
|
+
var o = !1;
|
|
1647
|
+
t((a, l = 0) => {
|
|
1648
|
+
o = !0, i(l, a);
|
|
1649
|
+
}), o || i(-1, null);
|
|
1650
|
+
}, s);
|
|
1651
|
+
}
|
|
1652
|
+
function jt(e, t) {
|
|
1653
|
+
return t;
|
|
1654
|
+
}
|
|
1655
|
+
function _i(e, t, n) {
|
|
1656
|
+
for (var r = [], s = t.length, i, o = t.length, a = 0; a < s; a++) {
|
|
1657
|
+
let c = t[a];
|
|
1658
|
+
Nn(
|
|
1659
|
+
c,
|
|
1660
|
+
() => {
|
|
1661
|
+
if (i) {
|
|
1662
|
+
if (i.pending.delete(c), i.done.add(c), i.pending.size === 0) {
|
|
1663
|
+
var v = (
|
|
1664
|
+
/** @type {Set<EachOutroGroup>} */
|
|
1665
|
+
e.outrogroups
|
|
1666
|
+
);
|
|
1667
|
+
xn(e, En(i.done)), v.delete(i), v.size === 0 && (e.outrogroups = null);
|
|
1668
|
+
}
|
|
1669
|
+
} else
|
|
1670
|
+
o -= 1;
|
|
1671
|
+
},
|
|
1672
|
+
!1
|
|
1673
|
+
);
|
|
1674
|
+
}
|
|
1675
|
+
if (o === 0) {
|
|
1676
|
+
var l = r.length === 0 && n !== null;
|
|
1677
|
+
if (l) {
|
|
1678
|
+
var f = (
|
|
1679
|
+
/** @type {Element} */
|
|
1680
|
+
n
|
|
1681
|
+
), u = (
|
|
1682
|
+
/** @type {Element} */
|
|
1683
|
+
f.parentNode
|
|
1684
|
+
);
|
|
1685
|
+
Qs(u), u.append(f), e.items.clear();
|
|
1686
|
+
}
|
|
1687
|
+
xn(e, t, !l);
|
|
1688
|
+
} else
|
|
1689
|
+
i = {
|
|
1690
|
+
pending: new Set(t),
|
|
1691
|
+
done: /* @__PURE__ */ new Set()
|
|
1692
|
+
}, (e.outrogroups ?? (e.outrogroups = /* @__PURE__ */ new Set())).add(i);
|
|
1693
|
+
}
|
|
1694
|
+
function xn(e, t, n = !0) {
|
|
1695
|
+
var r;
|
|
1696
|
+
if (e.pending.size > 0) {
|
|
1697
|
+
r = /* @__PURE__ */ new Set();
|
|
1698
|
+
for (const o of e.pending.values())
|
|
1699
|
+
for (const a of o)
|
|
1700
|
+
r.add(
|
|
1701
|
+
/** @type {EachItem} */
|
|
1702
|
+
e.items.get(a).e
|
|
1703
|
+
);
|
|
1704
|
+
}
|
|
1705
|
+
for (var s = 0; s < t.length; s++) {
|
|
1706
|
+
var i = t[s];
|
|
1707
|
+
if (r?.has(i)) {
|
|
1708
|
+
i.f |= ye;
|
|
1709
|
+
const o = document.createDocumentFragment();
|
|
1710
|
+
Mr(i, o);
|
|
1711
|
+
} else
|
|
1712
|
+
Ae(t[s], n);
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
var Gn;
|
|
1716
|
+
function Bt(e, t, n, r, s, i = null) {
|
|
1717
|
+
var o = e, a = /* @__PURE__ */ new Map(), l = (t & er) !== 0;
|
|
1718
|
+
if (l) {
|
|
1719
|
+
var f = (
|
|
1720
|
+
/** @type {Element} */
|
|
1721
|
+
e
|
|
1722
|
+
);
|
|
1723
|
+
o = f.appendChild(ot());
|
|
1724
|
+
}
|
|
1725
|
+
var u = null, c = /* @__PURE__ */ Vs(() => {
|
|
1726
|
+
var M = n();
|
|
1727
|
+
return nr(M) ? M : M == null ? [] : En(M);
|
|
1728
|
+
}), v, g = /* @__PURE__ */ new Map(), p = !0;
|
|
1729
|
+
function T(M) {
|
|
1730
|
+
(L.effect.f & Te) === 0 && (L.pending.delete(M), L.fallback = u, pi(L, v, o, t, r), u !== null && (v.length === 0 ? (u.f & ye) === 0 ? Ln(u) : (u.f ^= ye, Mt(u, null, o)) : Nn(u, () => {
|
|
1731
|
+
u = null;
|
|
1732
|
+
})));
|
|
1733
|
+
}
|
|
1734
|
+
function d(M) {
|
|
1735
|
+
L.pending.delete(M);
|
|
1736
|
+
}
|
|
1737
|
+
var w = Dn(() => {
|
|
1738
|
+
v = /** @type {V[]} */
|
|
1739
|
+
_(c);
|
|
1740
|
+
for (var M = v.length, A = /* @__PURE__ */ new Set(), P = (
|
|
1741
|
+
/** @type {Batch} */
|
|
1742
|
+
D
|
|
1743
|
+
), ne = mr(), F = 0; F < M; F += 1) {
|
|
1744
|
+
var $ = v[F], ce = r($, F), m = p ? null : a.get(ce);
|
|
1745
|
+
m ? (m.v && Rt(m.v, $), m.i && Rt(m.i, F), ne && P.unskip_effect(m.e)) : (m = mi(
|
|
1746
|
+
a,
|
|
1747
|
+
p ? o : Gn ?? (Gn = ot()),
|
|
1748
|
+
$,
|
|
1749
|
+
ce,
|
|
1750
|
+
F,
|
|
1751
|
+
s,
|
|
1752
|
+
t,
|
|
1753
|
+
n
|
|
1754
|
+
), p || (m.e.f |= ye), a.set(ce, m)), A.add(ce);
|
|
1755
|
+
}
|
|
1756
|
+
if (M === 0 && i && !u && (p ? u = It(() => i(o)) : (u = It(() => i(Gn ?? (Gn = ot()))), u.f |= ye)), M > A.size && xs(), !p)
|
|
1757
|
+
if (g.set(P, A), ne) {
|
|
1758
|
+
for (const [S, y] of a)
|
|
1759
|
+
A.has(S) || P.skip_effect(y.e);
|
|
1760
|
+
P.oncommit(T), P.ondiscard(d);
|
|
1761
|
+
} else
|
|
1762
|
+
T(P);
|
|
1763
|
+
_(c);
|
|
1764
|
+
}), L = { effect: w, items: a, pending: g, outrogroups: null, fallback: u };
|
|
1765
|
+
p = !1;
|
|
1766
|
+
}
|
|
1767
|
+
function kt(e) {
|
|
1768
|
+
for (; e !== null && (e.f & pe) === 0; )
|
|
1769
|
+
e = e.next;
|
|
1770
|
+
return e;
|
|
1771
|
+
}
|
|
1772
|
+
function pi(e, t, n, r, s) {
|
|
1773
|
+
var i = (r & ls) !== 0, o = t.length, a = e.items, l = kt(e.effect.first), f, u = null, c, v = [], g = [], p, T, d, w;
|
|
1774
|
+
if (i)
|
|
1775
|
+
for (w = 0; w < o; w += 1)
|
|
1776
|
+
p = t[w], T = s(p, w), d = /** @type {EachItem} */
|
|
1777
|
+
a.get(T).e, (d.f & ye) === 0 && (d.nodes?.a?.measure(), (c ?? (c = /* @__PURE__ */ new Set())).add(d));
|
|
1778
|
+
for (w = 0; w < o; w += 1) {
|
|
1779
|
+
if (p = t[w], T = s(p, w), d = /** @type {EachItem} */
|
|
1780
|
+
a.get(T).e, e.outrogroups !== null)
|
|
1781
|
+
for (const m of e.outrogroups)
|
|
1782
|
+
m.pending.delete(d), m.done.delete(d);
|
|
1783
|
+
if ((d.f & ye) !== 0)
|
|
1784
|
+
if (d.f ^= ye, d === l)
|
|
1785
|
+
Mt(d, null, n);
|
|
1786
|
+
else {
|
|
1787
|
+
var L = u ? u.next : l;
|
|
1788
|
+
d === e.effect.last && (e.effect.last = d.prev), d.prev && (d.prev.next = d.next), d.next && (d.next.prev = d.prev), qe(e, u, d), qe(e, d, L), Mt(d, L, n), u = d, v = [], g = [], l = kt(u.next);
|
|
1789
|
+
continue;
|
|
1790
|
+
}
|
|
1791
|
+
if ((d.f & U) !== 0 && (Ln(d), i && (d.nodes?.a?.unfix(), (c ?? (c = /* @__PURE__ */ new Set())).delete(d))), d !== l) {
|
|
1792
|
+
if (f !== void 0 && f.has(d)) {
|
|
1793
|
+
if (v.length < g.length) {
|
|
1794
|
+
var M = g[0], A;
|
|
1795
|
+
u = M.prev;
|
|
1796
|
+
var P = v[0], ne = v[v.length - 1];
|
|
1797
|
+
for (A = 0; A < v.length; A += 1)
|
|
1798
|
+
Mt(v[A], M, n);
|
|
1799
|
+
for (A = 0; A < g.length; A += 1)
|
|
1800
|
+
f.delete(g[A]);
|
|
1801
|
+
qe(e, P.prev, ne.next), qe(e, u, P), qe(e, ne, M), l = M, u = ne, w -= 1, v = [], g = [];
|
|
1802
|
+
} else
|
|
1803
|
+
f.delete(d), Mt(d, l, n), qe(e, d.prev, d.next), qe(e, d, u === null ? e.effect.first : u.next), qe(e, u, d), u = d;
|
|
1804
|
+
continue;
|
|
1805
|
+
}
|
|
1806
|
+
for (v = [], g = []; l !== null && l !== d; )
|
|
1807
|
+
(f ?? (f = /* @__PURE__ */ new Set())).add(l), g.push(l), l = kt(l.next);
|
|
1808
|
+
if (l === null)
|
|
1809
|
+
continue;
|
|
1810
|
+
}
|
|
1811
|
+
(d.f & ye) === 0 && v.push(d), u = d, l = kt(d.next);
|
|
1812
|
+
}
|
|
1813
|
+
if (e.outrogroups !== null) {
|
|
1814
|
+
for (const m of e.outrogroups)
|
|
1815
|
+
m.pending.size === 0 && (xn(e, En(m.done)), e.outrogroups?.delete(m));
|
|
1816
|
+
e.outrogroups.size === 0 && (e.outrogroups = null);
|
|
1817
|
+
}
|
|
1818
|
+
if (l !== null || f !== void 0) {
|
|
1819
|
+
var F = [];
|
|
1820
|
+
if (f !== void 0)
|
|
1821
|
+
for (d of f)
|
|
1822
|
+
(d.f & U) === 0 && F.push(d);
|
|
1823
|
+
for (; l !== null; )
|
|
1824
|
+
(l.f & U) === 0 && l !== e.fallback && F.push(l), l = kt(l.next);
|
|
1825
|
+
var $ = F.length;
|
|
1826
|
+
if ($ > 0) {
|
|
1827
|
+
var ce = (r & er) !== 0 && o === 0 ? n : null;
|
|
1828
|
+
if (i) {
|
|
1829
|
+
for (w = 0; w < $; w += 1)
|
|
1830
|
+
F[w].nodes?.a?.measure();
|
|
1831
|
+
for (w = 0; w < $; w += 1)
|
|
1832
|
+
F[w].nodes?.a?.fix();
|
|
1833
|
+
}
|
|
1834
|
+
_i(e, F, ce);
|
|
1835
|
+
}
|
|
1836
|
+
}
|
|
1837
|
+
i && hn(() => {
|
|
1838
|
+
if (c !== void 0)
|
|
1839
|
+
for (d of c)
|
|
1840
|
+
d.nodes?.a?.apply();
|
|
1841
|
+
});
|
|
1842
|
+
}
|
|
1843
|
+
function mi(e, t, n, r, s, i, o, a) {
|
|
1844
|
+
var l = (o & is) !== 0 ? (o & as) === 0 ? /* @__PURE__ */ Us(n, !1, !1) : At(n) : null, f = (o & os) !== 0 ? At(s) : null;
|
|
1845
|
+
return {
|
|
1846
|
+
v: l,
|
|
1847
|
+
i: f,
|
|
1848
|
+
e: It(() => (i(t, l ?? n, f ?? s, a), () => {
|
|
1849
|
+
e.delete(r);
|
|
1850
|
+
}))
|
|
1851
|
+
};
|
|
1852
|
+
}
|
|
1853
|
+
function Mt(e, t, n) {
|
|
1854
|
+
if (e.nodes)
|
|
1855
|
+
for (var r = e.nodes.start, s = e.nodes.end, i = t && (t.f & ye) === 0 ? (
|
|
1856
|
+
/** @type {EffectNodes} */
|
|
1857
|
+
t.nodes.start
|
|
1858
|
+
) : n; r !== null; ) {
|
|
1859
|
+
var o = (
|
|
1860
|
+
/** @type {TemplateNode} */
|
|
1861
|
+
/* @__PURE__ */ Lt(r)
|
|
1862
|
+
);
|
|
1863
|
+
if (i.before(r), r === s)
|
|
1864
|
+
return;
|
|
1865
|
+
r = o;
|
|
1866
|
+
}
|
|
1867
|
+
}
|
|
1868
|
+
function qe(e, t, n) {
|
|
1869
|
+
t === null ? e.effect.first = n : t.next = n, n === null ? e.effect.last = t : n.prev = t;
|
|
1870
|
+
}
|
|
1871
|
+
function Jt(e, t) {
|
|
1872
|
+
ni(() => {
|
|
1625
1873
|
var n = e.getRootNode(), r = (
|
|
1626
1874
|
/** @type {ShadowRoot} */
|
|
1627
1875
|
n.host ? (
|
|
@@ -1634,302 +1882,629 @@ function Ft(e, t) {
|
|
|
1634
1882
|
)
|
|
1635
1883
|
);
|
|
1636
1884
|
if (!r.querySelector("#" + t.hash)) {
|
|
1637
|
-
const
|
|
1638
|
-
|
|
1885
|
+
const s = gr("style");
|
|
1886
|
+
s.id = t.hash, s.textContent = t.code, r.appendChild(s);
|
|
1639
1887
|
}
|
|
1640
1888
|
});
|
|
1641
1889
|
}
|
|
1642
|
-
function
|
|
1890
|
+
function Fr(e) {
|
|
1643
1891
|
var t, n, r = "";
|
|
1644
1892
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
1645
1893
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
1646
|
-
var
|
|
1647
|
-
for (t = 0; t <
|
|
1894
|
+
var s = e.length;
|
|
1895
|
+
for (t = 0; t < s; t++) e[t] && (n = Fr(e[t])) && (r && (r += " "), r += n);
|
|
1648
1896
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
1649
1897
|
return r;
|
|
1650
1898
|
}
|
|
1651
|
-
function
|
|
1652
|
-
for (var e, t, n = 0, r = "",
|
|
1899
|
+
function gi() {
|
|
1900
|
+
for (var e, t, n = 0, r = "", s = arguments.length; n < s; n++) (e = arguments[n]) && (t = Fr(e)) && (r && (r += " "), r += t);
|
|
1653
1901
|
return r;
|
|
1654
1902
|
}
|
|
1655
|
-
function
|
|
1656
|
-
return typeof e == "object" ?
|
|
1903
|
+
function $e(e) {
|
|
1904
|
+
return typeof e == "object" ? gi(e) : e ?? "";
|
|
1657
1905
|
}
|
|
1658
|
-
|
|
1906
|
+
const Zn = [...`
|
|
1907
|
+
\r\f \v\uFEFF`];
|
|
1908
|
+
function wi(e, t, n) {
|
|
1659
1909
|
var r = e == null ? "" : "" + e;
|
|
1660
|
-
|
|
1910
|
+
if (t && (r = r ? r + " " + t : t), n) {
|
|
1911
|
+
for (var s of Object.keys(n))
|
|
1912
|
+
if (n[s])
|
|
1913
|
+
r = r ? r + " " + s : s;
|
|
1914
|
+
else if (r.length)
|
|
1915
|
+
for (var i = s.length, o = 0; (o = r.indexOf(s, o)) >= 0; ) {
|
|
1916
|
+
var a = o + i;
|
|
1917
|
+
(o === 0 || Zn.includes(r[o - 1])) && (a === r.length || Zn.includes(r[a])) ? r = (o === 0 ? "" : r.substring(0, o)) + r.substring(a + 1) : o = a;
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
return r === "" ? null : r;
|
|
1661
1921
|
}
|
|
1662
|
-
function
|
|
1922
|
+
function bi(e, t) {
|
|
1663
1923
|
return e == null ? null : String(e);
|
|
1664
1924
|
}
|
|
1665
|
-
function
|
|
1666
|
-
var
|
|
1667
|
-
if (
|
|
1668
|
-
var a =
|
|
1925
|
+
function xe(e, t, n, r, s, i) {
|
|
1926
|
+
var o = e.__className;
|
|
1927
|
+
if (o !== n || o === void 0) {
|
|
1928
|
+
var a = wi(n, r, i);
|
|
1669
1929
|
a == null ? e.removeAttribute("class") : t ? e.className = a : e.setAttribute("class", a), e.__className = n;
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1930
|
+
} else if (i && s !== i)
|
|
1931
|
+
for (var l in i) {
|
|
1932
|
+
var f = !!i[l];
|
|
1933
|
+
(s == null || f !== !!s[l]) && e.classList.toggle(l, f);
|
|
1934
|
+
}
|
|
1935
|
+
return i;
|
|
1672
1936
|
}
|
|
1673
|
-
function
|
|
1674
|
-
var
|
|
1675
|
-
if (
|
|
1676
|
-
var
|
|
1677
|
-
|
|
1937
|
+
function yi(e, t, n, r) {
|
|
1938
|
+
var s = e.__style;
|
|
1939
|
+
if (s !== t) {
|
|
1940
|
+
var i = bi(t);
|
|
1941
|
+
i == null ? e.removeAttribute("style") : e.style.cssText = i, e.__style = t;
|
|
1678
1942
|
}
|
|
1679
1943
|
return r;
|
|
1680
1944
|
}
|
|
1681
|
-
const
|
|
1682
|
-
function
|
|
1683
|
-
var
|
|
1684
|
-
|
|
1945
|
+
const xi = /* @__PURE__ */ Symbol("is custom element"), Ei = /* @__PURE__ */ Symbol("is html"), Si = bs ? "progress" : "PROGRESS";
|
|
1946
|
+
function Kn(e, t) {
|
|
1947
|
+
var n = Or(e);
|
|
1948
|
+
n.value === (n.value = // treat null and undefined the same for the initial value
|
|
1949
|
+
t ?? void 0) || // @ts-expect-error
|
|
1950
|
+
// `progress` elements always need their value set when it's `0`
|
|
1951
|
+
e.value === t && (t !== 0 || e.nodeName !== Si) || (e.value = t ?? "");
|
|
1685
1952
|
}
|
|
1686
|
-
function
|
|
1953
|
+
function le(e, t, n, r) {
|
|
1954
|
+
var s = Or(e);
|
|
1955
|
+
s[t] !== (s[t] = n) && (t === "loading" && (e[ws] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && ki(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
|
|
1956
|
+
}
|
|
1957
|
+
function Or(e) {
|
|
1687
1958
|
return (
|
|
1688
1959
|
/** @type {Record<string | symbol, unknown>} **/
|
|
1689
1960
|
// @ts-expect-error
|
|
1690
1961
|
e.__attributes ?? (e.__attributes = {
|
|
1691
|
-
[
|
|
1692
|
-
[
|
|
1962
|
+
[xi]: e.nodeName.includes("-"),
|
|
1963
|
+
[Ei]: e.namespaceURI === tr
|
|
1693
1964
|
})
|
|
1694
1965
|
);
|
|
1695
1966
|
}
|
|
1696
|
-
var
|
|
1697
|
-
function
|
|
1698
|
-
var t = e.getAttribute("is") || e.nodeName, n =
|
|
1967
|
+
var Jn = /* @__PURE__ */ new Map();
|
|
1968
|
+
function ki(e) {
|
|
1969
|
+
var t = e.getAttribute("is") || e.nodeName, n = Jn.get(t);
|
|
1699
1970
|
if (n) return n;
|
|
1700
|
-
|
|
1701
|
-
for (var r,
|
|
1702
|
-
r =
|
|
1703
|
-
for (var
|
|
1704
|
-
r[
|
|
1705
|
-
|
|
1971
|
+
Jn.set(t, n = []);
|
|
1972
|
+
for (var r, s = e, i = Element.prototype; i !== s; ) {
|
|
1973
|
+
r = ds(s);
|
|
1974
|
+
for (var o in r)
|
|
1975
|
+
r[o].set && n.push(o);
|
|
1976
|
+
s = rr(s);
|
|
1706
1977
|
}
|
|
1707
1978
|
return n;
|
|
1708
1979
|
}
|
|
1709
|
-
function
|
|
1710
|
-
var
|
|
1980
|
+
function W(e, t, n, r) {
|
|
1981
|
+
var s = (
|
|
1711
1982
|
/** @type {V} */
|
|
1712
1983
|
r
|
|
1713
|
-
),
|
|
1714
|
-
r),
|
|
1984
|
+
), i = !0, o = () => (i && (i = !1, s = /** @type {V} */
|
|
1985
|
+
r), s), a;
|
|
1715
1986
|
a = /** @type {V} */
|
|
1716
|
-
e[t], a === void 0 && r !== void 0 && (a =
|
|
1717
|
-
var
|
|
1718
|
-
return
|
|
1987
|
+
e[t], a === void 0 && r !== void 0 && (a = o());
|
|
1988
|
+
var l;
|
|
1989
|
+
return l = () => {
|
|
1719
1990
|
var f = (
|
|
1720
1991
|
/** @type {V} */
|
|
1721
1992
|
e[t]
|
|
1722
1993
|
);
|
|
1723
|
-
return f === void 0 ?
|
|
1724
|
-
},
|
|
1994
|
+
return f === void 0 ? o() : (i = !0, f);
|
|
1995
|
+
}, l;
|
|
1725
1996
|
}
|
|
1726
|
-
var
|
|
1727
|
-
const
|
|
1997
|
+
var Mi = /* @__PURE__ */ Lr('<svg xmlns="http://www.w3.org/2000/svg" class="pie-window-controls__icon svelte-7vww0g" width="12" height="12" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 15l7-7 7 7"></path></svg>'), Ci = /* @__PURE__ */ Lr('<svg xmlns="http://www.w3.org/2000/svg" class="pie-window-controls__icon svelte-7vww0g" width="12" height="12" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>'), Ti = /* @__PURE__ */ z('<button><!></button> <button title="Close" aria-label="Close panel"><svg xmlns="http://www.w3.org/2000/svg" class="pie-window-controls__icon svelte-7vww0g" width="12" height="12" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button>', 1);
|
|
1998
|
+
const Ai = {
|
|
1728
1999
|
hash: "svelte-7vww0g",
|
|
1729
2000
|
code: ".pie-window-controls__button.svelte-7vww0g {display:inline-flex;align-items:center;justify-content:center;width:1.35rem;height:1.35rem;padding:0;border:1px solid rgba(148, 163, 184, 0.7);border-radius:9999px;background:rgba(255, 255, 255, 0.65);color:#334155;cursor:pointer;}.pie-window-controls__button.svelte-7vww0g:hover {background:rgba(241, 245, 249, 0.95);}.pie-window-controls__button.svelte-7vww0g:focus-visible {outline:2px solid #3b82f6;outline-offset:1px;}.pie-window-controls__icon.svelte-7vww0g {display:block;}"
|
|
1730
2001
|
};
|
|
1731
|
-
function
|
|
1732
|
-
|
|
1733
|
-
let n =
|
|
1734
|
-
const
|
|
1735
|
-
var
|
|
2002
|
+
function Ri(e, t) {
|
|
2003
|
+
Mn(t, !0), Jt(e, Ai);
|
|
2004
|
+
let n = W(t, "minimized", 3, !1), r = W(t, "buttonClass", 3, "");
|
|
2005
|
+
const s = /* @__PURE__ */ it(() => (r() || "").trim() || "pie-window-controls__button");
|
|
2006
|
+
var i = Ti(), o = lt(i), a = E(o);
|
|
1736
2007
|
{
|
|
1737
|
-
var
|
|
1738
|
-
var
|
|
1739
|
-
|
|
1740
|
-
}, f = (
|
|
1741
|
-
var
|
|
1742
|
-
|
|
2008
|
+
var l = (c) => {
|
|
2009
|
+
var v = Mi();
|
|
2010
|
+
N(c, v);
|
|
2011
|
+
}, f = (c) => {
|
|
2012
|
+
var v = Ci();
|
|
2013
|
+
N(c, v);
|
|
1743
2014
|
};
|
|
1744
|
-
|
|
1745
|
-
n() ?
|
|
2015
|
+
Fe(a, (c) => {
|
|
2016
|
+
n() ? c(l) : c(f, -1);
|
|
1746
2017
|
});
|
|
1747
2018
|
}
|
|
1748
|
-
var
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
}),
|
|
1752
|
-
t.onToggle?.apply(this,
|
|
1753
|
-
}),
|
|
1754
|
-
t.onClose?.apply(this,
|
|
1755
|
-
}),
|
|
1756
|
-
}
|
|
1757
|
-
|
|
1758
|
-
var
|
|
1759
|
-
const
|
|
2019
|
+
var u = R(o, 2);
|
|
2020
|
+
Y(() => {
|
|
2021
|
+
xe(o, 1, $e(_(s)), "svelte-7vww0g"), le(o, "title", n() ? "Maximize" : "Minimize"), le(o, "aria-label", n() ? "Maximize panel" : "Minimize panel"), xe(u, 1, $e(_(s)), "svelte-7vww0g");
|
|
2022
|
+
}), _e("click", o, function(...c) {
|
|
2023
|
+
t.onToggle?.apply(this, c);
|
|
2024
|
+
}), _e("click", u, function(...c) {
|
|
2025
|
+
t.onClose?.apply(this, c);
|
|
2026
|
+
}), N(e, i), Cn();
|
|
2027
|
+
}
|
|
2028
|
+
Ft(["click"]);
|
|
2029
|
+
var Ii = /* @__PURE__ */ z('<div role="button" tabindex="0" title="Resize window" aria-label="Resize window"><svg viewBox="0 0 16 16" fill="currentColor"><path d="M16 16V14H14V16H16Z"></path><path d="M16 11V9H14V11H16Z"></path><path d="M13 16V14H11V16H13Z"></path></svg></div>');
|
|
2030
|
+
const Di = {
|
|
1760
2031
|
hash: "svelte-uv6k3c",
|
|
1761
2032
|
code: ".pie-panel-resize-handle.svelte-uv6k3c {position:absolute;right:0;bottom:0;width:12px;height:12px;display:inline-flex;align-items:center;justify-content:center;cursor:nwse-resize;opacity:0.82;z-index:2;}.pie-panel-resize-handle.svelte-uv6k3c:hover {opacity:1;}.pie-panel-resize-icon.svelte-uv6k3c {width:100%;height:100%;color:color-mix(in srgb, var(--color-base-content, #334155) 30%, transparent);}"
|
|
1762
2033
|
};
|
|
1763
|
-
function
|
|
1764
|
-
|
|
1765
|
-
let n =
|
|
1766
|
-
var
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
}),
|
|
1770
|
-
t.onPointerDown?.apply(this,
|
|
1771
|
-
}),
|
|
1772
|
-
}
|
|
1773
|
-
|
|
1774
|
-
const
|
|
1775
|
-
function
|
|
1776
|
-
const e = globalThis, t = e[
|
|
1777
|
-
return e[
|
|
1778
|
-
}
|
|
1779
|
-
function
|
|
1780
|
-
const n = (
|
|
2034
|
+
function Pi(e, t) {
|
|
2035
|
+
Jt(e, Di);
|
|
2036
|
+
let n = W(t, "handleClass", 3, "pie-panel-resize-handle"), r = W(t, "iconClass", 3, "pie-panel-resize-icon");
|
|
2037
|
+
var s = Ii(), i = E(s);
|
|
2038
|
+
Y(() => {
|
|
2039
|
+
xe(s, 1, $e(n()), "svelte-uv6k3c"), xe(i, 0, $e(r()), "svelte-uv6k3c");
|
|
2040
|
+
}), _e("mousedown", s, function(...o) {
|
|
2041
|
+
t.onPointerDown?.apply(this, o);
|
|
2042
|
+
}), N(e, s);
|
|
2043
|
+
}
|
|
2044
|
+
Ft(["mousedown"]);
|
|
2045
|
+
const Ni = 9999, Qn = "__pieFloatingPanelZIndex";
|
|
2046
|
+
function cn() {
|
|
2047
|
+
const e = globalThis, t = e[Qn], r = (typeof t == "number" && Number.isFinite(t) ? t : Ni) + 1;
|
|
2048
|
+
return e[Qn] = r, r;
|
|
2049
|
+
}
|
|
2050
|
+
function Li(e, t) {
|
|
2051
|
+
const n = (c, v, g) => Math.max(v, Math.min(c, g)), r = n(
|
|
1781
2052
|
Math.round(e.width * t.widthRatio),
|
|
1782
2053
|
t.minWidth,
|
|
1783
2054
|
t.maxWidth
|
|
1784
|
-
),
|
|
2055
|
+
), s = n(
|
|
1785
2056
|
Math.round(e.height * t.heightRatio),
|
|
1786
2057
|
t.minHeight,
|
|
1787
2058
|
t.maxHeight
|
|
1788
|
-
),
|
|
1789
|
-
return { x: f, y:
|
|
2059
|
+
), i = t.paddingX ?? 16, o = t.paddingY ?? 16, a = Math.max(i, e.width - r - i), l = Math.max(o, e.height - s - o), f = t.alignX === "left" ? i : t.alignX === "right" ? a : Math.max(i, Math.round((e.width - r) / 2)), u = t.alignY === "top" ? o : t.alignY === "bottom" ? l : Math.max(o, Math.round((e.height - s) / 2));
|
|
2060
|
+
return { x: f, y: u, width: r, height: s };
|
|
1790
2061
|
}
|
|
1791
|
-
function
|
|
2062
|
+
function qi(e) {
|
|
1792
2063
|
const t = e.padding ?? 0;
|
|
1793
|
-
let n = !1, r = !1,
|
|
1794
|
-
const
|
|
2064
|
+
let n = !1, r = !1, s = 0, i = 0, o = 0, a = 0, l = 0, f = 0, u = 0, c = 0;
|
|
2065
|
+
const v = (d) => {
|
|
1795
2066
|
if (!n) return;
|
|
1796
|
-
const
|
|
2067
|
+
const w = e.getState(), L = d.clientX - s, M = d.clientY - i, A = Math.max(t, window.innerWidth - w.width - t), P = Math.max(t, window.innerHeight - 100 - t);
|
|
1797
2068
|
e.setState({
|
|
1798
|
-
...
|
|
1799
|
-
x: Math.max(t, Math.min(
|
|
1800
|
-
y: Math.max(t, Math.min(a +
|
|
2069
|
+
...w,
|
|
2070
|
+
x: Math.max(t, Math.min(o + L, A)),
|
|
2071
|
+
y: Math.max(t, Math.min(a + M, P))
|
|
1801
2072
|
});
|
|
1802
|
-
},
|
|
2073
|
+
}, g = (d) => {
|
|
1803
2074
|
if (!r) return;
|
|
1804
|
-
const
|
|
2075
|
+
const w = e.getState(), L = d.clientX - l, M = d.clientY - f, A = Math.max(
|
|
1805
2076
|
e.minWidth,
|
|
1806
|
-
window.innerWidth -
|
|
1807
|
-
),
|
|
2077
|
+
window.innerWidth - w.x - t
|
|
2078
|
+
), P = Math.max(
|
|
1808
2079
|
e.minHeight,
|
|
1809
|
-
window.innerHeight -
|
|
2080
|
+
window.innerHeight - w.y - t
|
|
1810
2081
|
);
|
|
1811
2082
|
e.setState({
|
|
1812
|
-
...
|
|
2083
|
+
...w,
|
|
1813
2084
|
width: Math.max(
|
|
1814
2085
|
e.minWidth,
|
|
1815
|
-
Math.min(
|
|
2086
|
+
Math.min(u + L, A)
|
|
1816
2087
|
),
|
|
1817
2088
|
height: Math.max(
|
|
1818
2089
|
e.minHeight,
|
|
1819
|
-
Math.min(
|
|
2090
|
+
Math.min(c + M, P)
|
|
1820
2091
|
)
|
|
1821
2092
|
});
|
|
1822
|
-
},
|
|
1823
|
-
n = !1, document.removeEventListener("mousemove",
|
|
1824
|
-
},
|
|
1825
|
-
r = !1, document.removeEventListener("mousemove",
|
|
2093
|
+
}, p = () => {
|
|
2094
|
+
n = !1, document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", p);
|
|
2095
|
+
}, T = () => {
|
|
2096
|
+
r = !1, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", T);
|
|
1826
2097
|
};
|
|
1827
2098
|
return {
|
|
1828
|
-
startDrag(
|
|
1829
|
-
e.onFocus?.(), n = !0,
|
|
1830
|
-
const
|
|
1831
|
-
|
|
2099
|
+
startDrag(d) {
|
|
2100
|
+
e.onFocus?.(), n = !0, s = d.clientX, i = d.clientY;
|
|
2101
|
+
const w = e.getState();
|
|
2102
|
+
o = w.x, a = w.y, document.addEventListener("mousemove", v), document.addEventListener("mouseup", p);
|
|
1832
2103
|
},
|
|
1833
|
-
startResize(
|
|
1834
|
-
e.onFocus?.(), r = !0,
|
|
1835
|
-
const
|
|
1836
|
-
|
|
2104
|
+
startResize(d) {
|
|
2105
|
+
e.onFocus?.(), r = !0, l = d.clientX, f = d.clientY;
|
|
2106
|
+
const w = e.getState();
|
|
2107
|
+
u = w.width, c = w.height, document.addEventListener("mousemove", g), document.addEventListener("mouseup", T), d.preventDefault(), d.stopPropagation();
|
|
1837
2108
|
},
|
|
1838
2109
|
stop() {
|
|
1839
|
-
|
|
2110
|
+
p(), T();
|
|
1840
2111
|
}
|
|
1841
2112
|
};
|
|
1842
2113
|
}
|
|
1843
|
-
var
|
|
1844
|
-
const
|
|
2114
|
+
var Fi = /* @__PURE__ */ z("<div><!></div> <!>", 1), Oi = /* @__PURE__ */ z('<section><header role="button" tabindex="0"><div class="pie-shared-floating-panel__header-main svelte-sqnpo9"><div class="pie-shared-floating-panel__header-title-wrap svelte-sqnpo9"><!> <h3 class="pie-shared-floating-panel__title svelte-sqnpo9"> </h3></div> <!></div> <div class="pie-shared-floating-panel__header-controls svelte-sqnpo9"><!></div></header> <!></section>');
|
|
2115
|
+
const zi = {
|
|
1845
2116
|
hash: "svelte-sqnpo9",
|
|
1846
2117
|
code: ".pie-shared-floating-panel.svelte-sqnpo9 {position:fixed;display:flex;flex-direction:column;background:var(--color-base-100, #fff);color:var(--color-base-content, #1f2937);border:2px solid var(--color-base-300, #d1d5db);border-radius:8px;box-shadow:0 25px 50px -12px rgba(0, 0, 0, 0.25);overflow:hidden;font-family:var(--pie-font-family, Inter, system-ui, sans-serif);}.pie-shared-floating-panel__header.svelte-sqnpo9 {padding:8px 16px;display:flex;align-items:center;justify-content:space-between;background:var(--color-base-200, #f3f4f6);cursor:move;user-select:none;border-bottom:1px solid var(--color-base-300, #d1d5db);}.pie-shared-floating-panel__header-main.svelte-sqnpo9 {display:flex;align-items:center;gap:8px;min-width:0;flex:1;}.pie-shared-floating-panel__header-title-wrap.svelte-sqnpo9 {display:flex;align-items:center;gap:8px;min-width:0;}.pie-shared-floating-panel__title.svelte-sqnpo9 {margin:0;font-size:0.95rem;font-weight:700;}.pie-shared-floating-panel__header-controls.svelte-sqnpo9 {display:flex;gap:4px;}.pie-shared-floating-panel__body.svelte-sqnpo9 {flex:1;min-height:0;display:flex;flex-direction:column;}"
|
|
1847
2118
|
};
|
|
1848
|
-
function
|
|
1849
|
-
|
|
1850
|
-
let n =
|
|
1851
|
-
const
|
|
2119
|
+
function Hi(e, t) {
|
|
2120
|
+
Mn(t, !0), Jt(e, zi);
|
|
2121
|
+
let n = W(t, "ariaLabel", 3, "Drag panel"), r = W(t, "minWidth", 3, 320), s = W(t, "minHeight", 3, 260), i = W(t, "defaultMinimized", 3, !1), o = W(t, "className", 3, ""), a = W(t, "bodyClass", 3, ""), l = W(t, "headerClass", 3, ""), f = /* @__PURE__ */ I(16), u = /* @__PURE__ */ I(16), c = /* @__PURE__ */ I(420), v = /* @__PURE__ */ I(480), g = /* @__PURE__ */ I(Ce(cn())), p = /* @__PURE__ */ I(Ce(Ct(() => i())));
|
|
2122
|
+
const T = qi({
|
|
1852
2123
|
getState: () => ({
|
|
1853
|
-
x:
|
|
1854
|
-
y:
|
|
1855
|
-
width:
|
|
1856
|
-
height:
|
|
2124
|
+
x: _(f),
|
|
2125
|
+
y: _(u),
|
|
2126
|
+
width: _(c),
|
|
2127
|
+
height: _(v)
|
|
1857
2128
|
}),
|
|
1858
|
-
setState: (
|
|
1859
|
-
|
|
2129
|
+
setState: (k) => {
|
|
2130
|
+
b(f, k.x, !0), b(u, k.y, !0), b(c, k.width, !0), b(v, k.height, !0);
|
|
1860
2131
|
},
|
|
1861
|
-
minWidth:
|
|
1862
|
-
minHeight:
|
|
2132
|
+
minWidth: Ct(() => r()),
|
|
2133
|
+
minHeight: Ct(() => s()),
|
|
1863
2134
|
onFocus: () => {
|
|
1864
|
-
|
|
2135
|
+
b(g, cn(), !0);
|
|
1865
2136
|
}
|
|
1866
2137
|
});
|
|
1867
|
-
function
|
|
1868
|
-
|
|
2138
|
+
function d() {
|
|
2139
|
+
b(g, cn(), !0);
|
|
1869
2140
|
}
|
|
1870
|
-
|
|
1871
|
-
const
|
|
1872
|
-
|
|
1873
|
-
}),
|
|
1874
|
-
|
|
2141
|
+
qn(() => {
|
|
2142
|
+
const k = Li({ width: window.innerWidth, height: window.innerHeight }, t.initialSizing);
|
|
2143
|
+
b(f, k.x, !0), b(u, k.y, !0), b(c, k.width, !0), b(v, k.height, !0);
|
|
2144
|
+
}), hi(() => {
|
|
2145
|
+
T.stop();
|
|
1875
2146
|
});
|
|
1876
|
-
const
|
|
1877
|
-
var
|
|
1878
|
-
|
|
1879
|
-
var
|
|
1880
|
-
|
|
1881
|
-
var
|
|
1882
|
-
|
|
2147
|
+
const w = /* @__PURE__ */ it(() => ["pie-shared-floating-panel", o() || ""].join(" ").trim()), L = /* @__PURE__ */ it(() => ["pie-shared-floating-panel__body", a() || ""].join(" ").trim()), M = /* @__PURE__ */ it(() => ["pie-shared-floating-panel__header", l() || ""].join(" ").trim());
|
|
2148
|
+
var A = Oi(), P = E(A), ne = E(P), F = E(ne), $ = E(F);
|
|
2149
|
+
un($, () => t.icon ?? Vt);
|
|
2150
|
+
var ce = R($, 2), m = E(ce), S = R(F, 2);
|
|
2151
|
+
un(S, () => t.headerActions ?? Vt);
|
|
2152
|
+
var y = R(ne, 2), re = E(y);
|
|
2153
|
+
Ri(re, {
|
|
1883
2154
|
get minimized() {
|
|
1884
|
-
return
|
|
2155
|
+
return _(p);
|
|
1885
2156
|
},
|
|
1886
|
-
onToggle: () =>
|
|
2157
|
+
onToggle: () => b(p, !_(p)),
|
|
1887
2158
|
get onClose() {
|
|
1888
2159
|
return t.onClose;
|
|
1889
2160
|
}
|
|
1890
2161
|
});
|
|
1891
|
-
var
|
|
2162
|
+
var G = R(P, 2);
|
|
2163
|
+
{
|
|
2164
|
+
var Re = (k) => {
|
|
2165
|
+
var Xe = Fi(), We = lt(Xe), Z = E(We);
|
|
2166
|
+
un(Z, () => t.children ?? Vt);
|
|
2167
|
+
var Ie = R(We, 2);
|
|
2168
|
+
Pi(Ie, {
|
|
2169
|
+
onPointerDown: (xt) => T.startResize(xt)
|
|
2170
|
+
}), Y(() => xe(We, 1, $e(_(L)), "svelte-sqnpo9")), N(k, Xe);
|
|
2171
|
+
};
|
|
2172
|
+
Fe(G, (k) => {
|
|
2173
|
+
_(p) || k(Re);
|
|
2174
|
+
});
|
|
2175
|
+
}
|
|
2176
|
+
Y(() => {
|
|
2177
|
+
xe(A, 1, $e(_(w)), "svelte-sqnpo9"), yi(A, `left: ${_(f)}px; top: ${_(u)}px; width: ${_(c)}px; z-index: ${_(g)}; ${_(p) ? "height: auto;" : `height: ${_(v)}px;`}`), xe(P, 1, $e(_(M)), "svelte-sqnpo9"), le(P, "aria-label", n()), se(m, t.title);
|
|
2178
|
+
}), _e("mousedown", P, (k) => {
|
|
2179
|
+
d(), T.startDrag(k);
|
|
2180
|
+
}), N(e, A), Cn();
|
|
2181
|
+
}
|
|
2182
|
+
Ft(["mousedown"]);
|
|
2183
|
+
var ji = /* @__PURE__ */ z('<div><strong>sectionId:</strong> <code class="svelte-1ye6lmg"> </code></div>'), Bi = /* @__PURE__ */ z('<div class="pie-demo-session-db-panel__error svelte-1ye6lmg"> </div>'), Vi = /* @__PURE__ */ z('<th class="svelte-1ye6lmg"> </th>'), Yi = /* @__PURE__ */ z('<tr><td class="svelte-1ye6lmg">No rows</td></tr>'), Xi = /* @__PURE__ */ z('<td class="svelte-1ye6lmg"> </td>'), Wi = /* @__PURE__ */ z("<tr></tr>"), Ui = /* @__PURE__ */ z('<h4 class="pie-demo-session-db-panel__table-title svelte-1ye6lmg"> </h4> <div class="pie-demo-session-db-panel__table-wrap svelte-1ye6lmg"><table class="pie-demo-session-db-panel__table svelte-1ye6lmg"><thead><tr></tr></thead><tbody><!></tbody></table></div>', 1), Gi = /* @__PURE__ */ z('<div class="pie-demo-session-db-panel__tables svelte-1ye6lmg"></div>'), Zi = /* @__PURE__ */ z('<textarea class="pie-demo-session-db-panel__json svelte-1ye6lmg" readonly="" spellcheck="false"></textarea>'), Ki = /* @__PURE__ */ z('<div class="pie-demo-session-db-panel__error svelte-1ye6lmg"> </div>'), Ji = /* @__PURE__ */ z('<!> <textarea class="pie-demo-session-db-panel__json svelte-1ye6lmg" readonly="" spellcheck="false"></textarea>', 1), Qi = /* @__PURE__ */ z('<div class="pie-demo-session-db-panel__content svelte-1ye6lmg"><div class="pie-demo-session-db-panel__meta svelte-1ye6lmg"><div><strong>assessmentId:</strong> <code class="svelte-1ye6lmg"> </code></div> <!> <div><strong>attemptId:</strong> <code class="svelte-1ye6lmg"> </code></div> <div><strong>mode:</strong> <code class="svelte-1ye6lmg"> </code></div></div> <div class="pie-demo-session-db-panel__actions svelte-1ye6lmg"><button type="button" class="pie-demo-session-db-panel__button svelte-1ye6lmg"> </button> <button type="button" class="pie-demo-session-db-panel__button svelte-1ye6lmg">Show raw tables</button> <button type="button" class="pie-demo-session-db-panel__button svelte-1ye6lmg">Show reconstructed snapshots</button> <button type="button" class="pie-demo-session-db-panel__button svelte-1ye6lmg"> </button></div> <!> <!></div>');
|
|
2184
|
+
const $i = {
|
|
2185
|
+
hash: "svelte-1ye6lmg",
|
|
2186
|
+
code: `.pie-demo-session-db-panel__content.svelte-1ye6lmg {display:flex;flex-direction:column;flex:1;height:100%;min-height:0;overflow-y:hidden;overflow-x:hidden;padding:12px;font-size:0.8rem;}.pie-demo-session-db-panel__meta.svelte-1ye6lmg {display:grid;gap:0.2rem;margin-bottom:0.55rem;font-size:0.78rem;}.pie-demo-session-db-panel__actions.svelte-1ye6lmg {display:flex;gap:0.45rem;margin-bottom:0.5rem;}.pie-demo-session-db-panel__button.svelte-1ye6lmg {border:1px solid var(--color-base-300, #d1d5db);background:var(--color-base-100, #fff);color:var(--color-base-content);border-radius:6px;padding:6px 8px;font-size:0.78rem;cursor:pointer;}.pie-demo-session-db-panel__button.svelte-1ye6lmg:hover {background:color-mix(in srgb, var(--color-base-200) 65%, white);}.pie-demo-session-db-panel__button[aria-pressed="true"].svelte-1ye6lmg {background:color-mix(in srgb, var(--color-primary, #2563eb) 18%, transparent);font-weight:600;}.pie-demo-session-db-panel__button.svelte-1ye6lmg:disabled {opacity:0.6;cursor:not-allowed;}.pie-demo-session-db-panel__error.svelte-1ye6lmg {margin-bottom:0.5rem;padding:0.4rem 0.45rem;border-radius:0.3rem;background:color-mix(in srgb, var(--color-error) 12%, var(--color-base-100));border:1px solid color-mix(in srgb, var(--color-error) 35%, var(--color-base-300));}.pie-demo-session-db-panel__tables.svelte-1ye6lmg {display:flex;flex-direction:column;gap:0.5rem;flex:1;min-height:0;overflow:auto;}.pie-demo-session-db-panel__table-title.svelte-1ye6lmg {margin:0;font-size:0.75rem;font-weight:700;text-transform:lowercase;}.pie-demo-session-db-panel__table-wrap.svelte-1ye6lmg {border:1px solid color-mix(in srgb, var(--color-base-content) 25%, transparent);border-radius:0.3rem;background:color-mix(in srgb, var(--color-base-200) 65%, white);overflow:auto;max-height:9.5rem;}.pie-demo-session-db-panel__table.svelte-1ye6lmg {width:100%;border-collapse:collapse;font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;font-size:0.72rem;}.pie-demo-session-db-panel__table.svelte-1ye6lmg th:where(.svelte-1ye6lmg),
|
|
2187
|
+
.pie-demo-session-db-panel__table.svelte-1ye6lmg td:where(.svelte-1ye6lmg) {padding:0.25rem 0.35rem;border-bottom:1px solid color-mix(in srgb, var(--color-base-content) 14%, transparent);vertical-align:top;text-align:left;}.pie-demo-session-db-panel__table.svelte-1ye6lmg th:where(.svelte-1ye6lmg) {position:sticky;top:0;background:color-mix(in srgb, var(--color-base-200) 85%, white);font-weight:700;font-size:0.66rem;line-height:1.15;padding:0.18rem 0.3rem;white-space:nowrap;}.pie-demo-session-db-panel__table.svelte-1ye6lmg td:where(.svelte-1ye6lmg) {white-space:nowrap;}.pie-demo-session-db-panel__meta.svelte-1ye6lmg code:where(.svelte-1ye6lmg),
|
|
2188
|
+
.pie-demo-session-db-panel__json.svelte-1ye6lmg {font-family:ui-monospace, SFMono-Regular, Menlo, monospace;}.pie-demo-session-db-panel__json.svelte-1ye6lmg {width:100%;flex:1;min-height:14rem;resize:none;font-family:ui-monospace, SFMono-Regular, Menlo, monospace;font-size:0.75rem;border:1px solid color-mix(in srgb, var(--color-base-content) 25%, transparent);border-radius:0.3rem;padding:0.45rem;background:color-mix(in srgb, var(--color-base-200) 65%, white);color:var(--color-base-content);box-sizing:border-box;}`
|
|
2189
|
+
};
|
|
2190
|
+
function io(e, t) {
|
|
2191
|
+
Mn(t, !0), Jt(e, $i);
|
|
2192
|
+
let n = W(t, "mode", 3, "section"), r = W(t, "sectionId", 3, ""), s = W(t, "apiBasePath", 3, "/api/session-demo"), i = /* @__PURE__ */ I(null), o = /* @__PURE__ */ I("raw-tables"), a = /* @__PURE__ */ I(!1), l = /* @__PURE__ */ I("{}"), f = /* @__PURE__ */ I(null), u = /* @__PURE__ */ I(!1);
|
|
2193
|
+
const c = 4500;
|
|
2194
|
+
let v = /* @__PURE__ */ I(Ce({
|
|
2195
|
+
attempt_sessions: [],
|
|
2196
|
+
section_sessions: [],
|
|
2197
|
+
item_sessions: [],
|
|
2198
|
+
assessment_sessions: []
|
|
2199
|
+
})), g = /* @__PURE__ */ I(Ce({
|
|
2200
|
+
attempt_sessions: [],
|
|
2201
|
+
section_sessions: [],
|
|
2202
|
+
item_sessions: [],
|
|
2203
|
+
assessment_sessions: []
|
|
2204
|
+
})), p = /* @__PURE__ */ I("{}");
|
|
2205
|
+
const T = /* @__PURE__ */ it(() => n() === "section" ? ["attempt_sessions", "section_sessions", "item_sessions"] : ["attempt_sessions", "assessment_sessions"]), d = /* @__PURE__ */ it(() => n() === "section" ? "Show section request" : "Show assessment request");
|
|
2206
|
+
function w(m) {
|
|
2207
|
+
const S = /* @__PURE__ */ new Set(), y = [];
|
|
2208
|
+
for (const re of m)
|
|
2209
|
+
for (const G of Object.keys(re))
|
|
2210
|
+
S.has(G) || (S.add(G), y.push(G));
|
|
2211
|
+
return y;
|
|
2212
|
+
}
|
|
2213
|
+
function L(m) {
|
|
2214
|
+
if (m == null) return "";
|
|
2215
|
+
if (typeof m == "object")
|
|
2216
|
+
try {
|
|
2217
|
+
return JSON.stringify(m);
|
|
2218
|
+
} catch {
|
|
2219
|
+
return "[unserializable]";
|
|
2220
|
+
}
|
|
2221
|
+
return String(m);
|
|
2222
|
+
}
|
|
2223
|
+
const M = {
|
|
2224
|
+
id: "id",
|
|
2225
|
+
assessment_id: "asm_id",
|
|
2226
|
+
attempt_id: "att_id",
|
|
2227
|
+
demo_user_id: "demo_uid",
|
|
2228
|
+
created_at: "created",
|
|
2229
|
+
updated_at: "updated",
|
|
2230
|
+
attempt_session_id: "att_sess_id",
|
|
2231
|
+
section_id: "sec_id",
|
|
2232
|
+
current_item_identifier: "curr_item_id",
|
|
2233
|
+
visited_item_identifiers: "visited_item_ids",
|
|
2234
|
+
section_session_id: "sec_sess_id",
|
|
2235
|
+
item_identifier: "item_id",
|
|
2236
|
+
canonical_item_id: "canon_item_id",
|
|
2237
|
+
session_payload: "payload",
|
|
2238
|
+
snapshot_payload: "payload"
|
|
2239
|
+
};
|
|
2240
|
+
function A(m) {
|
|
2241
|
+
const S = M[m];
|
|
2242
|
+
if (S) return S;
|
|
2243
|
+
if (m.length <= 14) return m;
|
|
2244
|
+
const y = m.split("_").filter(Boolean);
|
|
2245
|
+
return y.length <= 1 ? m.slice(0, 14) : y.map((G, Re) => Re === y.length - 1 ? G.slice(0, 4) : G.slice(0, 3)).join("_").slice(0, 18);
|
|
2246
|
+
}
|
|
2247
|
+
function P() {
|
|
2248
|
+
return n() === "section" ? `${t.assessmentId}:${r()}:${t.attemptId}` : `${t.assessmentId}:${t.attemptId}`;
|
|
2249
|
+
}
|
|
2250
|
+
function ne(m) {
|
|
2251
|
+
const S = m?.state || {}, y = S?.tables || {}, G = (Array.isArray(y.attempt_sessions) ? y.attempt_sessions : []).filter((Z) => Z.assessment_id === t.assessmentId && Z.attempt_id === t.attemptId), Re = new Set(G.map((Z) => Z.id).filter((Z) => typeof Z == "number")), k = {
|
|
2252
|
+
attempt_sessions: G,
|
|
2253
|
+
section_sessions: [],
|
|
2254
|
+
item_sessions: [],
|
|
2255
|
+
assessment_sessions: []
|
|
2256
|
+
};
|
|
2257
|
+
if (n() === "section") {
|
|
2258
|
+
const Ie = (Array.isArray(y.section_sessions) ? y.section_sessions : []).filter((me) => Re.has(me.attempt_session_id) && me.section_id === r());
|
|
2259
|
+
k.section_sessions = Ie;
|
|
2260
|
+
const xt = new Set(Ie.map((me) => me.id).filter((me) => typeof me == "number")), Qt = Array.isArray(y.item_sessions) ? y.item_sessions : [];
|
|
2261
|
+
k.item_sessions = Qt.filter((me) => xt.has(me.section_session_id));
|
|
2262
|
+
} else {
|
|
2263
|
+
const Z = Array.isArray(y.assessment_sessions) ? y.assessment_sessions : [];
|
|
2264
|
+
k.assessment_sessions = Z.filter((Ie) => Re.has(Ie.attempt_session_id));
|
|
2265
|
+
}
|
|
2266
|
+
b(v, k, !0), b(
|
|
2267
|
+
g,
|
|
2268
|
+
{
|
|
2269
|
+
attempt_sessions: w(k.attempt_sessions),
|
|
2270
|
+
section_sessions: w(k.section_sessions),
|
|
2271
|
+
item_sessions: w(k.item_sessions),
|
|
2272
|
+
assessment_sessions: w(k.assessment_sessions)
|
|
2273
|
+
},
|
|
2274
|
+
!0
|
|
2275
|
+
);
|
|
2276
|
+
const Xe = S.reconstructedSnapshots || {}, We = P();
|
|
2277
|
+
b(p, JSON.stringify(Xe[We] || {}, null, 2), !0);
|
|
2278
|
+
}
|
|
2279
|
+
async function F() {
|
|
2280
|
+
if (!_(a)) {
|
|
2281
|
+
b(a, !0);
|
|
2282
|
+
try {
|
|
2283
|
+
await t.onResetDb();
|
|
2284
|
+
} finally {
|
|
2285
|
+
b(a, !1);
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
}
|
|
2289
|
+
async function $() {
|
|
2290
|
+
const m = new AbortController(), S = setTimeout(() => m.abort(), c);
|
|
2291
|
+
try {
|
|
2292
|
+
const y = await fetch(`${s()}/state`, { signal: m.signal, cache: "no-store" });
|
|
2293
|
+
if (!y.ok)
|
|
2294
|
+
throw new Error(`DB state request failed (${y.status})`);
|
|
2295
|
+
ne(await y.json()), b(i, null);
|
|
2296
|
+
} catch (y) {
|
|
2297
|
+
y instanceof Error && y.name === "AbortError" ? b(i, `DB state request timed out after ${c}ms`) : b(i, y instanceof Error ? y.message : String(y), !0);
|
|
2298
|
+
} finally {
|
|
2299
|
+
clearTimeout(S);
|
|
2300
|
+
}
|
|
2301
|
+
}
|
|
2302
|
+
async function ce() {
|
|
2303
|
+
if (_(o) !== "request-view") return;
|
|
2304
|
+
b(u, !0), b(f, null);
|
|
2305
|
+
const m = new URLSearchParams({
|
|
2306
|
+
assessmentId: t.assessmentId,
|
|
2307
|
+
attemptId: t.attemptId
|
|
2308
|
+
});
|
|
2309
|
+
n() === "section" && r() && m.set("sectionId", r());
|
|
2310
|
+
try {
|
|
2311
|
+
const S = await fetch(`${s()}/activity/load?${m.toString()}`, { cache: "no-store" });
|
|
2312
|
+
if (!S.ok)
|
|
2313
|
+
throw new Error(`Request view failed (${S.status})`);
|
|
2314
|
+
b(l, JSON.stringify(await S.json(), null, 2), !0);
|
|
2315
|
+
} catch (S) {
|
|
2316
|
+
b(f, S instanceof Error ? S.message : String(S), !0);
|
|
2317
|
+
} finally {
|
|
2318
|
+
b(u, !1);
|
|
2319
|
+
}
|
|
2320
|
+
}
|
|
2321
|
+
yn(() => {
|
|
2322
|
+
if (typeof EventSource > "u") {
|
|
2323
|
+
b(i, "Live updates are not supported in this browser"), $();
|
|
2324
|
+
return;
|
|
2325
|
+
}
|
|
2326
|
+
const m = new EventSource(`${s()}/state/stream`), S = (y) => {
|
|
2327
|
+
try {
|
|
2328
|
+
ne(JSON.parse(y.data)), _(o) === "request-view" && ce(), b(i, null);
|
|
2329
|
+
} catch (re) {
|
|
2330
|
+
b(i, re instanceof Error ? re.message : String(re), !0);
|
|
2331
|
+
}
|
|
2332
|
+
};
|
|
2333
|
+
return m.addEventListener("state", S), m.onerror = () => {
|
|
2334
|
+
b(i, "Live updates disconnected; retrying...");
|
|
2335
|
+
}, () => {
|
|
2336
|
+
m.removeEventListener("state", S), m.close();
|
|
2337
|
+
};
|
|
2338
|
+
}), yn(() => {
|
|
2339
|
+
_(o), t.assessmentId, r(), t.attemptId, n(), _(o) === "request-view" && ce();
|
|
2340
|
+
}), qn(() => {
|
|
2341
|
+
$();
|
|
2342
|
+
}), Hi(e, {
|
|
2343
|
+
title: "Session DB (Server)",
|
|
2344
|
+
ariaLabel: "Drag session DB panel",
|
|
2345
|
+
minWidth: 420,
|
|
2346
|
+
minHeight: 320,
|
|
2347
|
+
initialSizing: {
|
|
2348
|
+
widthRatio: 0.38,
|
|
2349
|
+
heightRatio: 0.78,
|
|
2350
|
+
minWidth: 440,
|
|
2351
|
+
maxWidth: 900,
|
|
2352
|
+
minHeight: 380,
|
|
2353
|
+
maxHeight: 900,
|
|
2354
|
+
alignX: "right",
|
|
2355
|
+
alignY: "bottom",
|
|
2356
|
+
paddingX: 18,
|
|
2357
|
+
paddingY: 18
|
|
2358
|
+
},
|
|
2359
|
+
className: "pie-demo-session-db-panel",
|
|
2360
|
+
bodyClass: "pie-demo-session-db-panel__content-shell",
|
|
2361
|
+
get onClose() {
|
|
2362
|
+
return t.onClose;
|
|
2363
|
+
},
|
|
2364
|
+
children: (m, S) => {
|
|
2365
|
+
var y = Qi(), re = E(y), G = E(re), Re = R(E(G), 2), k = E(Re), Xe = R(G, 2);
|
|
2366
|
+
{
|
|
2367
|
+
var We = (H) => {
|
|
2368
|
+
var K = ji(), De = R(E(K), 2), ge = E(De);
|
|
2369
|
+
Y(() => se(ge, r())), N(H, K);
|
|
2370
|
+
};
|
|
2371
|
+
Fe(Xe, (H) => {
|
|
2372
|
+
n() === "section" && H(We);
|
|
2373
|
+
});
|
|
2374
|
+
}
|
|
2375
|
+
var Z = R(Xe, 2), Ie = R(E(Z), 2), xt = E(Ie), Qt = R(Z, 2), me = R(E(Qt), 2), zr = E(me), On = R(re, 2), Et = E(On), Hr = E(Et), $t = R(Et, 2), en = R($t, 2), tn = R(en, 2), jr = E(tn), zn = R(On, 2);
|
|
2376
|
+
{
|
|
2377
|
+
var Br = (H) => {
|
|
2378
|
+
var K = Bi(), De = E(K);
|
|
2379
|
+
Y(() => se(De, _(i))), N(H, K);
|
|
2380
|
+
};
|
|
2381
|
+
Fe(zn, (H) => {
|
|
2382
|
+
_(i) && H(Br);
|
|
2383
|
+
});
|
|
2384
|
+
}
|
|
2385
|
+
var Vr = R(zn, 2);
|
|
2386
|
+
{
|
|
2387
|
+
var Yr = (H) => {
|
|
2388
|
+
var K = Gi();
|
|
2389
|
+
Bt(K, 21, () => _(T), jt, (De, ge) => {
|
|
2390
|
+
var Ot = Ui(), rt = lt(Ot), zt = E(rt), nn = R(rt, 2), Ur = E(nn), Hn = E(Ur), Gr = E(Hn);
|
|
2391
|
+
Bt(Gr, 21, () => _(g)[_(ge)], jt, (Pe, Ne) => {
|
|
2392
|
+
var Ue = Vi(), St = E(Ue);
|
|
2393
|
+
Y(
|
|
2394
|
+
(rn) => {
|
|
2395
|
+
le(Ue, "title", _(Ne)), se(St, rn);
|
|
2396
|
+
},
|
|
2397
|
+
[() => A(_(Ne))]
|
|
2398
|
+
), N(Pe, Ue);
|
|
2399
|
+
});
|
|
2400
|
+
var Zr = R(Hn), Kr = E(Zr);
|
|
2401
|
+
{
|
|
2402
|
+
var Jr = (Pe) => {
|
|
2403
|
+
var Ne = Yi(), Ue = E(Ne);
|
|
2404
|
+
Y((St) => le(Ue, "colspan", St), [
|
|
2405
|
+
() => Math.max(_(g)[_(ge)].length, 1)
|
|
2406
|
+
]), N(Pe, Ne);
|
|
2407
|
+
}, Qr = (Pe) => {
|
|
2408
|
+
var Ne = vi(), Ue = lt(Ne);
|
|
2409
|
+
Bt(Ue, 17, () => _(v)[_(ge)], jt, (St, rn) => {
|
|
2410
|
+
var jn = Wi();
|
|
2411
|
+
Bt(jn, 21, () => _(g)[_(ge)], jt, ($r, es) => {
|
|
2412
|
+
var Bn = Xi(), ts = E(Bn);
|
|
2413
|
+
Y((ns) => se(ts, ns), [() => L(_(rn)[_(es)])]), N($r, Bn);
|
|
2414
|
+
}), N(St, jn);
|
|
2415
|
+
}), N(Pe, Ne);
|
|
2416
|
+
};
|
|
2417
|
+
Fe(Kr, (Pe) => {
|
|
2418
|
+
_(v)[_(ge)].length === 0 ? Pe(Jr) : Pe(Qr, -1);
|
|
2419
|
+
});
|
|
2420
|
+
}
|
|
2421
|
+
Y(() => se(zt, _(ge))), N(De, Ot);
|
|
2422
|
+
}), N(H, K);
|
|
2423
|
+
}, Xr = (H) => {
|
|
2424
|
+
var K = Zi();
|
|
2425
|
+
Y(() => Kn(K, _(p))), N(H, K);
|
|
2426
|
+
}, Wr = (H) => {
|
|
2427
|
+
var K = Ji(), De = lt(K);
|
|
2428
|
+
{
|
|
2429
|
+
var ge = (rt) => {
|
|
2430
|
+
var zt = Ki(), nn = E(zt);
|
|
2431
|
+
Y(() => se(nn, _(f))), N(rt, zt);
|
|
2432
|
+
};
|
|
2433
|
+
Fe(De, (rt) => {
|
|
2434
|
+
_(f) && rt(ge);
|
|
2435
|
+
});
|
|
2436
|
+
}
|
|
2437
|
+
var Ot = R(De, 2);
|
|
2438
|
+
Y(() => Kn(Ot, _(u) ? "Loading request view..." : _(l))), N(H, K);
|
|
2439
|
+
};
|
|
2440
|
+
Fe(Vr, (H) => {
|
|
2441
|
+
_(o) === "raw-tables" ? H(Yr) : _(o) === "reconstructed" ? H(Xr, 1) : H(Wr, -1);
|
|
2442
|
+
});
|
|
2443
|
+
}
|
|
2444
|
+
Y(() => {
|
|
2445
|
+
se(k, t.assessmentId), se(xt, t.attemptId), se(zr, n()), Et.disabled = _(a), le(Et, "aria-busy", _(a)), se(Hr, _(a) ? "Resetting to baseline..." : "Reset DB to baseline"), le($t, "aria-pressed", _(o) === "raw-tables"), le(en, "aria-pressed", _(o) === "reconstructed"), le(tn, "aria-pressed", _(o) === "request-view"), se(jr, _(d));
|
|
2446
|
+
}), _e("click", Et, () => {
|
|
2447
|
+
F();
|
|
2448
|
+
}), _e("click", $t, () => b(o, "raw-tables")), _e("click", en, () => b(o, "reconstructed")), _e("click", tn, () => b(o, "request-view")), N(m, y);
|
|
2449
|
+
},
|
|
2450
|
+
$$slots: { default: !0 }
|
|
2451
|
+
}), Cn();
|
|
2452
|
+
}
|
|
2453
|
+
Ft(["click"]);
|
|
2454
|
+
var eo = /* @__PURE__ */ z('<button type="button" title="Database state" aria-label="Toggle database state panel"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor"><ellipse cx="12" cy="5" rx="7" ry="3" stroke-width="2"></ellipse><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 5v7c0 1.66 3.13 3 7 3s7-1.34 7-3V5M5 12v7c0 1.66 3.13 3 7 3s7-1.34 7-3v-7"></path></svg></button>'), to = /* @__PURE__ */ z('<button type="button" title="Session" aria-label="Toggle session panel"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg></button> <button type="button" title="Events" aria-label="Toggle event broadcast panel"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7h8m0 0l-3-3m3 3l-3 3M3 17h8m0 0l-3-3m3 3l-3 3M3 7h5m8 10h5"></path></svg></button> <!>', 1);
|
|
2455
|
+
function oo(e, t) {
|
|
2456
|
+
let n = W(t, "showDbPanel", 3, !1);
|
|
2457
|
+
var r = to(), s = lt(r);
|
|
2458
|
+
let i;
|
|
2459
|
+
var o = R(s, 2);
|
|
2460
|
+
let a;
|
|
2461
|
+
var l = R(o, 2);
|
|
1892
2462
|
{
|
|
1893
|
-
var
|
|
1894
|
-
var
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
2463
|
+
var f = (u) => {
|
|
2464
|
+
var c = eo();
|
|
2465
|
+
let v;
|
|
2466
|
+
Y(() => {
|
|
2467
|
+
v = xe(c, 1, "btn btn-sm btn-outline btn-square", null, v, { "btn-active": n() }), le(c, "aria-pressed", n());
|
|
2468
|
+
}), _e("click", c, function(...g) {
|
|
2469
|
+
t.onToggleDbPanel?.apply(this, g);
|
|
2470
|
+
}), N(u, c);
|
|
1900
2471
|
};
|
|
1901
|
-
|
|
1902
|
-
|
|
2472
|
+
Fe(l, (u) => {
|
|
2473
|
+
t.onToggleDbPanel && u(f);
|
|
1903
2474
|
});
|
|
1904
2475
|
}
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
}),
|
|
1908
|
-
|
|
1909
|
-
}),
|
|
2476
|
+
Y(() => {
|
|
2477
|
+
i = xe(s, 1, "btn btn-sm btn-outline btn-square", null, i, { "btn-active": t.showSessionPanel }), le(s, "aria-pressed", t.showSessionPanel), a = xe(o, 1, "btn btn-sm btn-outline btn-square", null, a, { "btn-active": t.showEventPanel }), le(o, "aria-pressed", t.showEventPanel);
|
|
2478
|
+
}), _e("click", s, function(...u) {
|
|
2479
|
+
t.onToggleSessionPanel?.apply(this, u);
|
|
2480
|
+
}), _e("click", o, function(...u) {
|
|
2481
|
+
t.onToggleEventPanel?.apply(this, u);
|
|
2482
|
+
}), N(e, r);
|
|
1910
2483
|
}
|
|
1911
|
-
|
|
1912
|
-
function
|
|
2484
|
+
Ft(["click"]);
|
|
2485
|
+
function no(e, t) {
|
|
1913
2486
|
return (e || void 0) === (t || void 0);
|
|
1914
2487
|
}
|
|
1915
|
-
function
|
|
1916
|
-
const r = e?.key?.sectionId || "",
|
|
1917
|
-
return r !== t ? !1 :
|
|
2488
|
+
function lo(e, t, n) {
|
|
2489
|
+
const r = e?.key?.sectionId || "", s = e?.key?.attemptId || void 0;
|
|
2490
|
+
return r !== t ? !1 : no(s, n);
|
|
1918
2491
|
}
|
|
1919
|
-
function
|
|
2492
|
+
function ao(e, t, n) {
|
|
1920
2493
|
return !e?.getSectionController || !t ? null : e.getSectionController({
|
|
1921
2494
|
sectionId: t,
|
|
1922
2495
|
attemptId: n
|
|
1923
2496
|
}) || null;
|
|
1924
2497
|
}
|
|
1925
2498
|
export {
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
2499
|
+
oo as DebugPanelToggles,
|
|
2500
|
+
Pi as PanelResizeHandle,
|
|
2501
|
+
Ri as PanelWindowControls,
|
|
2502
|
+
io as SessionDbPanel,
|
|
2503
|
+
Hi as SharedFloatingPanel,
|
|
2504
|
+
cn as claimNextFloatingPanelZIndex,
|
|
2505
|
+
Li as computePanelSizeFromViewport,
|
|
2506
|
+
qi as createFloatingPanelPointerController,
|
|
2507
|
+
ao as getSectionControllerFromCoordinator,
|
|
2508
|
+
lo as isMatchingSectionControllerLifecycleEvent,
|
|
2509
|
+
no as optionalIdsEqual
|
|
1935
2510
|
};
|