@pie-players/pie-tool-text-to-speech 0.1.4 → 0.1.6
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/tool-text-to-speech.js +1638 -1433
- package/dist/tool-text-to-speech.js.map +1 -1
- package/package.json +7 -5
|
@@ -1,139 +1,142 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Vs = Object.defineProperty;
|
|
2
|
+
var Zn = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var a = (e, t,
|
|
8
|
-
var
|
|
9
|
-
typeof window < "u" && ((
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
|
|
5
|
+
var Gs = (e, t, n) => t in e ? Vs(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var $ = (e, t, n) => Gs(e, typeof t != "symbol" ? t + "" : t, n), _n = (e, t, n) => t.has(e) || Zn("Cannot " + n);
|
|
7
|
+
var a = (e, t, n) => (_n(e, t, "read from private field"), n ? n.call(e) : t.get(e)), b = (e, t, n) => t.has(e) ? Zn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), g = (e, t, n, r) => (_n(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), N = (e, t, n) => (_n(e, t, "access private method"), n);
|
|
8
|
+
var _r;
|
|
9
|
+
typeof window < "u" && ((_r = window.__svelte ?? (window.__svelte = {})).v ?? (_r.v = /* @__PURE__ */ new Set())).add("5");
|
|
10
|
+
const Hs = 1, Ys = 2, Rn = "[", On = "[!", gr = "]", _t = {}, M = /* @__PURE__ */ Symbol(), wr = "http://www.w3.org/1999/xhtml", gn = !1;
|
|
11
|
+
var Us = Array.isArray, qs = Array.prototype.indexOf, gt = Array.prototype.includes, Ws = Array.from, Zt = Object.keys, en = Object.defineProperty, lt = Object.getOwnPropertyDescriptor, Ks = Object.getOwnPropertyDescriptors, Xs = Object.prototype, Js = Array.prototype, br = Object.getPrototypeOf, er = Object.isExtensible;
|
|
12
|
+
const Qs = () => {
|
|
13
|
+
};
|
|
14
|
+
function Zs(e) {
|
|
13
15
|
for (var t = 0; t < e.length; t++)
|
|
14
16
|
e[t]();
|
|
15
17
|
}
|
|
16
|
-
function
|
|
17
|
-
var e, t,
|
|
18
|
-
e =
|
|
18
|
+
function mr() {
|
|
19
|
+
var e, t, n = new Promise((r, s) => {
|
|
20
|
+
e = r, t = s;
|
|
19
21
|
});
|
|
20
|
-
return { promise:
|
|
22
|
+
return { promise: n, resolve: e, reject: t };
|
|
21
23
|
}
|
|
22
|
-
const I = 2,
|
|
24
|
+
const I = 2, Pt = 4, sn = 8, yr = 1 << 24, Ne = 16, me = 32, je = 64, xr = 128, ee = 512, R = 1024, L = 2048, ue = 4096, ge = 8192, Ce = 16384, kt = 32768, wt = 65536, tr = 1 << 17, kr = 1 << 18, tt = 1 << 19, ei = 1 << 20, et = 65536, wn = 1 << 21, Mn = 1 << 22, Ie = 1 << 23, Wt = /* @__PURE__ */ Symbol("$state"), ti = /* @__PURE__ */ Symbol("legacy props"), ni = /* @__PURE__ */ Symbol(""), Ge = new class extends Error {
|
|
23
25
|
constructor() {
|
|
24
26
|
super(...arguments);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
$(this, "name", "StaleReactionError");
|
|
28
|
+
$(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
27
29
|
}
|
|
28
|
-
}(),
|
|
29
|
-
function
|
|
30
|
+
}(), $r = /* @__PURE__ */ globalThis.document?.contentType.includes("xml") ?? !1, Dt = 3, Bt = 8;
|
|
31
|
+
function ri(e) {
|
|
30
32
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
31
33
|
}
|
|
32
|
-
function
|
|
34
|
+
function si() {
|
|
33
35
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
34
36
|
}
|
|
35
|
-
function
|
|
37
|
+
function ii(e) {
|
|
36
38
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
37
39
|
}
|
|
38
|
-
function
|
|
40
|
+
function oi() {
|
|
39
41
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
40
42
|
}
|
|
41
43
|
function ai(e) {
|
|
42
44
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
43
45
|
}
|
|
44
|
-
function
|
|
46
|
+
function li() {
|
|
45
47
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
46
48
|
}
|
|
47
49
|
function ui() {
|
|
48
50
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
49
51
|
}
|
|
50
|
-
function
|
|
52
|
+
function fi() {
|
|
51
53
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
52
54
|
}
|
|
53
|
-
function
|
|
55
|
+
function ci() {
|
|
54
56
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
55
57
|
}
|
|
56
|
-
function
|
|
58
|
+
function di() {
|
|
57
59
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
58
60
|
}
|
|
59
|
-
function
|
|
61
|
+
function hi() {
|
|
60
62
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
61
63
|
}
|
|
62
|
-
function
|
|
64
|
+
function on(e) {
|
|
63
65
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
64
66
|
}
|
|
65
|
-
function
|
|
67
|
+
function vi() {
|
|
66
68
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
67
69
|
}
|
|
68
|
-
let
|
|
69
|
-
function
|
|
70
|
-
|
|
70
|
+
let T = !1;
|
|
71
|
+
function at(e) {
|
|
72
|
+
T = e;
|
|
71
73
|
}
|
|
72
|
-
let
|
|
73
|
-
function
|
|
74
|
+
let E;
|
|
75
|
+
function ne(e) {
|
|
74
76
|
if (e === null)
|
|
75
|
-
throw
|
|
76
|
-
return
|
|
77
|
+
throw on(), _t;
|
|
78
|
+
return E = e;
|
|
77
79
|
}
|
|
78
|
-
function
|
|
79
|
-
return
|
|
80
|
+
function In() {
|
|
81
|
+
return ne(/* @__PURE__ */ Re(E));
|
|
80
82
|
}
|
|
81
|
-
function
|
|
82
|
-
if (
|
|
83
|
-
if (/* @__PURE__ */
|
|
84
|
-
throw
|
|
85
|
-
|
|
83
|
+
function D(e) {
|
|
84
|
+
if (T) {
|
|
85
|
+
if (/* @__PURE__ */ Re(E) !== null)
|
|
86
|
+
throw on(), _t;
|
|
87
|
+
E = e;
|
|
86
88
|
}
|
|
87
89
|
}
|
|
88
|
-
function
|
|
89
|
-
if (
|
|
90
|
-
for (var t = e,
|
|
91
|
-
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
|
|
90
|
+
function bn(e = 1) {
|
|
91
|
+
if (T) {
|
|
92
|
+
for (var t = e, n = E; t--; )
|
|
93
|
+
n = /** @type {TemplateNode} */
|
|
94
|
+
/* @__PURE__ */ Re(n);
|
|
95
|
+
E = n;
|
|
94
96
|
}
|
|
95
97
|
}
|
|
96
|
-
function
|
|
97
|
-
for (var t = 0,
|
|
98
|
-
if (
|
|
99
|
-
var
|
|
98
|
+
function Er(e = !0) {
|
|
99
|
+
for (var t = 0, n = E; ; ) {
|
|
100
|
+
if (n.nodeType === Bt) {
|
|
101
|
+
var r = (
|
|
100
102
|
/** @type {Comment} */
|
|
101
|
-
|
|
103
|
+
n.data
|
|
102
104
|
);
|
|
103
|
-
if (
|
|
104
|
-
if (t === 0) return
|
|
105
|
+
if (r === gr) {
|
|
106
|
+
if (t === 0) return n;
|
|
105
107
|
t -= 1;
|
|
106
|
-
} else (
|
|
108
|
+
} else (r === Rn || r === On || // "[1", "[2", etc. for if blocks
|
|
109
|
+
r[0] === "[" && !isNaN(Number(r.slice(1)))) && (t += 1);
|
|
107
110
|
}
|
|
108
|
-
var
|
|
111
|
+
var s = (
|
|
109
112
|
/** @type {TemplateNode} */
|
|
110
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ Re(n)
|
|
111
114
|
);
|
|
112
|
-
e &&
|
|
115
|
+
e && n.remove(), n = s;
|
|
113
116
|
}
|
|
114
117
|
}
|
|
115
|
-
function
|
|
116
|
-
if (!e || e.nodeType !==
|
|
117
|
-
throw
|
|
118
|
+
function pi(e) {
|
|
119
|
+
if (!e || e.nodeType !== Bt)
|
|
120
|
+
throw on(), _t;
|
|
118
121
|
return (
|
|
119
122
|
/** @type {Comment} */
|
|
120
123
|
e.data
|
|
121
124
|
);
|
|
122
125
|
}
|
|
123
|
-
function
|
|
126
|
+
function Tr(e) {
|
|
124
127
|
return e === this.v;
|
|
125
128
|
}
|
|
126
|
-
function
|
|
129
|
+
function _i(e, t) {
|
|
127
130
|
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
128
131
|
}
|
|
129
|
-
function
|
|
130
|
-
return !
|
|
132
|
+
function gi(e) {
|
|
133
|
+
return !_i(e, this.v);
|
|
131
134
|
}
|
|
132
|
-
let
|
|
135
|
+
let wi = !1, K = null;
|
|
133
136
|
function bt(e) {
|
|
134
137
|
K = e;
|
|
135
138
|
}
|
|
136
|
-
function
|
|
139
|
+
function Sr(e, t = !1, n) {
|
|
137
140
|
K = {
|
|
138
141
|
p: K,
|
|
139
142
|
i: !1,
|
|
@@ -144,112 +147,112 @@ function zn(e, t = !1, r) {
|
|
|
144
147
|
l: null
|
|
145
148
|
};
|
|
146
149
|
}
|
|
147
|
-
function
|
|
150
|
+
function zr(e) {
|
|
148
151
|
var t = (
|
|
149
152
|
/** @type {ComponentContext} */
|
|
150
153
|
K
|
|
151
|
-
),
|
|
152
|
-
if (
|
|
154
|
+
), n = t.e;
|
|
155
|
+
if (n !== null) {
|
|
153
156
|
t.e = null;
|
|
154
|
-
for (var
|
|
155
|
-
|
|
157
|
+
for (var r of n)
|
|
158
|
+
Kr(r);
|
|
156
159
|
}
|
|
157
160
|
return e !== void 0 && (t.x = e), t.i = !0, K = t.p, e ?? /** @type {T} */
|
|
158
161
|
{};
|
|
159
162
|
}
|
|
160
|
-
function
|
|
163
|
+
function Ar() {
|
|
161
164
|
return !0;
|
|
162
165
|
}
|
|
163
|
-
let
|
|
164
|
-
function
|
|
165
|
-
var e =
|
|
166
|
-
|
|
166
|
+
let He = [];
|
|
167
|
+
function Cr() {
|
|
168
|
+
var e = He;
|
|
169
|
+
He = [], Zs(e);
|
|
167
170
|
}
|
|
168
|
-
function
|
|
169
|
-
if (
|
|
170
|
-
var t =
|
|
171
|
+
function Le(e) {
|
|
172
|
+
if (He.length === 0 && !zt) {
|
|
173
|
+
var t = He;
|
|
171
174
|
queueMicrotask(() => {
|
|
172
|
-
t ===
|
|
175
|
+
t === He && Cr();
|
|
173
176
|
});
|
|
174
177
|
}
|
|
175
|
-
|
|
178
|
+
He.push(e);
|
|
176
179
|
}
|
|
177
|
-
function
|
|
178
|
-
for (;
|
|
179
|
-
|
|
180
|
+
function bi() {
|
|
181
|
+
for (; He.length > 0; )
|
|
182
|
+
Cr();
|
|
180
183
|
}
|
|
181
|
-
function
|
|
182
|
-
var t =
|
|
184
|
+
function Pr(e) {
|
|
185
|
+
var t = k;
|
|
183
186
|
if (t === null)
|
|
184
|
-
return m.f |=
|
|
185
|
-
if ((t.f &
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
t.b.error(e);
|
|
189
|
-
} else
|
|
190
|
-
mt(e, t);
|
|
187
|
+
return m.f |= Ie, e;
|
|
188
|
+
if ((t.f & kt) === 0 && (t.f & Pt) === 0)
|
|
189
|
+
throw e;
|
|
190
|
+
mt(e, t);
|
|
191
191
|
}
|
|
192
192
|
function mt(e, t) {
|
|
193
193
|
for (; t !== null; ) {
|
|
194
|
-
if ((t.f &
|
|
194
|
+
if ((t.f & xr) !== 0) {
|
|
195
|
+
if ((t.f & kt) === 0)
|
|
196
|
+
throw e;
|
|
195
197
|
try {
|
|
196
198
|
t.b.error(e);
|
|
197
199
|
return;
|
|
198
|
-
} catch (
|
|
199
|
-
e =
|
|
200
|
+
} catch (n) {
|
|
201
|
+
e = n;
|
|
200
202
|
}
|
|
203
|
+
}
|
|
201
204
|
t = t.parent;
|
|
202
205
|
}
|
|
203
206
|
throw e;
|
|
204
207
|
}
|
|
205
|
-
const
|
|
206
|
-
function
|
|
207
|
-
e.f = e.f &
|
|
208
|
+
const mi = -7169;
|
|
209
|
+
function A(e, t) {
|
|
210
|
+
e.f = e.f & mi | t;
|
|
208
211
|
}
|
|
209
|
-
function
|
|
210
|
-
(e.f & ee) !== 0 || e.deps === null ?
|
|
212
|
+
function Ln(e) {
|
|
213
|
+
(e.f & ee) !== 0 || e.deps === null ? A(e, R) : A(e, ue);
|
|
211
214
|
}
|
|
212
|
-
function
|
|
215
|
+
function Nr(e) {
|
|
213
216
|
if (e !== null)
|
|
214
217
|
for (const t of e)
|
|
215
|
-
(t.f & I) === 0 || (t.f &
|
|
218
|
+
(t.f & I) === 0 || (t.f & et) === 0 || (t.f ^= et, Nr(
|
|
216
219
|
/** @type {Derived} */
|
|
217
220
|
t.deps
|
|
218
221
|
));
|
|
219
222
|
}
|
|
220
|
-
function
|
|
221
|
-
(e.f &
|
|
223
|
+
function Rr(e, t, n) {
|
|
224
|
+
(e.f & L) !== 0 ? t.add(e) : (e.f & ue) !== 0 && n.add(e), Nr(e.deps), A(e, R);
|
|
222
225
|
}
|
|
223
|
-
const
|
|
224
|
-
let
|
|
225
|
-
var
|
|
226
|
-
const
|
|
226
|
+
const Ht = /* @__PURE__ */ new Set();
|
|
227
|
+
let z = null, oe = null, V = [], an = null, mn = !1, zt = !1;
|
|
228
|
+
var ut, ft, qe, ct, Rt, Ot, We, Ee, dt, be, yn, xn, Or;
|
|
229
|
+
const Yn = class Yn {
|
|
227
230
|
constructor() {
|
|
228
|
-
b(this,
|
|
229
|
-
|
|
231
|
+
b(this, be);
|
|
232
|
+
$(this, "committed", !1);
|
|
230
233
|
/**
|
|
231
234
|
* The current values of any sources that are updated in this batch
|
|
232
235
|
* They keys of this map are identical to `this.#previous`
|
|
233
236
|
* @type {Map<Source, any>}
|
|
234
237
|
*/
|
|
235
|
-
|
|
238
|
+
$(this, "current", /* @__PURE__ */ new Map());
|
|
236
239
|
/**
|
|
237
240
|
* The values of any sources that are updated in this batch _before_ those updates took place.
|
|
238
241
|
* They keys of this map are identical to `this.#current`
|
|
239
242
|
* @type {Map<Source, any>}
|
|
240
243
|
*/
|
|
241
|
-
|
|
244
|
+
$(this, "previous", /* @__PURE__ */ new Map());
|
|
242
245
|
/**
|
|
243
246
|
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
244
247
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
245
248
|
* @type {Set<() => void>}
|
|
246
249
|
*/
|
|
247
|
-
b(this,
|
|
250
|
+
b(this, ut, /* @__PURE__ */ new Set());
|
|
248
251
|
/**
|
|
249
252
|
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
250
253
|
* @type {Set<(batch: Batch) => void>}
|
|
251
254
|
*/
|
|
252
|
-
b(this,
|
|
255
|
+
b(this, ft, /* @__PURE__ */ new Set());
|
|
253
256
|
/**
|
|
254
257
|
* The number of async effects that are currently in flight
|
|
255
258
|
*/
|
|
@@ -263,7 +266,7 @@ const Ur = class Ur {
|
|
|
263
266
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
264
267
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
265
268
|
*/
|
|
266
|
-
b(this,
|
|
269
|
+
b(this, Rt, null);
|
|
267
270
|
/**
|
|
268
271
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
269
272
|
* @type {Set<Effect>}
|
|
@@ -273,37 +276,61 @@ const Ur = class Ur {
|
|
|
273
276
|
* Deferred effects that are MAYBE_DIRTY
|
|
274
277
|
* @type {Set<Effect>}
|
|
275
278
|
*/
|
|
276
|
-
b(this,
|
|
279
|
+
b(this, We, /* @__PURE__ */ new Set());
|
|
277
280
|
/**
|
|
278
|
-
* A
|
|
279
|
-
* is committed — we skip over these during `process
|
|
280
|
-
*
|
|
281
|
+
* A map of branches that still exist, but will be destroyed when this batch
|
|
282
|
+
* is committed — we skip over these during `process`.
|
|
283
|
+
* The value contains child effects that were dirty/maybe_dirty before being reset,
|
|
284
|
+
* so they can be rescheduled if the branch survives.
|
|
285
|
+
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
281
286
|
*/
|
|
282
|
-
|
|
283
|
-
|
|
287
|
+
b(this, Ee, /* @__PURE__ */ new Map());
|
|
288
|
+
$(this, "is_fork", !1);
|
|
284
289
|
b(this, dt, !1);
|
|
285
290
|
}
|
|
286
291
|
is_deferred() {
|
|
287
292
|
return this.is_fork || a(this, ct) > 0;
|
|
288
293
|
}
|
|
294
|
+
/**
|
|
295
|
+
* Add an effect to the #skipped_branches map and reset its children
|
|
296
|
+
* @param {Effect} effect
|
|
297
|
+
*/
|
|
298
|
+
skip_effect(t) {
|
|
299
|
+
a(this, Ee).has(t) || a(this, Ee).set(t, { d: [], m: [] });
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Remove an effect from the #skipped_branches map and reschedule
|
|
303
|
+
* any tracked dirty/maybe_dirty child effects
|
|
304
|
+
* @param {Effect} effect
|
|
305
|
+
*/
|
|
306
|
+
unskip_effect(t) {
|
|
307
|
+
var n = a(this, Ee).get(t);
|
|
308
|
+
if (n) {
|
|
309
|
+
a(this, Ee).delete(t);
|
|
310
|
+
for (var r of n.d)
|
|
311
|
+
A(r, L), ae(r);
|
|
312
|
+
for (r of n.m)
|
|
313
|
+
A(r, ue), ae(r);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
289
316
|
/**
|
|
290
317
|
*
|
|
291
318
|
* @param {Effect[]} root_effects
|
|
292
319
|
*/
|
|
293
320
|
process(t) {
|
|
294
|
-
|
|
295
|
-
var
|
|
296
|
-
for (const
|
|
297
|
-
|
|
321
|
+
V = [], this.apply();
|
|
322
|
+
var n = [], r = [];
|
|
323
|
+
for (const s of t)
|
|
324
|
+
N(this, be, yn).call(this, s, n, r);
|
|
298
325
|
if (this.is_deferred()) {
|
|
299
|
-
|
|
300
|
-
for (const
|
|
301
|
-
|
|
326
|
+
N(this, be, xn).call(this, r), N(this, be, xn).call(this, n);
|
|
327
|
+
for (const [s, i] of a(this, Ee))
|
|
328
|
+
Dr(s, i);
|
|
302
329
|
} else {
|
|
303
|
-
for (const
|
|
304
|
-
a(this,
|
|
330
|
+
for (const s of a(this, ut)) s();
|
|
331
|
+
a(this, ut).clear(), a(this, qe) === 0 && N(this, be, Or).call(this), z = null, nr(r), nr(n), a(this, Rt)?.resolve();
|
|
305
332
|
}
|
|
306
|
-
|
|
333
|
+
oe = null;
|
|
307
334
|
}
|
|
308
335
|
/**
|
|
309
336
|
* Associate a change to a given source with the current
|
|
@@ -311,25 +338,25 @@ const Ur = class Ur {
|
|
|
311
338
|
* @param {Source} source
|
|
312
339
|
* @param {any} value
|
|
313
340
|
*/
|
|
314
|
-
capture(t,
|
|
315
|
-
|
|
341
|
+
capture(t, n) {
|
|
342
|
+
n !== M && !this.previous.has(t) && this.previous.set(t, n), (t.f & Ie) === 0 && (this.current.set(t, t.v), oe?.set(t, t.v));
|
|
316
343
|
}
|
|
317
344
|
activate() {
|
|
318
|
-
|
|
345
|
+
z = this, this.apply();
|
|
319
346
|
}
|
|
320
347
|
deactivate() {
|
|
321
|
-
|
|
348
|
+
z === this && (z = null, oe = null);
|
|
322
349
|
}
|
|
323
350
|
flush() {
|
|
324
|
-
if (this.activate(),
|
|
325
|
-
if (
|
|
351
|
+
if (this.activate(), V.length > 0) {
|
|
352
|
+
if (Mr(), z !== null && z !== this)
|
|
326
353
|
return;
|
|
327
354
|
} else a(this, qe) === 0 && this.process([]);
|
|
328
355
|
this.deactivate();
|
|
329
356
|
}
|
|
330
357
|
discard() {
|
|
331
|
-
for (const t of a(this,
|
|
332
|
-
a(this,
|
|
358
|
+
for (const t of a(this, ft)) t(this);
|
|
359
|
+
a(this, ft).clear();
|
|
333
360
|
}
|
|
334
361
|
/**
|
|
335
362
|
*
|
|
@@ -343,280 +370,280 @@ const Ur = class Ur {
|
|
|
343
370
|
* @param {boolean} blocking
|
|
344
371
|
*/
|
|
345
372
|
decrement(t) {
|
|
346
|
-
g(this, qe, a(this, qe) - 1), t && g(this, ct, a(this, ct) - 1), !a(this, dt) && (g(this, dt, !0),
|
|
347
|
-
g(this, dt, !1), this.is_deferred() ?
|
|
373
|
+
g(this, qe, a(this, qe) - 1), t && g(this, ct, a(this, ct) - 1), !a(this, dt) && (g(this, dt, !0), Le(() => {
|
|
374
|
+
g(this, dt, !1), this.is_deferred() ? V.length > 0 && this.flush() : this.revive();
|
|
348
375
|
}));
|
|
349
376
|
}
|
|
350
377
|
revive() {
|
|
351
378
|
for (const t of a(this, Ot))
|
|
352
|
-
a(this,
|
|
353
|
-
for (const t of a(this,
|
|
354
|
-
|
|
379
|
+
a(this, We).delete(t), A(t, L), ae(t);
|
|
380
|
+
for (const t of a(this, We))
|
|
381
|
+
A(t, ue), ae(t);
|
|
355
382
|
this.flush();
|
|
356
383
|
}
|
|
357
384
|
/** @param {() => void} fn */
|
|
358
385
|
oncommit(t) {
|
|
359
|
-
a(this,
|
|
386
|
+
a(this, ut).add(t);
|
|
360
387
|
}
|
|
361
388
|
/** @param {(batch: Batch) => void} fn */
|
|
362
389
|
ondiscard(t) {
|
|
363
|
-
a(this,
|
|
390
|
+
a(this, ft).add(t);
|
|
364
391
|
}
|
|
365
392
|
settled() {
|
|
366
|
-
return (a(this,
|
|
393
|
+
return (a(this, Rt) ?? g(this, Rt, mr())).promise;
|
|
367
394
|
}
|
|
368
395
|
static ensure() {
|
|
369
|
-
if (
|
|
370
|
-
const t =
|
|
371
|
-
|
|
372
|
-
|
|
396
|
+
if (z === null) {
|
|
397
|
+
const t = z = new Yn();
|
|
398
|
+
Ht.add(z), zt || Le(() => {
|
|
399
|
+
z === t && t.flush();
|
|
373
400
|
});
|
|
374
401
|
}
|
|
375
|
-
return
|
|
402
|
+
return z;
|
|
376
403
|
}
|
|
377
404
|
apply() {
|
|
378
405
|
}
|
|
379
406
|
};
|
|
380
|
-
|
|
407
|
+
ut = new WeakMap(), ft = new WeakMap(), qe = new WeakMap(), ct = new WeakMap(), Rt = new WeakMap(), Ot = new WeakMap(), We = new WeakMap(), Ee = new WeakMap(), dt = new WeakMap(), be = new WeakSet(), /**
|
|
381
408
|
* Traverse the effect tree, executing effects or stashing
|
|
382
409
|
* them for later execution as appropriate
|
|
383
410
|
* @param {Effect} root
|
|
384
411
|
* @param {Effect[]} effects
|
|
385
412
|
* @param {Effect[]} render_effects
|
|
386
413
|
*/
|
|
387
|
-
|
|
388
|
-
t.f ^=
|
|
389
|
-
for (var
|
|
390
|
-
var o =
|
|
391
|
-
if (!
|
|
392
|
-
l ?
|
|
393
|
-
var d =
|
|
414
|
+
yn = function(t, n, r) {
|
|
415
|
+
t.f ^= R;
|
|
416
|
+
for (var s = t.first, i = null; s !== null; ) {
|
|
417
|
+
var o = s.f, l = (o & (me | je)) !== 0, u = l && (o & R) !== 0, f = u || (o & ge) !== 0 || a(this, Ee).has(s);
|
|
418
|
+
if (!f && s.fn !== null) {
|
|
419
|
+
l ? s.f ^= R : i !== null && (o & (Pt | sn | yr)) !== 0 ? i.b.defer_effect(s) : (o & Pt) !== 0 ? n.push(s) : jt(s) && ((o & Ne) !== 0 && a(this, We).add(s), xt(s));
|
|
420
|
+
var d = s.first;
|
|
394
421
|
if (d !== null) {
|
|
395
|
-
|
|
422
|
+
s = d;
|
|
396
423
|
continue;
|
|
397
424
|
}
|
|
398
425
|
}
|
|
399
|
-
var
|
|
400
|
-
for (
|
|
401
|
-
|
|
426
|
+
var p = s.parent;
|
|
427
|
+
for (s = s.next; s === null && p !== null; )
|
|
428
|
+
p === i && (i = null), s = p.next, p = p.parent;
|
|
402
429
|
}
|
|
403
430
|
}, /**
|
|
404
431
|
* @param {Effect[]} effects
|
|
405
432
|
*/
|
|
406
|
-
|
|
407
|
-
for (var
|
|
408
|
-
|
|
409
|
-
},
|
|
410
|
-
var
|
|
411
|
-
if (
|
|
433
|
+
xn = function(t) {
|
|
434
|
+
for (var n = 0; n < t.length; n += 1)
|
|
435
|
+
Rr(t[n], a(this, Ot), a(this, We));
|
|
436
|
+
}, Or = function() {
|
|
437
|
+
var s;
|
|
438
|
+
if (Ht.size > 1) {
|
|
412
439
|
this.previous.clear();
|
|
413
|
-
var t =
|
|
414
|
-
for (const i of
|
|
440
|
+
var t = oe, n = !0;
|
|
441
|
+
for (const i of Ht) {
|
|
415
442
|
if (i === this) {
|
|
416
|
-
|
|
443
|
+
n = !1;
|
|
417
444
|
continue;
|
|
418
445
|
}
|
|
419
446
|
const o = [];
|
|
420
|
-
for (const [
|
|
421
|
-
if (i.current.has(
|
|
422
|
-
if (
|
|
423
|
-
i.current.set(
|
|
447
|
+
for (const [u, f] of this.current) {
|
|
448
|
+
if (i.current.has(u))
|
|
449
|
+
if (n && f !== i.current.get(u))
|
|
450
|
+
i.current.set(u, f);
|
|
424
451
|
else
|
|
425
452
|
continue;
|
|
426
|
-
o.push(
|
|
453
|
+
o.push(u);
|
|
427
454
|
}
|
|
428
455
|
if (o.length === 0)
|
|
429
456
|
continue;
|
|
430
|
-
const l = [...i.current.keys()].filter((
|
|
457
|
+
const l = [...i.current.keys()].filter((u) => !this.current.has(u));
|
|
431
458
|
if (l.length > 0) {
|
|
432
|
-
var
|
|
433
|
-
|
|
434
|
-
const
|
|
459
|
+
var r = V;
|
|
460
|
+
V = [];
|
|
461
|
+
const u = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Map();
|
|
435
462
|
for (const d of o)
|
|
436
|
-
|
|
437
|
-
if (
|
|
438
|
-
|
|
439
|
-
for (const d of
|
|
440
|
-
|
|
463
|
+
Ir(d, l, u, f);
|
|
464
|
+
if (V.length > 0) {
|
|
465
|
+
z = i, i.apply();
|
|
466
|
+
for (const d of V)
|
|
467
|
+
N(s = i, be, yn).call(s, d, [], []);
|
|
441
468
|
i.deactivate();
|
|
442
469
|
}
|
|
443
|
-
|
|
470
|
+
V = r;
|
|
444
471
|
}
|
|
445
472
|
}
|
|
446
|
-
|
|
473
|
+
z = null, oe = t;
|
|
447
474
|
}
|
|
448
|
-
this.committed = !0,
|
|
475
|
+
this.committed = !0, Ht.delete(this);
|
|
449
476
|
};
|
|
450
|
-
let
|
|
451
|
-
function
|
|
477
|
+
let Pe = Yn;
|
|
478
|
+
function St(e) {
|
|
452
479
|
var t = zt;
|
|
453
480
|
zt = !0;
|
|
454
481
|
try {
|
|
455
|
-
for (var
|
|
456
|
-
if (
|
|
457
|
-
return
|
|
458
|
-
|
|
459
|
-
|
|
482
|
+
for (var n; ; ) {
|
|
483
|
+
if (bi(), V.length === 0 && (z?.flush(), V.length === 0))
|
|
484
|
+
return an = null, /** @type {T} */
|
|
485
|
+
n;
|
|
486
|
+
Mr();
|
|
460
487
|
}
|
|
461
488
|
} finally {
|
|
462
489
|
zt = t;
|
|
463
490
|
}
|
|
464
491
|
}
|
|
465
|
-
function
|
|
466
|
-
|
|
492
|
+
function Mr() {
|
|
493
|
+
mn = !0;
|
|
467
494
|
var e = null;
|
|
468
495
|
try {
|
|
469
|
-
for (var t = 0;
|
|
470
|
-
var
|
|
496
|
+
for (var t = 0; V.length > 0; ) {
|
|
497
|
+
var n = Pe.ensure();
|
|
471
498
|
if (t++ > 1e3) {
|
|
472
|
-
var
|
|
499
|
+
var r, s;
|
|
473
500
|
yi();
|
|
474
501
|
}
|
|
475
|
-
|
|
502
|
+
n.process(V), De.clear();
|
|
476
503
|
}
|
|
477
504
|
} finally {
|
|
478
|
-
|
|
505
|
+
V = [], mn = !1, an = null;
|
|
479
506
|
}
|
|
480
507
|
}
|
|
481
508
|
function yi() {
|
|
482
509
|
try {
|
|
483
|
-
|
|
510
|
+
li();
|
|
484
511
|
} catch (e) {
|
|
485
|
-
mt(e,
|
|
512
|
+
mt(e, an);
|
|
486
513
|
}
|
|
487
514
|
}
|
|
488
|
-
let
|
|
489
|
-
function
|
|
515
|
+
let ke = null;
|
|
516
|
+
function nr(e) {
|
|
490
517
|
var t = e.length;
|
|
491
518
|
if (t !== 0) {
|
|
492
|
-
for (var
|
|
493
|
-
var
|
|
494
|
-
if ((
|
|
495
|
-
|
|
496
|
-
for (const
|
|
497
|
-
if ((
|
|
498
|
-
const i = [
|
|
499
|
-
let o =
|
|
519
|
+
for (var n = 0; n < t; ) {
|
|
520
|
+
var r = e[n++];
|
|
521
|
+
if ((r.f & (Ce | ge)) === 0 && jt(r) && (ke = /* @__PURE__ */ new Set(), xt(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Zr(r), ke?.size > 0)) {
|
|
522
|
+
De.clear();
|
|
523
|
+
for (const s of ke) {
|
|
524
|
+
if ((s.f & (Ce | ge)) !== 0) continue;
|
|
525
|
+
const i = [s];
|
|
526
|
+
let o = s.parent;
|
|
500
527
|
for (; o !== null; )
|
|
501
|
-
|
|
528
|
+
ke.has(o) && (ke.delete(o), i.push(o)), o = o.parent;
|
|
502
529
|
for (let l = i.length - 1; l >= 0; l--) {
|
|
503
|
-
const
|
|
504
|
-
(
|
|
530
|
+
const u = i[l];
|
|
531
|
+
(u.f & (Ce | ge)) === 0 && xt(u);
|
|
505
532
|
}
|
|
506
533
|
}
|
|
507
|
-
|
|
534
|
+
ke.clear();
|
|
508
535
|
}
|
|
509
536
|
}
|
|
510
|
-
|
|
537
|
+
ke = null;
|
|
511
538
|
}
|
|
512
539
|
}
|
|
513
|
-
function
|
|
514
|
-
if (!
|
|
515
|
-
for (const
|
|
516
|
-
const i =
|
|
517
|
-
(i & I) !== 0 ?
|
|
540
|
+
function Ir(e, t, n, r) {
|
|
541
|
+
if (!n.has(e) && (n.add(e), e.reactions !== null))
|
|
542
|
+
for (const s of e.reactions) {
|
|
543
|
+
const i = s.f;
|
|
544
|
+
(i & I) !== 0 ? Ir(
|
|
518
545
|
/** @type {Derived} */
|
|
519
|
-
|
|
546
|
+
s,
|
|
520
547
|
t,
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
) : (i & (
|
|
548
|
+
n,
|
|
549
|
+
r
|
|
550
|
+
) : (i & (Mn | Ne)) !== 0 && (i & L) === 0 && Lr(s, t, r) && (A(s, L), ae(
|
|
524
551
|
/** @type {Effect} */
|
|
525
|
-
|
|
552
|
+
s
|
|
526
553
|
));
|
|
527
554
|
}
|
|
528
555
|
}
|
|
529
|
-
function
|
|
530
|
-
const
|
|
531
|
-
if (
|
|
556
|
+
function Lr(e, t, n) {
|
|
557
|
+
const r = n.get(e);
|
|
558
|
+
if (r !== void 0) return r;
|
|
532
559
|
if (e.deps !== null)
|
|
533
|
-
for (const
|
|
534
|
-
if (gt.call(t,
|
|
560
|
+
for (const s of e.deps) {
|
|
561
|
+
if (gt.call(t, s))
|
|
535
562
|
return !0;
|
|
536
|
-
if ((
|
|
563
|
+
if ((s.f & I) !== 0 && Lr(
|
|
537
564
|
/** @type {Derived} */
|
|
538
|
-
|
|
565
|
+
s,
|
|
539
566
|
t,
|
|
540
|
-
|
|
567
|
+
n
|
|
541
568
|
))
|
|
542
|
-
return
|
|
569
|
+
return n.set(
|
|
543
570
|
/** @type {Derived} */
|
|
544
|
-
|
|
571
|
+
s,
|
|
545
572
|
!0
|
|
546
573
|
), !0;
|
|
547
574
|
}
|
|
548
|
-
return
|
|
575
|
+
return n.set(e, !1), !1;
|
|
549
576
|
}
|
|
550
|
-
function
|
|
551
|
-
for (var t =
|
|
577
|
+
function ae(e) {
|
|
578
|
+
for (var t = an = e; t.parent !== null; ) {
|
|
552
579
|
t = t.parent;
|
|
553
|
-
var
|
|
554
|
-
if (
|
|
580
|
+
var n = t.f;
|
|
581
|
+
if (mn && t === k && (n & Ne) !== 0 && (n & kr) === 0)
|
|
555
582
|
return;
|
|
556
|
-
if ((
|
|
557
|
-
if ((
|
|
558
|
-
t.f ^=
|
|
583
|
+
if ((n & (je | me)) !== 0) {
|
|
584
|
+
if ((n & R) === 0) return;
|
|
585
|
+
t.f ^= R;
|
|
559
586
|
}
|
|
560
587
|
}
|
|
561
|
-
|
|
588
|
+
V.push(t);
|
|
562
589
|
}
|
|
563
|
-
function
|
|
564
|
-
if (!((e.f &
|
|
565
|
-
|
|
566
|
-
for (var
|
|
567
|
-
|
|
590
|
+
function Dr(e, t) {
|
|
591
|
+
if (!((e.f & me) !== 0 && (e.f & R) !== 0)) {
|
|
592
|
+
(e.f & L) !== 0 ? t.d.push(e) : (e.f & ue) !== 0 && t.m.push(e), A(e, R);
|
|
593
|
+
for (var n = e.first; n !== null; )
|
|
594
|
+
Dr(n, t), n = n.next;
|
|
568
595
|
}
|
|
569
596
|
}
|
|
570
|
-
function
|
|
571
|
-
let t = 0,
|
|
597
|
+
function xi(e) {
|
|
598
|
+
let t = 0, n = Ft(0), r;
|
|
572
599
|
return () => {
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
t -= 1, t === 0 && (
|
|
600
|
+
jn() && (h(n), Vn(() => (t === 0 && (r = Hn(() => e(() => At(n)))), t += 1, () => {
|
|
601
|
+
Le(() => {
|
|
602
|
+
t -= 1, t === 0 && (r?.(), r = void 0, At(n));
|
|
576
603
|
});
|
|
577
604
|
})));
|
|
578
605
|
};
|
|
579
606
|
}
|
|
580
|
-
var
|
|
581
|
-
function
|
|
582
|
-
new
|
|
607
|
+
var ki = wt | tt | xr;
|
|
608
|
+
function $i(e, t, n) {
|
|
609
|
+
new Ei(e, t, n);
|
|
583
610
|
}
|
|
584
|
-
var
|
|
585
|
-
class
|
|
611
|
+
var q, Mt, he, Ke, ve, Q, j, pe, Te, Me, Xe, Se, ht, Je, vt, pt, ze, nn, P, Br, Fr, kn, Kt, Xt, $n;
|
|
612
|
+
class Ei {
|
|
586
613
|
/**
|
|
587
614
|
* @param {TemplateNode} node
|
|
588
615
|
* @param {BoundaryProps} props
|
|
589
616
|
* @param {((anchor: Node) => void)} children
|
|
590
617
|
*/
|
|
591
|
-
constructor(t,
|
|
592
|
-
b(this,
|
|
618
|
+
constructor(t, n, r) {
|
|
619
|
+
b(this, P);
|
|
593
620
|
/** @type {Boundary | null} */
|
|
594
|
-
|
|
595
|
-
|
|
621
|
+
$(this, "parent");
|
|
622
|
+
$(this, "is_pending", !1);
|
|
596
623
|
/** @type {TemplateNode} */
|
|
597
|
-
b(this,
|
|
624
|
+
b(this, q);
|
|
598
625
|
/** @type {TemplateNode | null} */
|
|
599
|
-
b(this,
|
|
626
|
+
b(this, Mt, T ? E : null);
|
|
600
627
|
/** @type {BoundaryProps} */
|
|
601
|
-
b(this,
|
|
628
|
+
b(this, he);
|
|
602
629
|
/** @type {((anchor: Node) => void)} */
|
|
603
|
-
b(this,
|
|
630
|
+
b(this, Ke);
|
|
604
631
|
/** @type {Effect} */
|
|
605
|
-
b(this,
|
|
632
|
+
b(this, ve);
|
|
606
633
|
/** @type {Effect | null} */
|
|
607
634
|
b(this, Q, null);
|
|
608
635
|
/** @type {Effect | null} */
|
|
609
|
-
b(this,
|
|
636
|
+
b(this, j, null);
|
|
610
637
|
/** @type {Effect | null} */
|
|
611
|
-
b(this,
|
|
638
|
+
b(this, pe, null);
|
|
612
639
|
/** @type {DocumentFragment | null} */
|
|
613
|
-
b(this,
|
|
640
|
+
b(this, Te, null);
|
|
614
641
|
/** @type {TemplateNode | null} */
|
|
615
|
-
b(this,
|
|
616
|
-
b(this,
|
|
617
|
-
b(this,
|
|
642
|
+
b(this, Me, null);
|
|
643
|
+
b(this, Xe, 0);
|
|
644
|
+
b(this, Se, 0);
|
|
618
645
|
b(this, ht, !1);
|
|
619
|
-
b(this,
|
|
646
|
+
b(this, Je, !1);
|
|
620
647
|
/** @type {Set<Effect>} */
|
|
621
648
|
b(this, vt, /* @__PURE__ */ new Set());
|
|
622
649
|
/** @type {Set<Effect>} */
|
|
@@ -628,37 +655,37 @@ class zi {
|
|
|
628
655
|
* calls followed by no-op flushes
|
|
629
656
|
* @type {Source<number> | null}
|
|
630
657
|
*/
|
|
631
|
-
b(this,
|
|
632
|
-
b(this,
|
|
633
|
-
g(this,
|
|
658
|
+
b(this, ze, null);
|
|
659
|
+
b(this, nn, xi(() => (g(this, ze, Ft(a(this, Xe))), () => {
|
|
660
|
+
g(this, ze, null);
|
|
634
661
|
})));
|
|
635
|
-
g(this,
|
|
636
|
-
|
|
637
|
-
if (
|
|
638
|
-
const i = a(this,
|
|
639
|
-
|
|
640
|
-
i.nodeType ===
|
|
641
|
-
i.data ===
|
|
662
|
+
g(this, q, t), g(this, he, n), g(this, Ke, r), this.parent = /** @type {Effect} */
|
|
663
|
+
k.b, this.is_pending = !!a(this, he).pending, g(this, ve, Jr(() => {
|
|
664
|
+
if (k.b = this, T) {
|
|
665
|
+
const i = a(this, Mt);
|
|
666
|
+
In(), /** @type {Comment} */
|
|
667
|
+
i.nodeType === Bt && /** @type {Comment} */
|
|
668
|
+
i.data === On ? N(this, P, Fr).call(this) : (N(this, P, Br).call(this), a(this, Se) === 0 && (this.is_pending = !1));
|
|
642
669
|
} else {
|
|
643
|
-
var
|
|
670
|
+
var s = N(this, P, kn).call(this);
|
|
644
671
|
try {
|
|
645
|
-
g(this, Q,
|
|
672
|
+
g(this, Q, $e(() => r(s)));
|
|
646
673
|
} catch (i) {
|
|
647
674
|
this.error(i);
|
|
648
675
|
}
|
|
649
|
-
a(this,
|
|
676
|
+
a(this, Se) > 0 ? N(this, P, Xt).call(this) : this.is_pending = !1;
|
|
650
677
|
}
|
|
651
678
|
return () => {
|
|
652
|
-
a(this,
|
|
679
|
+
a(this, Me)?.remove();
|
|
653
680
|
};
|
|
654
|
-
},
|
|
681
|
+
}, ki)), T && g(this, q, E);
|
|
655
682
|
}
|
|
656
683
|
/**
|
|
657
684
|
* Defer an effect inside a pending boundary until the boundary resolves
|
|
658
685
|
* @param {Effect} effect
|
|
659
686
|
*/
|
|
660
687
|
defer_effect(t) {
|
|
661
|
-
|
|
688
|
+
Rr(t, a(this, vt), a(this, pt));
|
|
662
689
|
}
|
|
663
690
|
/**
|
|
664
691
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -668,7 +695,7 @@ class zi {
|
|
|
668
695
|
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
669
696
|
}
|
|
670
697
|
has_pending_snippet() {
|
|
671
|
-
return !!a(this,
|
|
698
|
+
return !!a(this, he).pending;
|
|
672
699
|
}
|
|
673
700
|
/**
|
|
674
701
|
* Update the source that powers `$effect.pending()` inside this boundary,
|
|
@@ -677,48 +704,48 @@ class zi {
|
|
|
677
704
|
* @param {1 | -1} d
|
|
678
705
|
*/
|
|
679
706
|
update_pending_count(t) {
|
|
680
|
-
|
|
681
|
-
g(this, ht, !1), a(this,
|
|
707
|
+
N(this, P, $n).call(this, t), g(this, Xe, a(this, Xe) + t), !(!a(this, ze) || a(this, ht)) && (g(this, ht, !0), Le(() => {
|
|
708
|
+
g(this, ht, !1), a(this, ze) && tn(a(this, ze), a(this, Xe));
|
|
682
709
|
}));
|
|
683
710
|
}
|
|
684
711
|
get_effect_pending() {
|
|
685
|
-
return a(this,
|
|
712
|
+
return a(this, nn).call(this), h(
|
|
686
713
|
/** @type {Source<number>} */
|
|
687
|
-
a(this,
|
|
714
|
+
a(this, ze)
|
|
688
715
|
);
|
|
689
716
|
}
|
|
690
717
|
/** @param {unknown} error */
|
|
691
718
|
error(t) {
|
|
692
|
-
var
|
|
693
|
-
let
|
|
694
|
-
if (a(this,
|
|
719
|
+
var n = a(this, he).onerror;
|
|
720
|
+
let r = a(this, he).failed;
|
|
721
|
+
if (a(this, Je) || !n && !r)
|
|
695
722
|
throw t;
|
|
696
|
-
a(this, Q) && (
|
|
723
|
+
a(this, Q) && (H(a(this, Q)), g(this, Q, null)), a(this, j) && (H(a(this, j)), g(this, j, null)), a(this, pe) && (H(a(this, pe)), g(this, pe, null)), T && (ne(
|
|
697
724
|
/** @type {TemplateNode} */
|
|
698
|
-
a(this,
|
|
699
|
-
),
|
|
700
|
-
var
|
|
725
|
+
a(this, Mt)
|
|
726
|
+
), bn(), ne(Er()));
|
|
727
|
+
var s = !1, i = !1;
|
|
701
728
|
const o = () => {
|
|
702
|
-
if (
|
|
703
|
-
|
|
729
|
+
if (s) {
|
|
730
|
+
vi();
|
|
704
731
|
return;
|
|
705
732
|
}
|
|
706
|
-
|
|
707
|
-
g(this,
|
|
708
|
-
}), this.is_pending = this.has_pending_snippet(), g(this, Q,
|
|
733
|
+
s = !0, i && hi(), Pe.ensure(), g(this, Xe, 0), a(this, pe) !== null && Ct(a(this, pe), () => {
|
|
734
|
+
g(this, pe, null);
|
|
735
|
+
}), this.is_pending = this.has_pending_snippet(), g(this, Q, N(this, P, Kt).call(this, () => (g(this, Je, !1), $e(() => a(this, Ke).call(this, a(this, q)))))), a(this, Se) > 0 ? N(this, P, Xt).call(this) : this.is_pending = !1;
|
|
709
736
|
};
|
|
710
|
-
|
|
737
|
+
Le(() => {
|
|
711
738
|
try {
|
|
712
|
-
i = !0,
|
|
739
|
+
i = !0, n?.(t, o), i = !1;
|
|
713
740
|
} catch (l) {
|
|
714
|
-
mt(l, a(this,
|
|
741
|
+
mt(l, a(this, ve) && a(this, ve).parent);
|
|
715
742
|
}
|
|
716
|
-
|
|
717
|
-
|
|
743
|
+
r && g(this, pe, N(this, P, Kt).call(this, () => {
|
|
744
|
+
Pe.ensure(), g(this, Je, !0);
|
|
718
745
|
try {
|
|
719
|
-
return
|
|
720
|
-
|
|
721
|
-
a(this,
|
|
746
|
+
return $e(() => {
|
|
747
|
+
r(
|
|
748
|
+
a(this, q),
|
|
722
749
|
() => t,
|
|
723
750
|
() => o
|
|
724
751
|
);
|
|
@@ -727,129 +754,129 @@ class zi {
|
|
|
727
754
|
return mt(
|
|
728
755
|
l,
|
|
729
756
|
/** @type {Effect} */
|
|
730
|
-
a(this,
|
|
757
|
+
a(this, ve).parent
|
|
731
758
|
), null;
|
|
732
759
|
} finally {
|
|
733
|
-
g(this,
|
|
760
|
+
g(this, Je, !1);
|
|
734
761
|
}
|
|
735
762
|
}));
|
|
736
763
|
});
|
|
737
764
|
}
|
|
738
765
|
}
|
|
739
|
-
|
|
766
|
+
q = new WeakMap(), Mt = new WeakMap(), he = new WeakMap(), Ke = new WeakMap(), ve = new WeakMap(), Q = new WeakMap(), j = new WeakMap(), pe = new WeakMap(), Te = new WeakMap(), Me = new WeakMap(), Xe = new WeakMap(), Se = new WeakMap(), ht = new WeakMap(), Je = new WeakMap(), vt = new WeakMap(), pt = new WeakMap(), ze = new WeakMap(), nn = new WeakMap(), P = new WeakSet(), Br = function() {
|
|
740
767
|
try {
|
|
741
|
-
g(this, Q,
|
|
768
|
+
g(this, Q, $e(() => a(this, Ke).call(this, a(this, q))));
|
|
742
769
|
} catch (t) {
|
|
743
770
|
this.error(t);
|
|
744
771
|
}
|
|
745
|
-
},
|
|
746
|
-
const t = a(this,
|
|
747
|
-
t && (g(this,
|
|
748
|
-
var
|
|
749
|
-
g(this, Q,
|
|
772
|
+
}, Fr = function() {
|
|
773
|
+
const t = a(this, he).pending;
|
|
774
|
+
t && (g(this, j, $e(() => t(a(this, q)))), Le(() => {
|
|
775
|
+
var n = N(this, P, kn).call(this);
|
|
776
|
+
g(this, Q, N(this, P, Kt).call(this, () => (Pe.ensure(), $e(() => a(this, Ke).call(this, n))))), a(this, Se) > 0 ? N(this, P, Xt).call(this) : (Ct(
|
|
750
777
|
/** @type {Effect} */
|
|
751
|
-
a(this,
|
|
778
|
+
a(this, j),
|
|
752
779
|
() => {
|
|
753
|
-
g(this,
|
|
780
|
+
g(this, j, null);
|
|
754
781
|
}
|
|
755
782
|
), this.is_pending = !1);
|
|
756
783
|
}));
|
|
757
|
-
},
|
|
758
|
-
var t = a(this,
|
|
759
|
-
return this.is_pending && (g(this,
|
|
784
|
+
}, kn = function() {
|
|
785
|
+
var t = a(this, q);
|
|
786
|
+
return this.is_pending && (g(this, Me, fe()), a(this, q).before(a(this, Me)), t = a(this, Me)), t;
|
|
760
787
|
}, /**
|
|
761
788
|
* @param {() => Effect | null} fn
|
|
762
789
|
*/
|
|
763
|
-
|
|
764
|
-
var
|
|
765
|
-
|
|
790
|
+
Kt = function(t) {
|
|
791
|
+
var n = k, r = m, s = K;
|
|
792
|
+
we(a(this, ve)), re(a(this, ve)), bt(a(this, ve).ctx);
|
|
766
793
|
try {
|
|
767
794
|
return t();
|
|
768
795
|
} catch (i) {
|
|
769
|
-
return
|
|
796
|
+
return Pr(i), null;
|
|
770
797
|
} finally {
|
|
771
|
-
|
|
798
|
+
we(n), re(r), bt(s);
|
|
772
799
|
}
|
|
773
|
-
},
|
|
800
|
+
}, Xt = function() {
|
|
774
801
|
const t = (
|
|
775
802
|
/** @type {(anchor: Node) => void} */
|
|
776
|
-
a(this,
|
|
803
|
+
a(this, he).pending
|
|
777
804
|
);
|
|
778
|
-
a(this, Q) !== null && (g(this,
|
|
805
|
+
a(this, Q) !== null && (g(this, Te, document.createDocumentFragment()), a(this, Te).append(
|
|
779
806
|
/** @type {TemplateNode} */
|
|
780
|
-
a(this,
|
|
781
|
-
),
|
|
807
|
+
a(this, Me)
|
|
808
|
+
), ns(a(this, Q), a(this, Te))), a(this, j) === null && g(this, j, $e(() => t(a(this, q))));
|
|
782
809
|
}, /**
|
|
783
810
|
* Updates the pending count associated with the currently visible pending snippet,
|
|
784
811
|
* if any, such that we can replace the snippet with content once work is done
|
|
785
812
|
* @param {1 | -1} d
|
|
786
813
|
*/
|
|
787
|
-
|
|
788
|
-
var
|
|
814
|
+
$n = function(t) {
|
|
815
|
+
var n;
|
|
789
816
|
if (!this.has_pending_snippet()) {
|
|
790
|
-
this.parent &&
|
|
817
|
+
this.parent && N(n = this.parent, P, $n).call(n, t);
|
|
791
818
|
return;
|
|
792
819
|
}
|
|
793
|
-
if (g(this,
|
|
820
|
+
if (g(this, Se, a(this, Se) + t), a(this, Se) === 0) {
|
|
794
821
|
this.is_pending = !1;
|
|
795
|
-
for (const
|
|
796
|
-
|
|
797
|
-
for (const
|
|
798
|
-
|
|
799
|
-
a(this, vt).clear(), a(this, pt).clear(), a(this,
|
|
800
|
-
g(this,
|
|
801
|
-
}), a(this,
|
|
822
|
+
for (const r of a(this, vt))
|
|
823
|
+
A(r, L), ae(r);
|
|
824
|
+
for (const r of a(this, pt))
|
|
825
|
+
A(r, ue), ae(r);
|
|
826
|
+
a(this, vt).clear(), a(this, pt).clear(), a(this, j) && Ct(a(this, j), () => {
|
|
827
|
+
g(this, j, null);
|
|
828
|
+
}), a(this, Te) && (a(this, q).before(a(this, Te)), g(this, Te, null));
|
|
802
829
|
}
|
|
803
830
|
};
|
|
804
|
-
function
|
|
805
|
-
const
|
|
831
|
+
function Ti(e, t, n, r) {
|
|
832
|
+
const s = Dn;
|
|
806
833
|
var i = e.filter((c) => !c.settled);
|
|
807
|
-
if (
|
|
808
|
-
|
|
834
|
+
if (n.length === 0 && i.length === 0) {
|
|
835
|
+
r(t.map(s));
|
|
809
836
|
return;
|
|
810
837
|
}
|
|
811
|
-
var o =
|
|
838
|
+
var o = z, l = (
|
|
812
839
|
/** @type {Effect} */
|
|
813
|
-
|
|
814
|
-
),
|
|
840
|
+
k
|
|
841
|
+
), u = Si(), f = i.length === 1 ? i[0].promise : i.length > 1 ? Promise.all(i.map((c) => c.promise)) : null;
|
|
815
842
|
function d(c) {
|
|
816
|
-
|
|
843
|
+
u();
|
|
817
844
|
try {
|
|
818
|
-
|
|
819
|
-
} catch (
|
|
820
|
-
(l.f &
|
|
845
|
+
r(c);
|
|
846
|
+
} catch (v) {
|
|
847
|
+
(l.f & Ce) === 0 && mt(v, l);
|
|
821
848
|
}
|
|
822
|
-
o?.deactivate(),
|
|
849
|
+
o?.deactivate(), En();
|
|
823
850
|
}
|
|
824
|
-
if (
|
|
825
|
-
|
|
851
|
+
if (n.length === 0) {
|
|
852
|
+
f.then(() => d(t.map(s)));
|
|
826
853
|
return;
|
|
827
854
|
}
|
|
828
|
-
function
|
|
829
|
-
|
|
855
|
+
function p() {
|
|
856
|
+
u(), Promise.all(n.map((c) => /* @__PURE__ */ zi(c))).then((c) => d([...t.map(s), ...c])).catch((c) => mt(c, l));
|
|
830
857
|
}
|
|
831
|
-
|
|
858
|
+
f ? f.then(p) : p();
|
|
832
859
|
}
|
|
833
|
-
function
|
|
834
|
-
var e =
|
|
860
|
+
function Si() {
|
|
861
|
+
var e = k, t = m, n = K, r = z;
|
|
835
862
|
return function(i = !0) {
|
|
836
|
-
|
|
863
|
+
we(e), re(t), bt(n), i && r?.activate();
|
|
837
864
|
};
|
|
838
865
|
}
|
|
839
|
-
function
|
|
840
|
-
|
|
866
|
+
function En() {
|
|
867
|
+
we(null), re(null), bt(null);
|
|
841
868
|
}
|
|
842
869
|
// @__NO_SIDE_EFFECTS__
|
|
843
|
-
function
|
|
844
|
-
var t = I |
|
|
870
|
+
function Dn(e) {
|
|
871
|
+
var t = I | L, n = m !== null && (m.f & I) !== 0 ? (
|
|
845
872
|
/** @type {Derived} */
|
|
846
873
|
m
|
|
847
874
|
) : null;
|
|
848
|
-
return
|
|
875
|
+
return k !== null && (k.f |= tt), {
|
|
849
876
|
ctx: K,
|
|
850
877
|
deps: null,
|
|
851
878
|
effects: null,
|
|
852
|
-
equals:
|
|
879
|
+
equals: Tr,
|
|
853
880
|
f: t,
|
|
854
881
|
fn: e,
|
|
855
882
|
reactions: null,
|
|
@@ -859,92 +886,92 @@ function jr(e) {
|
|
|
859
886
|
M
|
|
860
887
|
),
|
|
861
888
|
wv: 0,
|
|
862
|
-
parent:
|
|
889
|
+
parent: n ?? k,
|
|
863
890
|
ac: null
|
|
864
891
|
};
|
|
865
892
|
}
|
|
866
893
|
// @__NO_SIDE_EFFECTS__
|
|
867
|
-
function
|
|
868
|
-
let
|
|
894
|
+
function zi(e, t, n) {
|
|
895
|
+
let r = (
|
|
869
896
|
/** @type {Effect | null} */
|
|
870
|
-
|
|
897
|
+
k
|
|
871
898
|
);
|
|
872
|
-
|
|
873
|
-
var
|
|
899
|
+
r === null && si();
|
|
900
|
+
var s = (
|
|
874
901
|
/** @type {Boundary} */
|
|
875
|
-
|
|
902
|
+
r.b
|
|
876
903
|
), i = (
|
|
877
904
|
/** @type {Promise<V>} */
|
|
878
905
|
/** @type {unknown} */
|
|
879
906
|
void 0
|
|
880
|
-
), o =
|
|
907
|
+
), o = Ft(
|
|
881
908
|
/** @type {V} */
|
|
882
909
|
M
|
|
883
|
-
), l = !m,
|
|
884
|
-
return
|
|
885
|
-
var
|
|
886
|
-
i =
|
|
910
|
+
), l = !m, u = /* @__PURE__ */ new Map();
|
|
911
|
+
return Gi(() => {
|
|
912
|
+
var f = mr();
|
|
913
|
+
i = f.promise;
|
|
887
914
|
try {
|
|
888
|
-
Promise.resolve(e()).then(
|
|
889
|
-
d ===
|
|
915
|
+
Promise.resolve(e()).then(f.resolve, f.reject).then(() => {
|
|
916
|
+
d === z && d.committed && d.deactivate(), En();
|
|
890
917
|
});
|
|
891
|
-
} catch (
|
|
892
|
-
|
|
918
|
+
} catch (v) {
|
|
919
|
+
f.reject(v), En();
|
|
893
920
|
}
|
|
894
921
|
var d = (
|
|
895
922
|
/** @type {Batch} */
|
|
896
|
-
|
|
923
|
+
z
|
|
897
924
|
);
|
|
898
925
|
if (l) {
|
|
899
|
-
var
|
|
900
|
-
|
|
926
|
+
var p = s.is_rendered();
|
|
927
|
+
s.update_pending_count(1), d.increment(p), u.get(d)?.reject(Ge), u.delete(d), u.set(d, f);
|
|
901
928
|
}
|
|
902
|
-
const c = (
|
|
929
|
+
const c = (v, w = void 0) => {
|
|
903
930
|
if (d.activate(), w)
|
|
904
|
-
w !==
|
|
931
|
+
w !== Ge && (o.f |= Ie, tn(o, w));
|
|
905
932
|
else {
|
|
906
|
-
(o.f &
|
|
907
|
-
for (const [
|
|
908
|
-
if (
|
|
909
|
-
S.reject(
|
|
933
|
+
(o.f & Ie) !== 0 && (o.f ^= Ie), tn(o, v);
|
|
934
|
+
for (const [x, S] of u) {
|
|
935
|
+
if (u.delete(x), x === d) break;
|
|
936
|
+
S.reject(Ge);
|
|
910
937
|
}
|
|
911
938
|
}
|
|
912
|
-
l && (
|
|
939
|
+
l && (s.update_pending_count(-1), d.decrement(p));
|
|
913
940
|
};
|
|
914
|
-
|
|
941
|
+
f.promise.then(c, (v) => c(null, v || "unknown"));
|
|
915
942
|
}), Fi(() => {
|
|
916
|
-
for (const
|
|
917
|
-
|
|
918
|
-
}), new Promise((
|
|
919
|
-
function d(
|
|
943
|
+
for (const f of u.values())
|
|
944
|
+
f.reject(Ge);
|
|
945
|
+
}), new Promise((f) => {
|
|
946
|
+
function d(p) {
|
|
920
947
|
function c() {
|
|
921
|
-
|
|
948
|
+
p === i ? f(o) : d(i);
|
|
922
949
|
}
|
|
923
|
-
|
|
950
|
+
p.then(c, c);
|
|
924
951
|
}
|
|
925
952
|
d(i);
|
|
926
953
|
});
|
|
927
954
|
}
|
|
928
955
|
// @__NO_SIDE_EFFECTS__
|
|
929
956
|
function Ai(e) {
|
|
930
|
-
const t = /* @__PURE__ */
|
|
931
|
-
return
|
|
957
|
+
const t = /* @__PURE__ */ Dn(e);
|
|
958
|
+
return rs(t), t;
|
|
932
959
|
}
|
|
933
|
-
function
|
|
960
|
+
function Ci(e) {
|
|
934
961
|
var t = e.effects;
|
|
935
962
|
if (t !== null) {
|
|
936
963
|
e.effects = null;
|
|
937
|
-
for (var
|
|
938
|
-
|
|
964
|
+
for (var n = 0; n < t.length; n += 1)
|
|
965
|
+
H(
|
|
939
966
|
/** @type {Effect} */
|
|
940
|
-
t[
|
|
967
|
+
t[n]
|
|
941
968
|
);
|
|
942
969
|
}
|
|
943
970
|
}
|
|
944
|
-
function
|
|
971
|
+
function Pi(e) {
|
|
945
972
|
for (var t = e.parent; t !== null; ) {
|
|
946
973
|
if ((t.f & I) === 0)
|
|
947
|
-
return (t.f &
|
|
974
|
+
return (t.f & Ce) === 0 ? (
|
|
948
975
|
/** @type {Effect} */
|
|
949
976
|
t
|
|
950
977
|
) : null;
|
|
@@ -952,162 +979,172 @@ function Oi(e) {
|
|
|
952
979
|
}
|
|
953
980
|
return null;
|
|
954
981
|
}
|
|
955
|
-
function
|
|
956
|
-
var t,
|
|
957
|
-
|
|
982
|
+
function Bn(e) {
|
|
983
|
+
var t, n = k;
|
|
984
|
+
we(Pi(e));
|
|
958
985
|
try {
|
|
959
|
-
e.f &= ~
|
|
986
|
+
e.f &= ~et, Ci(e), t = as(e);
|
|
960
987
|
} finally {
|
|
961
|
-
|
|
988
|
+
we(n);
|
|
962
989
|
}
|
|
963
990
|
return t;
|
|
964
991
|
}
|
|
965
|
-
function
|
|
966
|
-
var t =
|
|
967
|
-
if (!e.equals(t) && (e.wv = is(), (!
|
|
968
|
-
|
|
992
|
+
function jr(e) {
|
|
993
|
+
var t = Bn(e);
|
|
994
|
+
if (!e.equals(t) && (e.wv = is(), (!z?.is_fork || e.deps === null) && (e.v = t, e.deps === null))) {
|
|
995
|
+
A(e, R);
|
|
969
996
|
return;
|
|
970
997
|
}
|
|
971
|
-
|
|
998
|
+
Fe || (oe !== null ? (jn() || z?.is_fork) && oe.set(e, t) : Ln(e));
|
|
999
|
+
}
|
|
1000
|
+
function Ni(e) {
|
|
1001
|
+
if (e.effects !== null)
|
|
1002
|
+
for (const t of e.effects)
|
|
1003
|
+
(t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Ge), t.teardown = Qs, t.ac = null, Nt(t, 0), Gn(t));
|
|
972
1004
|
}
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
1005
|
+
function Vr(e) {
|
|
1006
|
+
if (e.effects !== null)
|
|
1007
|
+
for (const t of e.effects)
|
|
1008
|
+
t.teardown && xt(t);
|
|
1009
|
+
}
|
|
1010
|
+
let Tn = /* @__PURE__ */ new Set();
|
|
1011
|
+
const De = /* @__PURE__ */ new Map();
|
|
1012
|
+
let Gr = !1;
|
|
1013
|
+
function Ft(e, t) {
|
|
1014
|
+
var n = {
|
|
978
1015
|
f: 0,
|
|
979
1016
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
980
1017
|
v: e,
|
|
981
1018
|
reactions: null,
|
|
982
|
-
equals:
|
|
1019
|
+
equals: Tr,
|
|
983
1020
|
rv: 0,
|
|
984
1021
|
wv: 0
|
|
985
1022
|
};
|
|
986
|
-
return
|
|
1023
|
+
return n;
|
|
987
1024
|
}
|
|
988
1025
|
// @__NO_SIDE_EFFECTS__
|
|
989
|
-
function
|
|
990
|
-
const
|
|
991
|
-
return
|
|
1026
|
+
function C(e, t) {
|
|
1027
|
+
const n = Ft(e);
|
|
1028
|
+
return rs(n), n;
|
|
992
1029
|
}
|
|
993
1030
|
// @__NO_SIDE_EFFECTS__
|
|
994
|
-
function Ri(e, t = !1,
|
|
995
|
-
const
|
|
996
|
-
return t || (
|
|
1031
|
+
function Ri(e, t = !1, n = !0) {
|
|
1032
|
+
const r = Ft(e);
|
|
1033
|
+
return t || (r.equals = gi), r;
|
|
997
1034
|
}
|
|
998
|
-
function
|
|
1035
|
+
function y(e, t, n = !1) {
|
|
999
1036
|
m !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1000
1037
|
// to ensure we error if state is set inside an inspect effect
|
|
1001
|
-
(!
|
|
1002
|
-
let
|
|
1003
|
-
return
|
|
1038
|
+
(!le || (m.f & tr) !== 0) && Ar() && (m.f & (I | Ne | Mn | tr)) !== 0 && (te === null || !gt.call(te, e)) && di();
|
|
1039
|
+
let r = n ? Ye(t) : t;
|
|
1040
|
+
return tn(e, r);
|
|
1004
1041
|
}
|
|
1005
|
-
function
|
|
1042
|
+
function tn(e, t) {
|
|
1006
1043
|
if (!e.equals(t)) {
|
|
1007
|
-
var
|
|
1008
|
-
|
|
1009
|
-
var
|
|
1010
|
-
if (
|
|
1011
|
-
const
|
|
1044
|
+
var n = e.v;
|
|
1045
|
+
Fe ? De.set(e, t) : De.set(e, n), e.v = t;
|
|
1046
|
+
var r = Pe.ensure();
|
|
1047
|
+
if (r.capture(e, n), (e.f & I) !== 0) {
|
|
1048
|
+
const s = (
|
|
1012
1049
|
/** @type {Derived} */
|
|
1013
1050
|
e
|
|
1014
1051
|
);
|
|
1015
|
-
(e.f &
|
|
1052
|
+
(e.f & L) !== 0 && Bn(s), Ln(s);
|
|
1016
1053
|
}
|
|
1017
|
-
e.wv = is(),
|
|
1054
|
+
e.wv = is(), Hr(e, L), k !== null && (k.f & R) !== 0 && (k.f & (me | je)) === 0 && (J === null ? qi([e]) : J.push(e)), !r.is_fork && Tn.size > 0 && !Gr && Oi();
|
|
1018
1055
|
}
|
|
1019
1056
|
return t;
|
|
1020
1057
|
}
|
|
1021
|
-
function
|
|
1022
|
-
|
|
1023
|
-
for (const e of
|
|
1024
|
-
(e.f &
|
|
1025
|
-
|
|
1026
|
-
}
|
|
1027
|
-
function
|
|
1028
|
-
|
|
1029
|
-
}
|
|
1030
|
-
function
|
|
1031
|
-
var
|
|
1032
|
-
if (
|
|
1033
|
-
for (var
|
|
1034
|
-
var i =
|
|
1035
|
-
if (l &&
|
|
1036
|
-
var
|
|
1058
|
+
function Oi() {
|
|
1059
|
+
Gr = !1;
|
|
1060
|
+
for (const e of Tn)
|
|
1061
|
+
(e.f & R) !== 0 && A(e, ue), jt(e) && xt(e);
|
|
1062
|
+
Tn.clear();
|
|
1063
|
+
}
|
|
1064
|
+
function At(e) {
|
|
1065
|
+
y(e, e.v + 1);
|
|
1066
|
+
}
|
|
1067
|
+
function Hr(e, t) {
|
|
1068
|
+
var n = e.reactions;
|
|
1069
|
+
if (n !== null)
|
|
1070
|
+
for (var r = n.length, s = 0; s < r; s++) {
|
|
1071
|
+
var i = n[s], o = i.f, l = (o & L) === 0;
|
|
1072
|
+
if (l && A(i, t), (o & I) !== 0) {
|
|
1073
|
+
var u = (
|
|
1037
1074
|
/** @type {Derived} */
|
|
1038
1075
|
i
|
|
1039
1076
|
);
|
|
1040
|
-
|
|
1041
|
-
} else l && ((o &
|
|
1077
|
+
oe?.delete(u), (o & et) === 0 && (o & ee && (i.f |= et), Hr(u, ue));
|
|
1078
|
+
} else l && ((o & Ne) !== 0 && ke !== null && ke.add(
|
|
1042
1079
|
/** @type {Effect} */
|
|
1043
1080
|
i
|
|
1044
|
-
),
|
|
1081
|
+
), ae(
|
|
1045
1082
|
/** @type {Effect} */
|
|
1046
1083
|
i
|
|
1047
1084
|
));
|
|
1048
1085
|
}
|
|
1049
1086
|
}
|
|
1050
|
-
function
|
|
1051
|
-
if (typeof e != "object" || e === null ||
|
|
1087
|
+
function Ye(e) {
|
|
1088
|
+
if (typeof e != "object" || e === null || Wt in e)
|
|
1052
1089
|
return e;
|
|
1053
|
-
const t =
|
|
1054
|
-
if (t !==
|
|
1090
|
+
const t = br(e);
|
|
1091
|
+
if (t !== Xs && t !== Js)
|
|
1055
1092
|
return e;
|
|
1056
|
-
var
|
|
1057
|
-
if (
|
|
1093
|
+
var n = /* @__PURE__ */ new Map(), r = Us(e), s = /* @__PURE__ */ C(0), i = Ze, o = (l) => {
|
|
1094
|
+
if (Ze === i)
|
|
1058
1095
|
return l();
|
|
1059
|
-
var
|
|
1060
|
-
|
|
1096
|
+
var u = m, f = Ze;
|
|
1097
|
+
re(null), ar(i);
|
|
1061
1098
|
var d = l();
|
|
1062
|
-
return
|
|
1099
|
+
return re(u), ar(f), d;
|
|
1063
1100
|
};
|
|
1064
|
-
return
|
|
1101
|
+
return r && n.set("length", /* @__PURE__ */ C(
|
|
1065
1102
|
/** @type {any[]} */
|
|
1066
1103
|
e.length
|
|
1067
1104
|
)), new Proxy(
|
|
1068
1105
|
/** @type {any} */
|
|
1069
1106
|
e,
|
|
1070
1107
|
{
|
|
1071
|
-
defineProperty(l,
|
|
1072
|
-
(!("value" in
|
|
1073
|
-
var d =
|
|
1074
|
-
return d === void 0 ?
|
|
1075
|
-
var
|
|
1076
|
-
return
|
|
1077
|
-
}) :
|
|
1108
|
+
defineProperty(l, u, f) {
|
|
1109
|
+
(!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) && fi();
|
|
1110
|
+
var d = n.get(u);
|
|
1111
|
+
return d === void 0 ? o(() => {
|
|
1112
|
+
var p = /* @__PURE__ */ C(f.value);
|
|
1113
|
+
return n.set(u, p), p;
|
|
1114
|
+
}) : y(d, f.value, !0), !0;
|
|
1078
1115
|
},
|
|
1079
|
-
deleteProperty(l,
|
|
1080
|
-
var
|
|
1081
|
-
if (
|
|
1082
|
-
if (
|
|
1083
|
-
const d = o(() => /* @__PURE__ */
|
|
1084
|
-
|
|
1116
|
+
deleteProperty(l, u) {
|
|
1117
|
+
var f = n.get(u);
|
|
1118
|
+
if (f === void 0) {
|
|
1119
|
+
if (u in l) {
|
|
1120
|
+
const d = o(() => /* @__PURE__ */ C(M));
|
|
1121
|
+
n.set(u, d), At(s);
|
|
1085
1122
|
}
|
|
1086
1123
|
} else
|
|
1087
|
-
|
|
1124
|
+
y(f, M), At(s);
|
|
1088
1125
|
return !0;
|
|
1089
1126
|
},
|
|
1090
|
-
get(l,
|
|
1091
|
-
if (
|
|
1127
|
+
get(l, u, f) {
|
|
1128
|
+
if (u === Wt)
|
|
1092
1129
|
return e;
|
|
1093
|
-
var d =
|
|
1094
|
-
if (d === void 0 && (!
|
|
1095
|
-
var
|
|
1130
|
+
var d = n.get(u), p = u in l;
|
|
1131
|
+
if (d === void 0 && (!p || lt(l, u)?.writable) && (d = o(() => {
|
|
1132
|
+
var v = Ye(p ? l[u] : M), w = /* @__PURE__ */ C(v);
|
|
1096
1133
|
return w;
|
|
1097
|
-
}),
|
|
1134
|
+
}), n.set(u, d)), d !== void 0) {
|
|
1098
1135
|
var c = h(d);
|
|
1099
1136
|
return c === M ? void 0 : c;
|
|
1100
1137
|
}
|
|
1101
|
-
return Reflect.get(l,
|
|
1138
|
+
return Reflect.get(l, u, f);
|
|
1102
1139
|
},
|
|
1103
|
-
getOwnPropertyDescriptor(l,
|
|
1104
|
-
var
|
|
1105
|
-
if (
|
|
1106
|
-
var d =
|
|
1107
|
-
d && (
|
|
1108
|
-
} else if (
|
|
1109
|
-
var
|
|
1110
|
-
if (
|
|
1140
|
+
getOwnPropertyDescriptor(l, u) {
|
|
1141
|
+
var f = Reflect.getOwnPropertyDescriptor(l, u);
|
|
1142
|
+
if (f && "value" in f) {
|
|
1143
|
+
var d = n.get(u);
|
|
1144
|
+
d && (f.value = h(d));
|
|
1145
|
+
} else if (f === void 0) {
|
|
1146
|
+
var p = n.get(u), c = p?.v;
|
|
1147
|
+
if (p !== void 0 && c !== M)
|
|
1111
1148
|
return {
|
|
1112
1149
|
enumerable: !0,
|
|
1113
1150
|
configurable: !0,
|
|
@@ -1115,163 +1152,169 @@ function Ve(e) {
|
|
|
1115
1152
|
writable: !0
|
|
1116
1153
|
};
|
|
1117
1154
|
}
|
|
1118
|
-
return
|
|
1155
|
+
return f;
|
|
1119
1156
|
},
|
|
1120
|
-
has(l,
|
|
1121
|
-
if (
|
|
1157
|
+
has(l, u) {
|
|
1158
|
+
if (u === Wt)
|
|
1122
1159
|
return !0;
|
|
1123
|
-
var
|
|
1124
|
-
if (
|
|
1125
|
-
|
|
1126
|
-
var c = d ?
|
|
1127
|
-
return
|
|
1128
|
-
}),
|
|
1129
|
-
var
|
|
1130
|
-
if (
|
|
1160
|
+
var f = n.get(u), d = f !== void 0 && f.v !== M || Reflect.has(l, u);
|
|
1161
|
+
if (f !== void 0 || k !== null && (!d || lt(l, u)?.writable)) {
|
|
1162
|
+
f === void 0 && (f = o(() => {
|
|
1163
|
+
var c = d ? Ye(l[u]) : M, v = /* @__PURE__ */ C(c);
|
|
1164
|
+
return v;
|
|
1165
|
+
}), n.set(u, f));
|
|
1166
|
+
var p = h(f);
|
|
1167
|
+
if (p === M)
|
|
1131
1168
|
return !1;
|
|
1132
1169
|
}
|
|
1133
1170
|
return d;
|
|
1134
1171
|
},
|
|
1135
|
-
set(l,
|
|
1136
|
-
var
|
|
1137
|
-
if (
|
|
1138
|
-
for (var
|
|
1139
|
-
|
|
1140
|
-
var w =
|
|
1141
|
-
w !== void 0 ?
|
|
1172
|
+
set(l, u, f, d) {
|
|
1173
|
+
var p = n.get(u), c = u in l;
|
|
1174
|
+
if (r && u === "length")
|
|
1175
|
+
for (var v = f; v < /** @type {Source<number>} */
|
|
1176
|
+
p.v; v += 1) {
|
|
1177
|
+
var w = n.get(v + "");
|
|
1178
|
+
w !== void 0 ? y(w, M) : v in l && (w = o(() => /* @__PURE__ */ C(M)), n.set(v + "", w));
|
|
1142
1179
|
}
|
|
1143
|
-
if (
|
|
1144
|
-
(!c ||
|
|
1180
|
+
if (p === void 0)
|
|
1181
|
+
(!c || lt(l, u)?.writable) && (p = o(() => /* @__PURE__ */ C(void 0)), y(p, Ye(f)), n.set(u, p));
|
|
1145
1182
|
else {
|
|
1146
|
-
c =
|
|
1147
|
-
var
|
|
1148
|
-
|
|
1183
|
+
c = p.v !== M;
|
|
1184
|
+
var x = o(() => Ye(f));
|
|
1185
|
+
y(p, x);
|
|
1149
1186
|
}
|
|
1150
|
-
var S = Reflect.getOwnPropertyDescriptor(l,
|
|
1151
|
-
if (S?.set && S.set.call(d,
|
|
1152
|
-
if (
|
|
1153
|
-
var
|
|
1187
|
+
var S = Reflect.getOwnPropertyDescriptor(l, u);
|
|
1188
|
+
if (S?.set && S.set.call(d, f), !c) {
|
|
1189
|
+
if (r && typeof u == "string") {
|
|
1190
|
+
var ce = (
|
|
1154
1191
|
/** @type {Source<number>} */
|
|
1155
|
-
|
|
1156
|
-
),
|
|
1157
|
-
Number.isInteger(
|
|
1192
|
+
n.get("length")
|
|
1193
|
+
), nt = Number(u);
|
|
1194
|
+
Number.isInteger(nt) && nt >= ce.v && y(ce, nt + 1);
|
|
1158
1195
|
}
|
|
1159
|
-
|
|
1196
|
+
At(s);
|
|
1160
1197
|
}
|
|
1161
1198
|
return !0;
|
|
1162
1199
|
},
|
|
1163
1200
|
ownKeys(l) {
|
|
1164
|
-
h(
|
|
1165
|
-
var
|
|
1166
|
-
var c =
|
|
1201
|
+
h(s);
|
|
1202
|
+
var u = Reflect.ownKeys(l).filter((p) => {
|
|
1203
|
+
var c = n.get(p);
|
|
1167
1204
|
return c === void 0 || c.v !== M;
|
|
1168
1205
|
});
|
|
1169
|
-
for (var [
|
|
1170
|
-
d.v !== M && !(
|
|
1171
|
-
return
|
|
1206
|
+
for (var [f, d] of n)
|
|
1207
|
+
d.v !== M && !(f in l) && u.push(f);
|
|
1208
|
+
return u;
|
|
1172
1209
|
},
|
|
1173
1210
|
setPrototypeOf() {
|
|
1174
|
-
|
|
1211
|
+
ci();
|
|
1175
1212
|
}
|
|
1176
1213
|
}
|
|
1177
1214
|
);
|
|
1178
1215
|
}
|
|
1179
|
-
var
|
|
1180
|
-
function
|
|
1181
|
-
if (
|
|
1182
|
-
|
|
1183
|
-
var e = Element.prototype, t = Node.prototype,
|
|
1184
|
-
|
|
1216
|
+
var rr, Yr, Ur, qr;
|
|
1217
|
+
function Sn() {
|
|
1218
|
+
if (rr === void 0) {
|
|
1219
|
+
rr = window, Yr = /Firefox/.test(navigator.userAgent);
|
|
1220
|
+
var e = Element.prototype, t = Node.prototype, n = Text.prototype;
|
|
1221
|
+
Ur = lt(t, "firstChild").get, qr = lt(t, "nextSibling").get, er(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), er(n) && (n.__t = void 0);
|
|
1185
1222
|
}
|
|
1186
1223
|
}
|
|
1187
|
-
function
|
|
1224
|
+
function fe(e = "") {
|
|
1188
1225
|
return document.createTextNode(e);
|
|
1189
1226
|
}
|
|
1190
1227
|
// @__NO_SIDE_EFFECTS__
|
|
1191
|
-
function
|
|
1228
|
+
function yt(e) {
|
|
1192
1229
|
return (
|
|
1193
1230
|
/** @type {TemplateNode | null} */
|
|
1194
|
-
|
|
1231
|
+
Ur.call(e)
|
|
1195
1232
|
);
|
|
1196
1233
|
}
|
|
1197
1234
|
// @__NO_SIDE_EFFECTS__
|
|
1198
|
-
function
|
|
1235
|
+
function Re(e) {
|
|
1199
1236
|
return (
|
|
1200
1237
|
/** @type {TemplateNode | null} */
|
|
1201
|
-
|
|
1238
|
+
qr.call(e)
|
|
1202
1239
|
);
|
|
1203
1240
|
}
|
|
1204
|
-
function
|
|
1205
|
-
if (!
|
|
1206
|
-
return /* @__PURE__ */
|
|
1207
|
-
var
|
|
1208
|
-
if (
|
|
1209
|
-
|
|
1210
|
-
else if (t &&
|
|
1211
|
-
var
|
|
1212
|
-
return
|
|
1213
|
-
}
|
|
1214
|
-
return t &&
|
|
1241
|
+
function B(e, t) {
|
|
1242
|
+
if (!T)
|
|
1243
|
+
return /* @__PURE__ */ yt(e);
|
|
1244
|
+
var n = /* @__PURE__ */ yt(E);
|
|
1245
|
+
if (n === null)
|
|
1246
|
+
n = E.appendChild(fe());
|
|
1247
|
+
else if (t && n.nodeType !== Dt) {
|
|
1248
|
+
var r = fe();
|
|
1249
|
+
return n?.before(r), ne(r), r;
|
|
1250
|
+
}
|
|
1251
|
+
return t && ln(
|
|
1215
1252
|
/** @type {Text} */
|
|
1216
|
-
|
|
1217
|
-
),
|
|
1253
|
+
n
|
|
1254
|
+
), ne(n), n;
|
|
1218
1255
|
}
|
|
1219
|
-
function
|
|
1220
|
-
if (!
|
|
1221
|
-
var
|
|
1222
|
-
return
|
|
1256
|
+
function sr(e, t = !1) {
|
|
1257
|
+
if (!T) {
|
|
1258
|
+
var n = /* @__PURE__ */ yt(e);
|
|
1259
|
+
return n instanceof Comment && n.data === "" ? /* @__PURE__ */ Re(n) : n;
|
|
1223
1260
|
}
|
|
1224
1261
|
if (t) {
|
|
1225
|
-
if (
|
|
1226
|
-
var
|
|
1227
|
-
return
|
|
1262
|
+
if (E?.nodeType !== Dt) {
|
|
1263
|
+
var r = fe();
|
|
1264
|
+
return E?.before(r), ne(r), r;
|
|
1228
1265
|
}
|
|
1229
|
-
|
|
1266
|
+
ln(
|
|
1230
1267
|
/** @type {Text} */
|
|
1231
|
-
|
|
1268
|
+
E
|
|
1232
1269
|
);
|
|
1233
1270
|
}
|
|
1234
|
-
return
|
|
1235
|
-
}
|
|
1236
|
-
function X(e, t = 1,
|
|
1237
|
-
let
|
|
1238
|
-
for (var
|
|
1239
|
-
|
|
1240
|
-
/* @__PURE__ */
|
|
1241
|
-
if (!
|
|
1242
|
-
return
|
|
1243
|
-
if (
|
|
1244
|
-
if (
|
|
1245
|
-
var i =
|
|
1246
|
-
return
|
|
1271
|
+
return E;
|
|
1272
|
+
}
|
|
1273
|
+
function X(e, t = 1, n = !1) {
|
|
1274
|
+
let r = T ? E : e;
|
|
1275
|
+
for (var s; t--; )
|
|
1276
|
+
s = r, r = /** @type {TemplateNode} */
|
|
1277
|
+
/* @__PURE__ */ Re(r);
|
|
1278
|
+
if (!T)
|
|
1279
|
+
return r;
|
|
1280
|
+
if (n) {
|
|
1281
|
+
if (r?.nodeType !== Dt) {
|
|
1282
|
+
var i = fe();
|
|
1283
|
+
return r === null ? s?.after(i) : r.before(i), ne(i), i;
|
|
1247
1284
|
}
|
|
1248
|
-
|
|
1285
|
+
ln(
|
|
1249
1286
|
/** @type {Text} */
|
|
1250
|
-
|
|
1287
|
+
r
|
|
1251
1288
|
);
|
|
1252
1289
|
}
|
|
1253
|
-
return
|
|
1290
|
+
return ne(r), r;
|
|
1254
1291
|
}
|
|
1255
|
-
function
|
|
1292
|
+
function Mi(e) {
|
|
1256
1293
|
e.textContent = "";
|
|
1257
1294
|
}
|
|
1258
|
-
function
|
|
1295
|
+
function Ii() {
|
|
1259
1296
|
return !1;
|
|
1260
1297
|
}
|
|
1261
|
-
function
|
|
1298
|
+
function Fn(e, t, n) {
|
|
1299
|
+
return (
|
|
1300
|
+
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1301
|
+
document.createElementNS(wr, e, void 0)
|
|
1302
|
+
);
|
|
1303
|
+
}
|
|
1304
|
+
function ln(e) {
|
|
1262
1305
|
if (
|
|
1263
1306
|
/** @type {string} */
|
|
1264
1307
|
e.nodeValue.length < 65536
|
|
1265
1308
|
)
|
|
1266
1309
|
return;
|
|
1267
1310
|
let t = e.nextSibling;
|
|
1268
|
-
for (; t !== null && t.nodeType ===
|
|
1311
|
+
for (; t !== null && t.nodeType === Dt; )
|
|
1269
1312
|
t.remove(), e.nodeValue += /** @type {string} */
|
|
1270
1313
|
t.nodeValue, t = e.nextSibling;
|
|
1271
1314
|
}
|
|
1272
|
-
let
|
|
1273
|
-
function
|
|
1274
|
-
|
|
1315
|
+
let ir = !1;
|
|
1316
|
+
function Li() {
|
|
1317
|
+
ir || (ir = !0, document.addEventListener(
|
|
1275
1318
|
"reset",
|
|
1276
1319
|
(e) => {
|
|
1277
1320
|
Promise.resolve().then(() => {
|
|
@@ -1288,213 +1331,213 @@ function Ii() {
|
|
|
1288
1331
|
{ capture: !0 }
|
|
1289
1332
|
));
|
|
1290
1333
|
}
|
|
1291
|
-
function
|
|
1292
|
-
var t = m,
|
|
1293
|
-
|
|
1334
|
+
function Wr(e) {
|
|
1335
|
+
var t = m, n = k;
|
|
1336
|
+
re(null), we(null);
|
|
1294
1337
|
try {
|
|
1295
1338
|
return e();
|
|
1296
1339
|
} finally {
|
|
1297
|
-
|
|
1340
|
+
re(t), we(n);
|
|
1298
1341
|
}
|
|
1299
1342
|
}
|
|
1300
|
-
function
|
|
1301
|
-
|
|
1343
|
+
function Di(e) {
|
|
1344
|
+
k === null && (m === null && ai(), oi()), Fe && ii();
|
|
1302
1345
|
}
|
|
1303
|
-
function
|
|
1304
|
-
var
|
|
1305
|
-
|
|
1346
|
+
function Bi(e, t) {
|
|
1347
|
+
var n = t.last;
|
|
1348
|
+
n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
|
|
1306
1349
|
}
|
|
1307
|
-
function
|
|
1308
|
-
var
|
|
1309
|
-
|
|
1310
|
-
var
|
|
1350
|
+
function ye(e, t, n) {
|
|
1351
|
+
var r = k;
|
|
1352
|
+
r !== null && (r.f & ge) !== 0 && (e |= ge);
|
|
1353
|
+
var s = {
|
|
1311
1354
|
ctx: K,
|
|
1312
1355
|
deps: null,
|
|
1313
1356
|
nodes: null,
|
|
1314
|
-
f: e |
|
|
1357
|
+
f: e | L | ee,
|
|
1315
1358
|
first: null,
|
|
1316
1359
|
fn: t,
|
|
1317
1360
|
last: null,
|
|
1318
1361
|
next: null,
|
|
1319
|
-
parent:
|
|
1320
|
-
b:
|
|
1362
|
+
parent: r,
|
|
1363
|
+
b: r && r.b,
|
|
1321
1364
|
prev: null,
|
|
1322
1365
|
teardown: null,
|
|
1323
1366
|
wv: 0,
|
|
1324
1367
|
ac: null
|
|
1325
1368
|
};
|
|
1326
|
-
if (
|
|
1369
|
+
if (n)
|
|
1327
1370
|
try {
|
|
1328
|
-
|
|
1371
|
+
xt(s);
|
|
1329
1372
|
} catch (l) {
|
|
1330
|
-
throw
|
|
1373
|
+
throw H(s), l;
|
|
1331
1374
|
}
|
|
1332
|
-
else t !== null &&
|
|
1333
|
-
var i =
|
|
1334
|
-
if (
|
|
1335
|
-
(i.f &
|
|
1375
|
+
else t !== null && ae(s);
|
|
1376
|
+
var i = s;
|
|
1377
|
+
if (n && i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && // either `null`, or a singular child
|
|
1378
|
+
(i.f & tt) === 0 && (i = i.first, (e & Ne) !== 0 && (e & wt) !== 0 && i !== null && (i.f |= wt)), i !== null && (i.parent = r, r !== null && Bi(i, r), m !== null && (m.f & I) !== 0 && (e & je) === 0)) {
|
|
1336
1379
|
var o = (
|
|
1337
1380
|
/** @type {Derived} */
|
|
1338
1381
|
m
|
|
1339
1382
|
);
|
|
1340
1383
|
(o.effects ?? (o.effects = [])).push(i);
|
|
1341
1384
|
}
|
|
1342
|
-
return
|
|
1385
|
+
return s;
|
|
1343
1386
|
}
|
|
1344
|
-
function
|
|
1345
|
-
return m !== null && !
|
|
1387
|
+
function jn() {
|
|
1388
|
+
return m !== null && !le;
|
|
1346
1389
|
}
|
|
1347
1390
|
function Fi(e) {
|
|
1348
|
-
const t =
|
|
1349
|
-
return
|
|
1391
|
+
const t = ye(sn, null, !1);
|
|
1392
|
+
return A(t, R), t.teardown = e, t;
|
|
1350
1393
|
}
|
|
1351
|
-
function
|
|
1352
|
-
|
|
1394
|
+
function zn(e) {
|
|
1395
|
+
Di();
|
|
1353
1396
|
var t = (
|
|
1354
1397
|
/** @type {Effect} */
|
|
1355
|
-
|
|
1356
|
-
),
|
|
1357
|
-
if (
|
|
1358
|
-
var
|
|
1398
|
+
k.f
|
|
1399
|
+
), n = !m && (t & me) !== 0 && (t & kt) === 0;
|
|
1400
|
+
if (n) {
|
|
1401
|
+
var r = (
|
|
1359
1402
|
/** @type {ComponentContext} */
|
|
1360
1403
|
K
|
|
1361
1404
|
);
|
|
1362
|
-
(
|
|
1405
|
+
(r.e ?? (r.e = [])).push(e);
|
|
1363
1406
|
} else
|
|
1364
|
-
return
|
|
1407
|
+
return Kr(e);
|
|
1365
1408
|
}
|
|
1366
|
-
function
|
|
1367
|
-
return
|
|
1409
|
+
function Kr(e) {
|
|
1410
|
+
return ye(Pt | ei, e, !1);
|
|
1368
1411
|
}
|
|
1369
|
-
function
|
|
1370
|
-
|
|
1371
|
-
const t =
|
|
1412
|
+
function ji(e) {
|
|
1413
|
+
Pe.ensure();
|
|
1414
|
+
const t = ye(je | tt, e, !0);
|
|
1372
1415
|
return () => {
|
|
1373
|
-
|
|
1416
|
+
H(t);
|
|
1374
1417
|
};
|
|
1375
1418
|
}
|
|
1376
|
-
function
|
|
1377
|
-
|
|
1378
|
-
const t =
|
|
1379
|
-
return (
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
}) : (
|
|
1419
|
+
function Vi(e) {
|
|
1420
|
+
Pe.ensure();
|
|
1421
|
+
const t = ye(je | tt, e, !0);
|
|
1422
|
+
return (n = {}) => new Promise((r) => {
|
|
1423
|
+
n.outro ? Ct(t, () => {
|
|
1424
|
+
H(t), r(void 0);
|
|
1425
|
+
}) : (H(t), r(void 0));
|
|
1383
1426
|
});
|
|
1384
1427
|
}
|
|
1385
|
-
function
|
|
1386
|
-
return
|
|
1428
|
+
function Xr(e) {
|
|
1429
|
+
return ye(Pt, e, !1);
|
|
1387
1430
|
}
|
|
1388
|
-
function
|
|
1389
|
-
return
|
|
1431
|
+
function Gi(e) {
|
|
1432
|
+
return ye(Mn | tt, e, !0);
|
|
1390
1433
|
}
|
|
1391
|
-
function
|
|
1392
|
-
return
|
|
1434
|
+
function Vn(e, t = 0) {
|
|
1435
|
+
return ye(sn | t, e, !0);
|
|
1393
1436
|
}
|
|
1394
|
-
function
|
|
1395
|
-
|
|
1396
|
-
|
|
1437
|
+
function Tt(e, t = [], n = [], r = []) {
|
|
1438
|
+
Ti(r, t, n, (s) => {
|
|
1439
|
+
ye(sn, () => e(...s.map(h)), !0);
|
|
1397
1440
|
});
|
|
1398
1441
|
}
|
|
1399
|
-
function
|
|
1400
|
-
var
|
|
1401
|
-
return
|
|
1442
|
+
function Jr(e, t = 0) {
|
|
1443
|
+
var n = ye(Ne | t, e, !0);
|
|
1444
|
+
return n;
|
|
1402
1445
|
}
|
|
1403
|
-
function
|
|
1404
|
-
return
|
|
1446
|
+
function $e(e) {
|
|
1447
|
+
return ye(me | tt, e, !0);
|
|
1405
1448
|
}
|
|
1406
|
-
function
|
|
1449
|
+
function Qr(e) {
|
|
1407
1450
|
var t = e.teardown;
|
|
1408
1451
|
if (t !== null) {
|
|
1409
|
-
const
|
|
1410
|
-
|
|
1452
|
+
const n = Fe, r = m;
|
|
1453
|
+
or(!0), re(null);
|
|
1411
1454
|
try {
|
|
1412
1455
|
t.call(null);
|
|
1413
1456
|
} finally {
|
|
1414
|
-
|
|
1457
|
+
or(n), re(r);
|
|
1415
1458
|
}
|
|
1416
1459
|
}
|
|
1417
1460
|
}
|
|
1418
|
-
function
|
|
1419
|
-
var
|
|
1420
|
-
for (e.first = e.last = null;
|
|
1421
|
-
const
|
|
1422
|
-
|
|
1423
|
-
|
|
1461
|
+
function Gn(e, t = !1) {
|
|
1462
|
+
var n = e.first;
|
|
1463
|
+
for (e.first = e.last = null; n !== null; ) {
|
|
1464
|
+
const s = n.ac;
|
|
1465
|
+
s !== null && Wr(() => {
|
|
1466
|
+
s.abort(Ge);
|
|
1424
1467
|
});
|
|
1425
|
-
var
|
|
1426
|
-
(
|
|
1468
|
+
var r = n.next;
|
|
1469
|
+
(n.f & je) !== 0 ? n.parent = null : H(n, t), n = r;
|
|
1427
1470
|
}
|
|
1428
1471
|
}
|
|
1429
|
-
function
|
|
1472
|
+
function Hi(e) {
|
|
1430
1473
|
for (var t = e.first; t !== null; ) {
|
|
1431
|
-
var
|
|
1432
|
-
(t.f &
|
|
1474
|
+
var n = t.next;
|
|
1475
|
+
(t.f & me) === 0 && H(t), t = n;
|
|
1433
1476
|
}
|
|
1434
1477
|
}
|
|
1435
|
-
function
|
|
1436
|
-
var
|
|
1437
|
-
(t || (e.f &
|
|
1478
|
+
function H(e, t = !0) {
|
|
1479
|
+
var n = !1;
|
|
1480
|
+
(t || (e.f & kr) !== 0) && e.nodes !== null && e.nodes.end !== null && (Yi(
|
|
1438
1481
|
e.nodes.start,
|
|
1439
1482
|
/** @type {TemplateNode} */
|
|
1440
1483
|
e.nodes.end
|
|
1441
|
-
),
|
|
1442
|
-
var
|
|
1443
|
-
if (
|
|
1444
|
-
for (const i of
|
|
1484
|
+
), n = !0), Gn(e, t && !n), Nt(e, 0), A(e, Ce);
|
|
1485
|
+
var r = e.nodes && e.nodes.t;
|
|
1486
|
+
if (r !== null)
|
|
1487
|
+
for (const i of r)
|
|
1445
1488
|
i.stop();
|
|
1446
|
-
|
|
1447
|
-
var
|
|
1448
|
-
|
|
1489
|
+
Qr(e);
|
|
1490
|
+
var s = e.parent;
|
|
1491
|
+
s !== null && s.first !== null && Zr(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
|
|
1449
1492
|
}
|
|
1450
|
-
function
|
|
1493
|
+
function Yi(e, t) {
|
|
1451
1494
|
for (; e !== null; ) {
|
|
1452
|
-
var
|
|
1453
|
-
e.remove(), e =
|
|
1495
|
+
var n = e === t ? null : /* @__PURE__ */ Re(e);
|
|
1496
|
+
e.remove(), e = n;
|
|
1454
1497
|
}
|
|
1455
1498
|
}
|
|
1456
|
-
function
|
|
1457
|
-
var t = e.parent,
|
|
1458
|
-
|
|
1499
|
+
function Zr(e) {
|
|
1500
|
+
var t = e.parent, n = e.prev, r = e.next;
|
|
1501
|
+
n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
|
|
1459
1502
|
}
|
|
1460
|
-
function
|
|
1461
|
-
var
|
|
1462
|
-
es(e,
|
|
1463
|
-
var
|
|
1464
|
-
|
|
1465
|
-
}, i =
|
|
1503
|
+
function Ct(e, t, n = !0) {
|
|
1504
|
+
var r = [];
|
|
1505
|
+
es(e, r, !0);
|
|
1506
|
+
var s = () => {
|
|
1507
|
+
n && H(e), t && t();
|
|
1508
|
+
}, i = r.length;
|
|
1466
1509
|
if (i > 0) {
|
|
1467
|
-
var o = () => --i ||
|
|
1468
|
-
for (var l of
|
|
1510
|
+
var o = () => --i || s();
|
|
1511
|
+
for (var l of r)
|
|
1469
1512
|
l.out(o);
|
|
1470
1513
|
} else
|
|
1471
|
-
|
|
1472
|
-
}
|
|
1473
|
-
function es(e, t,
|
|
1474
|
-
if ((e.f &
|
|
1475
|
-
e.f ^=
|
|
1476
|
-
var
|
|
1477
|
-
if (
|
|
1478
|
-
for (const l of
|
|
1479
|
-
(l.is_global ||
|
|
1480
|
-
for (var
|
|
1481
|
-
var i =
|
|
1514
|
+
s();
|
|
1515
|
+
}
|
|
1516
|
+
function es(e, t, n) {
|
|
1517
|
+
if ((e.f & ge) === 0) {
|
|
1518
|
+
e.f ^= ge;
|
|
1519
|
+
var r = e.nodes && e.nodes.t;
|
|
1520
|
+
if (r !== null)
|
|
1521
|
+
for (const l of r)
|
|
1522
|
+
(l.is_global || n) && t.push(l);
|
|
1523
|
+
for (var s = e.first; s !== null; ) {
|
|
1524
|
+
var i = s.next, o = (s.f & wt) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1482
1525
|
// it means the parent block effect was pruned. In that case,
|
|
1483
1526
|
// transparency information was transferred to the branch effect.
|
|
1484
|
-
(
|
|
1485
|
-
es(
|
|
1527
|
+
(s.f & me) !== 0 && (e.f & Ne) !== 0;
|
|
1528
|
+
es(s, t, o ? n : !1), s = i;
|
|
1486
1529
|
}
|
|
1487
1530
|
}
|
|
1488
1531
|
}
|
|
1489
|
-
function
|
|
1532
|
+
function Ui(e) {
|
|
1490
1533
|
ts(e, !0);
|
|
1491
1534
|
}
|
|
1492
1535
|
function ts(e, t) {
|
|
1493
|
-
if ((e.f &
|
|
1494
|
-
e.f ^=
|
|
1495
|
-
for (var
|
|
1496
|
-
var
|
|
1497
|
-
ts(
|
|
1536
|
+
if ((e.f & ge) !== 0) {
|
|
1537
|
+
e.f ^= ge, (e.f & R) === 0 && (A(e, L), ae(e));
|
|
1538
|
+
for (var n = e.first; n !== null; ) {
|
|
1539
|
+
var r = n.next, s = (n.f & wt) !== 0 || (n.f & me) !== 0;
|
|
1540
|
+
ts(n, s ? t : !1), n = r;
|
|
1498
1541
|
}
|
|
1499
1542
|
var i = e.nodes && e.nodes.t;
|
|
1500
1543
|
if (i !== null)
|
|
@@ -1502,54 +1545,54 @@ function ts(e, t) {
|
|
|
1502
1545
|
(o.is_global || t) && o.in();
|
|
1503
1546
|
}
|
|
1504
1547
|
}
|
|
1505
|
-
function
|
|
1548
|
+
function ns(e, t) {
|
|
1506
1549
|
if (e.nodes)
|
|
1507
|
-
for (var
|
|
1508
|
-
var
|
|
1509
|
-
t.append(
|
|
1550
|
+
for (var n = e.nodes.start, r = e.nodes.end; n !== null; ) {
|
|
1551
|
+
var s = n === r ? null : /* @__PURE__ */ Re(n);
|
|
1552
|
+
t.append(n), n = s;
|
|
1510
1553
|
}
|
|
1511
1554
|
}
|
|
1512
|
-
let
|
|
1513
|
-
function
|
|
1514
|
-
|
|
1555
|
+
let Jt = !1, Fe = !1;
|
|
1556
|
+
function or(e) {
|
|
1557
|
+
Fe = e;
|
|
1515
1558
|
}
|
|
1516
|
-
let m = null,
|
|
1517
|
-
function
|
|
1559
|
+
let m = null, le = !1;
|
|
1560
|
+
function re(e) {
|
|
1518
1561
|
m = e;
|
|
1519
1562
|
}
|
|
1520
|
-
let
|
|
1521
|
-
function
|
|
1522
|
-
|
|
1563
|
+
let k = null;
|
|
1564
|
+
function we(e) {
|
|
1565
|
+
k = e;
|
|
1523
1566
|
}
|
|
1524
1567
|
let te = null;
|
|
1525
|
-
function
|
|
1568
|
+
function rs(e) {
|
|
1526
1569
|
m !== null && (te === null ? te = [e] : te.push(e));
|
|
1527
1570
|
}
|
|
1528
|
-
let
|
|
1529
|
-
function
|
|
1571
|
+
let G = null, U = 0, J = null;
|
|
1572
|
+
function qi(e) {
|
|
1530
1573
|
J = e;
|
|
1531
1574
|
}
|
|
1532
|
-
let ss = 1,
|
|
1533
|
-
function
|
|
1534
|
-
|
|
1575
|
+
let ss = 1, Ue = 0, Ze = Ue;
|
|
1576
|
+
function ar(e) {
|
|
1577
|
+
Ze = e;
|
|
1535
1578
|
}
|
|
1536
1579
|
function is() {
|
|
1537
1580
|
return ++ss;
|
|
1538
1581
|
}
|
|
1539
|
-
function
|
|
1582
|
+
function jt(e) {
|
|
1540
1583
|
var t = e.f;
|
|
1541
|
-
if ((t &
|
|
1584
|
+
if ((t & L) !== 0)
|
|
1542
1585
|
return !0;
|
|
1543
|
-
if (t & I && (e.f &= ~
|
|
1544
|
-
for (var
|
|
1586
|
+
if (t & I && (e.f &= ~et), (t & ue) !== 0) {
|
|
1587
|
+
for (var n = (
|
|
1545
1588
|
/** @type {Value[]} */
|
|
1546
1589
|
e.deps
|
|
1547
|
-
),
|
|
1548
|
-
var i =
|
|
1549
|
-
if (
|
|
1590
|
+
), r = n.length, s = 0; s < r; s++) {
|
|
1591
|
+
var i = n[s];
|
|
1592
|
+
if (jt(
|
|
1550
1593
|
/** @type {Derived} */
|
|
1551
1594
|
i
|
|
1552
|
-
) &&
|
|
1595
|
+
) && jr(
|
|
1553
1596
|
/** @type {Derived} */
|
|
1554
1597
|
i
|
|
1555
1598
|
), i.wv > e.wv)
|
|
@@ -1557,51 +1600,53 @@ function Dt(e) {
|
|
|
1557
1600
|
}
|
|
1558
1601
|
(t & ee) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1559
1602
|
// traversal of the graph in the other batches still happens
|
|
1560
|
-
|
|
1603
|
+
oe === null && A(e, R);
|
|
1561
1604
|
}
|
|
1562
1605
|
return !1;
|
|
1563
1606
|
}
|
|
1564
|
-
function os(e, t,
|
|
1565
|
-
var
|
|
1566
|
-
if (
|
|
1567
|
-
for (var
|
|
1568
|
-
var i = s
|
|
1607
|
+
function os(e, t, n = !0) {
|
|
1608
|
+
var r = e.reactions;
|
|
1609
|
+
if (r !== null && !(te !== null && gt.call(te, e)))
|
|
1610
|
+
for (var s = 0; s < r.length; s++) {
|
|
1611
|
+
var i = r[s];
|
|
1569
1612
|
(i.f & I) !== 0 ? os(
|
|
1570
1613
|
/** @type {Derived} */
|
|
1571
1614
|
i,
|
|
1572
1615
|
t,
|
|
1573
1616
|
!1
|
|
1574
|
-
) : t === i && (
|
|
1617
|
+
) : t === i && (n ? A(i, L) : (i.f & R) !== 0 && A(i, ue), ae(
|
|
1575
1618
|
/** @type {Effect} */
|
|
1576
1619
|
i
|
|
1577
1620
|
));
|
|
1578
1621
|
}
|
|
1579
1622
|
}
|
|
1580
|
-
function
|
|
1581
|
-
var
|
|
1582
|
-
var t =
|
|
1583
|
-
|
|
1584
|
-
null,
|
|
1585
|
-
e.ac.abort(
|
|
1623
|
+
function as(e) {
|
|
1624
|
+
var x;
|
|
1625
|
+
var t = G, n = U, r = J, s = m, i = te, o = K, l = le, u = Ze, f = e.f;
|
|
1626
|
+
G = /** @type {null | Value[]} */
|
|
1627
|
+
null, U = 0, J = null, m = (f & (me | je)) === 0 ? e : null, te = null, bt(e.ctx), le = !1, Ze = ++Ue, e.ac !== null && (Wr(() => {
|
|
1628
|
+
e.ac.abort(Ge);
|
|
1586
1629
|
}), e.ac = null);
|
|
1587
1630
|
try {
|
|
1588
|
-
e.f |=
|
|
1631
|
+
e.f |= wn;
|
|
1589
1632
|
var d = (
|
|
1590
1633
|
/** @type {Function} */
|
|
1591
1634
|
e.fn
|
|
1592
|
-
),
|
|
1593
|
-
|
|
1635
|
+
), p = d();
|
|
1636
|
+
e.f |= kt;
|
|
1637
|
+
var c = e.deps, v = z?.is_fork;
|
|
1638
|
+
if (G !== null) {
|
|
1594
1639
|
var w;
|
|
1595
|
-
if (
|
|
1596
|
-
for (c.length =
|
|
1597
|
-
c[
|
|
1640
|
+
if (v || Nt(e, U), c !== null && U > 0)
|
|
1641
|
+
for (c.length = U + G.length, w = 0; w < G.length; w++)
|
|
1642
|
+
c[U + w] = G[w];
|
|
1598
1643
|
else
|
|
1599
|
-
e.deps = c =
|
|
1600
|
-
if (
|
|
1601
|
-
for (w =
|
|
1602
|
-
((
|
|
1603
|
-
} else !
|
|
1604
|
-
if (
|
|
1644
|
+
e.deps = c = G;
|
|
1645
|
+
if (jn() && (e.f & ee) !== 0)
|
|
1646
|
+
for (w = U; w < c.length; w++)
|
|
1647
|
+
((x = c[w]).reactions ?? (x.reactions = [])).push(e);
|
|
1648
|
+
} else !v && c !== null && U < c.length && (Nt(e, U), c.length = U);
|
|
1649
|
+
if (Ar() && J !== null && !le && c !== null && (e.f & (I | ue | L)) === 0)
|
|
1605
1650
|
for (w = 0; w < /** @type {Source[]} */
|
|
1606
1651
|
J.length; w++)
|
|
1607
1652
|
os(
|
|
@@ -1609,74 +1654,74 @@ function ls(e) {
|
|
|
1609
1654
|
/** @type {Effect} */
|
|
1610
1655
|
e
|
|
1611
1656
|
);
|
|
1612
|
-
if (
|
|
1613
|
-
if (
|
|
1614
|
-
for (let S = 0; S <
|
|
1615
|
-
|
|
1657
|
+
if (s !== null && s !== e) {
|
|
1658
|
+
if (Ue++, s.deps !== null)
|
|
1659
|
+
for (let S = 0; S < n; S += 1)
|
|
1660
|
+
s.deps[S].rv = Ue;
|
|
1616
1661
|
if (t !== null)
|
|
1617
1662
|
for (const S of t)
|
|
1618
|
-
S.rv =
|
|
1619
|
-
J !== null && (
|
|
1663
|
+
S.rv = Ue;
|
|
1664
|
+
J !== null && (r === null ? r = J : r.push(.../** @type {Source[]} */
|
|
1620
1665
|
J));
|
|
1621
1666
|
}
|
|
1622
|
-
return (e.f &
|
|
1667
|
+
return (e.f & Ie) !== 0 && (e.f ^= Ie), p;
|
|
1623
1668
|
} catch (S) {
|
|
1624
|
-
return
|
|
1669
|
+
return Pr(S);
|
|
1625
1670
|
} finally {
|
|
1626
|
-
e.f ^=
|
|
1671
|
+
e.f ^= wn, G = t, U = n, J = r, m = s, te = i, bt(o), le = l, Ze = u;
|
|
1627
1672
|
}
|
|
1628
1673
|
}
|
|
1629
|
-
function
|
|
1630
|
-
let
|
|
1631
|
-
if (
|
|
1632
|
-
var
|
|
1633
|
-
if (
|
|
1634
|
-
var
|
|
1635
|
-
|
|
1674
|
+
function Wi(e, t) {
|
|
1675
|
+
let n = t.reactions;
|
|
1676
|
+
if (n !== null) {
|
|
1677
|
+
var r = qs.call(n, e);
|
|
1678
|
+
if (r !== -1) {
|
|
1679
|
+
var s = n.length - 1;
|
|
1680
|
+
s === 0 ? n = t.reactions = null : (n[r] = n[s], n.pop());
|
|
1636
1681
|
}
|
|
1637
1682
|
}
|
|
1638
|
-
if (
|
|
1683
|
+
if (n === null && (t.f & I) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1639
1684
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1640
1685
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1641
|
-
(
|
|
1686
|
+
(G === null || !gt.call(G, t))) {
|
|
1642
1687
|
var i = (
|
|
1643
1688
|
/** @type {Derived} */
|
|
1644
1689
|
t
|
|
1645
1690
|
);
|
|
1646
|
-
(i.f & ee) !== 0 && (i.f ^= ee, i.f &= ~
|
|
1691
|
+
(i.f & ee) !== 0 && (i.f ^= ee, i.f &= ~et), Ln(i), Ni(i), Nt(i, 0);
|
|
1647
1692
|
}
|
|
1648
1693
|
}
|
|
1649
|
-
function
|
|
1650
|
-
var
|
|
1651
|
-
if (
|
|
1652
|
-
for (var
|
|
1653
|
-
|
|
1694
|
+
function Nt(e, t) {
|
|
1695
|
+
var n = e.deps;
|
|
1696
|
+
if (n !== null)
|
|
1697
|
+
for (var r = t; r < n.length; r++)
|
|
1698
|
+
Wi(e, n[r]);
|
|
1654
1699
|
}
|
|
1655
|
-
function
|
|
1700
|
+
function xt(e) {
|
|
1656
1701
|
var t = e.f;
|
|
1657
|
-
if ((t &
|
|
1658
|
-
|
|
1659
|
-
var
|
|
1660
|
-
|
|
1702
|
+
if ((t & Ce) === 0) {
|
|
1703
|
+
A(e, R);
|
|
1704
|
+
var n = k, r = Jt;
|
|
1705
|
+
k = e, Jt = !0;
|
|
1661
1706
|
try {
|
|
1662
|
-
(t & (
|
|
1663
|
-
var
|
|
1664
|
-
e.teardown = typeof
|
|
1707
|
+
(t & (Ne | yr)) !== 0 ? Hi(e) : Gn(e), Qr(e);
|
|
1708
|
+
var s = as(e);
|
|
1709
|
+
e.teardown = typeof s == "function" ? s : null, e.wv = ss;
|
|
1665
1710
|
var i;
|
|
1666
|
-
|
|
1711
|
+
gn && wi && (e.f & L) !== 0 && e.deps;
|
|
1667
1712
|
} finally {
|
|
1668
|
-
|
|
1713
|
+
Jt = r, k = n;
|
|
1669
1714
|
}
|
|
1670
1715
|
}
|
|
1671
1716
|
}
|
|
1672
1717
|
function h(e) {
|
|
1673
|
-
var t = e.f,
|
|
1674
|
-
if (m !== null && !
|
|
1675
|
-
var
|
|
1676
|
-
if (!
|
|
1677
|
-
var
|
|
1678
|
-
if ((m.f &
|
|
1679
|
-
e.rv <
|
|
1718
|
+
var t = e.f, n = (t & I) !== 0;
|
|
1719
|
+
if (m !== null && !le) {
|
|
1720
|
+
var r = k !== null && (k.f & Ce) !== 0;
|
|
1721
|
+
if (!r && (te === null || !gt.call(te, e))) {
|
|
1722
|
+
var s = m.deps;
|
|
1723
|
+
if ((m.f & wn) !== 0)
|
|
1724
|
+
e.rv < Ue && (e.rv = Ue, G === null && s !== null && s[U] === e ? U++ : G === null ? G = [e] : G.push(e));
|
|
1680
1725
|
else {
|
|
1681
1726
|
(m.deps ?? (m.deps = [])).push(e);
|
|
1682
1727
|
var i = e.reactions;
|
|
@@ -1684,185 +1729,199 @@ function h(e) {
|
|
|
1684
1729
|
}
|
|
1685
1730
|
}
|
|
1686
1731
|
}
|
|
1687
|
-
if (
|
|
1688
|
-
return
|
|
1689
|
-
if (
|
|
1732
|
+
if (Fe && De.has(e))
|
|
1733
|
+
return De.get(e);
|
|
1734
|
+
if (n) {
|
|
1690
1735
|
var o = (
|
|
1691
1736
|
/** @type {Derived} */
|
|
1692
1737
|
e
|
|
1693
1738
|
);
|
|
1694
|
-
if (
|
|
1739
|
+
if (Fe) {
|
|
1695
1740
|
var l = o.v;
|
|
1696
|
-
return ((o.f &
|
|
1741
|
+
return ((o.f & R) === 0 && o.reactions !== null || us(o)) && (l = Bn(o)), De.set(o, l), l;
|
|
1697
1742
|
}
|
|
1698
|
-
var
|
|
1699
|
-
|
|
1743
|
+
var u = (o.f & ee) === 0 && !le && m !== null && (Jt || (m.f & ee) !== 0), f = (o.f & kt) === 0;
|
|
1744
|
+
jt(o) && (u && (o.f |= ee), jr(o)), u && !f && (Vr(o), ls(o));
|
|
1700
1745
|
}
|
|
1701
|
-
if (
|
|
1702
|
-
return
|
|
1703
|
-
if ((e.f &
|
|
1746
|
+
if (oe?.has(e))
|
|
1747
|
+
return oe.get(e);
|
|
1748
|
+
if ((e.f & Ie) !== 0)
|
|
1704
1749
|
throw e.v;
|
|
1705
1750
|
return e.v;
|
|
1706
1751
|
}
|
|
1707
|
-
function
|
|
1708
|
-
if (e.deps !== null)
|
|
1709
|
-
e.f |= ee;
|
|
1752
|
+
function ls(e) {
|
|
1753
|
+
if (e.f |= ee, e.deps !== null)
|
|
1710
1754
|
for (const t of e.deps)
|
|
1711
|
-
(t.reactions ?? (t.reactions = [])).push(e), (t.f & I) !== 0 && (t.f & ee) === 0 &&
|
|
1755
|
+
(t.reactions ?? (t.reactions = [])).push(e), (t.f & I) !== 0 && (t.f & ee) === 0 && (Vr(
|
|
1712
1756
|
/** @type {Derived} */
|
|
1713
1757
|
t
|
|
1714
|
-
)
|
|
1715
|
-
|
|
1758
|
+
), ls(
|
|
1759
|
+
/** @type {Derived} */
|
|
1760
|
+
t
|
|
1761
|
+
));
|
|
1716
1762
|
}
|
|
1717
|
-
function
|
|
1763
|
+
function us(e) {
|
|
1718
1764
|
if (e.v === M) return !0;
|
|
1719
1765
|
if (e.deps === null) return !1;
|
|
1720
1766
|
for (const t of e.deps)
|
|
1721
|
-
if (
|
|
1767
|
+
if (De.has(t) || (t.f & I) !== 0 && us(
|
|
1722
1768
|
/** @type {Derived} */
|
|
1723
1769
|
t
|
|
1724
1770
|
))
|
|
1725
1771
|
return !0;
|
|
1726
1772
|
return !1;
|
|
1727
1773
|
}
|
|
1728
|
-
function
|
|
1729
|
-
var t =
|
|
1774
|
+
function Hn(e) {
|
|
1775
|
+
var t = le;
|
|
1730
1776
|
try {
|
|
1731
|
-
return
|
|
1777
|
+
return le = !0, e();
|
|
1732
1778
|
} finally {
|
|
1733
|
-
|
|
1779
|
+
le = t;
|
|
1734
1780
|
}
|
|
1735
1781
|
}
|
|
1736
|
-
const
|
|
1737
|
-
function
|
|
1782
|
+
const fs = /* @__PURE__ */ new Set(), An = /* @__PURE__ */ new Set();
|
|
1783
|
+
function Ki(e) {
|
|
1738
1784
|
for (var t = 0; t < e.length; t++)
|
|
1739
|
-
|
|
1740
|
-
for (var
|
|
1741
|
-
|
|
1785
|
+
fs.add(e[t]);
|
|
1786
|
+
for (var n of An)
|
|
1787
|
+
n(e);
|
|
1742
1788
|
}
|
|
1743
|
-
let
|
|
1744
|
-
function
|
|
1745
|
-
var t = this,
|
|
1789
|
+
let lr = null;
|
|
1790
|
+
function ur(e) {
|
|
1791
|
+
var t = this, n = (
|
|
1746
1792
|
/** @type {Node} */
|
|
1747
1793
|
t.ownerDocument
|
|
1748
|
-
),
|
|
1794
|
+
), r = e.type, s = e.composedPath?.() || [], i = (
|
|
1749
1795
|
/** @type {null | Element} */
|
|
1750
|
-
|
|
1796
|
+
s[0] || e.target
|
|
1751
1797
|
);
|
|
1752
|
-
|
|
1753
|
-
var o = 0, l =
|
|
1798
|
+
lr = e;
|
|
1799
|
+
var o = 0, l = lr === e && e.__root;
|
|
1754
1800
|
if (l) {
|
|
1755
|
-
var
|
|
1756
|
-
if (
|
|
1801
|
+
var u = s.indexOf(l);
|
|
1802
|
+
if (u !== -1 && (t === document || t === /** @type {any} */
|
|
1757
1803
|
window)) {
|
|
1758
1804
|
e.__root = t;
|
|
1759
1805
|
return;
|
|
1760
1806
|
}
|
|
1761
|
-
var
|
|
1762
|
-
if (
|
|
1807
|
+
var f = s.indexOf(t);
|
|
1808
|
+
if (f === -1)
|
|
1763
1809
|
return;
|
|
1764
|
-
|
|
1810
|
+
u <= f && (o = u);
|
|
1765
1811
|
}
|
|
1766
1812
|
if (i = /** @type {Element} */
|
|
1767
|
-
|
|
1768
|
-
|
|
1813
|
+
s[o] || e.target, i !== t) {
|
|
1814
|
+
en(e, "currentTarget", {
|
|
1769
1815
|
configurable: !0,
|
|
1770
1816
|
get() {
|
|
1771
|
-
return i ||
|
|
1817
|
+
return i || n;
|
|
1772
1818
|
}
|
|
1773
1819
|
});
|
|
1774
|
-
var d = m,
|
|
1775
|
-
|
|
1820
|
+
var d = m, p = k;
|
|
1821
|
+
re(null), we(null);
|
|
1776
1822
|
try {
|
|
1777
|
-
for (var c,
|
|
1823
|
+
for (var c, v = []; i !== null; ) {
|
|
1778
1824
|
var w = i.assignedSlot || i.parentNode || /** @type {any} */
|
|
1779
1825
|
i.host || null;
|
|
1780
1826
|
try {
|
|
1781
|
-
var
|
|
1782
|
-
|
|
1827
|
+
var x = i["__" + r];
|
|
1828
|
+
x != null && (!/** @type {any} */
|
|
1783
1829
|
i.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1784
1830
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1785
|
-
e.target === i) &&
|
|
1831
|
+
e.target === i) && x.call(i, e);
|
|
1786
1832
|
} catch (S) {
|
|
1787
|
-
c ?
|
|
1833
|
+
c ? v.push(S) : c = S;
|
|
1788
1834
|
}
|
|
1789
1835
|
if (e.cancelBubble || w === t || w === null)
|
|
1790
1836
|
break;
|
|
1791
1837
|
i = w;
|
|
1792
1838
|
}
|
|
1793
1839
|
if (c) {
|
|
1794
|
-
for (let S of
|
|
1840
|
+
for (let S of v)
|
|
1795
1841
|
queueMicrotask(() => {
|
|
1796
1842
|
throw S;
|
|
1797
1843
|
});
|
|
1798
1844
|
throw c;
|
|
1799
1845
|
}
|
|
1800
1846
|
} finally {
|
|
1801
|
-
e.__root = t, delete e.currentTarget,
|
|
1847
|
+
e.__root = t, delete e.currentTarget, re(d), we(p);
|
|
1802
1848
|
}
|
|
1803
1849
|
}
|
|
1804
1850
|
}
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1851
|
+
const Xi = /* @__PURE__ */ globalThis?.window?.trustedTypes?.createPolicy(
|
|
1852
|
+
"svelte-trusted-html",
|
|
1853
|
+
{
|
|
1854
|
+
/** @param {string} html */
|
|
1855
|
+
createHTML: (e) => e
|
|
1856
|
+
}
|
|
1857
|
+
);
|
|
1858
|
+
function Ji(e) {
|
|
1859
|
+
return (
|
|
1860
|
+
/** @type {string} */
|
|
1861
|
+
Xi?.createHTML(e) ?? e
|
|
1862
|
+
);
|
|
1808
1863
|
}
|
|
1809
|
-
function
|
|
1810
|
-
var
|
|
1864
|
+
function Qi(e, t = !1) {
|
|
1865
|
+
var n = Fn("template");
|
|
1866
|
+
return e = e.replaceAll("<!>", "<!---->"), n.innerHTML = t ? Ji(e) : e, n.content;
|
|
1867
|
+
}
|
|
1868
|
+
function Be(e, t) {
|
|
1869
|
+
var n = (
|
|
1811
1870
|
/** @type {Effect} */
|
|
1812
|
-
|
|
1871
|
+
k
|
|
1813
1872
|
);
|
|
1814
|
-
|
|
1873
|
+
n.nodes === null && (n.nodes = { start: e, end: t, a: null, t: null });
|
|
1815
1874
|
}
|
|
1816
1875
|
// @__NO_SIDE_EFFECTS__
|
|
1817
|
-
function
|
|
1818
|
-
var
|
|
1876
|
+
function xe(e, t) {
|
|
1877
|
+
var n = (t & Hs) !== 0, r = (t & Ys) !== 0, s, i = !e.startsWith("<!>");
|
|
1819
1878
|
return () => {
|
|
1820
|
-
if (
|
|
1821
|
-
return
|
|
1822
|
-
|
|
1823
|
-
/* @__PURE__ */
|
|
1879
|
+
if (T)
|
|
1880
|
+
return Be(E, null), E;
|
|
1881
|
+
s === void 0 && (s = Qi(i ? e : "<!>" + e, !0), n || (s = /** @type {TemplateNode} */
|
|
1882
|
+
/* @__PURE__ */ yt(s)));
|
|
1824
1883
|
var o = (
|
|
1825
1884
|
/** @type {TemplateNode} */
|
|
1826
|
-
|
|
1885
|
+
r || Yr ? document.importNode(s, !0) : s.cloneNode(!0)
|
|
1827
1886
|
);
|
|
1828
|
-
if (
|
|
1887
|
+
if (n) {
|
|
1829
1888
|
var l = (
|
|
1830
1889
|
/** @type {TemplateNode} */
|
|
1831
|
-
/* @__PURE__ */
|
|
1832
|
-
),
|
|
1890
|
+
/* @__PURE__ */ yt(o)
|
|
1891
|
+
), u = (
|
|
1833
1892
|
/** @type {TemplateNode} */
|
|
1834
1893
|
o.lastChild
|
|
1835
1894
|
);
|
|
1836
|
-
|
|
1895
|
+
Be(l, u);
|
|
1837
1896
|
} else
|
|
1838
|
-
|
|
1897
|
+
Be(o, o);
|
|
1839
1898
|
return o;
|
|
1840
1899
|
};
|
|
1841
1900
|
}
|
|
1842
|
-
function
|
|
1843
|
-
if (!
|
|
1844
|
-
var t =
|
|
1845
|
-
return
|
|
1901
|
+
function Zi(e = "") {
|
|
1902
|
+
if (!T) {
|
|
1903
|
+
var t = fe(e + "");
|
|
1904
|
+
return Be(t, t), t;
|
|
1846
1905
|
}
|
|
1847
|
-
var
|
|
1848
|
-
return
|
|
1906
|
+
var n = E;
|
|
1907
|
+
return n.nodeType !== Dt ? (n.before(n = fe()), ne(n)) : ln(
|
|
1849
1908
|
/** @type {Text} */
|
|
1850
|
-
|
|
1851
|
-
),
|
|
1909
|
+
n
|
|
1910
|
+
), Be(n, n), n;
|
|
1852
1911
|
}
|
|
1853
|
-
function
|
|
1854
|
-
if (
|
|
1855
|
-
return
|
|
1856
|
-
var e = document.createDocumentFragment(), t = document.createComment(""),
|
|
1857
|
-
return e.append(t,
|
|
1912
|
+
function eo() {
|
|
1913
|
+
if (T)
|
|
1914
|
+
return Be(E, null), E;
|
|
1915
|
+
var e = document.createDocumentFragment(), t = document.createComment(""), n = fe();
|
|
1916
|
+
return e.append(t, n), Be(t, n), e;
|
|
1858
1917
|
}
|
|
1859
|
-
function
|
|
1860
|
-
if (
|
|
1861
|
-
var
|
|
1918
|
+
function Y(e, t) {
|
|
1919
|
+
if (T) {
|
|
1920
|
+
var n = (
|
|
1862
1921
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
1863
|
-
|
|
1922
|
+
k
|
|
1864
1923
|
);
|
|
1865
|
-
((
|
|
1924
|
+
((n.f & kt) === 0 || n.nodes.end === null) && (n.nodes.end = E), In();
|
|
1866
1925
|
return;
|
|
1867
1926
|
}
|
|
1868
1927
|
e !== null && e.before(
|
|
@@ -1870,115 +1929,118 @@ function j(e, t) {
|
|
|
1870
1929
|
t
|
|
1871
1930
|
);
|
|
1872
1931
|
}
|
|
1873
|
-
const
|
|
1874
|
-
function
|
|
1875
|
-
return
|
|
1932
|
+
const to = ["touchstart", "touchmove"];
|
|
1933
|
+
function no(e) {
|
|
1934
|
+
return to.includes(e);
|
|
1876
1935
|
}
|
|
1877
|
-
function
|
|
1878
|
-
var
|
|
1879
|
-
|
|
1936
|
+
function Yt(e, t) {
|
|
1937
|
+
var n = t == null ? "" : typeof t == "object" ? t + "" : t;
|
|
1938
|
+
n !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = n, e.nodeValue = n + "");
|
|
1880
1939
|
}
|
|
1881
1940
|
function cs(e, t) {
|
|
1882
1941
|
return ds(e, t);
|
|
1883
1942
|
}
|
|
1884
|
-
function
|
|
1885
|
-
|
|
1886
|
-
const
|
|
1943
|
+
function ro(e, t) {
|
|
1944
|
+
Sn(), t.intro = t.intro ?? !1;
|
|
1945
|
+
const n = t.target, r = T, s = E;
|
|
1887
1946
|
try {
|
|
1888
|
-
for (var i = /* @__PURE__ */
|
|
1889
|
-
i.data !==
|
|
1890
|
-
i = /* @__PURE__ */
|
|
1947
|
+
for (var i = /* @__PURE__ */ yt(n); i && (i.nodeType !== Bt || /** @type {Comment} */
|
|
1948
|
+
i.data !== Rn); )
|
|
1949
|
+
i = /* @__PURE__ */ Re(i);
|
|
1891
1950
|
if (!i)
|
|
1892
1951
|
throw _t;
|
|
1893
|
-
|
|
1952
|
+
at(!0), ne(
|
|
1894
1953
|
/** @type {Comment} */
|
|
1895
1954
|
i
|
|
1896
1955
|
);
|
|
1897
1956
|
const o = ds(e, { ...t, anchor: i });
|
|
1898
|
-
return
|
|
1957
|
+
return at(!1), /** @type {Exports} */
|
|
1899
1958
|
o;
|
|
1900
1959
|
} catch (o) {
|
|
1901
1960
|
if (o instanceof Error && o.message.split(`
|
|
1902
1961
|
`).some((l) => l.startsWith("https://svelte.dev/e/")))
|
|
1903
1962
|
throw o;
|
|
1904
|
-
return o !== _t && console.warn("Failed to hydrate: ", o), t.recover === !1 && ui(),
|
|
1963
|
+
return o !== _t && console.warn("Failed to hydrate: ", o), t.recover === !1 && ui(), Sn(), Mi(n), at(!1), cs(e, t);
|
|
1905
1964
|
} finally {
|
|
1906
|
-
|
|
1907
|
-
}
|
|
1908
|
-
}
|
|
1909
|
-
const
|
|
1910
|
-
function ds(e, { target: t, anchor:
|
|
1911
|
-
|
|
1912
|
-
var l = /* @__PURE__ */ new Set(),
|
|
1913
|
-
for (var c = 0; c <
|
|
1914
|
-
var
|
|
1915
|
-
if (!l.has(
|
|
1916
|
-
l.add(
|
|
1917
|
-
var w =
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1965
|
+
at(r), ne(s);
|
|
1966
|
+
}
|
|
1967
|
+
}
|
|
1968
|
+
const Ut = /* @__PURE__ */ new Map();
|
|
1969
|
+
function ds(e, { target: t, anchor: n, props: r = {}, events: s, context: i, intro: o = !0 }) {
|
|
1970
|
+
Sn();
|
|
1971
|
+
var l = /* @__PURE__ */ new Set(), u = (p) => {
|
|
1972
|
+
for (var c = 0; c < p.length; c++) {
|
|
1973
|
+
var v = p[c];
|
|
1974
|
+
if (!l.has(v)) {
|
|
1975
|
+
l.add(v);
|
|
1976
|
+
var w = no(v);
|
|
1977
|
+
for (const ce of [t, document]) {
|
|
1978
|
+
var x = Ut.get(ce);
|
|
1979
|
+
x === void 0 && (x = /* @__PURE__ */ new Map(), Ut.set(ce, x));
|
|
1980
|
+
var S = x.get(v);
|
|
1981
|
+
S === void 0 ? (ce.addEventListener(v, ur, { passive: w }), x.set(v, 1)) : x.set(v, S + 1);
|
|
1982
|
+
}
|
|
1921
1983
|
}
|
|
1922
1984
|
}
|
|
1923
1985
|
};
|
|
1924
|
-
|
|
1925
|
-
var
|
|
1926
|
-
var
|
|
1927
|
-
return
|
|
1986
|
+
u(Ws(fs)), An.add(u);
|
|
1987
|
+
var f = void 0, d = Vi(() => {
|
|
1988
|
+
var p = n ?? t.appendChild(fe());
|
|
1989
|
+
return $i(
|
|
1928
1990
|
/** @type {TemplateNode} */
|
|
1929
|
-
|
|
1991
|
+
p,
|
|
1930
1992
|
{
|
|
1931
1993
|
pending: () => {
|
|
1932
1994
|
}
|
|
1933
1995
|
},
|
|
1934
1996
|
(c) => {
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
p.c = i;
|
|
1942
|
-
}
|
|
1943
|
-
if (n && (s.$$events = n), E && Ie(
|
|
1997
|
+
Sr({});
|
|
1998
|
+
var v = (
|
|
1999
|
+
/** @type {ComponentContext} */
|
|
2000
|
+
K
|
|
2001
|
+
);
|
|
2002
|
+
if (i && (v.c = i), s && (r.$$events = s), T && Be(
|
|
1944
2003
|
/** @type {TemplateNode} */
|
|
1945
2004
|
c,
|
|
1946
2005
|
null
|
|
1947
|
-
),
|
|
1948
|
-
|
|
1949
|
-
throw
|
|
1950
|
-
|
|
2006
|
+
), f = e(c, r) || {}, T && (k.nodes.end = E, E === null || E.nodeType !== Bt || /** @type {Comment} */
|
|
2007
|
+
E.data !== gr))
|
|
2008
|
+
throw on(), _t;
|
|
2009
|
+
zr();
|
|
1951
2010
|
}
|
|
1952
2011
|
), () => {
|
|
1953
|
-
for (var c of l)
|
|
1954
|
-
t
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
2012
|
+
for (var c of l)
|
|
2013
|
+
for (const x of [t, document]) {
|
|
2014
|
+
var v = (
|
|
2015
|
+
/** @type {Map<string, number>} */
|
|
2016
|
+
Ut.get(x)
|
|
2017
|
+
), w = (
|
|
2018
|
+
/** @type {number} */
|
|
2019
|
+
v.get(c)
|
|
2020
|
+
);
|
|
2021
|
+
--w == 0 ? (x.removeEventListener(c, ur), v.delete(c), v.size === 0 && Ut.delete(x)) : v.set(c, w);
|
|
2022
|
+
}
|
|
2023
|
+
An.delete(u), p !== n && p.parentNode?.removeChild(p);
|
|
1962
2024
|
};
|
|
1963
2025
|
});
|
|
1964
|
-
return
|
|
2026
|
+
return Cn.set(f, d), f;
|
|
1965
2027
|
}
|
|
1966
|
-
let
|
|
1967
|
-
function
|
|
1968
|
-
const
|
|
1969
|
-
return
|
|
2028
|
+
let Cn = /* @__PURE__ */ new WeakMap();
|
|
2029
|
+
function so(e, t) {
|
|
2030
|
+
const n = Cn.get(e);
|
|
2031
|
+
return n ? (Cn.delete(e), n(t)) : Promise.resolve();
|
|
1970
2032
|
}
|
|
1971
|
-
var
|
|
1972
|
-
class
|
|
2033
|
+
var ie, _e, W, Qe, It, Lt, rn;
|
|
2034
|
+
class io {
|
|
1973
2035
|
/**
|
|
1974
2036
|
* @param {TemplateNode} anchor
|
|
1975
2037
|
* @param {boolean} transition
|
|
1976
2038
|
*/
|
|
1977
|
-
constructor(t,
|
|
2039
|
+
constructor(t, n = !0) {
|
|
1978
2040
|
/** @type {TemplateNode} */
|
|
1979
|
-
|
|
2041
|
+
$(this, "anchor");
|
|
1980
2042
|
/** @type {Map<Batch, Key>} */
|
|
1981
|
-
b(this,
|
|
2043
|
+
b(this, ie, /* @__PURE__ */ new Map());
|
|
1982
2044
|
/**
|
|
1983
2045
|
* Map of keys to effects that are currently rendered in the DOM.
|
|
1984
2046
|
* These effects are visible and actively part of the document tree.
|
|
@@ -1993,296 +2055,297 @@ class to {
|
|
|
1993
2055
|
* Can result in the entries `true->Effect` and `false->Effect`
|
|
1994
2056
|
* @type {Map<Key, Effect>}
|
|
1995
2057
|
*/
|
|
1996
|
-
b(this,
|
|
2058
|
+
b(this, _e, /* @__PURE__ */ new Map());
|
|
1997
2059
|
/**
|
|
1998
2060
|
* Similar to #onscreen with respect to the keys, but contains branches that are not yet
|
|
1999
2061
|
* in the DOM, because their insertion is deferred.
|
|
2000
2062
|
* @type {Map<Key, Branch>}
|
|
2001
2063
|
*/
|
|
2002
|
-
b(this,
|
|
2064
|
+
b(this, W, /* @__PURE__ */ new Map());
|
|
2003
2065
|
/**
|
|
2004
2066
|
* Keys of effects that are currently outroing
|
|
2005
2067
|
* @type {Set<Key>}
|
|
2006
2068
|
*/
|
|
2007
|
-
b(this,
|
|
2069
|
+
b(this, Qe, /* @__PURE__ */ new Set());
|
|
2008
2070
|
/**
|
|
2009
2071
|
* Whether to pause (i.e. outro) on change, or destroy immediately.
|
|
2010
2072
|
* This is necessary for `<svelte:element>`
|
|
2011
2073
|
*/
|
|
2012
|
-
b(this,
|
|
2013
|
-
b(this,
|
|
2074
|
+
b(this, It, !0);
|
|
2075
|
+
b(this, Lt, () => {
|
|
2014
2076
|
var t = (
|
|
2015
2077
|
/** @type {Batch} */
|
|
2016
|
-
|
|
2078
|
+
z
|
|
2017
2079
|
);
|
|
2018
|
-
if (a(this,
|
|
2019
|
-
var
|
|
2080
|
+
if (a(this, ie).has(t)) {
|
|
2081
|
+
var n = (
|
|
2020
2082
|
/** @type {Key} */
|
|
2021
|
-
a(this,
|
|
2022
|
-
),
|
|
2023
|
-
if (
|
|
2024
|
-
|
|
2083
|
+
a(this, ie).get(t)
|
|
2084
|
+
), r = a(this, _e).get(n);
|
|
2085
|
+
if (r)
|
|
2086
|
+
Ui(r), a(this, Qe).delete(n);
|
|
2025
2087
|
else {
|
|
2026
|
-
var
|
|
2027
|
-
|
|
2088
|
+
var s = a(this, W).get(n);
|
|
2089
|
+
s && (a(this, _e).set(n, s.effect), a(this, W).delete(n), s.fragment.lastChild.remove(), this.anchor.before(s.fragment), r = s.effect);
|
|
2028
2090
|
}
|
|
2029
|
-
for (const [i, o] of a(this,
|
|
2030
|
-
if (a(this,
|
|
2091
|
+
for (const [i, o] of a(this, ie)) {
|
|
2092
|
+
if (a(this, ie).delete(i), i === t)
|
|
2031
2093
|
break;
|
|
2032
|
-
const l = a(this,
|
|
2033
|
-
l && (
|
|
2094
|
+
const l = a(this, W).get(o);
|
|
2095
|
+
l && (H(l.effect), a(this, W).delete(o));
|
|
2034
2096
|
}
|
|
2035
|
-
for (const [i, o] of a(this,
|
|
2036
|
-
if (i ===
|
|
2097
|
+
for (const [i, o] of a(this, _e)) {
|
|
2098
|
+
if (i === n || a(this, Qe).has(i)) continue;
|
|
2037
2099
|
const l = () => {
|
|
2038
|
-
if (Array.from(a(this,
|
|
2039
|
-
var
|
|
2040
|
-
|
|
2100
|
+
if (Array.from(a(this, ie).values()).includes(i)) {
|
|
2101
|
+
var f = document.createDocumentFragment();
|
|
2102
|
+
ns(o, f), f.append(fe()), a(this, W).set(i, { effect: o, fragment: f });
|
|
2041
2103
|
} else
|
|
2042
|
-
|
|
2043
|
-
a(this,
|
|
2104
|
+
H(o);
|
|
2105
|
+
a(this, Qe).delete(i), a(this, _e).delete(i);
|
|
2044
2106
|
};
|
|
2045
|
-
a(this,
|
|
2107
|
+
a(this, It) || !r ? (a(this, Qe).add(i), Ct(o, l, !1)) : l();
|
|
2046
2108
|
}
|
|
2047
2109
|
}
|
|
2048
2110
|
});
|
|
2049
2111
|
/**
|
|
2050
2112
|
* @param {Batch} batch
|
|
2051
2113
|
*/
|
|
2052
|
-
b(this,
|
|
2053
|
-
a(this,
|
|
2054
|
-
const
|
|
2055
|
-
for (const [
|
|
2056
|
-
|
|
2114
|
+
b(this, rn, (t) => {
|
|
2115
|
+
a(this, ie).delete(t);
|
|
2116
|
+
const n = Array.from(a(this, ie).values());
|
|
2117
|
+
for (const [r, s] of a(this, W))
|
|
2118
|
+
n.includes(r) || (H(s.effect), a(this, W).delete(r));
|
|
2057
2119
|
});
|
|
2058
|
-
this.anchor = t, g(this,
|
|
2120
|
+
this.anchor = t, g(this, It, n);
|
|
2059
2121
|
}
|
|
2060
2122
|
/**
|
|
2061
2123
|
*
|
|
2062
2124
|
* @param {any} key
|
|
2063
2125
|
* @param {null | ((target: TemplateNode) => void)} fn
|
|
2064
2126
|
*/
|
|
2065
|
-
ensure(t,
|
|
2066
|
-
var
|
|
2127
|
+
ensure(t, n) {
|
|
2128
|
+
var r = (
|
|
2067
2129
|
/** @type {Batch} */
|
|
2068
|
-
|
|
2069
|
-
),
|
|
2070
|
-
if (
|
|
2071
|
-
if (
|
|
2072
|
-
var i = document.createDocumentFragment(), o =
|
|
2073
|
-
i.append(o), a(this,
|
|
2074
|
-
effect:
|
|
2130
|
+
z
|
|
2131
|
+
), s = Ii();
|
|
2132
|
+
if (n && !a(this, _e).has(t) && !a(this, W).has(t))
|
|
2133
|
+
if (s) {
|
|
2134
|
+
var i = document.createDocumentFragment(), o = fe();
|
|
2135
|
+
i.append(o), a(this, W).set(t, {
|
|
2136
|
+
effect: $e(() => n(o)),
|
|
2075
2137
|
fragment: i
|
|
2076
2138
|
});
|
|
2077
2139
|
} else
|
|
2078
|
-
a(this,
|
|
2140
|
+
a(this, _e).set(
|
|
2079
2141
|
t,
|
|
2080
|
-
|
|
2142
|
+
$e(() => n(this.anchor))
|
|
2081
2143
|
);
|
|
2082
|
-
if (a(this,
|
|
2083
|
-
for (const [l,
|
|
2084
|
-
l === t ?
|
|
2085
|
-
for (const [l,
|
|
2086
|
-
l === t ?
|
|
2087
|
-
|
|
2144
|
+
if (a(this, ie).set(r, t), s) {
|
|
2145
|
+
for (const [l, u] of a(this, _e))
|
|
2146
|
+
l === t ? r.unskip_effect(u) : r.skip_effect(u);
|
|
2147
|
+
for (const [l, u] of a(this, W))
|
|
2148
|
+
l === t ? r.unskip_effect(u.effect) : r.skip_effect(u.effect);
|
|
2149
|
+
r.oncommit(a(this, Lt)), r.ondiscard(a(this, rn));
|
|
2088
2150
|
} else
|
|
2089
|
-
|
|
2151
|
+
T && (this.anchor = E), a(this, Lt).call(this);
|
|
2090
2152
|
}
|
|
2091
2153
|
}
|
|
2092
|
-
|
|
2093
|
-
function
|
|
2094
|
-
K === null &&
|
|
2095
|
-
const t =
|
|
2154
|
+
ie = new WeakMap(), _e = new WeakMap(), W = new WeakMap(), Qe = new WeakMap(), It = new WeakMap(), Lt = new WeakMap(), rn = new WeakMap();
|
|
2155
|
+
function oo(e) {
|
|
2156
|
+
K === null && ri(), zn(() => {
|
|
2157
|
+
const t = Hn(e);
|
|
2096
2158
|
if (typeof t == "function") return (
|
|
2097
2159
|
/** @type {() => void} */
|
|
2098
2160
|
t
|
|
2099
2161
|
);
|
|
2100
2162
|
});
|
|
2101
2163
|
}
|
|
2102
|
-
function
|
|
2103
|
-
|
|
2104
|
-
var
|
|
2164
|
+
function ot(e, t, n = !1) {
|
|
2165
|
+
T && In();
|
|
2166
|
+
var r = new io(e), s = n ? wt : 0;
|
|
2105
2167
|
function i(o, l) {
|
|
2106
|
-
if (
|
|
2107
|
-
const
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2168
|
+
if (T) {
|
|
2169
|
+
const d = pi(e);
|
|
2170
|
+
var u;
|
|
2171
|
+
if (d === Rn ? u = 0 : d === On ? u = !1 : u = parseInt(d.substring(1)), o !== u) {
|
|
2172
|
+
var f = Er();
|
|
2173
|
+
ne(f), r.anchor = f, at(!1), r.ensure(o, l), at(!0);
|
|
2111
2174
|
return;
|
|
2112
2175
|
}
|
|
2113
2176
|
}
|
|
2114
|
-
|
|
2177
|
+
r.ensure(o, l);
|
|
2115
2178
|
}
|
|
2116
|
-
|
|
2179
|
+
Jr(() => {
|
|
2117
2180
|
var o = !1;
|
|
2118
|
-
t((l,
|
|
2119
|
-
o = !0, i(
|
|
2181
|
+
t((l, u = 0) => {
|
|
2182
|
+
o = !0, i(u, l);
|
|
2120
2183
|
}), o || i(!1, null);
|
|
2121
|
-
},
|
|
2184
|
+
}, s);
|
|
2122
2185
|
}
|
|
2123
|
-
function
|
|
2124
|
-
|
|
2125
|
-
var
|
|
2186
|
+
function ao(e, t) {
|
|
2187
|
+
Xr(() => {
|
|
2188
|
+
var n = e.getRootNode(), r = (
|
|
2126
2189
|
/** @type {ShadowRoot} */
|
|
2127
|
-
|
|
2190
|
+
n.host ? (
|
|
2128
2191
|
/** @type {ShadowRoot} */
|
|
2129
|
-
|
|
2192
|
+
n
|
|
2130
2193
|
) : (
|
|
2131
2194
|
/** @type {Document} */
|
|
2132
|
-
|
|
2133
|
-
|
|
2195
|
+
n.head ?? /** @type {Document} */
|
|
2196
|
+
n.ownerDocument.head
|
|
2134
2197
|
)
|
|
2135
2198
|
);
|
|
2136
|
-
if (!
|
|
2137
|
-
const
|
|
2138
|
-
|
|
2199
|
+
if (!r.querySelector("#" + t.hash)) {
|
|
2200
|
+
const s = Fn("style");
|
|
2201
|
+
s.id = t.hash, s.textContent = t.code, r.appendChild(s);
|
|
2139
2202
|
}
|
|
2140
2203
|
});
|
|
2141
2204
|
}
|
|
2142
|
-
const
|
|
2205
|
+
const fr = [...`
|
|
2143
2206
|
\r\f \v\uFEFF`];
|
|
2144
|
-
function
|
|
2145
|
-
var
|
|
2146
|
-
if (
|
|
2147
|
-
for (var
|
|
2148
|
-
if (
|
|
2149
|
-
|
|
2150
|
-
else if (
|
|
2151
|
-
for (var i =
|
|
2207
|
+
function lo(e, t, n) {
|
|
2208
|
+
var r = "" + e;
|
|
2209
|
+
if (n) {
|
|
2210
|
+
for (var s in n)
|
|
2211
|
+
if (n[s])
|
|
2212
|
+
r = r ? r + " " + s : s;
|
|
2213
|
+
else if (r.length)
|
|
2214
|
+
for (var i = s.length, o = 0; (o = r.indexOf(s, o)) >= 0; ) {
|
|
2152
2215
|
var l = o + i;
|
|
2153
|
-
(o === 0 ||
|
|
2216
|
+
(o === 0 || fr.includes(r[o - 1])) && (l === r.length || fr.includes(r[l])) ? r = (o === 0 ? "" : r.substring(0, o)) + r.substring(l + 1) : o = l;
|
|
2154
2217
|
}
|
|
2155
2218
|
}
|
|
2156
|
-
return
|
|
2219
|
+
return r === "" ? null : r;
|
|
2157
2220
|
}
|
|
2158
|
-
function
|
|
2221
|
+
function uo(e, t) {
|
|
2159
2222
|
return e == null ? null : String(e);
|
|
2160
2223
|
}
|
|
2161
|
-
function
|
|
2224
|
+
function fo(e, t, n, r, s, i) {
|
|
2162
2225
|
var o = e.__className;
|
|
2163
|
-
if (
|
|
2164
|
-
var l =
|
|
2165
|
-
(!
|
|
2166
|
-
} else if (i &&
|
|
2167
|
-
for (var
|
|
2168
|
-
var
|
|
2169
|
-
(
|
|
2226
|
+
if (T || o !== n || o === void 0) {
|
|
2227
|
+
var l = lo(n, r, i);
|
|
2228
|
+
(!T || l !== e.getAttribute("class")) && (l == null ? e.removeAttribute("class") : e.className = l), e.__className = n;
|
|
2229
|
+
} else if (i && s !== i)
|
|
2230
|
+
for (var u in i) {
|
|
2231
|
+
var f = !!i[u];
|
|
2232
|
+
(s == null || f !== !!s[u]) && e.classList.toggle(u, f);
|
|
2170
2233
|
}
|
|
2171
2234
|
return i;
|
|
2172
2235
|
}
|
|
2173
|
-
function
|
|
2174
|
-
var
|
|
2175
|
-
if (
|
|
2176
|
-
var i =
|
|
2177
|
-
(!
|
|
2236
|
+
function co(e, t, n, r) {
|
|
2237
|
+
var s = e.__style;
|
|
2238
|
+
if (T || s !== t) {
|
|
2239
|
+
var i = uo(t);
|
|
2240
|
+
(!T || i !== e.getAttribute("style")) && (i == null ? e.removeAttribute("style") : e.style.cssText = i), e.__style = t;
|
|
2178
2241
|
}
|
|
2179
|
-
return
|
|
2242
|
+
return r;
|
|
2180
2243
|
}
|
|
2181
|
-
const
|
|
2182
|
-
function
|
|
2183
|
-
if (
|
|
2184
|
-
var t = !1,
|
|
2244
|
+
const ho = /* @__PURE__ */ Symbol("is custom element"), vo = /* @__PURE__ */ Symbol("is html"), po = $r ? "link" : "LINK", _o = $r ? "progress" : "PROGRESS";
|
|
2245
|
+
function go(e) {
|
|
2246
|
+
if (T) {
|
|
2247
|
+
var t = !1, n = () => {
|
|
2185
2248
|
if (!t) {
|
|
2186
2249
|
if (t = !0, e.hasAttribute("value")) {
|
|
2187
|
-
var
|
|
2188
|
-
|
|
2250
|
+
var r = e.value;
|
|
2251
|
+
Pn(e, "value", null), e.value = r;
|
|
2189
2252
|
}
|
|
2190
2253
|
if (e.hasAttribute("checked")) {
|
|
2191
|
-
var
|
|
2192
|
-
|
|
2254
|
+
var s = e.checked;
|
|
2255
|
+
Pn(e, "checked", null), e.checked = s;
|
|
2193
2256
|
}
|
|
2194
2257
|
}
|
|
2195
2258
|
};
|
|
2196
|
-
e.__on_r =
|
|
2259
|
+
e.__on_r = n, Le(n), Li();
|
|
2197
2260
|
}
|
|
2198
2261
|
}
|
|
2199
|
-
function
|
|
2200
|
-
var
|
|
2201
|
-
|
|
2262
|
+
function wo(e, t) {
|
|
2263
|
+
var n = hs(e);
|
|
2264
|
+
n.value === (n.value = // treat null and undefined the same for the initial value
|
|
2202
2265
|
t ?? void 0) || // @ts-expect-error
|
|
2203
2266
|
// `progress` elements always need their value set when it's `0`
|
|
2204
|
-
e.value === t && (t !== 0 || e.nodeName !==
|
|
2267
|
+
e.value === t && (t !== 0 || e.nodeName !== _o) || (e.value = t ?? "");
|
|
2205
2268
|
}
|
|
2206
|
-
function
|
|
2207
|
-
var
|
|
2208
|
-
|
|
2269
|
+
function Pn(e, t, n, r) {
|
|
2270
|
+
var s = hs(e);
|
|
2271
|
+
T && (s[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === po) || s[t] !== (s[t] = n) && (t === "loading" && (e[ni] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && bo(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
|
|
2209
2272
|
}
|
|
2210
2273
|
function hs(e) {
|
|
2211
2274
|
return (
|
|
2212
2275
|
/** @type {Record<string | symbol, unknown>} **/
|
|
2213
2276
|
// @ts-expect-error
|
|
2214
2277
|
e.__attributes ?? (e.__attributes = {
|
|
2215
|
-
[
|
|
2216
|
-
[
|
|
2278
|
+
[ho]: e.nodeName.includes("-"),
|
|
2279
|
+
[vo]: e.namespaceURI === wr
|
|
2217
2280
|
})
|
|
2218
2281
|
);
|
|
2219
2282
|
}
|
|
2220
|
-
var
|
|
2221
|
-
function
|
|
2222
|
-
var t = e.getAttribute("is") || e.nodeName,
|
|
2223
|
-
if (
|
|
2224
|
-
|
|
2225
|
-
for (var
|
|
2226
|
-
|
|
2227
|
-
for (var o in
|
|
2228
|
-
|
|
2229
|
-
|
|
2283
|
+
var cr = /* @__PURE__ */ new Map();
|
|
2284
|
+
function bo(e) {
|
|
2285
|
+
var t = e.getAttribute("is") || e.nodeName, n = cr.get(t);
|
|
2286
|
+
if (n) return n;
|
|
2287
|
+
cr.set(t, n = []);
|
|
2288
|
+
for (var r, s = e, i = Element.prototype; i !== s; ) {
|
|
2289
|
+
r = Ks(s);
|
|
2290
|
+
for (var o in r)
|
|
2291
|
+
r[o].set && n.push(o);
|
|
2292
|
+
s = br(s);
|
|
2230
2293
|
}
|
|
2231
|
-
return
|
|
2294
|
+
return n;
|
|
2232
2295
|
}
|
|
2233
|
-
function
|
|
2234
|
-
return e === t || e?.[
|
|
2296
|
+
function dr(e, t) {
|
|
2297
|
+
return e === t || e?.[Wt] === t;
|
|
2235
2298
|
}
|
|
2236
|
-
function
|
|
2237
|
-
return
|
|
2238
|
-
var
|
|
2239
|
-
return
|
|
2240
|
-
|
|
2241
|
-
e !==
|
|
2299
|
+
function mo(e = {}, t, n, r) {
|
|
2300
|
+
return Xr(() => {
|
|
2301
|
+
var s, i;
|
|
2302
|
+
return Vn(() => {
|
|
2303
|
+
s = i, i = [], Hn(() => {
|
|
2304
|
+
e !== n(...i) && (t(e, ...i), s && dr(n(...s), e) && t(null, ...s));
|
|
2242
2305
|
});
|
|
2243
2306
|
}), () => {
|
|
2244
|
-
|
|
2245
|
-
i &&
|
|
2307
|
+
Le(() => {
|
|
2308
|
+
i && dr(n(...i), e) && t(null, ...i);
|
|
2246
2309
|
});
|
|
2247
2310
|
};
|
|
2248
2311
|
}), e;
|
|
2249
2312
|
}
|
|
2250
|
-
function
|
|
2251
|
-
var
|
|
2313
|
+
function qt(e, t, n, r) {
|
|
2314
|
+
var s = (
|
|
2252
2315
|
/** @type {V} */
|
|
2253
|
-
|
|
2254
|
-
), i = !0, o = () => (i && (i = !1,
|
|
2255
|
-
|
|
2316
|
+
r
|
|
2317
|
+
), i = !0, o = () => (i && (i = !1, s = /** @type {V} */
|
|
2318
|
+
r), s), l;
|
|
2256
2319
|
l = /** @type {V} */
|
|
2257
|
-
e[t], l === void 0 &&
|
|
2258
|
-
var
|
|
2259
|
-
|
|
2320
|
+
e[t], l === void 0 && r !== void 0 && (l = o());
|
|
2321
|
+
var u;
|
|
2322
|
+
u = () => {
|
|
2260
2323
|
var c = (
|
|
2261
2324
|
/** @type {V} */
|
|
2262
2325
|
e[t]
|
|
2263
2326
|
);
|
|
2264
2327
|
return c === void 0 ? o() : (i = !0, c);
|
|
2265
2328
|
};
|
|
2266
|
-
var
|
|
2329
|
+
var f = !1, d = /* @__PURE__ */ Dn(() => (f = !1, u())), p = (
|
|
2267
2330
|
/** @type {Effect} */
|
|
2268
|
-
|
|
2331
|
+
k
|
|
2269
2332
|
);
|
|
2270
2333
|
return (
|
|
2271
2334
|
/** @type {() => V} */
|
|
2272
|
-
(function(c,
|
|
2335
|
+
(function(c, v) {
|
|
2273
2336
|
if (arguments.length > 0) {
|
|
2274
|
-
const w =
|
|
2275
|
-
return
|
|
2337
|
+
const w = v ? h(d) : c;
|
|
2338
|
+
return y(d, w), f = !0, s !== void 0 && (s = w), c;
|
|
2276
2339
|
}
|
|
2277
|
-
return
|
|
2340
|
+
return Fe && f || (p.f & Ce) !== 0 ? d.v : h(d);
|
|
2278
2341
|
})
|
|
2279
2342
|
);
|
|
2280
2343
|
}
|
|
2281
|
-
function
|
|
2282
|
-
return new
|
|
2344
|
+
function yo(e) {
|
|
2345
|
+
return new xo(e);
|
|
2283
2346
|
}
|
|
2284
|
-
var
|
|
2285
|
-
class
|
|
2347
|
+
var Ae, Z;
|
|
2348
|
+
class xo {
|
|
2286
2349
|
/**
|
|
2287
2350
|
* @param {ComponentConstructorOptions & {
|
|
2288
2351
|
* component: any;
|
|
@@ -2290,37 +2353,37 @@ class _o {
|
|
|
2290
2353
|
*/
|
|
2291
2354
|
constructor(t) {
|
|
2292
2355
|
/** @type {any} */
|
|
2293
|
-
b(this,
|
|
2356
|
+
b(this, Ae);
|
|
2294
2357
|
/** @type {Record<string, any>} */
|
|
2295
2358
|
b(this, Z);
|
|
2296
|
-
var
|
|
2359
|
+
var n = /* @__PURE__ */ new Map(), r = (i, o) => {
|
|
2297
2360
|
var l = /* @__PURE__ */ Ri(o, !1, !1);
|
|
2298
|
-
return
|
|
2361
|
+
return n.set(i, l), l;
|
|
2299
2362
|
};
|
|
2300
|
-
const
|
|
2363
|
+
const s = new Proxy(
|
|
2301
2364
|
{ ...t.props || {}, $$events: {} },
|
|
2302
2365
|
{
|
|
2303
2366
|
get(i, o) {
|
|
2304
|
-
return h(
|
|
2367
|
+
return h(n.get(o) ?? r(o, Reflect.get(i, o)));
|
|
2305
2368
|
},
|
|
2306
2369
|
has(i, o) {
|
|
2307
|
-
return o ===
|
|
2370
|
+
return o === ti ? !0 : (h(n.get(o) ?? r(o, Reflect.get(i, o))), Reflect.has(i, o));
|
|
2308
2371
|
},
|
|
2309
2372
|
set(i, o, l) {
|
|
2310
|
-
return
|
|
2373
|
+
return y(n.get(o) ?? r(o, l), l), Reflect.set(i, o, l);
|
|
2311
2374
|
}
|
|
2312
2375
|
}
|
|
2313
2376
|
);
|
|
2314
|
-
g(this, Z, (t.hydrate ?
|
|
2377
|
+
g(this, Z, (t.hydrate ? ro : cs)(t.component, {
|
|
2315
2378
|
target: t.target,
|
|
2316
2379
|
anchor: t.anchor,
|
|
2317
|
-
props:
|
|
2380
|
+
props: s,
|
|
2318
2381
|
context: t.context,
|
|
2319
2382
|
intro: t.intro ?? !1,
|
|
2320
2383
|
recover: t.recover
|
|
2321
|
-
})), (!t?.props?.$$host || t.sync === !1) &&
|
|
2384
|
+
})), (!t?.props?.$$host || t.sync === !1) && St(), g(this, Ae, s.$$events);
|
|
2322
2385
|
for (const i of Object.keys(a(this, Z)))
|
|
2323
|
-
i === "$set" || i === "$destroy" || i === "$on" ||
|
|
2386
|
+
i === "$set" || i === "$destroy" || i === "$on" || en(this, i, {
|
|
2324
2387
|
get() {
|
|
2325
2388
|
return a(this, Z)[i];
|
|
2326
2389
|
},
|
|
@@ -2332,9 +2395,9 @@ class _o {
|
|
|
2332
2395
|
});
|
|
2333
2396
|
a(this, Z).$set = /** @param {Record<string, any>} next */
|
|
2334
2397
|
(i) => {
|
|
2335
|
-
Object.assign(
|
|
2398
|
+
Object.assign(s, i);
|
|
2336
2399
|
}, a(this, Z).$destroy = () => {
|
|
2337
|
-
|
|
2400
|
+
so(a(this, Z));
|
|
2338
2401
|
};
|
|
2339
2402
|
}
|
|
2340
2403
|
/** @param {Record<string, any>} props */
|
|
@@ -2346,13 +2409,13 @@ class _o {
|
|
|
2346
2409
|
* @param {(...args: any[]) => any} callback
|
|
2347
2410
|
* @returns {any}
|
|
2348
2411
|
*/
|
|
2349
|
-
$on(t,
|
|
2350
|
-
a(this,
|
|
2351
|
-
const
|
|
2352
|
-
return a(this,
|
|
2353
|
-
a(this,
|
|
2412
|
+
$on(t, n) {
|
|
2413
|
+
a(this, Ae)[t] = a(this, Ae)[t] || [];
|
|
2414
|
+
const r = (...s) => n.call(this, ...s);
|
|
2415
|
+
return a(this, Ae)[t].push(r), () => {
|
|
2416
|
+
a(this, Ae)[t] = a(this, Ae)[t].filter(
|
|
2354
2417
|
/** @param {any} fn */
|
|
2355
|
-
(
|
|
2418
|
+
(s) => s !== r
|
|
2356
2419
|
);
|
|
2357
2420
|
};
|
|
2358
2421
|
}
|
|
@@ -2360,7 +2423,7 @@ class _o {
|
|
|
2360
2423
|
a(this, Z).$destroy();
|
|
2361
2424
|
}
|
|
2362
2425
|
}
|
|
2363
|
-
|
|
2426
|
+
Ae = new WeakMap(), Z = new WeakMap();
|
|
2364
2427
|
let vs;
|
|
2365
2428
|
typeof HTMLElement == "function" && (vs = class extends HTMLElement {
|
|
2366
2429
|
/**
|
|
@@ -2368,102 +2431,102 @@ typeof HTMLElement == "function" && (vs = class extends HTMLElement {
|
|
|
2368
2431
|
* @param {*} $$slots
|
|
2369
2432
|
* @param {ShadowRootInit | undefined} shadow_root_init
|
|
2370
2433
|
*/
|
|
2371
|
-
constructor(t,
|
|
2434
|
+
constructor(t, n, r) {
|
|
2372
2435
|
super();
|
|
2373
2436
|
/** The Svelte component constructor */
|
|
2374
|
-
|
|
2437
|
+
$(this, "$$ctor");
|
|
2375
2438
|
/** Slots */
|
|
2376
|
-
|
|
2439
|
+
$(this, "$$s");
|
|
2377
2440
|
/** @type {any} The Svelte component instance */
|
|
2378
|
-
|
|
2441
|
+
$(this, "$$c");
|
|
2379
2442
|
/** Whether or not the custom element is connected */
|
|
2380
|
-
|
|
2443
|
+
$(this, "$$cn", !1);
|
|
2381
2444
|
/** @type {Record<string, any>} Component props data */
|
|
2382
|
-
|
|
2445
|
+
$(this, "$$d", {});
|
|
2383
2446
|
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
2384
|
-
|
|
2447
|
+
$(this, "$$r", !1);
|
|
2385
2448
|
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
2386
|
-
|
|
2449
|
+
$(this, "$$p_d", {});
|
|
2387
2450
|
/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
|
|
2388
|
-
|
|
2451
|
+
$(this, "$$l", {});
|
|
2389
2452
|
/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
|
|
2390
|
-
|
|
2453
|
+
$(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
2391
2454
|
/** @type {any} The managed render effect for reflecting attributes */
|
|
2392
|
-
|
|
2455
|
+
$(this, "$$me");
|
|
2393
2456
|
/** @type {ShadowRoot | null} The ShadowRoot of the custom element */
|
|
2394
|
-
|
|
2395
|
-
this.$$ctor = t, this.$$s =
|
|
2457
|
+
$(this, "$$shadowRoot", null);
|
|
2458
|
+
this.$$ctor = t, this.$$s = n, r && (this.$$shadowRoot = this.attachShadow(r));
|
|
2396
2459
|
}
|
|
2397
2460
|
/**
|
|
2398
2461
|
* @param {string} type
|
|
2399
2462
|
* @param {EventListenerOrEventListenerObject} listener
|
|
2400
2463
|
* @param {boolean | AddEventListenerOptions} [options]
|
|
2401
2464
|
*/
|
|
2402
|
-
addEventListener(t,
|
|
2403
|
-
if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(
|
|
2404
|
-
const
|
|
2405
|
-
this.$$l_u.set(
|
|
2465
|
+
addEventListener(t, n, r) {
|
|
2466
|
+
if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(n), this.$$c) {
|
|
2467
|
+
const s = this.$$c.$on(t, n);
|
|
2468
|
+
this.$$l_u.set(n, s);
|
|
2406
2469
|
}
|
|
2407
|
-
super.addEventListener(t,
|
|
2470
|
+
super.addEventListener(t, n, r);
|
|
2408
2471
|
}
|
|
2409
2472
|
/**
|
|
2410
2473
|
* @param {string} type
|
|
2411
2474
|
* @param {EventListenerOrEventListenerObject} listener
|
|
2412
2475
|
* @param {boolean | AddEventListenerOptions} [options]
|
|
2413
2476
|
*/
|
|
2414
|
-
removeEventListener(t,
|
|
2415
|
-
if (super.removeEventListener(t,
|
|
2416
|
-
const
|
|
2417
|
-
|
|
2477
|
+
removeEventListener(t, n, r) {
|
|
2478
|
+
if (super.removeEventListener(t, n, r), this.$$c) {
|
|
2479
|
+
const s = this.$$l_u.get(n);
|
|
2480
|
+
s && (s(), this.$$l_u.delete(n));
|
|
2418
2481
|
}
|
|
2419
2482
|
}
|
|
2420
2483
|
async connectedCallback() {
|
|
2421
2484
|
if (this.$$cn = !0, !this.$$c) {
|
|
2422
|
-
let t = function(
|
|
2485
|
+
let t = function(s) {
|
|
2423
2486
|
return (i) => {
|
|
2424
|
-
const o =
|
|
2425
|
-
|
|
2487
|
+
const o = Fn("slot");
|
|
2488
|
+
s !== "default" && (o.name = s), Y(i, o);
|
|
2426
2489
|
};
|
|
2427
2490
|
};
|
|
2428
2491
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
2429
2492
|
return;
|
|
2430
|
-
const
|
|
2431
|
-
for (const
|
|
2432
|
-
|
|
2433
|
-
for (const
|
|
2434
|
-
const i = this.$$g_p(
|
|
2435
|
-
i in this.$$d || (this.$$d[i] =
|
|
2493
|
+
const n = {}, r = ko(this);
|
|
2494
|
+
for (const s of this.$$s)
|
|
2495
|
+
s in r && (s === "default" && !this.$$d.children ? (this.$$d.children = t(s), n.default = !0) : n[s] = t(s));
|
|
2496
|
+
for (const s of this.attributes) {
|
|
2497
|
+
const i = this.$$g_p(s.name);
|
|
2498
|
+
i in this.$$d || (this.$$d[i] = Qt(i, s.value, this.$$p_d, "toProp"));
|
|
2436
2499
|
}
|
|
2437
|
-
for (const
|
|
2438
|
-
!(
|
|
2439
|
-
this.$$c =
|
|
2500
|
+
for (const s in this.$$p_d)
|
|
2501
|
+
!(s in this.$$d) && this[s] !== void 0 && (this.$$d[s] = this[s], delete this[s]);
|
|
2502
|
+
this.$$c = yo({
|
|
2440
2503
|
component: this.$$ctor,
|
|
2441
2504
|
target: this.$$shadowRoot || this,
|
|
2442
2505
|
props: {
|
|
2443
2506
|
...this.$$d,
|
|
2444
|
-
$$slots:
|
|
2507
|
+
$$slots: n,
|
|
2445
2508
|
$$host: this
|
|
2446
2509
|
}
|
|
2447
|
-
}), this.$$me =
|
|
2448
|
-
|
|
2510
|
+
}), this.$$me = ji(() => {
|
|
2511
|
+
Vn(() => {
|
|
2449
2512
|
this.$$r = !0;
|
|
2450
|
-
for (const
|
|
2451
|
-
if (!this.$$p_d[
|
|
2452
|
-
this.$$d[
|
|
2453
|
-
const i =
|
|
2454
|
-
|
|
2455
|
-
this.$$d[
|
|
2513
|
+
for (const s of Zt(this.$$c)) {
|
|
2514
|
+
if (!this.$$p_d[s]?.reflect) continue;
|
|
2515
|
+
this.$$d[s] = this.$$c[s];
|
|
2516
|
+
const i = Qt(
|
|
2517
|
+
s,
|
|
2518
|
+
this.$$d[s],
|
|
2456
2519
|
this.$$p_d,
|
|
2457
2520
|
"toAttribute"
|
|
2458
2521
|
);
|
|
2459
|
-
i == null ? this.removeAttribute(this.$$p_d[
|
|
2522
|
+
i == null ? this.removeAttribute(this.$$p_d[s].attribute || s) : this.setAttribute(this.$$p_d[s].attribute || s, i);
|
|
2460
2523
|
}
|
|
2461
2524
|
this.$$r = !1;
|
|
2462
2525
|
});
|
|
2463
2526
|
});
|
|
2464
|
-
for (const
|
|
2465
|
-
for (const i of this.$$l[
|
|
2466
|
-
const o = this.$$c.$on(
|
|
2527
|
+
for (const s in this.$$l)
|
|
2528
|
+
for (const i of this.$$l[s]) {
|
|
2529
|
+
const o = this.$$c.$on(s, i);
|
|
2467
2530
|
this.$$l_u.set(i, o);
|
|
2468
2531
|
}
|
|
2469
2532
|
this.$$l = {};
|
|
@@ -2476,8 +2539,8 @@ typeof HTMLElement == "function" && (vs = class extends HTMLElement {
|
|
|
2476
2539
|
* @param {string} _oldValue
|
|
2477
2540
|
* @param {string} newValue
|
|
2478
2541
|
*/
|
|
2479
|
-
attributeChangedCallback(t,
|
|
2480
|
-
this.$$r || (t = this.$$g_p(t), this.$$d[t] =
|
|
2542
|
+
attributeChangedCallback(t, n, r) {
|
|
2543
|
+
this.$$r || (t = this.$$g_p(t), this.$$d[t] = Qt(t, r, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
|
|
2481
2544
|
}
|
|
2482
2545
|
disconnectedCallback() {
|
|
2483
2546
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -2488,17 +2551,17 @@ typeof HTMLElement == "function" && (vs = class extends HTMLElement {
|
|
|
2488
2551
|
* @param {string} attribute_name
|
|
2489
2552
|
*/
|
|
2490
2553
|
$$g_p(t) {
|
|
2491
|
-
return
|
|
2492
|
-
(
|
|
2554
|
+
return Zt(this.$$p_d).find(
|
|
2555
|
+
(n) => this.$$p_d[n].attribute === t || !this.$$p_d[n].attribute && n.toLowerCase() === t
|
|
2493
2556
|
) || t;
|
|
2494
2557
|
}
|
|
2495
2558
|
});
|
|
2496
|
-
function
|
|
2497
|
-
const
|
|
2498
|
-
if (t =
|
|
2559
|
+
function Qt(e, t, n, r) {
|
|
2560
|
+
const s = n[e]?.type;
|
|
2561
|
+
if (t = s === "Boolean" && typeof t != "boolean" ? t != null : t, !r || !n[e])
|
|
2499
2562
|
return t;
|
|
2500
|
-
if (
|
|
2501
|
-
switch (
|
|
2563
|
+
if (r === "toAttribute")
|
|
2564
|
+
switch (s) {
|
|
2502
2565
|
case "Object":
|
|
2503
2566
|
case "Array":
|
|
2504
2567
|
return t == null ? null : JSON.stringify(t);
|
|
@@ -2510,7 +2573,7 @@ function Jt(e, t, r, s) {
|
|
|
2510
2573
|
return t;
|
|
2511
2574
|
}
|
|
2512
2575
|
else
|
|
2513
|
-
switch (
|
|
2576
|
+
switch (s) {
|
|
2514
2577
|
case "Object":
|
|
2515
2578
|
case "Array":
|
|
2516
2579
|
return t && JSON.parse(t);
|
|
@@ -2523,42 +2586,42 @@ function Jt(e, t, r, s) {
|
|
|
2523
2586
|
return t;
|
|
2524
2587
|
}
|
|
2525
2588
|
}
|
|
2526
|
-
function
|
|
2589
|
+
function ko(e) {
|
|
2527
2590
|
const t = {};
|
|
2528
|
-
return e.childNodes.forEach((
|
|
2591
|
+
return e.childNodes.forEach((n) => {
|
|
2529
2592
|
t[
|
|
2530
2593
|
/** @type {Element} node */
|
|
2531
|
-
|
|
2594
|
+
n.slot || "default"
|
|
2532
2595
|
] = !0;
|
|
2533
2596
|
}), t;
|
|
2534
2597
|
}
|
|
2535
|
-
function
|
|
2598
|
+
function $o(e, t, n, r, s, i) {
|
|
2536
2599
|
let o = class extends vs {
|
|
2537
2600
|
constructor() {
|
|
2538
|
-
super(e,
|
|
2601
|
+
super(e, n, s), this.$$p_d = t;
|
|
2539
2602
|
}
|
|
2540
2603
|
static get observedAttributes() {
|
|
2541
|
-
return
|
|
2604
|
+
return Zt(t).map(
|
|
2542
2605
|
(l) => (t[l].attribute || l).toLowerCase()
|
|
2543
2606
|
);
|
|
2544
2607
|
}
|
|
2545
2608
|
};
|
|
2546
|
-
return
|
|
2547
|
-
|
|
2609
|
+
return Zt(t).forEach((l) => {
|
|
2610
|
+
en(o.prototype, l, {
|
|
2548
2611
|
get() {
|
|
2549
2612
|
return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
|
|
2550
2613
|
},
|
|
2551
|
-
set(
|
|
2552
|
-
|
|
2553
|
-
var
|
|
2554
|
-
if (
|
|
2555
|
-
var d =
|
|
2556
|
-
d ?
|
|
2614
|
+
set(u) {
|
|
2615
|
+
u = Qt(l, u, t), this.$$d[l] = u;
|
|
2616
|
+
var f = this.$$c;
|
|
2617
|
+
if (f) {
|
|
2618
|
+
var d = lt(f, l)?.get;
|
|
2619
|
+
d ? f[l] = u : f.$set({ [l]: u });
|
|
2557
2620
|
}
|
|
2558
2621
|
}
|
|
2559
2622
|
});
|
|
2560
|
-
}),
|
|
2561
|
-
|
|
2623
|
+
}), r.forEach((l) => {
|
|
2624
|
+
en(o.prototype, l, {
|
|
2562
2625
|
get() {
|
|
2563
2626
|
return this.$$c?.[l];
|
|
2564
2627
|
}
|
|
@@ -2566,52 +2629,207 @@ function wo(e, t, r, s, n, i) {
|
|
|
2566
2629
|
}), e.element = /** @type {any} */
|
|
2567
2630
|
o, o;
|
|
2568
2631
|
}
|
|
2569
|
-
var
|
|
2632
|
+
var hr;
|
|
2570
2633
|
(function(e) {
|
|
2571
2634
|
e.TTS_WORD = "tts-word", e.TTS_SENTENCE = "tts-sentence", e.ANNOTATION = "annotation";
|
|
2572
|
-
})(
|
|
2573
|
-
var
|
|
2635
|
+
})(hr || (hr = {}));
|
|
2636
|
+
var vr;
|
|
2574
2637
|
(function(e) {
|
|
2575
|
-
e.YELLOW = "yellow", e.GREEN = "green", e.BLUE = "blue", e.PINK = "pink", e.ORANGE = "orange";
|
|
2576
|
-
})(
|
|
2577
|
-
const
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2638
|
+
e.YELLOW = "yellow", e.GREEN = "green", e.BLUE = "blue", e.PINK = "pink", e.ORANGE = "orange", e.UNDERLINE = "underline";
|
|
2639
|
+
})(vr || (vr = {}));
|
|
2640
|
+
const Eo = {
|
|
2641
|
+
/**
|
|
2642
|
+
* Visual accessibility features
|
|
2643
|
+
* For students with low vision, color blindness, or visual processing needs
|
|
2644
|
+
*/
|
|
2645
|
+
visual: {
|
|
2646
|
+
// Magnification and zoom
|
|
2647
|
+
magnification: "magnification",
|
|
2648
|
+
screenMagnifier: "screenMagnifier",
|
|
2649
|
+
zoomable: "zoomable",
|
|
2650
|
+
// Color and contrast
|
|
2651
|
+
highContrastDisplay: "highContrastDisplay",
|
|
2652
|
+
highContrastAudio: "highContrastAudio",
|
|
2653
|
+
colorContrast: "colorContrast",
|
|
2654
|
+
invertColors: "invertColors",
|
|
2655
|
+
// Display customization
|
|
2656
|
+
displayTransformability: "displayTransformability",
|
|
2657
|
+
largePrint: "largePrint",
|
|
2658
|
+
fontEnlargement: "fontEnlargement",
|
|
2659
|
+
resizeText: "resizeText",
|
|
2660
|
+
// Visual alternatives
|
|
2661
|
+
alternativeText: "alternativeText",
|
|
2662
|
+
longDescription: "longDescription",
|
|
2663
|
+
describedMath: "describedMath",
|
|
2664
|
+
tactileGraphic: "tactileGraphic",
|
|
2665
|
+
tactileObject: "tactileObject"
|
|
2666
|
+
},
|
|
2667
|
+
/**
|
|
2668
|
+
* Auditory accessibility features
|
|
2669
|
+
* For students who are deaf, hard of hearing, or benefit from audio
|
|
2670
|
+
*/
|
|
2671
|
+
auditory: {
|
|
2672
|
+
// Audio output
|
|
2673
|
+
audioDescription: "audioDescription",
|
|
2674
|
+
textToSpeech: "textToSpeech",
|
|
2675
|
+
readAloud: "readAloud",
|
|
2676
|
+
humanVoice: "humanVoice",
|
|
2677
|
+
syntheticVoice: "syntheticVoice",
|
|
2678
|
+
// Speech control
|
|
2679
|
+
speechRate: "speechRate",
|
|
2680
|
+
speechVolume: "speechVolume",
|
|
2681
|
+
voicePitch: "voicePitch",
|
|
2682
|
+
// Visual alternatives for audio
|
|
2683
|
+
captions: "captions",
|
|
2684
|
+
closedCaptions: "closedCaptions",
|
|
2685
|
+
openCaptions: "openCaptions",
|
|
2686
|
+
transcript: "transcript",
|
|
2687
|
+
signLanguage: "signLanguage",
|
|
2688
|
+
subtitles: "subtitles",
|
|
2689
|
+
// Audio adjustments
|
|
2690
|
+
audioControl: "audioControl",
|
|
2691
|
+
noBackgroundAudio: "noBackgroundAudio"
|
|
2692
|
+
},
|
|
2693
|
+
/**
|
|
2694
|
+
* Motor/physical accessibility features
|
|
2695
|
+
* For students with limited mobility or motor control
|
|
2696
|
+
*/
|
|
2697
|
+
motor: {
|
|
2698
|
+
// Input alternatives
|
|
2699
|
+
keyboardControl: "keyboardControl",
|
|
2700
|
+
mouseControl: "mouseControl",
|
|
2701
|
+
touchControl: "touchControl",
|
|
2702
|
+
voiceControl: "voiceControl",
|
|
2703
|
+
switchControl: "switchControl",
|
|
2704
|
+
eyeGazeControl: "eyeGazeControl",
|
|
2705
|
+
// Keyboard features
|
|
2706
|
+
singleSwitchAccess: "singleSwitchAccess",
|
|
2707
|
+
stickyKeys: "stickyKeys",
|
|
2708
|
+
keyboardShortcuts: "keyboardShortcuts",
|
|
2709
|
+
// Timing
|
|
2710
|
+
timingControl: "timingControl",
|
|
2711
|
+
unlimitedTime: "unlimitedTime",
|
|
2712
|
+
extendedTime: "extendedTime",
|
|
2713
|
+
pauseControl: "pauseControl"
|
|
2714
|
+
},
|
|
2715
|
+
/**
|
|
2716
|
+
* Cognitive/learning accessibility features
|
|
2717
|
+
* For students with learning disabilities, ADHD, autism, etc.
|
|
2718
|
+
*/
|
|
2719
|
+
cognitive: {
|
|
2720
|
+
// Content simplification
|
|
2721
|
+
simplifiedLanguage: "simplifiedLanguage",
|
|
2722
|
+
reducedComplexity: "reducedComplexity",
|
|
2723
|
+
structuralNavigation: "structuralNavigation",
|
|
2724
|
+
tableOfContents: "tableOfContents",
|
|
2725
|
+
// Focus and attention
|
|
2726
|
+
reducedDistraction: "reducedDistraction",
|
|
2727
|
+
noFlashing: "noFlashing",
|
|
2728
|
+
pauseAnimation: "pauseAnimation",
|
|
2729
|
+
// Organization and support
|
|
2730
|
+
annotations: "annotations",
|
|
2731
|
+
bookmarking: "bookmarking",
|
|
2732
|
+
highlighting: "highlighting",
|
|
2733
|
+
guidedNavigation: "guidedNavigation",
|
|
2734
|
+
// Tools
|
|
2735
|
+
calculator: "calculator",
|
|
2736
|
+
dictionary: "dictionary",
|
|
2737
|
+
thesaurus: "thesaurus",
|
|
2738
|
+
spellingAssistance: "spellingAssistance",
|
|
2739
|
+
grammarAssistance: "grammarAssistance"
|
|
2740
|
+
},
|
|
2741
|
+
/**
|
|
2742
|
+
* Reading support features
|
|
2743
|
+
* For students with dyslexia or reading challenges
|
|
2744
|
+
*/
|
|
2745
|
+
reading: {
|
|
2746
|
+
// Text presentation
|
|
2747
|
+
lineSpacing: "lineSpacing",
|
|
2748
|
+
wordSpacing: "wordSpacing",
|
|
2749
|
+
letterSpacing: "letterSpacing",
|
|
2750
|
+
fontFamily: "fontFamily",
|
|
2751
|
+
readingMask: "readingMask",
|
|
2752
|
+
readingGuide: "readingGuide",
|
|
2753
|
+
readingRuler: "readingRuler",
|
|
2754
|
+
// Highlighting and emphasis
|
|
2755
|
+
wordHighlighting: "wordHighlighting",
|
|
2756
|
+
lineHighlighting: "lineHighlighting",
|
|
2757
|
+
focusIndicator: "focusIndicator",
|
|
2758
|
+
// Content support
|
|
2759
|
+
printableResource: "printableResource",
|
|
2760
|
+
braille: "braille",
|
|
2761
|
+
nemeth: "nemeth",
|
|
2762
|
+
refreshableBraille: "refreshableBraille"
|
|
2763
|
+
},
|
|
2764
|
+
/**
|
|
2765
|
+
* Navigation features
|
|
2766
|
+
* For efficient content navigation
|
|
2767
|
+
*/
|
|
2768
|
+
navigation: {
|
|
2769
|
+
// Structure
|
|
2770
|
+
index: "index",
|
|
2771
|
+
pageNavigation: "pageNavigation",
|
|
2772
|
+
skipContent: "skipContent",
|
|
2773
|
+
breadcrumbs: "breadcrumbs",
|
|
2774
|
+
// Search
|
|
2775
|
+
searchable: "searchable",
|
|
2776
|
+
fullTextSearch: "fullTextSearch"
|
|
2777
|
+
},
|
|
2778
|
+
/**
|
|
2779
|
+
* Linguistic features
|
|
2780
|
+
* For language support
|
|
2781
|
+
*/
|
|
2782
|
+
linguistic: {
|
|
2783
|
+
// Languages
|
|
2784
|
+
multilingualText: "multilingualText",
|
|
2785
|
+
translatedText: "translatedText",
|
|
2786
|
+
glossary: "glossary",
|
|
2787
|
+
// Sign language
|
|
2788
|
+
signLanguageInterpretation: "signLanguageInterpretation",
|
|
2789
|
+
visualLanguage: "visualLanguage"
|
|
2790
|
+
},
|
|
2791
|
+
/**
|
|
2792
|
+
* Assessment-specific features
|
|
2793
|
+
* Features specific to test-taking environments
|
|
2794
|
+
*/
|
|
2795
|
+
assessment: {
|
|
2796
|
+
// Tools
|
|
2797
|
+
protractor: "protractor",
|
|
2798
|
+
ruler: "ruler",
|
|
2799
|
+
graph: "graph",
|
|
2800
|
+
graphingCalculator: "graphingCalculator",
|
|
2801
|
+
periodicTable: "periodicTable",
|
|
2802
|
+
formulaSheet: "formulaSheet",
|
|
2803
|
+
// Answer support
|
|
2804
|
+
answerMasking: "answerMasking",
|
|
2805
|
+
answerEliminator: "answerEliminator",
|
|
2806
|
+
strikethrough: "strikethrough",
|
|
2807
|
+
// Item features
|
|
2808
|
+
itemGlossary: "itemGlossary",
|
|
2809
|
+
tutorialAvailable: "tutorialAvailable"
|
|
2810
|
+
}
|
|
2593
2811
|
};
|
|
2594
|
-
Object.
|
|
2595
|
-
var
|
|
2812
|
+
Object.values(Eo).flatMap((e) => Object.values(e));
|
|
2813
|
+
var Nn;
|
|
2596
2814
|
(function(e) {
|
|
2597
2815
|
e[e.BASE = 0] = "BASE", e[e.TOOL = 1e3] = "TOOL", e[e.MODAL = 2e3] = "MODAL", e[e.CONTROL = 3e3] = "CONTROL", e[e.HIGHLIGHT = 4e3] = "HIGHLIGHT";
|
|
2598
|
-
})(
|
|
2599
|
-
var
|
|
2816
|
+
})(Nn || (Nn = {}));
|
|
2817
|
+
var pr;
|
|
2600
2818
|
(function(e) {
|
|
2601
2819
|
e.IDLE = "idle", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.ERROR = "error";
|
|
2602
|
-
})(
|
|
2603
|
-
class
|
|
2820
|
+
})(pr || (pr = {}));
|
|
2821
|
+
class To {
|
|
2604
2822
|
constructor() {
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2823
|
+
$(this, "providerId", "browser");
|
|
2824
|
+
$(this, "providerName", "Browser Speech Synthesis");
|
|
2825
|
+
$(this, "version", "1.0.0");
|
|
2608
2826
|
}
|
|
2609
2827
|
async initialize(t) {
|
|
2610
2828
|
if (typeof window > "u")
|
|
2611
2829
|
throw new Error("BrowserTTSProvider requires browser environment");
|
|
2612
2830
|
if (!("speechSynthesis" in window))
|
|
2613
2831
|
throw new Error("Browser does not support Speech Synthesis API");
|
|
2614
|
-
return new
|
|
2832
|
+
return new So(t);
|
|
2615
2833
|
}
|
|
2616
2834
|
supportsFeature(t) {
|
|
2617
2835
|
return !0;
|
|
@@ -2629,48 +2847,48 @@ class mo {
|
|
|
2629
2847
|
destroy() {
|
|
2630
2848
|
}
|
|
2631
2849
|
}
|
|
2632
|
-
class
|
|
2850
|
+
class So {
|
|
2633
2851
|
constructor(t) {
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2852
|
+
$(this, "utterance", null);
|
|
2853
|
+
$(this, "config", null);
|
|
2854
|
+
$(this, "_isPlaying", !1);
|
|
2855
|
+
$(this, "_isPaused", !1);
|
|
2856
|
+
$(this, "onWordBoundary");
|
|
2639
2857
|
this.config = t;
|
|
2640
2858
|
}
|
|
2641
2859
|
async speak(t) {
|
|
2642
|
-
return new Promise((
|
|
2860
|
+
return new Promise((n, r) => {
|
|
2643
2861
|
if (!this.config) {
|
|
2644
|
-
|
|
2862
|
+
r(new Error("TTS not initialized"));
|
|
2645
2863
|
return;
|
|
2646
2864
|
}
|
|
2647
2865
|
this.stop(), this.utterance = new SpeechSynthesisUtterance(t);
|
|
2648
|
-
let
|
|
2866
|
+
let s = -1, i = 0;
|
|
2649
2867
|
if (this.config.voice) {
|
|
2650
|
-
const l = speechSynthesis.getVoices().find((
|
|
2868
|
+
const l = speechSynthesis.getVoices().find((u) => u.name === this.config.voice);
|
|
2651
2869
|
l && (this.utterance.voice = l);
|
|
2652
2870
|
}
|
|
2653
2871
|
this.config.rate && (this.utterance.rate = this.config.rate), this.config.pitch && (this.utterance.pitch = this.config.pitch), this.utterance.onstart = () => {
|
|
2654
2872
|
this._isPlaying = !0, this._isPaused = !1;
|
|
2655
2873
|
}, this.utterance.onend = () => {
|
|
2656
|
-
this._isPlaying = !1, this._isPaused = !1,
|
|
2874
|
+
this._isPlaying = !1, this._isPaused = !1, n();
|
|
2657
2875
|
}, this.utterance.onerror = (o) => {
|
|
2658
2876
|
if (this._isPlaying = !1, this._isPaused = !1, o.error === "interrupted" || o.error === "canceled") {
|
|
2659
|
-
|
|
2877
|
+
n();
|
|
2660
2878
|
return;
|
|
2661
2879
|
}
|
|
2662
|
-
|
|
2880
|
+
r(new Error(`Speech synthesis error: ${o.error}`));
|
|
2663
2881
|
}, this.utterance.onpause = () => {
|
|
2664
2882
|
this._isPaused = !0;
|
|
2665
2883
|
}, this.utterance.onresume = () => {
|
|
2666
2884
|
this._isPaused = !1;
|
|
2667
2885
|
}, this.utterance.onboundary = (o) => {
|
|
2668
2886
|
if (console.log("[BrowserProvider] Boundary event:", o.name, "charIndex:", o.charIndex, "charLength:", o.charLength), o.name === "word" && this.onWordBoundary) {
|
|
2669
|
-
if (i++, o.charIndex ===
|
|
2887
|
+
if (i++, o.charIndex === s && i > 2) {
|
|
2670
2888
|
console.warn("[BrowserProvider] Browser word boundaries broken - disabling word highlighting"), this.utterance && (this.utterance.onboundary = null);
|
|
2671
2889
|
return;
|
|
2672
2890
|
}
|
|
2673
|
-
|
|
2891
|
+
s = o.charIndex;
|
|
2674
2892
|
const l = t.substring(o.charIndex, o.charIndex + (o.charLength || 0));
|
|
2675
2893
|
console.log("[BrowserProvider] Calling onWordBoundary with word:", l, "at position:", o.charIndex), this.onWordBoundary(l, o.charIndex);
|
|
2676
2894
|
}
|
|
@@ -2700,8 +2918,8 @@ class xo {
|
|
|
2700
2918
|
this.config || (this.config = {}), t.rate !== void 0 && (this.config.rate = t.rate), t.pitch !== void 0 && (this.config.pitch = t.pitch), t.voice !== void 0 && (this.config.voice = t.voice);
|
|
2701
2919
|
}
|
|
2702
2920
|
}
|
|
2703
|
-
var
|
|
2704
|
-
const
|
|
2921
|
+
var zo = /* @__PURE__ */ xe('<div class="error-message svelte-xk676z"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z"> </span></div>'), Ao = /* @__PURE__ */ xe('<div class="loading-message svelte-xk676z"><span class="svelte-xk676z">Initializing...</span></div>'), Co = /* @__PURE__ */ xe('<div class="selection-info svelte-xk676z"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 svelte-xk676z" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z"> </span></div>'), Po = /* @__PURE__ */ xe('<p class="svelte-xk676z">Select text on the page to read it aloud.</p>'), No = /* @__PURE__ */ xe('<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Resume</span>', 1), Ro = /* @__PURE__ */ xe('<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zM7 8a1 1 0 012 0v4a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v4a1 1 0 102 0V8a1 1 0 00-1-1z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Pause</span>', 1), Oo = /* @__PURE__ */ xe('<span class="pulse svelte-xk676z"></span>'), Mo = /* @__PURE__ */ xe('<div><div class="status-icon svelte-xk676z"><!></div> <span class="svelte-xk676z"> </span></div>'), Io = /* @__PURE__ */ xe('<div class="instructions svelte-xk676z"><!></div> <div class="control-group svelte-xk676z"><label for="tts-speed" class="svelte-xk676z"><span class="svelte-xk676z">Speed:</span> <strong class="svelte-xk676z"> </strong></label> <input id="tts-speed" type="range" min="0.5" max="2.0" step="0.25" class="svelte-xk676z"/></div> <div class="playback-controls svelte-xk676z"><button class="btn-primary svelte-xk676z" aria-label="Play" type="button"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Play</span></button> <button class="btn-secondary svelte-xk676z" type="button"><!></button> <button class="btn-secondary svelte-xk676z" aria-label="Stop" type="button"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8 7a1 1 0 00-1 1v4a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1H8z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Stop</span></button></div> <!>', 1), Lo = /* @__PURE__ */ xe('<div class="tool-tts svelte-xk676z" role="dialog" aria-label="Text-to-Speech Tool"><div class="tool-header svelte-xk676z"><div class="tool-header-left svelte-xk676z"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 svelte-xk676z" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.858 18.142a3 3 0 104.243-4.242L12 12.142 7.757 7.899a3 3 0 000 4.242z" class="svelte-xk676z"></path></svg> <span class="tool-title svelte-xk676z">Text-to-Speech</span></div> <button class="close-button svelte-xk676z" aria-label="Close" type="button">×</button></div> <div class="tool-content svelte-xk676z"><!></div></div>');
|
|
2922
|
+
const Do = {
|
|
2705
2923
|
hash: "svelte-xk676z",
|
|
2706
2924
|
code: `.tool-tts.svelte-xk676z {position:fixed;width:300px;background:white;border:1px solid #cbd5e0;border-radius:8px;box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);cursor:move;user-select:none;font-family:system-ui, -apple-system, sans-serif;}.tool-header.svelte-xk676z {display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);color:white;border-radius:8px 8px 0 0;cursor:move;}.tool-header-left.svelte-xk676z {display:flex;align-items:center;gap:8px;}.tool-title.svelte-xk676z {font-weight:600;font-size:14px;}.close-button.svelte-xk676z {background:rgba(255, 255, 255, 0.2);border:none;color:white;width:24px;height:24px;border-radius:4px;cursor:pointer;font-size:20px;line-height:1;display:flex;align-items:center;justify-content:center;transition:background-color 0.2s;}.close-button.svelte-xk676z:hover {background:rgba(255, 255, 255, 0.3);}.tool-content.svelte-xk676z {padding:16px;}.error-message.svelte-xk676z,
|
|
2707
2925
|
.loading-message.svelte-xk676z {display:flex;align-items:center;gap:8px;padding:12px;border-radius:6px;font-size:13px;}.error-message.svelte-xk676z {background:#fee;color:#c33;border:1px solid #fcc;}.loading-message.svelte-xk676z {background:#f0f4f8;color:#4a5568;justify-content:center;}.instructions.svelte-xk676z {margin-bottom:16px;font-size:13px;color:#4a5568;}.instructions.svelte-xk676z p:where(.svelte-xk676z) {margin:0;line-height:1.5;}.selection-info.svelte-xk676z {display:flex;align-items:center;gap:6px;padding:8px 12px;background:#e6fffa;border:1px solid #81e6d9;border-radius:6px;color:#234e52;font-size:12px;}.selection-info.svelte-xk676z svg:where(.svelte-xk676z) {flex-shrink:0;}.control-group.svelte-xk676z {margin-bottom:16px;}.control-group.svelte-xk676z label:where(.svelte-xk676z) {display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;font-size:13px;color:#4a5568;}.control-group.svelte-xk676z label:where(.svelte-xk676z) strong:where(.svelte-xk676z) {color:#667eea;font-weight:600;}.control-group.svelte-xk676z input[type="range"]:where(.svelte-xk676z) {width:100%;height:6px;border-radius:3px;background:#e2e8f0;outline:none;-webkit-appearance:none;}.control-group.svelte-xk676z input[type="range"]:where(.svelte-xk676z)::-webkit-slider-thumb {-webkit-appearance:none;width:18px;height:18px;border-radius:50%;background:#667eea;cursor:pointer;transition:all 0.2s;}.control-group.svelte-xk676z input[type="range"]:where(.svelte-xk676z)::-webkit-slider-thumb:hover {background:#764ba2;transform:scale(1.1);}.control-group.svelte-xk676z input[type="range"]:where(.svelte-xk676z):disabled {opacity:0.5;cursor:not-allowed;}.playback-controls.svelte-xk676z {display:flex;gap:8px;margin-bottom:12px;}.playback-controls.svelte-xk676z button:where(.svelte-xk676z) {flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 12px;border:none;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;transition:all 0.2s;}.playback-controls.svelte-xk676z button:where(.svelte-xk676z) svg:where(.svelte-xk676z) {flex-shrink:0;}.btn-primary.svelte-xk676z {background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);color:white;}.btn-primary.svelte-xk676z:hover:not(:disabled) {transform:translateY(-1px);box-shadow:0 4px 6px rgba(102, 126, 234, 0.3);}.btn-secondary.svelte-xk676z {background:#f7fafc;color:#4a5568;border:1px solid #e2e8f0;}.btn-secondary.svelte-xk676z:hover:not(:disabled) {background:#edf2f7;}.playback-controls.svelte-xk676z button:where(.svelte-xk676z):disabled {opacity:0.5;cursor:not-allowed;transform:none !important;}.status-indicator.svelte-xk676z {display:flex;align-items:center;gap:8px;padding:8px 12px;background:#f0fdf4;border:1px solid #86efac;border-radius:6px;font-size:12px;color:#166534;
|
|
@@ -2738,91 +2956,91 @@ const Ro = {
|
|
|
2738
2956
|
animation: none !important;transition:none !important;}
|
|
2739
2957
|
}`
|
|
2740
2958
|
};
|
|
2741
|
-
function
|
|
2742
|
-
|
|
2743
|
-
let
|
|
2959
|
+
function Bo(e, t) {
|
|
2960
|
+
Sr(t, !0), ao(e, Do);
|
|
2961
|
+
let n = qt(t, "visible", 7, !1), r = qt(t, "toolId", 7, "textToSpeech"), s = qt(t, "coordinator"), i = qt(t, "ttsService");
|
|
2744
2962
|
const o = typeof window < "u";
|
|
2745
|
-
let l = /* @__PURE__ */
|
|
2963
|
+
let l = /* @__PURE__ */ C(void 0), u = /* @__PURE__ */ C(!1), f = /* @__PURE__ */ C(Ye({
|
|
2746
2964
|
x: o ? window.innerWidth - 320 : 400,
|
|
2747
2965
|
y: 100
|
|
2748
|
-
})), d = /* @__PURE__ */
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
}),
|
|
2966
|
+
})), d = /* @__PURE__ */ C(Ye({ x: 0, y: 0 })), p = /* @__PURE__ */ C(!1), c = /* @__PURE__ */ C(!1), v = /* @__PURE__ */ C(!1), w = /* @__PURE__ */ C(""), x = /* @__PURE__ */ C(1), S = /* @__PURE__ */ C(!1), ce = /* @__PURE__ */ C(null), nt = /* @__PURE__ */ C(!1);
|
|
2967
|
+
zn(() => {
|
|
2968
|
+
s() && r() && !h(nt) && (s().registerTool(r(), "Text-to-Speech", void 0, Nn.MODAL), y(nt, !0));
|
|
2969
|
+
}), oo(async () => {
|
|
2752
2970
|
if (o) {
|
|
2753
2971
|
try {
|
|
2754
|
-
const _ = new
|
|
2755
|
-
await i().initialize(_),
|
|
2972
|
+
const _ = new To();
|
|
2973
|
+
await i().initialize(_), y(p, !0);
|
|
2756
2974
|
} catch (_) {
|
|
2757
|
-
console.error("[TTSTool] Failed to initialize TTS:", _),
|
|
2975
|
+
console.error("[TTSTool] Failed to initialize TTS:", _), y(ce, _ instanceof Error ? _.message : "Failed to initialize TTS", !0);
|
|
2758
2976
|
}
|
|
2759
|
-
return document.addEventListener("selectionchange",
|
|
2760
|
-
o && (document.removeEventListener("selectionchange",
|
|
2977
|
+
return document.addEventListener("selectionchange", Un), () => {
|
|
2978
|
+
o && (document.removeEventListener("selectionchange", Un), i().stop()), s() && r() && s().unregisterTool(r());
|
|
2761
2979
|
};
|
|
2762
2980
|
}
|
|
2763
|
-
}),
|
|
2764
|
-
|
|
2981
|
+
}), zn(() => {
|
|
2982
|
+
s() && h(l) && r() && s().updateToolElement(r(), h(l));
|
|
2765
2983
|
});
|
|
2766
|
-
function
|
|
2984
|
+
function Un() {
|
|
2767
2985
|
const _ = window.getSelection();
|
|
2768
|
-
_ && _.toString().trim().length > 0 ? (
|
|
2986
|
+
_ && _.toString().trim().length > 0 ? (y(w, _.toString().trim(), !0), y(S, !0)) : y(S, !1);
|
|
2769
2987
|
}
|
|
2770
2988
|
async function ps() {
|
|
2771
|
-
if (!(!h(
|
|
2989
|
+
if (!(!h(p) || !h(S) || !h(w)))
|
|
2772
2990
|
try {
|
|
2773
2991
|
const _ = window.getSelection();
|
|
2774
2992
|
if (!_ || _.rangeCount === 0) return;
|
|
2775
|
-
const
|
|
2776
|
-
if (!
|
|
2777
|
-
|
|
2778
|
-
const
|
|
2993
|
+
const Ve = _.getRangeAt(0).commonAncestorContainer.parentElement;
|
|
2994
|
+
if (!Ve) return;
|
|
2995
|
+
y(c, !0), y(v, !1), i().setRootElement(Ve);
|
|
2996
|
+
const un = Ve.closest("[data-catalog-id]")?.getAttribute("data-catalog-id") || void 0;
|
|
2779
2997
|
await i().speak(
|
|
2780
2998
|
h(w),
|
|
2781
2999
|
{
|
|
2782
|
-
catalogId:
|
|
3000
|
+
catalogId: un,
|
|
2783
3001
|
// Pass catalog ID for SSML resolution
|
|
2784
|
-
rate: h(
|
|
3002
|
+
rate: h(x),
|
|
2785
3003
|
highlightWords: !0
|
|
2786
3004
|
},
|
|
2787
3005
|
{
|
|
2788
3006
|
onEnd: () => {
|
|
2789
|
-
|
|
3007
|
+
y(c, !1), y(v, !1);
|
|
2790
3008
|
},
|
|
2791
|
-
onError: (
|
|
2792
|
-
console.error("[TTSTool] TTS error:",
|
|
3009
|
+
onError: (Vt) => {
|
|
3010
|
+
console.error("[TTSTool] TTS error:", Vt), y(c, !1), y(v, !1);
|
|
2793
3011
|
}
|
|
2794
3012
|
}
|
|
2795
3013
|
);
|
|
2796
3014
|
} catch (_) {
|
|
2797
|
-
console.error("[TTSTool] Failed to speak:", _),
|
|
3015
|
+
console.error("[TTSTool] Failed to speak:", _), y(c, !1), y(v, !1);
|
|
2798
3016
|
}
|
|
2799
3017
|
}
|
|
2800
3018
|
function _s() {
|
|
2801
|
-
h(c) && (h(
|
|
3019
|
+
h(c) && (h(v) ? (i().resume(), y(v, !1)) : (i().pause(), y(v, !0)));
|
|
2802
3020
|
}
|
|
2803
3021
|
function gs() {
|
|
2804
|
-
i().stop(),
|
|
3022
|
+
i().stop(), y(c, !1), y(v, !1);
|
|
2805
3023
|
}
|
|
2806
3024
|
function ws(_) {
|
|
2807
|
-
const
|
|
2808
|
-
x
|
|
3025
|
+
const de = _.target;
|
|
3026
|
+
y(x, parseFloat(de.value), !0);
|
|
2809
3027
|
}
|
|
2810
3028
|
function bs(_) {
|
|
2811
3029
|
_.target.closest("button, input, select") || ms(_);
|
|
2812
3030
|
}
|
|
2813
3031
|
function ms(_) {
|
|
2814
|
-
h(l) && (h(l).setPointerCapture(_.pointerId),
|
|
3032
|
+
h(l) && (h(l).setPointerCapture(_.pointerId), y(u, !0), y(
|
|
2815
3033
|
d,
|
|
2816
3034
|
{
|
|
2817
|
-
x: _.clientX - h(
|
|
2818
|
-
y: _.clientY - h(
|
|
3035
|
+
x: _.clientX - h(f).x,
|
|
3036
|
+
y: _.clientY - h(f).y
|
|
2819
3037
|
},
|
|
2820
3038
|
!0
|
|
2821
|
-
),
|
|
3039
|
+
), s()?.bringToFront(h(l)), h(l).addEventListener("pointermove", qn), h(l).addEventListener("pointerup", Wn), _.preventDefault());
|
|
2822
3040
|
}
|
|
2823
|
-
function
|
|
2824
|
-
h(
|
|
2825
|
-
|
|
3041
|
+
function qn(_) {
|
|
3042
|
+
h(u) && (y(
|
|
3043
|
+
f,
|
|
2826
3044
|
{
|
|
2827
3045
|
x: _.clientX - h(d).x,
|
|
2828
3046
|
y: _.clientY - h(d).y
|
|
@@ -2830,152 +3048,139 @@ function Co(e, t) {
|
|
|
2830
3048
|
!0
|
|
2831
3049
|
), _.preventDefault());
|
|
2832
3050
|
}
|
|
2833
|
-
function
|
|
2834
|
-
h(
|
|
3051
|
+
function Wn(_) {
|
|
3052
|
+
h(u) && h(l) && (h(l).releasePointerCapture(_.pointerId), y(u, !1), h(l).removeEventListener("pointermove", qn), h(l).removeEventListener("pointerup", Wn));
|
|
2835
3053
|
}
|
|
2836
|
-
function
|
|
2837
|
-
|
|
3054
|
+
function ys() {
|
|
3055
|
+
s()?.hideTool(r());
|
|
2838
3056
|
}
|
|
2839
|
-
const
|
|
3057
|
+
const xs = /* @__PURE__ */ Ai(() => h(x) === 0.5 ? "Slow" : h(x) === 0.75 ? "Slower" : h(x) === 1 ? "Normal" : h(x) === 1.25 ? "Faster" : h(x) === 1.5 ? "Fast" : h(x) === 2 ? "Very Fast" : `${h(x)}x`);
|
|
2840
3058
|
var ks = {
|
|
2841
3059
|
get visible() {
|
|
2842
|
-
return
|
|
3060
|
+
return n();
|
|
2843
3061
|
},
|
|
2844
3062
|
set visible(_ = !1) {
|
|
2845
|
-
|
|
3063
|
+
n(_), St();
|
|
2846
3064
|
},
|
|
2847
3065
|
get toolId() {
|
|
2848
|
-
return
|
|
3066
|
+
return r();
|
|
2849
3067
|
},
|
|
2850
3068
|
set toolId(_ = "textToSpeech") {
|
|
2851
|
-
|
|
3069
|
+
r(_), St();
|
|
2852
3070
|
},
|
|
2853
3071
|
get coordinator() {
|
|
2854
|
-
return
|
|
3072
|
+
return s();
|
|
2855
3073
|
},
|
|
2856
3074
|
set coordinator(_) {
|
|
2857
|
-
|
|
3075
|
+
s(_), St();
|
|
2858
3076
|
},
|
|
2859
3077
|
get ttsService() {
|
|
2860
3078
|
return i();
|
|
2861
3079
|
},
|
|
2862
3080
|
set ttsService(_) {
|
|
2863
|
-
i(_),
|
|
3081
|
+
i(_), St();
|
|
2864
3082
|
}
|
|
2865
|
-
},
|
|
3083
|
+
}, Kn = eo(), $s = sr(Kn);
|
|
2866
3084
|
{
|
|
2867
3085
|
var Es = (_) => {
|
|
2868
|
-
var
|
|
2869
|
-
|
|
2870
|
-
var
|
|
2871
|
-
|
|
2872
|
-
var
|
|
3086
|
+
var de = Lo();
|
|
3087
|
+
de.__pointerdown = bs;
|
|
3088
|
+
var Ve = B(de), un = X(B(Ve), 2);
|
|
3089
|
+
un.__click = ys, D(Ve);
|
|
3090
|
+
var Vt = X(Ve, 2), Ts = B(Vt);
|
|
2873
3091
|
{
|
|
2874
|
-
var Ss = (
|
|
2875
|
-
var
|
|
2876
|
-
|
|
2877
|
-
},
|
|
2878
|
-
var
|
|
3092
|
+
var Ss = (se) => {
|
|
3093
|
+
var Oe = zo(), rt = X(B(Oe), 2), fn = B(rt, !0);
|
|
3094
|
+
D(rt), D(Oe), Tt(() => Yt(fn, h(ce))), Y(se, Oe);
|
|
3095
|
+
}, zs = (se) => {
|
|
3096
|
+
var Oe = Ao();
|
|
3097
|
+
Y(se, Oe);
|
|
3098
|
+
}, As = (se) => {
|
|
3099
|
+
var Oe = Io(), rt = sr(Oe), fn = B(rt);
|
|
2879
3100
|
{
|
|
2880
|
-
var
|
|
2881
|
-
var
|
|
2882
|
-
|
|
2883
|
-
}, Ps = (
|
|
2884
|
-
var
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
var
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
var Ls = X(pr, 2);
|
|
3101
|
+
var Cs = (O) => {
|
|
3102
|
+
var F = Co(), $t = X(B(F), 2), Et = B($t);
|
|
3103
|
+
D($t), D(F), Tt(() => Yt(Et, `${h(w).length ?? ""} characters selected`)), Y(O, F);
|
|
3104
|
+
}, Ps = (O) => {
|
|
3105
|
+
var F = Po();
|
|
3106
|
+
Y(O, F);
|
|
3107
|
+
};
|
|
3108
|
+
ot(fn, (O) => {
|
|
3109
|
+
h(S) ? O(Cs) : O(Ps, !1);
|
|
3110
|
+
});
|
|
3111
|
+
}
|
|
3112
|
+
D(rt);
|
|
3113
|
+
var cn = X(rt, 2), dn = B(cn), Xn = X(B(dn), 2), Ns = B(Xn, !0);
|
|
3114
|
+
D(Xn), D(dn);
|
|
3115
|
+
var Gt = X(dn, 2);
|
|
3116
|
+
go(Gt), Gt.__input = ws, D(cn);
|
|
3117
|
+
var hn = X(cn, 2), vn = B(hn);
|
|
3118
|
+
vn.__click = ps;
|
|
3119
|
+
var st = X(vn, 2);
|
|
3120
|
+
st.__click = _s;
|
|
3121
|
+
var Rs = B(st);
|
|
3122
|
+
{
|
|
3123
|
+
var Os = (O) => {
|
|
3124
|
+
var F = No();
|
|
3125
|
+
bn(2), Y(O, F);
|
|
3126
|
+
}, Ms = (O) => {
|
|
3127
|
+
var F = Ro();
|
|
3128
|
+
bn(2), Y(O, F);
|
|
3129
|
+
};
|
|
3130
|
+
ot(Rs, (O) => {
|
|
3131
|
+
h(v) ? O(Os) : O(Ms, !1);
|
|
3132
|
+
});
|
|
3133
|
+
}
|
|
3134
|
+
D(st);
|
|
3135
|
+
var Jn = X(st, 2);
|
|
3136
|
+
Jn.__click = gs, D(hn);
|
|
3137
|
+
var Is = X(hn, 2);
|
|
3138
|
+
{
|
|
3139
|
+
var Ls = (O) => {
|
|
3140
|
+
var F = Mo();
|
|
3141
|
+
let $t;
|
|
3142
|
+
var Et = B(F), Ds = B(Et);
|
|
2923
3143
|
{
|
|
2924
|
-
var
|
|
2925
|
-
var
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
var gr = Xi("⏸");
|
|
2931
|
-
j(st, gr);
|
|
2932
|
-
}, js = (st) => {
|
|
2933
|
-
var gr = To();
|
|
2934
|
-
j(st, gr);
|
|
2935
|
-
};
|
|
2936
|
-
Be(Fs, (st) => {
|
|
2937
|
-
h(p) ? st(Bs) : st(js, !1);
|
|
2938
|
-
});
|
|
2939
|
-
}
|
|
2940
|
-
L(kt);
|
|
2941
|
-
var Zr = X(kt, 2), Vs = D(Zr, !0);
|
|
2942
|
-
L(Zr), L(B), $t(() => {
|
|
2943
|
-
yt = oo(B, 1, "status-indicator svelte-xk676z", null, yt, { paused: h(p) }), Gt(Vs, h(p) ? "Paused" : "Speaking...");
|
|
2944
|
-
}), j(N, B);
|
|
3144
|
+
var Bs = (it) => {
|
|
3145
|
+
var pn = Zi("⏸");
|
|
3146
|
+
Y(it, pn);
|
|
3147
|
+
}, Fs = (it) => {
|
|
3148
|
+
var pn = Oo();
|
|
3149
|
+
Y(it, pn);
|
|
2945
3150
|
};
|
|
2946
|
-
|
|
2947
|
-
h(
|
|
3151
|
+
ot(Ds, (it) => {
|
|
3152
|
+
h(v) ? it(Bs) : it(Fs, !1);
|
|
2948
3153
|
});
|
|
2949
3154
|
}
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
3155
|
+
D(Et);
|
|
3156
|
+
var Qn = X(Et, 2), js = B(Qn, !0);
|
|
3157
|
+
D(Qn), D(F), Tt(() => {
|
|
3158
|
+
$t = fo(F, 1, "status-indicator svelte-xk676z", null, $t, { paused: h(v) }), Yt(js, h(v) ? "Paused" : "Speaking...");
|
|
3159
|
+
}), Y(O, F);
|
|
2953
3160
|
};
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
h(v) ? rt(Ps, !1) : rt(cr);
|
|
2958
|
-
},
|
|
2959
|
-
!0
|
|
2960
|
-
);
|
|
3161
|
+
ot(Is, (O) => {
|
|
3162
|
+
h(c) && O(Ls);
|
|
3163
|
+
});
|
|
2961
3164
|
}
|
|
2962
|
-
|
|
3165
|
+
Tt(() => {
|
|
3166
|
+
Yt(Ns, h(xs)), wo(Gt, h(x)), Gt.disabled = h(c), vn.disabled = !h(S) || h(c), st.disabled = !h(c), Pn(st, "aria-label", h(v) ? "Resume" : "Pause"), Jn.disabled = !h(c);
|
|
3167
|
+
}), Y(se, Oe);
|
|
2963
3168
|
};
|
|
2964
|
-
|
|
2965
|
-
h(
|
|
3169
|
+
ot(Ts, (se) => {
|
|
3170
|
+
h(ce) ? se(Ss) : h(p) ? se(As, !1) : se(zs, 1);
|
|
2966
3171
|
});
|
|
2967
3172
|
}
|
|
2968
|
-
|
|
3173
|
+
D(Vt), D(de), mo(de, (se) => y(l, se), () => h(l)), Tt(() => co(de, `left: ${h(f).x ?? ""}px; top: ${h(f).y ?? ""}px;`)), Y(_, de);
|
|
2969
3174
|
};
|
|
2970
|
-
|
|
2971
|
-
|
|
3175
|
+
ot($s, (_) => {
|
|
3176
|
+
n() && o && _(Es);
|
|
2972
3177
|
});
|
|
2973
3178
|
}
|
|
2974
|
-
return
|
|
3179
|
+
return Y(e, Kn), zr(ks);
|
|
2975
3180
|
}
|
|
2976
|
-
|
|
2977
|
-
customElements.define("pie-tool-text-to-speech",
|
|
2978
|
-
|
|
3181
|
+
Ki(["pointerdown", "click", "input"]);
|
|
3182
|
+
customElements.define("pie-tool-text-to-speech", $o(
|
|
3183
|
+
Bo,
|
|
2979
3184
|
{
|
|
2980
3185
|
visible: { attribute: "visible", type: "Boolean" },
|
|
2981
3186
|
toolId: { attribute: "tool-id", type: "String" },
|
|
@@ -2986,6 +3191,6 @@ customElements.define("pie-tool-text-to-speech", wo(
|
|
|
2986
3191
|
[]
|
|
2987
3192
|
));
|
|
2988
3193
|
export {
|
|
2989
|
-
|
|
3194
|
+
Bo as default
|
|
2990
3195
|
};
|
|
2991
3196
|
//# sourceMappingURL=tool-text-to-speech.js.map
|