@pie-element/mc-populated-blank 0.2.10 → 0.2.12

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.
Files changed (55) hide show
  1. package/README.md +0 -2
  2. package/dist/author/index.js +186 -152
  3. package/dist/author/index.js.map +1 -1
  4. package/dist/controller/defaults.d.ts +41 -73
  5. package/dist/controller/defaults.d.ts.map +1 -1
  6. package/dist/controller/index.d.ts +154 -10
  7. package/dist/controller/index.d.ts.map +1 -1
  8. package/dist/controller/index.js +29 -30
  9. package/dist/controller/index.js.map +1 -1
  10. package/dist/delivery/computeAudioMode.d.ts +7 -0
  11. package/dist/delivery/computeAudioMode.d.ts.map +1 -0
  12. package/dist/delivery/computeChoiceCorrectness.d.ts +18 -0
  13. package/dist/delivery/computeChoiceCorrectness.d.ts.map +1 -0
  14. package/dist/delivery/computeDisplayState.d.ts +47 -0
  15. package/dist/delivery/computeDisplayState.d.ts.map +1 -0
  16. package/dist/delivery/computeLayoutProfile.d.ts +18 -0
  17. package/dist/delivery/computeLayoutProfile.d.ts.map +1 -0
  18. package/dist/delivery/computeLayoutStyle.d.ts +27 -0
  19. package/dist/delivery/computeLayoutStyle.d.ts.map +1 -0
  20. package/dist/delivery/index.d.ts.map +1 -1
  21. package/dist/delivery/index.js +1591 -927
  22. package/dist/delivery/index.js.map +1 -1
  23. package/dist/delivery/variant-css-map.d.ts.map +1 -1
  24. package/dist/index.iife.d.ts +151 -10
  25. package/dist/index.iife.d.ts.map +1 -1
  26. package/dist/index.iife.js +233 -114
  27. package/dist/index.js +1591 -927
  28. package/dist/index.js.map +1 -1
  29. package/dist/print/index.js +194 -166
  30. package/dist/print/index.js.map +1 -1
  31. package/dist/shared/layoutLimits.d.ts +40 -0
  32. package/dist/shared/layoutLimits.d.ts.map +1 -0
  33. package/dist/shared/types.d.ts +82 -0
  34. package/dist/shared/types.d.ts.map +1 -0
  35. package/package.json +5 -14
  36. package/src/author/Author.svelte +0 -41
  37. package/src/author/index.ts +0 -28
  38. package/src/controller/defaults.ts +0 -91
  39. package/src/controller/index.ts +0 -359
  40. package/src/delivery/McPopulatedBlank.svelte +0 -1246
  41. package/src/delivery/cqt-css/sel-r1-g-stem.css +0 -29
  42. package/src/delivery/cqt-css/sel-r1-gg-plus.css +0 -29
  43. package/src/delivery/cqt-css/sel-r1-ggplus.css +0 -34
  44. package/src/delivery/cqt-css/sel-r1-gplusggg.css +0 -20
  45. package/src/delivery/cqt-css/sel-r1-plusggg.css +0 -20
  46. package/src/delivery/cqt-css/sel-r1-s3.css +0 -91
  47. package/src/delivery/cqt-css/sel-vic.css +0 -38
  48. package/src/delivery/cqt-css/sr-vic.css +0 -14
  49. package/src/delivery/index.ts +0 -103
  50. package/src/delivery/variant-css-map.ts +0 -110
  51. package/src/index.iife.ts +0 -13
  52. package/src/index.ts +0 -1
  53. package/src/print/Print.svelte +0 -95
  54. package/src/print/index.ts +0 -18
  55. package/src/types/css-raw.d.ts +0 -4
@@ -1,14 +1,14 @@
1
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/disclose-version.js
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.1/node_modules/svelte/src/constants.js
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
  //#endregion
11
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/shared/utils.js
11
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/shared/utils.js
12
12
  var is_array = Array.isArray;
13
13
  var index_of = Array.prototype.indexOf;
14
14
  var includes = Array.prototype.includes;
@@ -44,7 +44,7 @@ function deferred() {
44
44
  };
45
45
  }
46
46
  //#endregion
47
- //#region \0@oxc-project+runtime@0.120.0/helpers/typeof.js
47
+ //#region \0@oxc-project+runtime@0.129.0/helpers/typeof.js
48
48
  function _typeof(o) {
49
49
  "@babel/helpers - typeof";
50
50
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -54,7 +54,7 @@ function _typeof(o) {
54
54
  }, _typeof(o);
55
55
  }
56
56
  //#endregion
