@pie-framework/pie-fixed-player-static 1.0.0-351df72.10 → 1.0.0-351df72.11
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/README.md +2 -2
- package/dist/index.js +18 -1
- package/dist/pie-fixed-player.js +1328 -1699
- package/package.json +3 -3
package/dist/pie-fixed-player.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Wr = Object.defineProperty;
|
|
2
|
+
var mn = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
const
|
|
9
|
-
var
|
|
10
|
-
typeof window < "u" && ((
|
|
11
|
-
const
|
|
12
|
-
var
|
|
13
|
-
function
|
|
5
|
+
var Hr = (e, t, n) => t in e ? Wr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var te = (e, t, n) => Hr(e, typeof t != "symbol" ? t + "" : t, n), yn = (e, t, n) => t.has(e) || mn("Cannot " + n);
|
|
7
|
+
var z = (e, t, n) => (yn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), qt = (e, t, n) => t.has(e) ? mn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Vt = (e, t, n, r) => (yn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
|
|
8
|
+
const Zr = "5";
|
|
9
|
+
var Gn;
|
|
10
|
+
typeof window < "u" && ((Gn = window.__svelte ?? (window.__svelte = {})).v ?? (Gn.v = /* @__PURE__ */ new Set())).add(Zr);
|
|
11
|
+
const Kr = 1, es = 4, ts = 8, ns = 16, rs = 2, Rt = "[", rn = "[!", sn = "]", qe = {}, q = Symbol(), R = Symbol("filename"), wn = !0, fe = 2, Jn = 4, Lt = 8, on = 16, me = 32, Oe = 64, bt = 128, ee = 256, Et = 512, V = 1024, ye = 2048, Be = 4096, Ye = 8192, Ot = 16384, ss = 32768, ln = 65536, Xn = 1 << 18, is = 1 << 19, Wn = 1 << 20, Xt = 1 << 21, Pe = Symbol("$state"), Ze = Symbol("$state metadata"), Hn = Symbol("legacy props");
|
|
12
|
+
var an = Array.isArray, os = Array.prototype.indexOf, ls = Array.from, $t = Object.keys, ue = Object.defineProperty, ke = Object.getOwnPropertyDescriptor, Zn = Object.prototype, as = Array.prototype, Kn = Object.getPrototypeOf, bn = Object.isExtensible;
|
|
13
|
+
function er(e) {
|
|
14
14
|
for (var t = 0; t < e.length; t++)
|
|
15
15
|
e[t]();
|
|
16
16
|
}
|
|
17
|
-
let
|
|
18
|
-
function
|
|
19
|
-
var e =
|
|
20
|
-
|
|
17
|
+
let ot = [], Wt = [];
|
|
18
|
+
function tr() {
|
|
19
|
+
var e = ot;
|
|
20
|
+
ot = [], er(e);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
var e =
|
|
24
|
-
|
|
22
|
+
function us() {
|
|
23
|
+
var e = Wt;
|
|
24
|
+
Wt = [], er(e);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
|
|
26
|
+
function nr(e) {
|
|
27
|
+
ot.length === 0 && queueMicrotask(tr), ot.push(e);
|
|
28
28
|
}
|
|
29
29
|
function En() {
|
|
30
|
-
|
|
30
|
+
ot.length > 0 && tr(), Wt.length > 0 && us();
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function rr(e) {
|
|
33
33
|
return e === this.v;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function cs(e, t) {
|
|
36
36
|
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
return !
|
|
38
|
+
function sr(e) {
|
|
39
|
+
return !cs(e, this.v);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function fs(e, t, n) {
|
|
42
42
|
{
|
|
43
43
|
const r = new Error(`component_api_changed
|
|
44
44
|
${e} called \`${t}\` on an instance of ${n}, which is no longer valid in Svelte 5
|
|
@@ -46,7 +46,7 @@ https://svelte.dev/e/component_api_changed`);
|
|
|
46
46
|
throw r.name = "Svelte error", r;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function ds(e, t) {
|
|
50
50
|
{
|
|
51
51
|
const n = new Error(`component_api_invalid_new
|
|
52
52
|
Attempted to instantiate ${e} with \`new ${t}\`, which is no longer valid in Svelte 5. If this component is not under your control, set the \`compatibility.componentApi\` compiler option to \`4\` to keep it working.
|
|
@@ -54,7 +54,7 @@ https://svelte.dev/e/component_api_invalid_new`);
|
|
|
54
54
|
throw n.name = "Svelte error", n;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function vs() {
|
|
58
58
|
{
|
|
59
59
|
const e = new Error(`derived_references_self
|
|
60
60
|
A derived value cannot reference itself recursively
|
|
@@ -70,13 +70,13 @@ https://svelte.dev/e/effect_in_teardown`);
|
|
|
70
70
|
throw t.name = "Svelte error", t;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function ps() {
|
|
74
74
|
{
|
|
75
75
|
const e = new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");
|
|
76
76
|
throw e.name = "Svelte error", e;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function gs(e) {
|
|
80
80
|
{
|
|
81
81
|
const t = new Error(`effect_orphan
|
|
82
82
|
\`${e}\` can only be used inside an effect (e.g. during component initialisation)
|
|
@@ -84,7 +84,7 @@ https://svelte.dev/e/effect_orphan`);
|
|
|
84
84
|
throw t.name = "Svelte error", t;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function _s() {
|
|
88
88
|
{
|
|
89
89
|
const e = new Error(`effect_update_depth_exceeded
|
|
90
90
|
Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops
|
|
@@ -100,7 +100,7 @@ https://svelte.dev/e/hydration_failed`);
|
|
|
100
100
|
throw e.name = "Svelte error", e;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function ys(e) {
|
|
104
104
|
{
|
|
105
105
|
const t = new Error(`props_invalid_value
|
|
106
106
|
Cannot do \`bind:${e}={undefined}\` when \`${e}\` has a fallback value
|
|
@@ -108,7 +108,7 @@ https://svelte.dev/e/props_invalid_value`);
|
|
|
108
108
|
throw t.name = "Svelte error", t;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function ws(e) {
|
|
112
112
|
{
|
|
113
113
|
const t = new Error(`rune_outside_svelte
|
|
114
114
|
The \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
|
|
@@ -122,37 +122,124 @@ function bs() {
|
|
|
122
122
|
throw e.name = "Svelte error", e;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Es() {
|
|
126
126
|
{
|
|
127
127
|
const e = new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");
|
|
128
128
|
throw e.name = "Svelte error", e;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function $s() {
|
|
132
132
|
{
|
|
133
133
|
const e = new Error("state_unsafe_mutation\nUpdating state inside a derived or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");
|
|
134
134
|
throw e.name = "Svelte error", e;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
let
|
|
137
|
+
let Cs = !1;
|
|
138
|
+
var Ps = "font-weight: bold", Ss = "font-weight: normal";
|
|
139
|
+
function $n(e) {
|
|
140
|
+
console.warn(`%c[svelte] state_snapshot_uncloneable
|
|
141
|
+
%c${e ? `The following properties cannot be cloned with \`$state.snapshot\` — the return value contains the originals:
|
|
142
|
+
|
|
143
|
+
${e}` : "Value cannot be cloned with `$state.snapshot` — the original value was returned"}
|
|
144
|
+
https://svelte.dev/e/state_snapshot_uncloneable`, Ps, Ss);
|
|
145
|
+
}
|
|
146
|
+
const Ts = [];
|
|
147
|
+
function Is(e, t = !1) {
|
|
148
|
+
if (!t) {
|
|
149
|
+
const n = [], r = et(e, /* @__PURE__ */ new Map(), "", n);
|
|
150
|
+
if (n.length === 1 && n[0] === "")
|
|
151
|
+
$n();
|
|
152
|
+
else if (n.length > 0) {
|
|
153
|
+
const s = n.length > 10 ? n.slice(0, 7) : n.slice(0, 10), i = n.length - s.length;
|
|
154
|
+
let o = s.map((a) => `- <value>${a}`).join(`
|
|
155
|
+
`);
|
|
156
|
+
i > 0 && (o += `
|
|
157
|
+
- ...and ${i} more`), $n(o);
|
|
158
|
+
}
|
|
159
|
+
return r;
|
|
160
|
+
}
|
|
161
|
+
return et(e, /* @__PURE__ */ new Map(), "", Ts);
|
|
162
|
+
}
|
|
163
|
+
function et(e, t, n, r, s = null) {
|
|
164
|
+
if (typeof e == "object" && e !== null) {
|
|
165
|
+
var i = t.get(e);
|
|
166
|
+
if (i !== void 0) return i;
|
|
167
|
+
if (e instanceof Map) return (
|
|
168
|
+
/** @type {Snapshot<T>} */
|
|
169
|
+
new Map(e)
|
|
170
|
+
);
|
|
171
|
+
if (e instanceof Set) return (
|
|
172
|
+
/** @type {Snapshot<T>} */
|
|
173
|
+
new Set(e)
|
|
174
|
+
);
|
|
175
|
+
if (an(e)) {
|
|
176
|
+
var o = (
|
|
177
|
+
/** @type {Snapshot<any>} */
|
|
178
|
+
Array(e.length)
|
|
179
|
+
);
|
|
180
|
+
t.set(e, o), s !== null && t.set(s, o);
|
|
181
|
+
for (var a = 0; a < e.length; a += 1) {
|
|
182
|
+
var u = e[a];
|
|
183
|
+
a in e && (o[a] = et(u, t, `${n}[${a}]`, r));
|
|
184
|
+
}
|
|
185
|
+
return o;
|
|
186
|
+
}
|
|
187
|
+
if (Kn(e) === Zn) {
|
|
188
|
+
o = {}, t.set(e, o), s !== null && t.set(s, o);
|
|
189
|
+
for (var l in e)
|
|
190
|
+
o[l] = et(e[l], t, `${n}.${l}`, r);
|
|
191
|
+
return o;
|
|
192
|
+
}
|
|
193
|
+
if (e instanceof Date)
|
|
194
|
+
return (
|
|
195
|
+
/** @type {Snapshot<T>} */
|
|
196
|
+
structuredClone(e)
|
|
197
|
+
);
|
|
198
|
+
if (typeof /** @type {T & { toJSON?: any } } */
|
|
199
|
+
e.toJSON == "function")
|
|
200
|
+
return et(
|
|
201
|
+
/** @type {T & { toJSON(): any } } */
|
|
202
|
+
e.toJSON(),
|
|
203
|
+
t,
|
|
204
|
+
`${n}.toJSON()`,
|
|
205
|
+
r,
|
|
206
|
+
// Associate the instance with the toJSON clone
|
|
207
|
+
e
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
if (e instanceof EventTarget)
|
|
211
|
+
return (
|
|
212
|
+
/** @type {Snapshot<T>} */
|
|
213
|
+
e
|
|
214
|
+
);
|
|
215
|
+
try {
|
|
216
|
+
return (
|
|
217
|
+
/** @type {Snapshot<T>} */
|
|
218
|
+
structuredClone(e)
|
|
219
|
+
);
|
|
220
|
+
} catch {
|
|
221
|
+
return r.push(n), /** @type {Snapshot<T>} */
|
|
222
|
+
e;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
138
225
|
var Ke = null;
|
|
139
|
-
function
|
|
140
|
-
if (typeof e != "object" || e === null ||
|
|
226
|
+
function Fe(e, t) {
|
|
227
|
+
if (typeof e != "object" || e === null || Pe in e)
|
|
141
228
|
return e;
|
|
142
|
-
const n =
|
|
143
|
-
if (n !==
|
|
229
|
+
const n = Kn(e);
|
|
230
|
+
if (n !== Zn && n !== as)
|
|
144
231
|
return e;
|
|
145
|
-
var r = /* @__PURE__ */ new Map(), s =
|
|
146
|
-
var
|
|
147
|
-
|
|
148
|
-
var
|
|
232
|
+
var r = /* @__PURE__ */ new Map(), s = an(e), i = D(0), o = E, a = (l) => {
|
|
233
|
+
var c = E;
|
|
234
|
+
Se(o);
|
|
235
|
+
var f;
|
|
149
236
|
{
|
|
150
|
-
var
|
|
151
|
-
Ke = u,
|
|
237
|
+
var d = Ke;
|
|
238
|
+
Ke = u, f = l(), Ke = d;
|
|
152
239
|
}
|
|
153
|
-
return
|
|
240
|
+
return Se(c), f;
|
|
154
241
|
};
|
|
155
|
-
s && r.set("length",
|
|
242
|
+
s && r.set("length", D(
|
|
156
243
|
/** @type {any[]} */
|
|
157
244
|
e.length
|
|
158
245
|
));
|
|
@@ -161,203 +248,203 @@ function ke(e, t) {
|
|
|
161
248
|
parent: Ke,
|
|
162
249
|
owners: null
|
|
163
250
|
}, t) {
|
|
164
|
-
const
|
|
165
|
-
u.owners =
|
|
251
|
+
const l = t.v?.[Ze]?.owners;
|
|
252
|
+
u.owners = l ? new Set(l) : null;
|
|
166
253
|
} else
|
|
167
|
-
u.owners = Ke === null ?
|
|
254
|
+
u.owners = Ke === null ? A !== null ? /* @__PURE__ */ new Set([A.function]) : null : /* @__PURE__ */ new Set();
|
|
168
255
|
return new Proxy(
|
|
169
256
|
/** @type {any} */
|
|
170
257
|
e,
|
|
171
258
|
{
|
|
172
|
-
defineProperty(
|
|
173
|
-
(!("value" in
|
|
174
|
-
var
|
|
175
|
-
return
|
|
176
|
-
|
|
177
|
-
|
|
259
|
+
defineProperty(l, c, f) {
|
|
260
|
+
(!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) && bs();
|
|
261
|
+
var d = r.get(c);
|
|
262
|
+
return d === void 0 ? (d = a(() => D(f.value)), r.set(c, d)) : w(
|
|
263
|
+
d,
|
|
264
|
+
a(() => Fe(f.value))
|
|
178
265
|
), !0;
|
|
179
266
|
},
|
|
180
|
-
deleteProperty(
|
|
181
|
-
var
|
|
182
|
-
if (
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
267
|
+
deleteProperty(l, c) {
|
|
268
|
+
var f = r.get(c);
|
|
269
|
+
if (f === void 0)
|
|
270
|
+
c in l && r.set(
|
|
271
|
+
c,
|
|
272
|
+
a(() => D(q))
|
|
186
273
|
);
|
|
187
274
|
else {
|
|
188
|
-
if (s && typeof
|
|
189
|
-
var
|
|
275
|
+
if (s && typeof c == "string") {
|
|
276
|
+
var d = (
|
|
190
277
|
/** @type {Source<number>} */
|
|
191
278
|
r.get("length")
|
|
192
|
-
),
|
|
193
|
-
Number.isInteger(
|
|
279
|
+
), v = Number(c);
|
|
280
|
+
Number.isInteger(v) && v < d.v && w(d, v);
|
|
194
281
|
}
|
|
195
|
-
|
|
282
|
+
w(f, q), Cn(i);
|
|
196
283
|
}
|
|
197
284
|
return !0;
|
|
198
285
|
},
|
|
199
|
-
get(
|
|
200
|
-
if (
|
|
286
|
+
get(l, c, f) {
|
|
287
|
+
if (c === Ze)
|
|
201
288
|
return u;
|
|
202
|
-
if (
|
|
289
|
+
if (c === Pe)
|
|
203
290
|
return e;
|
|
204
|
-
var
|
|
205
|
-
if (
|
|
206
|
-
var
|
|
291
|
+
var d = r.get(c), v = c in l;
|
|
292
|
+
if (d === void 0 && (!v || ke(l, c)?.writable) && (d = a(() => D(Fe(v ? l[c] : q))), r.set(c, d)), d !== void 0) {
|
|
293
|
+
var g = _(d);
|
|
207
294
|
{
|
|
208
|
-
var y =
|
|
209
|
-
y && y?.parent !== u &&
|
|
295
|
+
var y = g?.[Ze];
|
|
296
|
+
y && y?.parent !== u && On(u, y);
|
|
210
297
|
}
|
|
211
|
-
return
|
|
298
|
+
return g === q ? void 0 : g;
|
|
212
299
|
}
|
|
213
|
-
return Reflect.get(
|
|
300
|
+
return Reflect.get(l, c, f);
|
|
214
301
|
},
|
|
215
|
-
getOwnPropertyDescriptor(
|
|
216
|
-
var
|
|
217
|
-
if (
|
|
218
|
-
var
|
|
219
|
-
|
|
220
|
-
} else if (
|
|
221
|
-
var
|
|
222
|
-
if (
|
|
302
|
+
getOwnPropertyDescriptor(l, c) {
|
|
303
|
+
var f = Reflect.getOwnPropertyDescriptor(l, c);
|
|
304
|
+
if (f && "value" in f) {
|
|
305
|
+
var d = r.get(c);
|
|
306
|
+
d && (f.value = _(d));
|
|
307
|
+
} else if (f === void 0) {
|
|
308
|
+
var v = r.get(c), g = v?.v;
|
|
309
|
+
if (v !== void 0 && g !== q)
|
|
223
310
|
return {
|
|
224
311
|
enumerable: !0,
|
|
225
312
|
configurable: !0,
|
|
226
|
-
value:
|
|
313
|
+
value: g,
|
|
227
314
|
writable: !0
|
|
228
315
|
};
|
|
229
316
|
}
|
|
230
|
-
return
|
|
317
|
+
return f;
|
|
231
318
|
},
|
|
232
|
-
has(
|
|
233
|
-
if (
|
|
319
|
+
has(l, c) {
|
|
320
|
+
if (c === Ze || c === Pe)
|
|
234
321
|
return !0;
|
|
235
|
-
var
|
|
236
|
-
if (
|
|
237
|
-
|
|
238
|
-
var
|
|
239
|
-
if (
|
|
322
|
+
var f = r.get(c), d = f !== void 0 && f.v !== q || Reflect.has(l, c);
|
|
323
|
+
if (f !== void 0 || x !== null && (!d || ke(l, c)?.writable)) {
|
|
324
|
+
f === void 0 && (f = a(() => D(d ? Fe(l[c]) : q)), r.set(c, f));
|
|
325
|
+
var v = _(f);
|
|
326
|
+
if (v === q)
|
|
240
327
|
return !1;
|
|
241
328
|
}
|
|
242
|
-
return
|
|
329
|
+
return d;
|
|
243
330
|
},
|
|
244
|
-
set(
|
|
245
|
-
var
|
|
246
|
-
if (s &&
|
|
247
|
-
for (var y =
|
|
248
|
-
|
|
249
|
-
var
|
|
250
|
-
|
|
331
|
+
set(l, c, f, d) {
|
|
332
|
+
var v = r.get(c), g = c in l;
|
|
333
|
+
if (s && c === "length")
|
|
334
|
+
for (var y = f; y < /** @type {Source<number>} */
|
|
335
|
+
v.v; y += 1) {
|
|
336
|
+
var b = r.get(y + "");
|
|
337
|
+
b !== void 0 ? w(b, q) : y in l && (b = a(() => D(q)), r.set(y + "", b));
|
|
251
338
|
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
), r.set(
|
|
256
|
-
|
|
257
|
-
|
|
339
|
+
v === void 0 ? (!g || ke(l, c)?.writable) && (v = a(() => D(void 0)), w(
|
|
340
|
+
v,
|
|
341
|
+
a(() => Fe(f))
|
|
342
|
+
), r.set(c, v)) : (g = v.v !== q, w(
|
|
343
|
+
v,
|
|
344
|
+
a(() => Fe(f))
|
|
258
345
|
));
|
|
259
346
|
{
|
|
260
|
-
var
|
|
261
|
-
|
|
347
|
+
var M = f?.[Ze];
|
|
348
|
+
M && M?.parent !== u && On(u, M), ei(u);
|
|
262
349
|
}
|
|
263
|
-
var
|
|
264
|
-
if (
|
|
265
|
-
if (s && typeof
|
|
266
|
-
var
|
|
350
|
+
var L = Reflect.getOwnPropertyDescriptor(l, c);
|
|
351
|
+
if (L?.set && L.set.call(d, f), !g) {
|
|
352
|
+
if (s && typeof c == "string") {
|
|
353
|
+
var N = (
|
|
267
354
|
/** @type {Source<number>} */
|
|
268
355
|
r.get("length")
|
|
269
|
-
),
|
|
270
|
-
Number.isInteger(
|
|
356
|
+
), F = Number(c);
|
|
357
|
+
Number.isInteger(F) && F >= N.v && w(N, F + 1);
|
|
271
358
|
}
|
|
272
|
-
|
|
359
|
+
Cn(i);
|
|
273
360
|
}
|
|
274
361
|
return !0;
|
|
275
362
|
},
|
|
276
|
-
ownKeys(
|
|
277
|
-
|
|
278
|
-
var
|
|
279
|
-
var
|
|
280
|
-
return
|
|
363
|
+
ownKeys(l) {
|
|
364
|
+
_(i);
|
|
365
|
+
var c = Reflect.ownKeys(l).filter((v) => {
|
|
366
|
+
var g = r.get(v);
|
|
367
|
+
return g === void 0 || g.v !== q;
|
|
281
368
|
});
|
|
282
|
-
for (var [
|
|
283
|
-
|
|
284
|
-
return
|
|
369
|
+
for (var [f, d] of r)
|
|
370
|
+
d.v !== q && !(f in l) && c.push(f);
|
|
371
|
+
return c;
|
|
285
372
|
},
|
|
286
373
|
setPrototypeOf() {
|
|
287
|
-
|
|
374
|
+
Es();
|
|
288
375
|
}
|
|
289
376
|
}
|
|
290
377
|
);
|
|
291
378
|
}
|
|
292
|
-
function
|
|
293
|
-
|
|
379
|
+
function Cn(e, t = 1) {
|
|
380
|
+
w(e, e.v + t);
|
|
294
381
|
}
|
|
295
|
-
function
|
|
382
|
+
function tt(e) {
|
|
296
383
|
try {
|
|
297
|
-
if (e !== null && typeof e == "object" &&
|
|
298
|
-
return e[
|
|
384
|
+
if (e !== null && typeof e == "object" && Pe in e)
|
|
385
|
+
return e[Pe];
|
|
299
386
|
} catch {
|
|
300
387
|
}
|
|
301
388
|
return e;
|
|
302
389
|
}
|
|
303
|
-
let
|
|
304
|
-
const
|
|
305
|
-
function
|
|
306
|
-
|
|
390
|
+
let Ve = /* @__PURE__ */ new Set();
|
|
391
|
+
const lt = /* @__PURE__ */ new Map();
|
|
392
|
+
function Pn(e) {
|
|
393
|
+
Ve = e;
|
|
307
394
|
}
|
|
308
|
-
function
|
|
395
|
+
function ir(e, t) {
|
|
309
396
|
var n = {
|
|
310
397
|
f: 0,
|
|
311
398
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
312
399
|
v: e,
|
|
313
400
|
reactions: null,
|
|
314
|
-
equals:
|
|
401
|
+
equals: rr,
|
|
315
402
|
rv: 0,
|
|
316
403
|
wv: 0
|
|
317
404
|
};
|
|
318
405
|
return n;
|
|
319
406
|
}
|
|
320
|
-
function
|
|
321
|
-
const n =
|
|
322
|
-
return
|
|
407
|
+
function D(e, t) {
|
|
408
|
+
const n = ir(e);
|
|
409
|
+
return dr(n), n;
|
|
323
410
|
}
|
|
324
411
|
// @__NO_SIDE_EFFECTS__
|
|
325
|
-
function
|
|
326
|
-
const n =
|
|
327
|
-
return t || (n.equals =
|
|
412
|
+
function or(e, t = !1) {
|
|
413
|
+
const n = ir(e);
|
|
414
|
+
return t || (n.equals = sr), n;
|
|
328
415
|
}
|
|
329
|
-
function
|
|
330
|
-
|
|
331
|
-
let r = n ?
|
|
332
|
-
return
|
|
416
|
+
function w(e, t, n = !1) {
|
|
417
|
+
E !== null && !ae && Fr() && (E.f & (fe | on)) !== 0 && !pe?.includes(e) && $s();
|
|
418
|
+
let r = n ? Fe(t, e) : t;
|
|
419
|
+
return xs(e, r);
|
|
333
420
|
}
|
|
334
|
-
function
|
|
421
|
+
function xs(e, t) {
|
|
335
422
|
if (!e.equals(t)) {
|
|
336
423
|
var n = e.v;
|
|
337
|
-
if (
|
|
338
|
-
const r = Array.from(
|
|
424
|
+
if (ft ? lt.set(e, t) : lt.set(e, n), e.v = t, e.wv = hr(), lr(e, ye), x !== null && (x.f & V) !== 0 && (x.f & (me | Oe)) === 0 && (Z === null ? Ns([e]) : Z.push(e)), Ve.size > 0) {
|
|
425
|
+
const r = Array.from(Ve);
|
|
339
426
|
for (const s of r)
|
|
340
|
-
(s.f &
|
|
341
|
-
|
|
427
|
+
(s.f & V) !== 0 && re(s, Be), We(s) && Dt(s);
|
|
428
|
+
Ve.clear();
|
|
342
429
|
}
|
|
343
430
|
}
|
|
344
431
|
return t;
|
|
345
432
|
}
|
|
346
|
-
function
|
|
433
|
+
function lr(e, t) {
|
|
347
434
|
var n = e.reactions;
|
|
348
435
|
if (n !== null)
|
|
349
436
|
for (var r = n.length, s = 0; s < r; s++) {
|
|
350
437
|
var i = n[s], o = i.f;
|
|
351
|
-
if ((o &
|
|
352
|
-
if ((o &
|
|
353
|
-
|
|
438
|
+
if ((o & ye) === 0) {
|
|
439
|
+
if ((o & Xn) !== 0) {
|
|
440
|
+
Ve.add(i);
|
|
354
441
|
continue;
|
|
355
442
|
}
|
|
356
|
-
re(i, t), (o & (
|
|
443
|
+
re(i, t), (o & (V | ee)) !== 0 && ((o & fe) !== 0 ? lr(
|
|
357
444
|
/** @type {Derived} */
|
|
358
445
|
i,
|
|
359
|
-
|
|
360
|
-
) :
|
|
446
|
+
Be
|
|
447
|
+
) : At(
|
|
361
448
|
/** @type {Effect} */
|
|
362
449
|
i
|
|
363
450
|
));
|
|
@@ -365,16 +452,16 @@ function rr(e, t) {
|
|
|
365
452
|
}
|
|
366
453
|
}
|
|
367
454
|
// @__NO_SIDE_EFFECTS__
|
|
368
|
-
function
|
|
369
|
-
var t = fe |
|
|
455
|
+
function un(e) {
|
|
456
|
+
var t = fe | ye, n = E !== null && (E.f & fe) !== 0 ? (
|
|
370
457
|
/** @type {Derived} */
|
|
371
|
-
|
|
458
|
+
E
|
|
372
459
|
) : null;
|
|
373
|
-
return x === null || n !== null && (n.f &
|
|
374
|
-
ctx:
|
|
460
|
+
return x === null || n !== null && (n.f & ee) !== 0 ? t |= ee : x.f |= Wn, {
|
|
461
|
+
ctx: A,
|
|
375
462
|
deps: null,
|
|
376
463
|
effects: null,
|
|
377
|
-
equals:
|
|
464
|
+
equals: rr,
|
|
378
465
|
f: t,
|
|
379
466
|
fn: e,
|
|
380
467
|
reactions: null,
|
|
@@ -387,11 +474,11 @@ function an(e) {
|
|
|
387
474
|
parent: n ?? x
|
|
388
475
|
};
|
|
389
476
|
}
|
|
390
|
-
function
|
|
391
|
-
const t = /* @__PURE__ */
|
|
392
|
-
return
|
|
477
|
+
function H(e) {
|
|
478
|
+
const t = /* @__PURE__ */ un(e);
|
|
479
|
+
return dr(t), t;
|
|
393
480
|
}
|
|
394
|
-
function
|
|
481
|
+
function ar(e) {
|
|
395
482
|
var t = e.effects;
|
|
396
483
|
if (t !== null) {
|
|
397
484
|
e.effects = null;
|
|
@@ -402,8 +489,8 @@ function sr(e) {
|
|
|
402
489
|
);
|
|
403
490
|
}
|
|
404
491
|
}
|
|
405
|
-
let
|
|
406
|
-
function
|
|
492
|
+
let Yt = [];
|
|
493
|
+
function Fs(e) {
|
|
407
494
|
for (var t = e.parent; t !== null; ) {
|
|
408
495
|
if ((t.f & fe) === 0)
|
|
409
496
|
return (
|
|
@@ -414,75 +501,80 @@ function Cs(e) {
|
|
|
414
501
|
}
|
|
415
502
|
return null;
|
|
416
503
|
}
|
|
417
|
-
function
|
|
504
|
+
function ks(e) {
|
|
418
505
|
var t, n = x;
|
|
419
|
-
|
|
506
|
+
Ge(Fs(e));
|
|
420
507
|
{
|
|
421
|
-
let r =
|
|
422
|
-
|
|
508
|
+
let r = Ve;
|
|
509
|
+
Pn(/* @__PURE__ */ new Set());
|
|
423
510
|
try {
|
|
424
|
-
|
|
511
|
+
Yt.includes(e) && vs(), Yt.push(e), ar(e), t = gr(e);
|
|
425
512
|
} finally {
|
|
426
|
-
|
|
513
|
+
Ge(n), Pn(r), Yt.pop();
|
|
427
514
|
}
|
|
428
515
|
}
|
|
429
516
|
return t;
|
|
430
517
|
}
|
|
431
|
-
function
|
|
432
|
-
var t =
|
|
433
|
-
re(e, n), e.equals(t) || (e.v = t, e.wv =
|
|
518
|
+
function ur(e) {
|
|
519
|
+
var t = ks(e), n = (Ce || (e.f & ee) !== 0) && e.deps !== null ? Be : V;
|
|
520
|
+
re(e, n), e.equals(t) || (e.v = t, e.wv = hr());
|
|
521
|
+
}
|
|
522
|
+
var Je = "font-weight: bold", Xe = "font-weight: normal";
|
|
523
|
+
function Rs(e) {
|
|
524
|
+
console.warn(`%c[svelte] console_log_state
|
|
525
|
+
%cYour \`console.${e}\` contained \`$state\` proxies. Consider using \`$inspect(...)\` or \`$state.snapshot(...)\` instead
|
|
526
|
+
https://svelte.dev/e/console_log_state`, Je, Xe);
|
|
434
527
|
}
|
|
435
|
-
|
|
436
|
-
function Ss(e) {
|
|
528
|
+
function Ls(e) {
|
|
437
529
|
console.warn(`%c[svelte] hydration_html_changed
|
|
438
530
|
%c${e ? `The value of an \`{@html ...}\` block ${e} changed between server and client renders. The client value will be ignored in favour of the server value` : "The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}
|
|
439
|
-
https://svelte.dev/e/hydration_html_changed`,
|
|
531
|
+
https://svelte.dev/e/hydration_html_changed`, Je, Xe);
|
|
440
532
|
}
|
|
441
|
-
function
|
|
533
|
+
function Bt(e) {
|
|
442
534
|
console.warn(`%c[svelte] hydration_mismatch
|
|
443
535
|
%cHydration failed because the initial UI does not match what was rendered on the server
|
|
444
|
-
https://svelte.dev/e/hydration_mismatch`,
|
|
536
|
+
https://svelte.dev/e/hydration_mismatch`, Je, Xe);
|
|
445
537
|
}
|
|
446
|
-
function
|
|
538
|
+
function Os() {
|
|
447
539
|
console.warn(`%c[svelte] lifecycle_double_unmount
|
|
448
540
|
%cTried to unmount a component that was not mounted
|
|
449
|
-
https://svelte.dev/e/lifecycle_double_unmount`,
|
|
541
|
+
https://svelte.dev/e/lifecycle_double_unmount`, Je, Xe);
|
|
450
542
|
}
|
|
451
|
-
function
|
|
543
|
+
function Sn(e, t) {
|
|
452
544
|
console.warn(`%c[svelte] ownership_invalid_mutation
|
|
453
545
|
%c${e ? `${e} mutated a value owned by ${t}. This is strongly discouraged. Consider passing values to child components with \`bind:\`, or use a callback instead` : "Mutating a value outside the component that created it is strongly discouraged. Consider passing values to child components with `bind:`, or use a callback instead"}
|
|
454
|
-
https://svelte.dev/e/ownership_invalid_mutation`,
|
|
546
|
+
https://svelte.dev/e/ownership_invalid_mutation`, Je, Xe);
|
|
455
547
|
}
|
|
456
|
-
function
|
|
548
|
+
function mt(e) {
|
|
457
549
|
console.warn(`%c[svelte] state_proxy_equality_mismatch
|
|
458
550
|
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${e}\` will produce unexpected results
|
|
459
|
-
https://svelte.dev/e/state_proxy_equality_mismatch`,
|
|
551
|
+
https://svelte.dev/e/state_proxy_equality_mismatch`, Je, Xe);
|
|
460
552
|
}
|
|
461
553
|
let B = !1;
|
|
462
|
-
function
|
|
554
|
+
function Qe(e) {
|
|
463
555
|
B = e;
|
|
464
556
|
}
|
|
465
|
-
let
|
|
466
|
-
function
|
|
557
|
+
let O;
|
|
558
|
+
function ge(e) {
|
|
467
559
|
if (e === null)
|
|
468
|
-
throw
|
|
469
|
-
return
|
|
560
|
+
throw Bt(), qe;
|
|
561
|
+
return O = e;
|
|
470
562
|
}
|
|
471
|
-
function
|
|
472
|
-
return
|
|
563
|
+
function at() {
|
|
564
|
+
return ge(
|
|
473
565
|
/** @type {TemplateNode} */
|
|
474
|
-
/* @__PURE__ */
|
|
566
|
+
/* @__PURE__ */ Ue(O)
|
|
475
567
|
);
|
|
476
568
|
}
|
|
477
569
|
function oe(e) {
|
|
478
570
|
if (B) {
|
|
479
|
-
if (/* @__PURE__ */
|
|
480
|
-
throw
|
|
481
|
-
|
|
571
|
+
if (/* @__PURE__ */ Ue(O) !== null)
|
|
572
|
+
throw Bt(), qe;
|
|
573
|
+
O = e;
|
|
482
574
|
}
|
|
483
575
|
}
|
|
484
|
-
function
|
|
485
|
-
for (var e = 0, t =
|
|
576
|
+
function Bs() {
|
|
577
|
+
for (var e = 0, t = O; ; ) {
|
|
486
578
|
if (t.nodeType === 8) {
|
|
487
579
|
var n = (
|
|
488
580
|
/** @type {Comment} */
|
|
@@ -491,294 +583,291 @@ function Ts() {
|
|
|
491
583
|
if (n === sn) {
|
|
492
584
|
if (e === 0) return t;
|
|
493
585
|
e -= 1;
|
|
494
|
-
} else (n ===
|
|
586
|
+
} else (n === Rt || n === rn) && (e += 1);
|
|
495
587
|
}
|
|
496
588
|
var r = (
|
|
497
589
|
/** @type {TemplateNode} */
|
|
498
|
-
/* @__PURE__ */
|
|
590
|
+
/* @__PURE__ */ Ue(t)
|
|
499
591
|
);
|
|
500
592
|
t.remove(), t = r;
|
|
501
593
|
}
|
|
502
594
|
}
|
|
503
|
-
function
|
|
595
|
+
function Us() {
|
|
504
596
|
const e = Array.prototype, t = Array.__svelte_cleanup;
|
|
505
597
|
t && t();
|
|
506
598
|
const { indexOf: n, lastIndexOf: r, includes: s } = e;
|
|
507
599
|
e.indexOf = function(i, o) {
|
|
508
|
-
const
|
|
509
|
-
if (
|
|
600
|
+
const a = n.call(this, i, o);
|
|
601
|
+
if (a === -1) {
|
|
510
602
|
for (let u = o ?? 0; u < this.length; u += 1)
|
|
511
|
-
if (
|
|
512
|
-
|
|
603
|
+
if (tt(this[u]) === i) {
|
|
604
|
+
mt("array.indexOf(...)");
|
|
513
605
|
break;
|
|
514
606
|
}
|
|
515
607
|
}
|
|
516
|
-
return
|
|
608
|
+
return a;
|
|
517
609
|
}, e.lastIndexOf = function(i, o) {
|
|
518
|
-
const
|
|
519
|
-
if (
|
|
610
|
+
const a = r.call(this, i, o ?? this.length - 1);
|
|
611
|
+
if (a === -1) {
|
|
520
612
|
for (let u = 0; u <= (o ?? this.length - 1); u += 1)
|
|
521
|
-
if (
|
|
522
|
-
|
|
613
|
+
if (tt(this[u]) === i) {
|
|
614
|
+
mt("array.lastIndexOf(...)");
|
|
523
615
|
break;
|
|
524
616
|
}
|
|
525
617
|
}
|
|
526
|
-
return
|
|
618
|
+
return a;
|
|
527
619
|
}, e.includes = function(i, o) {
|
|
528
|
-
const
|
|
529
|
-
if (!
|
|
620
|
+
const a = s.call(this, i, o);
|
|
621
|
+
if (!a) {
|
|
530
622
|
for (let u = 0; u < this.length; u += 1)
|
|
531
|
-
if (
|
|
532
|
-
|
|
623
|
+
if (tt(this[u]) === i) {
|
|
624
|
+
mt("array.includes(...)");
|
|
533
625
|
break;
|
|
534
626
|
}
|
|
535
627
|
}
|
|
536
|
-
return
|
|
628
|
+
return a;
|
|
537
629
|
}, Array.__svelte_cleanup = () => {
|
|
538
630
|
e.indexOf = n, e.lastIndexOf = r, e.includes = s;
|
|
539
631
|
};
|
|
540
632
|
}
|
|
541
|
-
function
|
|
633
|
+
function T(e, t, n = !0) {
|
|
542
634
|
try {
|
|
543
|
-
e === t != (
|
|
635
|
+
e === t != (tt(e) === tt(t)) && mt(n ? "===" : "!==");
|
|
544
636
|
} catch {
|
|
545
637
|
}
|
|
546
638
|
return e === t === n;
|
|
547
639
|
}
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
function Xt() {
|
|
553
|
-
if (Pn === void 0) {
|
|
554
|
-
Pn = window, un = /Firefox/.test(navigator.userAgent);
|
|
640
|
+
var Tn, cn, cr, fr;
|
|
641
|
+
function Ht() {
|
|
642
|
+
if (Tn === void 0) {
|
|
643
|
+
Tn = window, cn = /Firefox/.test(navigator.userAgent);
|
|
555
644
|
var e = Element.prototype, t = Node.prototype, n = Text.prototype;
|
|
556
|
-
|
|
645
|
+
cr = ke(t, "firstChild").get, fr = ke(t, "nextSibling").get, bn(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), bn(n) && (n.__t = void 0), e.__svelte_meta = null, Us();
|
|
557
646
|
}
|
|
558
647
|
}
|
|
559
|
-
function
|
|
648
|
+
function Ct(e = "") {
|
|
560
649
|
return document.createTextNode(e);
|
|
561
650
|
}
|
|
562
651
|
// @__NO_SIDE_EFFECTS__
|
|
563
|
-
function
|
|
564
|
-
return
|
|
652
|
+
function ut(e) {
|
|
653
|
+
return cr.call(e);
|
|
565
654
|
}
|
|
566
655
|
// @__NO_SIDE_EFFECTS__
|
|
567
|
-
function
|
|
568
|
-
return
|
|
656
|
+
function Ue(e) {
|
|
657
|
+
return fr.call(e);
|
|
569
658
|
}
|
|
570
659
|
function le(e, t) {
|
|
571
660
|
if (!B)
|
|
572
|
-
return /* @__PURE__ */
|
|
661
|
+
return /* @__PURE__ */ ut(e);
|
|
573
662
|
var n = (
|
|
574
663
|
/** @type {TemplateNode} */
|
|
575
|
-
/* @__PURE__ */
|
|
664
|
+
/* @__PURE__ */ ut(O)
|
|
576
665
|
);
|
|
577
666
|
if (n === null)
|
|
578
|
-
n =
|
|
667
|
+
n = O.appendChild(Ct());
|
|
579
668
|
else if (t && n.nodeType !== 3) {
|
|
580
|
-
var r =
|
|
581
|
-
return n?.before(r),
|
|
669
|
+
var r = Ct();
|
|
670
|
+
return n?.before(r), ge(r), r;
|
|
582
671
|
}
|
|
583
|
-
return
|
|
672
|
+
return ge(n), n;
|
|
584
673
|
}
|
|
585
674
|
function Zt(e, t = 1, n = !1) {
|
|
586
|
-
let r = B ?
|
|
675
|
+
let r = B ? O : e;
|
|
587
676
|
for (var s; t--; )
|
|
588
677
|
s = r, r = /** @type {TemplateNode} */
|
|
589
|
-
/* @__PURE__ */
|
|
678
|
+
/* @__PURE__ */ Ue(r);
|
|
590
679
|
if (!B)
|
|
591
680
|
return r;
|
|
592
681
|
var i = r?.nodeType;
|
|
593
682
|
if (n && i !== 3) {
|
|
594
|
-
var o =
|
|
595
|
-
return r === null ? s?.after(o) : r.before(o),
|
|
683
|
+
var o = Ct();
|
|
684
|
+
return r === null ? s?.after(o) : r.before(o), ge(o), o;
|
|
596
685
|
}
|
|
597
|
-
return
|
|
686
|
+
return ge(r), /** @type {TemplateNode} */
|
|
598
687
|
r;
|
|
599
688
|
}
|
|
600
|
-
function
|
|
689
|
+
function Ds(e) {
|
|
601
690
|
e.textContent = "";
|
|
602
691
|
}
|
|
603
|
-
const
|
|
604
|
-
let yt = !1,
|
|
692
|
+
const In = /* @__PURE__ */ new WeakSet();
|
|
693
|
+
let yt = !1, Pt = !1, St = null, Re = !1, ft = !1;
|
|
605
694
|
function xn(e) {
|
|
606
|
-
|
|
695
|
+
ft = e;
|
|
607
696
|
}
|
|
608
|
-
let
|
|
609
|
-
function
|
|
610
|
-
|
|
697
|
+
let nt = [], Tt = [], E = null, ae = !1;
|
|
698
|
+
function Se(e) {
|
|
699
|
+
E = e;
|
|
611
700
|
}
|
|
612
701
|
let x = null;
|
|
613
|
-
function
|
|
702
|
+
function Ge(e) {
|
|
614
703
|
x = e;
|
|
615
704
|
}
|
|
616
|
-
let
|
|
617
|
-
function
|
|
618
|
-
|
|
705
|
+
let pe = null;
|
|
706
|
+
function As(e) {
|
|
707
|
+
pe = e;
|
|
619
708
|
}
|
|
620
|
-
function
|
|
621
|
-
|
|
709
|
+
function dr(e) {
|
|
710
|
+
E !== null && E.f & Xt && (pe === null ? As([e]) : pe.push(e));
|
|
622
711
|
}
|
|
623
|
-
let
|
|
624
|
-
function
|
|
625
|
-
|
|
712
|
+
let j = null, J = 0, Z = null;
|
|
713
|
+
function Ns(e) {
|
|
714
|
+
Z = e;
|
|
626
715
|
}
|
|
627
|
-
let
|
|
628
|
-
function
|
|
629
|
-
return ++
|
|
716
|
+
let vr = 1, It = 0, Ce = !1;
|
|
717
|
+
function hr() {
|
|
718
|
+
return ++vr;
|
|
630
719
|
}
|
|
631
|
-
function
|
|
720
|
+
function We(e) {
|
|
632
721
|
var t = e.f;
|
|
633
|
-
if ((t &
|
|
722
|
+
if ((t & ye) !== 0)
|
|
634
723
|
return !0;
|
|
635
|
-
if ((t &
|
|
636
|
-
var n = e.deps, r = (t &
|
|
724
|
+
if ((t & Be) !== 0) {
|
|
725
|
+
var n = e.deps, r = (t & ee) !== 0;
|
|
637
726
|
if (n !== null) {
|
|
638
|
-
var s, i, o = (t & Et) !== 0,
|
|
639
|
-
if (o ||
|
|
640
|
-
var
|
|
727
|
+
var s, i, o = (t & Et) !== 0, a = r && x !== null && !Ce, u = n.length;
|
|
728
|
+
if (o || a) {
|
|
729
|
+
var l = (
|
|
641
730
|
/** @type {Derived} */
|
|
642
731
|
e
|
|
643
|
-
),
|
|
732
|
+
), c = l.parent;
|
|
644
733
|
for (s = 0; s < u; s++)
|
|
645
|
-
i = n[s], (o || !i?.reactions?.includes(
|
|
646
|
-
o && (
|
|
734
|
+
i = n[s], (o || !i?.reactions?.includes(l)) && (i.reactions ?? (i.reactions = [])).push(l);
|
|
735
|
+
o && (l.f ^= Et), a && c !== null && (c.f & ee) === 0 && (l.f ^= ee);
|
|
647
736
|
}
|
|
648
737
|
for (s = 0; s < u; s++)
|
|
649
|
-
if (i = n[s],
|
|
738
|
+
if (i = n[s], We(
|
|
650
739
|
/** @type {Derived} */
|
|
651
740
|
i
|
|
652
|
-
) &&
|
|
741
|
+
) && ur(
|
|
653
742
|
/** @type {Derived} */
|
|
654
743
|
i
|
|
655
744
|
), i.wv > e.wv)
|
|
656
745
|
return !0;
|
|
657
746
|
}
|
|
658
|
-
(!r || x !== null && !
|
|
747
|
+
(!r || x !== null && !Ce) && re(e, V);
|
|
659
748
|
}
|
|
660
749
|
return !1;
|
|
661
750
|
}
|
|
662
|
-
function
|
|
751
|
+
function Fn(e, t) {
|
|
663
752
|
for (var n = t; n !== null; ) {
|
|
664
|
-
if ((n.f &
|
|
753
|
+
if ((n.f & bt) !== 0)
|
|
665
754
|
try {
|
|
666
755
|
n.fn(e);
|
|
667
756
|
return;
|
|
668
757
|
} catch {
|
|
669
|
-
n.f ^=
|
|
758
|
+
n.f ^= bt;
|
|
670
759
|
}
|
|
671
760
|
n = n.parent;
|
|
672
761
|
}
|
|
673
762
|
throw yt = !1, e;
|
|
674
763
|
}
|
|
675
|
-
function
|
|
676
|
-
return (e.f & Ot) === 0 && (e.parent === null || (e.parent.f &
|
|
764
|
+
function kn(e) {
|
|
765
|
+
return (e.f & Ot) === 0 && (e.parent === null || (e.parent.f & bt) === 0);
|
|
677
766
|
}
|
|
678
|
-
function
|
|
767
|
+
function Ut(e, t, n, r) {
|
|
679
768
|
if (yt) {
|
|
680
|
-
if (n === null && (yt = !1),
|
|
769
|
+
if (n === null && (yt = !1), kn(t))
|
|
681
770
|
throw e;
|
|
682
771
|
return;
|
|
683
772
|
}
|
|
684
|
-
if (n !== null && (yt = !0), r === null || !(e instanceof Error) ||
|
|
685
|
-
|
|
773
|
+
if (n !== null && (yt = !0), r === null || !(e instanceof Error) || In.has(e)) {
|
|
774
|
+
Fn(e, t);
|
|
686
775
|
return;
|
|
687
776
|
}
|
|
688
|
-
|
|
777
|
+
In.add(e);
|
|
689
778
|
const s = [], i = t.fn?.name;
|
|
690
779
|
i && s.push(i);
|
|
691
780
|
let o = r;
|
|
692
781
|
for (; o !== null; ) {
|
|
693
782
|
{
|
|
694
|
-
var
|
|
695
|
-
if (
|
|
696
|
-
const
|
|
697
|
-
s.push(
|
|
783
|
+
var a = o.function?.[R];
|
|
784
|
+
if (a) {
|
|
785
|
+
const c = a.split("/").pop();
|
|
786
|
+
s.push(c);
|
|
698
787
|
}
|
|
699
788
|
}
|
|
700
789
|
o = o.p;
|
|
701
790
|
}
|
|
702
|
-
const u =
|
|
791
|
+
const u = cn ? " " : " ";
|
|
703
792
|
ue(e, "message", {
|
|
704
793
|
value: e.message + `
|
|
705
|
-
${s.map((
|
|
706
|
-
${u}in ${
|
|
794
|
+
${s.map((c) => `
|
|
795
|
+
${u}in ${c}`).join("")}
|
|
707
796
|
`
|
|
708
797
|
}), ue(e, "component_stack", {
|
|
709
798
|
value: s
|
|
710
799
|
});
|
|
711
|
-
const
|
|
712
|
-
if (
|
|
713
|
-
const
|
|
714
|
-
`),
|
|
715
|
-
for (let
|
|
716
|
-
const
|
|
717
|
-
|
|
800
|
+
const l = e.stack;
|
|
801
|
+
if (l) {
|
|
802
|
+
const c = l.split(`
|
|
803
|
+
`), f = [];
|
|
804
|
+
for (let d = 0; d < c.length; d++) {
|
|
805
|
+
const v = c[d];
|
|
806
|
+
v.includes("svelte/src/internal") || f.push(v);
|
|
718
807
|
}
|
|
719
808
|
ue(e, "stack", {
|
|
720
|
-
value:
|
|
809
|
+
value: f.join(`
|
|
721
810
|
`)
|
|
722
811
|
});
|
|
723
812
|
}
|
|
724
|
-
if (
|
|
813
|
+
if (Fn(e, t), kn(t))
|
|
725
814
|
throw e;
|
|
726
815
|
}
|
|
727
|
-
function
|
|
816
|
+
function pr(e, t, n = !0) {
|
|
728
817
|
var r = e.reactions;
|
|
729
818
|
if (r !== null)
|
|
730
819
|
for (var s = 0; s < r.length; s++) {
|
|
731
820
|
var i = r[s];
|
|
732
|
-
|
|
821
|
+
pe?.includes(e) || ((i.f & fe) !== 0 ? pr(
|
|
733
822
|
/** @type {Derived} */
|
|
734
823
|
i,
|
|
735
824
|
t,
|
|
736
825
|
!1
|
|
737
|
-
) : t === i && (n ? re(i,
|
|
826
|
+
) : t === i && (n ? re(i, ye) : (i.f & V) !== 0 && re(i, Be), At(
|
|
738
827
|
/** @type {Effect} */
|
|
739
828
|
i
|
|
740
829
|
)));
|
|
741
830
|
}
|
|
742
831
|
}
|
|
743
|
-
function
|
|
744
|
-
var
|
|
745
|
-
var t =
|
|
746
|
-
|
|
747
|
-
null,
|
|
832
|
+
function gr(e) {
|
|
833
|
+
var v;
|
|
834
|
+
var t = j, n = J, r = Z, s = E, i = Ce, o = pe, a = A, u = ae, l = e.f;
|
|
835
|
+
j = /** @type {null | Value[]} */
|
|
836
|
+
null, J = 0, Z = null, Ce = (l & ee) !== 0 && (ae || !Re || E === null), E = (l & (me | Oe)) === 0 ? e : null, pe = null, Bn(e.ctx), ae = !1, It++, e.f |= Xt;
|
|
748
837
|
try {
|
|
749
|
-
var
|
|
838
|
+
var c = (
|
|
750
839
|
/** @type {Function} */
|
|
751
840
|
(0, e.fn)()
|
|
752
|
-
),
|
|
753
|
-
if (
|
|
754
|
-
var
|
|
755
|
-
if (
|
|
756
|
-
for (
|
|
757
|
-
|
|
841
|
+
), f = e.deps;
|
|
842
|
+
if (j !== null) {
|
|
843
|
+
var d;
|
|
844
|
+
if (xt(e, J), f !== null && J > 0)
|
|
845
|
+
for (f.length = J + j.length, d = 0; d < j.length; d++)
|
|
846
|
+
f[J + d] = j[d];
|
|
758
847
|
else
|
|
759
|
-
e.deps =
|
|
760
|
-
if (!
|
|
761
|
-
for (
|
|
762
|
-
((
|
|
763
|
-
} else
|
|
764
|
-
if (
|
|
765
|
-
for (
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
848
|
+
e.deps = f = j;
|
|
849
|
+
if (!Ce)
|
|
850
|
+
for (d = J; d < f.length; d++)
|
|
851
|
+
((v = f[d]).reactions ?? (v.reactions = [])).push(e);
|
|
852
|
+
} else f !== null && J < f.length && (xt(e, J), f.length = J);
|
|
853
|
+
if (Fr() && Z !== null && !ae && f !== null && (e.f & (fe | Be | ye)) === 0)
|
|
854
|
+
for (d = 0; d < /** @type {Source[]} */
|
|
855
|
+
Z.length; d++)
|
|
856
|
+
pr(
|
|
857
|
+
Z[d],
|
|
769
858
|
/** @type {Effect} */
|
|
770
859
|
e
|
|
771
860
|
);
|
|
772
|
-
return s !== null && (
|
|
773
|
-
|
|
861
|
+
return s !== null && (It++, Z !== null && (r === null ? r = Z : r.push(.../** @type {Source[]} */
|
|
862
|
+
Z))), c;
|
|
774
863
|
} finally {
|
|
775
|
-
|
|
864
|
+
j = t, J = n, Z = r, E = s, Ce = i, pe = o, Bn(a), ae = u, e.f ^= Xt;
|
|
776
865
|
}
|
|
777
866
|
}
|
|
778
|
-
function
|
|
867
|
+
function js(e, t) {
|
|
779
868
|
let n = t.reactions;
|
|
780
869
|
if (n !== null) {
|
|
781
|
-
var r =
|
|
870
|
+
var r = os.call(n, e);
|
|
782
871
|
if (r !== -1) {
|
|
783
872
|
var s = n.length - 1;
|
|
784
873
|
s === 0 ? n = t.reactions = null : (n[r] = n[s], n.pop());
|
|
@@ -787,129 +876,129 @@ function Us(e, t) {
|
|
|
787
876
|
n === null && (t.f & fe) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
788
877
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
789
878
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
790
|
-
(
|
|
879
|
+
(j === null || !j.includes(t)) && (re(t, Be), (t.f & (ee | Et)) === 0 && (t.f ^= Et), ar(
|
|
791
880
|
/** @type {Derived} **/
|
|
792
881
|
t
|
|
793
|
-
),
|
|
882
|
+
), xt(
|
|
794
883
|
/** @type {Derived} **/
|
|
795
884
|
t,
|
|
796
885
|
0
|
|
797
886
|
));
|
|
798
887
|
}
|
|
799
|
-
function
|
|
888
|
+
function xt(e, t) {
|
|
800
889
|
var n = e.deps;
|
|
801
890
|
if (n !== null)
|
|
802
891
|
for (var r = t; r < n.length; r++)
|
|
803
|
-
|
|
892
|
+
js(e, n[r]);
|
|
804
893
|
}
|
|
805
|
-
function
|
|
894
|
+
function Dt(e) {
|
|
806
895
|
var t = e.f;
|
|
807
896
|
if ((t & Ot) === 0) {
|
|
808
|
-
re(e,
|
|
809
|
-
var n = x, r =
|
|
810
|
-
x = e,
|
|
897
|
+
re(e, V);
|
|
898
|
+
var n = x, r = A, s = Re;
|
|
899
|
+
x = e, Re = !0;
|
|
811
900
|
{
|
|
812
|
-
var i =
|
|
901
|
+
var i = Le;
|
|
813
902
|
Un(e.component_function);
|
|
814
903
|
}
|
|
815
904
|
try {
|
|
816
|
-
(t & on) !== 0 ?
|
|
817
|
-
var o =
|
|
818
|
-
e.teardown = typeof o == "function" ? o : null, e.wv =
|
|
819
|
-
var
|
|
820
|
-
|
|
821
|
-
} catch (
|
|
822
|
-
|
|
905
|
+
(t & on) !== 0 ? Ws(e) : br(e), wr(e);
|
|
906
|
+
var o = gr(e);
|
|
907
|
+
e.teardown = typeof o == "function" ? o : null, e.wv = vr;
|
|
908
|
+
var a = e.deps, u;
|
|
909
|
+
wn && Cs && e.f & ye, wn && Tt.push(e);
|
|
910
|
+
} catch (l) {
|
|
911
|
+
Ut(l, e, n, r || e.ctx);
|
|
823
912
|
} finally {
|
|
824
|
-
|
|
913
|
+
Re = s, x = n, Un(i);
|
|
825
914
|
}
|
|
826
915
|
}
|
|
827
916
|
}
|
|
828
|
-
function
|
|
917
|
+
function Rn() {
|
|
829
918
|
console.error(
|
|
830
919
|
"Last ten effects were: ",
|
|
831
|
-
|
|
832
|
-
),
|
|
920
|
+
Tt.slice(-10).map((e) => e.fn)
|
|
921
|
+
), Tt = [];
|
|
833
922
|
}
|
|
834
|
-
function
|
|
923
|
+
function Qs() {
|
|
835
924
|
try {
|
|
836
|
-
|
|
925
|
+
_s();
|
|
837
926
|
} catch (e) {
|
|
838
927
|
if (ue(e, "stack", {
|
|
839
928
|
value: ""
|
|
840
|
-
}),
|
|
929
|
+
}), St !== null)
|
|
841
930
|
try {
|
|
842
|
-
|
|
931
|
+
Ut(e, St, null, null);
|
|
843
932
|
} catch (t) {
|
|
844
|
-
throw
|
|
933
|
+
throw Rn(), t;
|
|
845
934
|
}
|
|
846
935
|
else
|
|
847
|
-
throw
|
|
936
|
+
throw Rn(), e;
|
|
848
937
|
}
|
|
849
938
|
}
|
|
850
|
-
function
|
|
851
|
-
var e =
|
|
939
|
+
function _r() {
|
|
940
|
+
var e = Re;
|
|
852
941
|
try {
|
|
853
942
|
var t = 0;
|
|
854
|
-
for (
|
|
855
|
-
t++ > 1e3 &&
|
|
856
|
-
var n =
|
|
857
|
-
|
|
943
|
+
for (Re = !0; nt.length > 0; ) {
|
|
944
|
+
t++ > 1e3 && Qs();
|
|
945
|
+
var n = nt, r = n.length;
|
|
946
|
+
nt = [];
|
|
858
947
|
for (var s = 0; s < r; s++) {
|
|
859
|
-
var i =
|
|
860
|
-
|
|
948
|
+
var i = zs(n[s]);
|
|
949
|
+
Ms(i);
|
|
861
950
|
}
|
|
862
951
|
}
|
|
863
952
|
} finally {
|
|
864
|
-
|
|
953
|
+
Pt = !1, Re = e, St = null, Tt = [], lt.clear();
|
|
865
954
|
}
|
|
866
955
|
}
|
|
867
|
-
function
|
|
956
|
+
function Ms(e) {
|
|
868
957
|
var t = e.length;
|
|
869
958
|
if (t !== 0)
|
|
870
959
|
for (var n = 0; n < t; n++) {
|
|
871
960
|
var r = e[n];
|
|
872
|
-
if ((r.f & (Ot |
|
|
961
|
+
if ((r.f & (Ot | Ye)) === 0)
|
|
873
962
|
try {
|
|
874
|
-
|
|
963
|
+
We(r) && (Dt(r), r.deps === null && r.first === null && r.nodes_start === null && (r.teardown === null ? Er(r) : r.fn = null));
|
|
875
964
|
} catch (s) {
|
|
876
|
-
|
|
965
|
+
Ut(s, r, null, r.ctx);
|
|
877
966
|
}
|
|
878
967
|
}
|
|
879
968
|
}
|
|
880
|
-
function
|
|
881
|
-
|
|
882
|
-
for (var t =
|
|
969
|
+
function At(e) {
|
|
970
|
+
Pt || (Pt = !0, queueMicrotask(_r));
|
|
971
|
+
for (var t = St = e; t.parent !== null; ) {
|
|
883
972
|
t = t.parent;
|
|
884
973
|
var n = t.f;
|
|
885
|
-
if ((n & (
|
|
886
|
-
if ((n &
|
|
887
|
-
t.f ^=
|
|
974
|
+
if ((n & (Oe | me)) !== 0) {
|
|
975
|
+
if ((n & V) === 0) return;
|
|
976
|
+
t.f ^= V;
|
|
888
977
|
}
|
|
889
978
|
}
|
|
890
|
-
|
|
979
|
+
nt.push(t);
|
|
891
980
|
}
|
|
892
|
-
function
|
|
981
|
+
function zs(e) {
|
|
893
982
|
for (var t = [], n = e; n !== null; ) {
|
|
894
|
-
var r = n.f, s = (r & (
|
|
895
|
-
if (!i && (r &
|
|
896
|
-
if ((r &
|
|
983
|
+
var r = n.f, s = (r & (me | Oe)) !== 0, i = s && (r & V) !== 0;
|
|
984
|
+
if (!i && (r & Ye) === 0) {
|
|
985
|
+
if ((r & Jn) !== 0)
|
|
897
986
|
t.push(n);
|
|
898
987
|
else if (s)
|
|
899
|
-
n.f ^=
|
|
988
|
+
n.f ^= V;
|
|
900
989
|
else {
|
|
901
|
-
var o =
|
|
990
|
+
var o = E;
|
|
902
991
|
try {
|
|
903
|
-
|
|
904
|
-
} catch (
|
|
905
|
-
|
|
992
|
+
E = n, We(n) && Dt(n);
|
|
993
|
+
} catch (l) {
|
|
994
|
+
Ut(l, n, null, n.ctx);
|
|
906
995
|
} finally {
|
|
907
|
-
|
|
996
|
+
E = o;
|
|
908
997
|
}
|
|
909
998
|
}
|
|
910
|
-
var
|
|
911
|
-
if (
|
|
912
|
-
n =
|
|
999
|
+
var a = n.first;
|
|
1000
|
+
if (a !== null) {
|
|
1001
|
+
n = a;
|
|
913
1002
|
continue;
|
|
914
1003
|
}
|
|
915
1004
|
}
|
|
@@ -919,24 +1008,24 @@ function Ds(e) {
|
|
|
919
1008
|
}
|
|
920
1009
|
return t;
|
|
921
1010
|
}
|
|
922
|
-
function
|
|
1011
|
+
function P(e) {
|
|
923
1012
|
var t;
|
|
924
|
-
for (En();
|
|
925
|
-
|
|
1013
|
+
for (En(); nt.length > 0; )
|
|
1014
|
+
Pt = !0, _r(), En();
|
|
926
1015
|
return (
|
|
927
1016
|
/** @type {T} */
|
|
928
1017
|
t
|
|
929
1018
|
);
|
|
930
1019
|
}
|
|
931
|
-
async function
|
|
932
|
-
await Promise.resolve(),
|
|
1020
|
+
async function mr() {
|
|
1021
|
+
await Promise.resolve(), P();
|
|
933
1022
|
}
|
|
934
|
-
function
|
|
1023
|
+
function _(e) {
|
|
935
1024
|
var t = e.f, n = (t & fe) !== 0;
|
|
936
|
-
if (
|
|
937
|
-
if (!
|
|
938
|
-
var r =
|
|
939
|
-
e.rv <
|
|
1025
|
+
if (E !== null && !ae) {
|
|
1026
|
+
if (!pe?.includes(e)) {
|
|
1027
|
+
var r = E.deps;
|
|
1028
|
+
e.rv < It && (e.rv = It, j === null && r !== null && r[J] === e ? J++ : j === null ? j = [e] : (!Ce || !j.includes(e)) && j.push(e));
|
|
940
1029
|
}
|
|
941
1030
|
} else if (n && /** @type {Derived} */
|
|
942
1031
|
e.deps === null && /** @type {Derived} */
|
|
@@ -945,12 +1034,12 @@ function p(e) {
|
|
|
945
1034
|
/** @type {Derived} */
|
|
946
1035
|
e
|
|
947
1036
|
), i = s.parent;
|
|
948
|
-
i !== null && (i.f &
|
|
1037
|
+
i !== null && (i.f & ee) === 0 && (s.f ^= ee);
|
|
949
1038
|
}
|
|
950
1039
|
return n && (s = /** @type {Derived} */
|
|
951
|
-
e,
|
|
1040
|
+
e, We(s) && ur(s)), ft && lt.has(e) ? lt.get(e) : e.v;
|
|
952
1041
|
}
|
|
953
|
-
function
|
|
1042
|
+
function Ft(e) {
|
|
954
1043
|
var t = ae;
|
|
955
1044
|
try {
|
|
956
1045
|
return ae = !0, e();
|
|
@@ -958,26 +1047,26 @@ function ut(e) {
|
|
|
958
1047
|
ae = t;
|
|
959
1048
|
}
|
|
960
1049
|
}
|
|
961
|
-
const
|
|
1050
|
+
const qs = -7169;
|
|
962
1051
|
function re(e, t) {
|
|
963
|
-
e.f = e.f &
|
|
1052
|
+
e.f = e.f & qs | t;
|
|
964
1053
|
}
|
|
965
|
-
function
|
|
966
|
-
x === null &&
|
|
1054
|
+
function Vs(e) {
|
|
1055
|
+
x === null && E === null && gs(e), E !== null && (E.f & ee) !== 0 && x === null && ps(), ft && hs(e);
|
|
967
1056
|
}
|
|
968
|
-
function
|
|
1057
|
+
function Ys(e, t) {
|
|
969
1058
|
var n = t.last;
|
|
970
1059
|
n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
|
|
971
1060
|
}
|
|
972
|
-
function
|
|
973
|
-
for (var s = x; s !== null && (s.f &
|
|
1061
|
+
function De(e, t, n, r = !0) {
|
|
1062
|
+
for (var s = x; s !== null && (s.f & Xn) !== 0; )
|
|
974
1063
|
s = s.parent;
|
|
975
1064
|
var i = {
|
|
976
|
-
ctx:
|
|
1065
|
+
ctx: A,
|
|
977
1066
|
deps: null,
|
|
978
1067
|
nodes_start: null,
|
|
979
1068
|
nodes_end: null,
|
|
980
|
-
f: e |
|
|
1069
|
+
f: e | ye,
|
|
981
1070
|
first: null,
|
|
982
1071
|
fn: t,
|
|
983
1072
|
last: null,
|
|
@@ -988,132 +1077,132 @@ function Me(e, t, n, r = !0) {
|
|
|
988
1077
|
transitions: null,
|
|
989
1078
|
wv: 0
|
|
990
1079
|
};
|
|
991
|
-
if (i.component_function =
|
|
1080
|
+
if (i.component_function = Le, n)
|
|
992
1081
|
try {
|
|
993
|
-
|
|
1082
|
+
Dt(i), i.f |= ss;
|
|
994
1083
|
} catch (u) {
|
|
995
1084
|
throw _e(i), u;
|
|
996
1085
|
}
|
|
997
|
-
else t !== null &&
|
|
998
|
-
var o = n && i.deps === null && i.first === null && i.nodes_start === null && i.teardown === null && (i.f & (
|
|
999
|
-
if (!o && r && (s !== null &&
|
|
1000
|
-
var
|
|
1086
|
+
else t !== null && At(i);
|
|
1087
|
+
var o = n && i.deps === null && i.first === null && i.nodes_start === null && i.teardown === null && (i.f & (Wn | bt)) === 0;
|
|
1088
|
+
if (!o && r && (s !== null && Ys(i, s), E !== null && (E.f & fe) !== 0)) {
|
|
1089
|
+
var a = (
|
|
1001
1090
|
/** @type {Derived} */
|
|
1002
|
-
|
|
1091
|
+
E
|
|
1003
1092
|
);
|
|
1004
|
-
(
|
|
1093
|
+
(a.effects ?? (a.effects = [])).push(i);
|
|
1005
1094
|
}
|
|
1006
1095
|
return i;
|
|
1007
1096
|
}
|
|
1008
|
-
function
|
|
1009
|
-
const t =
|
|
1010
|
-
return re(t,
|
|
1097
|
+
function Gs(e) {
|
|
1098
|
+
const t = De(Lt, null, !1);
|
|
1099
|
+
return re(t, V), t.teardown = e, t;
|
|
1011
1100
|
}
|
|
1012
|
-
function
|
|
1013
|
-
|
|
1014
|
-
var t = x !== null && (x.f &
|
|
1101
|
+
function Me(e) {
|
|
1102
|
+
Vs("$effect");
|
|
1103
|
+
var t = x !== null && (x.f & me) !== 0 && A !== null && !A.m;
|
|
1015
1104
|
if (ue(e, "name", {
|
|
1016
1105
|
value: "$effect"
|
|
1017
1106
|
}), t) {
|
|
1018
1107
|
var n = (
|
|
1019
1108
|
/** @type {ComponentContext} */
|
|
1020
|
-
|
|
1109
|
+
A
|
|
1021
1110
|
);
|
|
1022
1111
|
(n.e ?? (n.e = [])).push({
|
|
1023
1112
|
fn: e,
|
|
1024
1113
|
effect: x,
|
|
1025
|
-
reaction:
|
|
1114
|
+
reaction: E
|
|
1026
1115
|
});
|
|
1027
1116
|
} else {
|
|
1028
|
-
var r =
|
|
1117
|
+
var r = fn(e);
|
|
1029
1118
|
return r;
|
|
1030
1119
|
}
|
|
1031
1120
|
}
|
|
1032
|
-
function
|
|
1033
|
-
const t =
|
|
1121
|
+
function Js(e) {
|
|
1122
|
+
const t = De(Oe, e, !0);
|
|
1034
1123
|
return () => {
|
|
1035
1124
|
_e(t);
|
|
1036
1125
|
};
|
|
1037
1126
|
}
|
|
1038
|
-
function
|
|
1039
|
-
const t =
|
|
1127
|
+
function Xs(e) {
|
|
1128
|
+
const t = De(Oe, e, !0);
|
|
1040
1129
|
return (n = {}) => new Promise((r) => {
|
|
1041
1130
|
n.outro ? Kt(t, () => {
|
|
1042
1131
|
_e(t), r(void 0);
|
|
1043
1132
|
}) : (_e(t), r(void 0));
|
|
1044
1133
|
});
|
|
1045
1134
|
}
|
|
1046
|
-
function
|
|
1047
|
-
return
|
|
1135
|
+
function fn(e) {
|
|
1136
|
+
return De(Jn, e, !1);
|
|
1048
1137
|
}
|
|
1049
|
-
function
|
|
1050
|
-
return
|
|
1138
|
+
function yr(e) {
|
|
1139
|
+
return De(Lt, e, !0);
|
|
1051
1140
|
}
|
|
1052
|
-
function
|
|
1053
|
-
const r = t.map(n), s = () => e(...r.map(
|
|
1141
|
+
function rt(e, t = [], n = un) {
|
|
1142
|
+
const r = t.map(n), s = () => e(...r.map(_));
|
|
1054
1143
|
return ue(s, "name", {
|
|
1055
1144
|
value: "{expression}"
|
|
1056
|
-
}),
|
|
1145
|
+
}), dn(s);
|
|
1057
1146
|
}
|
|
1058
|
-
function
|
|
1059
|
-
return
|
|
1147
|
+
function dn(e, t = 0) {
|
|
1148
|
+
return De(Lt | on | t, e, !0);
|
|
1060
1149
|
}
|
|
1061
|
-
function
|
|
1062
|
-
return
|
|
1150
|
+
function kt(e, t = !0) {
|
|
1151
|
+
return De(Lt | me, e, !0, t);
|
|
1063
1152
|
}
|
|
1064
|
-
function
|
|
1153
|
+
function wr(e) {
|
|
1065
1154
|
var t = e.teardown;
|
|
1066
1155
|
if (t !== null) {
|
|
1067
|
-
const n =
|
|
1068
|
-
xn(!0),
|
|
1156
|
+
const n = ft, r = E;
|
|
1157
|
+
xn(!0), Se(null);
|
|
1069
1158
|
try {
|
|
1070
1159
|
t.call(null);
|
|
1071
1160
|
} finally {
|
|
1072
|
-
xn(n),
|
|
1161
|
+
xn(n), Se(r);
|
|
1073
1162
|
}
|
|
1074
1163
|
}
|
|
1075
1164
|
}
|
|
1076
|
-
function
|
|
1165
|
+
function br(e, t = !1) {
|
|
1077
1166
|
var n = e.first;
|
|
1078
1167
|
for (e.first = e.last = null; n !== null; ) {
|
|
1079
1168
|
var r = n.next;
|
|
1080
|
-
(n.f &
|
|
1169
|
+
(n.f & Oe) !== 0 ? n.parent = null : _e(n, t), n = r;
|
|
1081
1170
|
}
|
|
1082
1171
|
}
|
|
1083
|
-
function
|
|
1172
|
+
function Ws(e) {
|
|
1084
1173
|
for (var t = e.first; t !== null; ) {
|
|
1085
1174
|
var n = t.next;
|
|
1086
|
-
(t.f &
|
|
1175
|
+
(t.f & me) === 0 && _e(t), t = n;
|
|
1087
1176
|
}
|
|
1088
1177
|
}
|
|
1089
1178
|
function _e(e, t = !0) {
|
|
1090
1179
|
var n = !1;
|
|
1091
|
-
if ((t || (e.f &
|
|
1180
|
+
if ((t || (e.f & is) !== 0) && e.nodes_start !== null) {
|
|
1092
1181
|
for (var r = e.nodes_start, s = e.nodes_end; r !== null; ) {
|
|
1093
1182
|
var i = r === s ? null : (
|
|
1094
1183
|
/** @type {TemplateNode} */
|
|
1095
|
-
/* @__PURE__ */
|
|
1184
|
+
/* @__PURE__ */ Ue(r)
|
|
1096
1185
|
);
|
|
1097
1186
|
r.remove(), r = i;
|
|
1098
1187
|
}
|
|
1099
1188
|
n = !0;
|
|
1100
1189
|
}
|
|
1101
|
-
|
|
1190
|
+
br(e, t && !n), xt(e, 0), re(e, Ot);
|
|
1102
1191
|
var o = e.transitions;
|
|
1103
1192
|
if (o !== null)
|
|
1104
1193
|
for (const u of o)
|
|
1105
1194
|
u.stop();
|
|
1106
|
-
|
|
1107
|
-
var
|
|
1108
|
-
|
|
1195
|
+
wr(e);
|
|
1196
|
+
var a = e.parent;
|
|
1197
|
+
a !== null && a.first !== null && Er(e), e.component_function = null, e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes_start = e.nodes_end = null;
|
|
1109
1198
|
}
|
|
1110
|
-
function
|
|
1199
|
+
function Er(e) {
|
|
1111
1200
|
var t = e.parent, n = e.prev, r = e.next;
|
|
1112
1201
|
n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
|
|
1113
1202
|
}
|
|
1114
1203
|
function Kt(e, t) {
|
|
1115
1204
|
var n = [];
|
|
1116
|
-
|
|
1205
|
+
$r(e, n, !0), Hs(n, () => {
|
|
1117
1206
|
_e(e), t && t();
|
|
1118
1207
|
});
|
|
1119
1208
|
}
|
|
@@ -1126,40 +1215,40 @@ function Hs(e, t) {
|
|
|
1126
1215
|
} else
|
|
1127
1216
|
t();
|
|
1128
1217
|
}
|
|
1129
|
-
function
|
|
1130
|
-
if ((e.f &
|
|
1131
|
-
if (e.f ^=
|
|
1218
|
+
function $r(e, t, n) {
|
|
1219
|
+
if ((e.f & Ye) === 0) {
|
|
1220
|
+
if (e.f ^= Ye, e.transitions !== null)
|
|
1132
1221
|
for (const o of e.transitions)
|
|
1133
1222
|
(o.is_global || n) && t.push(o);
|
|
1134
1223
|
for (var r = e.first; r !== null; ) {
|
|
1135
|
-
var s = r.next, i = (r.f & ln) !== 0 || (r.f &
|
|
1136
|
-
|
|
1224
|
+
var s = r.next, i = (r.f & ln) !== 0 || (r.f & me) !== 0;
|
|
1225
|
+
$r(r, t, i ? n : !1), r = s;
|
|
1137
1226
|
}
|
|
1138
1227
|
}
|
|
1139
1228
|
}
|
|
1140
|
-
function
|
|
1141
|
-
|
|
1229
|
+
function Ln(e) {
|
|
1230
|
+
Cr(e, !0);
|
|
1142
1231
|
}
|
|
1143
|
-
function
|
|
1144
|
-
if ((e.f &
|
|
1145
|
-
e.f ^=
|
|
1232
|
+
function Cr(e, t) {
|
|
1233
|
+
if ((e.f & Ye) !== 0) {
|
|
1234
|
+
e.f ^= Ye, (e.f & V) === 0 && (e.f ^= V), We(e) && (re(e, ye), At(e));
|
|
1146
1235
|
for (var n = e.first; n !== null; ) {
|
|
1147
|
-
var r = n.next, s = (n.f & ln) !== 0 || (n.f &
|
|
1148
|
-
|
|
1236
|
+
var r = n.next, s = (n.f & ln) !== 0 || (n.f & me) !== 0;
|
|
1237
|
+
Cr(n, s ? t : !1), n = r;
|
|
1149
1238
|
}
|
|
1150
1239
|
if (e.transitions !== null)
|
|
1151
1240
|
for (const i of e.transitions)
|
|
1152
1241
|
(i.is_global || t) && i.in();
|
|
1153
1242
|
}
|
|
1154
1243
|
}
|
|
1155
|
-
const
|
|
1156
|
-
function
|
|
1244
|
+
const st = {}, Zs = /at (?:.+ \()?(.+):(\d+):(\d+)\)?$/, Ks = /@(.+):(\d+):(\d+)$/;
|
|
1245
|
+
function vn() {
|
|
1157
1246
|
const e = new Error().stack;
|
|
1158
1247
|
if (!e) return null;
|
|
1159
1248
|
const t = [];
|
|
1160
1249
|
for (const n of e.split(`
|
|
1161
1250
|
`)) {
|
|
1162
|
-
let r =
|
|
1251
|
+
let r = Zs.exec(n) ?? Ks.exec(n);
|
|
1163
1252
|
r && t.push({
|
|
1164
1253
|
file: r[1],
|
|
1165
1254
|
line: +r[2],
|
|
@@ -1168,11 +1257,11 @@ function dn() {
|
|
|
1168
1257
|
}
|
|
1169
1258
|
return t;
|
|
1170
1259
|
}
|
|
1171
|
-
function
|
|
1172
|
-
const e =
|
|
1260
|
+
function Pr() {
|
|
1261
|
+
const e = vn()?.slice(4);
|
|
1173
1262
|
if (!e) return null;
|
|
1174
1263
|
for (let t = 0; t < e.length; t++) {
|
|
1175
|
-
const n = e[t], r =
|
|
1264
|
+
const n = e[t], r = st[n.file];
|
|
1176
1265
|
if (!r) {
|
|
1177
1266
|
if (t === 0) return null;
|
|
1178
1267
|
continue;
|
|
@@ -1186,10 +1275,10 @@ function wr() {
|
|
|
1186
1275
|
}
|
|
1187
1276
|
return null;
|
|
1188
1277
|
}
|
|
1189
|
-
function
|
|
1278
|
+
function Sr() {
|
|
1190
1279
|
var t;
|
|
1191
|
-
const e =
|
|
1192
|
-
e && (
|
|
1280
|
+
const e = vn()?.[2];
|
|
1281
|
+
e && (st[t = e.file] ?? (st[t] = [])).push({
|
|
1193
1282
|
start: e,
|
|
1194
1283
|
// @ts-expect-error
|
|
1195
1284
|
end: null,
|
|
@@ -1197,14 +1286,14 @@ function Er() {
|
|
|
1197
1286
|
component: null
|
|
1198
1287
|
});
|
|
1199
1288
|
}
|
|
1200
|
-
function
|
|
1201
|
-
const t =
|
|
1289
|
+
function Tr(e) {
|
|
1290
|
+
const t = vn()?.[2];
|
|
1202
1291
|
if (t) {
|
|
1203
|
-
const n =
|
|
1292
|
+
const n = st[t.file], r = n[n.length - 1];
|
|
1204
1293
|
r.end = t, r.component = e;
|
|
1205
1294
|
}
|
|
1206
1295
|
}
|
|
1207
|
-
function
|
|
1296
|
+
function On(e, t) {
|
|
1208
1297
|
if (t.owners !== null)
|
|
1209
1298
|
for (; e; ) {
|
|
1210
1299
|
if (e.owners === null) {
|
|
@@ -1216,47 +1305,39 @@ function Fn(e, t) {
|
|
|
1216
1305
|
e = e.parent;
|
|
1217
1306
|
}
|
|
1218
1307
|
}
|
|
1219
|
-
function
|
|
1308
|
+
function Ir(e, t) {
|
|
1220
1309
|
return e.owners === null ? !0 : e.owners.has(t) || // This helps avoid false positives when using HMR, where the component function is replaced
|
|
1221
|
-
|
|
1310
|
+
R in t && [...e.owners].some(
|
|
1222
1311
|
(n) => (
|
|
1223
1312
|
/** @type {any} */
|
|
1224
|
-
n[
|
|
1313
|
+
n[R] === t[R]
|
|
1225
1314
|
)
|
|
1226
|
-
) || e.parent !== null &&
|
|
1315
|
+
) || e.parent !== null && Ir(e.parent, t);
|
|
1227
1316
|
}
|
|
1228
|
-
function
|
|
1229
|
-
return e?.owners?.values().next().value ??
|
|
1317
|
+
function xr(e) {
|
|
1318
|
+
return e?.owners?.values().next().value ?? xr(
|
|
1230
1319
|
/** @type {ProxyMetadata} */
|
|
1231
1320
|
e.parent
|
|
1232
1321
|
);
|
|
1233
1322
|
}
|
|
1234
|
-
function
|
|
1235
|
-
const t =
|
|
1236
|
-
if (t && !
|
|
1237
|
-
let n =
|
|
1238
|
-
n[
|
|
1239
|
-
}
|
|
1240
|
-
}
|
|
1241
|
-
function Pr(e) {
|
|
1242
|
-
{
|
|
1243
|
-
const t = new Error(`lifecycle_outside_component
|
|
1244
|
-
\`${e}(...)\` can only be used during component initialisation
|
|
1245
|
-
https://svelte.dev/e/lifecycle_outside_component`);
|
|
1246
|
-
throw t.name = "Svelte error", t;
|
|
1323
|
+
function ei(e) {
|
|
1324
|
+
const t = Pr();
|
|
1325
|
+
if (t && !Ir(e, t)) {
|
|
1326
|
+
let n = xr(e);
|
|
1327
|
+
n[R] !== t[R] ? Sn(t[R], n[R]) : Sn();
|
|
1247
1328
|
}
|
|
1248
1329
|
}
|
|
1249
|
-
let
|
|
1250
|
-
function
|
|
1251
|
-
|
|
1330
|
+
let A = null;
|
|
1331
|
+
function Bn(e) {
|
|
1332
|
+
A = e;
|
|
1252
1333
|
}
|
|
1253
|
-
let
|
|
1334
|
+
let Le = null;
|
|
1254
1335
|
function Un(e) {
|
|
1255
|
-
|
|
1336
|
+
Le = e;
|
|
1256
1337
|
}
|
|
1257
1338
|
function hn(e, t = !1, n) {
|
|
1258
|
-
var r =
|
|
1259
|
-
p:
|
|
1339
|
+
var r = A = {
|
|
1340
|
+
p: A,
|
|
1260
1341
|
c: null,
|
|
1261
1342
|
d: !1,
|
|
1262
1343
|
e: null,
|
|
@@ -1265,76 +1346,76 @@ function hn(e, t = !1, n) {
|
|
|
1265
1346
|
x: null,
|
|
1266
1347
|
l: null
|
|
1267
1348
|
};
|
|
1268
|
-
|
|
1349
|
+
Gs(() => {
|
|
1269
1350
|
r.d = !0;
|
|
1270
|
-
}),
|
|
1351
|
+
}), A.function = n, Le = n;
|
|
1271
1352
|
}
|
|
1272
|
-
function
|
|
1273
|
-
const t =
|
|
1353
|
+
function pn(e) {
|
|
1354
|
+
const t = A;
|
|
1274
1355
|
if (t !== null) {
|
|
1275
1356
|
e !== void 0 && (t.x = e);
|
|
1276
1357
|
const o = t.e;
|
|
1277
1358
|
if (o !== null) {
|
|
1278
|
-
var n = x, r =
|
|
1359
|
+
var n = x, r = E;
|
|
1279
1360
|
t.e = null;
|
|
1280
1361
|
try {
|
|
1281
1362
|
for (var s = 0; s < o.length; s++) {
|
|
1282
1363
|
var i = o[s];
|
|
1283
|
-
|
|
1364
|
+
Ge(i.effect), Se(i.reaction), fn(i.fn);
|
|
1284
1365
|
}
|
|
1285
1366
|
} finally {
|
|
1286
|
-
|
|
1367
|
+
Ge(n), Se(r);
|
|
1287
1368
|
}
|
|
1288
1369
|
}
|
|
1289
|
-
|
|
1370
|
+
A = t.p, Le = t.p?.function ?? null, t.m = !0;
|
|
1290
1371
|
}
|
|
1291
1372
|
return e || /** @type {T} */
|
|
1292
1373
|
{};
|
|
1293
1374
|
}
|
|
1294
|
-
function
|
|
1375
|
+
function Fr() {
|
|
1295
1376
|
return !0;
|
|
1296
1377
|
}
|
|
1297
|
-
const
|
|
1298
|
-
function
|
|
1299
|
-
e = e.replace(
|
|
1378
|
+
const ti = /\r/g;
|
|
1379
|
+
function ni(e) {
|
|
1380
|
+
e = e.replace(ti, "");
|
|
1300
1381
|
let t = 5381, n = e.length;
|
|
1301
1382
|
for (; n--; ) t = (t << 5) - t ^ e.charCodeAt(n);
|
|
1302
1383
|
return (t >>> 0).toString(36);
|
|
1303
1384
|
}
|
|
1304
|
-
const
|
|
1305
|
-
function
|
|
1306
|
-
return
|
|
1385
|
+
const ri = ["touchstart", "touchmove"];
|
|
1386
|
+
function si(e) {
|
|
1387
|
+
return ri.includes(e);
|
|
1307
1388
|
}
|
|
1308
|
-
function
|
|
1389
|
+
function ii(e) {
|
|
1309
1390
|
return e?.replace(/\//g, "/");
|
|
1310
1391
|
}
|
|
1311
|
-
var
|
|
1312
|
-
function
|
|
1313
|
-
var n =
|
|
1314
|
-
n || (n = /* @__PURE__ */ new Set(),
|
|
1392
|
+
var Dn = /* @__PURE__ */ new Map();
|
|
1393
|
+
function oi(e, t) {
|
|
1394
|
+
var n = Dn.get(e);
|
|
1395
|
+
n || (n = /* @__PURE__ */ new Set(), Dn.set(e, n)), n.add(t);
|
|
1315
1396
|
}
|
|
1316
|
-
function
|
|
1397
|
+
function Te(e, t, n) {
|
|
1317
1398
|
return (...r) => {
|
|
1318
1399
|
const s = e(...r);
|
|
1319
1400
|
var i = B ? s : s.nodeType === 11 ? s.firstChild : s;
|
|
1320
|
-
return
|
|
1401
|
+
return kr(i, t, n), s;
|
|
1321
1402
|
};
|
|
1322
1403
|
}
|
|
1323
|
-
function
|
|
1404
|
+
function li(e, t, n) {
|
|
1324
1405
|
e.__svelte_meta = {
|
|
1325
1406
|
loc: { file: t, line: n[0], column: n[1] }
|
|
1326
|
-
}, n[2] &&
|
|
1407
|
+
}, n[2] && kr(e.firstChild, t, n[2]);
|
|
1327
1408
|
}
|
|
1328
|
-
function
|
|
1409
|
+
function kr(e, t, n) {
|
|
1329
1410
|
for (var r = 0, s = 0; e && r < n.length; ) {
|
|
1330
1411
|
if (B && e.nodeType === 8) {
|
|
1331
1412
|
var i = (
|
|
1332
1413
|
/** @type {Comment} */
|
|
1333
1414
|
e
|
|
1334
1415
|
);
|
|
1335
|
-
i.data ===
|
|
1416
|
+
i.data === Rt || i.data === rn ? s += 1 : i.data[0] === sn && (s -= 1);
|
|
1336
1417
|
}
|
|
1337
|
-
s === 0 && e.nodeType === 1 &&
|
|
1418
|
+
s === 0 && e.nodeType === 1 && li(
|
|
1338
1419
|
/** @type {Element} */
|
|
1339
1420
|
e,
|
|
1340
1421
|
t,
|
|
@@ -1342,26 +1423,26 @@ function xr(e, t, n) {
|
|
|
1342
1423
|
), e = e.nextSibling;
|
|
1343
1424
|
}
|
|
1344
1425
|
}
|
|
1345
|
-
const
|
|
1346
|
-
function
|
|
1426
|
+
const ai = /* @__PURE__ */ new Set(), An = /* @__PURE__ */ new Set();
|
|
1427
|
+
function pt(e) {
|
|
1347
1428
|
var t = this, n = (
|
|
1348
1429
|
/** @type {Node} */
|
|
1349
1430
|
t.ownerDocument
|
|
1350
1431
|
), r = e.type, s = e.composedPath?.() || [], i = (
|
|
1351
1432
|
/** @type {null | Element} */
|
|
1352
1433
|
s[0] || e.target
|
|
1353
|
-
), o = 0,
|
|
1354
|
-
if (
|
|
1355
|
-
var u = s.indexOf(
|
|
1434
|
+
), o = 0, a = e.__root;
|
|
1435
|
+
if (a) {
|
|
1436
|
+
var u = s.indexOf(a);
|
|
1356
1437
|
if (u !== -1 && (t === document || t === /** @type {any} */
|
|
1357
1438
|
window)) {
|
|
1358
1439
|
e.__root = t;
|
|
1359
1440
|
return;
|
|
1360
1441
|
}
|
|
1361
|
-
var
|
|
1362
|
-
if (
|
|
1442
|
+
var l = s.indexOf(t);
|
|
1443
|
+
if (l === -1)
|
|
1363
1444
|
return;
|
|
1364
|
-
u <=
|
|
1445
|
+
u <= l && (o = u);
|
|
1365
1446
|
}
|
|
1366
1447
|
if (i = /** @type {Element} */
|
|
1367
1448
|
s[o] || e.target, i !== t) {
|
|
@@ -1371,11 +1452,11 @@ function vt(e) {
|
|
|
1371
1452
|
return i || n;
|
|
1372
1453
|
}
|
|
1373
1454
|
});
|
|
1374
|
-
var
|
|
1375
|
-
|
|
1455
|
+
var c = E, f = x;
|
|
1456
|
+
Se(null), Ge(null);
|
|
1376
1457
|
try {
|
|
1377
|
-
for (var
|
|
1378
|
-
var
|
|
1458
|
+
for (var d, v = []; i !== null; ) {
|
|
1459
|
+
var g = i.assignedSlot || i.parentNode || /** @type {any} */
|
|
1379
1460
|
i.host || null;
|
|
1380
1461
|
try {
|
|
1381
1462
|
var y = i["__" + r];
|
|
@@ -1383,31 +1464,31 @@ function vt(e) {
|
|
|
1383
1464
|
i.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1384
1465
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1385
1466
|
e.target === i))
|
|
1386
|
-
if (
|
|
1387
|
-
var [
|
|
1388
|
-
|
|
1467
|
+
if (an(y)) {
|
|
1468
|
+
var [b, ...M] = y;
|
|
1469
|
+
b.apply(i, [e, ...M]);
|
|
1389
1470
|
} else
|
|
1390
1471
|
y.call(i, e);
|
|
1391
|
-
} catch (
|
|
1392
|
-
|
|
1472
|
+
} catch (L) {
|
|
1473
|
+
d ? v.push(L) : d = L;
|
|
1393
1474
|
}
|
|
1394
|
-
if (e.cancelBubble ||
|
|
1475
|
+
if (e.cancelBubble || g === t || g === null)
|
|
1395
1476
|
break;
|
|
1396
|
-
i =
|
|
1477
|
+
i = g;
|
|
1397
1478
|
}
|
|
1398
|
-
if (
|
|
1399
|
-
for (let
|
|
1479
|
+
if (d) {
|
|
1480
|
+
for (let L of v)
|
|
1400
1481
|
queueMicrotask(() => {
|
|
1401
|
-
throw
|
|
1482
|
+
throw L;
|
|
1402
1483
|
});
|
|
1403
|
-
throw
|
|
1484
|
+
throw d;
|
|
1404
1485
|
}
|
|
1405
1486
|
} finally {
|
|
1406
|
-
e.__root = t, delete e.currentTarget,
|
|
1487
|
+
e.__root = t, delete e.currentTarget, Se(c), Ge(f);
|
|
1407
1488
|
}
|
|
1408
1489
|
}
|
|
1409
1490
|
}
|
|
1410
|
-
function
|
|
1491
|
+
function Rr(e) {
|
|
1411
1492
|
var t = document.createElement("template");
|
|
1412
1493
|
return t.innerHTML = e, t.content;
|
|
1413
1494
|
}
|
|
@@ -1419,23 +1500,23 @@ function ct(e, t) {
|
|
|
1419
1500
|
n.nodes_start === null && (n.nodes_start = e, n.nodes_end = t);
|
|
1420
1501
|
}
|
|
1421
1502
|
// @__NO_SIDE_EFFECTS__
|
|
1422
|
-
function
|
|
1423
|
-
var n = (t &
|
|
1503
|
+
function Ie(e, t) {
|
|
1504
|
+
var n = (t & rs) !== 0, r, s = !e.startsWith("<!>");
|
|
1424
1505
|
return () => {
|
|
1425
1506
|
if (B)
|
|
1426
|
-
return ct(
|
|
1427
|
-
r === void 0 && (r =
|
|
1428
|
-
/* @__PURE__ */
|
|
1507
|
+
return ct(O, null), O;
|
|
1508
|
+
r === void 0 && (r = Rr(s ? e : "<!>" + e), r = /** @type {Node} */
|
|
1509
|
+
/* @__PURE__ */ ut(r));
|
|
1429
1510
|
var i = (
|
|
1430
1511
|
/** @type {TemplateNode} */
|
|
1431
|
-
n ||
|
|
1512
|
+
n || cn ? document.importNode(r, !0) : r.cloneNode(!0)
|
|
1432
1513
|
);
|
|
1433
1514
|
return ct(i, i), i;
|
|
1434
1515
|
};
|
|
1435
1516
|
}
|
|
1436
|
-
function
|
|
1517
|
+
function he(e, t) {
|
|
1437
1518
|
if (B) {
|
|
1438
|
-
x.nodes_end =
|
|
1519
|
+
x.nodes_end = O, at();
|
|
1439
1520
|
return;
|
|
1440
1521
|
}
|
|
1441
1522
|
e !== null && e.before(
|
|
@@ -1443,103 +1524,103 @@ function pe(e, t) {
|
|
|
1443
1524
|
t
|
|
1444
1525
|
);
|
|
1445
1526
|
}
|
|
1446
|
-
function
|
|
1527
|
+
function ui(e, t) {
|
|
1447
1528
|
var n = t == null ? "" : typeof t == "object" ? t + "" : t;
|
|
1448
1529
|
n !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = n, e.nodeValue = n + "");
|
|
1449
1530
|
}
|
|
1450
1531
|
function Lr(e, t) {
|
|
1451
|
-
return
|
|
1532
|
+
return Or(e, t);
|
|
1452
1533
|
}
|
|
1453
|
-
function
|
|
1454
|
-
|
|
1455
|
-
const n = t.target, r = B, s =
|
|
1534
|
+
function ci(e, t) {
|
|
1535
|
+
Ht(), t.intro = t.intro ?? !1;
|
|
1536
|
+
const n = t.target, r = B, s = O;
|
|
1456
1537
|
try {
|
|
1457
1538
|
for (var i = (
|
|
1458
1539
|
/** @type {TemplateNode} */
|
|
1459
|
-
/* @__PURE__ */
|
|
1540
|
+
/* @__PURE__ */ ut(n)
|
|
1460
1541
|
); i && (i.nodeType !== 8 || /** @type {Comment} */
|
|
1461
|
-
i.data !==
|
|
1542
|
+
i.data !== Rt); )
|
|
1462
1543
|
i = /** @type {TemplateNode} */
|
|
1463
|
-
/* @__PURE__ */
|
|
1544
|
+
/* @__PURE__ */ Ue(i);
|
|
1464
1545
|
if (!i)
|
|
1465
|
-
throw
|
|
1466
|
-
|
|
1546
|
+
throw qe;
|
|
1547
|
+
Qe(!0), ge(
|
|
1467
1548
|
/** @type {Comment} */
|
|
1468
1549
|
i
|
|
1469
|
-
),
|
|
1470
|
-
const o =
|
|
1471
|
-
if (
|
|
1472
|
-
|
|
1473
|
-
throw
|
|
1474
|
-
return
|
|
1550
|
+
), at();
|
|
1551
|
+
const o = Or(e, { ...t, anchor: i });
|
|
1552
|
+
if (O === null || O.nodeType !== 8 || /** @type {Comment} */
|
|
1553
|
+
O.data !== sn)
|
|
1554
|
+
throw Bt(), qe;
|
|
1555
|
+
return Qe(!1), /** @type {Exports} */
|
|
1475
1556
|
o;
|
|
1476
1557
|
} catch (o) {
|
|
1477
|
-
if (o ===
|
|
1478
|
-
return t.recover === !1 && ms(),
|
|
1558
|
+
if (o === qe)
|
|
1559
|
+
return t.recover === !1 && ms(), Ht(), Ds(n), Qe(!1), Lr(e, t);
|
|
1479
1560
|
throw o;
|
|
1480
1561
|
} finally {
|
|
1481
|
-
|
|
1482
|
-
}
|
|
1483
|
-
}
|
|
1484
|
-
const
|
|
1485
|
-
function
|
|
1486
|
-
|
|
1487
|
-
var
|
|
1488
|
-
for (var
|
|
1489
|
-
var
|
|
1490
|
-
if (!
|
|
1491
|
-
|
|
1492
|
-
var
|
|
1493
|
-
t.addEventListener(
|
|
1494
|
-
var y =
|
|
1495
|
-
y === void 0 ? (document.addEventListener(
|
|
1562
|
+
Qe(r), ge(s);
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
const je = /* @__PURE__ */ new Map();
|
|
1566
|
+
function Or(e, { target: t, anchor: n, props: r = {}, events: s, context: i, intro: o = !0 }) {
|
|
1567
|
+
Ht();
|
|
1568
|
+
var a = /* @__PURE__ */ new Set(), u = (f) => {
|
|
1569
|
+
for (var d = 0; d < f.length; d++) {
|
|
1570
|
+
var v = f[d];
|
|
1571
|
+
if (!a.has(v)) {
|
|
1572
|
+
a.add(v);
|
|
1573
|
+
var g = si(v);
|
|
1574
|
+
t.addEventListener(v, pt, { passive: g });
|
|
1575
|
+
var y = je.get(v);
|
|
1576
|
+
y === void 0 ? (document.addEventListener(v, pt, { passive: g }), je.set(v, 1)) : je.set(v, y + 1);
|
|
1496
1577
|
}
|
|
1497
1578
|
}
|
|
1498
1579
|
};
|
|
1499
|
-
u(
|
|
1500
|
-
var
|
|
1501
|
-
var
|
|
1502
|
-
return
|
|
1580
|
+
u(ls(ai)), An.add(u);
|
|
1581
|
+
var l = void 0, c = Xs(() => {
|
|
1582
|
+
var f = n ?? t.appendChild(Ct());
|
|
1583
|
+
return kt(() => {
|
|
1503
1584
|
if (i) {
|
|
1504
1585
|
hn({});
|
|
1505
|
-
var
|
|
1586
|
+
var d = (
|
|
1506
1587
|
/** @type {ComponentContext} */
|
|
1507
|
-
|
|
1588
|
+
A
|
|
1508
1589
|
);
|
|
1509
|
-
|
|
1590
|
+
d.c = i;
|
|
1510
1591
|
}
|
|
1511
1592
|
s && (r.$$events = s), B && ct(
|
|
1512
1593
|
/** @type {TemplateNode} */
|
|
1513
|
-
|
|
1594
|
+
f,
|
|
1514
1595
|
null
|
|
1515
|
-
),
|
|
1596
|
+
), l = e(f, r) || {}, B && (x.nodes_end = O), i && pn();
|
|
1516
1597
|
}), () => {
|
|
1517
|
-
for (var
|
|
1518
|
-
t.removeEventListener(
|
|
1519
|
-
var
|
|
1598
|
+
for (var d of a) {
|
|
1599
|
+
t.removeEventListener(d, pt);
|
|
1600
|
+
var v = (
|
|
1520
1601
|
/** @type {number} */
|
|
1521
|
-
|
|
1602
|
+
je.get(d)
|
|
1522
1603
|
);
|
|
1523
|
-
--
|
|
1604
|
+
--v === 0 ? (document.removeEventListener(d, pt), je.delete(d)) : je.set(d, v);
|
|
1524
1605
|
}
|
|
1525
|
-
|
|
1606
|
+
An.delete(u), f !== n && f.parentNode?.removeChild(f);
|
|
1526
1607
|
};
|
|
1527
1608
|
});
|
|
1528
|
-
return en.set(
|
|
1609
|
+
return en.set(l, c), l;
|
|
1529
1610
|
}
|
|
1530
1611
|
let en = /* @__PURE__ */ new WeakMap();
|
|
1531
|
-
function
|
|
1612
|
+
function fi(e, t) {
|
|
1532
1613
|
const n = en.get(e);
|
|
1533
|
-
return n ? (en.delete(e), n(t)) : (
|
|
1614
|
+
return n ? (en.delete(e), n(t)) : (Os(), Promise.resolve());
|
|
1534
1615
|
}
|
|
1535
|
-
function
|
|
1536
|
-
e &&
|
|
1616
|
+
function Br(e) {
|
|
1617
|
+
e && ds(e[R] ?? "a component", e.name);
|
|
1537
1618
|
}
|
|
1538
|
-
function
|
|
1539
|
-
const e =
|
|
1619
|
+
function Ur() {
|
|
1620
|
+
const e = A?.function;
|
|
1540
1621
|
function t(n) {
|
|
1541
|
-
const r =
|
|
1542
|
-
|
|
1622
|
+
const r = Pr()?.[R] ?? "Something";
|
|
1623
|
+
fs(r, n, e[R]);
|
|
1543
1624
|
}
|
|
1544
1625
|
return {
|
|
1545
1626
|
$destroy: () => t("$destroy()"),
|
|
@@ -1547,79 +1628,79 @@ function Fr() {
|
|
|
1547
1628
|
$set: () => t("$set(...)")
|
|
1548
1629
|
};
|
|
1549
1630
|
}
|
|
1550
|
-
function
|
|
1551
|
-
B && n === 0 &&
|
|
1552
|
-
var s = e, i = null, o = null,
|
|
1553
|
-
const
|
|
1554
|
-
|
|
1555
|
-
},
|
|
1556
|
-
if (
|
|
1557
|
-
let
|
|
1631
|
+
function it(e, t, [n, r] = [0, 0]) {
|
|
1632
|
+
B && n === 0 && at();
|
|
1633
|
+
var s = e, i = null, o = null, a = q, u = n > 0 ? ln : 0, l = !1;
|
|
1634
|
+
const c = (d, v = !0) => {
|
|
1635
|
+
l = !0, f(v, d);
|
|
1636
|
+
}, f = (d, v) => {
|
|
1637
|
+
if (a === (a = d)) return;
|
|
1638
|
+
let g = !1;
|
|
1558
1639
|
if (B && r !== -1) {
|
|
1559
1640
|
if (n === 0) {
|
|
1560
|
-
const
|
|
1641
|
+
const b = (
|
|
1561
1642
|
/** @type {Comment} */
|
|
1562
1643
|
s.data
|
|
1563
1644
|
);
|
|
1564
|
-
|
|
1645
|
+
b === Rt ? r = 0 : b === rn ? r = 1 / 0 : (r = parseInt(b.substring(1)), r !== r && (r = a ? 1 / 0 : -1));
|
|
1565
1646
|
}
|
|
1566
1647
|
const y = r > n;
|
|
1567
|
-
!!
|
|
1648
|
+
!!a === y && (s = Bs(), ge(s), Qe(!1), g = !0, r = -1);
|
|
1568
1649
|
}
|
|
1569
|
-
|
|
1650
|
+
a ? (i ? Ln(i) : v && (i = kt(() => v(s))), o && Kt(o, () => {
|
|
1570
1651
|
o = null;
|
|
1571
|
-
})) : (o ?
|
|
1652
|
+
})) : (o ? Ln(o) : v && (o = kt(() => v(s, [n + 1, r]))), i && Kt(i, () => {
|
|
1572
1653
|
i = null;
|
|
1573
|
-
})),
|
|
1654
|
+
})), g && Qe(!0);
|
|
1574
1655
|
};
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
}, u), B && (s =
|
|
1656
|
+
dn(() => {
|
|
1657
|
+
l = !1, t(c), l || f(null, null);
|
|
1658
|
+
}, u), B && (s = O);
|
|
1578
1659
|
}
|
|
1579
|
-
function
|
|
1580
|
-
if (!t || t ===
|
|
1660
|
+
function di(e, t, n) {
|
|
1661
|
+
if (!t || t === ni(String(n ?? ""))) return;
|
|
1581
1662
|
let r;
|
|
1582
1663
|
const s = e.__svelte_meta?.loc;
|
|
1583
|
-
s ? r = `near ${s.file}:${s.line}:${s.column}` :
|
|
1664
|
+
s ? r = `near ${s.file}:${s.line}:${s.column}` : Le?.[R] && (r = `in ${Le[R]}`), Ls(ii(r));
|
|
1584
1665
|
}
|
|
1585
|
-
function
|
|
1586
|
-
var i = e, o = "",
|
|
1587
|
-
|
|
1666
|
+
function Nn(e, t, n, r, s) {
|
|
1667
|
+
var i = e, o = "", a;
|
|
1668
|
+
dn(() => {
|
|
1588
1669
|
if (o === (o = t() ?? "")) {
|
|
1589
|
-
B &&
|
|
1670
|
+
B && at();
|
|
1590
1671
|
return;
|
|
1591
1672
|
}
|
|
1592
|
-
|
|
1673
|
+
a !== void 0 && (_e(a), a = void 0), o !== "" && (a = kt(() => {
|
|
1593
1674
|
if (B) {
|
|
1594
1675
|
for (var u = (
|
|
1595
1676
|
/** @type {Comment} */
|
|
1596
|
-
|
|
1597
|
-
),
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
/* @__PURE__ */
|
|
1601
|
-
if (
|
|
1602
|
-
throw
|
|
1603
|
-
|
|
1677
|
+
O.data
|
|
1678
|
+
), l = at(), c = l; l !== null && (l.nodeType !== 8 || /** @type {Comment} */
|
|
1679
|
+
l.data !== ""); )
|
|
1680
|
+
c = l, l = /** @type {TemplateNode} */
|
|
1681
|
+
/* @__PURE__ */ Ue(l);
|
|
1682
|
+
if (l === null)
|
|
1683
|
+
throw Bt(), qe;
|
|
1684
|
+
di(
|
|
1604
1685
|
/** @type {Element} */
|
|
1605
|
-
|
|
1686
|
+
l.parentNode,
|
|
1606
1687
|
u,
|
|
1607
1688
|
o
|
|
1608
|
-
), ct(
|
|
1689
|
+
), ct(O, c), i = ge(l);
|
|
1609
1690
|
return;
|
|
1610
1691
|
}
|
|
1611
|
-
var
|
|
1692
|
+
var f = o + "", d = Rr(f);
|
|
1612
1693
|
ct(
|
|
1613
1694
|
/** @type {TemplateNode} */
|
|
1614
|
-
/* @__PURE__ */
|
|
1695
|
+
/* @__PURE__ */ ut(d),
|
|
1615
1696
|
/** @type {TemplateNode} */
|
|
1616
|
-
|
|
1617
|
-
), i.before(
|
|
1697
|
+
d.lastChild
|
|
1698
|
+
), i.before(d);
|
|
1618
1699
|
}));
|
|
1619
1700
|
});
|
|
1620
1701
|
}
|
|
1621
|
-
function
|
|
1622
|
-
|
|
1702
|
+
function Dr(e, t) {
|
|
1703
|
+
nr(() => {
|
|
1623
1704
|
var n = e.getRootNode(), r = (
|
|
1624
1705
|
/** @type {ShadowRoot} */
|
|
1625
1706
|
n.host ? (
|
|
@@ -1633,35 +1714,35 @@ function Or(e, t) {
|
|
|
1633
1714
|
);
|
|
1634
1715
|
if (!r.querySelector("#" + t.hash)) {
|
|
1635
1716
|
const s = document.createElement("style");
|
|
1636
|
-
s.id = t.hash, s.textContent = t.code, r.appendChild(s),
|
|
1717
|
+
s.id = t.hash, s.textContent = t.code, r.appendChild(s), oi(t.hash, s);
|
|
1637
1718
|
}
|
|
1638
1719
|
});
|
|
1639
1720
|
}
|
|
1640
|
-
function
|
|
1721
|
+
function vi(e, t, n) {
|
|
1641
1722
|
var r = e == null ? "" : "" + e;
|
|
1642
1723
|
return t && (r = r ? r + " " + t : t), r === "" ? null : r;
|
|
1643
1724
|
}
|
|
1644
|
-
function
|
|
1725
|
+
function ze(e, t, n, r, s, i) {
|
|
1645
1726
|
var o = e.__className;
|
|
1646
1727
|
if (B || o !== n || o === void 0) {
|
|
1647
|
-
var
|
|
1648
|
-
(!B ||
|
|
1728
|
+
var a = vi(n, r);
|
|
1729
|
+
(!B || a !== e.getAttribute("class")) && (a == null ? e.removeAttribute("class") : e.className = a), e.__className = n;
|
|
1649
1730
|
}
|
|
1650
1731
|
return i;
|
|
1651
1732
|
}
|
|
1652
|
-
function
|
|
1653
|
-
return e === t || e?.[
|
|
1733
|
+
function jn(e, t) {
|
|
1734
|
+
return e === t || e?.[Pe] === t;
|
|
1654
1735
|
}
|
|
1655
|
-
function
|
|
1656
|
-
return
|
|
1736
|
+
function hi(e = {}, t, n, r) {
|
|
1737
|
+
return fn(() => {
|
|
1657
1738
|
var s, i;
|
|
1658
|
-
return
|
|
1659
|
-
s = i, i = [],
|
|
1660
|
-
e !== n(...i) && (t(e, ...i), s &&
|
|
1739
|
+
return yr(() => {
|
|
1740
|
+
s = i, i = [], Ft(() => {
|
|
1741
|
+
e !== n(...i) && (t(e, ...i), s && jn(n(...s), e) && t(null, ...s));
|
|
1661
1742
|
});
|
|
1662
1743
|
}), () => {
|
|
1663
|
-
|
|
1664
|
-
i &&
|
|
1744
|
+
nr(() => {
|
|
1745
|
+
i && jn(n(...i), e) && t(null, ...i);
|
|
1665
1746
|
});
|
|
1666
1747
|
};
|
|
1667
1748
|
}), e;
|
|
@@ -1676,7 +1757,7 @@ function ui(e = {}, t, n, r) {
|
|
|
1676
1757
|
get: () => {
|
|
1677
1758
|
if (n !== void 0)
|
|
1678
1759
|
return n;
|
|
1679
|
-
|
|
1760
|
+
ws(t);
|
|
1680
1761
|
},
|
|
1681
1762
|
set: (r) => {
|
|
1682
1763
|
n = r;
|
|
@@ -1684,86 +1765,74 @@ function ui(e = {}, t, n, r) {
|
|
|
1684
1765
|
});
|
|
1685
1766
|
}
|
|
1686
1767
|
};
|
|
1687
|
-
var
|
|
1768
|
+
var ji = e;
|
|
1688
1769
|
e("$state"), e("$effect"), e("$derived"), e("$inspect"), e("$props"), e("$bindable");
|
|
1689
1770
|
}
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
if (typeof t == "function") return (
|
|
1694
|
-
/** @type {() => void} */
|
|
1695
|
-
t
|
|
1696
|
-
);
|
|
1697
|
-
});
|
|
1698
|
-
}
|
|
1699
|
-
function fi(e) {
|
|
1700
|
-
D === null && Pr("onDestroy"), ci(() => () => ut(e));
|
|
1701
|
-
}
|
|
1702
|
-
let mt = !1;
|
|
1703
|
-
function di(e) {
|
|
1704
|
-
var t = mt;
|
|
1771
|
+
let gt = !1;
|
|
1772
|
+
function pi(e) {
|
|
1773
|
+
var t = gt;
|
|
1705
1774
|
try {
|
|
1706
|
-
return
|
|
1775
|
+
return gt = !1, [e(), gt];
|
|
1707
1776
|
} finally {
|
|
1708
|
-
|
|
1777
|
+
gt = t;
|
|
1709
1778
|
}
|
|
1710
1779
|
}
|
|
1711
|
-
function
|
|
1780
|
+
function Qn(e) {
|
|
1712
1781
|
return e.ctx?.d ?? !1;
|
|
1713
1782
|
}
|
|
1714
|
-
function
|
|
1715
|
-
var s = (n &
|
|
1716
|
-
o ? [
|
|
1783
|
+
function I(e, t, n, r) {
|
|
1784
|
+
var s = (n & Kr) !== 0, i = !0, o = (n & ts) !== 0, a = (n & ns) !== 0, u = !1, l;
|
|
1785
|
+
o ? [l, u] = pi(() => (
|
|
1717
1786
|
/** @type {V} */
|
|
1718
1787
|
e[t]
|
|
1719
|
-
)) :
|
|
1788
|
+
)) : l = /** @type {V} */
|
|
1720
1789
|
e[t];
|
|
1721
|
-
var
|
|
1790
|
+
var c = Pe in e || Hn in e, f = o && (ke(e, t)?.set ?? (c && t in e && (($) => e[t] = $))) || void 0, d = (
|
|
1722
1791
|
/** @type {V} */
|
|
1723
1792
|
r
|
|
1724
|
-
),
|
|
1793
|
+
), v = !0, g = !1, y = () => (g = !0, v && (v = !1, a ? d = Ft(
|
|
1725
1794
|
/** @type {() => V} */
|
|
1726
1795
|
r
|
|
1727
|
-
) :
|
|
1728
|
-
r),
|
|
1729
|
-
|
|
1730
|
-
var
|
|
1731
|
-
if (
|
|
1732
|
-
var
|
|
1796
|
+
) : d = /** @type {V} */
|
|
1797
|
+
r), d);
|
|
1798
|
+
l === void 0 && r !== void 0 && (f && i && ys(t), l = y(), f && f(l));
|
|
1799
|
+
var b;
|
|
1800
|
+
if (b = () => {
|
|
1801
|
+
var $ = (
|
|
1733
1802
|
/** @type {V} */
|
|
1734
1803
|
e[t]
|
|
1735
1804
|
);
|
|
1736
|
-
return
|
|
1737
|
-
}, (n &
|
|
1738
|
-
return
|
|
1739
|
-
if (
|
|
1740
|
-
var
|
|
1741
|
-
return function(
|
|
1742
|
-
return arguments.length > 0 ? ((!
|
|
1805
|
+
return $ === void 0 ? y() : (v = !0, g = !1, $);
|
|
1806
|
+
}, (n & es) === 0)
|
|
1807
|
+
return b;
|
|
1808
|
+
if (f) {
|
|
1809
|
+
var M = e.$$legacy;
|
|
1810
|
+
return function($, U) {
|
|
1811
|
+
return arguments.length > 0 ? ((!U || M || u) && f(U ? b() : $), $) : b();
|
|
1743
1812
|
};
|
|
1744
1813
|
}
|
|
1745
|
-
var
|
|
1746
|
-
var
|
|
1747
|
-
return
|
|
1814
|
+
var L = !1, N = /* @__PURE__ */ or(l), F = /* @__PURE__ */ un(() => {
|
|
1815
|
+
var $ = b(), U = _(N);
|
|
1816
|
+
return L ? (L = !1, U) : N.v = $;
|
|
1748
1817
|
});
|
|
1749
|
-
return o &&
|
|
1818
|
+
return o && _(F), s || (F.equals = sr), function($, U) {
|
|
1750
1819
|
if (arguments.length > 0) {
|
|
1751
|
-
const
|
|
1752
|
-
if (!
|
|
1753
|
-
if (
|
|
1754
|
-
return
|
|
1755
|
-
|
|
1820
|
+
const W = U ? _(F) : o ? Fe($) : $;
|
|
1821
|
+
if (!F.equals(W)) {
|
|
1822
|
+
if (L = !0, w(N, W), g && d !== void 0 && (d = W), Qn(F))
|
|
1823
|
+
return $;
|
|
1824
|
+
Ft(() => _(F));
|
|
1756
1825
|
}
|
|
1757
|
-
return
|
|
1826
|
+
return $;
|
|
1758
1827
|
}
|
|
1759
|
-
return
|
|
1828
|
+
return Qn(F) ? F.v : _(F);
|
|
1760
1829
|
};
|
|
1761
1830
|
}
|
|
1762
|
-
function
|
|
1763
|
-
return new
|
|
1831
|
+
function gi(e) {
|
|
1832
|
+
return new _i(e);
|
|
1764
1833
|
}
|
|
1765
|
-
var
|
|
1766
|
-
class
|
|
1834
|
+
var ve, K;
|
|
1835
|
+
class _i {
|
|
1767
1836
|
/**
|
|
1768
1837
|
* @param {ComponentConstructorOptions & {
|
|
1769
1838
|
* component: any;
|
|
@@ -1771,56 +1840,56 @@ class gi {
|
|
|
1771
1840
|
*/
|
|
1772
1841
|
constructor(t) {
|
|
1773
1842
|
/** @type {any} */
|
|
1774
|
-
qt(this,
|
|
1843
|
+
qt(this, ve);
|
|
1775
1844
|
/** @type {Record<string, any>} */
|
|
1776
|
-
qt(this,
|
|
1845
|
+
qt(this, K);
|
|
1777
1846
|
var n = /* @__PURE__ */ new Map(), r = (i, o) => {
|
|
1778
|
-
var
|
|
1779
|
-
return n.set(i,
|
|
1847
|
+
var a = /* @__PURE__ */ or(o);
|
|
1848
|
+
return n.set(i, a), a;
|
|
1780
1849
|
};
|
|
1781
1850
|
const s = new Proxy(
|
|
1782
1851
|
{ ...t.props || {}, $$events: {} },
|
|
1783
1852
|
{
|
|
1784
1853
|
get(i, o) {
|
|
1785
|
-
return
|
|
1854
|
+
return _(n.get(o) ?? r(o, Reflect.get(i, o)));
|
|
1786
1855
|
},
|
|
1787
1856
|
has(i, o) {
|
|
1788
|
-
return o ===
|
|
1857
|
+
return o === Hn ? !0 : (_(n.get(o) ?? r(o, Reflect.get(i, o))), Reflect.has(i, o));
|
|
1789
1858
|
},
|
|
1790
|
-
set(i, o,
|
|
1791
|
-
return
|
|
1859
|
+
set(i, o, a) {
|
|
1860
|
+
return w(n.get(o) ?? r(o, a), a), Reflect.set(i, o, a);
|
|
1792
1861
|
}
|
|
1793
1862
|
}
|
|
1794
1863
|
);
|
|
1795
|
-
Vt(this,
|
|
1864
|
+
Vt(this, K, (t.hydrate ? ci : Lr)(t.component, {
|
|
1796
1865
|
target: t.target,
|
|
1797
1866
|
anchor: t.anchor,
|
|
1798
1867
|
props: s,
|
|
1799
1868
|
context: t.context,
|
|
1800
1869
|
intro: t.intro ?? !1,
|
|
1801
1870
|
recover: t.recover
|
|
1802
|
-
})), (!t?.props?.$$host || t.sync === !1) &&
|
|
1803
|
-
for (const i of Object.keys(
|
|
1871
|
+
})), (!t?.props?.$$host || t.sync === !1) && P(), Vt(this, ve, s.$$events);
|
|
1872
|
+
for (const i of Object.keys(z(this, K)))
|
|
1804
1873
|
i === "$set" || i === "$destroy" || i === "$on" || ue(this, i, {
|
|
1805
1874
|
get() {
|
|
1806
|
-
return
|
|
1875
|
+
return z(this, K)[i];
|
|
1807
1876
|
},
|
|
1808
1877
|
/** @param {any} value */
|
|
1809
1878
|
set(o) {
|
|
1810
|
-
|
|
1879
|
+
z(this, K)[i] = o;
|
|
1811
1880
|
},
|
|
1812
1881
|
enumerable: !0
|
|
1813
1882
|
});
|
|
1814
|
-
|
|
1883
|
+
z(this, K).$set = /** @param {Record<string, any>} next */
|
|
1815
1884
|
(i) => {
|
|
1816
1885
|
Object.assign(s, i);
|
|
1817
|
-
},
|
|
1818
|
-
|
|
1886
|
+
}, z(this, K).$destroy = () => {
|
|
1887
|
+
fi(z(this, K));
|
|
1819
1888
|
};
|
|
1820
1889
|
}
|
|
1821
1890
|
/** @param {Record<string, any>} props */
|
|
1822
1891
|
$set(t) {
|
|
1823
|
-
|
|
1892
|
+
z(this, K).$set(t);
|
|
1824
1893
|
}
|
|
1825
1894
|
/**
|
|
1826
1895
|
* @param {string} event
|
|
@@ -1828,22 +1897,22 @@ class gi {
|
|
|
1828
1897
|
* @returns {any}
|
|
1829
1898
|
*/
|
|
1830
1899
|
$on(t, n) {
|
|
1831
|
-
|
|
1900
|
+
z(this, ve)[t] = z(this, ve)[t] || [];
|
|
1832
1901
|
const r = (...s) => n.call(this, ...s);
|
|
1833
|
-
return
|
|
1834
|
-
|
|
1902
|
+
return z(this, ve)[t].push(r), () => {
|
|
1903
|
+
z(this, ve)[t] = z(this, ve)[t].filter(
|
|
1835
1904
|
/** @param {any} fn */
|
|
1836
1905
|
(s) => s !== r
|
|
1837
1906
|
);
|
|
1838
1907
|
};
|
|
1839
1908
|
}
|
|
1840
1909
|
$destroy() {
|
|
1841
|
-
|
|
1910
|
+
z(this, K).$destroy();
|
|
1842
1911
|
}
|
|
1843
1912
|
}
|
|
1844
|
-
|
|
1845
|
-
let
|
|
1846
|
-
typeof HTMLElement == "function" && (
|
|
1913
|
+
ve = new WeakMap(), K = new WeakMap();
|
|
1914
|
+
let Ar;
|
|
1915
|
+
typeof HTMLElement == "function" && (Ar = class extends HTMLElement {
|
|
1847
1916
|
/**
|
|
1848
1917
|
* @param {*} $$componentCtor
|
|
1849
1918
|
* @param {*} $$slots
|
|
@@ -1852,25 +1921,25 @@ typeof HTMLElement == "function" && (Ur = class extends HTMLElement {
|
|
|
1852
1921
|
constructor(t, n, r) {
|
|
1853
1922
|
super();
|
|
1854
1923
|
/** The Svelte component constructor */
|
|
1855
|
-
|
|
1924
|
+
te(this, "$$ctor");
|
|
1856
1925
|
/** Slots */
|
|
1857
|
-
|
|
1926
|
+
te(this, "$$s");
|
|
1858
1927
|
/** @type {any} The Svelte component instance */
|
|
1859
|
-
|
|
1928
|
+
te(this, "$$c");
|
|
1860
1929
|
/** Whether or not the custom element is connected */
|
|
1861
|
-
|
|
1930
|
+
te(this, "$$cn", !1);
|
|
1862
1931
|
/** @type {Record<string, any>} Component props data */
|
|
1863
|
-
|
|
1932
|
+
te(this, "$$d", {});
|
|
1864
1933
|
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
1865
|
-
|
|
1934
|
+
te(this, "$$r", !1);
|
|
1866
1935
|
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
1867
|
-
|
|
1936
|
+
te(this, "$$p_d", {});
|
|
1868
1937
|
/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
|
|
1869
|
-
|
|
1938
|
+
te(this, "$$l", {});
|
|
1870
1939
|
/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
|
|
1871
|
-
|
|
1940
|
+
te(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
1872
1941
|
/** @type {any} The managed render effect for reflecting attributes */
|
|
1873
|
-
|
|
1942
|
+
te(this, "$$me");
|
|
1874
1943
|
this.$$ctor = t, this.$$s = n, r && this.attachShadow({ mode: "open" });
|
|
1875
1944
|
}
|
|
1876
1945
|
/**
|
|
@@ -1900,23 +1969,23 @@ typeof HTMLElement == "function" && (Ur = class extends HTMLElement {
|
|
|
1900
1969
|
if (this.$$cn = !0, !this.$$c) {
|
|
1901
1970
|
let n = function(i) {
|
|
1902
1971
|
return (o) => {
|
|
1903
|
-
const
|
|
1904
|
-
i !== "default" && (
|
|
1972
|
+
const a = document.createElement("slot");
|
|
1973
|
+
i !== "default" && (a.name = i), he(o, a);
|
|
1905
1974
|
};
|
|
1906
1975
|
};
|
|
1907
1976
|
var t = n;
|
|
1908
1977
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
1909
1978
|
return;
|
|
1910
|
-
const r = {}, s =
|
|
1979
|
+
const r = {}, s = mi(this);
|
|
1911
1980
|
for (const i of this.$$s)
|
|
1912
1981
|
i in s && (i === "default" && !this.$$d.children ? (this.$$d.children = n(i), r.default = !0) : r[i] = n(i));
|
|
1913
1982
|
for (const i of this.attributes) {
|
|
1914
1983
|
const o = this.$$g_p(i.name);
|
|
1915
|
-
o in this.$$d || (this.$$d[o] =
|
|
1984
|
+
o in this.$$d || (this.$$d[o] = wt(o, i.value, this.$$p_d, "toProp"));
|
|
1916
1985
|
}
|
|
1917
1986
|
for (const i in this.$$p_d)
|
|
1918
1987
|
!(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
|
|
1919
|
-
this.$$c =
|
|
1988
|
+
this.$$c = gi({
|
|
1920
1989
|
component: this.$$ctor,
|
|
1921
1990
|
target: this.shadowRoot || this,
|
|
1922
1991
|
props: {
|
|
@@ -1924,13 +1993,13 @@ typeof HTMLElement == "function" && (Ur = class extends HTMLElement {
|
|
|
1924
1993
|
$$slots: r,
|
|
1925
1994
|
$$host: this
|
|
1926
1995
|
}
|
|
1927
|
-
}), this.$$me =
|
|
1928
|
-
|
|
1996
|
+
}), this.$$me = Js(() => {
|
|
1997
|
+
yr(() => {
|
|
1929
1998
|
this.$$r = !0;
|
|
1930
1999
|
for (const i of $t(this.$$c)) {
|
|
1931
2000
|
if (!this.$$p_d[i]?.reflect) continue;
|
|
1932
2001
|
this.$$d[i] = this.$$c[i];
|
|
1933
|
-
const o =
|
|
2002
|
+
const o = wt(
|
|
1934
2003
|
i,
|
|
1935
2004
|
this.$$d[i],
|
|
1936
2005
|
this.$$p_d,
|
|
@@ -1943,8 +2012,8 @@ typeof HTMLElement == "function" && (Ur = class extends HTMLElement {
|
|
|
1943
2012
|
});
|
|
1944
2013
|
for (const i in this.$$l)
|
|
1945
2014
|
for (const o of this.$$l[i]) {
|
|
1946
|
-
const
|
|
1947
|
-
this.$$l_u.set(o,
|
|
2015
|
+
const a = this.$$c.$on(i, o);
|
|
2016
|
+
this.$$l_u.set(o, a);
|
|
1948
2017
|
}
|
|
1949
2018
|
this.$$l = {};
|
|
1950
2019
|
}
|
|
@@ -1957,7 +2026,7 @@ typeof HTMLElement == "function" && (Ur = class extends HTMLElement {
|
|
|
1957
2026
|
* @param {string} newValue
|
|
1958
2027
|
*/
|
|
1959
2028
|
attributeChangedCallback(t, n, r) {
|
|
1960
|
-
this.$$r || (t = this.$$g_p(t), this.$$d[t] =
|
|
2029
|
+
this.$$r || (t = this.$$g_p(t), this.$$d[t] = wt(t, r, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
|
|
1961
2030
|
}
|
|
1962
2031
|
disconnectedCallback() {
|
|
1963
2032
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -1973,7 +2042,7 @@ typeof HTMLElement == "function" && (Ur = class extends HTMLElement {
|
|
|
1973
2042
|
) || t;
|
|
1974
2043
|
}
|
|
1975
2044
|
});
|
|
1976
|
-
function
|
|
2045
|
+
function wt(e, t, n, r) {
|
|
1977
2046
|
const s = n[e]?.type;
|
|
1978
2047
|
if (t = s === "Boolean" && typeof t != "boolean" ? t != null : t, !r || !n[e])
|
|
1979
2048
|
return t;
|
|
@@ -2003,7 +2072,7 @@ function bt(e, t, n, r) {
|
|
|
2003
2072
|
return t;
|
|
2004
2073
|
}
|
|
2005
2074
|
}
|
|
2006
|
-
function
|
|
2075
|
+
function mi(e) {
|
|
2007
2076
|
const t = {};
|
|
2008
2077
|
return e.childNodes.forEach((n) => {
|
|
2009
2078
|
t[
|
|
@@ -2012,64 +2081,76 @@ function pi(e) {
|
|
|
2012
2081
|
] = !0;
|
|
2013
2082
|
}), t;
|
|
2014
2083
|
}
|
|
2015
|
-
function
|
|
2016
|
-
let o = class extends
|
|
2084
|
+
function Nr(e, t, n, r, s, i) {
|
|
2085
|
+
let o = class extends Ar {
|
|
2017
2086
|
constructor() {
|
|
2018
2087
|
super(e, n, s), this.$$p_d = t;
|
|
2019
2088
|
}
|
|
2020
2089
|
static get observedAttributes() {
|
|
2021
2090
|
return $t(t).map(
|
|
2022
|
-
(
|
|
2091
|
+
(a) => (t[a].attribute || a).toLowerCase()
|
|
2023
2092
|
);
|
|
2024
2093
|
}
|
|
2025
2094
|
};
|
|
2026
|
-
return $t(t).forEach((
|
|
2027
|
-
ue(o.prototype,
|
|
2095
|
+
return $t(t).forEach((a) => {
|
|
2096
|
+
ue(o.prototype, a, {
|
|
2028
2097
|
get() {
|
|
2029
|
-
return this.$$c &&
|
|
2098
|
+
return this.$$c && a in this.$$c ? this.$$c[a] : this.$$d[a];
|
|
2030
2099
|
},
|
|
2031
2100
|
set(u) {
|
|
2032
|
-
u =
|
|
2033
|
-
var
|
|
2034
|
-
if (
|
|
2035
|
-
var
|
|
2036
|
-
|
|
2101
|
+
u = wt(a, u, t), this.$$d[a] = u;
|
|
2102
|
+
var l = this.$$c;
|
|
2103
|
+
if (l) {
|
|
2104
|
+
var c = ke(l, a)?.get;
|
|
2105
|
+
c ? l[a] = u : l.$set({ [a]: u });
|
|
2037
2106
|
}
|
|
2038
2107
|
}
|
|
2039
2108
|
});
|
|
2040
|
-
}), r.forEach((
|
|
2041
|
-
ue(o.prototype,
|
|
2109
|
+
}), r.forEach((a) => {
|
|
2110
|
+
ue(o.prototype, a, {
|
|
2042
2111
|
get() {
|
|
2043
|
-
return this.$$c?.[
|
|
2112
|
+
return this.$$c?.[a];
|
|
2044
2113
|
}
|
|
2045
2114
|
});
|
|
2046
2115
|
}), e.element = /** @type {any} */
|
|
2047
2116
|
o, o;
|
|
2048
2117
|
}
|
|
2049
|
-
|
|
2118
|
+
function Mn(e, ...t) {
|
|
2119
|
+
return Ft(() => {
|
|
2120
|
+
try {
|
|
2121
|
+
let n = !1;
|
|
2122
|
+
const r = [];
|
|
2123
|
+
for (const s of t)
|
|
2124
|
+
s && typeof s == "object" && Pe in s ? (r.push(Is(s, !0)), n = !0) : r.push(s);
|
|
2125
|
+
n && (Rs(e), console.log("%c[snapshot]", "color: grey", ...r));
|
|
2126
|
+
} catch {
|
|
2127
|
+
}
|
|
2128
|
+
}), t;
|
|
2129
|
+
}
|
|
2130
|
+
const zn = "-pie-editor--", jr = (...e) => e.reduce((t, n) => {
|
|
2050
2131
|
for (const r in n)
|
|
2051
2132
|
n.hasOwnProperty(r) && n[r] !== null && n[r] !== void 0 && (t[r] = n[r]);
|
|
2052
2133
|
return t;
|
|
2053
|
-
}, {}),
|
|
2054
|
-
var
|
|
2055
|
-
const
|
|
2134
|
+
}, {}), Qr = {}, yi = "https://builder.pie-api.com", wi = Qr.PUBLIC_BUILDER_ORIGIN_URL || yi, bi = Qr.PUBLIC_BUILDER_BUNDLE_URL || `${wi}/api/v1/bundles/`;
|
|
2135
|
+
var Q = /* @__PURE__ */ ((e) => (e.player = "player.js", e.clientPlayer = "client-player.js", e.editor = "editor.js", e))(Q || {}), tn = /* @__PURE__ */ ((e) => (e.loading = "loading", e.loaded = "loaded", e))(tn || {});
|
|
2136
|
+
const Ei = {
|
|
2056
2137
|
invokeControllerForModel: !0,
|
|
2057
2138
|
env: { mode: "gather", role: "student", partialScoring: !1 },
|
|
2058
2139
|
eventListeners: {}
|
|
2059
2140
|
};
|
|
2060
|
-
function
|
|
2141
|
+
function $i(e) {
|
|
2061
2142
|
return e && typeof e.pie == "object";
|
|
2062
2143
|
}
|
|
2063
|
-
function
|
|
2144
|
+
function qn(e) {
|
|
2064
2145
|
return typeof e == "function" && "prototype" in e && e.prototype instanceof HTMLElement;
|
|
2065
2146
|
}
|
|
2066
|
-
function
|
|
2147
|
+
function Ci(e) {
|
|
2067
2148
|
return e && typeof e.PIE_REGISTRY == "object";
|
|
2068
2149
|
}
|
|
2069
|
-
const
|
|
2150
|
+
const gn = () => {
|
|
2070
2151
|
let e;
|
|
2071
|
-
return
|
|
2072
|
-
},
|
|
2152
|
+
return Ci(window) ? e = window.PIE_REGISTRY : (e = {}, window.PIE_REGISTRY = e), e;
|
|
2153
|
+
}, Mr = (e) => {
|
|
2073
2154
|
if (!e)
|
|
2074
2155
|
throw new Error("Parameter is required: input");
|
|
2075
2156
|
const t = e.charAt(0) === "@" ? e.match(/^(@[^/]+\/[^/@]+)(?:\/([^@]+))?(?:@([\s\S]+))?/) : e.match(/^([^/@]+)(?:\/([^@]+))?(?:@([\s\S]+))?/);
|
|
@@ -2080,7 +2161,7 @@ const pn = () => {
|
|
|
2080
2161
|
path: t[2] || "",
|
|
2081
2162
|
version: t[3] || ""
|
|
2082
2163
|
};
|
|
2083
|
-
},
|
|
2164
|
+
}, Pi = (e) => e.split("+").map((t) => Mr(t).name).join("+"), zr = (e, t, n) => {
|
|
2084
2165
|
if (!e)
|
|
2085
2166
|
throw new Error("session data is required");
|
|
2086
2167
|
const r = e.find((i) => i.id === t);
|
|
@@ -2089,22 +2170,24 @@ const pn = () => {
|
|
|
2089
2170
|
const s = n ? { id: t, element: n } : { id: t };
|
|
2090
2171
|
return e.push(s), s;
|
|
2091
2172
|
};
|
|
2092
|
-
function
|
|
2173
|
+
function dt(e, t) {
|
|
2093
2174
|
const n = `[${e}]`;
|
|
2094
2175
|
return {
|
|
2095
|
-
|
|
2176
|
+
// Only debug method checks debugEnabledFn - it's checked dynamically on every call
|
|
2177
|
+
debug: (r, ...s) => {
|
|
2178
|
+
t() && console.debug(n, r, ...s);
|
|
2096
2179
|
},
|
|
2097
|
-
//
|
|
2180
|
+
// info, warn, error always log (not gated by debug flag)
|
|
2098
2181
|
info: (r, ...s) => console.info(n, r, ...s),
|
|
2099
2182
|
warn: (r, ...s) => console.warn(n, r, ...s),
|
|
2100
2183
|
error: (r, ...s) => console.error(n, r, ...s)
|
|
2101
2184
|
};
|
|
2102
2185
|
}
|
|
2103
|
-
function
|
|
2186
|
+
function vt() {
|
|
2104
2187
|
return typeof window < "u" && window.PIE_DEBUG === !0;
|
|
2105
2188
|
}
|
|
2106
|
-
const ne =
|
|
2107
|
-
const t =
|
|
2189
|
+
const ne = dt("pie-scoring", vt), _n = (e) => {
|
|
2190
|
+
const t = gn();
|
|
2108
2191
|
ne.debug(`[findPieController] Looking for controller for: ${e}`), ne.debug("[findPieController] Registry has entries for:", Object.keys(t));
|
|
2109
2192
|
const n = t[e];
|
|
2110
2193
|
if (!n) {
|
|
@@ -2122,7 +2205,7 @@ const ne = je("pie-scoring", gt()), vn = (e) => {
|
|
|
2122
2205
|
if (r)
|
|
2123
2206
|
ne.debug(`[findPieController] ✅ Controller found for ${e} with functions:`, Object.keys(r));
|
|
2124
2207
|
else {
|
|
2125
|
-
if (n.bundleType ===
|
|
2208
|
+
if (n.bundleType === Q.clientPlayer)
|
|
2126
2209
|
throw ne.error(
|
|
2127
2210
|
`[findPieController] ❌ CRITICAL: Registry entry exists for ${e} but controller is missing!`
|
|
2128
2211
|
), ne.error(`[findPieController] Bundle type: ${n.bundleType} (controllers required)`), ne.error("[findPieController] Entry:", n), new Error(
|
|
@@ -2133,32 +2216,32 @@ const ne = je("pie-scoring", gt()), vn = (e) => {
|
|
|
2133
2216
|
);
|
|
2134
2217
|
}
|
|
2135
2218
|
return r;
|
|
2136
|
-
},
|
|
2137
|
-
|
|
2219
|
+
}, X = dt("pie-updates", vt), Si = async (e, t, n, r, s, i) => {
|
|
2220
|
+
X.debug(`${i} Using controller, env:`, s), X.debug(`${i} Model before filter:`, {
|
|
2138
2221
|
id: t.id,
|
|
2139
2222
|
element: t.element,
|
|
2140
2223
|
hasCorrectResponse: "correctResponse" in t
|
|
2141
2224
|
});
|
|
2142
|
-
const o = (
|
|
2225
|
+
const o = (a, u, l) => (X.debug(`${i} updateSession called for ${a} with:`, l), Object.assign(n, l), Promise.resolve());
|
|
2143
2226
|
try {
|
|
2144
|
-
const
|
|
2227
|
+
const a = await r.model(t, n, s, o), u = {
|
|
2145
2228
|
id: t.id,
|
|
2146
2229
|
element: t.element,
|
|
2147
|
-
...
|
|
2230
|
+
...a
|
|
2148
2231
|
};
|
|
2149
|
-
|
|
2232
|
+
X.debug(`${i} ✅ Controller filtered model:`, {
|
|
2150
2233
|
id: u.id,
|
|
2151
2234
|
element: u.element,
|
|
2152
2235
|
hasCorrectResponse: "correctResponse" in u,
|
|
2153
2236
|
mode: s.mode,
|
|
2154
2237
|
role: s.role
|
|
2155
2238
|
}), e.model = u;
|
|
2156
|
-
} catch (
|
|
2157
|
-
throw
|
|
2239
|
+
} catch (a) {
|
|
2240
|
+
throw X.error(`${i} ❌ Controller error:`, a), a;
|
|
2158
2241
|
}
|
|
2159
2242
|
}, nn = (e, t) => {
|
|
2160
|
-
const { config: n, session: r, env: s, eventListeners: i, invokeControllerForModel: o } =
|
|
2161
|
-
|
|
2243
|
+
const { config: n, session: r, env: s, eventListeners: i, invokeControllerForModel: o } = jr(
|
|
2244
|
+
Ei,
|
|
2162
2245
|
t
|
|
2163
2246
|
);
|
|
2164
2247
|
if (!s)
|
|
@@ -2167,94 +2250,94 @@ const ne = je("pie-scoring", gt()), vn = (e) => {
|
|
|
2167
2250
|
throw new Error("session is required");
|
|
2168
2251
|
if (!n)
|
|
2169
2252
|
throw new Error("config is required");
|
|
2170
|
-
const
|
|
2171
|
-
if (!
|
|
2172
|
-
|
|
2253
|
+
const a = document.querySelectorAll(e);
|
|
2254
|
+
if (!a || a.length === 0) {
|
|
2255
|
+
X.debug(`no elements found for ${e}`);
|
|
2173
2256
|
return;
|
|
2174
2257
|
}
|
|
2175
|
-
|
|
2176
|
-
const
|
|
2177
|
-
let
|
|
2178
|
-
if (!
|
|
2179
|
-
throw
|
|
2180
|
-
|
|
2181
|
-
const
|
|
2182
|
-
if (
|
|
2183
|
-
|
|
2258
|
+
a.forEach((u) => {
|
|
2259
|
+
const l = u;
|
|
2260
|
+
let c = t?.config?.models?.find((d) => d.id === u.id);
|
|
2261
|
+
if (!c)
|
|
2262
|
+
throw X.error("[updatePieElement] Model not found for", e, t), new Error(`model not found for ${e}`);
|
|
2263
|
+
X.debug(`[updatePieElement] Updating ${e}#${u.id}, env:`, s);
|
|
2264
|
+
const f = zr(r, c.id, c.element);
|
|
2265
|
+
if (l.session = f, i && Object.entries(i).forEach(([d, v]) => {
|
|
2266
|
+
l.addEventListener(d, v);
|
|
2184
2267
|
}), s && o) {
|
|
2185
|
-
const
|
|
2186
|
-
|
|
2268
|
+
const d = _n(e);
|
|
2269
|
+
d ? (X.debug(`[updatePieElement] Invoking controller for ${e}#${u.id}`, {
|
|
2187
2270
|
mode: s.mode,
|
|
2188
2271
|
role: s.role,
|
|
2189
|
-
hasCorrectResponse: "correctResponse" in
|
|
2190
|
-
}),
|
|
2191
|
-
|
|
2272
|
+
hasCorrectResponse: "correctResponse" in c
|
|
2273
|
+
}), Si(
|
|
2274
|
+
l,
|
|
2275
|
+
c,
|
|
2192
2276
|
f,
|
|
2193
2277
|
d,
|
|
2194
|
-
c,
|
|
2195
2278
|
s,
|
|
2196
2279
|
`[updatePieElement(${e}#${u.id})]`
|
|
2197
|
-
).catch((
|
|
2198
|
-
|
|
2199
|
-
})) : (
|
|
2280
|
+
).catch((v) => {
|
|
2281
|
+
X.error(`[updatePieElement] Controller failed for ${e}#${u.id}:`, v), l.model = c;
|
|
2282
|
+
})) : (X.debug(`[updatePieElement] ℹ️ No controller for ${e}, using server-processed model`), l.model = c);
|
|
2200
2283
|
} else
|
|
2201
|
-
|
|
2284
|
+
X.debug(
|
|
2202
2285
|
`[updatePieElement] Direct model assignment for ${e}#${u.id} (no controller invocation requested)`
|
|
2203
|
-
),
|
|
2286
|
+
), l.model = c;
|
|
2204
2287
|
});
|
|
2205
2288
|
}, _t = (e, t, n) => {
|
|
2206
|
-
|
|
2289
|
+
X.debug("[updatePieElements] Updating all elements with env:", n), Object.entries(e.elements).forEach(([r, s]) => {
|
|
2207
2290
|
nn(r, { config: e, session: t, env: n });
|
|
2208
2291
|
});
|
|
2209
|
-
},
|
|
2210
|
-
buildServiceBase:
|
|
2211
|
-
bundleType:
|
|
2292
|
+
}, C = dt("pie-initialization", vt), Ti = {
|
|
2293
|
+
buildServiceBase: bi,
|
|
2294
|
+
bundleType: Q.player,
|
|
2212
2295
|
// Default to player.js (no controllers, server-processed models)
|
|
2213
2296
|
env: { mode: "gather", role: "student" }
|
|
2214
|
-
},
|
|
2297
|
+
}, Gt = (e, t) => {
|
|
2215
2298
|
const { config: n, session: r, env: s, eventListeners: i } = t, o = e.tagName.toLowerCase();
|
|
2216
|
-
|
|
2217
|
-
let
|
|
2218
|
-
if (!
|
|
2219
|
-
const
|
|
2220
|
-
|
|
2299
|
+
C.debug(`[initializePieElement] Initializing ${o}#${e.id}`);
|
|
2300
|
+
let a = n?.models?.find((c) => c.id === e.id);
|
|
2301
|
+
if (!a) {
|
|
2302
|
+
const f = gn()[o];
|
|
2303
|
+
f && f.bundleType === Q.clientPlayer && C.warn(
|
|
2221
2304
|
`[initializePieElement] Model not found for PIE element ${o}#${e.id} (client-player.js bundle)`
|
|
2222
2305
|
);
|
|
2223
2306
|
return;
|
|
2224
2307
|
}
|
|
2225
|
-
const u =
|
|
2226
|
-
e.session = u,
|
|
2227
|
-
const
|
|
2308
|
+
const u = zr(r, a.id, a.element);
|
|
2309
|
+
e.session = u, C.debug(`[initializePieElement] Session set for ${o}#${e.id}:`, u);
|
|
2310
|
+
const l = _n(o);
|
|
2228
2311
|
if (!s)
|
|
2229
|
-
throw
|
|
2230
|
-
|
|
2231
|
-
id:
|
|
2232
|
-
element:
|
|
2233
|
-
hasCorrectResponse: "correctResponse" in
|
|
2312
|
+
throw C.error(`[initializePieElement] ❌ FATAL: No env provided for ${o}`), new Error(`No env provided for ${o}. PIE elements require an env object with mode and role.`);
|
|
2313
|
+
l ? C.debug(`[initializePieElement] Controller found for ${o}, will invoke model() function`) : (C.debug(`[initializePieElement] ℹ️ No controller for ${o}, using server-processed model`), C.debug("[initializePieElement] Model already processed by server:", {
|
|
2314
|
+
id: a.id,
|
|
2315
|
+
element: a.element,
|
|
2316
|
+
hasCorrectResponse: "correctResponse" in a,
|
|
2234
2317
|
mode: s.mode,
|
|
2235
2318
|
role: s.role
|
|
2236
|
-
}), e.model =
|
|
2237
|
-
e.addEventListener(
|
|
2319
|
+
}), e.model = a), i && Object.entries(i).forEach(([c, f]) => {
|
|
2320
|
+
e.addEventListener(c, f);
|
|
2238
2321
|
});
|
|
2239
|
-
},
|
|
2322
|
+
}, Ii = (e, t, n, r, s) => {
|
|
2240
2323
|
const i = [];
|
|
2241
|
-
return
|
|
2242
|
-
|
|
2243
|
-
const u =
|
|
2244
|
-
|
|
2245
|
-
const
|
|
2246
|
-
if (
|
|
2247
|
-
throw
|
|
2248
|
-
if (
|
|
2249
|
-
hasController: !!
|
|
2250
|
-
hasElement: !!
|
|
2251
|
-
hasConfig: !!
|
|
2252
|
-
controllerKeys:
|
|
2324
|
+
return C.debug("[registerPieElementsFromBundle] Available packages in bundle:", Object.keys(e)), C.debug("[registerPieElementsFromBundle] config.elements:", t.elements), typeof window < "u" && (window._pieCurrentContext = { config: t, session: n, env: s.env }), Object.entries(t.elements).forEach(([o, a]) => {
|
|
2325
|
+
C.debug(`[registerPieElementsFromBundle] Processing element: ${o} -> ${a}`);
|
|
2326
|
+
const u = Pi(a);
|
|
2327
|
+
C.debug(`[registerPieElementsFromBundle] Package without version: "${u}"`);
|
|
2328
|
+
const l = e[u];
|
|
2329
|
+
if (C.debug("[registerPieElementsFromBundle] elementData result:", l ? "FOUND" : "UNDEFINED"), !l)
|
|
2330
|
+
throw C.error(`[registerPieElementsFromBundle] ❌ Package "${u}" not found in bundle!`), C.error(`[registerPieElementsFromBundle] Lookup key: "${u}"`), C.error("[registerPieElementsFromBundle] Available packages:", Object.keys(e)), new Error(`pie ${u} not found in ${Object.keys(e)}`);
|
|
2331
|
+
if (C.debug(`[registerPieElementsFromBundle] elementData for ${u}:`, {
|
|
2332
|
+
hasController: !!l.controller,
|
|
2333
|
+
hasElement: !!l.Element,
|
|
2334
|
+
hasConfig: !!l.config,
|
|
2335
|
+
controllerKeys: l.controller ? Object.keys(l.controller) : [],
|
|
2253
2336
|
bundleType: s.bundleType
|
|
2254
|
-
}), !
|
|
2255
|
-
if (s.bundleType ===
|
|
2256
|
-
throw
|
|
2257
|
-
|
|
2337
|
+
}), !l.controller) {
|
|
2338
|
+
if (s.bundleType === Q.clientPlayer)
|
|
2339
|
+
throw C.error(`[registerPieElementsFromBundle] ❌ CRITICAL: No controller found for ${u}!`), C.error(`[registerPieElementsFromBundle] Bundle type: ${s.bundleType} (controllers required)`), new Error(`No controller found for ${u}. client-player.js bundles MUST include controllers!`);
|
|
2340
|
+
C.debug(
|
|
2258
2341
|
`[registerPieElementsFromBundle] ℹ️ No controller found for ${u} - using server-processed models (player.js bundle)`
|
|
2259
2342
|
);
|
|
2260
2343
|
}
|
|
@@ -2264,30 +2347,30 @@ const ne = je("pie-scoring", gt()), vn = (e) => {
|
|
|
2264
2347
|
session: n,
|
|
2265
2348
|
env: s.env,
|
|
2266
2349
|
...s.eventListeners?.[o] && { eventListeners: s.eventListeners[o] }
|
|
2267
|
-
}), s.bundleType ===
|
|
2268
|
-
const
|
|
2269
|
-
nn(
|
|
2350
|
+
}), s.bundleType === Q.editor) {
|
|
2351
|
+
const c = o + zn;
|
|
2352
|
+
nn(c, {
|
|
2270
2353
|
config: t,
|
|
2271
2354
|
session: n,
|
|
2272
|
-
...s.eventListeners?.[
|
|
2273
|
-
eventListeners: s.eventListeners[
|
|
2355
|
+
...s.eventListeners?.[c] && {
|
|
2356
|
+
eventListeners: s.eventListeners[c]
|
|
2274
2357
|
}
|
|
2275
2358
|
});
|
|
2276
2359
|
}
|
|
2277
|
-
} else if (
|
|
2278
|
-
`[registerPieElementsFromBundle] Registering ${o} in registry${
|
|
2360
|
+
} else if (C.debug(
|
|
2361
|
+
`[registerPieElementsFromBundle] Registering ${o} in registry${l.controller ? " with controller" : " (no controller - server-processed models)"}`
|
|
2279
2362
|
), r[o] = {
|
|
2280
|
-
package:
|
|
2363
|
+
package: a,
|
|
2281
2364
|
status: tn.loading,
|
|
2282
2365
|
tagName: o,
|
|
2283
|
-
controller:
|
|
2284
|
-
config:
|
|
2366
|
+
controller: l.controller || null,
|
|
2367
|
+
config: l.config,
|
|
2285
2368
|
bundleType: s.bundleType
|
|
2286
|
-
},
|
|
2287
|
-
customElements.define(o,
|
|
2288
|
-
const
|
|
2289
|
-
if (
|
|
2290
|
-
|
|
2369
|
+
}, qn(l.Element)) {
|
|
2370
|
+
customElements.define(o, l.Element);
|
|
2371
|
+
const c = document.querySelectorAll(o);
|
|
2372
|
+
if (C.debug(`[registerPieElementsFromBundle] Found ${c.length} elements for tag '${o}'`), c.forEach((f) => {
|
|
2373
|
+
Gt(f, {
|
|
2291
2374
|
config: t,
|
|
2292
2375
|
session: n,
|
|
2293
2376
|
env: s.env,
|
|
@@ -2298,30 +2381,30 @@ const ne = je("pie-scoring", gt()), vn = (e) => {
|
|
|
2298
2381
|
status: tn.loaded
|
|
2299
2382
|
}, i.push(
|
|
2300
2383
|
customElements.whenDefined(o).then(() => {
|
|
2301
|
-
|
|
2384
|
+
C.debug("[registerPieElementsFromBundle] defined custom PIE element: %s", o);
|
|
2302
2385
|
})
|
|
2303
|
-
), window._pieElementObserver || (window._pieElementObserver = new MutationObserver((
|
|
2304
|
-
const
|
|
2305
|
-
if (!
|
|
2306
|
-
|
|
2386
|
+
), window._pieElementObserver || (window._pieElementObserver = new MutationObserver((f) => {
|
|
2387
|
+
const d = window._pieCurrentContext;
|
|
2388
|
+
if (!d) {
|
|
2389
|
+
C.warn("[MutationObserver] No current context available");
|
|
2307
2390
|
return;
|
|
2308
2391
|
}
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
if (
|
|
2312
|
-
const y =
|
|
2313
|
-
r[y] &&
|
|
2314
|
-
config:
|
|
2315
|
-
session:
|
|
2316
|
-
env:
|
|
2392
|
+
f.forEach((v) => {
|
|
2393
|
+
v.type === "childList" && v.addedNodes.forEach((g) => {
|
|
2394
|
+
if (g.nodeType === Node.ELEMENT_NODE) {
|
|
2395
|
+
const y = g.tagName.toLowerCase();
|
|
2396
|
+
r[y] && Gt(g, {
|
|
2397
|
+
config: d.config,
|
|
2398
|
+
session: d.session,
|
|
2399
|
+
env: d.env,
|
|
2317
2400
|
eventListeners: s.eventListeners?.[y]
|
|
2318
|
-
}),
|
|
2319
|
-
const
|
|
2320
|
-
r[
|
|
2321
|
-
config:
|
|
2322
|
-
session:
|
|
2323
|
-
env:
|
|
2324
|
-
eventListeners: s.eventListeners?.[
|
|
2401
|
+
}), g.querySelectorAll("*").forEach((b) => {
|
|
2402
|
+
const M = b.tagName.toLowerCase();
|
|
2403
|
+
r[M] && Gt(b, {
|
|
2404
|
+
config: d.config,
|
|
2405
|
+
session: d.session,
|
|
2406
|
+
env: d.env,
|
|
2407
|
+
eventListeners: s.eventListeners?.[M]
|
|
2325
2408
|
});
|
|
2326
2409
|
});
|
|
2327
2410
|
}
|
|
@@ -2330,37 +2413,37 @@ const ne = je("pie-scoring", gt()), vn = (e) => {
|
|
|
2330
2413
|
}), window._pieElementObserver.observe(document.body, {
|
|
2331
2414
|
childList: !0,
|
|
2332
2415
|
subtree: !0
|
|
2333
|
-
})), s.bundleType ===
|
|
2334
|
-
if (
|
|
2335
|
-
const
|
|
2336
|
-
customElements.define(
|
|
2337
|
-
customElements.whenDefined(
|
|
2338
|
-
|
|
2416
|
+
})), s.bundleType === Q.editor)
|
|
2417
|
+
if (qn(l.Configure)) {
|
|
2418
|
+
const f = o + zn;
|
|
2419
|
+
customElements.define(f, l.Configure), i.push(
|
|
2420
|
+
customElements.whenDefined(f).then(() => {
|
|
2421
|
+
C.debug(`[registerPieElementsFromBundle] defined custom PIE editor element: ${f}`);
|
|
2339
2422
|
})
|
|
2340
2423
|
);
|
|
2341
2424
|
} else
|
|
2342
|
-
|
|
2425
|
+
C.error(
|
|
2343
2426
|
`[registerPieElementsFromBundle] pie.Configure for ${u} is not a valid custom element constructor.`,
|
|
2344
|
-
|
|
2427
|
+
l.configure
|
|
2345
2428
|
);
|
|
2346
2429
|
} else
|
|
2347
|
-
|
|
2430
|
+
C.error(
|
|
2348
2431
|
`[registerPieElementsFromBundle] pie.Element for ${u} is not a valid custom element constructor.`
|
|
2349
2432
|
);
|
|
2350
2433
|
}), i;
|
|
2351
|
-
},
|
|
2352
|
-
const r =
|
|
2353
|
-
if (
|
|
2354
|
-
|
|
2434
|
+
}, Vn = (e, t, n = {}) => {
|
|
2435
|
+
const r = gn(), s = jr(Ti, n);
|
|
2436
|
+
if ($i(window)) {
|
|
2437
|
+
C.debug("[initializePiesFromLoadedBundle] window.pie available");
|
|
2355
2438
|
const i = window.pie.default;
|
|
2356
|
-
|
|
2439
|
+
Ii(i, e, t, r, s);
|
|
2357
2440
|
} else
|
|
2358
|
-
|
|
2441
|
+
C.error("[initializePiesFromLoadedBundle] window.pie not found; was the bundle inlined correctly?");
|
|
2359
2442
|
};
|
|
2360
|
-
|
|
2361
|
-
ce[
|
|
2362
|
-
var
|
|
2363
|
-
const
|
|
2443
|
+
Sr();
|
|
2444
|
+
ce[R] = "src/lib/components/PieItemPlayer.svelte";
|
|
2445
|
+
var xi = Te(/* @__PURE__ */ Ie("<div><!></div>"), ce[R], [[236, 2]]), Fi = Te(/* @__PURE__ */ Ie("<div><!></div>"), ce[R], [[242, 2]]), ki = Te(/* @__PURE__ */ Ie('<div class="pie-item-player svelte-d1rctr"><!> <!></div>'), ce[R], [[234, 0]]);
|
|
2446
|
+
const Ri = {
|
|
2364
2447
|
hash: "svelte-d1rctr",
|
|
2365
2448
|
code: `
|
|
2366
2449
|
.pie-item-player.svelte-d1rctr {
|
|
@@ -2377,51 +2460,51 @@ const Ti = {
|
|
|
2377
2460
|
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGllSXRlbVBsYXllci5zdmVsdGUiLCJtYXBwaW5ncyI6IjtBQXdQQSxDQUFDLDhCQUFnQixDQUFDO0FBQ2xCLEVBQUUsY0FBYztBQUNoQixFQUFFLFdBQVc7QUFDYjs7QUFFQSxDQUFDLG9DQUFzQjtBQUN2QixDQUFDLGlDQUFtQixDQUFDO0FBQ3JCLEVBQUUsY0FBYztBQUNoQixFQUFFLFdBQVc7QUFDYiIsIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZXMiOlsiUGllSXRlbVBsYXllci5zdmVsdGUiXX0= */`
|
|
2378
2461
|
};
|
|
2379
2462
|
function ce(e, t) {
|
|
2380
|
-
|
|
2381
|
-
const n =
|
|
2382
|
-
let r =
|
|
2383
|
-
const
|
|
2384
|
-
|
|
2385
|
-
const
|
|
2386
|
-
detail:
|
|
2463
|
+
Br(new.target), hn(t, !0, ce), Dr(e, Ri);
|
|
2464
|
+
const n = dt("pie-item-player", () => vt());
|
|
2465
|
+
let r = I(t, "itemConfig", 7), s = I(t, "passageConfig", 7, null), i = I(t, "env", 23, () => ({ mode: "gather", role: "student" })), o = I(t, "session", 23, () => []), a = I(t, "addCorrectResponse", 7, !1), u = I(t, "customClassname", 7, ""), l = I(t, "passageContainerClass", 7, ""), c = I(t, "containerClass", 7, ""), f = I(t, "bundleType", 23, () => Q.player), d = I(t, "onLoadComplete", 7), v = I(t, "onPlayerError", 7), g = I(t, "onSessionChanged", 7), y = D(!1);
|
|
2466
|
+
const b = (p, k) => {
|
|
2467
|
+
T(p, "load-complete") && d() ? d()(k) : T(p, "player-error") && v() ? v()(k) : T(p, "session-changed") && g() && g()(k);
|
|
2468
|
+
const Y = new CustomEvent(p, {
|
|
2469
|
+
detail: k,
|
|
2387
2470
|
bubbles: !0,
|
|
2388
2471
|
composed: !0
|
|
2389
2472
|
// Allow events to cross shadow DOM boundaries
|
|
2390
2473
|
});
|
|
2391
|
-
dispatchEvent(
|
|
2474
|
+
dispatchEvent(Y);
|
|
2392
2475
|
};
|
|
2393
|
-
async function
|
|
2394
|
-
if (!
|
|
2476
|
+
async function M() {
|
|
2477
|
+
if (!a() || !r() || _(y)) return;
|
|
2395
2478
|
n.debug("[PieItemPlayer] Populating session with correct responses");
|
|
2396
|
-
const
|
|
2397
|
-
for (const
|
|
2398
|
-
const
|
|
2399
|
-
if (
|
|
2479
|
+
const p = [];
|
|
2480
|
+
for (const k of r().models) {
|
|
2481
|
+
const Y = _n(k.element);
|
|
2482
|
+
if (Y && Y.createCorrectResponseSession)
|
|
2400
2483
|
try {
|
|
2401
|
-
const
|
|
2402
|
-
|
|
2403
|
-
id:
|
|
2404
|
-
element:
|
|
2405
|
-
...
|
|
2484
|
+
const xe = await Y.createCorrectResponseSession(k, i()), { id: h, ...m } = xe;
|
|
2485
|
+
p.push({
|
|
2486
|
+
id: k.id,
|
|
2487
|
+
element: k.element,
|
|
2488
|
+
...m
|
|
2406
2489
|
});
|
|
2407
|
-
} catch (
|
|
2408
|
-
n.warn(`[PieItemPlayer] Failed to create correct response for ${
|
|
2490
|
+
} catch (xe) {
|
|
2491
|
+
n.warn(`[PieItemPlayer] Failed to create correct response for ${k.element}:`, xe);
|
|
2409
2492
|
}
|
|
2410
2493
|
}
|
|
2411
|
-
o().length = 0, o().push(...
|
|
2494
|
+
o().length = 0, o().push(...p), w(y, !0), n.debug("[PieItemPlayer] Correct responses added to session:", o());
|
|
2412
2495
|
}
|
|
2413
|
-
const
|
|
2496
|
+
const L = H(() => [
|
|
2414
2497
|
"pie-passage-container",
|
|
2415
2498
|
u(),
|
|
2416
|
-
|
|
2417
|
-
].filter(Boolean).join(" ")),
|
|
2499
|
+
l()
|
|
2500
|
+
].filter(Boolean).join(" ")), N = H(() => [
|
|
2418
2501
|
"pie-item-container",
|
|
2419
2502
|
u(),
|
|
2420
|
-
|
|
2503
|
+
c()
|
|
2421
2504
|
].filter(Boolean).join(" "));
|
|
2422
|
-
let
|
|
2423
|
-
|
|
2424
|
-
!r() ||
|
|
2505
|
+
let F = D(!1), $ = D(!1), U = D(!1);
|
|
2506
|
+
Me(() => {
|
|
2507
|
+
!r() || _(F) || (n.debug("[PieItemPlayer] Item config received, initializing after DOM renders..."), mr().then(async () => {
|
|
2425
2508
|
try {
|
|
2426
2509
|
if (n.debug("[PieItemPlayer] DOM ready, initializing PIE elements"), n.debug("[PieItemPlayer] Config:", {
|
|
2427
2510
|
itemElements: Object.keys(r().elements || {}),
|
|
@@ -2429,133 +2512,133 @@ function ce(e, t) {
|
|
|
2429
2512
|
passageElements: s() ? Object.keys(s().elements || {}) : [],
|
|
2430
2513
|
passageModels: s() ? (s().models || []).length : 0,
|
|
2431
2514
|
sessionLength: o().length,
|
|
2432
|
-
addCorrectResponse:
|
|
2515
|
+
addCorrectResponse: a(),
|
|
2433
2516
|
env: i()
|
|
2434
|
-
}),
|
|
2435
|
-
const
|
|
2436
|
-
if (
|
|
2517
|
+
}), Vn(r(), [], { env: i(), bundleType: f() }), n.debug("[PieItemPlayer] Item bundle initialized (bundle type: %s)", f()), s() && (Vn(s(), [], { env: i(), bundleType: f() }), n.debug("[PieItemPlayer] Passage bundle initialized (bundle type: %s)", f())), await M(), n.debug("[PieItemPlayer] Updating elements with session (length=" + o().length + ")"), _t(r(), o(), i()), s() && _t(s(), o(), i()), w(F, !0), !_($)) {
|
|
2518
|
+
const p = document.querySelector(".pie-item-player"), k = (Y) => {
|
|
2519
|
+
if (_(U))
|
|
2437
2520
|
return;
|
|
2438
|
-
const
|
|
2439
|
-
n.debug("[PieItemPlayer] session-changed event received from PIE element"),
|
|
2521
|
+
const xe = Y;
|
|
2522
|
+
n.debug("[PieItemPlayer] session-changed event received from PIE element"), w(U, !0);
|
|
2440
2523
|
try {
|
|
2441
|
-
|
|
2524
|
+
b("session-changed", xe.detail);
|
|
2442
2525
|
} finally {
|
|
2443
2526
|
setTimeout(
|
|
2444
2527
|
() => {
|
|
2445
|
-
|
|
2528
|
+
w(U, !1);
|
|
2446
2529
|
},
|
|
2447
2530
|
0
|
|
2448
2531
|
);
|
|
2449
2532
|
}
|
|
2450
2533
|
};
|
|
2451
|
-
|
|
2534
|
+
p && (p.addEventListener("session-changed", k), w($, !0), n.debug("[PieItemPlayer] session-changed listener attached to root element"));
|
|
2452
2535
|
}
|
|
2453
|
-
n.debug("[PieItemPlayer] ✅ Initialization complete, dispatching load-complete event"),
|
|
2454
|
-
} catch (
|
|
2455
|
-
n.error("[PieItemPlayer] Error initializing:",
|
|
2536
|
+
n.debug("[PieItemPlayer] ✅ Initialization complete, dispatching load-complete event"), b("load-complete");
|
|
2537
|
+
} catch (p) {
|
|
2538
|
+
n.error("[PieItemPlayer] Error initializing:", p), b("player-error", p.message);
|
|
2456
2539
|
}
|
|
2457
2540
|
}));
|
|
2458
|
-
}),
|
|
2459
|
-
!
|
|
2541
|
+
}), Me(() => {
|
|
2542
|
+
!_(F) || !i() || !r() || !o() || (n.debug("[PieItemPlayer] Dependencies changed, updating elements"), n.debug("[PieItemPlayer] Env:", i()), n.debug("[PieItemPlayer] Session (length=" + o().length + "):", o()), _t(r(), o(), i()), s() && _t(s(), o(), i()));
|
|
2460
2543
|
});
|
|
2461
|
-
var
|
|
2544
|
+
var W = ki(), be = le(W);
|
|
2462
2545
|
{
|
|
2463
|
-
var
|
|
2464
|
-
var
|
|
2465
|
-
|
|
2546
|
+
var ht = (p) => {
|
|
2547
|
+
var k = xi(), Y = le(k);
|
|
2548
|
+
Nn(Y, () => s().markup), oe(k), rt(() => ze(k, 1, _(L), "svelte-d1rctr")), he(p, k);
|
|
2466
2549
|
};
|
|
2467
|
-
|
|
2468
|
-
s()?.markup &&
|
|
2550
|
+
it(be, (p) => {
|
|
2551
|
+
s()?.markup && p(ht);
|
|
2469
2552
|
});
|
|
2470
2553
|
}
|
|
2471
|
-
var
|
|
2554
|
+
var de = Zt(be, 2);
|
|
2472
2555
|
{
|
|
2473
|
-
var
|
|
2474
|
-
var
|
|
2475
|
-
|
|
2556
|
+
var He = (p) => {
|
|
2557
|
+
var k = Fi(), Y = le(k);
|
|
2558
|
+
Nn(Y, () => r().markup), oe(k), rt(() => ze(k, 1, _(N), "svelte-d1rctr")), he(p, k);
|
|
2476
2559
|
};
|
|
2477
|
-
|
|
2478
|
-
r()?.markup &&
|
|
2560
|
+
it(de, (p) => {
|
|
2561
|
+
r()?.markup && p(He);
|
|
2479
2562
|
});
|
|
2480
2563
|
}
|
|
2481
|
-
return oe(
|
|
2564
|
+
return oe(W), he(e, W), pn({
|
|
2482
2565
|
get itemConfig() {
|
|
2483
2566
|
return r();
|
|
2484
2567
|
},
|
|
2485
|
-
set itemConfig(
|
|
2486
|
-
r(
|
|
2568
|
+
set itemConfig(p) {
|
|
2569
|
+
r(p), P();
|
|
2487
2570
|
},
|
|
2488
2571
|
get passageConfig() {
|
|
2489
2572
|
return s();
|
|
2490
2573
|
},
|
|
2491
|
-
set passageConfig(
|
|
2492
|
-
s(
|
|
2574
|
+
set passageConfig(p = null) {
|
|
2575
|
+
s(p), P();
|
|
2493
2576
|
},
|
|
2494
2577
|
get env() {
|
|
2495
2578
|
return i();
|
|
2496
2579
|
},
|
|
2497
|
-
set env(
|
|
2498
|
-
i(
|
|
2580
|
+
set env(p = { mode: "gather", role: "student" }) {
|
|
2581
|
+
i(p), P();
|
|
2499
2582
|
},
|
|
2500
2583
|
get session() {
|
|
2501
2584
|
return o();
|
|
2502
2585
|
},
|
|
2503
|
-
set session(
|
|
2504
|
-
o(
|
|
2586
|
+
set session(p = []) {
|
|
2587
|
+
o(p), P();
|
|
2505
2588
|
},
|
|
2506
2589
|
get addCorrectResponse() {
|
|
2507
|
-
return
|
|
2590
|
+
return a();
|
|
2508
2591
|
},
|
|
2509
|
-
set addCorrectResponse(
|
|
2510
|
-
|
|
2592
|
+
set addCorrectResponse(p = !1) {
|
|
2593
|
+
a(p), P();
|
|
2511
2594
|
},
|
|
2512
2595
|
get customClassname() {
|
|
2513
2596
|
return u();
|
|
2514
2597
|
},
|
|
2515
|
-
set customClassname(
|
|
2516
|
-
u(
|
|
2598
|
+
set customClassname(p = "") {
|
|
2599
|
+
u(p), P();
|
|
2517
2600
|
},
|
|
2518
2601
|
get passageContainerClass() {
|
|
2519
|
-
return
|
|
2602
|
+
return l();
|
|
2520
2603
|
},
|
|
2521
|
-
set passageContainerClass(
|
|
2522
|
-
|
|
2604
|
+
set passageContainerClass(p = "") {
|
|
2605
|
+
l(p), P();
|
|
2523
2606
|
},
|
|
2524
2607
|
get containerClass() {
|
|
2525
|
-
return
|
|
2608
|
+
return c();
|
|
2526
2609
|
},
|
|
2527
|
-
set containerClass(
|
|
2528
|
-
|
|
2610
|
+
set containerClass(p = "") {
|
|
2611
|
+
c(p), P();
|
|
2529
2612
|
},
|
|
2530
2613
|
get bundleType() {
|
|
2531
|
-
return
|
|
2614
|
+
return f();
|
|
2532
2615
|
},
|
|
2533
|
-
set bundleType(
|
|
2534
|
-
|
|
2616
|
+
set bundleType(p = Q.player) {
|
|
2617
|
+
f(p), P();
|
|
2535
2618
|
},
|
|
2536
2619
|
get onLoadComplete() {
|
|
2537
|
-
return
|
|
2620
|
+
return d();
|
|
2538
2621
|
},
|
|
2539
|
-
set onLoadComplete(
|
|
2540
|
-
|
|
2622
|
+
set onLoadComplete(p) {
|
|
2623
|
+
d(p), P();
|
|
2541
2624
|
},
|
|
2542
2625
|
get onPlayerError() {
|
|
2543
|
-
return
|
|
2626
|
+
return v();
|
|
2544
2627
|
},
|
|
2545
|
-
set onPlayerError(
|
|
2546
|
-
|
|
2628
|
+
set onPlayerError(p) {
|
|
2629
|
+
v(p), P();
|
|
2547
2630
|
},
|
|
2548
2631
|
get onSessionChanged() {
|
|
2549
|
-
return
|
|
2632
|
+
return g();
|
|
2550
2633
|
},
|
|
2551
|
-
set onSessionChanged(
|
|
2552
|
-
|
|
2634
|
+
set onSessionChanged(p) {
|
|
2635
|
+
g(p), P();
|
|
2553
2636
|
},
|
|
2554
|
-
...
|
|
2637
|
+
...Ur()
|
|
2555
2638
|
});
|
|
2556
2639
|
}
|
|
2557
|
-
|
|
2558
|
-
|
|
2640
|
+
Tr(ce);
|
|
2641
|
+
Nr(
|
|
2559
2642
|
ce,
|
|
2560
2643
|
{
|
|
2561
2644
|
itemConfig: {},
|
|
@@ -2575,59 +2658,57 @@ Ar(
|
|
|
2575
2658
|
[],
|
|
2576
2659
|
!0
|
|
2577
2660
|
);
|
|
2578
|
-
const
|
|
2579
|
-
trackPageActions: !1
|
|
2580
|
-
|
|
2581
|
-
resourceRetryDelay: 500
|
|
2582
|
-
}, Wt = (e) => {
|
|
2661
|
+
const Yn = {
|
|
2662
|
+
trackPageActions: !1
|
|
2663
|
+
}, Jt = (e) => {
|
|
2583
2664
|
const t = "--version-", n = (u) => {
|
|
2584
|
-
const
|
|
2585
|
-
return
|
|
2586
|
-
baseName: u.replace(`${t}${
|
|
2587
|
-
existingVersion:
|
|
2665
|
+
const l = u.match(`${t}(\\d+-\\d+-\\d+)$`);
|
|
2666
|
+
return l ? {
|
|
2667
|
+
baseName: u.replace(`${t}${l[1]}`, ""),
|
|
2668
|
+
existingVersion: l[1].replace(/-/g, ".")
|
|
2588
2669
|
} : { baseName: u };
|
|
2589
|
-
}, r = (u,
|
|
2590
|
-
const { baseName:
|
|
2591
|
-
return
|
|
2670
|
+
}, r = (u, l) => {
|
|
2671
|
+
const { baseName: c, existingVersion: f } = n(u), { version: d } = Mr(l);
|
|
2672
|
+
return f !== d ? `${c}${t}${d.replace(/\./g, "-")}` : u;
|
|
2592
2673
|
}, s = Object.entries(e.config.elements).reduce(
|
|
2593
|
-
(u, [
|
|
2594
|
-
const
|
|
2674
|
+
(u, [l, c]) => {
|
|
2675
|
+
const f = r(l, c);
|
|
2595
2676
|
return {
|
|
2596
2677
|
...u,
|
|
2597
|
-
[
|
|
2598
|
-
versionedName:
|
|
2599
|
-
package:
|
|
2678
|
+
[l]: {
|
|
2679
|
+
versionedName: f,
|
|
2680
|
+
package: c
|
|
2600
2681
|
}
|
|
2601
2682
|
};
|
|
2602
2683
|
},
|
|
2603
2684
|
{}
|
|
2604
2685
|
), i = Object.entries(s).reduce(
|
|
2605
|
-
(u, [
|
|
2686
|
+
(u, [l, { versionedName: c }]) => l !== c ? u.replace(new RegExp(`<${l}`, "g"), `<${c}`).replace(new RegExp(`</${l}`, "g"), `</${c}`) : u,
|
|
2606
2687
|
e.config.markup
|
|
2607
2688
|
), o = Object.values(s).reduce(
|
|
2608
|
-
(u, { versionedName:
|
|
2689
|
+
(u, { versionedName: l, package: c }) => ({
|
|
2609
2690
|
...u,
|
|
2610
|
-
[
|
|
2691
|
+
[l]: c
|
|
2611
2692
|
}),
|
|
2612
2693
|
{}
|
|
2613
|
-
),
|
|
2614
|
-
const
|
|
2615
|
-
if (
|
|
2694
|
+
), a = e.config.models.map((u) => {
|
|
2695
|
+
const l = u.element, c = s[l];
|
|
2696
|
+
if (c && c.versionedName !== l)
|
|
2616
2697
|
return {
|
|
2617
2698
|
...u,
|
|
2618
|
-
element:
|
|
2699
|
+
element: c.versionedName
|
|
2619
2700
|
};
|
|
2620
|
-
if (o[
|
|
2701
|
+
if (o[l])
|
|
2621
2702
|
return u;
|
|
2622
|
-
const
|
|
2623
|
-
const { baseName:
|
|
2624
|
-
return
|
|
2703
|
+
const f = Object.entries(s).filter(([d, { versionedName: v }]) => {
|
|
2704
|
+
const { baseName: g } = n(d);
|
|
2705
|
+
return g === l;
|
|
2625
2706
|
});
|
|
2626
|
-
if (
|
|
2627
|
-
const [, { versionedName:
|
|
2707
|
+
if (f.length > 0) {
|
|
2708
|
+
const [, { versionedName: d }] = f[0];
|
|
2628
2709
|
return {
|
|
2629
2710
|
...u,
|
|
2630
|
-
element:
|
|
2711
|
+
element: d
|
|
2631
2712
|
};
|
|
2632
2713
|
}
|
|
2633
2714
|
return u;
|
|
@@ -2638,471 +2719,14 @@ const kt = {
|
|
|
2638
2719
|
...e.config,
|
|
2639
2720
|
elements: o,
|
|
2640
2721
|
markup: i,
|
|
2641
|
-
models:
|
|
2722
|
+
models: a
|
|
2642
2723
|
}
|
|
2643
2724
|
};
|
|
2644
|
-
}
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
debug: !1
|
|
2650
|
-
}, ki = 80;
|
|
2651
|
-
class Ii {
|
|
2652
|
-
// Track resources within our container
|
|
2653
|
-
constructor(t = {}) {
|
|
2654
|
-
O(this, "config");
|
|
2655
|
-
O(this, "logger");
|
|
2656
|
-
O(this, "observer", null);
|
|
2657
|
-
O(this, "mutationObserver", null);
|
|
2658
|
-
O(this, "errorHandler", null);
|
|
2659
|
-
O(this, "retryAttempts", /* @__PURE__ */ new Map());
|
|
2660
|
-
O(this, "container", null);
|
|
2661
|
-
O(this, "isBrowser");
|
|
2662
|
-
O(this, "containerResources", /* @__PURE__ */ new Set());
|
|
2663
|
-
this.config = { ...Li, ...t }, this.logger = je("resource-monitor", this.config.debug), this.isBrowser = typeof window < "u" && typeof document < "u";
|
|
2664
|
-
}
|
|
2665
|
-
/**
|
|
2666
|
-
* Truncate URL for display in logs
|
|
2667
|
-
*/
|
|
2668
|
-
truncateUrl(t) {
|
|
2669
|
-
return t.length > ki ? "..." + t.slice(-77) : t;
|
|
2670
|
-
}
|
|
2671
|
-
/**
|
|
2672
|
-
* Track action with New Relic if enabled
|
|
2673
|
-
*/
|
|
2674
|
-
trackNewRelicAction(t, n) {
|
|
2675
|
-
!this.config.trackPageActions || !window.newrelic || window.newrelic.addPageAction(t, {
|
|
2676
|
-
...n,
|
|
2677
|
-
component: "pie-fixed-player",
|
|
2678
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
2679
|
-
});
|
|
2680
|
-
}
|
|
2681
|
-
/**
|
|
2682
|
-
* Track error with New Relic if enabled
|
|
2683
|
-
*/
|
|
2684
|
-
trackNewRelicError(t, n) {
|
|
2685
|
-
!this.config.trackPageActions || !window.newrelic || window.newrelic.noticeError(t, {
|
|
2686
|
-
...n,
|
|
2687
|
-
component: "pie-fixed-player"
|
|
2688
|
-
});
|
|
2689
|
-
}
|
|
2690
|
-
/**
|
|
2691
|
-
* Start monitoring resources in the given container
|
|
2692
|
-
*/
|
|
2693
|
-
start(t) {
|
|
2694
|
-
if (!this.isBrowser) {
|
|
2695
|
-
this.logger.debug("Not in browser environment, skipping resource monitoring");
|
|
2696
|
-
return;
|
|
2697
|
-
}
|
|
2698
|
-
this.container = t, this.setupMutationObserver(), this.scanContainerResources(), this.setupPerformanceObserver(), this.setupErrorHandler(), this.logger.info("✅ Resource monitoring started");
|
|
2699
|
-
}
|
|
2700
|
-
/**
|
|
2701
|
-
* Stop monitoring and clean up
|
|
2702
|
-
*/
|
|
2703
|
-
stop() {
|
|
2704
|
-
this.observer && (this.observer.disconnect(), this.observer = null), this.mutationObserver && (this.mutationObserver.disconnect(), this.mutationObserver = null), this.errorHandler && this.container && (this.container.removeEventListener("error", this.errorHandler, !0), this.errorHandler = null), this.retryAttempts.clear(), this.containerResources.clear(), this.container = null, this.logger.info("Resource monitoring stopped");
|
|
2705
|
-
}
|
|
2706
|
-
/**
|
|
2707
|
-
* Set up MutationObserver to track DOM changes within container
|
|
2708
|
-
* This allows us to know which resources belong to our container
|
|
2709
|
-
*/
|
|
2710
|
-
setupMutationObserver() {
|
|
2711
|
-
if (!this.isBrowser || typeof MutationObserver > "u" || !this.container) {
|
|
2712
|
-
this.logger.debug("MutationObserver not available or no container");
|
|
2713
|
-
return;
|
|
2714
|
-
}
|
|
2715
|
-
try {
|
|
2716
|
-
this.mutationObserver = new MutationObserver((t) => {
|
|
2717
|
-
for (const n of t)
|
|
2718
|
-
if (n.addedNodes.forEach((r) => {
|
|
2719
|
-
r instanceof HTMLElement && this.scanElementForResources(r);
|
|
2720
|
-
}), n.type === "attributes" && n.target instanceof HTMLElement) {
|
|
2721
|
-
const r = n.target;
|
|
2722
|
-
if (this.isResourceElement(r)) {
|
|
2723
|
-
const s = this.getResourceSrc(r);
|
|
2724
|
-
s && (this.containerResources.add(s), this.config.debug && this.logger.debug(`📌 Tracked resource attribute change: ${s}`));
|
|
2725
|
-
}
|
|
2726
|
-
}
|
|
2727
|
-
}), this.mutationObserver.observe(this.container, {
|
|
2728
|
-
childList: !0,
|
|
2729
|
-
subtree: !0,
|
|
2730
|
-
attributes: !0,
|
|
2731
|
-
attributeFilter: ["src", "href"]
|
|
2732
|
-
}), this.logger.debug("MutationObserver set up successfully");
|
|
2733
|
-
} catch (t) {
|
|
2734
|
-
this.logger.warn("Failed to set up MutationObserver:", t);
|
|
2735
|
-
}
|
|
2736
|
-
}
|
|
2737
|
-
/**
|
|
2738
|
-
* Scan an element and its descendants for resources
|
|
2739
|
-
*/
|
|
2740
|
-
scanElementForResources(t) {
|
|
2741
|
-
if (this.isResourceElement(t)) {
|
|
2742
|
-
const r = this.getResourceSrc(t);
|
|
2743
|
-
r && (this.containerResources.add(r), this.config.debug && this.logger.debug(`📌 Tracked new resource in container: ${r}`));
|
|
2744
|
-
}
|
|
2745
|
-
["img", "audio", "video", 'link[rel="stylesheet"]', "source"].forEach((r) => {
|
|
2746
|
-
t.querySelectorAll(r).forEach((s) => {
|
|
2747
|
-
if (this.isResourceElement(s)) {
|
|
2748
|
-
const i = this.getResourceSrc(s);
|
|
2749
|
-
i && this.containerResources.add(i);
|
|
2750
|
-
}
|
|
2751
|
-
});
|
|
2752
|
-
});
|
|
2753
|
-
}
|
|
2754
|
-
/**
|
|
2755
|
-
* Initial scan of container for existing resources
|
|
2756
|
-
*/
|
|
2757
|
-
scanContainerResources() {
|
|
2758
|
-
this.container && (this.scanElementForResources(this.container), this.config.debug && this.logger.debug(`📊 Initial container scan found ${this.containerResources.size} resources`));
|
|
2759
|
-
}
|
|
2760
|
-
/**
|
|
2761
|
-
* Set up PerformanceObserver to track resource loading timing
|
|
2762
|
-
*/
|
|
2763
|
-
setupPerformanceObserver() {
|
|
2764
|
-
if (!this.isBrowser || typeof PerformanceObserver > "u") {
|
|
2765
|
-
this.logger.debug("PerformanceObserver not available");
|
|
2766
|
-
return;
|
|
2767
|
-
}
|
|
2768
|
-
try {
|
|
2769
|
-
this.observer = new PerformanceObserver((t) => {
|
|
2770
|
-
for (const n of t.getEntries())
|
|
2771
|
-
n.entryType === "resource" && this.handleResourceTiming(n);
|
|
2772
|
-
}), this.observer.observe({
|
|
2773
|
-
type: "resource",
|
|
2774
|
-
buffered: !0
|
|
2775
|
-
// Capture resources loaded before observer started
|
|
2776
|
-
}), this.logger.debug("PerformanceObserver set up successfully");
|
|
2777
|
-
} catch (t) {
|
|
2778
|
-
this.logger.warn("Failed to set up PerformanceObserver:", t);
|
|
2779
|
-
}
|
|
2780
|
-
}
|
|
2781
|
-
/**
|
|
2782
|
-
* Handle resource timing entry
|
|
2783
|
-
*/
|
|
2784
|
-
handleResourceTiming(t) {
|
|
2785
|
-
if (!this.isRelevantResource(t))
|
|
2786
|
-
return;
|
|
2787
|
-
const r = t.duration, s = t.transferSize, i = t.name, o = t.responseEnd === 0 && t.duration > 0, l = this.retryAttempts.has(i), u = this.retryAttempts.get(i) || 0;
|
|
2788
|
-
if (this.config.debug) {
|
|
2789
|
-
const a = this.truncateUrl(i), f = (s / 1024).toFixed(2), d = o ? "❌ FAILED" : "✅ SUCCESS", c = {
|
|
2790
|
-
total: `${r.toFixed(2)}ms`,
|
|
2791
|
-
dns: t.domainLookupEnd > 0 ? `${(t.domainLookupEnd - t.domainLookupStart).toFixed(2)}ms` : "n/a",
|
|
2792
|
-
tcp: t.connectEnd > 0 ? `${(t.connectEnd - t.connectStart).toFixed(2)}ms` : "n/a",
|
|
2793
|
-
request: t.responseStart > 0 ? `${(t.responseStart - t.requestStart).toFixed(2)}ms` : "n/a",
|
|
2794
|
-
response: t.responseEnd > 0 ? `${(t.responseEnd - t.responseStart).toFixed(2)}ms` : "n/a",
|
|
2795
|
-
size: s > 0 ? `${f} KB` : "0 KB",
|
|
2796
|
-
type: t.initiatorType,
|
|
2797
|
-
protocol: t.nextHopProtocol || "unknown"
|
|
2798
|
-
}, h = l && !o ? `
|
|
2799
|
-
🔄 Retry Success: Succeeded after ${u} ${u === 1 ? "retry" : "retries"}` : "";
|
|
2800
|
-
this.logger.info(
|
|
2801
|
-
`📊 PIE Resource Load ${d}
|
|
2802
|
-
URL: ${a}
|
|
2803
|
-
Type: ${c.type} | Protocol: ${c.protocol}
|
|
2804
|
-
⏱️ Total Time: ${c.total}
|
|
2805
|
-
└─ DNS Lookup: ${c.dns}
|
|
2806
|
-
└─ TCP Connect: ${c.tcp}
|
|
2807
|
-
└─ Request Time: ${c.request}
|
|
2808
|
-
└─ Response Time: ${c.response}
|
|
2809
|
-
📦 Transfer Size: ${c.size}${h}`
|
|
2810
|
-
);
|
|
2811
|
-
} else
|
|
2812
|
-
this.logger.debug(`Resource loaded: ${t.name}`, {
|
|
2813
|
-
duration: `${r.toFixed(2)}ms`,
|
|
2814
|
-
size: `${s} bytes`,
|
|
2815
|
-
type: t.initiatorType,
|
|
2816
|
-
failed: o,
|
|
2817
|
-
wasRetried: l,
|
|
2818
|
-
retryCount: u
|
|
2819
|
-
});
|
|
2820
|
-
o || this.handleSuccessfulLoad(i, t, r, s, u, l), this.trackNewRelicAction("pie-resource-load", {
|
|
2821
|
-
url: t.name,
|
|
2822
|
-
duration: Math.round(r),
|
|
2823
|
-
size: s,
|
|
2824
|
-
type: t.initiatorType,
|
|
2825
|
-
failed: o,
|
|
2826
|
-
wasRetried: l,
|
|
2827
|
-
retryCount: u
|
|
2828
|
-
}), o && this.handleFailedLoad(i, t, r, u, l);
|
|
2829
|
-
}
|
|
2830
|
-
/**
|
|
2831
|
-
* Handle successful resource load
|
|
2832
|
-
*/
|
|
2833
|
-
handleSuccessfulLoad(t, n, r, s, i, o) {
|
|
2834
|
-
if (this.dispatchEvent("pie-resource-load-success", {
|
|
2835
|
-
url: t,
|
|
2836
|
-
resourceType: n.initiatorType,
|
|
2837
|
-
duration: r,
|
|
2838
|
-
size: s,
|
|
2839
|
-
retryCount: i,
|
|
2840
|
-
maxRetries: this.config.maxRetries
|
|
2841
|
-
}), o) {
|
|
2842
|
-
const l = this.truncateUrl(t);
|
|
2843
|
-
this.logger.info(
|
|
2844
|
-
`✅ PIE Resource Retry Succeeded!
|
|
2845
|
-
URL: ${l}
|
|
2846
|
-
Retry Attempt: ${i}
|
|
2847
|
-
Load Time: ${r.toFixed(2)}ms
|
|
2848
|
-
Result: Resource now available to user`
|
|
2849
|
-
), this.dispatchEvent("pie-resource-retry-success", {
|
|
2850
|
-
url: t,
|
|
2851
|
-
resourceType: n.initiatorType,
|
|
2852
|
-
duration: r,
|
|
2853
|
-
size: s,
|
|
2854
|
-
retryCount: i,
|
|
2855
|
-
maxRetries: this.config.maxRetries
|
|
2856
|
-
}), this.retryAttempts.delete(t);
|
|
2857
|
-
}
|
|
2858
|
-
}
|
|
2859
|
-
/**
|
|
2860
|
-
* Handle failed resource load
|
|
2861
|
-
*/
|
|
2862
|
-
handleFailedLoad(t, n, r, s, i) {
|
|
2863
|
-
const o = this.truncateUrl(t);
|
|
2864
|
-
i ? (this.logger.error(
|
|
2865
|
-
`❌ PIE Resource Retry Failed
|
|
2866
|
-
URL: ${o}
|
|
2867
|
-
Retry Attempt: ${s}
|
|
2868
|
-
Remaining Attempts: ${this.config.maxRetries - s}
|
|
2869
|
-
Status: Will ${s >= this.config.maxRetries ? "give up" : "retry again"}`
|
|
2870
|
-
), this.dispatchEvent("pie-resource-retry-failed", {
|
|
2871
|
-
url: t,
|
|
2872
|
-
resourceType: n.initiatorType,
|
|
2873
|
-
duration: r,
|
|
2874
|
-
retryCount: s,
|
|
2875
|
-
maxRetries: this.config.maxRetries,
|
|
2876
|
-
error: "Resource load failed after retry"
|
|
2877
|
-
})) : (this.logger.error(
|
|
2878
|
-
`❌ PIE Resource Initial Load Failed
|
|
2879
|
-
URL: ${o}
|
|
2880
|
-
Status: Will attempt ${this.config.maxRetries} ${this.config.maxRetries === 1 ? "retry" : "retries"}`
|
|
2881
|
-
), this.dispatchEvent("pie-resource-load-failed", {
|
|
2882
|
-
url: t,
|
|
2883
|
-
resourceType: n.initiatorType,
|
|
2884
|
-
duration: r,
|
|
2885
|
-
retryCount: 0,
|
|
2886
|
-
maxRetries: this.config.maxRetries,
|
|
2887
|
-
error: "Initial resource load failed"
|
|
2888
|
-
})), this.trackNewRelicError(
|
|
2889
|
-
new Error(`Resource load failed: ${n.name}`),
|
|
2890
|
-
{
|
|
2891
|
-
resourceUrl: n.name,
|
|
2892
|
-
resourceType: n.initiatorType,
|
|
2893
|
-
duration: Math.round(r),
|
|
2894
|
-
wasRetried: i,
|
|
2895
|
-
retryCount: s
|
|
2896
|
-
}
|
|
2897
|
-
);
|
|
2898
|
-
}
|
|
2899
|
-
/**
|
|
2900
|
-
* Check if resource is relevant to our container
|
|
2901
|
-
* Uses container-scoped tracking via MutationObserver
|
|
2902
|
-
*/
|
|
2903
|
-
isRelevantResource(t) {
|
|
2904
|
-
const n = t.name, r = this.containerResources.has(n);
|
|
2905
|
-
if (!r) {
|
|
2906
|
-
for (const s of this.containerResources)
|
|
2907
|
-
if (n.endsWith(s) || s.endsWith(n))
|
|
2908
|
-
return !0;
|
|
2909
|
-
}
|
|
2910
|
-
return r;
|
|
2911
|
-
}
|
|
2912
|
-
/**
|
|
2913
|
-
* Set up error event handler for resource loading failures
|
|
2914
|
-
*/
|
|
2915
|
-
setupErrorHandler() {
|
|
2916
|
-
this.container && (this.errorHandler = (t) => {
|
|
2917
|
-
const n = t.target;
|
|
2918
|
-
if (!this.isResourceElement(n))
|
|
2919
|
-
return;
|
|
2920
|
-
const r = n.tagName.toLowerCase(), s = this.getResourceSrc(n);
|
|
2921
|
-
if (s) {
|
|
2922
|
-
if (this.config.debug) {
|
|
2923
|
-
const i = this.truncateUrl(s), o = this.retryAttempts.get(s) || 0, l = this.config.maxRetries - o;
|
|
2924
|
-
this.logger.error(
|
|
2925
|
-
`❌ PIE Resource Load Error
|
|
2926
|
-
Element: <${r}>
|
|
2927
|
-
URL: ${i}
|
|
2928
|
-
Current Attempts: ${o}
|
|
2929
|
-
Remaining Retries: ${l}/${this.config.maxRetries}
|
|
2930
|
-
Action: ${l > 0 ? "Will retry with exponential backoff" : "Max retries reached, giving up"}`
|
|
2931
|
-
);
|
|
2932
|
-
} else
|
|
2933
|
-
this.logger.error(`❌ Resource error: ${r} failed to load ${s}`);
|
|
2934
|
-
this.trackNewRelicError(
|
|
2935
|
-
new Error(`Resource load error: ${s}`),
|
|
2936
|
-
{
|
|
2937
|
-
resourceType: r,
|
|
2938
|
-
resourceUrl: s
|
|
2939
|
-
}
|
|
2940
|
-
), this.retryResourceLoad(n, s);
|
|
2941
|
-
}
|
|
2942
|
-
}, this.container.addEventListener("error", this.errorHandler, !0), this.logger.debug("Error handler attached to container"));
|
|
2943
|
-
}
|
|
2944
|
-
/**
|
|
2945
|
-
* Check if element is a resource element
|
|
2946
|
-
*/
|
|
2947
|
-
isResourceElement(t) {
|
|
2948
|
-
if (!t || !(t instanceof HTMLElement))
|
|
2949
|
-
return !1;
|
|
2950
|
-
const n = t.tagName.toLowerCase();
|
|
2951
|
-
return ["img", "audio", "video", "link", "source"].includes(n);
|
|
2952
|
-
}
|
|
2953
|
-
/**
|
|
2954
|
-
* Get resource src/href from element
|
|
2955
|
-
*/
|
|
2956
|
-
getResourceSrc(t) {
|
|
2957
|
-
return t instanceof HTMLLinkElement ? t.href : "src" in t && t.src ? t.src : null;
|
|
2958
|
-
}
|
|
2959
|
-
/**
|
|
2960
|
-
* Handle permanent resource failure after all retries exhausted
|
|
2961
|
-
*/
|
|
2962
|
-
handlePermanentFailure(t, n, r) {
|
|
2963
|
-
if (this.config.debug) {
|
|
2964
|
-
const s = this.truncateUrl(t);
|
|
2965
|
-
this.logger.error(
|
|
2966
|
-
`❌ PIE Resource Permanently Failed
|
|
2967
|
-
URL: ${s}
|
|
2968
|
-
Total Attempts: ${r + 1} (initial + ${r} retries)
|
|
2969
|
-
Status: Giving up after ${this.config.maxRetries} retries
|
|
2970
|
-
⚠️ This resource will not be available to the user`
|
|
2971
|
-
);
|
|
2972
|
-
} else
|
|
2973
|
-
this.logger.error(`❌ Failed to load resource after ${this.config.maxRetries} retries: ${t}`);
|
|
2974
|
-
this.dispatchEvent("pie-resource-load-error", {
|
|
2975
|
-
url: t,
|
|
2976
|
-
resourceType: n,
|
|
2977
|
-
retryCount: r,
|
|
2978
|
-
maxRetries: this.config.maxRetries,
|
|
2979
|
-
error: `Resource permanently failed after ${this.config.maxRetries} retries`
|
|
2980
|
-
}), this.trackNewRelicError(
|
|
2981
|
-
new Error(`Resource permanently failed after ${this.config.maxRetries} retries: ${t}`),
|
|
2982
|
-
{
|
|
2983
|
-
resourceUrl: t,
|
|
2984
|
-
retryCount: r,
|
|
2985
|
-
resourceType: n
|
|
2986
|
-
}
|
|
2987
|
-
);
|
|
2988
|
-
}
|
|
2989
|
-
/**
|
|
2990
|
-
* Log retry schedule information
|
|
2991
|
-
*/
|
|
2992
|
-
logRetrySchedule(t, n, r, s) {
|
|
2993
|
-
if (this.config.debug) {
|
|
2994
|
-
const i = this.truncateUrl(t), o = Math.min(
|
|
2995
|
-
this.config.initialRetryDelay * Math.pow(2, n + 1),
|
|
2996
|
-
this.config.maxRetryDelay
|
|
2997
|
-
), l = s === "img" ? "Cache-busting URL" : s === "audio" || s === "video" ? "element.load()" : "Element replacement";
|
|
2998
|
-
this.logger.info(
|
|
2999
|
-
`🔄 PIE Resource Retry Scheduled
|
|
3000
|
-
URL: ${i}
|
|
3001
|
-
Attempt: ${n + 1}/${this.config.maxRetries}
|
|
3002
|
-
⏰ Wait Time: ${r}ms (exponential backoff)
|
|
3003
|
-
Next Retry Delay: ${o}ms (if this fails)
|
|
3004
|
-
Strategy: ${l}`
|
|
3005
|
-
);
|
|
3006
|
-
} else
|
|
3007
|
-
this.logger.info(`🔄 Retrying resource load (attempt ${n + 1}/${this.config.maxRetries}) after ${r}ms: ${t}`);
|
|
3008
|
-
}
|
|
3009
|
-
/**
|
|
3010
|
-
* Retry loading a failed resource with exponential backoff
|
|
3011
|
-
*/
|
|
3012
|
-
async retryResourceLoad(t, n) {
|
|
3013
|
-
const r = this.retryAttempts.get(n) || 0;
|
|
3014
|
-
if (r >= this.config.maxRetries) {
|
|
3015
|
-
this.handlePermanentFailure(n, t.tagName.toLowerCase(), r);
|
|
3016
|
-
return;
|
|
3017
|
-
}
|
|
3018
|
-
const s = Math.min(
|
|
3019
|
-
this.config.initialRetryDelay * Math.pow(2, r),
|
|
3020
|
-
this.config.maxRetryDelay
|
|
3021
|
-
);
|
|
3022
|
-
this.logRetrySchedule(n, r, s, t.tagName.toLowerCase()), this.trackNewRelicAction("pie-resource-retry", {
|
|
3023
|
-
url: n,
|
|
3024
|
-
attempt: r + 1,
|
|
3025
|
-
delay: s
|
|
3026
|
-
}), await new Promise((i) => setTimeout(i, s)), this.config.debug && this.logger.debug(`⏱️ Retry wait completed (${s}ms), attempting reload now...`), this.retryAttempts.set(n, r + 1);
|
|
3027
|
-
try {
|
|
3028
|
-
if (t instanceof HTMLAudioElement || t instanceof HTMLVideoElement)
|
|
3029
|
-
t.load(), this.config.debug ? this.logger.debug(`✓ Triggered load() on <${t.tagName.toLowerCase()}>`) : this.logger.debug(`Triggered load() on ${t.tagName.toLowerCase()}`);
|
|
3030
|
-
else if (t instanceof HTMLImageElement) {
|
|
3031
|
-
const i = new URL(n);
|
|
3032
|
-
i.searchParams.set("retry", (r + 1).toString()), i.searchParams.set("t", Date.now().toString()), t.src = i.toString(), this.config.debug ? this.logger.debug(`✓ Updated <img> src with cache-busting params: retry=${r + 1}, t=${Date.now()}`) : this.logger.debug("Updated img src with cache-busting params");
|
|
3033
|
-
} else if (t instanceof HTMLLinkElement) {
|
|
3034
|
-
const i = t.cloneNode(!0), o = new URL(n);
|
|
3035
|
-
o.searchParams.set("retry", (r + 1).toString()), i.href = o.toString(), t.parentNode?.replaceChild(i, t), this.config.debug ? this.logger.debug("✓ Recreated <link> element with cache-busting params") : this.logger.debug("Recreated link element with cache-busting params");
|
|
3036
|
-
}
|
|
3037
|
-
} catch (i) {
|
|
3038
|
-
this.config.debug ? this.logger.error(`❌ Error during retry attempt for ${n}:`, i) : this.logger.error(`Error during retry for ${n}:`, i);
|
|
3039
|
-
}
|
|
3040
|
-
}
|
|
3041
|
-
/**
|
|
3042
|
-
* Dispatch a custom event from the container
|
|
3043
|
-
*/
|
|
3044
|
-
dispatchEvent(t, n) {
|
|
3045
|
-
if (!this.container)
|
|
3046
|
-
return;
|
|
3047
|
-
const r = new CustomEvent(t, {
|
|
3048
|
-
detail: n,
|
|
3049
|
-
bubbles: !0,
|
|
3050
|
-
composed: !0
|
|
3051
|
-
// Allow crossing shadow DOM boundaries
|
|
3052
|
-
});
|
|
3053
|
-
this.container.dispatchEvent(r);
|
|
3054
|
-
}
|
|
3055
|
-
/**
|
|
3056
|
-
* Get current retry statistics
|
|
3057
|
-
*/
|
|
3058
|
-
getStats() {
|
|
3059
|
-
const t = [];
|
|
3060
|
-
return this.retryAttempts.forEach((n, r) => {
|
|
3061
|
-
t.push({ url: r, attempts: n });
|
|
3062
|
-
}), {
|
|
3063
|
-
activeRetries: this.retryAttempts.size,
|
|
3064
|
-
failedResources: t.sort((n, r) => r.attempts - n.attempts)
|
|
3065
|
-
};
|
|
3066
|
-
}
|
|
3067
|
-
}
|
|
3068
|
-
const Fi = 5e3;
|
|
3069
|
-
function Oi(e, t, n, r = "pie-player") {
|
|
3070
|
-
const s = je("use-resource-monitor", n());
|
|
3071
|
-
let i = U(null), o = U(!1);
|
|
3072
|
-
return Ce(() => {
|
|
3073
|
-
const l = e(), u = t(), a = n();
|
|
3074
|
-
l && !p(o) && u?.trackPageActions && (s.debug(`Initializing resource monitor for ${r}`), _(
|
|
3075
|
-
i,
|
|
3076
|
-
new Ii({
|
|
3077
|
-
trackPageActions: u.trackPageActions,
|
|
3078
|
-
maxRetries: u.maxResourceRetries ?? kt.maxResourceRetries,
|
|
3079
|
-
initialRetryDelay: u.resourceRetryDelay ?? kt.resourceRetryDelay,
|
|
3080
|
-
maxRetryDelay: Fi,
|
|
3081
|
-
debug: a
|
|
3082
|
-
}),
|
|
3083
|
-
!0
|
|
3084
|
-
), p(i).start(l), _(o, !0), s.info(`✅ Resource monitoring enabled for ${r}`));
|
|
3085
|
-
}), fi(() => {
|
|
3086
|
-
if (p(i)) {
|
|
3087
|
-
const l = p(i).getStats();
|
|
3088
|
-
s.debug(`Resource monitor stats at cleanup for ${r}:`, l), p(i).stop(), _(i, null), _(o, !1);
|
|
3089
|
-
}
|
|
3090
|
-
}), {
|
|
3091
|
-
get instance() {
|
|
3092
|
-
return p(i);
|
|
3093
|
-
},
|
|
3094
|
-
getStats() {
|
|
3095
|
-
return p(i)?.getStats() ?? { activeRetries: 0, failedResources: [] };
|
|
3096
|
-
},
|
|
3097
|
-
get isActive() {
|
|
3098
|
-
return p(o) && S(p(i), null, !1);
|
|
3099
|
-
}
|
|
3100
|
-
};
|
|
3101
|
-
}
|
|
3102
|
-
Er();
|
|
3103
|
-
we[k] = "src/lib/tags/pie-fixed-player/PieFixedPlayer.svelte";
|
|
3104
|
-
var Ui = Se(
|
|
3105
|
-
/* @__PURE__ */ xe(`<div class="pie-player-error" style="
|
|
2725
|
+
};
|
|
2726
|
+
Sr();
|
|
2727
|
+
we[R] = "src/lib/tags/pie-fixed-player/PieFixedPlayer.svelte";
|
|
2728
|
+
var Li = Te(
|
|
2729
|
+
/* @__PURE__ */ Ie(`<div class="pie-player-error" style="
|
|
3106
2730
|
padding: 20px;
|
|
3107
2731
|
margin: 20px;
|
|
3108
2732
|
border: 2px solid #d32f2f;
|
|
@@ -3111,333 +2735,338 @@ var Ui = Se(
|
|
|
3111
2735
|
color: #c62828;
|
|
3112
2736
|
font-family: sans-serif;
|
|
3113
2737
|
"><h3 style="margin: 0 0 10px 0">⚠️ Configuration Error</h3> <p style="margin: 0"> </p></div>`),
|
|
3114
|
-
we[
|
|
3115
|
-
[[
|
|
3116
|
-
),
|
|
3117
|
-
const
|
|
3118
|
-
hash: "svelte-
|
|
2738
|
+
we[R],
|
|
2739
|
+
[[337, 2, [[346, 3], [347, 3]]]]
|
|
2740
|
+
), Oi = Te(/* @__PURE__ */ Ie('<div class="pie-loading" style="padding: 20px; text-align: center;"><p>Loading...</p></div>'), we[R], [[350, 2, [[351, 3]]]]), Bi = Te(/* @__PURE__ */ Ie('<div class="pie-stimulus-container" style="display: flex; gap: 20px; width: 100%;"><div style="flex: 1; min-width: 0;"><!></div> <div style="flex: 1; min-width: 0;"><!></div></div>'), we[R], [[356, 2, [[357, 3], [373, 3]]]]), Ui = Te(/* @__PURE__ */ Ie("<div><!></div>"), we[R], [[392, 2]]), Di = Te(/* @__PURE__ */ Ie("<div><!></div>"), we[R], [[335, 0]]);
|
|
2741
|
+
const Ai = {
|
|
2742
|
+
hash: "svelte-10l24ug",
|
|
3119
2743
|
code: `
|
|
3120
2744
|
:host {
|
|
3121
2745
|
display: block;
|
|
3122
2746
|
}
|
|
3123
|
-
|
|
2747
|
+
|
|
3124
2748
|
.pie-fixed-player {
|
|
3125
2749
|
width: 100%;
|
|
3126
2750
|
}
|
|
3127
|
-
|
|
2751
|
+
|
|
3128
2752
|
.player-item-container,
|
|
3129
2753
|
.player-stimulus-container {
|
|
3130
2754
|
width: 100%;
|
|
3131
2755
|
}
|
|
3132
2756
|
|
|
3133
|
-
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
2757
|
+
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGllRml4ZWRQbGF5ZXIuc3ZlbHRlIiwibWFwcGluZ3MiOiI7QUE4WkEsQ0FBQyxLQUFLLENBQUM7QUFDUCxFQUFFLGNBQWM7QUFDaEI7O0FBRUEsQ0FBUyxpQkFBa0IsQ0FBQztBQUM1QixFQUFFLFdBQVc7QUFDYjs7QUFFQSxDQUFTLHNCQUF1QjtBQUNoQyxDQUFTLDBCQUEyQixDQUFDO0FBQ3JDLEVBQUUsV0FBVztBQUNiIiwibmFtZXMiOltdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlcyI6WyJQaWVGaXhlZFBsYXllci5zdmVsdGUiXX0= */`
|
|
3134
2758
|
};
|
|
3135
2759
|
function we(e, t) {
|
|
3136
|
-
|
|
3137
|
-
let n =
|
|
3138
|
-
const
|
|
3139
|
-
if (
|
|
3140
|
-
const
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
2760
|
+
Br(new.target), hn(t, !0, we), Dr(e, Ai);
|
|
2761
|
+
let n = I(t, "config", 7, null), r = I(t, "session", 23, () => ({ id: "", data: [] })), s = I(t, "env", 23, () => ({ mode: "gather", role: "student" })), i = I(t, "addCorrectResponse", 7, !1), o = I(t, "renderStimulus", 7, !0), a = I(t, "allowedResize", 7, !1), u = I(t, "showBottomBorder", 7, !1), l = I(t, "debug", 7, ""), c = I(t, "customClassname", 7, ""), f = I(t, "containerClass", 7, ""), d = I(t, "passageContainerClass", 7, ""), v = I(t, "externalStyleUrls", 7, ""), g = I(t, "bundleType", 7, "player.js"), y = I(t, "loaderConfig", 7, Yn);
|
|
2762
|
+
const b = T(typeof window, "undefined", !1) && T(typeof document, "undefined", !1), M = H(() => {
|
|
2763
|
+
if (T(l(), void 0, !1) && T(l(), null, !1)) {
|
|
2764
|
+
const m = String(l()), S = !(T(m.toLowerCase(), "false") || T(m, "0") || T(m, ""));
|
|
2765
|
+
if (b)
|
|
2766
|
+
try {
|
|
2767
|
+
window.PIE_DEBUG = S, console.log(...Mn("log", "[pie-fixed-player] Setting PIE_DEBUG:", S, "from debug prop:", l(), "type:", typeof l()));
|
|
2768
|
+
} catch {
|
|
2769
|
+
}
|
|
2770
|
+
return S;
|
|
2771
|
+
}
|
|
2772
|
+
const h = vt();
|
|
2773
|
+
return b && console.log(...Mn("log", "[pie-fixed-player] Using global PIE_DEBUG:", h)), h;
|
|
2774
|
+
}), L = dt("pie-fixed-player", () => _(M));
|
|
2775
|
+
let N = D(!0), F = D(null), $ = D(null), U = D(null), W = D(null);
|
|
2776
|
+
const be = c() || `pie-player-${Date.now().toString(36)}`;
|
|
2777
|
+
Me(() => {
|
|
3149
2778
|
if (n()) {
|
|
3150
2779
|
performance.mark("pie-load-end");
|
|
3151
2780
|
try {
|
|
3152
|
-
const
|
|
3153
|
-
if (
|
|
3154
|
-
const
|
|
3155
|
-
|
|
3156
|
-
} else if (
|
|
3157
|
-
const
|
|
3158
|
-
|
|
2781
|
+
const h = T(typeof n(), "string") ? JSON.parse(n()) : n();
|
|
2782
|
+
if (h.pie && h.passage) {
|
|
2783
|
+
const m = Jt({ config: h.pie }), S = Jt({ config: h.passage });
|
|
2784
|
+
w($, m.config, !0), w(U, o() ? S.config : null, !0), w(N, !1), w(F, null);
|
|
2785
|
+
} else if (h.elements || h.models || h.markup) {
|
|
2786
|
+
const m = Jt({ config: h });
|
|
2787
|
+
w($, m.config, !0), w(U, null), w(N, !1), w(F, null);
|
|
3159
2788
|
} else {
|
|
3160
|
-
const
|
|
3161
|
-
if (
|
|
2789
|
+
const m = "Invalid config: must contain elements, models, and markup, or pie/passage structure";
|
|
2790
|
+
if (w(F, m), w(N, !1), b && y()?.trackPageActions)
|
|
3162
2791
|
try {
|
|
3163
|
-
const
|
|
3164
|
-
|
|
2792
|
+
const S = window?.newrelic;
|
|
2793
|
+
S && T(typeof S.noticeError, "function") && S.noticeError(new Error(m), {
|
|
3165
2794
|
component: "pie-fixed-player",
|
|
3166
2795
|
errorType: "InvalidConfig"
|
|
3167
2796
|
});
|
|
3168
2797
|
} catch {
|
|
3169
|
-
|
|
2798
|
+
L.debug("New Relic tracking skipped (InvalidConfig)");
|
|
3170
2799
|
}
|
|
3171
2800
|
}
|
|
3172
|
-
} catch (
|
|
3173
|
-
const
|
|
3174
|
-
if (
|
|
2801
|
+
} catch (h) {
|
|
2802
|
+
const m = `Error parsing config: ${h.message}`;
|
|
2803
|
+
if (w(F, m), w(N, !1), b && y()?.trackPageActions)
|
|
3175
2804
|
try {
|
|
3176
|
-
const
|
|
3177
|
-
|
|
2805
|
+
const S = window?.newrelic;
|
|
2806
|
+
S && T(typeof S.noticeError, "function") && S.noticeError(h, {
|
|
3178
2807
|
component: "pie-fixed-player",
|
|
3179
2808
|
errorType: "ConfigParseError"
|
|
3180
2809
|
});
|
|
3181
2810
|
} catch {
|
|
3182
|
-
|
|
2811
|
+
L.debug("New Relic tracking skipped (ConfigParseError)");
|
|
3183
2812
|
}
|
|
3184
2813
|
}
|
|
3185
2814
|
} else
|
|
3186
|
-
|
|
2815
|
+
w($, null), w(U, null), w(N, !0);
|
|
3187
2816
|
});
|
|
3188
|
-
const
|
|
3189
|
-
if (!(!
|
|
3190
|
-
if (document.querySelector(`style[data-pie-style="${
|
|
3191
|
-
|
|
2817
|
+
const ht = async (h) => {
|
|
2818
|
+
if (!(!b || !h || T(typeof h, "string", !1))) {
|
|
2819
|
+
if (document.querySelector(`style[data-pie-style="${h}"]`)) {
|
|
2820
|
+
L.debug(`Stylesheet already loaded: ${h}`);
|
|
3192
2821
|
return;
|
|
3193
2822
|
}
|
|
3194
2823
|
try {
|
|
3195
|
-
const se = (await (await fetch(
|
|
3196
|
-
ie.setAttribute("data-pie-style",
|
|
3197
|
-
} catch (
|
|
3198
|
-
|
|
2824
|
+
const se = (await (await fetch(h)).text()).replace(/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g, `.pie-fixed-player.${be} $1$2`), ie = document.createElement("style");
|
|
2825
|
+
ie.setAttribute("data-pie-style", h), ie.textContent = se, document.head.appendChild(ie), L.info(`✅ Loaded and scoped stylesheet: ${h}`);
|
|
2826
|
+
} catch (m) {
|
|
2827
|
+
L.error(`❌ Failed to load external stylesheet: ${h}`, m);
|
|
3199
2828
|
}
|
|
3200
2829
|
}
|
|
3201
2830
|
};
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
2831
|
+
Me(() => {
|
|
2832
|
+
v() && T(typeof v(), "string") && v().split(",").map((m) => m.trim()).forEach((m) => {
|
|
2833
|
+
m && ht(m);
|
|
3205
2834
|
});
|
|
3206
|
-
}),
|
|
3207
|
-
if (!
|
|
3208
|
-
const
|
|
3209
|
-
Array.isArray(
|
|
3210
|
-
const
|
|
3211
|
-
|
|
2835
|
+
}), Me(() => {
|
|
2836
|
+
if (!_($)?.resources?.stylesheets) return;
|
|
2837
|
+
const h = _($).resources.stylesheets;
|
|
2838
|
+
Array.isArray(h) && h.forEach((m) => {
|
|
2839
|
+
const S = m?.url;
|
|
2840
|
+
S && T(typeof S, "string") && ht(S);
|
|
3212
2841
|
});
|
|
3213
|
-
}),
|
|
3214
|
-
u() &&
|
|
3215
|
-
Object.keys(
|
|
3216
|
-
document.querySelectorAll(
|
|
2842
|
+
}), Me(() => {
|
|
2843
|
+
u() && T(s().mode, "evaluate") && _($)?.elements && mr().then(() => {
|
|
2844
|
+
Object.keys(_($).elements).forEach((m) => {
|
|
2845
|
+
document.querySelectorAll(m).forEach((se) => {
|
|
3217
2846
|
se instanceof HTMLElement && (se.style.borderBottom = "1px solid #ddd", se.style.paddingBottom = "20px", se.style.marginBottom = "20px");
|
|
3218
2847
|
});
|
|
3219
2848
|
});
|
|
3220
2849
|
});
|
|
3221
2850
|
});
|
|
3222
|
-
const
|
|
3223
|
-
const
|
|
3224
|
-
detail:
|
|
2851
|
+
const de = (h) => {
|
|
2852
|
+
const m = new CustomEvent(h.type, {
|
|
2853
|
+
detail: h.detail,
|
|
3225
2854
|
bubbles: !0,
|
|
3226
2855
|
composed: !0
|
|
3227
2856
|
});
|
|
3228
|
-
|
|
3229
|
-
},
|
|
3230
|
-
|
|
2857
|
+
_(W)?.parentElement ? (_(W).parentElement.dispatchEvent(m), L.debug(`Dispatched ${h.type} event from custom element host`)) : L.warn("⚠️ Cannot dispatch event: custom element host not found");
|
|
2858
|
+
}, He = (h) => {
|
|
2859
|
+
de(h);
|
|
3231
2860
|
};
|
|
3232
|
-
var
|
|
3233
|
-
|
|
3234
|
-
var
|
|
2861
|
+
var p = Di();
|
|
2862
|
+
ze(p, 1, `pie-fixed-player ${be ?? ""}`);
|
|
2863
|
+
var k = le(p);
|
|
3235
2864
|
{
|
|
3236
|
-
var
|
|
3237
|
-
var
|
|
3238
|
-
oe(
|
|
3239
|
-
},
|
|
2865
|
+
var Y = (h) => {
|
|
2866
|
+
var m = Li(), S = Zt(le(m), 2), se = le(S, !0);
|
|
2867
|
+
oe(S), oe(m), rt(() => ui(se, _(F))), he(h, m);
|
|
2868
|
+
}, xe = (h, m) => {
|
|
3240
2869
|
{
|
|
3241
|
-
var
|
|
3242
|
-
var Nt =
|
|
3243
|
-
|
|
2870
|
+
var S = (ie) => {
|
|
2871
|
+
var Nt = Oi();
|
|
2872
|
+
he(ie, Nt);
|
|
3244
2873
|
}, se = (ie, Nt) => {
|
|
3245
2874
|
{
|
|
3246
|
-
var
|
|
3247
|
-
var Ee = Bi(),
|
|
3248
|
-
const
|
|
3249
|
-
ce(
|
|
2875
|
+
var qr = (Ae) => {
|
|
2876
|
+
var Ee = Bi(), Ne = le(Ee), jt = le(Ne);
|
|
2877
|
+
const Qt = H(() => T(typeof s(), "string") ? JSON.parse(s()) : s()), Mt = H(() => (T(typeof r(), "string") ? JSON.parse(r()) : r()).data || []), $e = H(() => T(g(), "client-player.js") ? Q.clientPlayer : Q.player);
|
|
2878
|
+
ce(jt, {
|
|
3250
2879
|
get itemConfig() {
|
|
3251
|
-
return
|
|
2880
|
+
return _(U);
|
|
3252
2881
|
},
|
|
3253
2882
|
get env() {
|
|
3254
|
-
return
|
|
2883
|
+
return _(Qt);
|
|
3255
2884
|
},
|
|
3256
2885
|
get session() {
|
|
3257
|
-
return
|
|
2886
|
+
return _(Mt);
|
|
3258
2887
|
},
|
|
3259
2888
|
get addCorrectResponse() {
|
|
3260
2889
|
return i();
|
|
3261
2890
|
},
|
|
3262
|
-
customClassname:
|
|
2891
|
+
customClassname: be,
|
|
3263
2892
|
get bundleType() {
|
|
3264
|
-
return
|
|
2893
|
+
return _($e);
|
|
3265
2894
|
},
|
|
3266
|
-
onLoadComplete: (
|
|
3267
|
-
onPlayerError: (
|
|
3268
|
-
onSessionChanged: (
|
|
3269
|
-
}), oe(
|
|
3270
|
-
var zt = Zt(
|
|
3271
|
-
const
|
|
3272
|
-
ce(
|
|
2895
|
+
onLoadComplete: (G) => de(new CustomEvent("load-complete", { detail: G })),
|
|
2896
|
+
onPlayerError: (G) => de(new CustomEvent("player-error", { detail: G })),
|
|
2897
|
+
onSessionChanged: (G) => He(new CustomEvent("session-changed", { detail: G }))
|
|
2898
|
+
}), oe(Ne);
|
|
2899
|
+
var zt = Zt(Ne, 2), Yr = le(zt);
|
|
2900
|
+
const Gr = H(() => T(typeof s(), "string") ? JSON.parse(s()) : s()), Jr = H(() => (T(typeof r(), "string") ? JSON.parse(r()) : r()).data || []), Xr = H(() => T(g(), "client-player.js") ? Q.clientPlayer : Q.player);
|
|
2901
|
+
ce(Yr, {
|
|
3273
2902
|
get itemConfig() {
|
|
3274
|
-
return
|
|
2903
|
+
return _($);
|
|
3275
2904
|
},
|
|
3276
2905
|
get env() {
|
|
3277
|
-
return
|
|
2906
|
+
return _(Gr);
|
|
3278
2907
|
},
|
|
3279
2908
|
get session() {
|
|
3280
|
-
return
|
|
2909
|
+
return _(Jr);
|
|
3281
2910
|
},
|
|
3282
2911
|
get addCorrectResponse() {
|
|
3283
2912
|
return i();
|
|
3284
2913
|
},
|
|
3285
|
-
customClassname:
|
|
2914
|
+
customClassname: be,
|
|
3286
2915
|
get bundleType() {
|
|
3287
|
-
return
|
|
2916
|
+
return _(Xr);
|
|
3288
2917
|
},
|
|
3289
|
-
onLoadComplete: (
|
|
3290
|
-
onPlayerError: (
|
|
3291
|
-
onSessionChanged: (
|
|
3292
|
-
}), oe(zt), oe(Ee),
|
|
3293
|
-
|
|
3294
|
-
}),
|
|
3295
|
-
},
|
|
3296
|
-
var Ee =
|
|
3297
|
-
const
|
|
3298
|
-
ce(
|
|
2918
|
+
onLoadComplete: (G) => de(new CustomEvent("load-complete", { detail: G })),
|
|
2919
|
+
onPlayerError: (G) => de(new CustomEvent("player-error", { detail: G })),
|
|
2920
|
+
onSessionChanged: (G) => He(new CustomEvent("session-changed", { detail: G }))
|
|
2921
|
+
}), oe(zt), oe(Ee), rt(() => {
|
|
2922
|
+
ze(Ne, 1, `player-stimulus-container ${d() ?? ""}`), ze(zt, 1, `player-item-container ${f() ?? ""}`);
|
|
2923
|
+
}), he(Ae, Ee);
|
|
2924
|
+
}, Vr = (Ae) => {
|
|
2925
|
+
var Ee = Ui(), Ne = le(Ee);
|
|
2926
|
+
const jt = H(() => T(typeof s(), "string") ? JSON.parse(s()) : s()), Qt = H(() => (T(typeof r(), "string") ? JSON.parse(r()) : r()).data || []), Mt = H(() => T(g(), "client-player.js") ? Q.clientPlayer : Q.player);
|
|
2927
|
+
ce(Ne, {
|
|
3299
2928
|
get itemConfig() {
|
|
3300
|
-
return
|
|
2929
|
+
return _($);
|
|
3301
2930
|
},
|
|
3302
2931
|
get passageConfig() {
|
|
3303
|
-
return
|
|
2932
|
+
return _(U);
|
|
3304
2933
|
},
|
|
3305
2934
|
get env() {
|
|
3306
|
-
return
|
|
2935
|
+
return _(jt);
|
|
3307
2936
|
},
|
|
3308
2937
|
get session() {
|
|
3309
|
-
return
|
|
2938
|
+
return _(Qt);
|
|
3310
2939
|
},
|
|
3311
2940
|
get addCorrectResponse() {
|
|
3312
2941
|
return i();
|
|
3313
2942
|
},
|
|
3314
|
-
customClassname:
|
|
2943
|
+
customClassname: be,
|
|
3315
2944
|
get passageContainerClass() {
|
|
3316
|
-
return
|
|
2945
|
+
return d();
|
|
3317
2946
|
},
|
|
3318
2947
|
get containerClass() {
|
|
3319
|
-
return
|
|
2948
|
+
return f();
|
|
3320
2949
|
},
|
|
3321
2950
|
get bundleType() {
|
|
3322
|
-
return
|
|
2951
|
+
return _(Mt);
|
|
3323
2952
|
},
|
|
3324
|
-
onLoadComplete: ($e) =>
|
|
3325
|
-
onPlayerError: ($e) =>
|
|
3326
|
-
onSessionChanged: ($e) =>
|
|
3327
|
-
}), oe(Ee),
|
|
2953
|
+
onLoadComplete: ($e) => de(new CustomEvent("load-complete", { detail: $e })),
|
|
2954
|
+
onPlayerError: ($e) => de(new CustomEvent("player-error", { detail: $e })),
|
|
2955
|
+
onSessionChanged: ($e) => He(new CustomEvent("session-changed", { detail: $e }))
|
|
2956
|
+
}), oe(Ee), rt(() => ze(Ee, 1, `player-item-container ${f() ?? ""}`)), he(Ae, Ee);
|
|
3328
2957
|
};
|
|
3329
|
-
|
|
2958
|
+
it(
|
|
3330
2959
|
ie,
|
|
3331
|
-
(
|
|
3332
|
-
|
|
2960
|
+
(Ae) => {
|
|
2961
|
+
_(U) && o() ? Ae(qr) : Ae(Vr, !1);
|
|
3333
2962
|
},
|
|
3334
2963
|
Nt
|
|
3335
2964
|
);
|
|
3336
2965
|
}
|
|
3337
2966
|
};
|
|
3338
|
-
|
|
3339
|
-
|
|
2967
|
+
it(
|
|
2968
|
+
h,
|
|
3340
2969
|
(ie) => {
|
|
3341
|
-
|
|
2970
|
+
_(N) || !_($) ? ie(S) : ie(se, !1);
|
|
3342
2971
|
},
|
|
3343
|
-
|
|
2972
|
+
m
|
|
3344
2973
|
);
|
|
3345
2974
|
}
|
|
3346
2975
|
};
|
|
3347
|
-
|
|
3348
|
-
|
|
2976
|
+
it(k, (h) => {
|
|
2977
|
+
_(F) ? h(Y) : h(xe, !1);
|
|
3349
2978
|
});
|
|
3350
2979
|
}
|
|
3351
|
-
return oe(
|
|
2980
|
+
return oe(p), hi(p, (h) => w(W, h), () => _(W)), he(e, p), pn({
|
|
3352
2981
|
get config() {
|
|
3353
2982
|
return n();
|
|
3354
2983
|
},
|
|
3355
|
-
set config(
|
|
3356
|
-
n(
|
|
2984
|
+
set config(h = null) {
|
|
2985
|
+
n(h), P();
|
|
3357
2986
|
},
|
|
3358
2987
|
get session() {
|
|
3359
2988
|
return r();
|
|
3360
2989
|
},
|
|
3361
|
-
set session(
|
|
3362
|
-
r(
|
|
2990
|
+
set session(h = { id: "", data: [] }) {
|
|
2991
|
+
r(h), P();
|
|
3363
2992
|
},
|
|
3364
2993
|
get env() {
|
|
3365
2994
|
return s();
|
|
3366
2995
|
},
|
|
3367
|
-
set env(
|
|
3368
|
-
s(
|
|
2996
|
+
set env(h = { mode: "gather", role: "student" }) {
|
|
2997
|
+
s(h), P();
|
|
3369
2998
|
},
|
|
3370
2999
|
get addCorrectResponse() {
|
|
3371
3000
|
return i();
|
|
3372
3001
|
},
|
|
3373
|
-
set addCorrectResponse(
|
|
3374
|
-
i(
|
|
3002
|
+
set addCorrectResponse(h = !1) {
|
|
3003
|
+
i(h), P();
|
|
3375
3004
|
},
|
|
3376
3005
|
get renderStimulus() {
|
|
3377
3006
|
return o();
|
|
3378
3007
|
},
|
|
3379
|
-
set renderStimulus(
|
|
3380
|
-
o(
|
|
3008
|
+
set renderStimulus(h = !0) {
|
|
3009
|
+
o(h), P();
|
|
3381
3010
|
},
|
|
3382
3011
|
get allowedResize() {
|
|
3383
|
-
return
|
|
3012
|
+
return a();
|
|
3384
3013
|
},
|
|
3385
|
-
set allowedResize(
|
|
3386
|
-
|
|
3014
|
+
set allowedResize(h = !1) {
|
|
3015
|
+
a(h), P();
|
|
3387
3016
|
},
|
|
3388
3017
|
get showBottomBorder() {
|
|
3389
3018
|
return u();
|
|
3390
3019
|
},
|
|
3391
|
-
set showBottomBorder(
|
|
3392
|
-
u(
|
|
3020
|
+
set showBottomBorder(h = !1) {
|
|
3021
|
+
u(h), P();
|
|
3393
3022
|
},
|
|
3394
3023
|
get debug() {
|
|
3395
|
-
return
|
|
3024
|
+
return l();
|
|
3396
3025
|
},
|
|
3397
|
-
set debug(
|
|
3398
|
-
|
|
3026
|
+
set debug(h = "") {
|
|
3027
|
+
l(h), P();
|
|
3399
3028
|
},
|
|
3400
3029
|
get customClassname() {
|
|
3401
|
-
return
|
|
3030
|
+
return c();
|
|
3402
3031
|
},
|
|
3403
|
-
set customClassname(
|
|
3404
|
-
|
|
3032
|
+
set customClassname(h = "") {
|
|
3033
|
+
c(h), P();
|
|
3405
3034
|
},
|
|
3406
3035
|
get containerClass() {
|
|
3407
|
-
return
|
|
3036
|
+
return f();
|
|
3408
3037
|
},
|
|
3409
|
-
set containerClass(
|
|
3410
|
-
|
|
3038
|
+
set containerClass(h = "") {
|
|
3039
|
+
f(h), P();
|
|
3411
3040
|
},
|
|
3412
3041
|
get passageContainerClass() {
|
|
3413
|
-
return
|
|
3042
|
+
return d();
|
|
3414
3043
|
},
|
|
3415
|
-
set passageContainerClass(
|
|
3416
|
-
|
|
3044
|
+
set passageContainerClass(h = "") {
|
|
3045
|
+
d(h), P();
|
|
3417
3046
|
},
|
|
3418
3047
|
get externalStyleUrls() {
|
|
3419
|
-
return
|
|
3048
|
+
return v();
|
|
3420
3049
|
},
|
|
3421
|
-
set externalStyleUrls(
|
|
3422
|
-
h
|
|
3050
|
+
set externalStyleUrls(h = "") {
|
|
3051
|
+
v(h), P();
|
|
3423
3052
|
},
|
|
3424
3053
|
get bundleType() {
|
|
3425
|
-
return
|
|
3054
|
+
return g();
|
|
3426
3055
|
},
|
|
3427
|
-
set bundleType(
|
|
3428
|
-
|
|
3056
|
+
set bundleType(h = "player.js") {
|
|
3057
|
+
g(h), P();
|
|
3429
3058
|
},
|
|
3430
3059
|
get loaderConfig() {
|
|
3431
3060
|
return y();
|
|
3432
3061
|
},
|
|
3433
|
-
set loaderConfig(
|
|
3434
|
-
y(
|
|
3062
|
+
set loaderConfig(h = Yn) {
|
|
3063
|
+
y(h), P();
|
|
3435
3064
|
},
|
|
3436
|
-
...
|
|
3065
|
+
...Ur()
|
|
3437
3066
|
});
|
|
3438
3067
|
}
|
|
3439
|
-
|
|
3440
|
-
customElements.define("pie-fixed-player",
|
|
3068
|
+
Tr(we);
|
|
3069
|
+
customElements.define("pie-fixed-player", Nr(
|
|
3441
3070
|
we,
|
|
3442
3071
|
{
|
|
3443
3072
|
config: { attribute: "config", type: "Object" },
|
|
@@ -3453,7 +3082,7 @@ customElements.define("pie-fixed-player", Ar(
|
|
|
3453
3082
|
attribute: "show-bottom-border",
|
|
3454
3083
|
type: "Boolean"
|
|
3455
3084
|
},
|
|
3456
|
-
debug: { attribute: "debug", type: "
|
|
3085
|
+
debug: { attribute: "debug", type: "String" },
|
|
3457
3086
|
customClassname: { attribute: "custom-classname", type: "String" },
|
|
3458
3087
|
containerClass: { attribute: "container-class", type: "String" },
|
|
3459
3088
|
passageContainerClass: {
|