@pie-players/pie-tool-calculator-desmos 0.3.17 → 0.3.20
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/dist/pie-tool-calculator.js +1838 -2252
- package/package.json +7 -7
|
@@ -1,207 +1,221 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
var Ei = (e, t, r) => t in e ? $i(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
6
|
-
var k = (e, t, r) => Ei(e, typeof t != "symbol" ? t + "" : t, r), or = (e, t, r) => t.has(e) || Fr("Cannot " + r);
|
|
7
|
-
var l = (e, t, r) => (or(e, t, "read from private field"), r ? r.call(e) : t.get(e)), y = (e, t, r) => t.has(e) ? Fr("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), w = (e, t, r, i) => (or(e, t, "write to private field"), i ? i.call(e, r) : t.set(e, r), r), S = (e, t, r) => (or(e, t, "access private method"), r);
|
|
8
|
-
import { connectToolRuntimeContext as Ti } from "@pie-players/pie-assessment-toolkit";
|
|
9
|
-
const Ci = "5";
|
|
10
|
-
var on;
|
|
11
|
-
typeof window < "u" && ((on = window.__svelte ?? (window.__svelte = {})).v ?? (on.v = /* @__PURE__ */ new Set())).add(Ci);
|
|
12
|
-
const Ri = 1, Ai = 4, ki = 8, Si = 16, Ii = 2, an = "[", fn = "[!", Ur = "[?", un = "]", dt = {}, M = /* @__PURE__ */ Symbol(), cn = "http://www.w3.org/1999/xhtml", ur = !1;
|
|
13
|
-
var Ni = Array.isArray, Oi = Array.prototype.indexOf, ht = Array.prototype.includes, xi = Array.from, Vt = Object.keys, Yt = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, Li = Object.getOwnPropertyDescriptors, Pi = Object.prototype, Di = Array.prototype, dn = Object.getPrototypeOf, Br = Object.isExtensible;
|
|
14
|
-
const Mi = () => {
|
|
15
|
-
};
|
|
16
|
-
function Fi(e) {
|
|
17
|
-
for (var t = 0; t < e.length; t++)
|
|
18
|
-
e[t]();
|
|
1
|
+
import { connectToolRuntimeContext as xi } from "@pie-players/pie-assessment-toolkit";
|
|
2
|
+
if (typeof window < "u") {
|
|
3
|
+
var xr, Cr;
|
|
4
|
+
((xr = (Cr = window).__svelte ?? (Cr.__svelte = {})).v ?? (xr.v = /* @__PURE__ */ new Set())).add("5");
|
|
19
5
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
6
|
+
var He = {}, D = Symbol(), Oa = Symbol("filename");
|
|
7
|
+
var Ci = Array.isArray, Mi = Array.prototype.indexOf, Ve = Array.prototype.includes, Ri = Array.from, Nt = Object.keys, Dt = Object.defineProperty, Ae = Object.getOwnPropertyDescriptor, Ai = Object.getOwnPropertyDescriptors, Pi = Object.prototype, Ii = Array.prototype, an = Object.getPrototypeOf, Mr = Object.isExtensible, Oi = () => {
|
|
8
|
+
};
|
|
9
|
+
function Li(e) {
|
|
10
|
+
for (var t = 0; t < e.length; t++) e[t]();
|
|
11
|
+
}
|
|
12
|
+
function on() {
|
|
13
|
+
var e, t;
|
|
14
|
+
return {
|
|
15
|
+
promise: new Promise((r, n) => {
|
|
16
|
+
e = r, t = n;
|
|
17
|
+
}),
|
|
18
|
+
resolve: e,
|
|
19
|
+
reject: t
|
|
20
|
+
};
|
|
25
21
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
)
|
|
22
|
+
function ft(e) {
|
|
23
|
+
"@babel/helpers - typeof";
|
|
24
|
+
return ft = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
25
|
+
return typeof t;
|
|
26
|
+
} : function(t) {
|
|
27
|
+
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
28
|
+
}, ft(e);
|
|
29
|
+
}
|
|
30
|
+
function Ni(e, t) {
|
|
31
|
+
if (ft(e) != "object" || !e) return e;
|
|
32
|
+
var r = e[Symbol.toPrimitive];
|
|
33
|
+
if (r !== void 0) {
|
|
34
|
+
var n = r.call(e, t || "default");
|
|
35
|
+
if (ft(n) != "object") return n;
|
|
36
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
37
|
+
}
|
|
38
|
+
return (t === "string" ? String : Number)(e);
|
|
39
|
+
}
|
|
40
|
+
function Di(e) {
|
|
41
|
+
var t = Ni(e, "string");
|
|
42
|
+
return ft(t) == "symbol" ? t : t + "";
|
|
43
|
+
}
|
|
44
|
+
function $(e, t, r) {
|
|
45
|
+
return (t = Di(t)) in e ? Object.defineProperty(e, t, {
|
|
46
|
+
value: r,
|
|
47
|
+
enumerable: !0,
|
|
48
|
+
configurable: !0,
|
|
49
|
+
writable: !0
|
|
50
|
+
}) : e[t] = r, e;
|
|
51
|
+
}
|
|
52
|
+
var La = 1 << 24, K = 1024, le = 2048, De = 4096, dr = 8192, Ui = 16384, vr = 32768, Rr = 1 << 25, hr = 65536, Na = 1 << 17, Da = 1 << 18, Qe = 1 << 19, ji = 1 << 20, Ua = 1 << 25, ht = 65536, Ar = 1 << 21, Wi = 1 << 22, Ut = 1 << 23, at = Symbol("$state"), ln = Symbol("legacy props"), Bi = Symbol(""), Fi = Symbol("proxy path"), de = new class extends Error {
|
|
53
|
+
constructor(...t) {
|
|
54
|
+
super(...t), $(this, "name", "StaleReactionError"), $(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
55
|
+
}
|
|
56
|
+
}(), zi = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
|
|
36
57
|
function qi(e) {
|
|
37
58
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
38
59
|
}
|
|
39
|
-
function
|
|
60
|
+
function Yi() {
|
|
40
61
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
41
62
|
}
|
|
42
63
|
function Gi(e) {
|
|
43
64
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
44
65
|
}
|
|
45
|
-
function
|
|
66
|
+
function Hi() {
|
|
46
67
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
47
68
|
}
|
|
48
|
-
function
|
|
69
|
+
function Vi(e) {
|
|
49
70
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
50
71
|
}
|
|
51
72
|
function Ki() {
|
|
52
73
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
53
74
|
}
|
|
54
|
-
function
|
|
75
|
+
function Ji() {
|
|
55
76
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
56
77
|
}
|
|
57
|
-
function
|
|
78
|
+
function Xi(e) {
|
|
58
79
|
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
59
80
|
}
|
|
60
|
-
function
|
|
81
|
+
function Zi() {
|
|
61
82
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
62
83
|
}
|
|
63
|
-
function
|
|
84
|
+
function Qi() {
|
|
64
85
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
65
86
|
}
|
|
66
|
-
function
|
|
87
|
+
function es() {
|
|
67
88
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
68
89
|
}
|
|
69
|
-
function
|
|
90
|
+
function ts() {
|
|
70
91
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
71
92
|
}
|
|
72
|
-
function
|
|
93
|
+
function qt(e) {
|
|
73
94
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
74
95
|
}
|
|
75
|
-
function
|
|
96
|
+
function rs() {
|
|
76
97
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
77
98
|
}
|
|
78
|
-
|
|
79
|
-
function
|
|
80
|
-
|
|
99
|
+
var N = !1;
|
|
100
|
+
function Ge(e) {
|
|
101
|
+
N = e;
|
|
81
102
|
}
|
|
82
|
-
|
|
83
|
-
function
|
|
103
|
+
var A;
|
|
104
|
+
function ae(e) {
|
|
84
105
|
if (e === null)
|
|
85
|
-
throw
|
|
86
|
-
return
|
|
87
|
-
}
|
|
88
|
-
function
|
|
89
|
-
return
|
|
90
|
-
}
|
|
91
|
-
function
|
|
92
|
-
if (
|
|
93
|
-
if (/* @__PURE__ */
|
|
94
|
-
throw
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
function
|
|
99
|
-
if (
|
|
100
|
-
for (var t = e, r =
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
var i = (
|
|
110
|
-
/** @type {Comment} */
|
|
111
|
-
r.data
|
|
112
|
-
);
|
|
113
|
-
if (i === un) {
|
|
106
|
+
throw qt(), He;
|
|
107
|
+
return A = e;
|
|
108
|
+
}
|
|
109
|
+
function _r() {
|
|
110
|
+
return ae(/* @__PURE__ */ $e(A));
|
|
111
|
+
}
|
|
112
|
+
function Et(e) {
|
|
113
|
+
if (N) {
|
|
114
|
+
if (/* @__PURE__ */ $e(A) !== null)
|
|
115
|
+
throw qt(), He;
|
|
116
|
+
A = e;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function ns(e = 1) {
|
|
120
|
+
if (N) {
|
|
121
|
+
for (var t = e, r = A; t--; ) r = /* @__PURE__ */ $e(r);
|
|
122
|
+
A = r;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function fn(e = !0) {
|
|
126
|
+
for (var t = 0, r = A; ; ) {
|
|
127
|
+
if (r.nodeType === 8) {
|
|
128
|
+
var n = r.data;
|
|
129
|
+
if (n === "]") {
|
|
114
130
|
if (t === 0) return r;
|
|
115
131
|
t -= 1;
|
|
116
|
-
} else (
|
|
117
|
-
i[0] === "[" && !isNaN(Number(i.slice(1)))) && (t += 1);
|
|
132
|
+
} else (n === "[" || n === "[!" || n[0] === "[" && !isNaN(Number(n.slice(1)))) && (t += 1);
|
|
118
133
|
}
|
|
119
|
-
var
|
|
120
|
-
|
|
121
|
-
/* @__PURE__ */ Fe(r)
|
|
122
|
-
);
|
|
123
|
-
e && r.remove(), r = n;
|
|
134
|
+
var i = /* @__PURE__ */ $e(r);
|
|
135
|
+
e && r.remove(), r = i;
|
|
124
136
|
}
|
|
125
137
|
}
|
|
126
|
-
function
|
|
127
|
-
if (!e || e.nodeType !==
|
|
128
|
-
throw
|
|
129
|
-
return
|
|
130
|
-
/** @type {Comment} */
|
|
131
|
-
e.data
|
|
132
|
-
);
|
|
138
|
+
function is(e) {
|
|
139
|
+
if (!e || e.nodeType !== 8)
|
|
140
|
+
throw qt(), He;
|
|
141
|
+
return e.data;
|
|
133
142
|
}
|
|
134
|
-
function
|
|
143
|
+
function un(e) {
|
|
135
144
|
return e === this.v;
|
|
136
145
|
}
|
|
137
|
-
function
|
|
146
|
+
function ss(e, t) {
|
|
138
147
|
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
139
148
|
}
|
|
140
|
-
function
|
|
141
|
-
return !
|
|
149
|
+
function cn(e) {
|
|
150
|
+
return !ss(e, this.v);
|
|
142
151
|
}
|
|
143
|
-
|
|
144
|
-
function
|
|
145
|
-
|
|
152
|
+
var me = !1, _t = !1;
|
|
153
|
+
function Pr(e, t) {
|
|
154
|
+
return e.label = t, as(e.v, t), e;
|
|
146
155
|
}
|
|
147
|
-
function
|
|
148
|
-
|
|
149
|
-
|
|
156
|
+
function as(e, t) {
|
|
157
|
+
return e?.[Fi]?.(t), e;
|
|
158
|
+
}
|
|
159
|
+
var I = null;
|
|
160
|
+
function Ke(e) {
|
|
161
|
+
I = e;
|
|
162
|
+
}
|
|
163
|
+
function dn(e, t = !1, r) {
|
|
164
|
+
I = {
|
|
165
|
+
p: I,
|
|
150
166
|
i: !1,
|
|
151
167
|
c: null,
|
|
152
168
|
e: null,
|
|
153
169
|
s: e,
|
|
154
170
|
x: null,
|
|
155
|
-
|
|
171
|
+
r: E,
|
|
172
|
+
l: _t && !t ? {
|
|
173
|
+
s: null,
|
|
174
|
+
u: null,
|
|
175
|
+
$: []
|
|
176
|
+
} : null
|
|
156
177
|
};
|
|
157
178
|
}
|
|
158
|
-
function
|
|
159
|
-
var t =
|
|
160
|
-
/** @type {ComponentContext} */
|
|
161
|
-
Z
|
|
162
|
-
), r = t.e;
|
|
179
|
+
function vn(e) {
|
|
180
|
+
var t = I, r = t.e;
|
|
163
181
|
if (r !== null) {
|
|
164
182
|
t.e = null;
|
|
165
|
-
for (var
|
|
166
|
-
jn(i);
|
|
183
|
+
for (var n of r) Wn(n);
|
|
167
184
|
}
|
|
168
|
-
return e !== void 0 && (t.x = e), t.i = !0,
|
|
169
|
-
{};
|
|
185
|
+
return e !== void 0 && (t.x = e), t.i = !0, I = t.p, e ?? {};
|
|
170
186
|
}
|
|
171
|
-
function
|
|
172
|
-
return !
|
|
187
|
+
function pt() {
|
|
188
|
+
return !_t || I !== null && I.l === null;
|
|
173
189
|
}
|
|
174
|
-
|
|
175
|
-
function
|
|
176
|
-
var e =
|
|
177
|
-
|
|
190
|
+
var Ce = [];
|
|
191
|
+
function hn() {
|
|
192
|
+
var e = Ce;
|
|
193
|
+
Ce = [], Li(e);
|
|
178
194
|
}
|
|
179
|
-
function
|
|
180
|
-
if (
|
|
181
|
-
var t =
|
|
195
|
+
function Je(e) {
|
|
196
|
+
if (Ce.length === 0 && !ot) {
|
|
197
|
+
var t = Ce;
|
|
182
198
|
queueMicrotask(() => {
|
|
183
|
-
t ===
|
|
199
|
+
t === Ce && hn();
|
|
184
200
|
});
|
|
185
201
|
}
|
|
186
|
-
|
|
202
|
+
Ce.push(e);
|
|
187
203
|
}
|
|
188
|
-
function
|
|
189
|
-
for (;
|
|
190
|
-
bn();
|
|
204
|
+
function os() {
|
|
205
|
+
for (; Ce.length > 0; ) hn();
|
|
191
206
|
}
|
|
192
|
-
function
|
|
207
|
+
function _n(e) {
|
|
193
208
|
var t = E;
|
|
194
209
|
if (t === null)
|
|
195
|
-
return
|
|
196
|
-
if ((t.f &
|
|
210
|
+
return k.f |= Ut, e;
|
|
211
|
+
if (!(t.f & 32768) && !(t.f & 4))
|
|
197
212
|
throw e;
|
|
198
|
-
|
|
213
|
+
ge(e, t);
|
|
199
214
|
}
|
|
200
|
-
function
|
|
215
|
+
function ge(e, t) {
|
|
201
216
|
for (; t !== null; ) {
|
|
202
|
-
if (
|
|
203
|
-
if ((t.f &
|
|
204
|
-
throw e;
|
|
217
|
+
if (t.f & 128) {
|
|
218
|
+
if (!(t.f & 32768)) throw e;
|
|
205
219
|
try {
|
|
206
220
|
t.b.error(e);
|
|
207
221
|
return;
|
|
@@ -213,1186 +227,916 @@ function Oe(e, t) {
|
|
|
213
227
|
}
|
|
214
228
|
throw e;
|
|
215
229
|
}
|
|
216
|
-
|
|
217
|
-
function
|
|
218
|
-
e.f = e.f &
|
|
230
|
+
var ls = ~(le | De | K);
|
|
231
|
+
function L(e, t) {
|
|
232
|
+
e.f = e.f & ls | t;
|
|
219
233
|
}
|
|
220
|
-
function
|
|
221
|
-
|
|
234
|
+
function pr(e) {
|
|
235
|
+
e.f & 512 || e.deps === null ? L(e, K) : L(e, De);
|
|
222
236
|
}
|
|
223
|
-
function
|
|
237
|
+
function pn(e) {
|
|
224
238
|
if (e !== null)
|
|
225
239
|
for (const t of e)
|
|
226
|
-
(t.f &
|
|
227
|
-
/** @type {Derived} */
|
|
228
|
-
t.deps
|
|
229
|
-
));
|
|
240
|
+
!(t.f & 2) || !(t.f & 65536) || (t.f ^= ht, pn(t.deps));
|
|
230
241
|
}
|
|
231
|
-
function
|
|
232
|
-
|
|
242
|
+
function gn(e, t, r) {
|
|
243
|
+
e.f & 2048 ? t.add(e) : e.f & 4096 && r.add(e), pn(e.deps), L(e, K);
|
|
233
244
|
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
var
|
|
237
|
-
|
|
245
|
+
var fs = !1, kt = !1;
|
|
246
|
+
function us(e) {
|
|
247
|
+
var t = kt;
|
|
248
|
+
try {
|
|
249
|
+
return kt = !1, [e(), kt];
|
|
250
|
+
} finally {
|
|
251
|
+
kt = t;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
function wn(e, t) {
|
|
255
|
+
if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
256
|
+
}
|
|
257
|
+
function gr(e, t) {
|
|
258
|
+
wn(e, t), t.add(e);
|
|
259
|
+
}
|
|
260
|
+
function b(e, t, r) {
|
|
261
|
+
wn(e, t), t.set(e, r);
|
|
262
|
+
}
|
|
263
|
+
function R(e, t, r) {
|
|
264
|
+
if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : r;
|
|
265
|
+
throw new TypeError("Private element is not present on this object");
|
|
266
|
+
}
|
|
267
|
+
function a(e, t) {
|
|
268
|
+
return e.get(R(e, t));
|
|
269
|
+
}
|
|
270
|
+
function m(e, t, r) {
|
|
271
|
+
return e.set(R(e, t), r), r;
|
|
272
|
+
}
|
|
273
|
+
var yn, ve = /* @__PURE__ */ new Set(), M = null, Ir = null, z = null, ir = null, ot = !1, Xt = !1, Xe = null, jt = null, mn = 0;
|
|
274
|
+
var cs = 1, Wt = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), je = /* @__PURE__ */ new WeakMap(), We = /* @__PURE__ */ new WeakMap(), Pt = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakSet(), Ue = class bn {
|
|
238
275
|
constructor() {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
k(this, "id", as++);
|
|
242
|
-
/**
|
|
243
|
-
* The current values of any sources that are updated in this batch
|
|
244
|
-
* They keys of this map are identical to `this.#previous`
|
|
245
|
-
* @type {Map<Source, any>}
|
|
246
|
-
*/
|
|
247
|
-
k(this, "current", /* @__PURE__ */ new Map());
|
|
248
|
-
/**
|
|
249
|
-
* The values of any sources that are updated in this batch _before_ those updates took place.
|
|
250
|
-
* They keys of this map are identical to `this.#current`
|
|
251
|
-
* @type {Map<Source, any>}
|
|
252
|
-
*/
|
|
253
|
-
k(this, "previous", /* @__PURE__ */ new Map());
|
|
254
|
-
/**
|
|
255
|
-
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
256
|
-
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
257
|
-
* @type {Set<(batch: Batch) => void>}
|
|
258
|
-
*/
|
|
259
|
-
y(this, Se, /* @__PURE__ */ new Set());
|
|
260
|
-
/**
|
|
261
|
-
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
262
|
-
* @type {Set<(batch: Batch) => void>}
|
|
263
|
-
*/
|
|
264
|
-
y(this, it, /* @__PURE__ */ new Set());
|
|
265
|
-
/**
|
|
266
|
-
* The number of async effects that are currently in flight
|
|
267
|
-
*/
|
|
268
|
-
y(this, qe, 0);
|
|
269
|
-
/**
|
|
270
|
-
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
271
|
-
*/
|
|
272
|
-
y(this, st, 0);
|
|
273
|
-
/**
|
|
274
|
-
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
275
|
-
* TODO replace with Promise.withResolvers once supported widely enough
|
|
276
|
-
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
277
|
-
*/
|
|
278
|
-
y(this, lt, null);
|
|
279
|
-
/**
|
|
280
|
-
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
281
|
-
* @type {Set<Effect>}
|
|
282
|
-
*/
|
|
283
|
-
y(this, ot, /* @__PURE__ */ new Set());
|
|
284
|
-
/**
|
|
285
|
-
* Deferred effects that are MAYBE_DIRTY
|
|
286
|
-
* @type {Set<Effect>}
|
|
287
|
-
*/
|
|
288
|
-
y(this, Ie, /* @__PURE__ */ new Set());
|
|
289
|
-
/**
|
|
290
|
-
* A map of branches that still exist, but will be destroyed when this batch
|
|
291
|
-
* is committed — we skip over these during `process`.
|
|
292
|
-
* The value contains child effects that were dirty/maybe_dirty before being reset,
|
|
293
|
-
* so they can be rescheduled if the branch survives.
|
|
294
|
-
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
295
|
-
*/
|
|
296
|
-
y(this, ce, /* @__PURE__ */ new Map());
|
|
297
|
-
k(this, "is_fork", !1);
|
|
298
|
-
y(this, at, !1);
|
|
299
|
-
}
|
|
300
|
-
/**
|
|
301
|
-
* Add an effect to the #skipped_branches map and reset its children
|
|
302
|
-
* @param {Effect} effect
|
|
303
|
-
*/
|
|
276
|
+
gr(this, ie), $(this, "id", cs++), $(this, "current", /* @__PURE__ */ new Map()), $(this, "previous", /* @__PURE__ */ new Map()), b(this, Wt, /* @__PURE__ */ new Set()), b(this, Tt, /* @__PURE__ */ new Set()), b(this, je, 0), b(this, We, 0), b(this, Pt, null), b(this, Q, []), b(this, ut, /* @__PURE__ */ new Set()), b(this, Pe, /* @__PURE__ */ new Set()), b(this, xe, /* @__PURE__ */ new Map()), $(this, "is_fork", !1), b(this, St, !1);
|
|
277
|
+
}
|
|
304
278
|
skip_effect(t) {
|
|
305
|
-
|
|
279
|
+
a(xe, this).has(t) || a(xe, this).set(t, {
|
|
280
|
+
d: [],
|
|
281
|
+
m: []
|
|
282
|
+
});
|
|
306
283
|
}
|
|
307
|
-
/**
|
|
308
|
-
* Remove an effect from the #skipped_branches map and reschedule
|
|
309
|
-
* any tracked dirty/maybe_dirty child effects
|
|
310
|
-
* @param {Effect} effect
|
|
311
|
-
*/
|
|
312
284
|
unskip_effect(t) {
|
|
313
|
-
var r =
|
|
285
|
+
var r = a(xe, this).get(t);
|
|
314
286
|
if (r) {
|
|
315
|
-
|
|
316
|
-
for (var
|
|
317
|
-
|
|
318
|
-
for (
|
|
319
|
-
|
|
287
|
+
a(xe, this).delete(t);
|
|
288
|
+
for (var n of r.d)
|
|
289
|
+
L(n, le), this.schedule(n);
|
|
290
|
+
for (n of r.m)
|
|
291
|
+
L(n, De), this.schedule(n);
|
|
320
292
|
}
|
|
321
293
|
}
|
|
322
|
-
/**
|
|
323
|
-
*
|
|
324
|
-
* @param {Effect[]} root_effects
|
|
325
|
-
*/
|
|
326
|
-
process(t) {
|
|
327
|
-
H = [], this.apply();
|
|
328
|
-
var r = gt = [], i = [];
|
|
329
|
-
for (const n of t)
|
|
330
|
-
S(this, Y, _r).call(this, n, r, i);
|
|
331
|
-
if (gt = null, S(this, Y, hr).call(this)) {
|
|
332
|
-
S(this, Y, vr).call(this, i), S(this, Y, vr).call(this, r);
|
|
333
|
-
for (const [n, s] of l(this, ce))
|
|
334
|
-
kn(n, s);
|
|
335
|
-
} else {
|
|
336
|
-
I = null;
|
|
337
|
-
for (const n of l(this, Se)) n(this);
|
|
338
|
-
l(this, Se).clear(), l(this, qe) === 0 && S(this, Y, pr).call(this), zr(i), zr(r), l(this, ot).clear(), l(this, Ie).clear(), l(this, lt)?.resolve();
|
|
339
|
-
}
|
|
340
|
-
ae = null;
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* Associate a change to a given source with the current
|
|
344
|
-
* batch, noting its previous and current values
|
|
345
|
-
* @param {Source} source
|
|
346
|
-
* @param {any} value
|
|
347
|
-
*/
|
|
348
294
|
capture(t, r) {
|
|
349
|
-
r !==
|
|
295
|
+
r !== D && !this.previous.has(t) && this.previous.set(t, r), t.f & 8388608 || (this.current.set(t, t.v), z?.set(t, t.v));
|
|
350
296
|
}
|
|
351
297
|
activate() {
|
|
352
|
-
|
|
298
|
+
M = this;
|
|
353
299
|
}
|
|
354
300
|
deactivate() {
|
|
355
|
-
|
|
301
|
+
M = null, z = null;
|
|
356
302
|
}
|
|
357
303
|
flush() {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
304
|
+
var t = null;
|
|
305
|
+
try {
|
|
306
|
+
Xt = !0, M = this, R(ie, this, $n).call(this);
|
|
307
|
+
} finally {
|
|
308
|
+
mn = 0, ir = null, Xe = null, jt = null, Xt = !1, M = null, z = null, ye.clear();
|
|
363
309
|
}
|
|
364
|
-
this.deactivate();
|
|
365
310
|
}
|
|
366
311
|
discard() {
|
|
367
|
-
for (const t of
|
|
368
|
-
|
|
312
|
+
for (const t of a(Tt, this)) t(this);
|
|
313
|
+
a(Tt, this).clear(), ve.delete(this);
|
|
369
314
|
}
|
|
370
|
-
/**
|
|
371
|
-
*
|
|
372
|
-
* @param {boolean} blocking
|
|
373
|
-
*/
|
|
374
315
|
increment(t) {
|
|
375
|
-
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
*/
|
|
381
|
-
decrement(t) {
|
|
382
|
-
w(this, qe, l(this, qe) - 1), t && w(this, st, l(this, st) - 1), !l(this, at) && (w(this, at, !0), Ke(() => {
|
|
383
|
-
w(this, at, !1), S(this, Y, hr).call(this) ? H.length > 0 && this.flush() : this.revive();
|
|
316
|
+
m(je, this, a(je, this) + 1), t && m(We, this, a(We, this) + 1);
|
|
317
|
+
}
|
|
318
|
+
decrement(t, r) {
|
|
319
|
+
m(je, this, a(je, this) - 1), t && m(We, this, a(We, this) - 1), !(a(St, this) || r) && (m(St, this, !0), Je(() => {
|
|
320
|
+
m(St, this, !1), this.flush();
|
|
384
321
|
}));
|
|
385
322
|
}
|
|
386
|
-
|
|
387
|
-
for (const
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
P(t, ue), ve(t);
|
|
391
|
-
this.flush();
|
|
323
|
+
transfer_effects(t, r) {
|
|
324
|
+
for (const n of t) a(ut, this).add(n);
|
|
325
|
+
for (const n of r) a(Pe, this).add(n);
|
|
326
|
+
t.clear(), r.clear();
|
|
392
327
|
}
|
|
393
|
-
/** @param {(batch: Batch) => void} fn */
|
|
394
328
|
oncommit(t) {
|
|
395
|
-
|
|
329
|
+
a(Wt, this).add(t);
|
|
396
330
|
}
|
|
397
|
-
/** @param {(batch: Batch) => void} fn */
|
|
398
331
|
ondiscard(t) {
|
|
399
|
-
|
|
332
|
+
a(Tt, this).add(t);
|
|
400
333
|
}
|
|
401
334
|
settled() {
|
|
402
|
-
return (
|
|
335
|
+
return (a(Pt, this) ?? m(Pt, this, on())).promise;
|
|
403
336
|
}
|
|
404
337
|
static ensure() {
|
|
405
|
-
if (
|
|
406
|
-
const t =
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
});
|
|
338
|
+
if (M === null) {
|
|
339
|
+
const t = M = new bn();
|
|
340
|
+
Xt || (ve.add(M), ot || Je(() => {
|
|
341
|
+
M === t && t.flush();
|
|
342
|
+
}));
|
|
410
343
|
}
|
|
411
|
-
return
|
|
344
|
+
return M;
|
|
412
345
|
}
|
|
413
346
|
apply() {
|
|
347
|
+
if (!me || !this.is_fork && ve.size === 1) {
|
|
348
|
+
z = null;
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
z = new Map(this.current);
|
|
352
|
+
for (const t of ve)
|
|
353
|
+
if (!(t === this || t.is_fork))
|
|
354
|
+
for (const [r, n] of t.previous) z.has(r) || z.set(r, n);
|
|
355
|
+
}
|
|
356
|
+
schedule(t) {
|
|
357
|
+
if (ir = t, t.b?.is_pending && t.f & 16777228 && !(t.f & 32768)) {
|
|
358
|
+
t.b.defer_effect(t);
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
for (var r = t; r.parent !== null; ) {
|
|
362
|
+
r = r.parent;
|
|
363
|
+
var n = r.f;
|
|
364
|
+
if (Xe !== null && r === E && (me || (k === null || !(k.f & 2)) && !fs))
|
|
365
|
+
return;
|
|
366
|
+
if (n & 96) {
|
|
367
|
+
if (!(n & 1024)) return;
|
|
368
|
+
r.f ^= K;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
a(Q, this).push(r);
|
|
414
372
|
}
|
|
415
373
|
};
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
374
|
+
yn = Ue;
|
|
375
|
+
function Or() {
|
|
376
|
+
return this.is_fork || a(We, this) > 0;
|
|
377
|
+
}
|
|
378
|
+
function $n() {
|
|
379
|
+
if (mn++ > 1e3 && (ve.delete(this), vs()), !R(ie, this, Or).call(this)) {
|
|
380
|
+
for (const l of a(ut, this))
|
|
381
|
+
a(Pe, this).delete(l), L(l, le), this.schedule(l);
|
|
382
|
+
for (const l of a(Pe, this))
|
|
383
|
+
L(l, De), this.schedule(l);
|
|
384
|
+
}
|
|
385
|
+
const e = a(Q, this);
|
|
386
|
+
m(Q, this, []), this.apply();
|
|
387
|
+
var t = Xe = [], r = [], n = jt = [];
|
|
388
|
+
for (const l of e) try {
|
|
389
|
+
R(ie, this, En).call(this, l, t, r);
|
|
390
|
+
} catch (o) {
|
|
391
|
+
throw xn(l), o;
|
|
392
|
+
}
|
|
393
|
+
if (M = null, n.length > 0) {
|
|
394
|
+
var i = yn.ensure();
|
|
395
|
+
for (const l of n) i.schedule(l);
|
|
396
|
+
}
|
|
397
|
+
if (Xe = null, jt = null, R(ie, this, Or).call(this)) {
|
|
398
|
+
R(ie, this, Lr).call(this, r), R(ie, this, Lr).call(this, t);
|
|
399
|
+
for (const [l, o] of a(xe, this)) Sn(l, o);
|
|
400
|
+
} else {
|
|
401
|
+
a(je, this) === 0 && ve.delete(this), a(ut, this).clear(), a(Pe, this).clear();
|
|
402
|
+
for (const l of a(Wt, this)) l(this);
|
|
403
|
+
a(Wt, this).clear(), Ir = this, Nr(r), Nr(t), Ir = null, a(Pt, this)?.resolve();
|
|
404
|
+
}
|
|
405
|
+
var s = M;
|
|
406
|
+
if (a(Q, this).length > 0) {
|
|
407
|
+
const l = s ?? (s = this);
|
|
408
|
+
a(Q, l).push(...a(Q, this).filter((o) => !a(Q, l).includes(o)));
|
|
409
|
+
}
|
|
410
|
+
s !== null && (ve.add(s), R(ie, s, $n).call(s)), ve.has(this) || R(ie, this, ds).call(this);
|
|
411
|
+
}
|
|
412
|
+
function En(e, t, r) {
|
|
413
|
+
e.f ^= K;
|
|
414
|
+
for (var n = e.first; n !== null; ) {
|
|
415
|
+
var i = n.f, s = (i & 96) !== 0;
|
|
416
|
+
if (!(s && i & 1024 || i & 8192 || a(xe, this).has(n)) && n.fn !== null) {
|
|
417
|
+
s ? n.f ^= K : i & 4 ? t.push(n) : me && i & 16777224 ? r.push(n) : yt(n) && (i & 16 && a(Pe, this).add(n), Ze(n));
|
|
418
|
+
var l = n.first;
|
|
419
|
+
if (l !== null) {
|
|
420
|
+
n = l;
|
|
434
421
|
continue;
|
|
435
422
|
}
|
|
436
423
|
}
|
|
437
424
|
for (; n !== null; ) {
|
|
438
|
-
var
|
|
439
|
-
if (
|
|
440
|
-
n =
|
|
425
|
+
var o = n.next;
|
|
426
|
+
if (o !== null) {
|
|
427
|
+
n = o;
|
|
441
428
|
break;
|
|
442
429
|
}
|
|
443
430
|
n = n.parent;
|
|
444
431
|
}
|
|
445
432
|
}
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
for (const o of Dt) {
|
|
458
|
-
if (o === this) {
|
|
459
|
-
i = !1;
|
|
460
|
-
continue;
|
|
461
|
-
}
|
|
462
|
-
const a = [];
|
|
463
|
-
for (const [u, _] of this.current) {
|
|
464
|
-
if (o.current.has(u))
|
|
465
|
-
if (i && _ !== o.current.get(u))
|
|
466
|
-
o.current.set(u, _);
|
|
467
|
-
else
|
|
468
|
-
continue;
|
|
469
|
-
a.push(u);
|
|
470
|
-
}
|
|
471
|
-
if (a.length === 0)
|
|
472
|
-
continue;
|
|
473
|
-
const f = [...o.current.keys()].filter((u) => !this.current.has(u));
|
|
474
|
-
if (f.length > 0) {
|
|
475
|
-
var n = H;
|
|
476
|
-
H = [];
|
|
477
|
-
const u = /* @__PURE__ */ new Set(), _ = /* @__PURE__ */ new Map();
|
|
478
|
-
for (const h of a)
|
|
479
|
-
Rn(h, f, u, _);
|
|
480
|
-
if (H.length > 0) {
|
|
481
|
-
I = o, o.apply();
|
|
482
|
-
for (const h of H)
|
|
483
|
-
S(s = o, Y, _r).call(s, h, [], []);
|
|
484
|
-
o.deactivate();
|
|
485
|
-
}
|
|
486
|
-
H = n;
|
|
487
|
-
}
|
|
433
|
+
}
|
|
434
|
+
function Lr(e) {
|
|
435
|
+
for (var t = 0; t < e.length; t += 1) gn(e[t], a(ut, this), a(Pe, this));
|
|
436
|
+
}
|
|
437
|
+
function ds() {
|
|
438
|
+
for (const o of ve) {
|
|
439
|
+
var e = o.id < this.id, t = [];
|
|
440
|
+
for (const [u, h] of this.current) {
|
|
441
|
+
if (o.current.has(u)) if (e && h !== o.current.get(u)) o.current.set(u, h);
|
|
442
|
+
else continue;
|
|
443
|
+
t.push(u);
|
|
488
444
|
}
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
Cn();
|
|
445
|
+
var r = [...o.current.keys()].filter((u) => !this.current.has(u));
|
|
446
|
+
if (r.length === 0)
|
|
447
|
+
e && o.discard();
|
|
448
|
+
else if (t.length > 0) {
|
|
449
|
+
o.activate();
|
|
450
|
+
var n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map();
|
|
451
|
+
for (var s of t) kn(s, r, n, i);
|
|
452
|
+
if (a(Q, o).length > 0) {
|
|
453
|
+
o.apply();
|
|
454
|
+
for (var l of a(Q, o)) R(ie, o, En).call(o, l, [], []);
|
|
455
|
+
m(Q, o, []);
|
|
456
|
+
}
|
|
457
|
+
o.deactivate();
|
|
503
458
|
}
|
|
504
|
-
} finally {
|
|
505
|
-
Et = t;
|
|
506
459
|
}
|
|
507
460
|
}
|
|
508
|
-
function
|
|
509
|
-
var
|
|
461
|
+
function Be(e) {
|
|
462
|
+
var t = ot;
|
|
463
|
+
ot = !0;
|
|
510
464
|
try {
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
if (
|
|
514
|
-
|
|
515
|
-
fs();
|
|
516
|
-
}
|
|
517
|
-
r.process(H), Le.clear();
|
|
465
|
+
var r;
|
|
466
|
+
for (e && (M !== null && !M.is_fork && M.flush(), r = e()); ; ) {
|
|
467
|
+
if (os(), M === null) return r;
|
|
468
|
+
M.flush();
|
|
518
469
|
}
|
|
519
470
|
} finally {
|
|
520
|
-
|
|
471
|
+
ot = t;
|
|
521
472
|
}
|
|
522
473
|
}
|
|
523
|
-
function
|
|
474
|
+
function vs() {
|
|
475
|
+
if (0) {
|
|
476
|
+
var e;
|
|
477
|
+
for (const r of M.current.keys()) for (const [n, i] of r.updated ?? [])
|
|
478
|
+
var t;
|
|
479
|
+
}
|
|
524
480
|
try {
|
|
525
481
|
Ki();
|
|
526
|
-
} catch (
|
|
527
|
-
|
|
482
|
+
} catch (r) {
|
|
483
|
+
ge(r, ir);
|
|
528
484
|
}
|
|
529
485
|
}
|
|
530
|
-
|
|
531
|
-
function
|
|
486
|
+
var se = null;
|
|
487
|
+
function Nr(e) {
|
|
532
488
|
var t = e.length;
|
|
533
489
|
if (t !== 0) {
|
|
534
490
|
for (var r = 0; r < t; ) {
|
|
535
|
-
var
|
|
536
|
-
if ((
|
|
537
|
-
|
|
538
|
-
for (const
|
|
539
|
-
if (
|
|
540
|
-
const s = [
|
|
541
|
-
let
|
|
542
|
-
for (;
|
|
543
|
-
|
|
544
|
-
for (let
|
|
545
|
-
const
|
|
546
|
-
|
|
491
|
+
var n = e[r++];
|
|
492
|
+
if (!(n.f & 24576) && yt(n) && (se = /* @__PURE__ */ new Set(), Ze(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && qn(n), se?.size > 0)) {
|
|
493
|
+
ye.clear();
|
|
494
|
+
for (const i of se) {
|
|
495
|
+
if (i.f & 24576) continue;
|
|
496
|
+
const s = [i];
|
|
497
|
+
let l = i.parent;
|
|
498
|
+
for (; l !== null; )
|
|
499
|
+
se.has(l) && (se.delete(l), s.push(l)), l = l.parent;
|
|
500
|
+
for (let o = s.length - 1; o >= 0; o--) {
|
|
501
|
+
const u = s[o];
|
|
502
|
+
u.f & 24576 || Ze(u);
|
|
547
503
|
}
|
|
548
504
|
}
|
|
549
|
-
|
|
505
|
+
se.clear();
|
|
550
506
|
}
|
|
551
507
|
}
|
|
552
|
-
|
|
508
|
+
se = null;
|
|
553
509
|
}
|
|
554
510
|
}
|
|
555
|
-
function
|
|
511
|
+
function kn(e, t, r, n) {
|
|
556
512
|
if (!r.has(e) && (r.add(e), e.reactions !== null))
|
|
557
|
-
for (const
|
|
558
|
-
const s =
|
|
559
|
-
(s &
|
|
560
|
-
/** @type {Derived} */
|
|
561
|
-
n,
|
|
562
|
-
t,
|
|
563
|
-
r,
|
|
564
|
-
i
|
|
565
|
-
) : (s & (Rr | De)) !== 0 && (s & U) === 0 && An(n, t, i) && (P(n, U), ve(
|
|
566
|
-
/** @type {Effect} */
|
|
567
|
-
n
|
|
568
|
-
));
|
|
513
|
+
for (const i of e.reactions) {
|
|
514
|
+
const s = i.f;
|
|
515
|
+
s & 2 ? kn(i, t, r, n) : s & 4194320 && !(s & 2048) && Tn(i, t, n) && (L(i, le), wr(i));
|
|
569
516
|
}
|
|
570
517
|
}
|
|
571
|
-
function
|
|
572
|
-
const
|
|
573
|
-
if (
|
|
574
|
-
if (e.deps !== null)
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
/** @type {Derived} */
|
|
580
|
-
n,
|
|
581
|
-
t,
|
|
582
|
-
r
|
|
583
|
-
))
|
|
584
|
-
return r.set(
|
|
585
|
-
/** @type {Derived} */
|
|
586
|
-
n,
|
|
587
|
-
!0
|
|
588
|
-
), !0;
|
|
589
|
-
}
|
|
518
|
+
function Tn(e, t, r) {
|
|
519
|
+
const n = r.get(e);
|
|
520
|
+
if (n !== void 0) return n;
|
|
521
|
+
if (e.deps !== null) for (const i of e.deps) {
|
|
522
|
+
if (Ve.call(t, i)) return !0;
|
|
523
|
+
if (i.f & 2 && Tn(i, t, r))
|
|
524
|
+
return r.set(i, !0), !0;
|
|
525
|
+
}
|
|
590
526
|
return r.set(e, !1), !1;
|
|
591
527
|
}
|
|
592
|
-
function
|
|
593
|
-
|
|
594
|
-
if (r?.is_pending && (e.f & (yt | _t | Cr)) !== 0 && (e.f & Ze) === 0) {
|
|
595
|
-
r.defer_effect(e);
|
|
596
|
-
return;
|
|
597
|
-
}
|
|
598
|
-
for (; t.parent !== null; ) {
|
|
599
|
-
t = t.parent;
|
|
600
|
-
var i = t.f;
|
|
601
|
-
if (gt !== null && t === E && (e.f & _t) === 0)
|
|
602
|
-
return;
|
|
603
|
-
if ((i & (Me | we)) !== 0) {
|
|
604
|
-
if ((i & F) === 0)
|
|
605
|
-
return;
|
|
606
|
-
t.f ^= F;
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
H.push(t);
|
|
528
|
+
function wr(e) {
|
|
529
|
+
M.schedule(e);
|
|
610
530
|
}
|
|
611
|
-
function
|
|
612
|
-
if (!(
|
|
613
|
-
|
|
531
|
+
function Sn(e, t) {
|
|
532
|
+
if (!(e.f & 32 && e.f & 1024)) {
|
|
533
|
+
e.f & 2048 ? t.d.push(e) : e.f & 4096 && t.m.push(e), L(e, K);
|
|
614
534
|
for (var r = e.first; r !== null; )
|
|
615
|
-
|
|
535
|
+
Sn(r, t), r = r.next;
|
|
616
536
|
}
|
|
617
537
|
}
|
|
618
|
-
function
|
|
619
|
-
|
|
538
|
+
function xn(e) {
|
|
539
|
+
L(e, K);
|
|
540
|
+
for (var t = e.first; t !== null; )
|
|
541
|
+
xn(t), t = t.next;
|
|
542
|
+
}
|
|
543
|
+
function hs(e) {
|
|
544
|
+
let t = 0, r = gt(0), n;
|
|
620
545
|
return () => {
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
t -= 1, t === 0 && (
|
|
546
|
+
$r() && (c(r), Er(() => (t === 0 && (n = Gt(() => e(() => lt(r)))), t += 1, () => {
|
|
547
|
+
Je(() => {
|
|
548
|
+
t -= 1, t === 0 && (n?.(), n = void 0, lt(r));
|
|
624
549
|
});
|
|
625
550
|
})));
|
|
626
551
|
};
|
|
627
552
|
}
|
|
628
|
-
var
|
|
629
|
-
function
|
|
630
|
-
new
|
|
631
|
-
}
|
|
632
|
-
var
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
y(this, At, D ? N : null);
|
|
655
|
-
/** @type {BoundaryProps} */
|
|
656
|
-
y(this, de);
|
|
657
|
-
/** @type {((anchor: Node) => void)} */
|
|
658
|
-
y(this, He);
|
|
659
|
-
/** @type {Effect} */
|
|
660
|
-
y(this, q);
|
|
661
|
-
/** @type {Effect | null} */
|
|
662
|
-
y(this, he, null);
|
|
663
|
-
/** @type {Effect | null} */
|
|
664
|
-
y(this, J, null);
|
|
665
|
-
/** @type {Effect | null} */
|
|
666
|
-
y(this, le, null);
|
|
667
|
-
/** @type {DocumentFragment | null} */
|
|
668
|
-
y(this, Te, null);
|
|
669
|
-
y(this, Ge, 0);
|
|
670
|
-
y(this, Ne, 0);
|
|
671
|
-
y(this, ft, !1);
|
|
672
|
-
/** @type {Set<Effect>} */
|
|
673
|
-
y(this, ut, /* @__PURE__ */ new Set());
|
|
674
|
-
/** @type {Set<Effect>} */
|
|
675
|
-
y(this, ct, /* @__PURE__ */ new Set());
|
|
676
|
-
/**
|
|
677
|
-
* A source containing the number of pending async deriveds/expressions.
|
|
678
|
-
* Only created if `$effect.pending()` is used inside the boundary,
|
|
679
|
-
* otherwise updating the source results in needless `Batch.ensure()`
|
|
680
|
-
* calls followed by no-op flushes
|
|
681
|
-
* @type {Source<number> | null}
|
|
682
|
-
*/
|
|
683
|
-
y(this, Ce, null);
|
|
684
|
-
y(this, Jt, us(() => (w(this, Ce, It(l(this, Ge))), () => {
|
|
685
|
-
w(this, Ce, null);
|
|
686
|
-
})));
|
|
687
|
-
w(this, W, t), w(this, de, r), w(this, He, (s) => {
|
|
688
|
-
var o = (
|
|
689
|
-
/** @type {Effect} */
|
|
690
|
-
E
|
|
691
|
-
);
|
|
692
|
-
o.b = this, o.f |= cr, i(s);
|
|
693
|
-
}), this.parent = /** @type {Effect} */
|
|
694
|
-
E.b, this.transform_error = n ?? this.parent?.transform_error ?? ((s) => s), w(this, q, qn(() => {
|
|
695
|
-
if (D) {
|
|
696
|
-
const s = (
|
|
697
|
-
/** @type {Comment} */
|
|
698
|
-
l(this, At)
|
|
699
|
-
);
|
|
700
|
-
kr();
|
|
701
|
-
const o = s.data === fn;
|
|
702
|
-
if (s.data.startsWith(Ur)) {
|
|
703
|
-
const f = JSON.parse(s.data.slice(Ur.length));
|
|
704
|
-
S(this, O, In).call(this, f);
|
|
705
|
-
} else o ? S(this, O, Nn).call(this) : S(this, O, Sn).call(this);
|
|
706
|
-
} else
|
|
707
|
-
S(this, O, gr).call(this);
|
|
708
|
-
}, cs)), D && w(this, W, N);
|
|
709
|
-
}
|
|
710
|
-
/**
|
|
711
|
-
* Defer an effect inside a pending boundary until the boundary resolves
|
|
712
|
-
* @param {Effect} effect
|
|
713
|
-
*/
|
|
714
|
-
defer_effect(t) {
|
|
715
|
-
Tn(t, l(this, ut), l(this, ct));
|
|
716
|
-
}
|
|
717
|
-
/**
|
|
718
|
-
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
719
|
-
* @returns {boolean}
|
|
720
|
-
*/
|
|
553
|
+
var _s = hr | Qe;
|
|
554
|
+
function ps(e, t, r, n) {
|
|
555
|
+
new gs(e, t, r, n);
|
|
556
|
+
}
|
|
557
|
+
var ee = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), pe = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), Dr = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakSet(), gs = class {
|
|
558
|
+
constructor(e, t, r, n) {
|
|
559
|
+
gr(this, B), $(this, "parent", void 0), $(this, "is_pending", !1), $(this, "transform_error", void 0), b(this, ee, void 0), b(this, Zt, N ? A : null), b(this, pe, void 0), b(this, ct, void 0), b(this, G, void 0), b(this, we, null), b(this, te, null), b(this, ce, null), b(this, Ie, null), b(this, Fe, 0), b(this, Oe, 0), b(this, xt, !1), b(this, sr, /* @__PURE__ */ new Set()), b(this, ar, /* @__PURE__ */ new Set()), b(this, Te, null), b(this, Dr, hs(() => (m(Te, this, gt(a(Fe, this))), () => {
|
|
560
|
+
m(Te, this, null);
|
|
561
|
+
}))), m(ee, this, e), m(pe, this, t), m(ct, this, (i) => {
|
|
562
|
+
var s = E;
|
|
563
|
+
s.b = this, s.f |= 128, r(i);
|
|
564
|
+
}), this.parent = E.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), m(G, this, Fn(() => {
|
|
565
|
+
if (N) {
|
|
566
|
+
const i = a(Zt, this);
|
|
567
|
+
_r();
|
|
568
|
+
const s = i.data === "[!";
|
|
569
|
+
if (i.data.startsWith("[?")) {
|
|
570
|
+
const l = JSON.parse(i.data.slice(2));
|
|
571
|
+
R(B, this, ys).call(this, l);
|
|
572
|
+
} else s ? R(B, this, ms).call(this) : R(B, this, ws).call(this);
|
|
573
|
+
} else R(B, this, Ur).call(this);
|
|
574
|
+
}, _s)), N && m(ee, this, A);
|
|
575
|
+
}
|
|
576
|
+
defer_effect(e) {
|
|
577
|
+
gn(e, a(sr, this), a(ar, this));
|
|
578
|
+
}
|
|
721
579
|
is_rendered() {
|
|
722
580
|
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
723
581
|
}
|
|
724
582
|
has_pending_snippet() {
|
|
725
|
-
return !!
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
* Do not call from inside the class
|
|
731
|
-
* @param {1 | -1} d
|
|
732
|
-
*/
|
|
733
|
-
update_pending_count(t) {
|
|
734
|
-
S(this, O, wr).call(this, t), w(this, Ge, l(this, Ge) + t), !(!l(this, Ce) || l(this, ft)) && (w(this, ft, !0), Ke(() => {
|
|
735
|
-
w(this, ft, !1), l(this, Ce) && Kt(l(this, Ce), l(this, Ge));
|
|
583
|
+
return !!a(pe, this).pending;
|
|
584
|
+
}
|
|
585
|
+
update_pending_count(e, t) {
|
|
586
|
+
R(B, this, Cn).call(this, e, t), m(Fe, this, a(Fe, this) + e), !(!a(Te, this) || a(xt, this)) && (m(xt, this, !0), Je(() => {
|
|
587
|
+
m(xt, this, !1), a(Te, this) && Ft(a(Te, this), a(Fe, this));
|
|
736
588
|
}));
|
|
737
589
|
}
|
|
738
590
|
get_effect_pending() {
|
|
739
|
-
return
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
);
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
var
|
|
747
|
-
|
|
748
|
-
if (!r && !i)
|
|
749
|
-
throw t;
|
|
750
|
-
l(this, he) && (V(l(this, he)), w(this, he, null)), l(this, J) && (V(l(this, J)), w(this, J, null)), l(this, le) && (V(l(this, le)), w(this, le, null)), D && (pe(
|
|
751
|
-
/** @type {TemplateNode} */
|
|
752
|
-
l(this, At)
|
|
753
|
-
), rs(), pe(vn()));
|
|
754
|
-
var n = !1, s = !1;
|
|
755
|
-
const o = () => {
|
|
591
|
+
return a(Dr, this).call(this), c(a(Te, this));
|
|
592
|
+
}
|
|
593
|
+
error(e) {
|
|
594
|
+
var t = a(pe, this).onerror;
|
|
595
|
+
let r = a(pe, this).failed;
|
|
596
|
+
if (!t && !r) throw e;
|
|
597
|
+
a(we, this) && (q(a(we, this)), m(we, this, null)), a(te, this) && (q(a(te, this)), m(te, this, null)), a(ce, this) && (q(a(ce, this)), m(ce, this, null)), N && (ae(a(Zt, this)), ns(), ae(fn()));
|
|
598
|
+
var n = !1, i = !1;
|
|
599
|
+
const s = () => {
|
|
756
600
|
if (n) {
|
|
757
|
-
|
|
601
|
+
rs();
|
|
758
602
|
return;
|
|
759
603
|
}
|
|
760
|
-
n = !0,
|
|
761
|
-
|
|
762
|
-
}),
|
|
763
|
-
|
|
604
|
+
n = !0, i && ts(), a(ce, this) !== null && wt(a(ce, this), () => {
|
|
605
|
+
m(ce, this, null);
|
|
606
|
+
}), R(B, this, or).call(this, () => {
|
|
607
|
+
R(B, this, Ur).call(this);
|
|
764
608
|
});
|
|
765
|
-
},
|
|
609
|
+
}, l = (o) => {
|
|
766
610
|
try {
|
|
767
|
-
|
|
611
|
+
i = !0, t?.(o, s), i = !1;
|
|
768
612
|
} catch (u) {
|
|
769
|
-
|
|
613
|
+
ge(u, a(G, this) && a(G, this).parent);
|
|
770
614
|
}
|
|
771
|
-
|
|
772
|
-
ke.ensure();
|
|
615
|
+
r && m(ce, this, R(B, this, or).call(this, () => {
|
|
773
616
|
try {
|
|
774
|
-
return
|
|
775
|
-
var u =
|
|
776
|
-
|
|
777
|
-
E
|
|
778
|
-
);
|
|
779
|
-
u.b = this, u.f |= cr, i(
|
|
780
|
-
l(this, W),
|
|
781
|
-
() => f,
|
|
782
|
-
() => o
|
|
783
|
-
);
|
|
617
|
+
return he(() => {
|
|
618
|
+
var u = E;
|
|
619
|
+
u.b = this, u.f |= 128, r(a(ee, this), () => o, () => s);
|
|
784
620
|
});
|
|
785
621
|
} catch (u) {
|
|
786
|
-
return
|
|
787
|
-
u,
|
|
788
|
-
/** @type {Effect} */
|
|
789
|
-
l(this, q).parent
|
|
790
|
-
), null;
|
|
622
|
+
return ge(u, a(G, this).parent), null;
|
|
791
623
|
}
|
|
792
624
|
}));
|
|
793
625
|
};
|
|
794
|
-
|
|
795
|
-
var
|
|
626
|
+
Je(() => {
|
|
627
|
+
var o;
|
|
796
628
|
try {
|
|
797
|
-
|
|
629
|
+
o = this.transform_error(e);
|
|
798
630
|
} catch (u) {
|
|
799
|
-
|
|
631
|
+
ge(u, a(G, this) && a(G, this).parent);
|
|
800
632
|
return;
|
|
801
633
|
}
|
|
802
|
-
|
|
803
|
-
f.then == "function" ? f.then(
|
|
804
|
-
a,
|
|
805
|
-
/** @param {unknown} e */
|
|
806
|
-
(u) => Oe(u, l(this, q) && l(this, q).parent)
|
|
807
|
-
) : a(f);
|
|
634
|
+
o !== null && typeof o == "object" && typeof o.then == "function" ? o.then(l, (u) => ge(u, a(G, this) && a(G, this).parent)) : l(o);
|
|
808
635
|
});
|
|
809
636
|
}
|
|
810
|
-
}
|
|
811
|
-
|
|
637
|
+
};
|
|
638
|
+
function ws() {
|
|
812
639
|
try {
|
|
813
|
-
|
|
814
|
-
} catch (
|
|
815
|
-
this.error(
|
|
640
|
+
m(we, this, he(() => a(ct, this).call(this, a(ee, this))));
|
|
641
|
+
} catch (e) {
|
|
642
|
+
this.error(e);
|
|
816
643
|
}
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
r(
|
|
824
|
-
l(this, W),
|
|
825
|
-
() => t,
|
|
826
|
-
() => () => {
|
|
827
|
-
}
|
|
828
|
-
);
|
|
644
|
+
}
|
|
645
|
+
function ys(e) {
|
|
646
|
+
const t = a(pe, this).failed;
|
|
647
|
+
t && m(ce, this, he(() => {
|
|
648
|
+
t(a(ee, this), () => e, () => () => {
|
|
649
|
+
});
|
|
829
650
|
}));
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
w(this, J, null);
|
|
839
|
-
}
|
|
840
|
-
), S(this, O, zt).call(this));
|
|
651
|
+
}
|
|
652
|
+
function ms() {
|
|
653
|
+
const e = a(pe, this).pending;
|
|
654
|
+
e && (this.is_pending = !0, m(te, this, he(() => e(a(ee, this)))), Je(() => {
|
|
655
|
+
var t = m(Ie, this, document.createDocumentFragment()), r = Ne();
|
|
656
|
+
t.append(r), m(we, this, R(B, this, or).call(this, () => he(() => a(ct, this).call(this, r)))), a(Oe, this) === 0 && (a(ee, this).before(t), m(Ie, this, null), wt(a(te, this), () => {
|
|
657
|
+
m(te, this, null);
|
|
658
|
+
}), R(B, this, yr).call(this, M));
|
|
841
659
|
}));
|
|
842
|
-
}
|
|
660
|
+
}
|
|
661
|
+
function Ur() {
|
|
843
662
|
try {
|
|
844
|
-
if (this.is_pending = this.has_pending_snippet(),
|
|
845
|
-
|
|
846
|
-
})),
|
|
847
|
-
var
|
|
848
|
-
|
|
849
|
-
const
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
P(t, U), ve(t);
|
|
863
|
-
for (const t of l(this, ct))
|
|
864
|
-
P(t, ue), ve(t);
|
|
865
|
-
l(this, ut).clear(), l(this, ct).clear();
|
|
866
|
-
}, /**
|
|
867
|
-
* @template T
|
|
868
|
-
* @param {() => T} fn
|
|
869
|
-
*/
|
|
870
|
-
qt = function(t) {
|
|
871
|
-
var r = E, i = m, n = Z;
|
|
872
|
-
ge(l(this, q)), ie(l(this, q)), pt(l(this, q).ctx);
|
|
663
|
+
if (this.is_pending = this.has_pending_snippet(), m(Oe, this, 0), m(Fe, this, 0), m(we, this, he(() => {
|
|
664
|
+
a(ct, this).call(this, a(ee, this));
|
|
665
|
+
})), a(Oe, this) > 0) {
|
|
666
|
+
var e = m(Ie, this, document.createDocumentFragment());
|
|
667
|
+
Hn(a(we, this), e);
|
|
668
|
+
const t = a(pe, this).pending;
|
|
669
|
+
m(te, this, he(() => t(a(ee, this))));
|
|
670
|
+
} else R(B, this, yr).call(this, M);
|
|
671
|
+
} catch (t) {
|
|
672
|
+
this.error(t);
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
function yr(e) {
|
|
676
|
+
this.is_pending = !1, e.transfer_effects(a(sr, this), a(ar, this));
|
|
677
|
+
}
|
|
678
|
+
function or(e) {
|
|
679
|
+
var t = E, r = k, n = I;
|
|
680
|
+
oe(a(G, this)), J(a(G, this)), Ke(a(G, this).ctx);
|
|
873
681
|
try {
|
|
874
|
-
return
|
|
875
|
-
} catch (
|
|
876
|
-
return
|
|
682
|
+
return Ue.ensure(), e();
|
|
683
|
+
} catch (i) {
|
|
684
|
+
return _n(i), null;
|
|
877
685
|
} finally {
|
|
878
|
-
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
* if any, such that we can replace the snippet with content once work is done
|
|
883
|
-
* @param {1 | -1} d
|
|
884
|
-
*/
|
|
885
|
-
wr = function(t) {
|
|
886
|
-
var r;
|
|
686
|
+
oe(t), J(r), Ke(n);
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
function Cn(e, t) {
|
|
887
690
|
if (!this.has_pending_snippet()) {
|
|
888
|
-
|
|
691
|
+
if (this.parent) {
|
|
692
|
+
var r;
|
|
693
|
+
R(B, r = this.parent, Cn).call(r, e, t);
|
|
694
|
+
}
|
|
889
695
|
return;
|
|
890
696
|
}
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
}),
|
|
894
|
-
}
|
|
895
|
-
function
|
|
896
|
-
const
|
|
897
|
-
var s = e.filter((
|
|
697
|
+
m(Oe, this, a(Oe, this) + e), a(Oe, this) === 0 && (R(B, this, yr).call(this, t), a(te, this) && wt(a(te, this), () => {
|
|
698
|
+
m(te, this, null);
|
|
699
|
+
}), a(Ie, this) && (a(ee, this).before(a(Ie, this)), m(Ie, this, null)));
|
|
700
|
+
}
|
|
701
|
+
function bs(e, t, r, n) {
|
|
702
|
+
const i = pt() ? Yt : Rn;
|
|
703
|
+
var s = e.filter((f) => !f.settled);
|
|
898
704
|
if (r.length === 0 && s.length === 0) {
|
|
899
|
-
|
|
705
|
+
n(t.map(i));
|
|
900
706
|
return;
|
|
901
707
|
}
|
|
902
|
-
var o = (
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
), a = vs(), f = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((h) => h.promise)) : null;
|
|
906
|
-
function u(h) {
|
|
907
|
-
a();
|
|
708
|
+
var l = E, o = $s(), u = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((f) => f.promise)) : null;
|
|
709
|
+
function h(f) {
|
|
710
|
+
o();
|
|
908
711
|
try {
|
|
909
|
-
|
|
712
|
+
n(f);
|
|
910
713
|
} catch (d) {
|
|
911
|
-
|
|
714
|
+
l.f & 16384 || ge(d, l);
|
|
912
715
|
}
|
|
913
|
-
|
|
716
|
+
Bt();
|
|
914
717
|
}
|
|
915
718
|
if (r.length === 0) {
|
|
916
|
-
|
|
719
|
+
u.then(() => h(t.map(i)));
|
|
917
720
|
return;
|
|
918
721
|
}
|
|
722
|
+
var w = Mn();
|
|
919
723
|
function _() {
|
|
920
|
-
|
|
724
|
+
Promise.all(r.map((f) => /* @__PURE__ */ Es(f))).then((f) => h([...t.map(i), ...f])).catch((f) => ge(f, l)).finally(() => w());
|
|
921
725
|
}
|
|
922
|
-
|
|
726
|
+
u ? u.then(() => {
|
|
727
|
+
o(), _(), Bt();
|
|
728
|
+
}) : _();
|
|
923
729
|
}
|
|
924
|
-
function
|
|
925
|
-
var e = E, t =
|
|
926
|
-
|
|
927
|
-
|
|
730
|
+
function $s() {
|
|
731
|
+
var e = E, t = k, r = I, n = M;
|
|
732
|
+
if (0) var i;
|
|
733
|
+
return function(l = !0) {
|
|
734
|
+
oe(e), J(t), Ke(r), l && !(e.f & 16384) && (n?.activate(), n?.apply());
|
|
928
735
|
};
|
|
929
736
|
}
|
|
930
|
-
function
|
|
931
|
-
|
|
932
|
-
}
|
|
933
|
-
function
|
|
934
|
-
var e = (
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
E.b
|
|
938
|
-
), t = (
|
|
939
|
-
/** @type {Batch} */
|
|
940
|
-
I
|
|
941
|
-
), r = e.is_rendered();
|
|
942
|
-
return e.update_pending_count(1), t.increment(r), () => {
|
|
943
|
-
e.update_pending_count(-1), t.decrement(r);
|
|
737
|
+
function Bt(e = !0) {
|
|
738
|
+
oe(null), J(null), Ke(null), e && M?.deactivate();
|
|
739
|
+
}
|
|
740
|
+
function Mn() {
|
|
741
|
+
var e = E.b, t = M, r = e.is_rendered();
|
|
742
|
+
return e.update_pending_count(1, t), t.increment(r), (n = !1) => {
|
|
743
|
+
e.update_pending_count(-1, t), t.decrement(r, n);
|
|
944
744
|
};
|
|
945
745
|
}
|
|
946
746
|
// @__NO_SIDE_EFFECTS__
|
|
947
|
-
function
|
|
948
|
-
var t =
|
|
949
|
-
/** @type {Derived} */
|
|
950
|
-
m
|
|
951
|
-
) : null;
|
|
747
|
+
function Yt(e) {
|
|
748
|
+
var t = 2 | le, r = k !== null && k.f & 2 ? k : null;
|
|
952
749
|
return E !== null && (E.f |= Qe), {
|
|
953
|
-
ctx:
|
|
750
|
+
ctx: I,
|
|
954
751
|
deps: null,
|
|
955
752
|
effects: null,
|
|
956
|
-
equals:
|
|
753
|
+
equals: un,
|
|
957
754
|
f: t,
|
|
958
755
|
fn: e,
|
|
959
756
|
reactions: null,
|
|
960
757
|
rv: 0,
|
|
961
|
-
v:
|
|
962
|
-
/** @type {V} */
|
|
963
|
-
M
|
|
964
|
-
),
|
|
758
|
+
v: D,
|
|
965
759
|
wv: 0,
|
|
966
760
|
parent: r ?? E,
|
|
967
761
|
ac: null
|
|
968
762
|
};
|
|
969
763
|
}
|
|
970
764
|
// @__NO_SIDE_EFFECTS__
|
|
971
|
-
function
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
var
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
), s = It(
|
|
979
|
-
/** @type {V} */
|
|
980
|
-
M
|
|
981
|
-
), o = !m, a = /* @__PURE__ */ new Map();
|
|
982
|
-
return Ns(() => {
|
|
983
|
-
var f = hn();
|
|
984
|
-
n = f.promise;
|
|
765
|
+
function Es(e, t, r) {
|
|
766
|
+
let n = E;
|
|
767
|
+
n === null && Yi();
|
|
768
|
+
var i = void 0, s = gt(D), l = !k, o = /* @__PURE__ */ new Map();
|
|
769
|
+
return js(() => {
|
|
770
|
+
var u = E, h = on();
|
|
771
|
+
i = h.promise;
|
|
985
772
|
try {
|
|
986
|
-
Promise.resolve(e()).then(
|
|
773
|
+
Promise.resolve(e()).then(h.resolve, h.reject).finally(Bt);
|
|
987
774
|
} catch (d) {
|
|
988
|
-
|
|
775
|
+
h.reject(d), Bt();
|
|
989
776
|
}
|
|
990
|
-
var
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
var _ = ps();
|
|
996
|
-
a.get(u)?.reject(Ue), a.delete(u), a.set(u, f);
|
|
997
|
-
}
|
|
998
|
-
const h = (d, v = void 0) => {
|
|
999
|
-
if (u.activate(), v)
|
|
1000
|
-
v !== Ue && (s.f |= xe, Kt(s, v));
|
|
777
|
+
var w = M;
|
|
778
|
+
if (l) {
|
|
779
|
+
if (u.f & 32768) var _ = Mn();
|
|
780
|
+
if (n.b.is_rendered())
|
|
781
|
+
o.get(w)?.reject(de), o.delete(w);
|
|
1001
782
|
else {
|
|
1002
|
-
(
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
783
|
+
for (const d of o.values()) d.reject(de);
|
|
784
|
+
o.clear();
|
|
785
|
+
}
|
|
786
|
+
o.set(w, h);
|
|
787
|
+
}
|
|
788
|
+
const f = (d, v = void 0) => {
|
|
789
|
+
if (_ && _(v === de), !(v === de || u.f & 16384)) {
|
|
790
|
+
if (w.activate(), v)
|
|
791
|
+
s.f |= Ut, Ft(s, v);
|
|
792
|
+
else {
|
|
793
|
+
s.f & 8388608 && (s.f ^= Ut), Ft(s, d);
|
|
794
|
+
for (const [g, y] of o) {
|
|
795
|
+
if (o.delete(g), g === w) break;
|
|
796
|
+
y.reject(de);
|
|
797
|
+
}
|
|
1006
798
|
}
|
|
799
|
+
w.deactivate();
|
|
1007
800
|
}
|
|
1008
|
-
_ && _();
|
|
1009
801
|
};
|
|
1010
|
-
|
|
1011
|
-
}),
|
|
1012
|
-
for (const
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
_ === n ? f(s) : u(n);
|
|
802
|
+
h.promise.then(f, (d) => f(null, d || "unknown"));
|
|
803
|
+
}), Ns(() => {
|
|
804
|
+
for (const u of o.values()) u.reject(de);
|
|
805
|
+
}), new Promise((u) => {
|
|
806
|
+
function h(w) {
|
|
807
|
+
function _() {
|
|
808
|
+
w === i ? u(s) : h(i);
|
|
1018
809
|
}
|
|
1019
|
-
|
|
810
|
+
w.then(_, _);
|
|
1020
811
|
}
|
|
1021
|
-
|
|
812
|
+
h(i);
|
|
1022
813
|
});
|
|
1023
814
|
}
|
|
1024
815
|
// @__NO_SIDE_EFFECTS__
|
|
1025
|
-
function
|
|
1026
|
-
const t = /* @__PURE__ */
|
|
1027
|
-
return
|
|
816
|
+
function jr(e) {
|
|
817
|
+
const t = /* @__PURE__ */ Yt(e);
|
|
818
|
+
return me || Vn(t), t;
|
|
1028
819
|
}
|
|
1029
820
|
// @__NO_SIDE_EFFECTS__
|
|
1030
|
-
function
|
|
1031
|
-
const t = /* @__PURE__ */
|
|
1032
|
-
return t.equals =
|
|
821
|
+
function Rn(e) {
|
|
822
|
+
const t = /* @__PURE__ */ Yt(e);
|
|
823
|
+
return t.equals = cn, t;
|
|
1033
824
|
}
|
|
1034
|
-
function
|
|
825
|
+
function ks(e) {
|
|
1035
826
|
var t = e.effects;
|
|
1036
827
|
if (t !== null) {
|
|
1037
828
|
e.effects = null;
|
|
1038
|
-
for (var r = 0; r < t.length; r += 1)
|
|
1039
|
-
V(
|
|
1040
|
-
/** @type {Effect} */
|
|
1041
|
-
t[r]
|
|
1042
|
-
);
|
|
829
|
+
for (var r = 0; r < t.length; r += 1) q(t[r]);
|
|
1043
830
|
}
|
|
1044
831
|
}
|
|
1045
|
-
function
|
|
832
|
+
function Ts(e) {
|
|
1046
833
|
for (var t = e.parent; t !== null; ) {
|
|
1047
|
-
if ((t.f &
|
|
1048
|
-
return (t.f & Ae) === 0 ? (
|
|
1049
|
-
/** @type {Effect} */
|
|
1050
|
-
t
|
|
1051
|
-
) : null;
|
|
834
|
+
if (!(t.f & 2)) return t.f & 16384 ? null : t;
|
|
1052
835
|
t = t.parent;
|
|
1053
836
|
}
|
|
1054
837
|
return null;
|
|
1055
838
|
}
|
|
1056
|
-
function
|
|
839
|
+
function mr(e) {
|
|
1057
840
|
var t, r = E;
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
841
|
+
if (oe(Ts(e)), 0)
|
|
842
|
+
try {
|
|
843
|
+
} finally {
|
|
844
|
+
}
|
|
845
|
+
else try {
|
|
846
|
+
e.f &= ~ht, ks(e), t = Zn(e);
|
|
1061
847
|
} finally {
|
|
1062
|
-
|
|
848
|
+
oe(r);
|
|
1063
849
|
}
|
|
1064
850
|
return t;
|
|
1065
851
|
}
|
|
1066
|
-
function
|
|
1067
|
-
var t =
|
|
1068
|
-
if (!e.equals(
|
|
1069
|
-
|
|
852
|
+
function An(e) {
|
|
853
|
+
var t = e.v, r = mr(e);
|
|
854
|
+
if (!e.equals(r) && (e.wv = Jn(), (!M?.is_fork || e.deps === null) && (e.v = r, M?.capture(e, t), e.deps === null))) {
|
|
855
|
+
L(e, K);
|
|
1070
856
|
return;
|
|
1071
857
|
}
|
|
1072
|
-
|
|
858
|
+
be || (z !== null ? ($r() || M?.is_fork) && z.set(e, r) : pr(e));
|
|
1073
859
|
}
|
|
1074
|
-
function
|
|
860
|
+
function Ss(e) {
|
|
1075
861
|
if (e.effects !== null)
|
|
1076
|
-
for (const t of e.effects)
|
|
1077
|
-
(t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Ue), t.teardown = Mi, t.ac = null, Rt(t, 0), Lr(t));
|
|
862
|
+
for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(de), t.teardown = Oi, t.ac = null, vt(t, 0), kr(t));
|
|
1078
863
|
}
|
|
1079
|
-
function
|
|
864
|
+
function Pn(e) {
|
|
1080
865
|
if (e.effects !== null)
|
|
1081
|
-
for (const t of e.effects)
|
|
1082
|
-
t.teardown && wt(t);
|
|
866
|
+
for (const t of e.effects) t.teardown && Ze(t);
|
|
1083
867
|
}
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
function It(e, t) {
|
|
868
|
+
var lr = /* @__PURE__ */ new Set(), ye = /* @__PURE__ */ new Map();
|
|
869
|
+
var In = !1;
|
|
870
|
+
function gt(e, t) {
|
|
1088
871
|
var r = {
|
|
1089
872
|
f: 0,
|
|
1090
|
-
// TODO ideally we could skip this altogether, but it causes type errors
|
|
1091
873
|
v: e,
|
|
1092
874
|
reactions: null,
|
|
1093
|
-
equals:
|
|
875
|
+
equals: un,
|
|
1094
876
|
rv: 0,
|
|
1095
877
|
wv: 0
|
|
1096
878
|
};
|
|
1097
879
|
return r;
|
|
1098
880
|
}
|
|
1099
881
|
// @__NO_SIDE_EFFECTS__
|
|
1100
|
-
function
|
|
1101
|
-
const r =
|
|
1102
|
-
return
|
|
882
|
+
function P(e, t) {
|
|
883
|
+
const r = gt(e, t);
|
|
884
|
+
return Vn(r), r;
|
|
1103
885
|
}
|
|
1104
886
|
// @__NO_SIDE_EFFECTS__
|
|
1105
|
-
function
|
|
1106
|
-
const
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
887
|
+
function xs(e, t = !1, r = !0) {
|
|
888
|
+
const n = gt(e);
|
|
889
|
+
if (t || (n.equals = cn), _t && r && I !== null && I.l !== null) {
|
|
890
|
+
var i;
|
|
891
|
+
((i = I.l).s ?? (i.s = [])).push(n);
|
|
892
|
+
}
|
|
893
|
+
return n;
|
|
894
|
+
}
|
|
895
|
+
function T(e, t, r = !1) {
|
|
896
|
+
k !== null && (!re || k.f & 131072) && pt() && k.f & 4325394 && (V === null || !Ve.call(V, e)) && es();
|
|
897
|
+
let n = r ? Me(t) : t;
|
|
898
|
+
return Ft(e, n, jt);
|
|
899
|
+
}
|
|
900
|
+
function Ft(e, t, r = null) {
|
|
1117
901
|
if (!e.equals(t)) {
|
|
1118
|
-
var
|
|
1119
|
-
|
|
1120
|
-
var i =
|
|
1121
|
-
if (i.capture(e,
|
|
1122
|
-
const
|
|
1123
|
-
|
|
1124
|
-
e
|
|
1125
|
-
);
|
|
1126
|
-
(e.f & U) !== 0 && Ir(n), Sr(n);
|
|
902
|
+
var n = e.v;
|
|
903
|
+
be ? ye.set(e, t) : ye.set(e, n), e.v = t;
|
|
904
|
+
var i = Ue.ensure();
|
|
905
|
+
if (i.capture(e, n), e.f & 2) {
|
|
906
|
+
const s = e;
|
|
907
|
+
e.f & 2048 && mr(s), z === null && pr(s);
|
|
1127
908
|
}
|
|
1128
|
-
e.wv =
|
|
909
|
+
e.wv = Jn(), On(e, le, r), pt() && E !== null && E.f & 1024 && !(E.f & 96) && (H === null ? qs([e]) : H.push(e)), !i.is_fork && lr.size > 0 && !In && Cs();
|
|
1129
910
|
}
|
|
1130
911
|
return t;
|
|
1131
912
|
}
|
|
1132
|
-
function
|
|
1133
|
-
|
|
1134
|
-
for (const e of
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
}
|
|
1138
|
-
function
|
|
1139
|
-
|
|
1140
|
-
}
|
|
1141
|
-
function
|
|
1142
|
-
var
|
|
1143
|
-
if (
|
|
1144
|
-
for (var i =
|
|
1145
|
-
var
|
|
1146
|
-
if (
|
|
1147
|
-
var
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
/** @type {Effect} */
|
|
1157
|
-
s
|
|
1158
|
-
));
|
|
913
|
+
function Cs() {
|
|
914
|
+
In = !1;
|
|
915
|
+
for (const e of lr)
|
|
916
|
+
e.f & 1024 && L(e, De), yt(e) && Ze(e);
|
|
917
|
+
lr.clear();
|
|
918
|
+
}
|
|
919
|
+
function lt(e) {
|
|
920
|
+
T(e, e.v + 1);
|
|
921
|
+
}
|
|
922
|
+
function On(e, t, r) {
|
|
923
|
+
var n = e.reactions;
|
|
924
|
+
if (n !== null)
|
|
925
|
+
for (var i = pt(), s = n.length, l = 0; l < s; l++) {
|
|
926
|
+
var o = n[l], u = o.f;
|
|
927
|
+
if (!(!i && o === E)) {
|
|
928
|
+
var h = (u & le) === 0;
|
|
929
|
+
if (h && L(o, t), u & 2) {
|
|
930
|
+
var w = o;
|
|
931
|
+
z?.delete(w), u & 65536 || (u & 512 && (o.f |= ht), On(w, De, r));
|
|
932
|
+
} else if (h) {
|
|
933
|
+
var _ = o;
|
|
934
|
+
u & 16 && se !== null && se.add(_), r !== null ? r.push(_) : wr(_);
|
|
935
|
+
}
|
|
936
|
+
}
|
|
1159
937
|
}
|
|
1160
938
|
}
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
const t =
|
|
1165
|
-
if (t !== Pi && t !==
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
var
|
|
1171
|
-
|
|
1172
|
-
var _ = a();
|
|
1173
|
-
return ie(f), Yr(u), _;
|
|
939
|
+
var Ms = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
|
|
940
|
+
function Me(e) {
|
|
941
|
+
if (typeof e != "object" || e === null || at in e) return e;
|
|
942
|
+
const t = an(e);
|
|
943
|
+
if (t !== Pi && t !== Ii) return e;
|
|
944
|
+
var r = /* @__PURE__ */ new Map(), n = Ci(e), i = /* @__PURE__ */ P(0), s = null, l = Le, o = (_) => {
|
|
945
|
+
if (Le === l) return _();
|
|
946
|
+
var f = k, d = Le;
|
|
947
|
+
J(null), zr(l);
|
|
948
|
+
var v = _();
|
|
949
|
+
return J(f), zr(d), v;
|
|
1174
950
|
};
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
)
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
},
|
|
1201
|
-
get(a, f, u) {
|
|
1202
|
-
if (f === $t)
|
|
1203
|
-
return e;
|
|
1204
|
-
var _ = r.get(f), h = f in a;
|
|
1205
|
-
if (_ === void 0 && (!h || Ye(a, f)?.writable) && (_ = o(() => {
|
|
1206
|
-
var v = je(h ? a[f] : M), g = /* @__PURE__ */ L(v);
|
|
1207
|
-
return g;
|
|
1208
|
-
}), r.set(f, _)), _ !== void 0) {
|
|
1209
|
-
var d = c(_);
|
|
1210
|
-
return d === M ? void 0 : d;
|
|
1211
|
-
}
|
|
1212
|
-
return Reflect.get(a, f, u);
|
|
1213
|
-
},
|
|
1214
|
-
getOwnPropertyDescriptor(a, f) {
|
|
1215
|
-
var u = Reflect.getOwnPropertyDescriptor(a, f);
|
|
1216
|
-
if (u && "value" in u) {
|
|
1217
|
-
var _ = r.get(f);
|
|
1218
|
-
_ && (u.value = c(_));
|
|
1219
|
-
} else if (u === void 0) {
|
|
1220
|
-
var h = r.get(f), d = h?.v;
|
|
1221
|
-
if (h !== void 0 && d !== M)
|
|
1222
|
-
return {
|
|
1223
|
-
enumerable: !0,
|
|
1224
|
-
configurable: !0,
|
|
1225
|
-
value: d,
|
|
1226
|
-
writable: !0
|
|
1227
|
-
};
|
|
1228
|
-
}
|
|
1229
|
-
return u;
|
|
1230
|
-
},
|
|
1231
|
-
has(a, f) {
|
|
1232
|
-
if (f === $t)
|
|
1233
|
-
return !0;
|
|
1234
|
-
var u = r.get(f), _ = u !== void 0 && u.v !== M || Reflect.has(a, f);
|
|
1235
|
-
if (u !== void 0 || E !== null && (!_ || Ye(a, f)?.writable)) {
|
|
1236
|
-
u === void 0 && (u = o(() => {
|
|
1237
|
-
var d = _ ? je(a[f]) : M, v = /* @__PURE__ */ L(d);
|
|
1238
|
-
return v;
|
|
1239
|
-
}), r.set(f, u));
|
|
1240
|
-
var h = c(u);
|
|
1241
|
-
if (h === M)
|
|
1242
|
-
return !1;
|
|
1243
|
-
}
|
|
1244
|
-
return _;
|
|
1245
|
-
},
|
|
1246
|
-
set(a, f, u, _) {
|
|
1247
|
-
var h = r.get(f), d = f in a;
|
|
1248
|
-
if (i && f === "length")
|
|
1249
|
-
for (var v = u; v < /** @type {Source<number>} */
|
|
1250
|
-
h.v; v += 1) {
|
|
1251
|
-
var g = r.get(v + "");
|
|
1252
|
-
g !== void 0 ? $(g, M) : v in a && (g = o(() => /* @__PURE__ */ L(M)), r.set(v + "", g));
|
|
1253
|
-
}
|
|
1254
|
-
if (h === void 0)
|
|
1255
|
-
(!d || Ye(a, f)?.writable) && (h = o(() => /* @__PURE__ */ L(void 0)), $(h, je(u)), r.set(f, h));
|
|
1256
|
-
else {
|
|
1257
|
-
d = h.v !== M;
|
|
1258
|
-
var T = o(() => je(u));
|
|
1259
|
-
$(h, T);
|
|
951
|
+
n && r.set("length", /* @__PURE__ */ P(e.length, s));
|
|
952
|
+
var u = "";
|
|
953
|
+
let h = !1;
|
|
954
|
+
function w(_) {
|
|
955
|
+
if (!h) {
|
|
956
|
+
h = !0, u = _, Pr(i, `${u} version`);
|
|
957
|
+
for (const [f, d] of r) Pr(d, Rs(u, f));
|
|
958
|
+
h = !1;
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
return new Proxy(e, {
|
|
962
|
+
defineProperty(_, f, d) {
|
|
963
|
+
(!("value" in d) || d.configurable === !1 || d.enumerable === !1 || d.writable === !1) && Zi();
|
|
964
|
+
var v = r.get(f);
|
|
965
|
+
return v === void 0 ? o(() => {
|
|
966
|
+
var g = /* @__PURE__ */ P(d.value, s);
|
|
967
|
+
return r.set(f, g), g;
|
|
968
|
+
}) : T(v, d.value, !0), !0;
|
|
969
|
+
},
|
|
970
|
+
deleteProperty(_, f) {
|
|
971
|
+
var d = r.get(f);
|
|
972
|
+
if (d === void 0) {
|
|
973
|
+
if (f in _) {
|
|
974
|
+
const v = o(() => /* @__PURE__ */ P(D, s));
|
|
975
|
+
r.set(f, v), lt(i);
|
|
1260
976
|
}
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
977
|
+
} else
|
|
978
|
+
T(d, D), lt(i);
|
|
979
|
+
return !0;
|
|
980
|
+
},
|
|
981
|
+
get(_, f, d) {
|
|
982
|
+
if (f === at) return e;
|
|
983
|
+
var v = r.get(f), g = f in _;
|
|
984
|
+
if (v === void 0 && (!g || Ae(_, f)?.writable) && (v = o(() => {
|
|
985
|
+
var x = /* @__PURE__ */ P(Me(g ? _[f] : D), s);
|
|
986
|
+
return x;
|
|
987
|
+
}), r.set(f, v)), v !== void 0) {
|
|
988
|
+
var y = c(v);
|
|
989
|
+
return y === D ? void 0 : y;
|
|
990
|
+
}
|
|
991
|
+
return Reflect.get(_, f, d);
|
|
992
|
+
},
|
|
993
|
+
getOwnPropertyDescriptor(_, f) {
|
|
994
|
+
var d = Reflect.getOwnPropertyDescriptor(_, f);
|
|
995
|
+
if (d && "value" in d) {
|
|
996
|
+
var v = r.get(f);
|
|
997
|
+
v && (d.value = c(v));
|
|
998
|
+
} else if (d === void 0) {
|
|
999
|
+
var g = r.get(f), y = g?.v;
|
|
1000
|
+
if (g !== void 0 && y !== D) return {
|
|
1001
|
+
enumerable: !0,
|
|
1002
|
+
configurable: !0,
|
|
1003
|
+
value: y,
|
|
1004
|
+
writable: !0
|
|
1005
|
+
};
|
|
1006
|
+
}
|
|
1007
|
+
return d;
|
|
1008
|
+
},
|
|
1009
|
+
has(_, f) {
|
|
1010
|
+
if (f === at) return !0;
|
|
1011
|
+
var d = r.get(f), v = d !== void 0 && d.v !== D || Reflect.has(_, f);
|
|
1012
|
+
return (d !== void 0 || E !== null && (!v || Ae(_, f)?.writable)) && (d === void 0 && (d = o(() => {
|
|
1013
|
+
var g = /* @__PURE__ */ P(v ? Me(_[f]) : D, s);
|
|
1014
|
+
return g;
|
|
1015
|
+
}), r.set(f, d)), c(d) === D) ? !1 : v;
|
|
1016
|
+
},
|
|
1017
|
+
set(_, f, d, v) {
|
|
1018
|
+
var g = r.get(f), y = f in _;
|
|
1019
|
+
if (n && f === "length") for (var x = d; x < g.v; x += 1) {
|
|
1020
|
+
var U = r.get(x + "");
|
|
1021
|
+
U !== void 0 ? T(U, D) : x in _ && (U = o(() => /* @__PURE__ */ P(D, s)), r.set(x + "", U));
|
|
1022
|
+
}
|
|
1023
|
+
if (g === void 0)
|
|
1024
|
+
(!y || Ae(_, f)?.writable) && (g = o(() => /* @__PURE__ */ P(void 0, s)), T(g, Me(d)), r.set(f, g));
|
|
1025
|
+
else {
|
|
1026
|
+
y = g.v !== D;
|
|
1027
|
+
var C = o(() => Me(d));
|
|
1028
|
+
T(g, C);
|
|
1029
|
+
}
|
|
1030
|
+
var j = Reflect.getOwnPropertyDescriptor(_, f);
|
|
1031
|
+
if (j?.set && j.set.call(v, d), !y) {
|
|
1032
|
+
if (n && typeof f == "string") {
|
|
1033
|
+
var Ee = r.get("length"), rt = Number(f);
|
|
1034
|
+
Number.isInteger(rt) && rt >= Ee.v && T(Ee, rt + 1);
|
|
1271
1035
|
}
|
|
1272
|
-
|
|
1273
|
-
},
|
|
1274
|
-
ownKeys(a) {
|
|
1275
|
-
c(n);
|
|
1276
|
-
var f = Reflect.ownKeys(a).filter((h) => {
|
|
1277
|
-
var d = r.get(h);
|
|
1278
|
-
return d === void 0 || d.v !== M;
|
|
1279
|
-
});
|
|
1280
|
-
for (var [u, _] of r)
|
|
1281
|
-
_.v !== M && !(u in a) && f.push(u);
|
|
1282
|
-
return f;
|
|
1283
|
-
},
|
|
1284
|
-
setPrototypeOf() {
|
|
1285
|
-
Zi();
|
|
1036
|
+
lt(i);
|
|
1286
1037
|
}
|
|
1038
|
+
return !0;
|
|
1039
|
+
},
|
|
1040
|
+
ownKeys(_) {
|
|
1041
|
+
c(i);
|
|
1042
|
+
var f = Reflect.ownKeys(_).filter((g) => {
|
|
1043
|
+
var y = r.get(g);
|
|
1044
|
+
return y === void 0 || y.v !== D;
|
|
1045
|
+
});
|
|
1046
|
+
for (var [d, v] of r) v.v !== D && !(d in _) && f.push(d);
|
|
1047
|
+
return f;
|
|
1048
|
+
},
|
|
1049
|
+
setPrototypeOf() {
|
|
1050
|
+
Qi();
|
|
1287
1051
|
}
|
|
1288
|
-
);
|
|
1052
|
+
});
|
|
1053
|
+
}
|
|
1054
|
+
function Rs(e, t) {
|
|
1055
|
+
return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : Ms.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
|
|
1289
1056
|
}
|
|
1290
|
-
var
|
|
1291
|
-
function
|
|
1292
|
-
if (
|
|
1293
|
-
|
|
1057
|
+
var Wr, As, Ln, Nn, Dn;
|
|
1058
|
+
function fr() {
|
|
1059
|
+
if (Wr === void 0) {
|
|
1060
|
+
Wr = window, As = document, Ln = /Firefox/.test(navigator.userAgent);
|
|
1294
1061
|
var e = Element.prototype, t = Node.prototype, r = Text.prototype;
|
|
1295
|
-
|
|
1062
|
+
Nn = Ae(t, "firstChild").get, Dn = Ae(t, "nextSibling").get, Mr(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Mr(r) && (r.__t = void 0);
|
|
1296
1063
|
}
|
|
1297
1064
|
}
|
|
1298
|
-
function
|
|
1065
|
+
function Ne(e = "") {
|
|
1299
1066
|
return document.createTextNode(e);
|
|
1300
1067
|
}
|
|
1301
1068
|
// @__NO_SIDE_EFFECTS__
|
|
1302
|
-
function
|
|
1303
|
-
return (
|
|
1304
|
-
/** @type {TemplateNode | null} */
|
|
1305
|
-
Mn.call(e)
|
|
1306
|
-
);
|
|
1069
|
+
function dt(e) {
|
|
1070
|
+
return Nn.call(e);
|
|
1307
1071
|
}
|
|
1308
1072
|
// @__NO_SIDE_EFFECTS__
|
|
1309
|
-
function
|
|
1310
|
-
return (
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
);
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
if (
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
r
|
|
1328
|
-
), pe(r), r;
|
|
1329
|
-
}
|
|
1330
|
-
function ar(e, t = 1, r = !1) {
|
|
1331
|
-
let i = D ? N : e;
|
|
1332
|
-
for (var n; t--; )
|
|
1333
|
-
n = i, i = /** @type {TemplateNode} */
|
|
1334
|
-
/* @__PURE__ */ Fe(i);
|
|
1335
|
-
if (!D)
|
|
1336
|
-
return i;
|
|
1073
|
+
function $e(e) {
|
|
1074
|
+
return Dn.call(e);
|
|
1075
|
+
}
|
|
1076
|
+
function Ct(e, t) {
|
|
1077
|
+
if (!N) return /* @__PURE__ */ dt(e);
|
|
1078
|
+
var r = /* @__PURE__ */ dt(A);
|
|
1079
|
+
if (r === null) r = A.appendChild(Ne());
|
|
1080
|
+
else if (t && r.nodeType !== 3) {
|
|
1081
|
+
var n = Ne();
|
|
1082
|
+
return r?.before(n), ae(n), n;
|
|
1083
|
+
}
|
|
1084
|
+
return t && Un(r), ae(r), r;
|
|
1085
|
+
}
|
|
1086
|
+
function Qt(e, t = 1, r = !1) {
|
|
1087
|
+
let n = N ? A : e;
|
|
1088
|
+
for (var i; t--; )
|
|
1089
|
+
i = n, n = /* @__PURE__ */ $e(n);
|
|
1090
|
+
if (!N) return n;
|
|
1337
1091
|
if (r) {
|
|
1338
|
-
if (
|
|
1339
|
-
var s =
|
|
1340
|
-
return
|
|
1092
|
+
if (n?.nodeType !== 3) {
|
|
1093
|
+
var s = Ne();
|
|
1094
|
+
return n === null ? i?.after(s) : n.before(s), ae(s), s;
|
|
1341
1095
|
}
|
|
1342
|
-
Un(
|
|
1343
|
-
/** @type {Text} */
|
|
1344
|
-
i
|
|
1345
|
-
);
|
|
1096
|
+
Un(n);
|
|
1346
1097
|
}
|
|
1347
|
-
return
|
|
1098
|
+
return ae(n), n;
|
|
1348
1099
|
}
|
|
1349
|
-
function
|
|
1100
|
+
function Ps(e) {
|
|
1350
1101
|
e.textContent = "";
|
|
1351
1102
|
}
|
|
1352
|
-
function
|
|
1353
|
-
return !1;
|
|
1103
|
+
function Is() {
|
|
1104
|
+
return !me || se !== null ? !1 : (E.f & vr) !== 0;
|
|
1354
1105
|
}
|
|
1355
|
-
function
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
document.createElementNS(cn, e, void 0)
|
|
1359
|
-
);
|
|
1106
|
+
function br(e, t, r) {
|
|
1107
|
+
let n = r ? { is: r } : void 0;
|
|
1108
|
+
return document.createElementNS(t ?? "http://www.w3.org/1999/xhtml", e, n);
|
|
1360
1109
|
}
|
|
1361
1110
|
function Un(e) {
|
|
1362
|
-
if (
|
|
1363
|
-
/** @type {string} */
|
|
1364
|
-
e.nodeValue.length < 65536
|
|
1365
|
-
)
|
|
1366
|
-
return;
|
|
1111
|
+
if (e.nodeValue.length < 65536) return;
|
|
1367
1112
|
let t = e.nextSibling;
|
|
1368
|
-
for (; t !== null && t.nodeType ===
|
|
1369
|
-
t.remove(), e.nodeValue +=
|
|
1370
|
-
t.nodeValue, t = e.nextSibling;
|
|
1113
|
+
for (; t !== null && t.nodeType === 3; )
|
|
1114
|
+
t.remove(), e.nodeValue += t.nodeValue, t = e.nextSibling;
|
|
1371
1115
|
}
|
|
1372
|
-
function
|
|
1373
|
-
var t =
|
|
1374
|
-
|
|
1116
|
+
function jn(e) {
|
|
1117
|
+
var t = k, r = E;
|
|
1118
|
+
J(null), oe(null);
|
|
1375
1119
|
try {
|
|
1376
1120
|
return e();
|
|
1377
1121
|
} finally {
|
|
1378
|
-
|
|
1122
|
+
J(t), oe(r);
|
|
1379
1123
|
}
|
|
1380
1124
|
}
|
|
1381
|
-
function
|
|
1382
|
-
E === null && (
|
|
1125
|
+
function Os(e) {
|
|
1126
|
+
E === null && (k === null && Vi(e), Hi()), be && Gi(e);
|
|
1383
1127
|
}
|
|
1384
|
-
function
|
|
1128
|
+
function Ls(e, t) {
|
|
1385
1129
|
var r = t.last;
|
|
1386
1130
|
r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
|
|
1387
1131
|
}
|
|
1388
|
-
function
|
|
1132
|
+
function fe(e, t) {
|
|
1389
1133
|
var r = E;
|
|
1390
|
-
r !== null &&
|
|
1391
|
-
var
|
|
1392
|
-
ctx:
|
|
1134
|
+
r !== null && r.f & 8192 && (e |= dr);
|
|
1135
|
+
var n = {
|
|
1136
|
+
ctx: I,
|
|
1393
1137
|
deps: null,
|
|
1394
1138
|
nodes: null,
|
|
1395
|
-
f: e |
|
|
1139
|
+
f: e | le | 512,
|
|
1396
1140
|
first: null,
|
|
1397
1141
|
fn: t,
|
|
1398
1142
|
last: null,
|
|
@@ -1403,1258 +1147,1105 @@ function ye(e, t) {
|
|
|
1403
1147
|
teardown: null,
|
|
1404
1148
|
wv: 0,
|
|
1405
1149
|
ac: null
|
|
1406
|
-
},
|
|
1407
|
-
if (
|
|
1408
|
-
gt !== null ? gt.push(i) : ve(i);
|
|
1150
|
+
}, i = n;
|
|
1151
|
+
if (e & 4) Xe !== null ? Xe.push(n) : Ue.ensure().schedule(n);
|
|
1409
1152
|
else if (t !== null) {
|
|
1410
1153
|
try {
|
|
1411
|
-
|
|
1412
|
-
} catch (
|
|
1413
|
-
throw
|
|
1154
|
+
Ze(n);
|
|
1155
|
+
} catch (l) {
|
|
1156
|
+
throw q(n), l;
|
|
1414
1157
|
}
|
|
1415
|
-
|
|
1416
|
-
(n.f & Qe) === 0 && (n = n.first, (e & De) !== 0 && (e & vt) !== 0 && n !== null && (n.f |= vt));
|
|
1158
|
+
i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && !(i.f & 524288) && (i = i.first, e & 16 && e & 65536 && i !== null && (i.f |= hr));
|
|
1417
1159
|
}
|
|
1418
|
-
if (
|
|
1419
|
-
var s =
|
|
1420
|
-
|
|
1421
|
-
m
|
|
1422
|
-
);
|
|
1423
|
-
(s.effects ?? (s.effects = [])).push(n);
|
|
1160
|
+
if (i !== null && (i.parent = r, r !== null && Ls(i, r), k !== null && k.f & 2 && !(e & 64))) {
|
|
1161
|
+
var s = k;
|
|
1162
|
+
(s.effects ?? (s.effects = [])).push(i);
|
|
1424
1163
|
}
|
|
1425
|
-
return
|
|
1164
|
+
return n;
|
|
1426
1165
|
}
|
|
1427
|
-
function
|
|
1428
|
-
return
|
|
1166
|
+
function $r() {
|
|
1167
|
+
return k !== null && !re;
|
|
1429
1168
|
}
|
|
1430
|
-
function
|
|
1431
|
-
const t =
|
|
1432
|
-
return
|
|
1433
|
-
}
|
|
1434
|
-
function tt(e) {
|
|
1435
|
-
Rs();
|
|
1436
|
-
var t = (
|
|
1437
|
-
/** @type {Effect} */
|
|
1438
|
-
E.f
|
|
1439
|
-
), r = !m && (t & we) !== 0 && (t & Ze) === 0;
|
|
1440
|
-
if (r) {
|
|
1441
|
-
var i = (
|
|
1442
|
-
/** @type {ComponentContext} */
|
|
1443
|
-
Z
|
|
1444
|
-
);
|
|
1445
|
-
(i.e ?? (i.e = [])).push(e);
|
|
1446
|
-
} else
|
|
1447
|
-
return jn(e);
|
|
1169
|
+
function Ns(e) {
|
|
1170
|
+
const t = fe(8, null);
|
|
1171
|
+
return L(t, K), t.teardown = e, t;
|
|
1448
1172
|
}
|
|
1449
|
-
function
|
|
1450
|
-
|
|
1173
|
+
function ze(e) {
|
|
1174
|
+
Os("$effect");
|
|
1175
|
+
var t = E.f;
|
|
1176
|
+
if (!k && t & 32 && !(t & 32768)) {
|
|
1177
|
+
var r = I;
|
|
1178
|
+
(r.e ?? (r.e = [])).push(e);
|
|
1179
|
+
} else return Wn(e);
|
|
1451
1180
|
}
|
|
1452
|
-
function
|
|
1453
|
-
|
|
1454
|
-
|
|
1181
|
+
function Wn(e) {
|
|
1182
|
+
return fe(4 | ji, e);
|
|
1183
|
+
}
|
|
1184
|
+
function Ds(e) {
|
|
1185
|
+
Ue.ensure();
|
|
1186
|
+
const t = fe(64 | Qe, e);
|
|
1455
1187
|
return () => {
|
|
1456
|
-
|
|
1188
|
+
q(t);
|
|
1457
1189
|
};
|
|
1458
1190
|
}
|
|
1459
|
-
function
|
|
1460
|
-
|
|
1461
|
-
const t =
|
|
1462
|
-
return (r = {}) => new Promise((
|
|
1463
|
-
r.outro ?
|
|
1464
|
-
|
|
1465
|
-
}) : (
|
|
1191
|
+
function Us(e) {
|
|
1192
|
+
Ue.ensure();
|
|
1193
|
+
const t = fe(64 | Qe, e);
|
|
1194
|
+
return (r = {}) => new Promise((n) => {
|
|
1195
|
+
r.outro ? wt(t, () => {
|
|
1196
|
+
q(t), n(void 0);
|
|
1197
|
+
}) : (q(t), n(void 0));
|
|
1466
1198
|
});
|
|
1467
1199
|
}
|
|
1468
|
-
function
|
|
1469
|
-
return
|
|
1200
|
+
function Bn(e) {
|
|
1201
|
+
return fe(4, e);
|
|
1470
1202
|
}
|
|
1471
|
-
function
|
|
1472
|
-
return
|
|
1203
|
+
function js(e) {
|
|
1204
|
+
return fe(Wi | Qe, e);
|
|
1473
1205
|
}
|
|
1474
|
-
function
|
|
1475
|
-
return
|
|
1206
|
+
function Er(e, t = 0) {
|
|
1207
|
+
return fe(8 | t, e);
|
|
1476
1208
|
}
|
|
1477
|
-
function
|
|
1478
|
-
|
|
1479
|
-
|
|
1209
|
+
function Br(e, t = [], r = [], n = []) {
|
|
1210
|
+
bs(n, t, r, (i) => {
|
|
1211
|
+
fe(8, () => e(...i.map(c)));
|
|
1480
1212
|
});
|
|
1481
1213
|
}
|
|
1482
|
-
function
|
|
1483
|
-
var r =
|
|
1214
|
+
function Fn(e, t = 0) {
|
|
1215
|
+
var r = fe(16 | t, e);
|
|
1484
1216
|
return r;
|
|
1485
1217
|
}
|
|
1486
|
-
function
|
|
1487
|
-
return
|
|
1218
|
+
function he(e) {
|
|
1219
|
+
return fe(32 | Qe, e);
|
|
1488
1220
|
}
|
|
1489
|
-
function
|
|
1221
|
+
function zn(e) {
|
|
1490
1222
|
var t = e.teardown;
|
|
1491
1223
|
if (t !== null) {
|
|
1492
|
-
const r =
|
|
1493
|
-
|
|
1224
|
+
const r = be, n = k;
|
|
1225
|
+
Fr(!0), J(null);
|
|
1494
1226
|
try {
|
|
1495
1227
|
t.call(null);
|
|
1496
1228
|
} finally {
|
|
1497
|
-
|
|
1229
|
+
Fr(r), J(n);
|
|
1498
1230
|
}
|
|
1499
1231
|
}
|
|
1500
1232
|
}
|
|
1501
|
-
function
|
|
1233
|
+
function kr(e, t = !1) {
|
|
1502
1234
|
var r = e.first;
|
|
1503
1235
|
for (e.first = e.last = null; r !== null; ) {
|
|
1504
|
-
const
|
|
1505
|
-
|
|
1506
|
-
|
|
1236
|
+
const i = r.ac;
|
|
1237
|
+
i !== null && jn(() => {
|
|
1238
|
+
i.abort(de);
|
|
1507
1239
|
});
|
|
1508
|
-
var
|
|
1509
|
-
|
|
1240
|
+
var n = r.next;
|
|
1241
|
+
r.f & 64 ? r.parent = null : q(r, t), r = n;
|
|
1510
1242
|
}
|
|
1511
1243
|
}
|
|
1512
|
-
function
|
|
1244
|
+
function Ws(e) {
|
|
1513
1245
|
for (var t = e.first; t !== null; ) {
|
|
1514
1246
|
var r = t.next;
|
|
1515
|
-
|
|
1247
|
+
t.f & 32 || q(t), t = r;
|
|
1516
1248
|
}
|
|
1517
1249
|
}
|
|
1518
|
-
function
|
|
1250
|
+
function q(e, t = !0) {
|
|
1519
1251
|
var r = !1;
|
|
1520
|
-
(t ||
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
s.stop();
|
|
1529
|
-
Hn(e);
|
|
1530
|
-
var n = e.parent;
|
|
1531
|
-
n !== null && n.first !== null && Gn(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
|
|
1532
|
-
}
|
|
1533
|
-
function xs(e, t) {
|
|
1252
|
+
(t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (Bs(e.nodes.start, e.nodes.end), r = !0), L(e, Rr), kr(e, t && !r), vt(e, 0);
|
|
1253
|
+
var n = e.nodes && e.nodes.t;
|
|
1254
|
+
if (n !== null) for (const s of n) s.stop();
|
|
1255
|
+
zn(e), e.f ^= Rr, e.f |= Ui;
|
|
1256
|
+
var i = e.parent;
|
|
1257
|
+
i !== null && i.first !== null && qn(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
|
|
1258
|
+
}
|
|
1259
|
+
function Bs(e, t) {
|
|
1534
1260
|
for (; e !== null; ) {
|
|
1535
|
-
var r = e === t ? null : /* @__PURE__ */
|
|
1261
|
+
var r = e === t ? null : /* @__PURE__ */ $e(e);
|
|
1536
1262
|
e.remove(), e = r;
|
|
1537
1263
|
}
|
|
1538
1264
|
}
|
|
1539
|
-
function
|
|
1540
|
-
var t = e.parent, r = e.prev,
|
|
1541
|
-
r !== null && (r.next =
|
|
1265
|
+
function qn(e) {
|
|
1266
|
+
var t = e.parent, r = e.prev, n = e.next;
|
|
1267
|
+
r !== null && (r.next = n), n !== null && (n.prev = r), t !== null && (t.first === e && (t.first = n), t.last === e && (t.last = r));
|
|
1542
1268
|
}
|
|
1543
|
-
function
|
|
1544
|
-
var
|
|
1545
|
-
|
|
1546
|
-
var
|
|
1547
|
-
r &&
|
|
1548
|
-
}, s =
|
|
1269
|
+
function wt(e, t, r = !0) {
|
|
1270
|
+
var n = [];
|
|
1271
|
+
Yn(e, n, !0);
|
|
1272
|
+
var i = () => {
|
|
1273
|
+
r && q(e), t && t();
|
|
1274
|
+
}, s = n.length;
|
|
1549
1275
|
if (s > 0) {
|
|
1550
|
-
var
|
|
1551
|
-
for (var
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
for (var n = e.first; n !== null; ) {
|
|
1564
|
-
var s = n.next, o = (n.f & vt) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1565
|
-
// it means the parent block effect was pruned. In that case,
|
|
1566
|
-
// transparency information was transferred to the branch effect.
|
|
1567
|
-
(n.f & we) !== 0 && (e.f & De) !== 0;
|
|
1568
|
-
Vn(n, t, o ? r : !1), n = s;
|
|
1276
|
+
var l = () => --s || i();
|
|
1277
|
+
for (var o of n) o.out(l);
|
|
1278
|
+
} else i();
|
|
1279
|
+
}
|
|
1280
|
+
function Yn(e, t, r) {
|
|
1281
|
+
if (!(e.f & 8192)) {
|
|
1282
|
+
e.f ^= dr;
|
|
1283
|
+
var n = e.nodes && e.nodes.t;
|
|
1284
|
+
if (n !== null)
|
|
1285
|
+
for (const o of n) (o.is_global || r) && t.push(o);
|
|
1286
|
+
for (var i = e.first; i !== null; ) {
|
|
1287
|
+
var s = i.next, l = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (e.f & 16) !== 0;
|
|
1288
|
+
Yn(i, t, l ? r : !1), i = s;
|
|
1569
1289
|
}
|
|
1570
1290
|
}
|
|
1571
1291
|
}
|
|
1572
|
-
function
|
|
1573
|
-
|
|
1292
|
+
function Fs(e) {
|
|
1293
|
+
Gn(e, !0);
|
|
1574
1294
|
}
|
|
1575
|
-
function
|
|
1576
|
-
if (
|
|
1577
|
-
e.f ^=
|
|
1295
|
+
function Gn(e, t) {
|
|
1296
|
+
if (e.f & 8192) {
|
|
1297
|
+
e.f ^= dr, e.f & 1024 || (L(e, le), Ue.ensure().schedule(e));
|
|
1578
1298
|
for (var r = e.first; r !== null; ) {
|
|
1579
|
-
var
|
|
1580
|
-
|
|
1299
|
+
var n = r.next, i = (r.f & 65536) !== 0 || (r.f & 32) !== 0;
|
|
1300
|
+
Gn(r, i ? t : !1), r = n;
|
|
1581
1301
|
}
|
|
1582
1302
|
var s = e.nodes && e.nodes.t;
|
|
1583
1303
|
if (s !== null)
|
|
1584
|
-
for (const
|
|
1585
|
-
(o.is_global || t) && o.in();
|
|
1304
|
+
for (const l of s) (l.is_global || t) && l.in();
|
|
1586
1305
|
}
|
|
1587
1306
|
}
|
|
1588
|
-
function
|
|
1307
|
+
function Hn(e, t) {
|
|
1589
1308
|
if (e.nodes)
|
|
1590
|
-
for (var r = e.nodes.start,
|
|
1591
|
-
var
|
|
1592
|
-
t.append(r), r =
|
|
1309
|
+
for (var r = e.nodes.start, n = e.nodes.end; r !== null; ) {
|
|
1310
|
+
var i = r === n ? null : /* @__PURE__ */ $e(r);
|
|
1311
|
+
t.append(r), r = i;
|
|
1593
1312
|
}
|
|
1594
1313
|
}
|
|
1595
|
-
|
|
1596
|
-
function
|
|
1597
|
-
|
|
1314
|
+
var zs = null, It = !1, be = !1;
|
|
1315
|
+
function Fr(e) {
|
|
1316
|
+
be = e;
|
|
1598
1317
|
}
|
|
1599
|
-
|
|
1600
|
-
function
|
|
1601
|
-
|
|
1318
|
+
var k = null, re = !1;
|
|
1319
|
+
function J(e) {
|
|
1320
|
+
k = e;
|
|
1602
1321
|
}
|
|
1603
|
-
|
|
1604
|
-
function
|
|
1322
|
+
var E = null;
|
|
1323
|
+
function oe(e) {
|
|
1605
1324
|
E = e;
|
|
1606
1325
|
}
|
|
1607
|
-
|
|
1608
|
-
function
|
|
1609
|
-
|
|
1326
|
+
var V = null;
|
|
1327
|
+
function Vn(e) {
|
|
1328
|
+
k !== null && (!me || k.f & 2) && (V === null ? V = [e] : V.push(e));
|
|
1610
1329
|
}
|
|
1611
|
-
|
|
1612
|
-
function
|
|
1613
|
-
|
|
1330
|
+
var F = null, Y = 0, H = null;
|
|
1331
|
+
function qs(e) {
|
|
1332
|
+
H = e;
|
|
1614
1333
|
}
|
|
1615
|
-
|
|
1616
|
-
function
|
|
1617
|
-
|
|
1334
|
+
var Kn = 1, Re = 0, Le = Re;
|
|
1335
|
+
function zr(e) {
|
|
1336
|
+
Le = e;
|
|
1618
1337
|
}
|
|
1619
|
-
function
|
|
1620
|
-
return ++
|
|
1338
|
+
function Jn() {
|
|
1339
|
+
return ++Kn;
|
|
1621
1340
|
}
|
|
1622
|
-
function
|
|
1341
|
+
function yt(e) {
|
|
1623
1342
|
var t = e.f;
|
|
1624
|
-
if (
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
e.deps
|
|
1630
|
-
), i = r.length, n = 0; n < i; n++) {
|
|
1631
|
-
var s = r[n];
|
|
1632
|
-
if (Nt(
|
|
1633
|
-
/** @type {Derived} */
|
|
1634
|
-
s
|
|
1635
|
-
) && On(
|
|
1636
|
-
/** @type {Derived} */
|
|
1637
|
-
s
|
|
1638
|
-
), s.wv > e.wv)
|
|
1639
|
-
return !0;
|
|
1343
|
+
if (t & 2048) return !0;
|
|
1344
|
+
if (t & 2 && (e.f &= ~ht), t & 4096) {
|
|
1345
|
+
for (var r = e.deps, n = r.length, i = 0; i < n; i++) {
|
|
1346
|
+
var s = r[i];
|
|
1347
|
+
if (yt(s) && An(s), s.wv > e.wv) return !0;
|
|
1640
1348
|
}
|
|
1641
|
-
|
|
1642
|
-
// traversal of the graph in the other batches still happens
|
|
1643
|
-
ae === null && P(e, F);
|
|
1349
|
+
t & 512 && z === null && L(e, K);
|
|
1644
1350
|
}
|
|
1645
1351
|
return !1;
|
|
1646
1352
|
}
|
|
1647
|
-
function
|
|
1648
|
-
var
|
|
1649
|
-
if (
|
|
1650
|
-
for (var
|
|
1651
|
-
var s = i
|
|
1652
|
-
|
|
1653
|
-
/** @type {Derived} */
|
|
1654
|
-
s,
|
|
1655
|
-
t,
|
|
1656
|
-
!1
|
|
1657
|
-
) : t === s && (r ? P(s, U) : (s.f & F) !== 0 && P(s, ue), ve(
|
|
1658
|
-
/** @type {Effect} */
|
|
1659
|
-
s
|
|
1660
|
-
));
|
|
1353
|
+
function Xn(e, t, r = !0) {
|
|
1354
|
+
var n = e.reactions;
|
|
1355
|
+
if (n !== null && !(!me && V !== null && Ve.call(V, e)))
|
|
1356
|
+
for (var i = 0; i < n.length; i++) {
|
|
1357
|
+
var s = n[i];
|
|
1358
|
+
s.f & 2 ? Xn(s, t, !1) : t === s && (r ? L(s, le) : s.f & 1024 && L(s, De), wr(s));
|
|
1661
1359
|
}
|
|
1662
1360
|
}
|
|
1663
|
-
function
|
|
1664
|
-
var
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
null, K = 0, Q = null, m = (u & (we | Me)) === 0 ? e : null, ne = null, pt(e.ctx), fe = !1, We = ++ze, e.ac !== null && (Bn(() => {
|
|
1668
|
-
e.ac.abort(Ue);
|
|
1361
|
+
function Zn(e) {
|
|
1362
|
+
var t = F, r = Y, n = H, i = k, s = V, l = I, o = re, u = Le, h = e.f;
|
|
1363
|
+
F = null, Y = 0, H = null, k = h & 96 ? null : e, V = null, Ke(e.ctx), re = !1, Le = ++Re, e.ac !== null && (jn(() => {
|
|
1364
|
+
e.ac.abort(de);
|
|
1669
1365
|
}), e.ac = null);
|
|
1670
1366
|
try {
|
|
1671
|
-
e.f |=
|
|
1672
|
-
var _ = (
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
if (
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
for (g = 0; g < /** @type {Source[]} */
|
|
1691
|
-
Q.length; g++)
|
|
1692
|
-
Zn(
|
|
1693
|
-
Q[g],
|
|
1694
|
-
/** @type {Effect} */
|
|
1695
|
-
e
|
|
1696
|
-
);
|
|
1697
|
-
if (n !== null && n !== e) {
|
|
1698
|
-
if (ze++, n.deps !== null)
|
|
1699
|
-
for (let b = 0; b < r; b += 1)
|
|
1700
|
-
n.deps[b].rv = ze;
|
|
1701
|
-
if (t !== null)
|
|
1702
|
-
for (const b of t)
|
|
1703
|
-
b.rv = ze;
|
|
1704
|
-
Q !== null && (i === null ? i = Q : i.push(.../** @type {Source[]} */
|
|
1705
|
-
Q));
|
|
1367
|
+
e.f |= Ar;
|
|
1368
|
+
var w = e.fn, _ = w();
|
|
1369
|
+
e.f |= vr;
|
|
1370
|
+
var f = e.deps, d = M?.is_fork;
|
|
1371
|
+
if (F !== null) {
|
|
1372
|
+
var v;
|
|
1373
|
+
if (d || vt(e, Y), f !== null && Y > 0)
|
|
1374
|
+
for (f.length = Y + F.length, v = 0; v < F.length; v++) f[Y + v] = F[v];
|
|
1375
|
+
else e.deps = f = F;
|
|
1376
|
+
if ($r() && e.f & 512) for (v = Y; v < f.length; v++) {
|
|
1377
|
+
var g;
|
|
1378
|
+
((g = f[v]).reactions ?? (g.reactions = [])).push(e);
|
|
1379
|
+
}
|
|
1380
|
+
} else !d && f !== null && Y < f.length && (vt(e, Y), f.length = Y);
|
|
1381
|
+
if (pt() && H !== null && !re && f !== null && !(e.f & 6146)) for (v = 0; v < H.length; v++) Xn(H[v], e);
|
|
1382
|
+
if (i !== null && i !== e) {
|
|
1383
|
+
if (Re++, i.deps !== null) for (let y = 0; y < r; y += 1) i.deps[y].rv = Re;
|
|
1384
|
+
if (t !== null) for (const y of t) y.rv = Re;
|
|
1385
|
+
H !== null && (n === null ? n = H : n.push(...H));
|
|
1706
1386
|
}
|
|
1707
|
-
return
|
|
1708
|
-
} catch (
|
|
1709
|
-
return
|
|
1387
|
+
return e.f & 8388608 && (e.f ^= Ut), _;
|
|
1388
|
+
} catch (y) {
|
|
1389
|
+
return _n(y);
|
|
1710
1390
|
} finally {
|
|
1711
|
-
e.f ^=
|
|
1391
|
+
e.f ^= Ar, F = t, Y = r, H = n, k = i, V = s, Ke(l), re = o, Le = u;
|
|
1712
1392
|
}
|
|
1713
1393
|
}
|
|
1714
|
-
function
|
|
1394
|
+
function Ys(e, t) {
|
|
1715
1395
|
let r = t.reactions;
|
|
1716
1396
|
if (r !== null) {
|
|
1717
|
-
var
|
|
1718
|
-
if (
|
|
1719
|
-
var
|
|
1720
|
-
|
|
1397
|
+
var n = Mi.call(r, e);
|
|
1398
|
+
if (n !== -1) {
|
|
1399
|
+
var i = r.length - 1;
|
|
1400
|
+
i === 0 ? r = t.reactions = null : (r[n] = r[i], r.pop());
|
|
1721
1401
|
}
|
|
1722
1402
|
}
|
|
1723
|
-
if (r === null &&
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
(G === null || !ht.call(G, t))) {
|
|
1727
|
-
var s = (
|
|
1728
|
-
/** @type {Derived} */
|
|
1729
|
-
t
|
|
1730
|
-
);
|
|
1731
|
-
(s.f & te) !== 0 && (s.f ^= te, s.f &= ~Je), Sr(s), bs(s), Rt(s, 0);
|
|
1403
|
+
if (r === null && t.f & 2 && (F === null || !Ve.call(F, t))) {
|
|
1404
|
+
var s = t;
|
|
1405
|
+
s.f & 512 && (s.f ^= 512, s.f &= ~ht), pr(s), Ss(s), vt(s, 0);
|
|
1732
1406
|
}
|
|
1733
1407
|
}
|
|
1734
|
-
function
|
|
1408
|
+
function vt(e, t) {
|
|
1735
1409
|
var r = e.deps;
|
|
1736
1410
|
if (r !== null)
|
|
1737
|
-
for (var
|
|
1738
|
-
Ds(e, r[i]);
|
|
1411
|
+
for (var n = t; n < r.length; n++) Ys(e, r[n]);
|
|
1739
1412
|
}
|
|
1740
|
-
function
|
|
1413
|
+
function Ze(e) {
|
|
1741
1414
|
var t = e.f;
|
|
1742
|
-
if ((t &
|
|
1743
|
-
|
|
1744
|
-
var r = E,
|
|
1745
|
-
E = e,
|
|
1415
|
+
if (!(t & 16384)) {
|
|
1416
|
+
L(e, K);
|
|
1417
|
+
var r = E, n = It;
|
|
1418
|
+
if (E = e, It = !0, 0)
|
|
1419
|
+
var i, s;
|
|
1746
1420
|
try {
|
|
1747
|
-
|
|
1748
|
-
var
|
|
1749
|
-
e.teardown = typeof
|
|
1750
|
-
|
|
1751
|
-
ur && ss && (e.f & U) !== 0 && e.deps;
|
|
1421
|
+
t & 16777232 ? Ws(e) : kr(e), zn(e);
|
|
1422
|
+
var l = Zn(e);
|
|
1423
|
+
if (e.teardown = typeof l == "function" ? l : null, e.wv = Kn, 0)
|
|
1424
|
+
for (var o of e.deps) ;
|
|
1752
1425
|
} finally {
|
|
1753
|
-
|
|
1426
|
+
It = n, E = r;
|
|
1754
1427
|
}
|
|
1755
1428
|
}
|
|
1756
1429
|
}
|
|
1757
1430
|
function c(e) {
|
|
1758
|
-
var t = e.f
|
|
1759
|
-
if (
|
|
1760
|
-
var
|
|
1761
|
-
if (
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
s === null ? e.reactions = [m] : ht.call(s, m) || s.push(m);
|
|
1769
|
-
}
|
|
1431
|
+
var t = (e.f & 2) !== 0;
|
|
1432
|
+
if (zs?.add(e), k !== null && !re && !(E !== null && E.f & 16384) && (V === null || !Ve.call(V, e))) {
|
|
1433
|
+
var r = k.deps;
|
|
1434
|
+
if (k.f & 2097152)
|
|
1435
|
+
e.rv < Re && (e.rv = Re, F === null && r !== null && r[Y] === e ? Y++ : F === null ? F = [e] : F.push(e));
|
|
1436
|
+
else {
|
|
1437
|
+
var n;
|
|
1438
|
+
((n = k).deps ?? (n.deps = [])).push(e);
|
|
1439
|
+
var i = e.reactions;
|
|
1440
|
+
i === null ? e.reactions = [k] : Ve.call(i, k) || i.push(k);
|
|
1770
1441
|
}
|
|
1771
1442
|
}
|
|
1772
|
-
if (
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1443
|
+
if (0) {
|
|
1444
|
+
if (!re && reactivity_loss_tracker && !reactivity_loss_tracker.warned && !(reactivity_loss_tracker.effect.f & 2097152))
|
|
1445
|
+
var s;
|
|
1446
|
+
if (tracing_mode_flag && !re && tracing_expressions !== null && k !== null && tracing_expressions.reaction === k && !e.trace) {
|
|
1447
|
+
if (s)
|
|
1448
|
+
var l, o;
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
if (be && ye.has(e)) return ye.get(e);
|
|
1452
|
+
if (t) {
|
|
1453
|
+
var u = e;
|
|
1454
|
+
if (be) {
|
|
1455
|
+
var h = u.v;
|
|
1456
|
+
return (!(u.f & 1024) && u.reactions !== null || ei(u)) && (h = mr(u)), ye.set(u, h), h;
|
|
1782
1457
|
}
|
|
1783
|
-
var
|
|
1784
|
-
|
|
1458
|
+
var w = (u.f & 512) === 0 && !re && k !== null && (It || (k.f & 512) !== 0), _ = (u.f & vr) === 0;
|
|
1459
|
+
yt(u) && (w && (u.f |= 512), An(u)), w && !_ && (Pn(u), Qn(u));
|
|
1785
1460
|
}
|
|
1786
|
-
if (
|
|
1787
|
-
|
|
1788
|
-
if ((e.f & xe) !== 0)
|
|
1789
|
-
throw e.v;
|
|
1461
|
+
if (z?.has(e)) return z.get(e);
|
|
1462
|
+
if (e.f & 8388608) throw e.v;
|
|
1790
1463
|
return e.v;
|
|
1791
1464
|
}
|
|
1792
|
-
function
|
|
1793
|
-
if (e.f |=
|
|
1465
|
+
function Qn(e) {
|
|
1466
|
+
if (e.f |= 512, e.deps !== null)
|
|
1794
1467
|
for (const t of e.deps)
|
|
1795
|
-
(t.reactions ?? (t.reactions = [])).push(e),
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
/** @type {Derived} */
|
|
1800
|
-
t
|
|
1801
|
-
));
|
|
1802
|
-
}
|
|
1803
|
-
function ti(e) {
|
|
1804
|
-
if (e.v === M) return !0;
|
|
1468
|
+
(t.reactions ?? (t.reactions = [])).push(e), t.f & 2 && !(t.f & 512) && (Pn(t), Qn(t));
|
|
1469
|
+
}
|
|
1470
|
+
function ei(e) {
|
|
1471
|
+
if (e.v === D) return !0;
|
|
1805
1472
|
if (e.deps === null) return !1;
|
|
1806
1473
|
for (const t of e.deps)
|
|
1807
|
-
if (
|
|
1808
|
-
/** @type {Derived} */
|
|
1809
|
-
t
|
|
1810
|
-
))
|
|
1811
|
-
return !0;
|
|
1474
|
+
if (ye.has(t) || t.f & 2 && ei(t)) return !0;
|
|
1812
1475
|
return !1;
|
|
1813
1476
|
}
|
|
1814
|
-
function
|
|
1815
|
-
var t =
|
|
1477
|
+
function Gt(e) {
|
|
1478
|
+
var t = re;
|
|
1816
1479
|
try {
|
|
1817
|
-
return
|
|
1480
|
+
return re = !0, e();
|
|
1818
1481
|
} finally {
|
|
1819
|
-
|
|
1820
|
-
}
|
|
1821
|
-
}
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
);
|
|
1832
|
-
Wr = e;
|
|
1833
|
-
var o = 0, a = Wr === e && e[Ft];
|
|
1834
|
-
if (a) {
|
|
1835
|
-
var f = n.indexOf(a);
|
|
1836
|
-
if (f !== -1 && (t === document || t === /** @type {any} */
|
|
1837
|
-
window)) {
|
|
1838
|
-
e[Ft] = t;
|
|
1482
|
+
re = t;
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
var Mt = Symbol("events"), Gs = /* @__PURE__ */ new Set(), qr = /* @__PURE__ */ new Set(), Yr = null;
|
|
1486
|
+
function Gr(e) {
|
|
1487
|
+
var t = this, r = t.ownerDocument, n = e.type, i = e.composedPath?.() || [], s = i[0] || e.target;
|
|
1488
|
+
Yr = e;
|
|
1489
|
+
var l = 0, o = Yr === e && e[Mt];
|
|
1490
|
+
if (o) {
|
|
1491
|
+
var u = i.indexOf(o);
|
|
1492
|
+
if (u !== -1 && (t === document || t === window)) {
|
|
1493
|
+
e[Mt] = t;
|
|
1839
1494
|
return;
|
|
1840
1495
|
}
|
|
1841
|
-
var
|
|
1842
|
-
if (
|
|
1843
|
-
|
|
1844
|
-
f <= u && (o = f);
|
|
1496
|
+
var h = i.indexOf(t);
|
|
1497
|
+
if (h === -1) return;
|
|
1498
|
+
u <= h && (l = u);
|
|
1845
1499
|
}
|
|
1846
|
-
if (s =
|
|
1847
|
-
|
|
1848
|
-
Yt(e, "currentTarget", {
|
|
1500
|
+
if (s = i[l] || e.target, s !== t) {
|
|
1501
|
+
Dt(e, "currentTarget", {
|
|
1849
1502
|
configurable: !0,
|
|
1850
1503
|
get() {
|
|
1851
1504
|
return s || r;
|
|
1852
1505
|
}
|
|
1853
1506
|
});
|
|
1854
|
-
var
|
|
1855
|
-
|
|
1507
|
+
var w = k, _ = E;
|
|
1508
|
+
J(null), oe(null);
|
|
1856
1509
|
try {
|
|
1857
|
-
for (var
|
|
1858
|
-
var
|
|
1859
|
-
s.host || null;
|
|
1510
|
+
for (var f, d = []; s !== null; ) {
|
|
1511
|
+
var v = s.assignedSlot || s.parentNode || s.host || null;
|
|
1860
1512
|
try {
|
|
1861
|
-
var
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
e.target === s) && T.call(s, e);
|
|
1866
|
-
} catch (b) {
|
|
1867
|
-
d ? v.push(b) : d = b;
|
|
1513
|
+
var g = s[Mt]?.[n];
|
|
1514
|
+
g != null && (!s.disabled || e.target === s) && g.call(s, e);
|
|
1515
|
+
} catch (y) {
|
|
1516
|
+
f ? d.push(y) : f = y;
|
|
1868
1517
|
}
|
|
1869
|
-
if (e.cancelBubble ||
|
|
1870
|
-
|
|
1871
|
-
s = g;
|
|
1518
|
+
if (e.cancelBubble || v === t || v === null) break;
|
|
1519
|
+
s = v;
|
|
1872
1520
|
}
|
|
1873
|
-
if (
|
|
1874
|
-
for (let
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
throw d;
|
|
1521
|
+
if (f) {
|
|
1522
|
+
for (let y of d) queueMicrotask(() => {
|
|
1523
|
+
throw y;
|
|
1524
|
+
});
|
|
1525
|
+
throw f;
|
|
1879
1526
|
}
|
|
1880
1527
|
} finally {
|
|
1881
|
-
e[
|
|
1528
|
+
e[Mt] = t, delete e.currentTarget, J(w), oe(_);
|
|
1882
1529
|
}
|
|
1883
1530
|
}
|
|
1884
1531
|
}
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
);
|
|
1892
|
-
function Us(e) {
|
|
1893
|
-
return (
|
|
1894
|
-
/** @type {string} */
|
|
1895
|
-
Fs?.createHTML(e) ?? e
|
|
1896
|
-
);
|
|
1897
|
-
}
|
|
1898
|
-
function Bs(e) {
|
|
1899
|
-
var t = Nr("template");
|
|
1900
|
-
return t.innerHTML = Us(e.replaceAll("<!>", "<!---->")), t.content;
|
|
1901
|
-
}
|
|
1902
|
-
function $r(e, t) {
|
|
1903
|
-
var r = (
|
|
1904
|
-
/** @type {Effect} */
|
|
1905
|
-
E
|
|
1906
|
-
);
|
|
1907
|
-
r.nodes === null && (r.nodes = { start: e, end: t, a: null, t: null });
|
|
1532
|
+
var Hs = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
|
|
1533
|
+
function Vs(e) {
|
|
1534
|
+
return Hs?.createHTML(e) ?? e;
|
|
1535
|
+
}
|
|
1536
|
+
function Ks(e) {
|
|
1537
|
+
var t = br("template");
|
|
1538
|
+
return t.innerHTML = Vs(e.replaceAll("<!>", "<!---->")), t.content;
|
|
1908
1539
|
}
|
|
1909
|
-
// @__NO_SIDE_EFFECTS__
|
|
1910
1540
|
function Ot(e, t) {
|
|
1911
|
-
var r =
|
|
1541
|
+
var r = E;
|
|
1542
|
+
r.nodes === null && (r.nodes = {
|
|
1543
|
+
start: e,
|
|
1544
|
+
end: t,
|
|
1545
|
+
a: null,
|
|
1546
|
+
t: null
|
|
1547
|
+
});
|
|
1548
|
+
}
|
|
1549
|
+
// @__NO_SIDE_EFFECTS__
|
|
1550
|
+
function mt(e, t) {
|
|
1551
|
+
var r = (t & 1) !== 0, n = (t & 2) !== 0, i, s = !e.startsWith("<!>");
|
|
1912
1552
|
return () => {
|
|
1913
|
-
if (
|
|
1914
|
-
return
|
|
1915
|
-
i === void 0 && (i =
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
);
|
|
1921
|
-
return
|
|
1553
|
+
if (N)
|
|
1554
|
+
return Ot(A, null), A;
|
|
1555
|
+
i === void 0 && (i = Ks(s ? e : "<!>" + e), r || (i = /* @__PURE__ */ dt(i)));
|
|
1556
|
+
var l = n || Ln ? document.importNode(i, !0) : i.cloneNode(!0);
|
|
1557
|
+
if (r) {
|
|
1558
|
+
var o = /* @__PURE__ */ dt(l), u = l.lastChild;
|
|
1559
|
+
Ot(o, u);
|
|
1560
|
+
} else Ot(l, l);
|
|
1561
|
+
return l;
|
|
1922
1562
|
};
|
|
1923
1563
|
}
|
|
1924
|
-
function
|
|
1925
|
-
if (
|
|
1926
|
-
var r =
|
|
1927
|
-
|
|
1928
|
-
E
|
|
1929
|
-
);
|
|
1930
|
-
((r.f & Ze) === 0 || r.nodes.end === null) && (r.nodes.end = N), kr();
|
|
1564
|
+
function qe(e, t) {
|
|
1565
|
+
if (N) {
|
|
1566
|
+
var r = E;
|
|
1567
|
+
(!(r.f & 32768) || r.nodes.end === null) && (r.nodes.end = A), _r();
|
|
1931
1568
|
return;
|
|
1932
1569
|
}
|
|
1933
|
-
e !== null && e.before(
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1570
|
+
e !== null && e.before(t);
|
|
1571
|
+
}
|
|
1572
|
+
var Js = [
|
|
1573
|
+
"allowfullscreen",
|
|
1574
|
+
"async",
|
|
1575
|
+
"autofocus",
|
|
1576
|
+
"autoplay",
|
|
1577
|
+
"checked",
|
|
1578
|
+
"controls",
|
|
1579
|
+
"default",
|
|
1580
|
+
"disabled",
|
|
1581
|
+
"formnovalidate",
|
|
1582
|
+
"indeterminate",
|
|
1583
|
+
"inert",
|
|
1584
|
+
"ismap",
|
|
1585
|
+
"loop",
|
|
1586
|
+
"multiple",
|
|
1587
|
+
"muted",
|
|
1588
|
+
"nomodule",
|
|
1589
|
+
"novalidate",
|
|
1590
|
+
"open",
|
|
1591
|
+
"playsinline",
|
|
1592
|
+
"readonly",
|
|
1593
|
+
"required",
|
|
1594
|
+
"reversed",
|
|
1595
|
+
"seamless",
|
|
1596
|
+
"selected",
|
|
1597
|
+
"webkitdirectory",
|
|
1598
|
+
"defer",
|
|
1599
|
+
"disablepictureinpicture",
|
|
1600
|
+
"disableremoteplayback"
|
|
1601
|
+
], Wa = [
|
|
1602
|
+
...Js,
|
|
1603
|
+
"formNoValidate",
|
|
1604
|
+
"isMap",
|
|
1605
|
+
"noModule",
|
|
1606
|
+
"playsInline",
|
|
1607
|
+
"readOnly",
|
|
1608
|
+
"value",
|
|
1609
|
+
"volume",
|
|
1610
|
+
"defaultValue",
|
|
1611
|
+
"defaultChecked",
|
|
1612
|
+
"srcObject",
|
|
1613
|
+
"noValidate",
|
|
1614
|
+
"allowFullscreen",
|
|
1615
|
+
"disablePictureInPicture",
|
|
1616
|
+
"disableRemotePlayback"
|
|
1617
|
+
], Xs = ["touchstart", "touchmove"];
|
|
1618
|
+
function Zs(e) {
|
|
1619
|
+
return Xs.includes(e);
|
|
1620
|
+
}
|
|
1621
|
+
var Qs = [
|
|
1622
|
+
"$state",
|
|
1623
|
+
"$state.raw",
|
|
1624
|
+
"$derived",
|
|
1625
|
+
"$derived.by"
|
|
1626
|
+
], Ba = [
|
|
1627
|
+
...Qs,
|
|
1628
|
+
"$state.eager",
|
|
1629
|
+
"$state.snapshot",
|
|
1630
|
+
"$props",
|
|
1631
|
+
"$props.id",
|
|
1632
|
+
"$bindable",
|
|
1633
|
+
"$effect",
|
|
1634
|
+
"$effect.pre",
|
|
1635
|
+
"$effect.tracking",
|
|
1636
|
+
"$effect.root",
|
|
1637
|
+
"$effect.pending",
|
|
1638
|
+
"$inspect",
|
|
1639
|
+
"$inspect().with",
|
|
1640
|
+
"$inspect.trace",
|
|
1641
|
+
"$host"
|
|
1642
|
+
], Hr = !0;
|
|
1643
|
+
function ea(e, t) {
|
|
1943
1644
|
var r = t == null ? "" : typeof t == "object" ? `${t}` : t;
|
|
1944
1645
|
r !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = r, e.nodeValue = `${r}`);
|
|
1945
1646
|
}
|
|
1946
|
-
function
|
|
1947
|
-
return
|
|
1647
|
+
function ti(e, t) {
|
|
1648
|
+
return ri(e, t);
|
|
1948
1649
|
}
|
|
1949
|
-
function
|
|
1950
|
-
|
|
1951
|
-
const r = t.target,
|
|
1650
|
+
function ta(e, t) {
|
|
1651
|
+
fr(), t.intro = t.intro ?? !1;
|
|
1652
|
+
const r = t.target, n = N, i = A;
|
|
1952
1653
|
try {
|
|
1953
|
-
for (var s = /* @__PURE__ */
|
|
1954
|
-
s
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
} catch (o) {
|
|
1966
|
-
if (o instanceof Error && o.message.split(`
|
|
1967
|
-
`).some((a) => a.startsWith("https://svelte.dev/e/")))
|
|
1968
|
-
throw o;
|
|
1969
|
-
return o !== dt && console.warn("Failed to hydrate: ", o), t.recover === !1 && Wi(), br(), Ts(r), nt(!1), ri(e, t);
|
|
1654
|
+
for (var s = /* @__PURE__ */ dt(r); s && (s.nodeType !== 8 || s.data !== "["); ) s = /* @__PURE__ */ $e(s);
|
|
1655
|
+
if (!s) throw He;
|
|
1656
|
+
Ge(!0), ae(s);
|
|
1657
|
+
const l = ri(e, {
|
|
1658
|
+
...t,
|
|
1659
|
+
anchor: s
|
|
1660
|
+
});
|
|
1661
|
+
return Ge(!1), l;
|
|
1662
|
+
} catch (l) {
|
|
1663
|
+
if (l instanceof Error && l.message.split(`
|
|
1664
|
+
`).some((o) => o.startsWith("https://svelte.dev/e/"))) throw l;
|
|
1665
|
+
return l !== He && console.warn("Failed to hydrate: ", l), t.recover === !1 && Ji(), fr(), Ps(r), Ge(!1), ti(e, t);
|
|
1970
1666
|
} finally {
|
|
1971
|
-
|
|
1972
|
-
}
|
|
1973
|
-
}
|
|
1974
|
-
|
|
1975
|
-
function
|
|
1976
|
-
|
|
1977
|
-
var
|
|
1978
|
-
var
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
throw Qt(), dt;
|
|
1999
|
-
yn();
|
|
2000
|
-
},
|
|
2001
|
-
a
|
|
2002
|
-
);
|
|
2003
|
-
var h = /* @__PURE__ */ new Set(), d = (v) => {
|
|
2004
|
-
for (var g = 0; g < v.length; g++) {
|
|
2005
|
-
var T = v[g];
|
|
2006
|
-
if (!h.has(T)) {
|
|
2007
|
-
h.add(T);
|
|
2008
|
-
var b = zs(T);
|
|
2009
|
-
for (const j of [t, document]) {
|
|
2010
|
-
var x = Ut.get(j);
|
|
2011
|
-
x === void 0 && (x = /* @__PURE__ */ new Map(), Ut.set(j, x));
|
|
2012
|
-
var R = x.get(T);
|
|
2013
|
-
R === void 0 ? (j.addEventListener(T, Jr, { passive: b }), x.set(T, 1)) : x.set(T, R + 1);
|
|
1667
|
+
Ge(n), ae(i);
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
var Rt = /* @__PURE__ */ new Map();
|
|
1671
|
+
function ri(e, { target: t, anchor: r, props: n = {}, events: i, context: s, intro: l = !0, transformError: o }) {
|
|
1672
|
+
fr();
|
|
1673
|
+
var u = void 0, h = Us(() => {
|
|
1674
|
+
var w = r ?? t.appendChild(Ne());
|
|
1675
|
+
ps(w, { pending: () => {
|
|
1676
|
+
} }, (d) => {
|
|
1677
|
+
dn({});
|
|
1678
|
+
var v = I;
|
|
1679
|
+
if (s && (v.c = s), i && (n.$$events = i), N && Ot(d, null), Hr = l, u = e(d, n) || {}, Hr = !0, N && (E.nodes.end = A, A === null || A.nodeType !== 8 || A.data !== "]"))
|
|
1680
|
+
throw qt(), He;
|
|
1681
|
+
vn();
|
|
1682
|
+
}, o);
|
|
1683
|
+
var _ = /* @__PURE__ */ new Set(), f = (d) => {
|
|
1684
|
+
for (var v = 0; v < d.length; v++) {
|
|
1685
|
+
var g = d[v];
|
|
1686
|
+
if (!_.has(g)) {
|
|
1687
|
+
_.add(g);
|
|
1688
|
+
var y = Zs(g);
|
|
1689
|
+
for (const C of [t, document]) {
|
|
1690
|
+
var x = Rt.get(C);
|
|
1691
|
+
x === void 0 && (x = /* @__PURE__ */ new Map(), Rt.set(C, x));
|
|
1692
|
+
var U = x.get(g);
|
|
1693
|
+
U === void 0 ? (C.addEventListener(g, Gr, { passive: y }), x.set(g, 1)) : x.set(g, U + 1);
|
|
2014
1694
|
}
|
|
2015
1695
|
}
|
|
2016
1696
|
}
|
|
2017
1697
|
};
|
|
2018
|
-
return
|
|
2019
|
-
for (var
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
), T = (
|
|
2025
|
-
/** @type {number} */
|
|
2026
|
-
g.get(v)
|
|
2027
|
-
);
|
|
2028
|
-
--T == 0 ? (b.removeEventListener(v, Jr), g.delete(v), g.size === 0 && Ut.delete(b)) : g.set(v, T);
|
|
2029
|
-
}
|
|
2030
|
-
Kr.delete(d), _ !== r && _.parentNode?.removeChild(_);
|
|
1698
|
+
return f(Ri(Gs)), qr.add(f), () => {
|
|
1699
|
+
for (var d of _) for (const y of [t, document]) {
|
|
1700
|
+
var v = Rt.get(y), g = v.get(d);
|
|
1701
|
+
--g == 0 ? (y.removeEventListener(d, Gr), v.delete(d), v.size === 0 && Rt.delete(y)) : v.set(d, g);
|
|
1702
|
+
}
|
|
1703
|
+
qr.delete(f), w !== r && w.parentNode?.removeChild(w);
|
|
2031
1704
|
};
|
|
2032
1705
|
});
|
|
2033
|
-
return
|
|
2034
|
-
}
|
|
2035
|
-
|
|
2036
|
-
function
|
|
2037
|
-
const r =
|
|
2038
|
-
return r ? (
|
|
2039
|
-
}
|
|
2040
|
-
var
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
*/
|
|
2046
|
-
constructor(t, r = !0) {
|
|
2047
|
-
/** @type {TemplateNode} */
|
|
2048
|
-
k(this, "anchor");
|
|
2049
|
-
/** @type {Map<Batch, Key>} */
|
|
2050
|
-
y(this, oe, /* @__PURE__ */ new Map());
|
|
2051
|
-
/**
|
|
2052
|
-
* Map of keys to effects that are currently rendered in the DOM.
|
|
2053
|
-
* These effects are visible and actively part of the document tree.
|
|
2054
|
-
* Example:
|
|
2055
|
-
* ```
|
|
2056
|
-
* {#if condition}
|
|
2057
|
-
* foo
|
|
2058
|
-
* {:else}
|
|
2059
|
-
* bar
|
|
2060
|
-
* {/if}
|
|
2061
|
-
* ```
|
|
2062
|
-
* Can result in the entries `true->Effect` and `false->Effect`
|
|
2063
|
-
* @type {Map<Key, Effect>}
|
|
2064
|
-
*/
|
|
2065
|
-
y(this, _e, /* @__PURE__ */ new Map());
|
|
2066
|
-
/**
|
|
2067
|
-
* Similar to #onscreen with respect to the keys, but contains branches that are not yet
|
|
2068
|
-
* in the DOM, because their insertion is deferred.
|
|
2069
|
-
* @type {Map<Key, Branch>}
|
|
2070
|
-
*/
|
|
2071
|
-
y(this, X, /* @__PURE__ */ new Map());
|
|
2072
|
-
/**
|
|
2073
|
-
* Keys of effects that are currently outroing
|
|
2074
|
-
* @type {Set<Key>}
|
|
2075
|
-
*/
|
|
2076
|
-
y(this, Ve, /* @__PURE__ */ new Set());
|
|
2077
|
-
/**
|
|
2078
|
-
* Whether to pause (i.e. outro) on change, or destroy immediately.
|
|
2079
|
-
* This is necessary for `<svelte:element>`
|
|
2080
|
-
*/
|
|
2081
|
-
y(this, kt, !0);
|
|
2082
|
-
/**
|
|
2083
|
-
* @param {Batch} batch
|
|
2084
|
-
*/
|
|
2085
|
-
y(this, St, (t) => {
|
|
2086
|
-
if (l(this, oe).has(t)) {
|
|
2087
|
-
var r = (
|
|
2088
|
-
/** @type {Key} */
|
|
2089
|
-
l(this, oe).get(t)
|
|
2090
|
-
), i = l(this, _e).get(r);
|
|
1706
|
+
return ur.set(u, h), u;
|
|
1707
|
+
}
|
|
1708
|
+
var ur = /* @__PURE__ */ new WeakMap();
|
|
1709
|
+
function ra(e, t) {
|
|
1710
|
+
const r = ur.get(e);
|
|
1711
|
+
return r ? (ur.delete(e), r(t)) : Promise.resolve();
|
|
1712
|
+
}
|
|
1713
|
+
var ue = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), it = /* @__PURE__ */ new WeakMap(), er = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(), Vr = /* @__PURE__ */ new WeakMap(), na = class {
|
|
1714
|
+
constructor(e, t = !0) {
|
|
1715
|
+
$(this, "anchor", void 0), b(this, ue, /* @__PURE__ */ new Map()), b(this, _e, /* @__PURE__ */ new Map()), b(this, Z, /* @__PURE__ */ new Map()), b(this, it, /* @__PURE__ */ new Set()), b(this, er, !0), b(this, tr, (r) => {
|
|
1716
|
+
if (a(ue, this).has(r)) {
|
|
1717
|
+
var n = a(ue, this).get(r), i = a(_e, this).get(n);
|
|
2091
1718
|
if (i)
|
|
2092
|
-
|
|
1719
|
+
Fs(i), a(it, this).delete(n);
|
|
2093
1720
|
else {
|
|
2094
|
-
var
|
|
2095
|
-
|
|
1721
|
+
var s = a(Z, this).get(n);
|
|
1722
|
+
s && (a(_e, this).set(n, s.effect), a(Z, this).delete(n), s.fragment.lastChild.remove(), this.anchor.before(s.fragment), i = s.effect);
|
|
2096
1723
|
}
|
|
2097
|
-
for (const [
|
|
2098
|
-
if (
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
a && (V(a.effect), l(this, X).delete(o));
|
|
1724
|
+
for (const [l, o] of a(ue, this)) {
|
|
1725
|
+
if (a(ue, this).delete(l), l === r) break;
|
|
1726
|
+
const u = a(Z, this).get(o);
|
|
1727
|
+
u && (q(u.effect), a(Z, this).delete(o));
|
|
2102
1728
|
}
|
|
2103
|
-
for (const [
|
|
2104
|
-
if (
|
|
2105
|
-
const
|
|
2106
|
-
if (Array.from(
|
|
2107
|
-
var
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
1729
|
+
for (const [l, o] of a(_e, this)) {
|
|
1730
|
+
if (l === n || a(it, this).has(l)) continue;
|
|
1731
|
+
const u = () => {
|
|
1732
|
+
if (Array.from(a(ue, this).values()).includes(l)) {
|
|
1733
|
+
var h = document.createDocumentFragment();
|
|
1734
|
+
Hn(o, h), h.append(Ne()), a(Z, this).set(l, {
|
|
1735
|
+
effect: o,
|
|
1736
|
+
fragment: h
|
|
1737
|
+
});
|
|
1738
|
+
} else q(o);
|
|
1739
|
+
a(it, this).delete(l), a(_e, this).delete(l);
|
|
2112
1740
|
};
|
|
2113
|
-
|
|
1741
|
+
a(er, this) || !i ? (a(it, this).add(l), wt(o, u, !1)) : u();
|
|
2114
1742
|
}
|
|
2115
1743
|
}
|
|
2116
|
-
})
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
/** @type {Batch} */
|
|
2136
|
-
I
|
|
2137
|
-
), n = Cs();
|
|
2138
|
-
if (r && !l(this, _e).has(t) && !l(this, X).has(t))
|
|
2139
|
-
if (n) {
|
|
2140
|
-
var s = document.createDocumentFragment(), o = Xe();
|
|
2141
|
-
s.append(o), l(this, X).set(t, {
|
|
2142
|
-
effect: Ee(() => r(o)),
|
|
2143
|
-
fragment: s
|
|
2144
|
-
});
|
|
2145
|
-
} else
|
|
2146
|
-
l(this, _e).set(
|
|
2147
|
-
t,
|
|
2148
|
-
Ee(() => r(this.anchor))
|
|
2149
|
-
);
|
|
2150
|
-
if (l(this, oe).set(i, t), n) {
|
|
2151
|
-
for (const [a, f] of l(this, _e))
|
|
2152
|
-
a === t ? i.unskip_effect(f) : i.skip_effect(f);
|
|
2153
|
-
for (const [a, f] of l(this, X))
|
|
2154
|
-
a === t ? i.unskip_effect(f.effect) : i.skip_effect(f.effect);
|
|
2155
|
-
i.oncommit(l(this, St)), i.ondiscard(l(this, Xt));
|
|
1744
|
+
}), b(this, Vr, (r) => {
|
|
1745
|
+
a(ue, this).delete(r);
|
|
1746
|
+
const n = Array.from(a(ue, this).values());
|
|
1747
|
+
for (const [i, s] of a(Z, this)) n.includes(i) || (q(s.effect), a(Z, this).delete(i));
|
|
1748
|
+
}), this.anchor = e, m(er, this, t);
|
|
1749
|
+
}
|
|
1750
|
+
ensure(e, t) {
|
|
1751
|
+
var r = M, n = Is();
|
|
1752
|
+
if (t && !a(_e, this).has(e) && !a(Z, this).has(e)) if (n) {
|
|
1753
|
+
var i = document.createDocumentFragment(), s = Ne();
|
|
1754
|
+
i.append(s), a(Z, this).set(e, {
|
|
1755
|
+
effect: he(() => t(s)),
|
|
1756
|
+
fragment: i
|
|
1757
|
+
});
|
|
1758
|
+
} else a(_e, this).set(e, he(() => t(this.anchor)));
|
|
1759
|
+
if (a(ue, this).set(r, e), n) {
|
|
1760
|
+
for (const [l, o] of a(_e, this)) l === e ? r.unskip_effect(o) : r.skip_effect(o);
|
|
1761
|
+
for (const [l, o] of a(Z, this)) l === e ? r.unskip_effect(o.effect) : r.skip_effect(o.effect);
|
|
1762
|
+
r.oncommit(a(tr, this)), r.ondiscard(a(Vr, this));
|
|
2156
1763
|
} else
|
|
2157
|
-
|
|
1764
|
+
N && (this.anchor = A), a(tr, this).call(this, r);
|
|
2158
1765
|
}
|
|
1766
|
+
};
|
|
1767
|
+
function ia(e) {
|
|
1768
|
+
I === null && qi("onMount"), _t && I.l !== null ? sa(I).m.push(e) : ze(() => {
|
|
1769
|
+
const t = Gt(e);
|
|
1770
|
+
if (typeof t == "function") return t;
|
|
1771
|
+
});
|
|
2159
1772
|
}
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
t
|
|
2167
|
-
);
|
|
1773
|
+
function sa(e) {
|
|
1774
|
+
var t = e.l;
|
|
1775
|
+
return t.u ?? (t.u = {
|
|
1776
|
+
a: [],
|
|
1777
|
+
b: [],
|
|
1778
|
+
m: []
|
|
2168
1779
|
});
|
|
2169
1780
|
}
|
|
2170
|
-
function
|
|
2171
|
-
var
|
|
2172
|
-
|
|
2173
|
-
var
|
|
2174
|
-
function o
|
|
2175
|
-
if (
|
|
2176
|
-
var
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
if (a !== parseInt(u.substring(1))) {
|
|
2181
|
-
var _ = vn();
|
|
2182
|
-
pe(_), n.anchor = _, nt(!1), n.ensure(a, f), nt(!0);
|
|
1781
|
+
function At(e, t, r = !1) {
|
|
1782
|
+
var n;
|
|
1783
|
+
N && (n = A, _r());
|
|
1784
|
+
var i = new na(e), s = r ? hr : 0;
|
|
1785
|
+
function l(o, u) {
|
|
1786
|
+
if (N) {
|
|
1787
|
+
var h = is(n);
|
|
1788
|
+
if (o !== parseInt(h.substring(1))) {
|
|
1789
|
+
var w = fn();
|
|
1790
|
+
ae(w), i.anchor = w, Ge(!1), i.ensure(o, u), Ge(!0);
|
|
2183
1791
|
return;
|
|
2184
1792
|
}
|
|
2185
1793
|
}
|
|
2186
|
-
|
|
1794
|
+
i.ensure(o, u);
|
|
2187
1795
|
}
|
|
2188
|
-
|
|
2189
|
-
var
|
|
2190
|
-
t((
|
|
2191
|
-
|
|
2192
|
-
}),
|
|
1796
|
+
Fn(() => {
|
|
1797
|
+
var o = !1;
|
|
1798
|
+
t((u, h = 0) => {
|
|
1799
|
+
o = !0, l(h, u);
|
|
1800
|
+
}), o || l(-1, null);
|
|
2193
1801
|
}, s);
|
|
2194
1802
|
}
|
|
2195
|
-
function
|
|
2196
|
-
|
|
2197
|
-
var r = e.getRootNode(),
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
r
|
|
2202
|
-
) : (
|
|
2203
|
-
/** @type {Document} */
|
|
2204
|
-
r.head ?? /** @type {Document} */
|
|
2205
|
-
r.ownerDocument.head
|
|
2206
|
-
)
|
|
2207
|
-
);
|
|
2208
|
-
if (!i.querySelector("#" + t.hash)) {
|
|
2209
|
-
const n = Nr("style");
|
|
2210
|
-
n.id = t.hash, n.textContent = t.code, i.appendChild(n);
|
|
1803
|
+
function aa(e, t) {
|
|
1804
|
+
Bn(() => {
|
|
1805
|
+
var r = e.getRootNode(), n = r.host ? r : r.head ?? r.ownerDocument.head;
|
|
1806
|
+
if (!n.querySelector("#" + t.hash)) {
|
|
1807
|
+
const i = br("style");
|
|
1808
|
+
i.id = t.hash, i.textContent = t.code, n.appendChild(i);
|
|
2211
1809
|
}
|
|
2212
1810
|
});
|
|
2213
1811
|
}
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
1812
|
+
var Fa = [...`
|
|
1813
|
+
\r\f \v\uFEFF`], oa = Symbol("is custom element"), la = Symbol("is html"), fa = zi ? "link" : "LINK";
|
|
1814
|
+
function Kr(e, t, r, n) {
|
|
1815
|
+
var i = ua(e);
|
|
1816
|
+
if (N && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === fa)) {
|
|
1817
|
+
n || void 0;
|
|
1818
|
+
return;
|
|
1819
|
+
}
|
|
1820
|
+
i[t] !== (i[t] = r) && (t === "loading" && (e[Bi] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && ca(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
|
|
2218
1821
|
}
|
|
2219
|
-
function
|
|
2220
|
-
return (
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
);
|
|
2228
|
-
}
|
|
2229
|
-
var Zr = /* @__PURE__ */ new Map();
|
|
2230
|
-
function Qs(e) {
|
|
2231
|
-
var t = e.getAttribute("is") || e.nodeName, r = Zr.get(t);
|
|
1822
|
+
function ua(e) {
|
|
1823
|
+
return e.__attributes ?? (e.__attributes = {
|
|
1824
|
+
[oa]: e.nodeName.includes("-"),
|
|
1825
|
+
[la]: e.namespaceURI === "http://www.w3.org/1999/xhtml"
|
|
1826
|
+
});
|
|
1827
|
+
}
|
|
1828
|
+
var Jr = /* @__PURE__ */ new Map();
|
|
1829
|
+
function ca(e) {
|
|
1830
|
+
var t = e.getAttribute("is") || e.nodeName, r = Jr.get(t);
|
|
2232
1831
|
if (r) return r;
|
|
2233
|
-
|
|
2234
|
-
for (var
|
|
2235
|
-
|
|
2236
|
-
for (var
|
|
2237
|
-
|
|
2238
|
-
n = dn(n);
|
|
1832
|
+
Jr.set(t, r = []);
|
|
1833
|
+
for (var n, i = e, s = Element.prototype; s !== i; ) {
|
|
1834
|
+
n = Ai(i);
|
|
1835
|
+
for (var l in n) n[l].set && r.push(l);
|
|
1836
|
+
i = an(i);
|
|
2239
1837
|
}
|
|
2240
1838
|
return r;
|
|
2241
1839
|
}
|
|
2242
|
-
|
|
2243
|
-
|
|
1840
|
+
var ni, Ye = /* @__PURE__ */ new WeakMap(), zt = /* @__PURE__ */ new WeakMap(), rr = /* @__PURE__ */ new WeakMap(), Xr = /* @__PURE__ */ new WeakSet(), ii = class {
|
|
1841
|
+
constructor(e) {
|
|
1842
|
+
gr(this, Xr), b(this, Ye, /* @__PURE__ */ new WeakMap()), b(this, zt, void 0), b(this, rr, void 0), m(rr, this, e);
|
|
1843
|
+
}
|
|
1844
|
+
observe(e, t) {
|
|
1845
|
+
var r = a(Ye, this).get(e) || /* @__PURE__ */ new Set();
|
|
1846
|
+
return r.add(t), a(Ye, this).set(e, r), R(Xr, this, da).call(this).observe(e, a(rr, this)), () => {
|
|
1847
|
+
var n = a(Ye, this).get(e);
|
|
1848
|
+
n.delete(t), n.size === 0 && (a(Ye, this).delete(e), a(zt, this).unobserve(e));
|
|
1849
|
+
};
|
|
1850
|
+
}
|
|
1851
|
+
};
|
|
1852
|
+
ni = ii;
|
|
1853
|
+
function da() {
|
|
1854
|
+
return a(zt, this) ?? m(zt, this, new ResizeObserver((e) => {
|
|
1855
|
+
for (var t of e) {
|
|
1856
|
+
ni.entries.set(t.target, t);
|
|
1857
|
+
for (var r of a(Ye, this).get(t.target) || []) r(t);
|
|
1858
|
+
}
|
|
1859
|
+
}));
|
|
2244
1860
|
}
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
1861
|
+
$(ii, "entries", /* @__PURE__ */ new WeakMap());
|
|
1862
|
+
function Zr(e, t) {
|
|
1863
|
+
return e === t || e?.[at] === t;
|
|
1864
|
+
}
|
|
1865
|
+
function nr(e = {}, t, r, n) {
|
|
1866
|
+
var i = I.r, s = E;
|
|
1867
|
+
return Bn(() => {
|
|
1868
|
+
var l, o;
|
|
1869
|
+
return Er(() => {
|
|
1870
|
+
l = o, o = n?.() || [], Gt(() => {
|
|
1871
|
+
e !== r(...o) && (t(e, ...o), l && Zr(r(...l), e) && t(null, ...l));
|
|
2251
1872
|
});
|
|
2252
1873
|
}), () => {
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
1874
|
+
let u = s;
|
|
1875
|
+
for (; u !== i && u.parent !== null && u.parent.f & 33554432; ) u = u.parent;
|
|
1876
|
+
const h = () => {
|
|
1877
|
+
o && Zr(r(...o), e) && t(null, ...o);
|
|
1878
|
+
}, w = u.teardown;
|
|
1879
|
+
u.teardown = () => {
|
|
1880
|
+
h(), w?.();
|
|
1881
|
+
};
|
|
2256
1882
|
};
|
|
2257
1883
|
}), e;
|
|
2258
1884
|
}
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
function bt(e, t, r, i) {
|
|
2269
|
-
var n = (r & ki) !== 0, s = (r & Si) !== 0, o = (
|
|
2270
|
-
/** @type {V} */
|
|
2271
|
-
i
|
|
2272
|
-
), a = !0, f = () => (a && (a = !1, o = s ? rr(
|
|
2273
|
-
/** @type {() => V} */
|
|
2274
|
-
i
|
|
2275
|
-
) : (
|
|
2276
|
-
/** @type {V} */
|
|
2277
|
-
i
|
|
2278
|
-
)), o), u;
|
|
2279
|
-
if (n) {
|
|
2280
|
-
var _ = $t in e || _n in e;
|
|
2281
|
-
u = Ye(e, t)?.set ?? (_ && t in e ? (R) => e[t] = R : void 0);
|
|
2282
|
-
}
|
|
2283
|
-
var h, d = !1;
|
|
2284
|
-
n ? [h, d] = el(() => (
|
|
2285
|
-
/** @type {V} */
|
|
2286
|
-
e[t]
|
|
2287
|
-
)) : h = /** @type {V} */
|
|
2288
|
-
e[t], h === void 0 && i !== void 0 && (h = f(), u && (Ji(), u(h)));
|
|
1885
|
+
function st(e, t, r, n) {
|
|
1886
|
+
var i = !_t || (r & 2) !== 0, s = (r & 8) !== 0, l = (r & 16) !== 0, o = n, u = !0, h = () => (u && (u = !1, o = l ? Gt(n) : n), o);
|
|
1887
|
+
let w;
|
|
1888
|
+
if (s) {
|
|
1889
|
+
var _ = at in e || ln in e;
|
|
1890
|
+
w = Ae(e, t)?.set ?? (_ && t in e ? (C) => e[t] = C : void 0);
|
|
1891
|
+
}
|
|
1892
|
+
var f, d = !1;
|
|
1893
|
+
s ? [f, d] = us(() => e[t]) : f = e[t], f === void 0 && n !== void 0 && (f = h(), w && (i && Xi(t), w(f)));
|
|
2289
1894
|
var v;
|
|
2290
|
-
if (v = () => {
|
|
2291
|
-
var
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
return
|
|
2296
|
-
}, (r &
|
|
2297
|
-
|
|
2298
|
-
if (u) {
|
|
1895
|
+
if (i ? v = () => {
|
|
1896
|
+
var C = e[t];
|
|
1897
|
+
return C === void 0 ? h() : (u = !0, C);
|
|
1898
|
+
} : v = () => {
|
|
1899
|
+
var C = e[t];
|
|
1900
|
+
return C !== void 0 && (o = void 0), C === void 0 ? o : C;
|
|
1901
|
+
}, i && !(r & 4)) return v;
|
|
1902
|
+
if (w) {
|
|
2299
1903
|
var g = e.$$legacy;
|
|
2300
|
-
return (
|
|
2301
|
-
|
|
2302
|
-
(function(R, j) {
|
|
2303
|
-
return arguments.length > 0 ? ((!j || g || d) && u(j ? v() : R), R) : v();
|
|
2304
|
-
})
|
|
2305
|
-
);
|
|
2306
|
-
}
|
|
2307
|
-
var T = !1, b = ((r & Ri) !== 0 ? tr : ws)(() => (T = !1, v()));
|
|
2308
|
-
n && c(b);
|
|
2309
|
-
var x = (
|
|
2310
|
-
/** @type {Effect} */
|
|
2311
|
-
E
|
|
2312
|
-
);
|
|
2313
|
-
return (
|
|
2314
|
-
/** @type {() => V} */
|
|
2315
|
-
(function(R, j) {
|
|
2316
|
-
if (arguments.length > 0) {
|
|
2317
|
-
const me = j ? c(b) : n ? je(R) : R;
|
|
2318
|
-
return $(b, me), T = !0, o !== void 0 && (o = me), R;
|
|
2319
|
-
}
|
|
2320
|
-
return Pe && T || (x.f & Ae) !== 0 ? b.v : c(b);
|
|
2321
|
-
})
|
|
2322
|
-
);
|
|
2323
|
-
}
|
|
2324
|
-
function tl(e) {
|
|
2325
|
-
return new rl(e);
|
|
2326
|
-
}
|
|
2327
|
-
var Re, ee;
|
|
2328
|
-
class rl {
|
|
2329
|
-
/**
|
|
2330
|
-
* @param {ComponentConstructorOptions & {
|
|
2331
|
-
* component: any;
|
|
2332
|
-
* }} options
|
|
2333
|
-
*/
|
|
2334
|
-
constructor(t) {
|
|
2335
|
-
/** @type {any} */
|
|
2336
|
-
y(this, Re);
|
|
2337
|
-
/** @type {Record<string, any>} */
|
|
2338
|
-
y(this, ee);
|
|
2339
|
-
var r = /* @__PURE__ */ new Map(), i = (s, o) => {
|
|
2340
|
-
var a = /* @__PURE__ */ $s(o, !1, !1);
|
|
2341
|
-
return r.set(s, a), a;
|
|
1904
|
+
return function(C, j) {
|
|
1905
|
+
return arguments.length > 0 ? ((!i || !j || g || d) && w(j ? v() : C), C) : v();
|
|
2342
1906
|
};
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
1907
|
+
}
|
|
1908
|
+
var y = !1, x = (r & 1 ? Yt : Rn)(() => (y = !1, v()));
|
|
1909
|
+
s && c(x);
|
|
1910
|
+
var U = E;
|
|
1911
|
+
return function(C, j) {
|
|
1912
|
+
if (arguments.length > 0) {
|
|
1913
|
+
const Ee = j ? c(x) : i && s ? Me(C) : C;
|
|
1914
|
+
return T(x, Ee), y = !0, o !== void 0 && (o = Ee), C;
|
|
1915
|
+
}
|
|
1916
|
+
return be && y || U.f & 16384 ? x.v : c(x);
|
|
1917
|
+
};
|
|
1918
|
+
}
|
|
1919
|
+
function va(e) {
|
|
1920
|
+
return new ha(e);
|
|
1921
|
+
}
|
|
1922
|
+
var Se = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), ha = class {
|
|
1923
|
+
constructor(e) {
|
|
1924
|
+
b(this, Se, void 0), b(this, ne, void 0);
|
|
1925
|
+
var t = /* @__PURE__ */ new Map(), r = (i, s) => {
|
|
1926
|
+
var l = /* @__PURE__ */ xs(s, !1, !1);
|
|
1927
|
+
return t.set(i, l), l;
|
|
1928
|
+
};
|
|
1929
|
+
const n = new Proxy({
|
|
1930
|
+
...e.props || {},
|
|
1931
|
+
$$events: {}
|
|
1932
|
+
}, {
|
|
1933
|
+
get(i, s) {
|
|
1934
|
+
return c(t.get(s) ?? r(s, Reflect.get(i, s)));
|
|
1935
|
+
},
|
|
1936
|
+
has(i, s) {
|
|
1937
|
+
return s === ln ? !0 : (c(t.get(s) ?? r(s, Reflect.get(i, s))), Reflect.has(i, s));
|
|
1938
|
+
},
|
|
1939
|
+
set(i, s, l) {
|
|
1940
|
+
return T(t.get(s) ?? r(s, l), l), Reflect.set(i, s, l);
|
|
2355
1941
|
}
|
|
2356
|
-
);
|
|
2357
|
-
|
|
2358
|
-
target:
|
|
2359
|
-
anchor:
|
|
1942
|
+
});
|
|
1943
|
+
m(ne, this, (e.hydrate ? ta : ti)(e.component, {
|
|
1944
|
+
target: e.target,
|
|
1945
|
+
anchor: e.anchor,
|
|
2360
1946
|
props: n,
|
|
2361
|
-
context:
|
|
2362
|
-
intro:
|
|
2363
|
-
recover:
|
|
2364
|
-
transformError:
|
|
2365
|
-
})), (!
|
|
2366
|
-
for (const
|
|
2367
|
-
|
|
1947
|
+
context: e.context,
|
|
1948
|
+
intro: e.intro ?? !1,
|
|
1949
|
+
recover: e.recover,
|
|
1950
|
+
transformError: e.transformError
|
|
1951
|
+
})), !me && (!e?.props?.$$host || e.sync === !1) && Be(), m(Se, this, n.$$events);
|
|
1952
|
+
for (const i of Object.keys(a(ne, this)))
|
|
1953
|
+
i === "$set" || i === "$destroy" || i === "$on" || Dt(this, i, {
|
|
2368
1954
|
get() {
|
|
2369
|
-
return
|
|
1955
|
+
return a(ne, this)[i];
|
|
2370
1956
|
},
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
l(this, ee)[s] = o;
|
|
1957
|
+
set(s) {
|
|
1958
|
+
a(ne, this)[i] = s;
|
|
2374
1959
|
},
|
|
2375
1960
|
enumerable: !0
|
|
2376
1961
|
});
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
Gs(l(this, ee));
|
|
1962
|
+
a(ne, this).$set = (i) => {
|
|
1963
|
+
Object.assign(n, i);
|
|
1964
|
+
}, a(ne, this).$destroy = () => {
|
|
1965
|
+
ra(a(ne, this));
|
|
2382
1966
|
};
|
|
2383
1967
|
}
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
*/
|
|
2393
|
-
$on(t, r) {
|
|
2394
|
-
l(this, Re)[t] = l(this, Re)[t] || [];
|
|
2395
|
-
const i = (...n) => r.call(this, ...n);
|
|
2396
|
-
return l(this, Re)[t].push(i), () => {
|
|
2397
|
-
l(this, Re)[t] = l(this, Re)[t].filter(
|
|
2398
|
-
/** @param {any} fn */
|
|
2399
|
-
(n) => n !== i
|
|
2400
|
-
);
|
|
1968
|
+
$set(e) {
|
|
1969
|
+
a(ne, this).$set(e);
|
|
1970
|
+
}
|
|
1971
|
+
$on(e, t) {
|
|
1972
|
+
a(Se, this)[e] = a(Se, this)[e] || [];
|
|
1973
|
+
const r = (...n) => t.call(this, ...n);
|
|
1974
|
+
return a(Se, this)[e].push(r), () => {
|
|
1975
|
+
a(Se, this)[e] = a(Se, this)[e].filter((n) => n !== r);
|
|
2401
1976
|
};
|
|
2402
1977
|
}
|
|
2403
1978
|
$destroy() {
|
|
2404
|
-
|
|
2405
|
-
}
|
|
2406
|
-
}
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
constructor(t, r, i) {
|
|
2416
|
-
super();
|
|
2417
|
-
/** The Svelte component constructor */
|
|
2418
|
-
k(this, "$$ctor");
|
|
2419
|
-
/** Slots */
|
|
2420
|
-
k(this, "$$s");
|
|
2421
|
-
/** @type {any} The Svelte component instance */
|
|
2422
|
-
k(this, "$$c");
|
|
2423
|
-
/** Whether or not the custom element is connected */
|
|
2424
|
-
k(this, "$$cn", !1);
|
|
2425
|
-
/** @type {Record<string, any>} Component props data */
|
|
2426
|
-
k(this, "$$d", {});
|
|
2427
|
-
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
2428
|
-
k(this, "$$r", !1);
|
|
2429
|
-
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
2430
|
-
k(this, "$$p_d", {});
|
|
2431
|
-
/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
|
|
2432
|
-
k(this, "$$l", {});
|
|
2433
|
-
/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
|
|
2434
|
-
k(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
2435
|
-
/** @type {any} The managed render effect for reflecting attributes */
|
|
2436
|
-
k(this, "$$me");
|
|
2437
|
-
/** @type {ShadowRoot | null} The ShadowRoot of the custom element */
|
|
2438
|
-
k(this, "$$shadowRoot", null);
|
|
2439
|
-
this.$$ctor = t, this.$$s = r, i && (this.$$shadowRoot = this.attachShadow(i));
|
|
2440
|
-
}
|
|
2441
|
-
/**
|
|
2442
|
-
* @param {string} type
|
|
2443
|
-
* @param {EventListenerOrEventListenerObject} listener
|
|
2444
|
-
* @param {boolean | AddEventListenerOptions} [options]
|
|
2445
|
-
*/
|
|
2446
|
-
addEventListener(t, r, i) {
|
|
2447
|
-
if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(r), this.$$c) {
|
|
2448
|
-
const n = this.$$c.$on(t, r);
|
|
2449
|
-
this.$$l_u.set(r, n);
|
|
1979
|
+
a(ne, this).$destroy();
|
|
1980
|
+
}
|
|
1981
|
+
}, si;
|
|
1982
|
+
typeof HTMLElement == "function" && (si = class extends HTMLElement {
|
|
1983
|
+
constructor(e, t, r) {
|
|
1984
|
+
super(), $(this, "$$ctor", void 0), $(this, "$$s", void 0), $(this, "$$c", void 0), $(this, "$$cn", !1), $(this, "$$d", {}), $(this, "$$r", !1), $(this, "$$p_d", {}), $(this, "$$l", {}), $(this, "$$l_u", /* @__PURE__ */ new Map()), $(this, "$$me", void 0), $(this, "$$shadowRoot", null), this.$$ctor = e, this.$$s = t, r && (this.$$shadowRoot = this.attachShadow(r));
|
|
1985
|
+
}
|
|
1986
|
+
addEventListener(e, t, r) {
|
|
1987
|
+
if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
|
|
1988
|
+
const n = this.$$c.$on(e, t);
|
|
1989
|
+
this.$$l_u.set(t, n);
|
|
2450
1990
|
}
|
|
2451
|
-
super.addEventListener(t, r
|
|
2452
|
-
}
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
*/
|
|
2458
|
-
removeEventListener(t, r, i) {
|
|
2459
|
-
if (super.removeEventListener(t, r, i), this.$$c) {
|
|
2460
|
-
const n = this.$$l_u.get(r);
|
|
2461
|
-
n && (n(), this.$$l_u.delete(r));
|
|
1991
|
+
super.addEventListener(e, t, r);
|
|
1992
|
+
}
|
|
1993
|
+
removeEventListener(e, t, r) {
|
|
1994
|
+
if (super.removeEventListener(e, t, r), this.$$c) {
|
|
1995
|
+
const n = this.$$l_u.get(t);
|
|
1996
|
+
n && (n(), this.$$l_u.delete(t));
|
|
2462
1997
|
}
|
|
2463
1998
|
}
|
|
2464
1999
|
async connectedCallback() {
|
|
2465
2000
|
if (this.$$cn = !0, !this.$$c) {
|
|
2466
|
-
let
|
|
2467
|
-
return (
|
|
2468
|
-
const
|
|
2469
|
-
n !== "default" && (
|
|
2001
|
+
let e = function(n) {
|
|
2002
|
+
return (i) => {
|
|
2003
|
+
const s = br("slot");
|
|
2004
|
+
n !== "default" && (s.name = n), qe(i, s);
|
|
2470
2005
|
};
|
|
2471
2006
|
};
|
|
2472
|
-
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
2473
|
-
|
|
2474
|
-
const r =
|
|
2475
|
-
for (const n of this.$$s)
|
|
2476
|
-
n in i && (n === "default" && !this.$$d.children ? (this.$$d.children = t(n), r.default = !0) : r[n] = t(n));
|
|
2007
|
+
if (await Promise.resolve(), !this.$$cn || this.$$c) return;
|
|
2008
|
+
const t = {}, r = _a(this);
|
|
2009
|
+
for (const n of this.$$s) n in r && (n === "default" && !this.$$d.children ? (this.$$d.children = e(n), t.default = !0) : t[n] = e(n));
|
|
2477
2010
|
for (const n of this.attributes) {
|
|
2478
|
-
const
|
|
2479
|
-
|
|
2011
|
+
const i = this.$$g_p(n.name);
|
|
2012
|
+
i in this.$$d || (this.$$d[i] = Lt(i, n.value, this.$$p_d, "toProp"));
|
|
2480
2013
|
}
|
|
2481
|
-
for (const n in this.$$p_d)
|
|
2482
|
-
|
|
2483
|
-
this.$$c = tl({
|
|
2014
|
+
for (const n in this.$$p_d) !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
|
|
2015
|
+
this.$$c = va({
|
|
2484
2016
|
component: this.$$ctor,
|
|
2485
2017
|
target: this.$$shadowRoot || this,
|
|
2486
2018
|
props: {
|
|
2487
2019
|
...this.$$d,
|
|
2488
|
-
$$slots:
|
|
2020
|
+
$$slots: t,
|
|
2489
2021
|
$$host: this
|
|
2490
2022
|
}
|
|
2491
|
-
}), this.$$me =
|
|
2492
|
-
|
|
2023
|
+
}), this.$$me = Ds(() => {
|
|
2024
|
+
Er(() => {
|
|
2493
2025
|
this.$$r = !0;
|
|
2494
|
-
for (const n of
|
|
2026
|
+
for (const n of Nt(this.$$c)) {
|
|
2495
2027
|
if (!this.$$p_d[n]?.reflect) continue;
|
|
2496
2028
|
this.$$d[n] = this.$$c[n];
|
|
2497
|
-
const
|
|
2498
|
-
|
|
2499
|
-
this.$$d[n],
|
|
2500
|
-
this.$$p_d,
|
|
2501
|
-
"toAttribute"
|
|
2502
|
-
);
|
|
2503
|
-
s == null ? this.removeAttribute(this.$$p_d[n].attribute || n) : this.setAttribute(this.$$p_d[n].attribute || n, s);
|
|
2029
|
+
const i = Lt(n, this.$$d[n], this.$$p_d, "toAttribute");
|
|
2030
|
+
i == null ? this.removeAttribute(this.$$p_d[n].attribute || n) : this.setAttribute(this.$$p_d[n].attribute || n, i);
|
|
2504
2031
|
}
|
|
2505
2032
|
this.$$r = !1;
|
|
2506
2033
|
});
|
|
2507
2034
|
});
|
|
2508
|
-
for (const n in this.$$l)
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
}
|
|
2035
|
+
for (const n in this.$$l) for (const i of this.$$l[n]) {
|
|
2036
|
+
const s = this.$$c.$on(n, i);
|
|
2037
|
+
this.$$l_u.set(i, s);
|
|
2038
|
+
}
|
|
2513
2039
|
this.$$l = {};
|
|
2514
2040
|
}
|
|
2515
2041
|
}
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
/**
|
|
2519
|
-
* @param {string} attr
|
|
2520
|
-
* @param {string} _oldValue
|
|
2521
|
-
* @param {string} newValue
|
|
2522
|
-
*/
|
|
2523
|
-
attributeChangedCallback(t, r, i) {
|
|
2524
|
-
this.$$r || (t = this.$$g_p(t), this.$$d[t] = Gt(t, i, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
|
|
2042
|
+
attributeChangedCallback(e, t, r) {
|
|
2043
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = Lt(e, r, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
|
|
2525
2044
|
}
|
|
2526
2045
|
disconnectedCallback() {
|
|
2527
2046
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
2528
2047
|
!this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
|
|
2529
2048
|
});
|
|
2530
2049
|
}
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
*/
|
|
2534
|
-
$$g_p(t) {
|
|
2535
|
-
return Vt(this.$$p_d).find(
|
|
2536
|
-
(r) => this.$$p_d[r].attribute === t || !this.$$p_d[r].attribute && r.toLowerCase() === t
|
|
2537
|
-
) || t;
|
|
2050
|
+
$$g_p(e) {
|
|
2051
|
+
return Nt(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
|
|
2538
2052
|
}
|
|
2539
2053
|
});
|
|
2540
|
-
function
|
|
2541
|
-
const
|
|
2542
|
-
if (t =
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
return t != null ? +t : t;
|
|
2566
|
-
default:
|
|
2567
|
-
return t;
|
|
2568
|
-
}
|
|
2054
|
+
function Lt(e, t, r, n) {
|
|
2055
|
+
const i = r[e]?.type;
|
|
2056
|
+
if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !n || !r[e]) return t;
|
|
2057
|
+
if (n === "toAttribute") switch (i) {
|
|
2058
|
+
case "Object":
|
|
2059
|
+
case "Array":
|
|
2060
|
+
return t == null ? null : JSON.stringify(t);
|
|
2061
|
+
case "Boolean":
|
|
2062
|
+
return t ? "" : null;
|
|
2063
|
+
case "Number":
|
|
2064
|
+
return t ?? null;
|
|
2065
|
+
default:
|
|
2066
|
+
return t;
|
|
2067
|
+
}
|
|
2068
|
+
else switch (i) {
|
|
2069
|
+
case "Object":
|
|
2070
|
+
case "Array":
|
|
2071
|
+
return t && JSON.parse(t);
|
|
2072
|
+
case "Boolean":
|
|
2073
|
+
return t;
|
|
2074
|
+
case "Number":
|
|
2075
|
+
return t != null ? +t : t;
|
|
2076
|
+
default:
|
|
2077
|
+
return t;
|
|
2078
|
+
}
|
|
2569
2079
|
}
|
|
2570
|
-
function
|
|
2080
|
+
function _a(e) {
|
|
2571
2081
|
const t = {};
|
|
2572
2082
|
return e.childNodes.forEach((r) => {
|
|
2573
|
-
t[
|
|
2574
|
-
/** @type {Element} node */
|
|
2575
|
-
r.slot || "default"
|
|
2576
|
-
] = !0;
|
|
2083
|
+
t[r.slot || "default"] = !0;
|
|
2577
2084
|
}), t;
|
|
2578
2085
|
}
|
|
2579
|
-
function
|
|
2580
|
-
let
|
|
2086
|
+
function pa(e, t, r, n, i, s) {
|
|
2087
|
+
let l = class extends si {
|
|
2581
2088
|
constructor() {
|
|
2582
|
-
super(e, r,
|
|
2089
|
+
super(e, r, i), this.$$p_d = t;
|
|
2583
2090
|
}
|
|
2584
2091
|
static get observedAttributes() {
|
|
2585
|
-
return
|
|
2586
|
-
(a) => (t[a].attribute || a).toLowerCase()
|
|
2587
|
-
);
|
|
2092
|
+
return Nt(t).map((o) => (t[o].attribute || o).toLowerCase());
|
|
2588
2093
|
}
|
|
2589
2094
|
};
|
|
2590
|
-
return
|
|
2591
|
-
|
|
2095
|
+
return Nt(t).forEach((o) => {
|
|
2096
|
+
Dt(l.prototype, o, {
|
|
2592
2097
|
get() {
|
|
2593
|
-
return this.$$c &&
|
|
2098
|
+
return this.$$c && o in this.$$c ? this.$$c[o] : this.$$d[o];
|
|
2594
2099
|
},
|
|
2595
|
-
set(
|
|
2596
|
-
|
|
2597
|
-
var
|
|
2598
|
-
|
|
2599
|
-
var _ = Ye(u, a)?.get;
|
|
2600
|
-
_ ? u[a] = f : u.$set({ [a]: f });
|
|
2601
|
-
}
|
|
2602
|
-
}
|
|
2603
|
-
});
|
|
2604
|
-
}), i.forEach((a) => {
|
|
2605
|
-
Yt(o.prototype, a, {
|
|
2606
|
-
get() {
|
|
2607
|
-
return this.$$c?.[a];
|
|
2100
|
+
set(u) {
|
|
2101
|
+
u = Lt(o, u, t), this.$$d[o] = u;
|
|
2102
|
+
var h = this.$$c;
|
|
2103
|
+
h && (Ae(h, o)?.get ? h[o] = u : h.$set({ [o]: u }));
|
|
2608
2104
|
}
|
|
2609
2105
|
});
|
|
2610
|
-
}),
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2106
|
+
}), n.forEach((o) => {
|
|
2107
|
+
Dt(l.prototype, o, { get() {
|
|
2108
|
+
return this.$$c?.[o];
|
|
2109
|
+
} });
|
|
2110
|
+
}), s && (l = s(l)), e.element = l, l;
|
|
2111
|
+
}
|
|
2112
|
+
var ai = "https://proxy.pie-api.com", ga = `${ai}/bundles/`;
|
|
2113
|
+
function oi(e) {
|
|
2615
2114
|
try {
|
|
2616
|
-
const t =
|
|
2617
|
-
|
|
2618
|
-
|
|
2115
|
+
const t = {
|
|
2116
|
+
BASE_URL: "/",
|
|
2117
|
+
DEV: !1,
|
|
2118
|
+
MODE: "production",
|
|
2119
|
+
PROD: !0,
|
|
2120
|
+
SSR: !1
|
|
2121
|
+
}[e];
|
|
2122
|
+
if (typeof t == "string" && t.length > 0) return t;
|
|
2619
2123
|
} catch {
|
|
2620
2124
|
}
|
|
2621
2125
|
}
|
|
2622
|
-
typeof window < "u" && window.PIE_BUILDER_ORIGIN_URL ||
|
|
2623
|
-
|
|
2624
|
-
|
|
2126
|
+
var za = typeof window < "u" && window.PIE_BUILDER_ORIGIN_URL || oi("PUBLIC_BUILDER_ORIGIN_URL") || ai, wa = typeof window < "u" && window.PIE_BUILDER_BUNDLE_URL || oi("PUBLIC_BUILDER_BUNDLE_URL") || ga;
|
|
2127
|
+
function et(e, t) {
|
|
2128
|
+
const r = `[${e}]`;
|
|
2129
|
+
return {
|
|
2130
|
+
debug: (n, ...i) => {
|
|
2131
|
+
t() && console.debug(r, n, ...i);
|
|
2132
|
+
},
|
|
2133
|
+
info: (n, ...i) => console.info(r, n, ...i),
|
|
2134
|
+
warn: (n, ...i) => console.warn(r, n, ...i),
|
|
2135
|
+
error: (n, ...i) => console.error(r, n, ...i)
|
|
2136
|
+
};
|
|
2137
|
+
}
|
|
2138
|
+
function tt() {
|
|
2139
|
+
return typeof window < "u" && window.PIE_DEBUG === !0;
|
|
2140
|
+
}
|
|
2141
|
+
var cr;
|
|
2625
2142
|
(function(e) {
|
|
2626
2143
|
e.player = "player.js", e.clientPlayer = "client-player.js", e.editor = "editor.js";
|
|
2627
|
-
})(
|
|
2628
|
-
var
|
|
2144
|
+
})(cr || (cr = {}));
|
|
2145
|
+
var Qr;
|
|
2629
2146
|
(function(e) {
|
|
2630
2147
|
e.loading = "loading", e.loaded = "loaded";
|
|
2631
|
-
})(
|
|
2148
|
+
})(Qr || (Qr = {}));
|
|
2632
2149
|
typeof window < "u" && !window.pieHelpers && (window.pieHelpers = {
|
|
2633
2150
|
loadingScripts: {},
|
|
2634
2151
|
loadingPromises: {}
|
|
2635
2152
|
});
|
|
2636
|
-
var
|
|
2153
|
+
var en;
|
|
2637
2154
|
(function(e) {
|
|
2638
2155
|
e.SAVE = "save", e.MODEL = "model", e.SCORE = "score", e.MANUAL_SCORE = "manual-score";
|
|
2156
|
+
})(en || (en = {}));
|
|
2157
|
+
var tn;
|
|
2158
|
+
(function(e) {
|
|
2159
|
+
e.AUTO = "auto", e.MANUAL = "manual";
|
|
2639
2160
|
})(tn || (tn = {}));
|
|
2640
2161
|
var rn;
|
|
2641
2162
|
(function(e) {
|
|
2642
|
-
e.
|
|
2163
|
+
e.GATHER = "gather", e.VIEW = "view", e.EVALUATE = "evaluate";
|
|
2643
2164
|
})(rn || (rn = {}));
|
|
2644
2165
|
var nn;
|
|
2645
2166
|
(function(e) {
|
|
2646
|
-
e.
|
|
2167
|
+
e.PENDING = "pending", e.IN_PROGRESS = "in_progress", e.COMPLETED = "completed", e.FAILED = "failed";
|
|
2647
2168
|
})(nn || (nn = {}));
|
|
2169
|
+
var ya = class li extends CustomEvent {
|
|
2170
|
+
constructor(t, r = !1) {
|
|
2171
|
+
super(li.TYPE, {
|
|
2172
|
+
bubbles: !0,
|
|
2173
|
+
detail: {
|
|
2174
|
+
update: t,
|
|
2175
|
+
reset: r
|
|
2176
|
+
}
|
|
2177
|
+
}), $(this, "update", void 0), $(this, "reset", void 0), this.update = t, this.reset = r;
|
|
2178
|
+
}
|
|
2179
|
+
};
|
|
2180
|
+
$(ya, "TYPE", "model.updated");
|
|
2181
|
+
var ma = class fi extends CustomEvent {
|
|
2182
|
+
constructor(t, r) {
|
|
2183
|
+
super(fi.TYPE, {
|
|
2184
|
+
bubbles: !0,
|
|
2185
|
+
detail: {
|
|
2186
|
+
src: t,
|
|
2187
|
+
done: r
|
|
2188
|
+
}
|
|
2189
|
+
}), $(this, "src", void 0), $(this, "done", void 0), this.src = t, this.done = r;
|
|
2190
|
+
}
|
|
2191
|
+
};
|
|
2192
|
+
$(ma, "TYPE", "delete.image");
|
|
2193
|
+
var ba = class ui extends CustomEvent {
|
|
2194
|
+
constructor(t) {
|
|
2195
|
+
super(ui.TYPE, {
|
|
2196
|
+
bubbles: !0,
|
|
2197
|
+
detail: t
|
|
2198
|
+
}), $(this, "handler", void 0), this.handler = t;
|
|
2199
|
+
}
|
|
2200
|
+
};
|
|
2201
|
+
$(ba, "TYPE", "insert.image");
|
|
2202
|
+
var $a = class ci extends CustomEvent {
|
|
2203
|
+
constructor(t, r) {
|
|
2204
|
+
super(ci.TYPE, {
|
|
2205
|
+
bubbles: !0,
|
|
2206
|
+
detail: {
|
|
2207
|
+
src: t,
|
|
2208
|
+
done: r
|
|
2209
|
+
}
|
|
2210
|
+
}), $(this, "src", void 0), $(this, "done", void 0), this.src = t, this.done = r;
|
|
2211
|
+
}
|
|
2212
|
+
};
|
|
2213
|
+
$($a, "TYPE", "delete.sound");
|
|
2214
|
+
var Ea = class di extends CustomEvent {
|
|
2215
|
+
constructor(t) {
|
|
2216
|
+
super(di.TYPE, {
|
|
2217
|
+
bubbles: !0,
|
|
2218
|
+
detail: t
|
|
2219
|
+
}), $(this, "handler", void 0), this.handler = t;
|
|
2220
|
+
}
|
|
2221
|
+
};
|
|
2222
|
+
$(Ea, "TYPE", "insert.sound");
|
|
2223
|
+
var ka = class vi extends CustomEvent {
|
|
2224
|
+
constructor(t, r) {
|
|
2225
|
+
super(vi.TYPE, {
|
|
2226
|
+
bubbles: !0,
|
|
2227
|
+
composed: !0,
|
|
2228
|
+
detail: {
|
|
2229
|
+
complete: r,
|
|
2230
|
+
component: t
|
|
2231
|
+
}
|
|
2232
|
+
}), $(this, "component", void 0), $(this, "complete", void 0), this.component = t, this.complete = r;
|
|
2233
|
+
}
|
|
2234
|
+
};
|
|
2235
|
+
$(ka, "TYPE", "session-changed");
|
|
2648
2236
|
var sn;
|
|
2649
|
-
(function(e) {
|
|
2650
|
-
e.PENDING = "pending", e.IN_PROGRESS = "in_progress", e.COMPLETED = "completed", e.FAILED = "failed";
|
|
2651
|
-
})(sn || (sn = {}));
|
|
2652
|
-
var ln;
|
|
2653
2237
|
(function(e) {
|
|
2654
2238
|
e[e.ROOT = 0] = "ROOT", e[e.SUBJECT = 1] = "SUBJECT", e[e.LEVEL = 2] = "LEVEL", e[e.STANDARD = 3] = "STANDARD";
|
|
2655
|
-
})(
|
|
2656
|
-
|
|
2657
|
-
|
|
2239
|
+
})(sn || (sn = {}));
|
|
2240
|
+
var qa = et("math-rendering", () => tt()), Ya = et("pie-scoring", () => tt()), Ga = et("pie-updates", () => tt()), Ha = et("pie-initialization", () => tt()), Va = {
|
|
2241
|
+
buildServiceBase: wa,
|
|
2242
|
+
bundleType: cr.player,
|
|
2243
|
+
env: {
|
|
2244
|
+
mode: "gather",
|
|
2245
|
+
role: "student"
|
|
2246
|
+
}
|
|
2247
|
+
}, Ka = et("instrumentation-event-bridge", () => tt()), Ja = et("instrumentation-provider-resolution", () => tt());
|
|
2248
|
+
function Ta(e) {
|
|
2658
2249
|
const t = typeof document < "u" ? document.activeElement : null;
|
|
2659
2250
|
return queueMicrotask(() => {
|
|
2660
2251
|
try {
|
|
@@ -2668,288 +2259,283 @@ function ol(e) {
|
|
|
2668
2259
|
}
|
|
2669
2260
|
};
|
|
2670
2261
|
}
|
|
2671
|
-
var
|
|
2672
|
-
const hl = {
|
|
2262
|
+
var Sa = /* @__PURE__ */ mt('<div class="pie-tool-calculator__loading svelte-sun9kf">Loading calculator...</div>'), xa = /* @__PURE__ */ mt('<div class="pie-tool-calculator__error-details svelte-sun9kf"> </div>'), Ca = /* @__PURE__ */ mt('<div class="pie-tool-calculator__loading pie-tool-calculator__loading--error svelte-sun9kf">Calculator failed to initialize. <!></div>'), Ma = /* @__PURE__ */ mt('<div class="pie-tool-calculator notranslate svelte-sun9kf" role="region" tabindex="-1" aria-label="Calculator tool" translate="no" style="width: 100%; height: 100%;"><div class="pie-tool-calculator__container svelte-sun9kf"></div> <!> <!></div>'), Ra = /* @__PURE__ */ mt('<div class="pie-tool-calculator__context-host svelte-sun9kf"><!></div>'), Aa = {
|
|
2673
2263
|
hash: "svelte-sun9kf",
|
|
2674
2264
|
code: ".pie-tool-calculator__context-host.svelte-sun9kf {width:100%;height:100%;display:flex;min-height:0;}.pie-tool-calculator.svelte-sun9kf {position:relative;background:white;overflow:hidden;min-width:100%;min-height:0;display:flex;flex-direction:column;flex:1 1 auto;}.pie-tool-calculator__container.svelte-sun9kf {background:white;width:100%;height:100%;min-width:100%;min-height:100%;position:relative;overflow:hidden;}.pie-tool-calculator__loading.svelte-sun9kf {position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(255, 255, 255, 0.9);color:#334155;font-size:0.9rem;z-index:2;}.pie-tool-calculator__loading--error.svelte-sun9kf {color:#b91c1c;flex-direction:column;gap:0.5rem;padding:0.75rem;text-align:center;}.pie-tool-calculator__error-details.svelte-sun9kf {font-size:0.8rem;line-height:1.2;color:#7f1d1d;max-width:95%;word-break:break-word;}.pie-tool-calculator__container .dcg-container {width:100% !important;height:100% !important;}"
|
|
2675
2265
|
};
|
|
2676
|
-
function
|
|
2677
|
-
|
|
2678
|
-
let r =
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2266
|
+
function Pa(e, t) {
|
|
2267
|
+
dn(t, !0), aa(e, Aa);
|
|
2268
|
+
let r = st(t, "visible", 7, !1), n = st(t, "toolId", 7, "calculator"), i = st(t, "calculatorType", 7, "basic"), s = st(t, "availableTypes", 23, () => [
|
|
2269
|
+
"basic",
|
|
2270
|
+
"scientific",
|
|
2271
|
+
"graphing"
|
|
2272
|
+
]), l = st(t, "toolkitCoordinator", 7, null), o = /* @__PURE__ */ P(null), u = /* @__PURE__ */ P(null);
|
|
2273
|
+
const h = /* @__PURE__ */ jr(() => l() ?? c(u)?.toolkitCoordinator);
|
|
2274
|
+
let w = /* @__PURE__ */ jr(() => typeof s() == "string" ? s().split(",").map((p) => p.trim()) : s()), _ = /* @__PURE__ */ P(void 0), f = /* @__PURE__ */ P(void 0), d = /* @__PURE__ */ P(null), v = /* @__PURE__ */ P("basic"), g = /* @__PURE__ */ P(!1), y = /* @__PURE__ */ P(!1), x = /* @__PURE__ */ P(!1), U = /* @__PURE__ */ P(null), C = /* @__PURE__ */ P(!1), j = /* @__PURE__ */ P(null);
|
|
2275
|
+
const Ee = ".dcg-container,.dcg-calculator-api-container,iframe,canvas";
|
|
2276
|
+
ze(() => {
|
|
2277
|
+
if (c(o))
|
|
2278
|
+
return xi(c(o), (p) => {
|
|
2279
|
+
T(u, p, !0);
|
|
2686
2280
|
});
|
|
2687
2281
|
});
|
|
2688
|
-
function
|
|
2282
|
+
function rt() {
|
|
2689
2283
|
return "calculator-desmos";
|
|
2690
2284
|
}
|
|
2691
|
-
async function
|
|
2285
|
+
async function hi(p) {
|
|
2692
2286
|
if (console.log("[ToolCalculator] getProvider called", {
|
|
2693
2287
|
type: p,
|
|
2694
|
-
hasToolkitCoordinator: !!c(
|
|
2695
|
-
hasRegistry: !!c(
|
|
2696
|
-
}), !c(
|
|
2288
|
+
hasToolkitCoordinator: !!c(h),
|
|
2289
|
+
hasRegistry: !!c(h)?.toolProviderRegistry
|
|
2290
|
+
}), !c(h)?.toolProviderRegistry)
|
|
2697
2291
|
return console.warn("[ToolCalculator] No toolkitCoordinator or registry available"), null;
|
|
2698
2292
|
try {
|
|
2699
|
-
const
|
|
2700
|
-
console.log(`[ToolCalculator] Requesting ${
|
|
2701
|
-
const
|
|
2702
|
-
return console.log("[ToolCalculator] Got provider from registry:",
|
|
2703
|
-
} catch (
|
|
2704
|
-
return console.error("[ToolCalculator] Failed to get provider:",
|
|
2293
|
+
const S = rt();
|
|
2294
|
+
console.log(`[ToolCalculator] Requesting ${S} provider from registry`);
|
|
2295
|
+
const O = await c(h).toolProviderRegistry.getProvider(S);
|
|
2296
|
+
return console.log("[ToolCalculator] Got provider from registry:", O), O;
|
|
2297
|
+
} catch (S) {
|
|
2298
|
+
return console.error("[ToolCalculator] Failed to get provider:", S), null;
|
|
2705
2299
|
}
|
|
2706
2300
|
}
|
|
2707
|
-
function
|
|
2708
|
-
return p ? p.childElementCount > 0 || !!p.querySelector(
|
|
2709
|
-
}
|
|
2710
|
-
function
|
|
2711
|
-
if (
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
}
|
|
2721
|
-
|
|
2722
|
-
);
|
|
2301
|
+
function Ht(p) {
|
|
2302
|
+
return p ? p.childElementCount > 0 || !!p.querySelector(Ee) : !1;
|
|
2303
|
+
}
|
|
2304
|
+
function _i(p) {
|
|
2305
|
+
if (p)
|
|
2306
|
+
for (const S of [
|
|
2307
|
+
60,
|
|
2308
|
+
250,
|
|
2309
|
+
1e3,
|
|
2310
|
+
2500
|
|
2311
|
+
]) setTimeout(() => {
|
|
2312
|
+
try {
|
|
2313
|
+
p.resize?.();
|
|
2314
|
+
} catch {
|
|
2315
|
+
}
|
|
2316
|
+
}, S);
|
|
2723
2317
|
}
|
|
2724
|
-
async function
|
|
2725
|
-
if (!p || !await
|
|
2726
|
-
|
|
2318
|
+
async function Tr(p, S, O = 8e3) {
|
|
2319
|
+
if (!p || !await pi(p, O)) return !1;
|
|
2320
|
+
T(C, !0);
|
|
2727
2321
|
try {
|
|
2728
|
-
|
|
2322
|
+
S?.resize?.();
|
|
2729
2323
|
} catch {
|
|
2730
2324
|
}
|
|
2731
2325
|
return !0;
|
|
2732
2326
|
}
|
|
2733
|
-
async function
|
|
2327
|
+
async function pi(p, S = 3e3) {
|
|
2734
2328
|
if (!p) return !1;
|
|
2735
|
-
const
|
|
2736
|
-
for (; Date.now() -
|
|
2329
|
+
const O = Date.now();
|
|
2330
|
+
for (; Date.now() - O < S; ) {
|
|
2737
2331
|
if (!p.isConnected) return !1;
|
|
2738
|
-
if (
|
|
2739
|
-
await new Promise((
|
|
2332
|
+
if (Ht(p)) return !0;
|
|
2333
|
+
await new Promise((ke) => setTimeout(ke, 100));
|
|
2740
2334
|
}
|
|
2741
|
-
return
|
|
2742
|
-
}
|
|
2743
|
-
function
|
|
2744
|
-
return new Promise((
|
|
2745
|
-
let
|
|
2746
|
-
function
|
|
2747
|
-
if (
|
|
2748
|
-
|
|
2335
|
+
return Ht(p);
|
|
2336
|
+
}
|
|
2337
|
+
function gi(p, S) {
|
|
2338
|
+
return new Promise((O) => {
|
|
2339
|
+
let ke = p;
|
|
2340
|
+
function $t() {
|
|
2341
|
+
if (S?.aborted || ke <= 0) {
|
|
2342
|
+
O();
|
|
2749
2343
|
return;
|
|
2750
2344
|
}
|
|
2751
|
-
|
|
2345
|
+
ke--, requestAnimationFrame($t);
|
|
2752
2346
|
}
|
|
2753
|
-
|
|
2347
|
+
$t();
|
|
2754
2348
|
});
|
|
2755
2349
|
}
|
|
2756
|
-
function
|
|
2757
|
-
const
|
|
2350
|
+
function wi(p) {
|
|
2351
|
+
const S = p === "graphing";
|
|
2758
2352
|
return {
|
|
2759
2353
|
theme: "light",
|
|
2760
2354
|
restrictedMode: !1,
|
|
2761
2355
|
desmos: {
|
|
2762
2356
|
degreeMode: !0,
|
|
2763
|
-
settingsMenu:
|
|
2357
|
+
settingsMenu: S,
|
|
2764
2358
|
qwertyKeyboard: !1,
|
|
2765
|
-
notes:
|
|
2766
|
-
folders:
|
|
2767
|
-
sliders:
|
|
2768
|
-
tables:
|
|
2359
|
+
notes: S,
|
|
2360
|
+
folders: S,
|
|
2361
|
+
sliders: S,
|
|
2362
|
+
tables: S
|
|
2769
2363
|
}
|
|
2770
2364
|
};
|
|
2771
2365
|
}
|
|
2772
|
-
let
|
|
2773
|
-
async function
|
|
2366
|
+
let Sr = /* @__PURE__ */ P(Me(wi("basic")));
|
|
2367
|
+
async function Vt() {
|
|
2774
2368
|
if (console.log("[ToolCalculator] initCalculator called", {
|
|
2775
|
-
isInitializing: c(
|
|
2776
|
-
isSwitching: c(
|
|
2777
|
-
hasCalculatorInstance: !!c(
|
|
2778
|
-
hasContainerEl: !!c(
|
|
2369
|
+
isInitializing: c(g),
|
|
2370
|
+
isSwitching: c(y),
|
|
2371
|
+
hasCalculatorInstance: !!c(d),
|
|
2372
|
+
hasContainerEl: !!c(f),
|
|
2779
2373
|
initializationFailed: c(x),
|
|
2780
|
-
hasToolkitCoordinator: !!c(
|
|
2781
|
-
hasRegistry: !!c(
|
|
2782
|
-
}), c(
|
|
2374
|
+
hasToolkitCoordinator: !!c(h),
|
|
2375
|
+
hasRegistry: !!c(h)?.toolProviderRegistry
|
|
2376
|
+
}), c(g) || c(y) || c(d) || !c(f) || c(x)) {
|
|
2783
2377
|
console.log("[ToolCalculator] Early return from initCalculator");
|
|
2784
2378
|
return;
|
|
2785
2379
|
}
|
|
2786
|
-
|
|
2380
|
+
T(g, !0);
|
|
2787
2381
|
try {
|
|
2788
|
-
c(
|
|
2789
|
-
requested: c(
|
|
2790
|
-
availableTypes: c(
|
|
2791
|
-
fallback: c(
|
|
2792
|
-
}),
|
|
2793
|
-
const p = await
|
|
2794
|
-
if (console.log("[ToolCalculator] Got tool provider:", p), !p)
|
|
2795
|
-
throw new Error("Desmos calculator tool provider not available");
|
|
2382
|
+
c(w).includes(c(v)) || (console.log("[ToolCalculator] Calculator type not available, using fallback", {
|
|
2383
|
+
requested: c(v),
|
|
2384
|
+
availableTypes: c(w),
|
|
2385
|
+
fallback: c(w)[0] || "basic"
|
|
2386
|
+
}), T(v, c(w)[0] || "basic", !0)), console.log("[ToolCalculator] Getting provider for type:", c(v));
|
|
2387
|
+
const p = await hi(c(v));
|
|
2388
|
+
if (console.log("[ToolCalculator] Got tool provider:", p), !p) throw new Error("Desmos calculator tool provider not available");
|
|
2796
2389
|
console.log("[ToolCalculator] Creating calculator provider instance");
|
|
2797
|
-
const
|
|
2798
|
-
if (console.log("[ToolCalculator] Got calculator provider:",
|
|
2390
|
+
const S = await p.createInstance();
|
|
2391
|
+
if (console.log("[ToolCalculator] Got calculator provider:", S), !c(f) || c(d) || c(y)) {
|
|
2799
2392
|
console.log("[ToolCalculator] Aborting due to state change");
|
|
2800
2393
|
return;
|
|
2801
2394
|
}
|
|
2802
2395
|
console.log("[ToolCalculator] Creating calculator with config:", {
|
|
2803
|
-
type: c(
|
|
2804
|
-
hasContainer: !!c(
|
|
2805
|
-
config: c(
|
|
2396
|
+
type: c(v),
|
|
2397
|
+
hasContainer: !!c(f),
|
|
2398
|
+
config: c(Sr)
|
|
2806
2399
|
});
|
|
2807
|
-
const
|
|
2808
|
-
if (!
|
|
2400
|
+
const O = c(f);
|
|
2401
|
+
if (!O || !O.isConnected) {
|
|
2809
2402
|
console.warn("[ToolCalculator] Calculator container unavailable before mount");
|
|
2810
2403
|
return;
|
|
2811
2404
|
}
|
|
2812
|
-
if (!
|
|
2405
|
+
if (!O.isConnected) {
|
|
2813
2406
|
console.warn("[ToolCalculator] Calculator container disconnected before init");
|
|
2814
2407
|
return;
|
|
2815
2408
|
}
|
|
2816
|
-
|
|
2409
|
+
T(d, await S.createCalculator(c(v), O, c(Sr)), !0), await gi(2), c(d)?.resize?.(), _i(c(d)), T(C, !1), await Tr(O, c(d), 4e3) || (console.warn("[ToolCalculator] Calculator mount pending after init; keeping instance and monitoring"), Tr(O, c(d), 12e3)), console.log("[ToolCalculator] Calculator instance created:", c(d)), T(x, !1), T(U, null), T(C, Ht(O), !0), console.log(`[ToolCalculator] ${c(v)} calculator initialized successfully`);
|
|
2817
2410
|
} catch (p) {
|
|
2818
|
-
|
|
2411
|
+
T(x, !0), T(U, p instanceof Error ? p.message : String(p), !0), console.error("[ToolCalculator] Failed to initialize calculator:", p), T(d, null), T(C, !1);
|
|
2819
2412
|
} finally {
|
|
2820
|
-
|
|
2413
|
+
T(g, !1);
|
|
2821
2414
|
}
|
|
2822
2415
|
}
|
|
2823
|
-
|
|
2824
|
-
!
|
|
2825
|
-
}),
|
|
2826
|
-
c(
|
|
2827
|
-
})),
|
|
2416
|
+
ze(() => {
|
|
2417
|
+
!i() || !c(w).includes(i()) || T(v, i());
|
|
2418
|
+
}), ia(() => (r() && Vt(), () => {
|
|
2419
|
+
c(j)?.(), c(d)?.destroy();
|
|
2420
|
+
})), ze(() => {
|
|
2828
2421
|
if (!r()) {
|
|
2829
|
-
if (c(
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
$(x, !1), $(R, null), $(j, !1);
|
|
2422
|
+
if (c(d)) try {
|
|
2423
|
+
c(d).destroy();
|
|
2424
|
+
} catch (p) {
|
|
2425
|
+
console.warn("[ToolCalculator] Error destroying calculator on hide:", p);
|
|
2426
|
+
} finally {
|
|
2427
|
+
T(d, null);
|
|
2428
|
+
}
|
|
2429
|
+
T(x, !1), T(U, null), T(C, !1);
|
|
2838
2430
|
return;
|
|
2839
2431
|
}
|
|
2840
|
-
!c(
|
|
2841
|
-
r() && c(
|
|
2432
|
+
!c(d) && !c(g) && !c(y) && !c(x) && (c(f)?.isConnected ? Vt() : queueMicrotask(() => {
|
|
2433
|
+
r() && c(f)?.isConnected && !c(d) && !c(g) && !c(y) && !c(x) && Vt();
|
|
2842
2434
|
}));
|
|
2843
2435
|
});
|
|
2844
|
-
let
|
|
2845
|
-
|
|
2846
|
-
if (r() && c(
|
|
2847
|
-
return
|
|
2848
|
-
for (const
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
})), z.observe(c(d)), () => {
|
|
2860
|
-
z && c(d) && z.unobserve(c(d)), z?.disconnect(), z = null;
|
|
2436
|
+
let W = null;
|
|
2437
|
+
ze(() => {
|
|
2438
|
+
if (r() && c(f) && c(d) && c(f).isConnected)
|
|
2439
|
+
return W || (W = new ResizeObserver((p) => {
|
|
2440
|
+
for (const S of p) if (!S.target.isConnected) {
|
|
2441
|
+
W?.unobserve(S.target);
|
|
2442
|
+
return;
|
|
2443
|
+
}
|
|
2444
|
+
if (c(d)?.resize && c(f)?.isConnected && r()) try {
|
|
2445
|
+
c(d).resize();
|
|
2446
|
+
} catch (S) {
|
|
2447
|
+
console.warn("[ToolCalculator] Error during resize:", S), W && c(f) && W.unobserve(c(f));
|
|
2448
|
+
}
|
|
2449
|
+
})), W.observe(c(f)), () => {
|
|
2450
|
+
W && c(f) && W.unobserve(c(f)), W?.disconnect(), W = null;
|
|
2861
2451
|
};
|
|
2862
|
-
|
|
2863
|
-
}),
|
|
2864
|
-
c(
|
|
2452
|
+
W && (c(f) && W.unobserve(c(f)), W.disconnect(), W = null);
|
|
2453
|
+
}), ze(() => {
|
|
2454
|
+
c(_) && r() ? c(j) || T(j, Ta(c(_)), !0) : !r() && c(j) && (c(j)(), T(j, null));
|
|
2865
2455
|
});
|
|
2866
|
-
var
|
|
2456
|
+
var yi = {
|
|
2867
2457
|
get visible() {
|
|
2868
2458
|
return r();
|
|
2869
2459
|
},
|
|
2870
2460
|
set visible(p = !1) {
|
|
2871
|
-
r(p),
|
|
2461
|
+
r(p), Be();
|
|
2872
2462
|
},
|
|
2873
2463
|
get toolId() {
|
|
2874
|
-
return
|
|
2464
|
+
return n();
|
|
2875
2465
|
},
|
|
2876
2466
|
set toolId(p = "calculator") {
|
|
2877
|
-
|
|
2467
|
+
n(p), Be();
|
|
2878
2468
|
},
|
|
2879
2469
|
get calculatorType() {
|
|
2880
|
-
return
|
|
2470
|
+
return i();
|
|
2881
2471
|
},
|
|
2882
2472
|
set calculatorType(p = "basic") {
|
|
2883
|
-
|
|
2473
|
+
i(p), Be();
|
|
2884
2474
|
},
|
|
2885
2475
|
get availableTypes() {
|
|
2886
2476
|
return s();
|
|
2887
2477
|
},
|
|
2888
|
-
set availableTypes(p = [
|
|
2889
|
-
|
|
2478
|
+
set availableTypes(p = [
|
|
2479
|
+
"basic",
|
|
2480
|
+
"scientific",
|
|
2481
|
+
"graphing"
|
|
2482
|
+
]) {
|
|
2483
|
+
s(p), Be();
|
|
2890
2484
|
},
|
|
2891
2485
|
get toolkitCoordinator() {
|
|
2892
|
-
return
|
|
2486
|
+
return l();
|
|
2893
2487
|
},
|
|
2894
2488
|
set toolkitCoordinator(p = null) {
|
|
2895
|
-
|
|
2489
|
+
l(p), Be();
|
|
2896
2490
|
}
|
|
2897
|
-
},
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
{
|
|
2904
|
-
var Lt = (se) => {
|
|
2905
|
-
var mt = al();
|
|
2906
|
-
rt(se, mt);
|
|
2907
|
-
};
|
|
2908
|
-
Bt(be, (se) => {
|
|
2909
|
-
(c(T) || c(b) || r() && !c(x) && !c(j)) && se(Lt);
|
|
2910
|
-
});
|
|
2911
|
-
}
|
|
2912
|
-
var gi = ar(be, 2);
|
|
2913
|
-
{
|
|
2914
|
-
var wi = (se) => {
|
|
2915
|
-
var mt = ul(), yi = ar(Mt(mt));
|
|
2916
|
-
{
|
|
2917
|
-
var mi = (sr) => {
|
|
2918
|
-
var lr = fl(), bi = Mt(lr, !0);
|
|
2919
|
-
Pt(lr), Gr(() => qs(bi, c(R))), rt(sr, lr);
|
|
2920
|
-
};
|
|
2921
|
-
Bt(yi, (sr) => {
|
|
2922
|
-
c(R) && sr(mi);
|
|
2923
|
-
});
|
|
2924
|
-
}
|
|
2925
|
-
Pt(mt), rt(se, mt);
|
|
2926
|
-
};
|
|
2927
|
-
Bt(gi, (se) => {
|
|
2928
|
-
c(x) && se(wi);
|
|
2929
|
-
});
|
|
2930
|
-
}
|
|
2931
|
-
Pt(C), fr(C, (se) => $(h, se), () => c(h)), Gr(() => {
|
|
2932
|
-
Xr(C, "data-tool-id", i()), Xr(A, "data-calculator-type", c(g));
|
|
2933
|
-
}), rt(p, C);
|
|
2491
|
+
}, bt = Ra(), mi = Ct(bt), bi = (p) => {
|
|
2492
|
+
var S = Ma(), O = Ct(S);
|
|
2493
|
+
nr(O, (X) => T(f, X), () => c(f));
|
|
2494
|
+
var ke = Qt(O, 2), $t = (X) => {
|
|
2495
|
+
var nt = Sa();
|
|
2496
|
+
qe(X, nt);
|
|
2934
2497
|
};
|
|
2935
|
-
|
|
2936
|
-
r() &&
|
|
2498
|
+
At(ke, (X) => {
|
|
2499
|
+
(c(g) || c(y) || r() && !c(x) && !c(C)) && X($t);
|
|
2937
2500
|
});
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2501
|
+
var $i = Qt(ke, 2), Ei = (X) => {
|
|
2502
|
+
var nt = Ca(), ki = Qt(Ct(nt)), Ti = (Kt) => {
|
|
2503
|
+
var Jt = xa(), Si = Ct(Jt, !0);
|
|
2504
|
+
Et(Jt), Br(() => ea(Si, c(U))), qe(Kt, Jt);
|
|
2505
|
+
};
|
|
2506
|
+
At(ki, (Kt) => {
|
|
2507
|
+
c(U) && Kt(Ti);
|
|
2508
|
+
}), Et(nt), qe(X, nt);
|
|
2509
|
+
};
|
|
2510
|
+
At($i, (X) => {
|
|
2511
|
+
c(x) && X(Ei);
|
|
2512
|
+
}), Et(S), nr(S, (X) => T(_, X), () => c(_)), Br(() => {
|
|
2513
|
+
Kr(S, "data-tool-id", n()), Kr(O, "data-calculator-type", c(v));
|
|
2514
|
+
}), qe(p, S);
|
|
2515
|
+
};
|
|
2516
|
+
return At(mi, (p) => {
|
|
2517
|
+
r() && p(bi);
|
|
2518
|
+
}), Et(bt), nr(bt, (p) => T(o, p), () => c(o)), qe(e, bt), vn(yi);
|
|
2519
|
+
}
|
|
2520
|
+
customElements.define("pie-tool-calculator", pa(Pa, {
|
|
2521
|
+
visible: {
|
|
2522
|
+
attribute: "visible",
|
|
2523
|
+
type: "Boolean"
|
|
2524
|
+
},
|
|
2525
|
+
toolId: {
|
|
2526
|
+
attribute: "tool-id",
|
|
2527
|
+
type: "String"
|
|
2528
|
+
},
|
|
2529
|
+
calculatorType: {
|
|
2530
|
+
attribute: "calculator-type",
|
|
2531
|
+
type: "String"
|
|
2532
|
+
},
|
|
2533
|
+
availableTypes: {
|
|
2534
|
+
attribute: "available-types",
|
|
2535
|
+
type: "Array"
|
|
2949
2536
|
},
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
));
|
|
2537
|
+
toolkitCoordinator: { type: "Object" }
|
|
2538
|
+
}, [], []));
|
|
2953
2539
|
export {
|
|
2954
|
-
|
|
2540
|
+
Pa as default
|
|
2955
2541
|
};
|