57
- //#region \0@oxc-project+runtime@0.120.0/helpers/toPrimitive.js
57
+ //#region \0@oxc-project+runtime@0.129.0/helpers/toPrimitive.js
58
58
  function toPrimitive(t, r) {
59
59
  if ("object" != _typeof(t) || !t) return t;
60
60
  var e = t[Symbol.toPrimitive];
@@ -66,13 +66,13 @@ function toPrimitive(t, r) {
66
66
  return ("string" === r ? String : Number)(t);
67
67
  }
68
68
  //#endregion
69
- //#region \0@oxc-project+runtime@0.120.0/helpers/toPropertyKey.js
69
+ //#region \0@oxc-project+runtime@0.129.0/helpers/toPropertyKey.js
70
70
  function toPropertyKey(t) {
71
71
  var i = toPrimitive(t, "string");
72
72
  return "symbol" == _typeof(i) ? i : i + "";
73
73
  }
74
74
  //#endregion
75
- //#region \0@oxc-project+runtime@0.120.0/helpers/defineProperty.js
75
+ //#region \0@oxc-project+runtime@0.129.0/helpers/defineProperty.js
76
76
  function _defineProperty(e, r, t) {
77
77
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
78
78
  value: t,
@@ -100,7 +100,8 @@ var USER_EFFECT = 1 << 20;
100
100
  /**
101
101
  * Tells that we marked this derived and its reactions as visited during the "mark as (maybe) dirty"-phase.
102
102
  * Will be lifted during execution of the derived and during checking its dirty state (both are necessary
103
- * because a derived might be checked but not executed).
103
+ * because a derived might be checked but not executed). This is a pure performance optimization flag and
104
+ * should not be used for any other purpose!
104
105
  */
105
106
  var WAS_MARKED = 65536;
106
107
  var REACTION_IS_UPDATING = 1 << 21;
@@ -167,6 +168,12 @@ function svelte_boundary_reset_onerror() {
167
168
  throw new Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`);
168
169
  }
169
170
  /**
171
+ * Reading a derived belonging to a now-destroyed effect may result in stale values
172
+ */
173
+ function derived_inert() {
174
+ console.warn(`https://svelte.dev/e/derived_inert`);
175
+ }
176
+ /**
170
177
  * Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near %location%
171
178
  * @param {string | undefined | null} [location]
172
179
  */
@@ -180,7 +187,7 @@ function svelte_boundary_reset_noop() {
180
187
  console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`);
181
188
  }
182
189
  //#endregion
183
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/dom/hydration.js
190
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/hydration.js
184
191
  /** @import { TemplateNode } from '#client' */
185
192
  /**
186
193
  * Use this variable to guard everything related to hydration code so it can be treeshaken out
@@ -239,7 +246,7 @@ function skip_nodes(remove = true) {
239
246
  }
240
247
  }
241
248
  //#endregion
242
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/reactivity/equality.js
249
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/equality.js
243
250
  /** @import { Equals } from '#client' */
244
251
  /** @type {Equals} */
245
252
  function equals(value) {
@@ -258,13 +265,13 @@ function safe_equals(value) {
258
265
  return !safe_not_equal(value, this.v);
259
266
  }
260
267
  //#endregion
261
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/flags/index.js
268
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/flags/index.js
262
269
  /** True if experimental.async=true */
263
270
  var async_mode_flag = false;
264
271
  /** True if we're not certain that we only have Svelte 5 code in the compilation */
265
272
  var legacy_mode_flag = false;
266
273
  //#endregion
267
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/context.js
274
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/context.js
268
275
  /** @import { ComponentContext, DevStackEntry, Effect } from '#client' */
269
276
  /** @type {ComponentContext | null} */
270
277
  var component_context = null;
@@ -316,7 +323,7 @@ function is_runes() {
316
323
  return !legacy_mode_flag || component_context !== null && component_context.l === null;
317
324
  }
318
325
  //#endregion
319
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/dom/task.js
326
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/task.js
320
327
  /** @type {Array<() => void>} */
321
328
  var micro_tasks = [];
322
329
  function run_micro_tasks() {
@@ -374,7 +381,7 @@ function invoke_error_boundary(error, effect) {
374
381
  throw error;
375
382
  }
376
383
  //#endregion
377
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/reactivity/status.js
384
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/status.js
378
385
  /** @import { Derived, Signal } from '#client' */
379
386
  var STATUS_MASK = ~(DIRTY | MAYBE_DIRTY | CLEAN);
380
387
  /**
@@ -393,7 +400,7 @@ function update_derived_status(derived) {
393
400
  else set_signal_status(derived, MAYBE_DIRTY);
394
401
  }
395
402
  //#endregion
396
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/reactivity/utils.js
403
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/utils.js
397
404
  /** @import { Derived, Effect, Value } from '#client' */
398
405
  /**
399
406
  * @param {Value[] | null} deps
@@ -421,7 +428,7 @@ function defer_effect(effect, dirty_effects, maybe_dirty_effects) {
421
428
  set_signal_status(effect, CLEAN);
422
429
  }
423
430
  //#endregion
424
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/reactivity/store.js
431
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/store.js
425
432
  /**
426
433
  * We set this to `true` when updating a store so that we correctly
427
434
  * schedule effects if the update takes place inside a `$:` effect
@@ -451,38 +458,38 @@ function capture_store_binding(fn) {
451
458
  }
452
459
  }
453
460
  //#endregion
454
- //#region \0@oxc-project+runtime@0.120.0/helpers/checkPrivateRedeclaration.js
461
+ //#region \0@oxc-project+runtime@0.129.0/helpers/checkPrivateRedeclaration.js
455
462
  function _checkPrivateRedeclaration(e, t) {
456
463
  if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
457
464
  }
458
465
  //#endregion
459
- //#region \0@oxc-project+runtime@0.120.0/helpers/classPrivateMethodInitSpec.js
466
+ //#region \0@oxc-project+runtime@0.129.0/helpers/classPrivateMethodInitSpec.js
460
467
  function _classPrivateMethodInitSpec(e, a) {
461
468
  _checkPrivateRedeclaration(e, a), a.add(e);
462
469
  }
463
470
  //#endregion
464
- //#region \0@oxc-project+runtime@0.120.0/helpers/classPrivateFieldInitSpec.js
471
+ //#region \0@oxc-project+runtime@0.129.0/helpers/classPrivateFieldInitSpec.js
465
472
  function _classPrivateFieldInitSpec(e, t, a) {
466
473
  _checkPrivateRedeclaration(e, t), t.set(e, a);
467
474
  }
468
475
  //#endregion
469
- //#region \0@oxc-project+runtime@0.120.0/helpers/assertClassBrand.js
476
+ //#region \0@oxc-project+runtime@0.129.0/helpers/assertClassBrand.js
470
477
  function _assertClassBrand(e, t, n) {
471
478
  if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
472
479
  throw new TypeError("Private element is not present on this object");
473
480
  }
474
481
  //#endregion
475
- //#region \0@oxc-project+runtime@0.120.0/helpers/classPrivateFieldGet2.js
482
+ //#region \0@oxc-project+runtime@0.129.0/helpers/classPrivateFieldGet2.js
476
483
  function _classPrivateFieldGet2(s, a) {
477
484
  return s.get(_assertClassBrand(s, a));
478
485
  }
479
486
  //#endregion
480
- //#region \0@oxc-project+runtime@0.120.0/helpers/classPrivateFieldSet2.js
487
+ //#region \0@oxc-project+runtime@0.129.0/helpers/classPrivateFieldSet2.js
481
488
  function _classPrivateFieldSet2(s, a, r) {
482
489
  return s.set(_assertClassBrand(s, a), r), r;
483
490
  }
484
491
  //#endregion
485
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/reactivity/batch.js
492
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/batch.js
486
493
  /** @import { Fork } from 'svelte' */
487
494
  /** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
488
495
  var _Batch;
@@ -520,6 +527,7 @@ var flush_count = 0;
520
527
  var uid = 1;
521
528
  var _commit_callbacks = /* @__PURE__ */ new WeakMap();
522
529
  var _discard_callbacks = /* @__PURE__ */ new WeakMap();
530
+ var _fork_commit_callbacks = /* @__PURE__ */ new WeakMap();
523
531
  var _pending = /* @__PURE__ */ new WeakMap();
524
532
  var _blocking_pending = /* @__PURE__ */ new WeakMap();
525
533
  var _deferred = /* @__PURE__ */ new WeakMap();
@@ -528,6 +536,7 @@ var _new_effects = /* @__PURE__ */ new WeakMap();
528
536
  var _dirty_effects$1 = /* @__PURE__ */ new WeakMap();
529
537
  var _maybe_dirty_effects$1 = /* @__PURE__ */ new WeakMap();
530
538
  var _skipped_branches = /* @__PURE__ */ new WeakMap();
539
+ var _unskipped_branches = /* @__PURE__ */ new WeakMap();
531
540
  var _decrement_queued = /* @__PURE__ */ new WeakMap();
532
541
  var _blockers = /* @__PURE__ */ new WeakMap();
533
542
  var _Batch_brand = /* @__PURE__ */ new WeakSet();
@@ -558,6 +567,7 @@ var Batch = class Batch {
558
567
  );
559
568
  _classPrivateFieldInitSpec(this, _commit_callbacks, /* @__PURE__ */ new Set());
560
569
  _classPrivateFieldInitSpec(this, _discard_callbacks, /* @__PURE__ */ new Set());
570
+ _classPrivateFieldInitSpec(this, _fork_commit_callbacks, /* @__PURE__ */ new Set());
561
571
  _classPrivateFieldInitSpec(this, _pending, /* @__PURE__ */ new Map());
562
572
  _classPrivateFieldInitSpec(this, _blocking_pending, /* @__PURE__ */ new Map());
563
573
  _classPrivateFieldInitSpec(this, _deferred, null);
@@ -566,6 +576,7 @@ var Batch = class Batch {
566
576
  _classPrivateFieldInitSpec(this, _dirty_effects$1, /* @__PURE__ */ new Set());
567
577
  _classPrivateFieldInitSpec(this, _maybe_dirty_effects$1, /* @__PURE__ */ new Set());
568
578
  _classPrivateFieldInitSpec(this, _skipped_branches, /* @__PURE__ */ new Map());
579
+ _classPrivateFieldInitSpec(this, _unskipped_branches, /* @__PURE__ */ new Set());
569
580
  _defineProperty(this, "is_fork", false);
570
581
  _classPrivateFieldInitSpec(this, _decrement_queued, false);
571
582
  _classPrivateFieldInitSpec(this, _blockers, /* @__PURE__ */ new Set());
@@ -579,39 +590,43 @@ var Batch = class Batch {
579
590
  d: [],
580
591
  m: []
581
592
  });
593
+ _classPrivateFieldGet2(_unskipped_branches, this).delete(effect);
582
594
  }
583
595
  /**
584
596
  * Remove an effect from the #skipped_branches map and reschedule
585
597
  * any tracked dirty/maybe_dirty child effects
586
598
  * @param {Effect} effect
599
+ * @param {(e: Effect) => void} callback
587
600
  */
588
- unskip_effect(effect) {
601
+ unskip_effect(effect, callback = (e) => this.schedule(e)) {
589
602
  var tracked = _classPrivateFieldGet2(_skipped_branches, this).get(effect);
590
603
  if (tracked) {
591
604
  _classPrivateFieldGet2(_skipped_branches, this).delete(effect);
592
605
  for (var e of tracked.d) {
593
606
  set_signal_status(e, DIRTY);
594
- this.schedule(e);
607
+ callback(e);
595
608
  }
596
609
  for (e of tracked.m) {
597
610
  set_signal_status(e, MAYBE_DIRTY);
598
- this.schedule(e);
611
+ callback(e);
599
612
  }
600
613
  }
614
+ _classPrivateFieldGet2(_unskipped_branches, this).add(effect);
601
615
  }
602
616
  /**
603
617
  * Associate a change to a given source with the current
604
618
  * batch, noting its previous and current values
605
619
  * @param {Value} source
606
- * @param {any} old_value
620
+ * @param {any} value
607
621
  * @param {boolean} [is_derived]
608
622
  */
609
- capture(source, old_value, is_derived = false) {
610
- if (old_value !== UNINITIALIZED && !this.previous.has(source)) this.previous.set(source, old_value);
623
+ capture(source, value, is_derived = false) {
624
+ if (source.v !== UNINITIALIZED && !this.previous.has(source)) this.previous.set(source, source.v);
611
625
  if ((source.f & 8388608) === 0) {
612
- this.current.set(source, [source.v, is_derived]);
613
- batch_values?.set(source, source.v);
626
+ this.current.set(source, [value, is_derived]);
627
+ batch_values?.set(source, value);
614
628
  }
629
+ if (!this.is_fork) source.v = value;
615
630
  }
616
631
  activate() {
617
632
  current_batch = this;
@@ -639,6 +654,7 @@ var Batch = class Batch {
639
654
  discard() {
640
655
  for (const fn of _classPrivateFieldGet2(_discard_callbacks, this)) fn(this);
641
656
  _classPrivateFieldGet2(_discard_callbacks, this).clear();
657
+ _classPrivateFieldGet2(_fork_commit_callbacks, this).clear();
642
658
  batches.delete(this);
643
659
  }
644
660
  /**
@@ -698,6 +714,14 @@ var Batch = class Batch {
698
714
  ondiscard(fn) {
699
715
  _classPrivateFieldGet2(_discard_callbacks, this).add(fn);
700
716
  }
717
+ /** @param {(batch: Batch) => void} fn */
718
+ on_fork_commit(fn) {
719
+ _classPrivateFieldGet2(_fork_commit_callbacks, this).add(fn);
720
+ }
721
+ run_fork_commit_callbacks() {
722
+ for (const fn of _classPrivateFieldGet2(_fork_commit_callbacks, this)) fn(this);
723
+ _classPrivateFieldGet2(_fork_commit_callbacks, this).clear();
724
+ }
701
725
  settled() {
702
726
  return (_classPrivateFieldGet2(_deferred, this) ?? _classPrivateFieldSet2(_deferred, this, deferred())).promise;
703
727
  }
@@ -843,7 +867,7 @@ function _process() {
843
867
  batches.add(next_batch);
844
868
  _assertClassBrand(_Batch_brand, next_batch, _process).call(next_batch);
845
869
  }
846
- if (!batches.has(this)) _assertClassBrand(_Batch_brand, this, _commit).call(this);
870
+ if (async_mode_flag && !batches.has(this)) _assertClassBrand(_Batch_brand, this, _commit).call(this);
847
871
  }
848
872
  /**
849
873
  * Traverse the effect tree, executing effects or stashing
@@ -905,6 +929,10 @@ function _commit() {
905
929
  if (others.length === 0) {
906
930
  if (is_earlier) batch.discard();
907
931
  } else if (sources.length > 0) {
932
+ if (is_earlier) for (const unskipped of _classPrivateFieldGet2(_unskipped_branches, this)) batch.unskip_effect(unskipped, (e) => {
933
+ if ((e.f & 4194320) !== 0) batch.schedule(e);
934
+ else _assertClassBrand(_Batch_brand, batch, _defer_effects).call(batch, [e]);
935
+ });
908
936
  batch.activate();
909
937
  /** @type {Set<Value>} */
910
938
  var marked = /* @__PURE__ */ new Set();
@@ -1084,7 +1112,7 @@ function reset_all(effect) {
1084
1112
  }
1085
1113
  }
1086
1114
  //#endregion
1087
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/reactivity/create-subscriber.js
1115
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/reactivity/create-subscriber.js
1088
1116
  /**
1089
1117
  * Returns a `subscribe` function that integrates external event-based systems with Svelte's reactivity.
1090
1118
  * It's particularly useful for integrating with web APIs like `MediaQuery`, `IntersectionObserver`, or `WebSocket`.
@@ -1157,7 +1185,7 @@ function createSubscriber(start) {
1157
1185
  };
1158
1186
  }
1159
1187
  //#endregion
1160
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
1188
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
1161
1189
  /** @import { Effect, Source, TemplateNode, } from '#client' */
1162
1190
  /**
1163
1191
  * @typedef {{
@@ -1305,82 +1333,15 @@ var Boundary = class {
1305
1333
  }
1306
1334
  /** @param {unknown} error */
1307
1335
  error(error) {
1308
- var onerror = _classPrivateFieldGet2(_props, this).onerror;
1309
- let failed = _classPrivateFieldGet2(_props, this).failed;
1310
- if (!onerror && !failed) throw error;
1311
- if (_classPrivateFieldGet2(_main_effect, this)) {
1312
- destroy_effect(_classPrivateFieldGet2(_main_effect, this));
1313
- _classPrivateFieldSet2(_main_effect, this, null);
1314
- }
1315
- if (_classPrivateFieldGet2(_pending_effect, this)) {
1316
- destroy_effect(_classPrivateFieldGet2(_pending_effect, this));
1317
- _classPrivateFieldSet2(_pending_effect, this, null);
1318
- }
1319
- if (_classPrivateFieldGet2(_failed_effect, this)) {
1320
- destroy_effect(_classPrivateFieldGet2(_failed_effect, this));
1321
- _classPrivateFieldSet2(_failed_effect, this, null);
1322
- }
1323
- if (hydrating) {
1324
- set_hydrate_node(_classPrivateFieldGet2(_hydrate_open, this));
1325
- next();
1326
- set_hydrate_node(skip_nodes());
1327
- }
1328
- var did_reset = false;
1329
- var calling_on_error = false;
1330
- const reset = () => {
1331
- if (did_reset) {
1332
- svelte_boundary_reset_noop();
1333
- return;
1334
- }
1335
- did_reset = true;
1336
- if (calling_on_error) svelte_boundary_reset_onerror();
1337
- if (_classPrivateFieldGet2(_failed_effect, this) !== null) pause_effect(_classPrivateFieldGet2(_failed_effect, this), () => {
1338
- _classPrivateFieldSet2(_failed_effect, this, null);
1336
+ if (!_classPrivateFieldGet2(_props, this).onerror && !_classPrivateFieldGet2(_props, this).failed) throw error;
1337
+ if (current_batch?.is_fork) {
1338
+ if (_classPrivateFieldGet2(_main_effect, this)) current_batch.skip_effect(_classPrivateFieldGet2(_main_effect, this));
1339
+ if (_classPrivateFieldGet2(_pending_effect, this)) current_batch.skip_effect(_classPrivateFieldGet2(_pending_effect, this));
1340
+ if (_classPrivateFieldGet2(_failed_effect, this)) current_batch.skip_effect(_classPrivateFieldGet2(_failed_effect, this));
1341
+ current_batch.on_fork_commit(() => {
1342
+ _assertClassBrand(_Boundary_brand, this, _handle_error).call(this, error);
1339
1343
  });
1340
- _assertClassBrand(_Boundary_brand, this, _run).call(this, () => {
1341
- _assertClassBrand(_Boundary_brand, this, _render).call(this);
1342
- });
1343
- };
1344
- /** @param {unknown} transformed_error */
1345
- const handle_error_result = (transformed_error) => {
1346
- try {
1347
- calling_on_error = true;
1348
- onerror?.(transformed_error, reset);
1349
- calling_on_error = false;
1350
- } catch (error) {
1351
- invoke_error_boundary(error, _classPrivateFieldGet2(_effect, this) && _classPrivateFieldGet2(_effect, this).parent);
1352
- }
1353
- if (failed) _classPrivateFieldSet2(_failed_effect, this, _assertClassBrand(_Boundary_brand, this, _run).call(this, () => {
1354
- try {
1355
- return branch(() => {
1356
- var effect = active_effect;
1357
- effect.b = this;
1358
- effect.f |= 128;
1359
- failed(_classPrivateFieldGet2(_anchor, this), () => transformed_error, () => reset);
1360
- });
1361
- } catch (error) {
1362
- invoke_error_boundary(error, _classPrivateFieldGet2(_effect, this).parent);
1363
- return null;
1364
- }
1365
- }));
1366
- };
1367
- queue_micro_task(() => {
1368
- /** @type {unknown} */
1369
- var result;
1370
- try {
1371
- result = this.transform_error(error);
1372
- } catch (e) {
1373
- invoke_error_boundary(e, _classPrivateFieldGet2(_effect, this) && _classPrivateFieldGet2(_effect, this).parent);
1374
- return;
1375
- }
1376
- if (result !== null && typeof result === "object" && typeof result.then === "function")
1377
- /** @type {any} */ result.then(
1378
- handle_error_result,
1379
- /** @param {unknown} e */
1380
- (e) => invoke_error_boundary(e, _classPrivateFieldGet2(_effect, this) && _classPrivateFieldGet2(_effect, this).parent)
1381
- );
1382
- else handle_error_result(result);
1383
- });
1344
+ } else _assertClassBrand(_Boundary_brand, this, _handle_error).call(this, error);
1384
1345
  }
1385
1346
  };
1386
1347
  function _hydrate_resolved_content() {
@@ -1497,6 +1458,86 @@ function _update_pending_count(d, batch) {
1497
1458
  }
1498
1459
  }
1499
1460
  /**
1461
+ * @param {unknown} error
1462
+ */
1463
+ function _handle_error(error) {
1464
+ if (_classPrivateFieldGet2(_main_effect, this)) {
1465
+ destroy_effect(_classPrivateFieldGet2(_main_effect, this));
1466
+ _classPrivateFieldSet2(_main_effect, this, null);
1467
+ }
1468
+ if (_classPrivateFieldGet2(_pending_effect, this)) {
1469
+ destroy_effect(_classPrivateFieldGet2(_pending_effect, this));
1470
+ _classPrivateFieldSet2(_pending_effect, this, null);
1471
+ }
1472
+ if (_classPrivateFieldGet2(_failed_effect, this)) {
1473
+ destroy_effect(_classPrivateFieldGet2(_failed_effect, this));
1474
+ _classPrivateFieldSet2(_failed_effect, this, null);
1475
+ }
1476
+ if (hydrating) {
1477
+ set_hydrate_node(_classPrivateFieldGet2(_hydrate_open, this));
1478
+ next();
1479
+ set_hydrate_node(skip_nodes());
1480
+ }
1481
+ var onerror = _classPrivateFieldGet2(_props, this).onerror;
1482
+ let failed = _classPrivateFieldGet2(_props, this).failed;
1483
+ var did_reset = false;
1484
+ var calling_on_error = false;
1485
+ const reset = () => {
1486
+ if (did_reset) {
1487
+ svelte_boundary_reset_noop();
1488
+ return;
1489
+ }
1490
+ did_reset = true;
1491
+ if (calling_on_error) svelte_boundary_reset_onerror();
1492
+ if (_classPrivateFieldGet2(_failed_effect, this) !== null) pause_effect(_classPrivateFieldGet2(_failed_effect, this), () => {
1493
+ _classPrivateFieldSet2(_failed_effect, this, null);
1494
+ });
1495
+ _assertClassBrand(_Boundary_brand, this, _run).call(this, () => {
1496
+ _assertClassBrand(_Boundary_brand, this, _render).call(this);
1497
+ });
1498
+ };
1499
+ /** @param {unknown} transformed_error */
1500
+ const handle_error_result = (transformed_error) => {
1501
+ try {
1502
+ calling_on_error = true;
1503
+ onerror?.(transformed_error, reset);
1504
+ calling_on_error = false;
1505
+ } catch (error) {
1506
+ invoke_error_boundary(error, _classPrivateFieldGet2(_effect, this) && _classPrivateFieldGet2(_effect, this).parent);
1507
+ }
1508
+ if (failed) _classPrivateFieldSet2(_failed_effect, this, _assertClassBrand(_Boundary_brand, this, _run).call(this, () => {
1509
+ try {
1510
+ return branch(() => {
1511
+ var effect = active_effect;
1512
+ effect.b = this;
1513
+ effect.f |= 128;
1514
+ failed(_classPrivateFieldGet2(_anchor, this), () => transformed_error, () => reset);
1515
+ });
1516
+ } catch (error) {
1517
+ invoke_error_boundary(error, _classPrivateFieldGet2(_effect, this).parent);
1518
+ return null;
1519
+ }
1520
+ }));
1521
+ };
1522
+ queue_micro_task(() => {
1523
+ /** @type {unknown} */
1524
+ var result;
1525
+ try {
1526
+ result = this.transform_error(error);
1527
+ } catch (e) {
1528
+ invoke_error_boundary(e, _classPrivateFieldGet2(_effect, this) && _classPrivateFieldGet2(_effect, this).parent);
1529
+ return;
1530
+ }
1531
+ if (result !== null && typeof result === "object" && typeof result.then === "function")
1532
+ /** @type {any} */ result.then(
1533
+ handle_error_result,
1534
+ /** @param {unknown} e */
1535
+ (e) => invoke_error_boundary(e, _classPrivateFieldGet2(_effect, this) && _classPrivateFieldGet2(_effect, this).parent)
1536
+ );
1537
+ else handle_error_result(result);
1538
+ });
1539
+ }
1540
+ /**
1500
1541
  * @template V
1501
1542
  * @param {() => V} fn
1502
1543
  * @returns {Derived<V>}
@@ -1504,7 +1545,6 @@ function _update_pending_count(d, batch) {
1504
1545
  /* @__NO_SIDE_EFFECTS__ */
1505
1546
  function derived(fn) {
1506
1547
  var flags = 2 | DIRTY;
1507
- var parent_derived = active_reaction !== null && (active_reaction.f & 2) !== 0 ? active_reaction : null;
1508
1548
  if (active_effect !== null) active_effect.f |= EFFECT_PRESERVED;
1509
1549
  return {
1510
1550
  ctx: component_context,
@@ -1517,7 +1557,7 @@ function derived(fn) {
1517
1557
  rv: 0,
1518
1558
  v: UNINITIALIZED,
1519
1559
  wv: 0,
1520
- parent: parent_derived ?? active_effect,
1560
+ parent: active_effect,
1521
1561
  ac: null
1522
1562
  };
1523
1563
  }
@@ -1544,18 +1584,6 @@ function destroy_derived_effects(derived) {
1544
1584
  }
1545
1585
  }
1546
1586
  /**
1547
- * @param {Derived} derived
1548
- * @returns {Effect | null}
1549
- */
1550
- function get_derived_parent_effect(derived) {
1551
- var parent = derived.parent;
1552
- while (parent !== null) {
1553
- if ((parent.f & 2) === 0) return (parent.f & 16384) === 0 ? parent : null;
1554
- parent = parent.parent;
1555
- }
1556
- return null;
1557
- }
1558
- /**
1559
1587
  * @template T
1560
1588
  * @param {Derived} derived
1561
1589
  * @returns {T}
@@ -1563,7 +1591,12 @@ function get_derived_parent_effect(derived) {
1563
1591
  function execute_derived(derived) {
1564
1592
  var value;
1565
1593
  var prev_active_effect = active_effect;
1566
- set_active_effect(get_derived_parent_effect(derived));
1594
+ var parent = derived.parent;
1595
+ if (!is_destroying_effect && parent !== null && (parent.f & 24576) !== 0) {
1596
+ derived_inert();
1597
+ return derived.v;
1598
+ }
1599
+ set_active_effect(parent);
1567
1600
  try {
1568
1601
  derived.f &= ~WAS_MARKED;
1569
1602
  destroy_derived_effects(derived);
@@ -1578,13 +1611,12 @@ function execute_derived(derived) {
1578
1611
  * @returns {void}
1579
1612
  */
1580
1613
  function update_derived(derived) {
1581
- var old_value = derived.v;
1582
1614
  var value = execute_derived(derived);
1583
1615
  if (!derived.equals(value)) {
1584
1616
  derived.wv = increment_write_version();
1585
1617
  if (!current_batch?.is_fork || derived.deps === null) {
1586
- derived.v = value;
1587
- current_batch?.capture(derived, old_value, true);
1618
+ if (current_batch !== null) current_batch.capture(derived, value, true);
1619
+ else derived.v = value;
1588
1620
  if (derived.deps === null) {
1589
1621
  set_signal_status(derived, CLEAN);
1590
1622
  return;
@@ -1618,7 +1650,7 @@ function unfreeze_derived_effects(derived) {
1618
1650
  for (const e of derived.effects) if (e.teardown) update_effect(e);
1619
1651
  }
1620
1652
  //#endregion
1621
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/reactivity/sources.js
1653
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/sources.js
1622
1654
  /** @import { Derived, Effect, Source, Value } from '#client' */
1623
1655
  /** @type {Set<any>} */
1624
1656
  var eager_effects = /* @__PURE__ */ new Set();
@@ -1688,12 +1720,9 @@ function set(source, value, should_proxy = false) {
1688
1720
  */
1689
1721
  function internal_set(source, value, updated_during_traversal = null) {
1690
1722
  if (!source.equals(value)) {
1691
- var old_value = source.v;
1692
- if (is_destroying_effect) old_values.set(source, value);
1693
- else old_values.set(source, old_value);
1694
- source.v = value;
1723
+ old_values.set(source, is_destroying_effect ? value : source.v);
1695
1724
  var batch = Batch.ensure();
1696
- batch.capture(source, old_value);
1725
+ batch.capture(source, value);
1697
1726
  if ((source.f & 2) !== 0) {
1698
1727
  const derived = source;
1699
1728
  if ((source.f & 2048) !== 0) execute_derived(derived);
@@ -1743,7 +1772,7 @@ function mark_reactions(signal, status, updated_during_traversal) {
1743
1772
  var derived = reaction;
1744
1773
  batch_values?.delete(derived);
1745
1774
  if ((flags & 65536) === 0) {
1746
- if (flags & 512) reaction.f |= WAS_MARKED;
1775
+ if (flags & 512 && (active_effect === null || (active_effect.f & 2097152) === 0)) reaction.f |= WAS_MARKED;
1747
1776
  mark_reactions(derived, MAYBE_DIRTY, updated_during_traversal);
1748
1777
  }
1749
1778
  } else if (not_dirty) {
@@ -1913,7 +1942,7 @@ function proxy(value) {
1913
1942
  });
1914
1943
  }
1915
1944
  //#endregion
1916
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/dom/operations.js
1945
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/operations.js
1917
1946
  /** @type {Window} */
1918
1947
  var $window;
1919
1948
  /** @type {boolean} */
@@ -1987,7 +2016,7 @@ function create_element(tag, namespace, is) {
1987
2016
  return document.createElementNS(namespace ?? "http://www.w3.org/1999/xhtml", tag, options);
1988
2017
  }
1989
2018
  //#endregion
1990
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
2019
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
1991
2020
  /**
1992
2021
  * @template T
1993
2022
  * @param {() => T} fn
@@ -2005,7 +2034,7 @@ function without_reactive_context(fn) {
2005
2034
  }
2006
2035
  }
2007
2036
  //#endregion
2008
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/reactivity/effects.js
2037
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/effects.js
2009
2038
  /** @import { Blocker, ComponentContext, ComponentContextLegacy, Derived, Effect, TemplateNode, TransitionManager } from '#client' */
2010
2039
  /**
2011
2040
  * @param {Effect} effect
@@ -2285,8 +2314,10 @@ function pause_children(effect, transitions, local) {
2285
2314
  var child = effect.first;
2286
2315
  while (child !== null) {
2287
2316
  var sibling = child.next;
2288
- var transparent = (child.f & 65536) !== 0 || (child.f & 32) !== 0 && (effect.f & 16) !== 0;
2289
- pause_children(child, transitions, transparent ? local : false);
2317
+ if ((child.f & 64) === 0) {
2318
+ var transparent = (child.f & 65536) !== 0 || (child.f & 32) !== 0 && (effect.f & 16) !== 0;
2319
+ pause_children(child, transitions, transparent ? local : false);
2320
+ }
2290
2321
  child = sibling;
2291
2322
  }
2292
2323
  }
@@ -2307,14 +2338,14 @@ function move_effect(effect, fragment) {
2307
2338
  }
2308
2339
  }
2309
2340
  //#endregion
2310
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/legacy.js
2341
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/legacy.js
2311
2342
  /**
2312
2343
  * @type {Set<Value> | null}
2313
2344
  * @deprecated
2314
2345
  */
2315
2346
  var captured_signals = null;
2316
2347
  //#endregion
2317
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/runtime.js
2348
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/runtime.js
2318
2349
  /** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
2319
2350
  var is_updating_effect = false;
2320
2351
  var is_destroying_effect = false;
@@ -2516,7 +2547,7 @@ function remove_reaction(signal, dependency) {
2516
2547
  derived.f ^= 512;
2517
2548
  derived.f &= ~WAS_MARKED;
2518
2549
  }
2519
- update_derived_status(derived);
2550
+ if (derived.v !== UNINITIALIZED) update_derived_status(derived);
2520
2551
  freeze_derived_effects(derived);
2521
2552
  remove_reactions(derived, 0);
2522
2553
  }
@@ -2658,7 +2689,7 @@ function untrack(fn) {
2658
2689
  }
2659
2690
  }
2660
2691
  //#endregion
2661
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/dom/elements/events.js
2692
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/elements/events.js
2662
2693
  /**
2663
2694
  * Used on elements, as a map of event type -> event handler,
2664
2695
  * and on events themselves to track which element handled an event
@@ -2741,8 +2772,10 @@ function handle_event_propagation(event) {
2741
2772
  }
2742
2773
  }
2743
2774
  //#endregion
2744
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/dom/reconciler.js
2745
- var policy = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (html) => {
2775
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/reconciler.js
2776
+ var policy = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
2777
+ /** @param {string} html */
2778
+ createHTML: (html) => {
2746
2779
  return html;
2747
2780
  } });
2748
2781
  /** @param {string} html */
@@ -2758,7 +2791,7 @@ function create_fragment_from_html(html) {
2758
2791
  return elem.content;
2759
2792
  }
2760
2793
  //#endregion
2761
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/dom/template.js
2794
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/template.js
2762
2795
  /** @import { Effect, EffectNodes, TemplateNode } from '#client' */
2763
2796
  /** @import { TemplateStructure } from './types' */
2764
2797
  /**
@@ -3017,7 +3050,7 @@ function unmount(component, options) {
3017
3050
  return Promise.resolve();
3018
3051
  }
3019
3052
  //#endregion
3020
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/dom/css.js
3053
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/css.js
3021
3054
  /**
3022
3055
  * @param {Node} anchor
3023
3056
  * @param {{ hash: string, code: string }} css
@@ -3025,7 +3058,7 @@ function unmount(component, options) {
3025
3058
  function append_styles(anchor, css) {
3026
3059
  effect(() => {
3027
3060
  var root = anchor.getRootNode();
3028
- var target = root.host ? root : root.head ?? root.ownerDocument.head;
3061
+ var target = root.host ? root : /** @type {Document} */ root.head ?? root.ownerDocument.head;
3029
3062
  if (!target.querySelector("#" + css.hash)) {
3030
3063
  const style = create_element("style");
3031
3064
  style.id = css.hash;
@@ -3035,7 +3068,7 @@ function append_styles(anchor, css) {
3035
3068
  });
3036
3069
  }
3037
3070
  //#endregion
3038
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/dom/elements/bindings/size.js
3071
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/elements/bindings/size.js
3039
3072
  var _ResizeObserverSingleton;
3040
3073
  var _listeners = /* @__PURE__ */ new WeakMap();
3041
3074
  var _observer = /* @__PURE__ */ new WeakMap();
@@ -3087,7 +3120,7 @@ function _getObserver() {
3087
3120
  }
3088
3121
  _defineProperty(ResizeObserverSingleton, "entries", /* @__PURE__ */ new WeakMap());
3089
3122
  //#endregion
3090
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/reactivity/props.js
3123
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/props.js
3091
3124
  /** @import { Effect, Source } from './types.js' */
3092
3125
  /**
3093
3126
  * This function is responsible for synchronizing a possibly bound prop with the inner component state.
@@ -3175,7 +3208,7 @@ function prop(props, key, flags, fallback) {
3175
3208
  });
3176
3209
  }
3177
3210
  //#endregion
3178
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/legacy/legacy-client.js
3211
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/legacy/legacy-client.js
3179
3212
  /** @import { ComponentConstructorOptions, ComponentType, SvelteComponent, Component } from 'svelte' */
3180
3213
  /**
3181
3214
  * Takes the same options as a Svelte 4 component and the component function and returns a Svelte 4 compatible component.
@@ -3254,6 +3287,7 @@ var Svelte4Component = class {
3254
3287
  get() {
3255
3288
  return _classPrivateFieldGet2(_instance, this)[key];
3256
3289
  },
3290
+ /** @param {any} value */
3257
3291
  set(value) {
3258
3292
  _classPrivateFieldGet2(_instance, this)[key] = value;
3259
3293
  },
@@ -3293,7 +3327,7 @@ var Svelte4Component = class {
3293
3327
  }
3294
3328
  };
3295
3329
  //#endregion
3296
- //#region ../../../node_modules/.bun/svelte@5.55.1/node_modules/svelte/src/internal/client/dom/elements/custom-element.js
3330
+ //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/elements/custom-element.js
3297
3331
  /**
3298
3332
  * @typedef {Object} CustomElementPropDefinition
3299
3333
  * @property {string} [attribute]