@pie-element/mc-populated-blank 0.2.9 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -10
- package/dist/author/index.js +186 -152
- package/dist/author/index.js.map +1 -1
- package/dist/controller/defaults.d.ts +41 -73
- package/dist/controller/defaults.d.ts.map +1 -1
- package/dist/controller/index.d.ts +154 -10
- package/dist/controller/index.d.ts.map +1 -1
- package/dist/controller/index.js +30 -30
- package/dist/controller/index.js.map +1 -1
- package/dist/controller/index.test.d.ts +63 -0
- package/dist/controller/index.test.d.ts.map +1 -0
- package/dist/delivery/AudioPlayer.test.d.ts +2 -0
- package/dist/delivery/AudioPlayer.test.d.ts.map +1 -0
- package/dist/delivery/ChoiceRow.test.d.ts +2 -0
- package/dist/delivery/ChoiceRow.test.d.ts.map +1 -0
- package/dist/delivery/ClozeMarker.test.d.ts +2 -0
- package/dist/delivery/ClozeMarker.test.d.ts.map +1 -0
- package/dist/delivery/McPopulatedBlank.transcript.test.d.ts +2 -0
- package/dist/delivery/McPopulatedBlank.transcript.test.d.ts.map +1 -0
- package/dist/delivery/computeAudioMode.d.ts +7 -0
- package/dist/delivery/computeAudioMode.d.ts.map +1 -0
- package/dist/delivery/computeAudioMode.test.d.ts +2 -0
- package/dist/delivery/computeAudioMode.test.d.ts.map +1 -0
- package/dist/delivery/computeChoiceCorrectness.d.ts +18 -0
- package/dist/delivery/computeChoiceCorrectness.d.ts.map +1 -0
- package/dist/delivery/computeChoiceCorrectness.test.d.ts +19 -0
- package/dist/delivery/computeChoiceCorrectness.test.d.ts.map +1 -0
- package/dist/delivery/computeDisplayState.d.ts +47 -0
- package/dist/delivery/computeDisplayState.d.ts.map +1 -0
- package/dist/delivery/computeDisplayState.test.d.ts +38 -0
- package/dist/delivery/computeDisplayState.test.d.ts.map +1 -0
- package/dist/delivery/computeLayoutProfile.d.ts +18 -0
- package/dist/delivery/computeLayoutProfile.d.ts.map +1 -0
- package/dist/delivery/computeLayoutProfile.test.d.ts +2 -0
- package/dist/delivery/computeLayoutProfile.test.d.ts.map +1 -0
- package/dist/delivery/computeLayoutStyle.d.ts +27 -0
- package/dist/delivery/computeLayoutStyle.d.ts.map +1 -0
- package/dist/delivery/computeLayoutStyle.test.d.ts +2 -0
- package/dist/delivery/computeLayoutStyle.test.d.ts.map +1 -0
- package/dist/delivery/index.d.ts.map +1 -1
- package/dist/delivery/index.js +1650 -881
- package/dist/delivery/index.js.map +1 -1
- package/dist/delivery/variant-css-map.d.ts +10 -0
- package/dist/delivery/variant-css-map.d.ts.map +1 -0
- package/dist/index.iife.d.ts +151 -10
- package/dist/index.iife.d.ts.map +1 -1
- package/dist/index.iife.js +409 -16
- package/dist/index.js +1650 -881
- package/dist/index.js.map +1 -1
- package/dist/print/index.js +194 -166
- package/dist/print/index.js.map +1 -1
- package/dist/shared/layoutLimits.d.ts +40 -0
- package/dist/shared/layoutLimits.d.ts.map +1 -0
- package/dist/shared/types.d.ts +82 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/package.json +4 -2
- package/src/controller/defaults.ts +9 -39
- package/src/controller/index.test.ts +428 -0
- package/src/controller/index.ts +64 -50
- package/src/delivery/AudioPlayer.svelte +246 -0
- package/src/delivery/AudioPlayer.test.ts +149 -0
- package/src/delivery/ChoiceRow.svelte +222 -0
- package/src/delivery/ChoiceRow.test.ts +179 -0
- package/src/delivery/ClozeMarker.svelte +83 -0
- package/src/delivery/ClozeMarker.test.ts +128 -0
- package/src/delivery/McPopulatedBlank.svelte +234 -709
- package/src/delivery/McPopulatedBlank.transcript.test.ts +154 -0
- package/src/delivery/computeAudioMode.test.ts +40 -0
- package/src/delivery/computeAudioMode.ts +11 -0
- package/src/delivery/computeChoiceCorrectness.test.ts +120 -0
- package/src/delivery/computeChoiceCorrectness.ts +42 -0
- package/src/delivery/computeDisplayState.test.ts +274 -0
- package/src/delivery/computeDisplayState.ts +101 -0
- package/src/delivery/computeLayoutProfile.test.ts +163 -0
- package/src/delivery/computeLayoutProfile.ts +72 -0
- package/src/delivery/computeLayoutStyle.test.ts +168 -0
- package/src/delivery/computeLayoutStyle.ts +128 -0
- package/src/delivery/cqt-css/sel-r1-base.css +59 -0
- package/src/delivery/cqt-css/sel-r1-g-stem.css +14 -0
- package/src/delivery/cqt-css/sel-r1-gg-plus.css +12 -0
- package/src/delivery/cqt-css/sel-r1-ggplus.css +17 -0
- package/src/delivery/cqt-css/sel-r1-gplusggg.css +25 -0
- package/src/delivery/cqt-css/sel-r1-plusggg.css +17 -0
- package/src/delivery/cqt-css/sel-r1-s3.css +85 -0
- package/src/delivery/cqt-css/sel-vic.css +99 -0
- package/src/delivery/cqt-css/sr-vic.css +63 -0
- package/src/delivery/index.ts +14 -23
- package/src/delivery/variant-css-map.ts +124 -0
- package/src/shared/layoutLimits.ts +76 -0
- package/src/shared/types.ts +84 -0
- package/src/types/css-raw.d.ts +4 -0
package/dist/print/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
1
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/disclose-version.js
|
|
2
2
|
if (typeof window !== "undefined") {
|
|
3
3
|
var _window$__svelte, _window;
|
|
4
4
|
((_window$__svelte = (_window = window).__svelte ?? (_window.__svelte = {})).v ?? (_window$__svelte.v = /* @__PURE__ */ new Set())).add("5");
|
|
5
5
|
}
|
|
6
6
|
//#endregion
|
|
7
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
7
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/constants.js
|
|
8
8
|
var HYDRATION_ERROR = {};
|
|
9
9
|
var UNINITIALIZED = Symbol();
|
|
10
10
|
var NAMESPACE_SVG = "http://www.w3.org/2000/svg";
|
|
11
11
|
var NAMESPACE_MATHML = "http://www.w3.org/1998/Math/MathML";
|
|
12
12
|
//#endregion
|
|
13
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
13
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/shared/utils.js
|
|
14
14
|
var is_array = Array.isArray;
|
|
15
15
|
var index_of = Array.prototype.indexOf;
|
|
16
16
|
var includes = Array.prototype.includes;
|
|
@@ -47,7 +47,7 @@ function deferred() {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
//#endregion
|
|
50
|
-
//#region \0@oxc-project+runtime@0.
|
|
50
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/typeof.js
|
|
51
51
|
function _typeof(o) {
|
|
52
52
|
"@babel/helpers - typeof";
|
|
53
53
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -57,7 +57,7 @@ function _typeof(o) {
|
|
|
57
57
|
}, _typeof(o);
|
|
58
58
|
}
|
|
59
59
|
//#endregion
|
|
60
|
-
//#region \0@oxc-project+runtime@0.
|
|
60
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/toPrimitive.js
|
|
61
61
|
function toPrimitive(t, r) {
|
|
62
62
|
if ("object" != _typeof(t) || !t) return t;
|
|
63
63
|
var e = t[Symbol.toPrimitive];
|
|
@@ -69,13 +69,13 @@ function toPrimitive(t, r) {
|
|
|
69
69
|
return ("string" === r ? String : Number)(t);
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
|
-
//#region \0@oxc-project+runtime@0.
|
|
72
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/toPropertyKey.js
|
|
73
73
|
function toPropertyKey(t) {
|
|
74
74
|
var i = toPrimitive(t, "string");
|
|
75
75
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
76
76
|
}
|
|
77
77
|
//#endregion
|
|
78
|
-
//#region \0@oxc-project+runtime@0.
|
|
78
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/defineProperty.js
|
|
79
79
|
function _defineProperty(e, r, t) {
|
|
80
80
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
81
81
|
value: t,
|
|
@@ -104,7 +104,8 @@ var EFFECT_OFFSCREEN = 1 << 25;
|
|
|
104
104
|
/**
|
|
105
105
|
* Tells that we marked this derived and its reactions as visited during the "mark as (maybe) dirty"-phase.
|
|
106
106
|
* Will be lifted during execution of the derived and during checking its dirty state (both are necessary
|
|
107
|
-
* because a derived might be checked but not executed).
|
|
107
|
+
* because a derived might be checked but not executed). This is a pure performance optimization flag and
|
|
108
|
+
* should not be used for any other purpose!
|
|
108
109
|
*/
|
|
109
110
|
var WAS_MARKED = 65536;
|
|
110
111
|
var REACTION_IS_UPDATING = 1 << 21;
|
|
@@ -123,7 +124,7 @@ var STALE_REACTION = new class StaleReactionError extends Error {
|
|
|
123
124
|
}();
|
|
124
125
|
var IS_XHTML = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
|
|
125
126
|
//#endregion
|
|
126
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
127
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/errors.js
|
|
127
128
|
/**
|
|
128
129
|
* Cannot create a `$derived(...)` with an `await` expression outside of an effect tree
|
|
129
130
|
* @returns {never}
|
|
@@ -215,6 +216,12 @@ function svelte_boundary_reset_onerror() {
|
|
|
215
216
|
throw new Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`);
|
|
216
217
|
}
|
|
217
218
|
/**
|
|
219
|
+
* Reading a derived belonging to a now-destroyed effect may result in stale values
|
|
220
|
+
*/
|
|
221
|
+
function derived_inert() {
|
|
222
|
+
console.warn(`https://svelte.dev/e/derived_inert`);
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
218
225
|
* Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near %location%
|
|
219
226
|
* @param {string | undefined | null} [location]
|
|
220
227
|
*/
|
|
@@ -228,7 +235,7 @@ function svelte_boundary_reset_noop() {
|
|
|
228
235
|
console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`);
|
|
229
236
|
}
|
|
230
237
|
//#endregion
|
|
231
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
238
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/hydration.js
|
|
232
239
|
/** @import { TemplateNode } from '#client' */
|
|
233
240
|
/**
|
|
234
241
|
* Use this variable to guard everything related to hydration code so it can be treeshaken out
|
|
@@ -307,7 +314,7 @@ function read_hydration_instruction(node) {
|
|
|
307
314
|
return node.data;
|
|
308
315
|
}
|
|
309
316
|
//#endregion
|
|
310
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
317
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/equality.js
|
|
311
318
|
/** @import { Equals } from '#client' */
|
|
312
319
|
/** @type {Equals} */
|
|
313
320
|
function equals(value) {
|
|
@@ -326,13 +333,13 @@ function safe_equals(value) {
|
|
|
326
333
|
return !safe_not_equal(value, this.v);
|
|
327
334
|
}
|
|
328
335
|
//#endregion
|
|
329
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
336
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/flags/index.js
|
|
330
337
|
/** True if experimental.async=true */
|
|
331
338
|
var async_mode_flag = false;
|
|
332
339
|
/** True if we're not certain that we only have Svelte 5 code in the compilation */
|
|
333
340
|
var legacy_mode_flag = false;
|
|
334
341
|
//#endregion
|
|
335
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
342
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/context.js
|
|
336
343
|
/** @import { ComponentContext, DevStackEntry, Effect } from '#client' */
|
|
337
344
|
/** @type {ComponentContext | null} */
|
|
338
345
|
var component_context = null;
|
|
@@ -384,7 +391,7 @@ function is_runes() {
|
|
|
384
391
|
return !legacy_mode_flag || component_context !== null && component_context.l === null;
|
|
385
392
|
}
|
|
386
393
|
//#endregion
|
|
387
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
394
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/task.js
|
|
388
395
|
/** @type {Array<() => void>} */
|
|
389
396
|
var micro_tasks = [];
|
|
390
397
|
function run_micro_tasks() {
|
|
@@ -442,7 +449,7 @@ function invoke_error_boundary(error, effect) {
|
|
|
442
449
|
throw error;
|
|
443
450
|
}
|
|
444
451
|
//#endregion
|
|
445
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
452
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/status.js
|
|
446
453
|
/** @import { Derived, Signal } from '#client' */
|
|
447
454
|
var STATUS_MASK = ~(DIRTY | MAYBE_DIRTY | CLEAN);
|
|
448
455
|
/**
|
|
@@ -461,7 +468,7 @@ function update_derived_status(derived) {
|
|
|
461
468
|
else set_signal_status(derived, MAYBE_DIRTY);
|
|
462
469
|
}
|
|
463
470
|
//#endregion
|
|
464
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
471
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/utils.js
|
|
465
472
|
/** @import { Derived, Effect, Value } from '#client' */
|
|
466
473
|
/**
|
|
467
474
|
* @param {Value[] | null} deps
|
|
@@ -489,7 +496,7 @@ function defer_effect(effect, dirty_effects, maybe_dirty_effects) {
|
|
|
489
496
|
set_signal_status(effect, CLEAN);
|
|
490
497
|
}
|
|
491
498
|
//#endregion
|
|
492
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
499
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/store.js
|
|
493
500
|
/**
|
|
494
501
|
* We set this to `true` when updating a store so that we correctly
|
|
495
502
|
* schedule effects if the update takes place inside a `$:` effect
|
|
@@ -519,38 +526,38 @@ function capture_store_binding(fn) {
|
|
|
519
526
|
}
|
|
520
527
|
}
|
|
521
528
|
//#endregion
|
|
522
|
-
//#region \0@oxc-project+runtime@0.
|
|
529
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/checkPrivateRedeclaration.js
|
|
523
530
|
function _checkPrivateRedeclaration(e, t) {
|
|
524
531
|
if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
525
532
|
}
|
|
526
533
|
//#endregion
|
|
527
|
-
//#region \0@oxc-project+runtime@0.
|
|
534
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/classPrivateMethodInitSpec.js
|
|
528
535
|
function _classPrivateMethodInitSpec(e, a) {
|
|
529
536
|
_checkPrivateRedeclaration(e, a), a.add(e);
|
|
530
537
|
}
|
|
531
538
|
//#endregion
|
|
532
|
-
//#region \0@oxc-project+runtime@0.
|
|
539
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/classPrivateFieldInitSpec.js
|
|
533
540
|
function _classPrivateFieldInitSpec(e, t, a) {
|
|
534
541
|
_checkPrivateRedeclaration(e, t), t.set(e, a);
|
|
535
542
|
}
|
|
536
543
|
//#endregion
|
|
537
|
-
//#region \0@oxc-project+runtime@0.
|
|
544
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/assertClassBrand.js
|
|
538
545
|
function _assertClassBrand(e, t, n) {
|
|
539
546
|
if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
540
547
|
throw new TypeError("Private element is not present on this object");
|
|
541
548
|
}
|
|
542
549
|
//#endregion
|
|
543
|
-
//#region \0@oxc-project+runtime@0.
|
|
550
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/classPrivateFieldGet2.js
|
|
544
551
|
function _classPrivateFieldGet2(s, a) {
|
|
545
552
|
return s.get(_assertClassBrand(s, a));
|
|
546
553
|
}
|
|
547
554
|
//#endregion
|
|
548
|
-
//#region \0@oxc-project+runtime@0.
|
|
555
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/classPrivateFieldSet2.js
|
|
549
556
|
function _classPrivateFieldSet2(s, a, r) {
|
|
550
557
|
return s.set(_assertClassBrand(s, a), r), r;
|
|
551
558
|
}
|
|
552
559
|
//#endregion
|
|
553
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
560
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/batch.js
|
|
554
561
|
/** @import { Fork } from 'svelte' */
|
|
555
562
|
/** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
|
|
556
563
|
var _Batch;
|
|
@@ -588,6 +595,7 @@ var flush_count = 0;
|
|
|
588
595
|
var uid = 1;
|
|
589
596
|
var _commit_callbacks = /* @__PURE__ */ new WeakMap();
|
|
590
597
|
var _discard_callbacks = /* @__PURE__ */ new WeakMap();
|
|
598
|
+
var _fork_commit_callbacks = /* @__PURE__ */ new WeakMap();
|
|
591
599
|
var _pending = /* @__PURE__ */ new WeakMap();
|
|
592
600
|
var _blocking_pending = /* @__PURE__ */ new WeakMap();
|
|
593
601
|
var _deferred = /* @__PURE__ */ new WeakMap();
|
|
@@ -596,6 +604,7 @@ var _new_effects = /* @__PURE__ */ new WeakMap();
|
|
|
596
604
|
var _dirty_effects$1 = /* @__PURE__ */ new WeakMap();
|
|
597
605
|
var _maybe_dirty_effects$1 = /* @__PURE__ */ new WeakMap();
|
|
598
606
|
var _skipped_branches = /* @__PURE__ */ new WeakMap();
|
|
607
|
+
var _unskipped_branches = /* @__PURE__ */ new WeakMap();
|
|
599
608
|
var _decrement_queued = /* @__PURE__ */ new WeakMap();
|
|
600
609
|
var _blockers = /* @__PURE__ */ new WeakMap();
|
|
601
610
|
var _Batch_brand = /* @__PURE__ */ new WeakSet();
|
|
@@ -626,6 +635,7 @@ var Batch = class Batch {
|
|
|
626
635
|
);
|
|
627
636
|
_classPrivateFieldInitSpec(this, _commit_callbacks, /* @__PURE__ */ new Set());
|
|
628
637
|
_classPrivateFieldInitSpec(this, _discard_callbacks, /* @__PURE__ */ new Set());
|
|
638
|
+
_classPrivateFieldInitSpec(this, _fork_commit_callbacks, /* @__PURE__ */ new Set());
|
|
629
639
|
_classPrivateFieldInitSpec(this, _pending, /* @__PURE__ */ new Map());
|
|
630
640
|
_classPrivateFieldInitSpec(this, _blocking_pending, /* @__PURE__ */ new Map());
|
|
631
641
|
_classPrivateFieldInitSpec(this, _deferred, null);
|
|
@@ -634,6 +644,7 @@ var Batch = class Batch {
|
|
|
634
644
|
_classPrivateFieldInitSpec(this, _dirty_effects$1, /* @__PURE__ */ new Set());
|
|
635
645
|
_classPrivateFieldInitSpec(this, _maybe_dirty_effects$1, /* @__PURE__ */ new Set());
|
|
636
646
|
_classPrivateFieldInitSpec(this, _skipped_branches, /* @__PURE__ */ new Map());
|
|
647
|
+
_classPrivateFieldInitSpec(this, _unskipped_branches, /* @__PURE__ */ new Set());
|
|
637
648
|
_defineProperty(this, "is_fork", false);
|
|
638
649
|
_classPrivateFieldInitSpec(this, _decrement_queued, false);
|
|
639
650
|
_classPrivateFieldInitSpec(this, _blockers, /* @__PURE__ */ new Set());
|
|
@@ -647,39 +658,43 @@ var Batch = class Batch {
|
|
|
647
658
|
d: [],
|
|
648
659
|
m: []
|
|
649
660
|
});
|
|
661
|
+
_classPrivateFieldGet2(_unskipped_branches, this).delete(effect);
|
|
650
662
|
}
|
|
651
663
|
/**
|
|
652
664
|
* Remove an effect from the #skipped_branches map and reschedule
|
|
653
665
|
* any tracked dirty/maybe_dirty child effects
|
|
654
666
|
* @param {Effect} effect
|
|
667
|
+
* @param {(e: Effect) => void} callback
|
|
655
668
|
*/
|
|
656
|
-
unskip_effect(effect) {
|
|
669
|
+
unskip_effect(effect, callback = (e) => this.schedule(e)) {
|
|
657
670
|
var tracked = _classPrivateFieldGet2(_skipped_branches, this).get(effect);
|
|
658
671
|
if (tracked) {
|
|
659
672
|
_classPrivateFieldGet2(_skipped_branches, this).delete(effect);
|
|
660
673
|
for (var e of tracked.d) {
|
|
661
674
|
set_signal_status(e, DIRTY);
|
|
662
|
-
|
|
675
|
+
callback(e);
|
|
663
676
|
}
|
|
664
677
|
for (e of tracked.m) {
|
|
665
678
|
set_signal_status(e, MAYBE_DIRTY);
|
|
666
|
-
|
|
679
|
+
callback(e);
|
|
667
680
|
}
|
|
668
681
|
}
|
|
682
|
+
_classPrivateFieldGet2(_unskipped_branches, this).add(effect);
|
|
669
683
|
}
|
|
670
684
|
/**
|
|
671
685
|
* Associate a change to a given source with the current
|
|
672
686
|
* batch, noting its previous and current values
|
|
673
687
|
* @param {Value} source
|
|
674
|
-
* @param {any}
|
|
688
|
+
* @param {any} value
|
|
675
689
|
* @param {boolean} [is_derived]
|
|
676
690
|
*/
|
|
677
|
-
capture(source,
|
|
678
|
-
if (
|
|
691
|
+
capture(source, value, is_derived = false) {
|
|
692
|
+
if (source.v !== UNINITIALIZED && !this.previous.has(source)) this.previous.set(source, source.v);
|
|
679
693
|
if ((source.f & 8388608) === 0) {
|
|
680
|
-
this.current.set(source, [
|
|
681
|
-
batch_values?.set(source,
|
|
694
|
+
this.current.set(source, [value, is_derived]);
|
|
695
|
+
batch_values?.set(source, value);
|
|
682
696
|
}
|
|
697
|
+
if (!this.is_fork) source.v = value;
|
|
683
698
|
}
|
|
684
699
|
activate() {
|
|
685
700
|
current_batch = this;
|
|
@@ -707,6 +722,7 @@ var Batch = class Batch {
|
|
|
707
722
|
discard() {
|
|
708
723
|
for (const fn of _classPrivateFieldGet2(_discard_callbacks, this)) fn(this);
|
|
709
724
|
_classPrivateFieldGet2(_discard_callbacks, this).clear();
|
|
725
|
+
_classPrivateFieldGet2(_fork_commit_callbacks, this).clear();
|
|
710
726
|
batches.delete(this);
|
|
711
727
|
}
|
|
712
728
|
/**
|
|
@@ -766,6 +782,14 @@ var Batch = class Batch {
|
|
|
766
782
|
ondiscard(fn) {
|
|
767
783
|
_classPrivateFieldGet2(_discard_callbacks, this).add(fn);
|
|
768
784
|
}
|
|
785
|
+
/** @param {(batch: Batch) => void} fn */
|
|
786
|
+
on_fork_commit(fn) {
|
|
787
|
+
_classPrivateFieldGet2(_fork_commit_callbacks, this).add(fn);
|
|
788
|
+
}
|
|
789
|
+
run_fork_commit_callbacks() {
|
|
790
|
+
for (const fn of _classPrivateFieldGet2(_fork_commit_callbacks, this)) fn(this);
|
|
791
|
+
_classPrivateFieldGet2(_fork_commit_callbacks, this).clear();
|
|
792
|
+
}
|
|
769
793
|
settled() {
|
|
770
794
|
return (_classPrivateFieldGet2(_deferred, this) ?? _classPrivateFieldSet2(_deferred, this, deferred())).promise;
|
|
771
795
|
}
|
|
@@ -911,7 +935,7 @@ function _process() {
|
|
|
911
935
|
batches.add(next_batch);
|
|
912
936
|
_assertClassBrand(_Batch_brand, next_batch, _process).call(next_batch);
|
|
913
937
|
}
|
|
914
|
-
if (!batches.has(this)) _assertClassBrand(_Batch_brand, this, _commit$1).call(this);
|
|
938
|
+
if (async_mode_flag && !batches.has(this)) _assertClassBrand(_Batch_brand, this, _commit$1).call(this);
|
|
915
939
|
}
|
|
916
940
|
/**
|
|
917
941
|
* Traverse the effect tree, executing effects or stashing
|
|
@@ -973,6 +997,10 @@ function _commit$1() {
|
|
|
973
997
|
if (others.length === 0) {
|
|
974
998
|
if (is_earlier) batch.discard();
|
|
975
999
|
} else if (sources.length > 0) {
|
|
1000
|
+
if (is_earlier) for (const unskipped of _classPrivateFieldGet2(_unskipped_branches, this)) batch.unskip_effect(unskipped, (e) => {
|
|
1001
|
+
if ((e.f & 4194320) !== 0) batch.schedule(e);
|
|
1002
|
+
else _assertClassBrand(_Batch_brand, batch, _defer_effects).call(batch, [e]);
|
|
1003
|
+
});
|
|
976
1004
|
batch.activate();
|
|
977
1005
|
/** @type {Set<Value>} */
|
|
978
1006
|
var marked = /* @__PURE__ */ new Set();
|
|
@@ -1152,7 +1180,7 @@ function reset_all(effect) {
|
|
|
1152
1180
|
}
|
|
1153
1181
|
}
|
|
1154
1182
|
//#endregion
|
|
1155
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
1183
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/reactivity/create-subscriber.js
|
|
1156
1184
|
/**
|
|
1157
1185
|
* Returns a `subscribe` function that integrates external event-based systems with Svelte's reactivity.
|
|
1158
1186
|
* It's particularly useful for integrating with web APIs like `MediaQuery`, `IntersectionObserver`, or `WebSocket`.
|
|
@@ -1225,7 +1253,7 @@ function createSubscriber(start) {
|
|
|
1225
1253
|
};
|
|
1226
1254
|
}
|
|
1227
1255
|
//#endregion
|
|
1228
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
1256
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
|
|
1229
1257
|
/** @import { Effect, Source, TemplateNode, } from '#client' */
|
|
1230
1258
|
/**
|
|
1231
1259
|
* @typedef {{
|
|
@@ -1373,82 +1401,15 @@ var Boundary = class {
|
|
|
1373
1401
|
}
|
|
1374
1402
|
/** @param {unknown} error */
|
|
1375
1403
|
error(error) {
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
if (_classPrivateFieldGet2(_pending_effect, this)) {
|
|
1384
|
-
destroy_effect(_classPrivateFieldGet2(_pending_effect, this));
|
|
1385
|
-
_classPrivateFieldSet2(_pending_effect, this, null);
|
|
1386
|
-
}
|
|
1387
|
-
if (_classPrivateFieldGet2(_failed_effect, this)) {
|
|
1388
|
-
destroy_effect(_classPrivateFieldGet2(_failed_effect, this));
|
|
1389
|
-
_classPrivateFieldSet2(_failed_effect, this, null);
|
|
1390
|
-
}
|
|
1391
|
-
if (hydrating) {
|
|
1392
|
-
set_hydrate_node(_classPrivateFieldGet2(_hydrate_open, this));
|
|
1393
|
-
next();
|
|
1394
|
-
set_hydrate_node(skip_nodes());
|
|
1395
|
-
}
|
|
1396
|
-
var did_reset = false;
|
|
1397
|
-
var calling_on_error = false;
|
|
1398
|
-
const reset = () => {
|
|
1399
|
-
if (did_reset) {
|
|
1400
|
-
svelte_boundary_reset_noop();
|
|
1401
|
-
return;
|
|
1402
|
-
}
|
|
1403
|
-
did_reset = true;
|
|
1404
|
-
if (calling_on_error) svelte_boundary_reset_onerror();
|
|
1405
|
-
if (_classPrivateFieldGet2(_failed_effect, this) !== null) pause_effect(_classPrivateFieldGet2(_failed_effect, this), () => {
|
|
1406
|
-
_classPrivateFieldSet2(_failed_effect, this, null);
|
|
1407
|
-
});
|
|
1408
|
-
_assertClassBrand(_Boundary_brand, this, _run).call(this, () => {
|
|
1409
|
-
_assertClassBrand(_Boundary_brand, this, _render).call(this);
|
|
1404
|
+
if (!_classPrivateFieldGet2(_props, this).onerror && !_classPrivateFieldGet2(_props, this).failed) throw error;
|
|
1405
|
+
if (current_batch?.is_fork) {
|
|
1406
|
+
if (_classPrivateFieldGet2(_main_effect, this)) current_batch.skip_effect(_classPrivateFieldGet2(_main_effect, this));
|
|
1407
|
+
if (_classPrivateFieldGet2(_pending_effect, this)) current_batch.skip_effect(_classPrivateFieldGet2(_pending_effect, this));
|
|
1408
|
+
if (_classPrivateFieldGet2(_failed_effect, this)) current_batch.skip_effect(_classPrivateFieldGet2(_failed_effect, this));
|
|
1409
|
+
current_batch.on_fork_commit(() => {
|
|
1410
|
+
_assertClassBrand(_Boundary_brand, this, _handle_error).call(this, error);
|
|
1410
1411
|
});
|
|
1411
|
-
};
|
|
1412
|
-
/** @param {unknown} transformed_error */
|
|
1413
|
-
const handle_error_result = (transformed_error) => {
|
|
1414
|
-
try {
|
|
1415
|
-
calling_on_error = true;
|
|
1416
|
-
onerror?.(transformed_error, reset);
|
|
1417
|
-
calling_on_error = false;
|
|
1418
|
-
} catch (error) {
|
|
1419
|
-
invoke_error_boundary(error, _classPrivateFieldGet2(_effect, this) && _classPrivateFieldGet2(_effect, this).parent);
|
|
1420
|
-
}
|
|
1421
|
-
if (failed) _classPrivateFieldSet2(_failed_effect, this, _assertClassBrand(_Boundary_brand, this, _run).call(this, () => {
|
|
1422
|
-
try {
|
|
1423
|
-
return branch(() => {
|
|
1424
|
-
var effect = active_effect;
|
|
1425
|
-
effect.b = this;
|
|
1426
|
-
effect.f |= 128;
|
|
1427
|
-
failed(_classPrivateFieldGet2(_anchor, this), () => transformed_error, () => reset);
|
|
1428
|
-
});
|
|
1429
|
-
} catch (error) {
|
|
1430
|
-
invoke_error_boundary(error, _classPrivateFieldGet2(_effect, this).parent);
|
|
1431
|
-
return null;
|
|
1432
|
-
}
|
|
1433
|
-
}));
|
|
1434
|
-
};
|
|
1435
|
-
queue_micro_task(() => {
|
|
1436
|
-
/** @type {unknown} */
|
|
1437
|
-
var result;
|
|
1438
|
-
try {
|
|
1439
|
-
result = this.transform_error(error);
|
|
1440
|
-
} catch (e) {
|
|
1441
|
-
invoke_error_boundary(e, _classPrivateFieldGet2(_effect, this) && _classPrivateFieldGet2(_effect, this).parent);
|
|
1442
|
-
return;
|
|
1443
|
-
}
|
|
1444
|
-
if (result !== null && typeof result === "object" && typeof result.then === "function")
|
|
1445
|
-
/** @type {any} */ result.then(
|
|
1446
|
-
handle_error_result,
|
|
1447
|
-
/** @param {unknown} e */
|
|
1448
|
-
(e) => invoke_error_boundary(e, _classPrivateFieldGet2(_effect, this) && _classPrivateFieldGet2(_effect, this).parent)
|
|
1449
|
-
);
|
|
1450
|
-
else handle_error_result(result);
|
|
1451
|
-
});
|
|
1412
|
+
} else _assertClassBrand(_Boundary_brand, this, _handle_error).call(this, error);
|
|
1452
1413
|
}
|
|
1453
1414
|
};
|
|
1454
1415
|
function _hydrate_resolved_content() {
|
|
@@ -1564,8 +1525,88 @@ function _update_pending_count(d, batch) {
|
|
|
1564
1525
|
}
|
|
1565
1526
|
}
|
|
1566
1527
|
}
|
|
1528
|
+
/**
|
|
1529
|
+
* @param {unknown} error
|
|
1530
|
+
*/
|
|
1531
|
+
function _handle_error(error) {
|
|
1532
|
+
if (_classPrivateFieldGet2(_main_effect, this)) {
|
|
1533
|
+
destroy_effect(_classPrivateFieldGet2(_main_effect, this));
|
|
1534
|
+
_classPrivateFieldSet2(_main_effect, this, null);
|
|
1535
|
+
}
|
|
1536
|
+
if (_classPrivateFieldGet2(_pending_effect, this)) {
|
|
1537
|
+
destroy_effect(_classPrivateFieldGet2(_pending_effect, this));
|
|
1538
|
+
_classPrivateFieldSet2(_pending_effect, this, null);
|
|
1539
|
+
}
|
|
1540
|
+
if (_classPrivateFieldGet2(_failed_effect, this)) {
|
|
1541
|
+
destroy_effect(_classPrivateFieldGet2(_failed_effect, this));
|
|
1542
|
+
_classPrivateFieldSet2(_failed_effect, this, null);
|
|
1543
|
+
}
|
|
1544
|
+
if (hydrating) {
|
|
1545
|
+
set_hydrate_node(_classPrivateFieldGet2(_hydrate_open, this));
|
|
1546
|
+
next();
|
|
1547
|
+
set_hydrate_node(skip_nodes());
|
|
1548
|
+
}
|
|
1549
|
+
var onerror = _classPrivateFieldGet2(_props, this).onerror;
|
|
1550
|
+
let failed = _classPrivateFieldGet2(_props, this).failed;
|
|
1551
|
+
var did_reset = false;
|
|
1552
|
+
var calling_on_error = false;
|
|
1553
|
+
const reset = () => {
|
|
1554
|
+
if (did_reset) {
|
|
1555
|
+
svelte_boundary_reset_noop();
|
|
1556
|
+
return;
|
|
1557
|
+
}
|
|
1558
|
+
did_reset = true;
|
|
1559
|
+
if (calling_on_error) svelte_boundary_reset_onerror();
|
|
1560
|
+
if (_classPrivateFieldGet2(_failed_effect, this) !== null) pause_effect(_classPrivateFieldGet2(_failed_effect, this), () => {
|
|
1561
|
+
_classPrivateFieldSet2(_failed_effect, this, null);
|
|
1562
|
+
});
|
|
1563
|
+
_assertClassBrand(_Boundary_brand, this, _run).call(this, () => {
|
|
1564
|
+
_assertClassBrand(_Boundary_brand, this, _render).call(this);
|
|
1565
|
+
});
|
|
1566
|
+
};
|
|
1567
|
+
/** @param {unknown} transformed_error */
|
|
1568
|
+
const handle_error_result = (transformed_error) => {
|
|
1569
|
+
try {
|
|
1570
|
+
calling_on_error = true;
|
|
1571
|
+
onerror?.(transformed_error, reset);
|
|
1572
|
+
calling_on_error = false;
|
|
1573
|
+
} catch (error) {
|
|
1574
|
+
invoke_error_boundary(error, _classPrivateFieldGet2(_effect, this) && _classPrivateFieldGet2(_effect, this).parent);
|
|
1575
|
+
}
|
|
1576
|
+
if (failed) _classPrivateFieldSet2(_failed_effect, this, _assertClassBrand(_Boundary_brand, this, _run).call(this, () => {
|
|
1577
|
+
try {
|
|
1578
|
+
return branch(() => {
|
|
1579
|
+
var effect = active_effect;
|
|
1580
|
+
effect.b = this;
|
|
1581
|
+
effect.f |= 128;
|
|
1582
|
+
failed(_classPrivateFieldGet2(_anchor, this), () => transformed_error, () => reset);
|
|
1583
|
+
});
|
|
1584
|
+
} catch (error) {
|
|
1585
|
+
invoke_error_boundary(error, _classPrivateFieldGet2(_effect, this).parent);
|
|
1586
|
+
return null;
|
|
1587
|
+
}
|
|
1588
|
+
}));
|
|
1589
|
+
};
|
|
1590
|
+
queue_micro_task(() => {
|
|
1591
|
+
/** @type {unknown} */
|
|
1592
|
+
var result;
|
|
1593
|
+
try {
|
|
1594
|
+
result = this.transform_error(error);
|
|
1595
|
+
} catch (e) {
|
|
1596
|
+
invoke_error_boundary(e, _classPrivateFieldGet2(_effect, this) && _classPrivateFieldGet2(_effect, this).parent);
|
|
1597
|
+
return;
|
|
1598
|
+
}
|
|
1599
|
+
if (result !== null && typeof result === "object" && typeof result.then === "function")
|
|
1600
|
+
/** @type {any} */ result.then(
|
|
1601
|
+
handle_error_result,
|
|
1602
|
+
/** @param {unknown} e */
|
|
1603
|
+
(e) => invoke_error_boundary(e, _classPrivateFieldGet2(_effect, this) && _classPrivateFieldGet2(_effect, this).parent)
|
|
1604
|
+
);
|
|
1605
|
+
else handle_error_result(result);
|
|
1606
|
+
});
|
|
1607
|
+
}
|
|
1567
1608
|
//#endregion
|
|
1568
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
1609
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/async.js
|
|
1569
1610
|
/** @import { Blocker, Effect, Value } from '#client' */
|
|
1570
1611
|
/**
|
|
1571
1612
|
* @param {Blocker[]} blockers
|
|
@@ -1657,7 +1698,6 @@ function increment_pending() {
|
|
|
1657
1698
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1658
1699
|
function derived(fn) {
|
|
1659
1700
|
var flags = 2 | DIRTY;
|
|
1660
|
-
var parent_derived = active_reaction !== null && (active_reaction.f & 2) !== 0 ? active_reaction : null;
|
|
1661
1701
|
if (active_effect !== null) active_effect.f |= EFFECT_PRESERVED;
|
|
1662
1702
|
return {
|
|
1663
1703
|
ctx: component_context,
|
|
@@ -1670,7 +1710,7 @@ function derived(fn) {
|
|
|
1670
1710
|
rv: 0,
|
|
1671
1711
|
v: UNINITIALIZED,
|
|
1672
1712
|
wv: 0,
|
|
1673
|
-
parent:
|
|
1713
|
+
parent: active_effect,
|
|
1674
1714
|
ac: null
|
|
1675
1715
|
};
|
|
1676
1716
|
}
|
|
@@ -1786,18 +1826,6 @@ function destroy_derived_effects(derived) {
|
|
|
1786
1826
|
}
|
|
1787
1827
|
}
|
|
1788
1828
|
/**
|
|
1789
|
-
* @param {Derived} derived
|
|
1790
|
-
* @returns {Effect | null}
|
|
1791
|
-
*/
|
|
1792
|
-
function get_derived_parent_effect(derived) {
|
|
1793
|
-
var parent = derived.parent;
|
|
1794
|
-
while (parent !== null) {
|
|
1795
|
-
if ((parent.f & 2) === 0) return (parent.f & 16384) === 0 ? parent : null;
|
|
1796
|
-
parent = parent.parent;
|
|
1797
|
-
}
|
|
1798
|
-
return null;
|
|
1799
|
-
}
|
|
1800
|
-
/**
|
|
1801
1829
|
* @template T
|
|
1802
1830
|
* @param {Derived} derived
|
|
1803
1831
|
* @returns {T}
|
|
@@ -1805,7 +1833,12 @@ function get_derived_parent_effect(derived) {
|
|
|
1805
1833
|
function execute_derived(derived) {
|
|
1806
1834
|
var value;
|
|
1807
1835
|
var prev_active_effect = active_effect;
|
|
1808
|
-
|
|
1836
|
+
var parent = derived.parent;
|
|
1837
|
+
if (!is_destroying_effect && parent !== null && (parent.f & 24576) !== 0) {
|
|
1838
|
+
derived_inert();
|
|
1839
|
+
return derived.v;
|
|
1840
|
+
}
|
|
1841
|
+
set_active_effect(parent);
|
|
1809
1842
|
try {
|
|
1810
1843
|
derived.f &= ~WAS_MARKED;
|
|
1811
1844
|
destroy_derived_effects(derived);
|
|
@@ -1820,13 +1853,12 @@ function execute_derived(derived) {
|
|
|
1820
1853
|
* @returns {void}
|
|
1821
1854
|
*/
|
|
1822
1855
|
function update_derived(derived) {
|
|
1823
|
-
var old_value = derived.v;
|
|
1824
1856
|
var value = execute_derived(derived);
|
|
1825
1857
|
if (!derived.equals(value)) {
|
|
1826
1858
|
derived.wv = increment_write_version();
|
|
1827
1859
|
if (!current_batch?.is_fork || derived.deps === null) {
|
|
1828
|
-
derived
|
|
1829
|
-
|
|
1860
|
+
if (current_batch !== null) current_batch.capture(derived, value, true);
|
|
1861
|
+
else derived.v = value;
|
|
1830
1862
|
if (derived.deps === null) {
|
|
1831
1863
|
set_signal_status(derived, CLEAN);
|
|
1832
1864
|
return;
|
|
@@ -1860,7 +1892,7 @@ function unfreeze_derived_effects(derived) {
|
|
|
1860
1892
|
for (const e of derived.effects) if (e.teardown) update_effect(e);
|
|
1861
1893
|
}
|
|
1862
1894
|
//#endregion
|
|
1863
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
1895
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/sources.js
|
|
1864
1896
|
/** @import { Derived, Effect, Source, Value } from '#client' */
|
|
1865
1897
|
/** @type {Set<any>} */
|
|
1866
1898
|
var eager_effects = /* @__PURE__ */ new Set();
|
|
@@ -1930,12 +1962,9 @@ function set(source, value, should_proxy = false) {
|
|
|
1930
1962
|
*/
|
|
1931
1963
|
function internal_set(source, value, updated_during_traversal = null) {
|
|
1932
1964
|
if (!source.equals(value)) {
|
|
1933
|
-
|
|
1934
|
-
if (is_destroying_effect) old_values.set(source, value);
|
|
1935
|
-
else old_values.set(source, old_value);
|
|
1936
|
-
source.v = value;
|
|
1965
|
+
old_values.set(source, is_destroying_effect ? value : source.v);
|
|
1937
1966
|
var batch = Batch.ensure();
|
|
1938
|
-
batch.capture(source,
|
|
1967
|
+
batch.capture(source, value);
|
|
1939
1968
|
if ((source.f & 2) !== 0) {
|
|
1940
1969
|
const derived = source;
|
|
1941
1970
|
if ((source.f & 2048) !== 0) execute_derived(derived);
|
|
@@ -1985,7 +2014,7 @@ function mark_reactions(signal, status, updated_during_traversal) {
|
|
|
1985
2014
|
var derived = reaction;
|
|
1986
2015
|
batch_values?.delete(derived);
|
|
1987
2016
|
if ((flags & 65536) === 0) {
|
|
1988
|
-
if (flags & 512) reaction.f |= WAS_MARKED;
|
|
2017
|
+
if (flags & 512 && (active_effect === null || (active_effect.f & 2097152) === 0)) reaction.f |= WAS_MARKED;
|
|
1989
2018
|
mark_reactions(derived, MAYBE_DIRTY, updated_during_traversal);
|
|
1990
2019
|
}
|
|
1991
2020
|
} else if (not_dirty) {
|
|
@@ -2155,7 +2184,7 @@ function proxy(value) {
|
|
|
2155
2184
|
});
|
|
2156
2185
|
}
|
|
2157
2186
|
//#endregion
|
|
2158
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
2187
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/operations.js
|
|
2159
2188
|
/** @import { Effect, TemplateNode } from '#client' */
|
|
2160
2189
|
/** @type {Window} */
|
|
2161
2190
|
var $window;
|
|
@@ -2327,7 +2356,7 @@ function merge_text_nodes(text) {
|
|
|
2327
2356
|
}
|
|
2328
2357
|
}
|
|
2329
2358
|
//#endregion
|
|
2330
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
2359
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
|
|
2331
2360
|
/**
|
|
2332
2361
|
* @template T
|
|
2333
2362
|
* @param {() => T} fn
|
|
@@ -2345,7 +2374,7 @@ function without_reactive_context(fn) {
|
|
|
2345
2374
|
}
|
|
2346
2375
|
}
|
|
2347
2376
|
//#endregion
|
|
2348
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
2377
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/effects.js
|
|
2349
2378
|
/** @import { Blocker, ComponentContext, ComponentContextLegacy, Derived, Effect, TemplateNode, TransitionManager } from '#client' */
|
|
2350
2379
|
/**
|
|
2351
2380
|
* @param {'$effect' | '$effect.pre' | '$inspect'} rune
|
|
@@ -2674,8 +2703,10 @@ function pause_children(effect, transitions, local) {
|
|
|
2674
2703
|
var child = effect.first;
|
|
2675
2704
|
while (child !== null) {
|
|
2676
2705
|
var sibling = child.next;
|
|
2677
|
-
|
|
2678
|
-
|
|
2706
|
+
if ((child.f & 64) === 0) {
|
|
2707
|
+
var transparent = (child.f & 65536) !== 0 || (child.f & 32) !== 0 && (effect.f & 16) !== 0;
|
|
2708
|
+
pause_children(child, transitions, transparent ? local : false);
|
|
2709
|
+
}
|
|
2679
2710
|
child = sibling;
|
|
2680
2711
|
}
|
|
2681
2712
|
}
|
|
@@ -2727,14 +2758,14 @@ function move_effect(effect, fragment) {
|
|
|
2727
2758
|
}
|
|
2728
2759
|
}
|
|
2729
2760
|
//#endregion
|
|
2730
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
2761
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/legacy.js
|
|
2731
2762
|
/**
|
|
2732
2763
|
* @type {Set<Value> | null}
|
|
2733
2764
|
* @deprecated
|
|
2734
2765
|
*/
|
|
2735
2766
|
var captured_signals = null;
|
|
2736
2767
|
//#endregion
|
|
2737
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
2768
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/runtime.js
|
|
2738
2769
|
/** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
|
|
2739
2770
|
var is_updating_effect = false;
|
|
2740
2771
|
var is_destroying_effect = false;
|
|
@@ -2936,7 +2967,7 @@ function remove_reaction(signal, dependency) {
|
|
|
2936
2967
|
derived.f ^= 512;
|
|
2937
2968
|
derived.f &= ~WAS_MARKED;
|
|
2938
2969
|
}
|
|
2939
|
-
update_derived_status(derived);
|
|
2970
|
+
if (derived.v !== UNINITIALIZED) update_derived_status(derived);
|
|
2940
2971
|
freeze_derived_effects(derived);
|
|
2941
2972
|
remove_reactions(derived, 0);
|
|
2942
2973
|
}
|
|
@@ -3078,7 +3109,7 @@ function untrack(fn) {
|
|
|
3078
3109
|
}
|
|
3079
3110
|
}
|
|
3080
3111
|
//#endregion
|
|
3081
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
3112
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/elements/events.js
|
|
3082
3113
|
/**
|
|
3083
3114
|
* Used on elements, as a map of event type -> event handler,
|
|
3084
3115
|
* and on events themselves to track which element handled an event
|
|
@@ -3161,8 +3192,10 @@ function handle_event_propagation(event) {
|
|
|
3161
3192
|
}
|
|
3162
3193
|
}
|
|
3163
3194
|
//#endregion
|
|
3164
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
3165
|
-
var policy = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
3195
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/reconciler.js
|
|
3196
|
+
var policy = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
3197
|
+
/** @param {string} html */
|
|
3198
|
+
createHTML: (html) => {
|
|
3166
3199
|
return html;
|
|
3167
3200
|
} });
|
|
3168
3201
|
/** @param {string} html */
|
|
@@ -3178,7 +3211,7 @@ function create_fragment_from_html(html) {
|
|
|
3178
3211
|
return elem.content;
|
|
3179
3212
|
}
|
|
3180
3213
|
//#endregion
|
|
3181
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
3214
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/template.js
|
|
3182
3215
|
/** @import { Effect, EffectNodes, TemplateNode } from '#client' */
|
|
3183
3216
|
/** @import { TemplateStructure } from './types' */
|
|
3184
3217
|
/**
|
|
@@ -3482,7 +3515,7 @@ function unmount(component, options) {
|
|
|
3482
3515
|
return Promise.resolve();
|
|
3483
3516
|
}
|
|
3484
3517
|
//#endregion
|
|
3485
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
3518
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/blocks/branches.js
|
|
3486
3519
|
/** @import { Effect, TemplateNode } from '#client' */
|
|
3487
3520
|
var _batches = /* @__PURE__ */ new WeakMap();
|
|
3488
3521
|
var _onscreen = /* @__PURE__ */ new WeakMap();
|
|
@@ -3604,7 +3637,7 @@ var BranchManager = class {
|
|
|
3604
3637
|
}
|
|
3605
3638
|
};
|
|
3606
3639
|
//#endregion
|
|
3607
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
3640
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/blocks/if.js
|
|
3608
3641
|
/** @import { TemplateNode } from '#client' */
|
|
3609
3642
|
/**
|
|
3610
3643
|
* @param {TemplateNode} node
|
|
@@ -3650,7 +3683,7 @@ function if_block(node, fn, elseif = false) {
|
|
|
3650
3683
|
}, flags);
|
|
3651
3684
|
}
|
|
3652
3685
|
//#endregion
|
|
3653
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
3686
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/blocks/each.js
|
|
3654
3687
|
/** @import { EachItem, EachOutroGroup, EachState, Effect, EffectNodes, MaybeSource, Source, TemplateNode, TransitionManager, Value } from '#client' */
|
|
3655
3688
|
/** @import { Batch } from '../../reactivity/batch.js'; */
|
|
3656
3689
|
/**
|
|
@@ -4115,14 +4148,14 @@ function html(node, get_value, is_controlled = false, svg = false, mathml = fals
|
|
|
4115
4148
|
var wrapper = create_element(svg ? "svg" : mathml ? "math" : "template", svg ? NAMESPACE_SVG : mathml ? NAMESPACE_MATHML : void 0);
|
|
4116
4149
|
wrapper.innerHTML = value;
|
|
4117
4150
|
/** @type {DocumentFragment | Element} */
|
|
4118
|
-
var node = svg || mathml ? wrapper : wrapper.content;
|
|
4151
|
+
var node = svg || mathml ? wrapper : /** @type {HTMLTemplateElement} */ wrapper.content;
|
|
4119
4152
|
assign_nodes(/* @__PURE__ */ get_first_child(node), node.lastChild);
|
|
4120
4153
|
if (svg || mathml) while (/* @__PURE__ */ get_first_child(node)) anchor.before(/* @__PURE__ */ get_first_child(node));
|
|
4121
4154
|
else anchor.before(node);
|
|
4122
4155
|
});
|
|
4123
4156
|
}
|
|
4124
4157
|
//#endregion
|
|
4125
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
4158
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/css.js
|
|
4126
4159
|
/**
|
|
4127
4160
|
* @param {Node} anchor
|
|
4128
4161
|
* @param {{ hash: string, code: string }} css
|
|
@@ -4130,7 +4163,7 @@ function html(node, get_value, is_controlled = false, svg = false, mathml = fals
|
|
|
4130
4163
|
function append_styles(anchor, css) {
|
|
4131
4164
|
effect(() => {
|
|
4132
4165
|
var root = anchor.getRootNode();
|
|
4133
|
-
var target = root.host ? root : root.head ?? root.ownerDocument.head;
|
|
4166
|
+
var target = root.host ? root : /** @type {Document} */ root.head ?? root.ownerDocument.head;
|
|
4134
4167
|
if (!target.querySelector("#" + css.hash)) {
|
|
4135
4168
|
const style = create_element("style");
|
|
4136
4169
|
style.id = css.hash;
|
|
@@ -4140,7 +4173,7 @@ function append_styles(anchor, css) {
|
|
|
4140
4173
|
});
|
|
4141
4174
|
}
|
|
4142
4175
|
//#endregion
|
|
4143
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
4176
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/elements/attributes.js
|
|
4144
4177
|
/** @import { Blocker, Effect } from '#client' */
|
|
4145
4178
|
var IS_CUSTOM_ELEMENT = Symbol("is custom element");
|
|
4146
4179
|
var IS_HTML = Symbol("is html");
|
|
@@ -4156,7 +4189,7 @@ function set_attribute(element, attribute, value, skip_warning) {
|
|
|
4156
4189
|
if (hydrating) {
|
|
4157
4190
|
attributes[attribute] = element.getAttribute(attribute);
|
|
4158
4191
|
if (attribute === "src" || attribute === "srcset" || attribute === "href" && element.nodeName === LINK_TAG) {
|
|
4159
|
-
if (!skip_warning)
|
|
4192
|
+
if (!skip_warning);
|
|
4160
4193
|
return;
|
|
4161
4194
|
}
|
|
4162
4195
|
}
|
|
@@ -4194,14 +4227,8 @@ function get_setters(element) {
|
|
|
4194
4227
|
}
|
|
4195
4228
|
return setters;
|
|
4196
4229
|
}
|
|
4197
|
-
/**
|
|
4198
|
-
* @param {any} element
|
|
4199
|
-
* @param {string} attribute
|
|
4200
|
-
* @param {string} value
|
|
4201
|
-
*/
|
|
4202
|
-
function check_src_in_dev_hydration(element, attribute, value) {}
|
|
4203
4230
|
//#endregion
|
|
4204
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
4231
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/elements/bindings/size.js
|
|
4205
4232
|
var _ResizeObserverSingleton;
|
|
4206
4233
|
var _listeners = /* @__PURE__ */ new WeakMap();
|
|
4207
4234
|
var _observer = /* @__PURE__ */ new WeakMap();
|
|
@@ -4253,7 +4280,7 @@ function _getObserver() {
|
|
|
4253
4280
|
}
|
|
4254
4281
|
_defineProperty(ResizeObserverSingleton, "entries", /* @__PURE__ */ new WeakMap());
|
|
4255
4282
|
//#endregion
|
|
4256
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
4283
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/props.js
|
|
4257
4284
|
/** @import { Effect, Source } from './types.js' */
|
|
4258
4285
|
/**
|
|
4259
4286
|
* This function is responsible for synchronizing a possibly bound prop with the inner component state.
|
|
@@ -4341,7 +4368,7 @@ function prop(props, key, flags, fallback) {
|
|
|
4341
4368
|
});
|
|
4342
4369
|
}
|
|
4343
4370
|
//#endregion
|
|
4344
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
4371
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/legacy/legacy-client.js
|
|
4345
4372
|
/** @import { ComponentConstructorOptions, ComponentType, SvelteComponent, Component } from 'svelte' */
|
|
4346
4373
|
/**
|
|
4347
4374
|
* Takes the same options as a Svelte 4 component and the component function and returns a Svelte 4 compatible component.
|
|
@@ -4420,6 +4447,7 @@ var Svelte4Component = class {
|
|
|
4420
4447
|
get() {
|
|
4421
4448
|
return _classPrivateFieldGet2(_instance, this)[key];
|
|
4422
4449
|
},
|
|
4450
|
+
/** @param {any} value */
|
|
4423
4451
|
set(value) {
|
|
4424
4452
|
_classPrivateFieldGet2(_instance, this)[key] = value;
|
|
4425
4453
|
},
|
|
@@ -4459,7 +4487,7 @@ var Svelte4Component = class {
|
|
|
4459
4487
|
}
|
|
4460
4488
|
};
|
|
4461
4489
|
//#endregion
|
|
4462
|
-
//#region ../../../node_modules/.bun/svelte@5.55.
|
|
4490
|
+
//#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/elements/custom-element.js
|
|
4463
4491
|
/**
|
|
4464
4492
|
* @typedef {Object} CustomElementPropDefinition
|
|
4465
4493
|
* @property {string} [attribute]
|