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