@pie-element/simple-cloze 0.1.4-next.8 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/author/index.d.ts +2 -18
- package/dist/author/index.js +1151 -456
- package/dist/author/index.js.map +1 -1
- package/dist/browser/author/index.js +3764 -3612
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/{client-BSTc3boO.js → client-e4ZTphpa.js} +874 -680
- package/dist/browser/client-e4ZTphpa.js.map +1 -0
- package/dist/browser/controller/index.js +2 -62
- package/dist/browser/controller-1IBOQFFL.js +69 -0
- package/dist/browser/controller-1IBOQFFL.js.map +1 -0
- package/dist/browser/delivery/index.js +82 -82
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/editor-runtime/author/index.js +634 -0
- package/dist/browser/editor-runtime/author/index.js.map +1 -0
- package/dist/browser/editor-runtime/client-e4ZTphpa.js +2370 -0
- package/dist/browser/editor-runtime/client-e4ZTphpa.js.map +1 -0
- package/dist/browser/editor-runtime/controller/index.js +2 -0
- package/dist/browser/editor-runtime/controller-1IBOQFFL.js +69 -0
- package/dist/browser/editor-runtime/controller-1IBOQFFL.js.map +1 -0
- package/dist/browser/editor-runtime/delivery/index.js +243 -0
- package/dist/browser/editor-runtime/delivery/index.js.map +1 -0
- package/dist/browser/{i18n-BaF24Jzw.js → editor-runtime/i18n-BTsdzpBv.js} +397 -252
- package/dist/browser/editor-runtime/i18n-BTsdzpBv.js.map +1 -0
- package/dist/browser/editor-runtime/plain-text-iaQZhkGe.js +53 -0
- package/dist/browser/editor-runtime/plain-text-iaQZhkGe.js.map +1 -0
- package/dist/browser/editor-runtime/print/index.js +71 -0
- package/dist/browser/editor-runtime/print/index.js.map +1 -0
- package/dist/browser/i18n-BTsdzpBv.js +1755 -0
- package/dist/browser/i18n-BTsdzpBv.js.map +1 -0
- package/dist/browser/print/index.js +37 -52
- package/dist/browser/print/index.js.map +1 -1
- package/dist/controller/defaults.d.ts +5 -0
- package/dist/controller/index.js +11 -4
- package/dist/controller/index.js.map +1 -1
- package/dist/delivery/index.js +366 -200
- package/dist/delivery/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.iife.d.ts +1 -1
- package/dist/index.iife.js +4 -4
- package/dist/print/index.d.ts +2 -10
- package/dist/print/index.js +366 -221
- package/dist/print/index.js.map +1 -1
- package/module/print.js +928 -783
- package/module/print.js.map +1 -1
- package/package.json +22 -4
- package/dist/browser/client-BSTc3boO.js.map +0 -1
- package/dist/browser/controller/index.js.map +0 -1
- package/dist/browser/i18n-BaF24Jzw.js.map +0 -1
package/dist/delivery/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
1
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/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.57.
|
|
7
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/constants.js
|
|
8
8
|
var HYDRATION_ERROR = {};
|
|
9
9
|
var UNINITIALIZED = Symbol("uninitialized");
|
|
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.57.
|
|
13
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/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;
|
|
@@ -100,13 +100,6 @@ var DESTROYING = 1 << 25;
|
|
|
100
100
|
var EFFECT_TRANSPARENT = 65536;
|
|
101
101
|
var EFFECT_PRESERVED = 1 << 19;
|
|
102
102
|
var USER_EFFECT = 1 << 20;
|
|
103
|
-
/**
|
|
104
|
-
* Tells that we marked this derived and its reactions as visited during the "mark as (maybe) dirty"-phase.
|
|
105
|
-
* Will be lifted during execution of the derived and during checking its dirty state (both are necessary
|
|
106
|
-
* because a derived might be checked but not executed). This is a pure performance optimization flag and
|
|
107
|
-
* should not be used for any other purpose!
|
|
108
|
-
*/
|
|
109
|
-
var WAS_MARKED = 65536;
|
|
110
103
|
var REACTION_IS_UPDATING = 1 << 21;
|
|
111
104
|
var ASYNC = 1 << 22;
|
|
112
105
|
var ERROR_VALUE = 1 << 23;
|
|
@@ -148,7 +141,7 @@ function svelte_boundary_reset_noop() {
|
|
|
148
141
|
console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`);
|
|
149
142
|
}
|
|
150
143
|
//#endregion
|
|
151
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
144
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/hydration.js
|
|
152
145
|
/** @import { TemplateNode } from '#client' */
|
|
153
146
|
/**
|
|
154
147
|
* Use this variable to guard everything related to hydration code so it can be treeshaken out
|
|
@@ -227,7 +220,7 @@ function read_hydration_instruction(node) {
|
|
|
227
220
|
return node.data;
|
|
228
221
|
}
|
|
229
222
|
//#endregion
|
|
230
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
223
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/equality.js
|
|
231
224
|
/** @import { Equals } from '#client' */
|
|
232
225
|
/** @type {Equals} */
|
|
233
226
|
function equals(value) {
|
|
@@ -246,7 +239,7 @@ function safe_equals(value) {
|
|
|
246
239
|
return !safe_not_equal(value, this.v);
|
|
247
240
|
}
|
|
248
241
|
//#endregion
|
|
249
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
242
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/errors.js
|
|
250
243
|
/**
|
|
251
244
|
* Cannot create a `$derived(...)` with an `await` expression outside of an effect tree
|
|
252
245
|
* @returns {never}
|
|
@@ -328,13 +321,13 @@ function svelte_boundary_reset_onerror() {
|
|
|
328
321
|
throw new Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`);
|
|
329
322
|
}
|
|
330
323
|
//#endregion
|
|
331
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
324
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/flags/index.js
|
|
332
325
|
/** True if experimental.async=true */
|
|
333
326
|
var async_mode_flag = false;
|
|
334
327
|
/** True if we're not certain that we only have Svelte 5 code in the compilation */
|
|
335
328
|
var legacy_mode_flag = false;
|
|
336
329
|
//#endregion
|
|
337
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
330
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/context.js
|
|
338
331
|
/** @import { ComponentContext, DevStackEntry, Effect } from '#client' */
|
|
339
332
|
/** @type {ComponentContext | null} */
|
|
340
333
|
var component_context = null;
|
|
@@ -394,7 +387,7 @@ function is_runes() {
|
|
|
394
387
|
return !legacy_mode_flag || component_context !== null && component_context.l === null;
|
|
395
388
|
}
|
|
396
389
|
//#endregion
|
|
397
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
390
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/task.js
|
|
398
391
|
/** @type {Array<() => void>} */
|
|
399
392
|
var micro_tasks = [];
|
|
400
393
|
function run_micro_tasks() {
|
|
@@ -421,7 +414,7 @@ function flush_tasks() {
|
|
|
421
414
|
while (micro_tasks.length > 0) run_micro_tasks();
|
|
422
415
|
}
|
|
423
416
|
//#endregion
|
|
424
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
417
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/status.js
|
|
425
418
|
/** @import { Derived, Signal } from '#client' */
|
|
426
419
|
var STATUS_MASK = ~(DIRTY | MAYBE_DIRTY | CLEAN);
|
|
427
420
|
/**
|
|
@@ -440,22 +433,8 @@ function update_derived_status(derived) {
|
|
|
440
433
|
else set_signal_status(derived, MAYBE_DIRTY);
|
|
441
434
|
}
|
|
442
435
|
//#endregion
|
|
443
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
444
|
-
/** @import {
|
|
445
|
-
/**
|
|
446
|
-
* @param {Value[] | null} deps
|
|
447
|
-
*/
|
|
448
|
-
function clear_marked(deps) {
|
|
449
|
-
if (deps === null) return;
|
|
450
|
-
for (const dep of deps) {
|
|
451
|
-
if ((dep.f & 2) === 0 || (dep.f & 65536) === 0) continue;
|
|
452
|
-
dep.f ^= WAS_MARKED;
|
|
453
|
-
clear_marked(
|
|
454
|
-
/** @type {Derived} */
|
|
455
|
-
dep.deps
|
|
456
|
-
);
|
|
457
|
-
}
|
|
458
|
-
}
|
|
436
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/utils.js
|
|
437
|
+
/** @import { Effect } from '#client' */
|
|
459
438
|
/**
|
|
460
439
|
* @param {Effect} effect
|
|
461
440
|
* @param {Set<Effect>} dirty_effects
|
|
@@ -464,41 +443,10 @@ function clear_marked(deps) {
|
|
|
464
443
|
function defer_effect(effect, dirty_effects, maybe_dirty_effects) {
|
|
465
444
|
if ((effect.f & 2048) !== 0) dirty_effects.add(effect);
|
|
466
445
|
else if ((effect.f & 4096) !== 0) maybe_dirty_effects.add(effect);
|
|
467
|
-
clear_marked(effect.deps);
|
|
468
446
|
set_signal_status(effect, CLEAN);
|
|
469
447
|
}
|
|
470
448
|
//#endregion
|
|
471
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
472
|
-
/**
|
|
473
|
-
* We set this to `true` when updating a store so that we correctly
|
|
474
|
-
* schedule effects if the update takes place inside a `$:` effect
|
|
475
|
-
*/
|
|
476
|
-
var legacy_is_updating_store = false;
|
|
477
|
-
/**
|
|
478
|
-
* Whether or not the prop currently being read is a store binding, as in
|
|
479
|
-
* `<Child bind:x={$y} />`. If it is, we treat the prop as mutable even in
|
|
480
|
-
* runes mode, and skip `binding_property_non_reactive` validation
|
|
481
|
-
*/
|
|
482
|
-
var is_store_binding = false;
|
|
483
|
-
/**
|
|
484
|
-
* Returns a tuple that indicates whether `fn()` reads a prop that is a store binding.
|
|
485
|
-
* Used to prevent `binding_property_non_reactive` validation false positives and
|
|
486
|
-
* ensure that these props are treated as mutable even in runes mode
|
|
487
|
-
* @template T
|
|
488
|
-
* @param {() => T} fn
|
|
489
|
-
* @returns {[T, boolean]}
|
|
490
|
-
*/
|
|
491
|
-
function capture_store_binding(fn) {
|
|
492
|
-
var previous_is_store_binding = is_store_binding;
|
|
493
|
-
try {
|
|
494
|
-
is_store_binding = false;
|
|
495
|
-
return [fn(), is_store_binding];
|
|
496
|
-
} finally {
|
|
497
|
-
is_store_binding = previous_is_store_binding;
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
//#endregion
|
|
501
|
-
//#region ../../../node_modules/.bun/svelte@5.57.0/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
|
|
449
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
|
|
502
450
|
/**
|
|
503
451
|
* @template T
|
|
504
452
|
* @param {() => T} fn
|
|
@@ -516,7 +464,7 @@ function without_reactive_context(fn) {
|
|
|
516
464
|
}
|
|
517
465
|
}
|
|
518
466
|
//#endregion
|
|
519
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
467
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/async.js
|
|
520
468
|
/** @import { Blocker, Effect, Source, Value } from '#client' */
|
|
521
469
|
/**
|
|
522
470
|
* @param {Blocker[]} blockers
|
|
@@ -749,7 +697,6 @@ function execute_derived(derived) {
|
|
|
749
697
|
}
|
|
750
698
|
set_active_effect(parent);
|
|
751
699
|
try {
|
|
752
|
-
derived.f &= ~WAS_MARKED;
|
|
753
700
|
destroy_derived_effects(derived);
|
|
754
701
|
value = update_reaction(derived);
|
|
755
702
|
} finally {
|
|
@@ -836,7 +783,7 @@ function _classPrivateFieldGet2(s, a) {
|
|
|
836
783
|
return s.get(_assertClassBrand(s, a));
|
|
837
784
|
}
|
|
838
785
|
//#endregion
|
|
839
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
786
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/batch.js
|
|
840
787
|
/** @import { Fork } from 'svelte' */
|
|
841
788
|
/** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
|
|
842
789
|
var _Batch;
|
|
@@ -887,7 +834,7 @@ var _discard_callbacks = /* @__PURE__ */ new WeakMap();
|
|
|
887
834
|
var _pending = /* @__PURE__ */ new WeakMap();
|
|
888
835
|
var _blocking_pending = /* @__PURE__ */ new WeakMap();
|
|
889
836
|
var _deferred = /* @__PURE__ */ new WeakMap();
|
|
890
|
-
var
|
|
837
|
+
var _scheduled = /* @__PURE__ */ new WeakMap();
|
|
891
838
|
var _new_effects = /* @__PURE__ */ new WeakMap();
|
|
892
839
|
var _dirty_effects$1 = /* @__PURE__ */ new WeakMap();
|
|
893
840
|
var _maybe_dirty_effects$1 = /* @__PURE__ */ new WeakMap();
|
|
@@ -935,7 +882,7 @@ var Batch = class Batch {
|
|
|
935
882
|
_classPrivateFieldInitSpec(this, _pending, 0);
|
|
936
883
|
_classPrivateFieldInitSpec(this, _blocking_pending, /* @__PURE__ */ new Map());
|
|
937
884
|
_classPrivateFieldInitSpec(this, _deferred, null);
|
|
938
|
-
_classPrivateFieldInitSpec(this,
|
|
885
|
+
_classPrivateFieldInitSpec(this, _scheduled, []);
|
|
939
886
|
_classPrivateFieldInitSpec(this, _new_effects, []);
|
|
940
887
|
_classPrivateFieldInitSpec(this, _dirty_effects$1, /* @__PURE__ */ new Set());
|
|
941
888
|
_classPrivateFieldInitSpec(this, _maybe_dirty_effects$1, /* @__PURE__ */ new Set());
|
|
@@ -1124,20 +1071,7 @@ var Batch = class Batch {
|
|
|
1124
1071
|
effect.b.defer_effect(effect);
|
|
1125
1072
|
return;
|
|
1126
1073
|
}
|
|
1127
|
-
|
|
1128
|
-
while (e.parent !== null) {
|
|
1129
|
-
e = e.parent;
|
|
1130
|
-
var flags = e.f;
|
|
1131
|
-
if (collected_effects !== null && e === active_effect) {
|
|
1132
|
-
if (async_mode_flag) return;
|
|
1133
|
-
if ((active_reaction === null || (active_reaction.f & 2) === 0) && !legacy_is_updating_store) return;
|
|
1134
|
-
}
|
|
1135
|
-
if ((flags & 96) !== 0) {
|
|
1136
|
-
if ((flags & 1024) === 0) return;
|
|
1137
|
-
e.f ^= CLEAN;
|
|
1138
|
-
}
|
|
1139
|
-
}
|
|
1140
|
-
_classPrivateFieldGet2(_roots, this).push(e);
|
|
1074
|
+
_classPrivateFieldGet2(_scheduled, this).push(effect);
|
|
1141
1075
|
}
|
|
1142
1076
|
};
|
|
1143
1077
|
_Batch = Batch;
|
|
@@ -1157,12 +1091,40 @@ function _is_deferred() {
|
|
|
1157
1091
|
}
|
|
1158
1092
|
return false;
|
|
1159
1093
|
}
|
|
1094
|
+
/**
|
|
1095
|
+
* Convert the effects that were scheduled in this batch into the root effects
|
|
1096
|
+
* that need to be traversed, marking the path to each effect (by clearing the
|
|
1097
|
+
* `CLEAN` flag on ancestor branches) so that the traversal can find them.
|
|
1098
|
+
* This happens right before traversal rather than at scheduling time, so that
|
|
1099
|
+
* the markers left on the (shared) effect tree are created and consumed within
|
|
1100
|
+
* a single traversal — scheduling into other batches can never observe them
|
|
1101
|
+
* @returns {Effect[]}
|
|
1102
|
+
*/
|
|
1103
|
+
function _resolve$1() {
|
|
1104
|
+
/** @type {Effect[]} */
|
|
1105
|
+
var roots = [];
|
|
1106
|
+
for (const effect of _classPrivateFieldGet2(_scheduled, this)) {
|
|
1107
|
+
if ((effect.f & 16384) !== 0 || (effect.f & 6144) === 0) continue;
|
|
1108
|
+
var e = effect;
|
|
1109
|
+
var covered = false;
|
|
1110
|
+
while (e.parent !== null) {
|
|
1111
|
+
e = e.parent;
|
|
1112
|
+
var flags = e.f;
|
|
1113
|
+
if ((flags & 96) !== 0) {
|
|
1114
|
+
if ((flags & 1024) === 0) {
|
|
1115
|
+
covered = true;
|
|
1116
|
+
break;
|
|
1117
|
+
}
|
|
1118
|
+
e.f ^= CLEAN;
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
if (!covered) roots.push(e);
|
|
1122
|
+
}
|
|
1123
|
+
_classPrivateFieldSet2(_scheduled, this, []);
|
|
1124
|
+
return roots;
|
|
1125
|
+
}
|
|
1160
1126
|
function _process() {
|
|
1161
1127
|
_classPrivateFieldSet2(_started, this, true);
|
|
1162
|
-
if (flush_count++ > 1e3) {
|
|
1163
|
-
_assertClassBrand(_Batch_brand, this, _unlink).call(this);
|
|
1164
|
-
infinite_loop_guard();
|
|
1165
|
-
}
|
|
1166
1128
|
for (const e of _classPrivateFieldGet2(_dirty_effects$1, this)) {
|
|
1167
1129
|
_classPrivateFieldGet2(_maybe_dirty_effects$1, this).delete(e);
|
|
1168
1130
|
set_signal_status(e, DIRTY);
|
|
@@ -1172,8 +1134,6 @@ function _process() {
|
|
|
1172
1134
|
set_signal_status(e, MAYBE_DIRTY);
|
|
1173
1135
|
this.schedule(e);
|
|
1174
1136
|
}
|
|
1175
|
-
const roots = _classPrivateFieldGet2(_roots, this);
|
|
1176
|
-
_classPrivateFieldSet2(_roots, this, []);
|
|
1177
1137
|
this.apply();
|
|
1178
1138
|
/** @type {Effect[]} */
|
|
1179
1139
|
var effects = collected_effects = [];
|
|
@@ -1184,12 +1144,18 @@ function _process() {
|
|
|
1184
1144
|
* @deprecated when we get rid of legacy mode and stores, we can get rid of this
|
|
1185
1145
|
*/
|
|
1186
1146
|
var updates = legacy_updates = [];
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1147
|
+
while (_classPrivateFieldGet2(_scheduled, this).length > 0) {
|
|
1148
|
+
if (flush_count++ > 1e3) {
|
|
1149
|
+
_assertClassBrand(_Batch_brand, this, _unlink).call(this);
|
|
1150
|
+
infinite_loop_guard();
|
|
1151
|
+
}
|
|
1152
|
+
for (const root of _assertClassBrand(_Batch_brand, this, _resolve$1).call(this)) try {
|
|
1153
|
+
_assertClassBrand(_Batch_brand, this, _traverse).call(this, root, effects, render_effects);
|
|
1154
|
+
} catch (e) {
|
|
1155
|
+
reset_all(root);
|
|
1156
|
+
if (!_assertClassBrand(_Batch_brand, this, _is_deferred).call(this)) this.discard();
|
|
1157
|
+
throw e;
|
|
1158
|
+
}
|
|
1193
1159
|
}
|
|
1194
1160
|
current_batch = null;
|
|
1195
1161
|
if (updates.length > 0) {
|
|
@@ -1223,16 +1189,16 @@ function _process() {
|
|
|
1223
1189
|
previous_batch = null;
|
|
1224
1190
|
_classPrivateFieldGet2(_deferred, this)?.resolve();
|
|
1225
1191
|
var next_batch = current_batch;
|
|
1226
|
-
if (_classPrivateFieldGet2(_pending, this) === 0 && (_classPrivateFieldGet2(
|
|
1192
|
+
if (_classPrivateFieldGet2(_pending, this) === 0 && (_classPrivateFieldGet2(_scheduled, this).length === 0 || next_batch !== null)) {
|
|
1227
1193
|
_assertClassBrand(_Batch_brand, this, _unlink).call(this);
|
|
1228
1194
|
if (async_mode_flag) {
|
|
1229
1195
|
_assertClassBrand(_Batch_brand, this, _commit$1).call(this);
|
|
1230
1196
|
current_batch = next_batch;
|
|
1231
1197
|
}
|
|
1232
1198
|
}
|
|
1233
|
-
if (_classPrivateFieldGet2(
|
|
1234
|
-
const
|
|
1235
|
-
|
|
1199
|
+
if (_classPrivateFieldGet2(_scheduled, this).length > 0) if (next_batch !== null) {
|
|
1200
|
+
for (const e of _classPrivateFieldGet2(_scheduled, this)) _classPrivateFieldGet2(_scheduled, next_batch).push(e);
|
|
1201
|
+
_classPrivateFieldSet2(_scheduled, this, []);
|
|
1236
1202
|
} else next_batch = this;
|
|
1237
1203
|
if (next_batch !== null) {
|
|
1238
1204
|
old_values.clear();
|
|
@@ -1382,10 +1348,9 @@ function _commit$1() {
|
|
|
1382
1348
|
batch.schedule(effect);
|
|
1383
1349
|
} else _classPrivateFieldGet2(_dirty_effects$1, batch).add(effect);
|
|
1384
1350
|
}
|
|
1385
|
-
if (_classPrivateFieldGet2(
|
|
1351
|
+
if (_classPrivateFieldGet2(_scheduled, batch).length > 0 && !_classPrivateFieldGet2(_decrement_queued, batch)) {
|
|
1386
1352
|
batch.apply();
|
|
1387
|
-
for (var root of
|
|
1388
|
-
_classPrivateFieldSet2(_roots, batch, []);
|
|
1353
|
+
for (var root of _assertClassBrand(_Batch_brand, batch, _resolve$1).call(batch)) _assertClassBrand(_Batch_brand, batch, _traverse).call(batch, root, [], []);
|
|
1389
1354
|
}
|
|
1390
1355
|
batch.deactivate();
|
|
1391
1356
|
}
|
|
@@ -1552,7 +1517,7 @@ function reset_all(effect) {
|
|
|
1552
1517
|
}
|
|
1553
1518
|
}
|
|
1554
1519
|
//#endregion
|
|
1555
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
1520
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/sources.js
|
|
1556
1521
|
/** @import { Derived, Effect, Source, Value } from '#client' */
|
|
1557
1522
|
/** @type {Set<Effect>} */
|
|
1558
1523
|
var eager_effects = /* @__PURE__ */ new Set();
|
|
@@ -1614,6 +1579,16 @@ function set(source, value, should_proxy = false) {
|
|
|
1614
1579
|
return internal_set(source, should_proxy ? proxy(value) : value, legacy_updates);
|
|
1615
1580
|
}
|
|
1616
1581
|
/**
|
|
1582
|
+
* A set of signals we have already seen while traversing in mark_reactions.
|
|
1583
|
+
* Not always set to balance the common case of sources only having a couple
|
|
1584
|
+
* of (transitive) dependencies (where always creating a Set would be bad for perf)
|
|
1585
|
+
* with the edge case of extremely deep or wide dependency arrays with cycles.
|
|
1586
|
+
* @type {Set<any> | null}
|
|
1587
|
+
*/
|
|
1588
|
+
var seen = null;
|
|
1589
|
+
/** Number of transitive dependencies, see {@link seen} for more info */
|
|
1590
|
+
var count_deps = 0;
|
|
1591
|
+
/**
|
|
1617
1592
|
* @template V
|
|
1618
1593
|
* @param {Source<V>} source
|
|
1619
1594
|
* @param {V} value
|
|
@@ -1632,7 +1607,10 @@ function internal_set(source, value, updated_during_traversal = null) {
|
|
|
1632
1607
|
if (batch_values === null) update_derived_status(derived);
|
|
1633
1608
|
}
|
|
1634
1609
|
source.wv = increment_write_version();
|
|
1610
|
+
seen = null;
|
|
1611
|
+
count_deps = 0;
|
|
1635
1612
|
mark_reactions(source, DIRTY, updated_during_traversal);
|
|
1613
|
+
seen = null;
|
|
1636
1614
|
if (is_runes() && active_effect !== null && (active_effect.f & 1024) !== 0 && (active_effect.f & 96) === 0) if (untracked_writes === null) set_untracked_writes([source]);
|
|
1637
1615
|
else untracked_writes.push(source);
|
|
1638
1616
|
if (!batch.is_fork && eager_effects.size > 0 && !eager_effects_deferred) flush_eager_effects();
|
|
@@ -1671,6 +1649,12 @@ function mark_reactions(signal, status, updated_during_traversal) {
|
|
|
1671
1649
|
if (reactions === null) return;
|
|
1672
1650
|
var runes = is_runes();
|
|
1673
1651
|
var length = reactions.length;
|
|
1652
|
+
count_deps += length;
|
|
1653
|
+
if (count_deps > 1e5 && seen === null) seen = /* @__PURE__ */ new Set();
|
|
1654
|
+
if (seen !== null) {
|
|
1655
|
+
if (seen.has(signal)) return;
|
|
1656
|
+
seen.add(signal);
|
|
1657
|
+
}
|
|
1674
1658
|
for (var i = 0; i < length; i++) {
|
|
1675
1659
|
var reaction = reactions[i];
|
|
1676
1660
|
var flags = reaction.f;
|
|
@@ -1681,10 +1665,7 @@ function mark_reactions(signal, status, updated_during_traversal) {
|
|
|
1681
1665
|
else if ((flags & 2) !== 0) {
|
|
1682
1666
|
var derived = reaction;
|
|
1683
1667
|
batch_values?.delete(derived);
|
|
1684
|
-
|
|
1685
|
-
if (flags & 512 && (active_effect === null || (active_effect.f & 2097152) === 0)) reaction.f |= WAS_MARKED;
|
|
1686
|
-
mark_reactions(derived, MAYBE_DIRTY, updated_during_traversal);
|
|
1687
|
-
}
|
|
1668
|
+
mark_reactions(derived, MAYBE_DIRTY, updated_during_traversal);
|
|
1688
1669
|
} else if (not_dirty) {
|
|
1689
1670
|
var effect = reaction;
|
|
1690
1671
|
if ((flags & 16) !== 0 && eager_block_effects !== null) eager_block_effects.add(effect);
|
|
@@ -1772,14 +1753,14 @@ function proxy(value) {
|
|
|
1772
1753
|
return Reflect.get(target, prop, receiver);
|
|
1773
1754
|
},
|
|
1774
1755
|
getOwnPropertyDescriptor(target, prop) {
|
|
1756
|
+
this.has?.(target, prop);
|
|
1775
1757
|
var descriptor = Reflect.getOwnPropertyDescriptor(target, prop);
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
if (source !== void 0 && value !== UNINITIALIZED) return {
|
|
1758
|
+
var s = sources.get(prop);
|
|
1759
|
+
if (s !== void 0) {
|
|
1760
|
+
var value = get$1(s);
|
|
1761
|
+
if (value === UNINITIALIZED) return;
|
|
1762
|
+
if (descriptor && "value" in descriptor) descriptor.value = value;
|
|
1763
|
+
else return {
|
|
1783
1764
|
enumerable: true,
|
|
1784
1765
|
configurable: true,
|
|
1785
1766
|
value,
|
|
@@ -1852,7 +1833,7 @@ function proxy(value) {
|
|
|
1852
1833
|
});
|
|
1853
1834
|
}
|
|
1854
1835
|
//#endregion
|
|
1855
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
1836
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/operations.js
|
|
1856
1837
|
/** @import { Effect, TemplateNode } from '#client' */
|
|
1857
1838
|
/** @type {Window} */
|
|
1858
1839
|
var $window;
|
|
@@ -2054,7 +2035,7 @@ function invoke_error_boundary(error, effect) {
|
|
|
2054
2035
|
throw error;
|
|
2055
2036
|
}
|
|
2056
2037
|
//#endregion
|
|
2057
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
2038
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/effects.js
|
|
2058
2039
|
/** @import { Blocker, ComponentContext, ComponentContextLegacy, Derived, Effect, TemplateNode, TransitionManager } from '#client' */
|
|
2059
2040
|
/**
|
|
2060
2041
|
* @param {'$effect' | '$effect.pre' | '$inspect'} rune
|
|
@@ -2445,14 +2426,14 @@ function move_effect(effect, fragment) {
|
|
|
2445
2426
|
}
|
|
2446
2427
|
}
|
|
2447
2428
|
//#endregion
|
|
2448
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
2429
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/legacy.js
|
|
2449
2430
|
/**
|
|
2450
2431
|
* @type {Set<Value> | null}
|
|
2451
2432
|
* @deprecated
|
|
2452
2433
|
*/
|
|
2453
2434
|
var captured_signals = null;
|
|
2454
2435
|
//#endregion
|
|
2455
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
2436
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/runtime.js
|
|
2456
2437
|
/** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
|
|
2457
2438
|
/**
|
|
2458
2439
|
* True if updating in an effect context that is reactive (i.e. not branch/root effects)
|
|
@@ -2484,7 +2465,7 @@ function set_active_effect(effect) {
|
|
|
2484
2465
|
var current_sources = null;
|
|
2485
2466
|
/** @param {Value} value */
|
|
2486
2467
|
function push_reaction_value(value) {
|
|
2487
|
-
if (active_reaction !== null && (!async_mode_flag || (active_reaction.f & 2) !== 0)) (current_sources ?? (current_sources = /* @__PURE__ */ new Set())).add(value);
|
|
2468
|
+
if (active_reaction !== null && (!async_mode_flag && (active_reaction.f & 2097152) !== 0 || (active_reaction.f & 2) !== 0)) (current_sources ?? (current_sources = /* @__PURE__ */ new Set())).add(value);
|
|
2488
2469
|
}
|
|
2489
2470
|
/**
|
|
2490
2471
|
* The dependencies of the reaction that is currently being executed. In many cases,
|
|
@@ -2528,7 +2509,6 @@ function increment_write_version() {
|
|
|
2528
2509
|
function is_dirty(reaction) {
|
|
2529
2510
|
var flags = reaction.f;
|
|
2530
2511
|
if ((flags & 2048) !== 0) return true;
|
|
2531
|
-
if (flags & 2) reaction.f &= ~WAS_MARKED;
|
|
2532
2512
|
if ((flags & 4096) !== 0) {
|
|
2533
2513
|
var dependencies = reaction.deps;
|
|
2534
2514
|
var length = dependencies.length;
|
|
@@ -2660,10 +2640,7 @@ function remove_reaction(signal, dependency) {
|
|
|
2660
2640
|
}
|
|
2661
2641
|
if (reactions === null && (dependency.f & 2) !== 0 && (new_deps === null || !includes.call(new_deps, dependency))) {
|
|
2662
2642
|
var derived = dependency;
|
|
2663
|
-
if ((derived.f & 512) !== 0)
|
|
2664
|
-
derived.f ^= 512;
|
|
2665
|
-
derived.f &= ~WAS_MARKED;
|
|
2666
|
-
}
|
|
2643
|
+
if ((derived.f & 512) !== 0) derived.f ^= 512;
|
|
2667
2644
|
if (derived.v !== UNINITIALIZED) update_derived_status(derived);
|
|
2668
2645
|
if (derived.ac !== null) without_reactive_context(() => {
|
|
2669
2646
|
/** @type {AbortController} */ derived.ac.abort(STALE_REACTION);
|
|
@@ -2812,7 +2789,7 @@ function untrack(fn) {
|
|
|
2812
2789
|
}
|
|
2813
2790
|
}
|
|
2814
2791
|
//#endregion
|
|
2815
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
2792
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/events.js
|
|
2816
2793
|
/**
|
|
2817
2794
|
* Used on elements, as a map of event type -> event handler,
|
|
2818
2795
|
* and on events themselves to track which element handled an event
|
|
@@ -2920,7 +2897,7 @@ function handle_event_propagation(event) {
|
|
|
2920
2897
|
}
|
|
2921
2898
|
}
|
|
2922
2899
|
//#endregion
|
|
2923
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
2900
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/reconciler.js
|
|
2924
2901
|
var policy = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
2925
2902
|
/** @param {string} html */
|
|
2926
2903
|
createHTML: (html) => {
|
|
@@ -2939,7 +2916,7 @@ function create_fragment_from_html(html) {
|
|
|
2939
2916
|
return elem.content;
|
|
2940
2917
|
}
|
|
2941
2918
|
//#endregion
|
|
2942
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
2919
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/template.js
|
|
2943
2920
|
/** @import { Effect, EffectNodes, TemplateNode } from '#client' */
|
|
2944
2921
|
/** @import { TemplateStructure } from './types' */
|
|
2945
2922
|
/**
|
|
@@ -3069,7 +3046,7 @@ function is_passive_event(name) {
|
|
|
3069
3046
|
return PASSIVE_EVENTS.includes(name);
|
|
3070
3047
|
}
|
|
3071
3048
|
//#endregion
|
|
3072
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
3049
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/reactivity/create-subscriber.js
|
|
3073
3050
|
/**
|
|
3074
3051
|
* Returns a `subscribe` function that integrates external event-based systems with Svelte's reactivity.
|
|
3075
3052
|
* It's particularly useful for integrating with web APIs like `MediaQuery`, `IntersectionObserver`, or `WebSocket`.
|
|
@@ -3142,7 +3119,7 @@ function createSubscriber(start) {
|
|
|
3142
3119
|
};
|
|
3143
3120
|
}
|
|
3144
3121
|
//#endregion
|
|
3145
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
3122
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
|
|
3146
3123
|
/** @import { Effect, Source, TemplateNode, } from '#client' */
|
|
3147
3124
|
/**
|
|
3148
3125
|
* @typedef {{
|
|
@@ -3712,7 +3689,7 @@ function unmount(component, options) {
|
|
|
3712
3689
|
return Promise.resolve();
|
|
3713
3690
|
}
|
|
3714
3691
|
//#endregion
|
|
3715
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
3692
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/blocks/branches.js
|
|
3716
3693
|
/** @import { Effect, TemplateNode } from '#client' */
|
|
3717
3694
|
var _batches = /* @__PURE__ */ new WeakMap();
|
|
3718
3695
|
var _onscreen = /* @__PURE__ */ new WeakMap();
|
|
@@ -3835,7 +3812,7 @@ var BranchManager = class {
|
|
|
3835
3812
|
}
|
|
3836
3813
|
};
|
|
3837
3814
|
//#endregion
|
|
3838
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
3815
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/blocks/if.js
|
|
3839
3816
|
/** @import { TemplateNode } from '#client' */
|
|
3840
3817
|
/**
|
|
3841
3818
|
* @param {TemplateNode} node
|
|
@@ -3941,7 +3918,7 @@ function html(node, get_value, is_controlled = false, svg = false, mathml = fals
|
|
|
3941
3918
|
});
|
|
3942
3919
|
}
|
|
3943
3920
|
//#endregion
|
|
3944
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
3921
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/css.js
|
|
3945
3922
|
/**
|
|
3946
3923
|
* @param {Node} anchor
|
|
3947
3924
|
* @param {{ hash: string, code: string }} css
|
|
@@ -3960,7 +3937,7 @@ function append_styles(anchor, css) {
|
|
|
3960
3937
|
});
|
|
3961
3938
|
}
|
|
3962
3939
|
//#endregion
|
|
3963
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
3940
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/shared/attributes.js
|
|
3964
3941
|
var whitespace = [..." \n\r\f\xA0\v"];
|
|
3965
3942
|
/**
|
|
3966
3943
|
* @param {any} value
|
|
@@ -3986,7 +3963,7 @@ function to_class(value, hash, directives) {
|
|
|
3986
3963
|
return classname === "" ? null : classname;
|
|
3987
3964
|
}
|
|
3988
3965
|
//#endregion
|
|
3989
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
3966
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/class.js
|
|
3990
3967
|
/**
|
|
3991
3968
|
* @param {Element} dom
|
|
3992
3969
|
* @param {boolean | number} is_html
|
|
@@ -4011,7 +3988,7 @@ function set_class(dom, is_html, value, hash, prev_classes, next_classes) {
|
|
|
4011
3988
|
return next_classes;
|
|
4012
3989
|
}
|
|
4013
3990
|
//#endregion
|
|
4014
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
3991
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/attributes.js
|
|
4015
3992
|
/** @import { Blocker, Effect } from '#client' */
|
|
4016
3993
|
var IS_CUSTOM_ELEMENT = Symbol("is custom element");
|
|
4017
3994
|
var IS_HTML = Symbol("is html");
|
|
@@ -4066,7 +4043,7 @@ function get_setters(element) {
|
|
|
4066
4043
|
return setters;
|
|
4067
4044
|
}
|
|
4068
4045
|
//#endregion
|
|
4069
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
4046
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/bindings/size.js
|
|
4070
4047
|
var _ResizeObserverSingleton;
|
|
4071
4048
|
var _listeners = /* @__PURE__ */ new WeakMap();
|
|
4072
4049
|
var _observer = /* @__PURE__ */ new WeakMap();
|
|
@@ -4118,7 +4095,7 @@ function _getObserver() {
|
|
|
4118
4095
|
}
|
|
4119
4096
|
_defineProperty(ResizeObserverSingleton, "entries", /* @__PURE__ */ new WeakMap());
|
|
4120
4097
|
//#endregion
|
|
4121
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
4098
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/bindings/this.js
|
|
4122
4099
|
/** @import { ComponentContext, Effect } from '#client' */
|
|
4123
4100
|
/**
|
|
4124
4101
|
* @param {any} bound_value
|
|
@@ -4170,7 +4147,32 @@ function bind_this(element_or_component = mark_as_component(), update, get_value
|
|
|
4170
4147
|
return element_or_component;
|
|
4171
4148
|
}
|
|
4172
4149
|
//#endregion
|
|
4173
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
4150
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/store.js
|
|
4151
|
+
/**
|
|
4152
|
+
* Whether or not the prop currently being read is a store binding, as in
|
|
4153
|
+
* `<Child bind:x={$y} />`. If it is, we treat the prop as mutable even in
|
|
4154
|
+
* runes mode, and skip `binding_property_non_reactive` validation
|
|
4155
|
+
*/
|
|
4156
|
+
var is_store_binding = false;
|
|
4157
|
+
/**
|
|
4158
|
+
* Returns a tuple that indicates whether `fn()` reads a prop that is a store binding.
|
|
4159
|
+
* Used to prevent `binding_property_non_reactive` validation false positives and
|
|
4160
|
+
* ensure that these props are treated as mutable even in runes mode
|
|
4161
|
+
* @template T
|
|
4162
|
+
* @param {() => T} fn
|
|
4163
|
+
* @returns {[T, boolean]}
|
|
4164
|
+
*/
|
|
4165
|
+
function capture_store_binding(fn) {
|
|
4166
|
+
var previous_is_store_binding = is_store_binding;
|
|
4167
|
+
try {
|
|
4168
|
+
is_store_binding = false;
|
|
4169
|
+
return [fn(), is_store_binding];
|
|
4170
|
+
} finally {
|
|
4171
|
+
is_store_binding = previous_is_store_binding;
|
|
4172
|
+
}
|
|
4173
|
+
}
|
|
4174
|
+
//#endregion
|
|
4175
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/props.js
|
|
4174
4176
|
/** @import { Derived, Effect, Source } from './types.js' */
|
|
4175
4177
|
/**
|
|
4176
4178
|
* This function is responsible for synchronizing a possibly bound prop with the inner component state.
|
|
@@ -4263,7 +4265,7 @@ function prop(props, key, flags, fallback) {
|
|
|
4263
4265
|
});
|
|
4264
4266
|
}
|
|
4265
4267
|
//#endregion
|
|
4266
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
4268
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/legacy/legacy-client.js
|
|
4267
4269
|
/** @import { ComponentConstructorOptions, ComponentType, SvelteComponent, Component } from 'svelte' */
|
|
4268
4270
|
/**
|
|
4269
4271
|
* Takes the same options as a Svelte 4 component and the component function and returns a Svelte 4 compatible component.
|
|
@@ -4382,7 +4384,7 @@ var Svelte4Component = class {
|
|
|
4382
4384
|
}
|
|
4383
4385
|
};
|
|
4384
4386
|
//#endregion
|
|
4385
|
-
//#region ../../../node_modules/.bun/svelte@5.57.
|
|
4387
|
+
//#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/custom-element.js
|
|
4386
4388
|
/**
|
|
4387
4389
|
* @typedef {Object} CustomElementPropDefinition
|
|
4388
4390
|
* @property {string} [attribute]
|
|
@@ -4668,80 +4670,244 @@ function create_custom_element(Component, props_definition, slots, exports, shad
|
|
|
4668
4670
|
}
|
|
4669
4671
|
//#endregion
|
|
4670
4672
|
//#region ../../shared/math-rendering-mathjax/dist/index.js
|
|
4671
|
-
var e$3 =
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4673
|
+
var e$3 = "https://github.com/pie-framework/pie-players/blob/develop/docs/item-player/loading-strategies.md#one-mathjax-version-per-page";
|
|
4674
|
+
var t$3 = "pie-mathjax-version-conflict";
|
|
4675
|
+
var n = Symbol.for("@pie-element/shared-math-rendering-mathjax/unsupported-page");
|
|
4676
|
+
function r$2(r, i) {
|
|
4677
|
+
if (typeof window > "u") return;
|
|
4678
|
+
let a = globalThis;
|
|
4679
|
+
a[n] ?? (a[n] = {
|
|
4680
|
+
logged: !1,
|
|
4681
|
+
conditions: []
|
|
4682
|
+
});
|
|
4683
|
+
let o = a[n];
|
|
4684
|
+
if (o.conditions.includes(r)) return;
|
|
4685
|
+
o.conditions.push(r);
|
|
4686
|
+
let s = `[math-rendering] Unsupported page (${r}): ${i}. PIE supports one MathJax major version per page; with MathJax 3 and 4 on one page, math rendering is best effort and may break. See ${e$3}`;
|
|
4687
|
+
o.logged || (o.logged = !0, console.error(s)), window.dispatchEvent(new CustomEvent(t$3, { detail: {
|
|
4688
|
+
condition: r,
|
|
4689
|
+
message: s,
|
|
4690
|
+
docsUrl: e$3
|
|
4691
|
+
} }));
|
|
4692
|
+
}
|
|
4693
|
+
function i() {
|
|
4694
|
+
let e = window.MathJax?.version;
|
|
4695
|
+
return typeof e == "string" && e.startsWith("3.") ? e : void 0;
|
|
4696
|
+
}
|
|
4697
|
+
var a = "https://cdn.jsdelivr.net/npm/mathjax@4.1.3/tex-mml-chtml.js";
|
|
4698
|
+
var o = {
|
|
4699
|
+
parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
|
|
4700
|
+
overarc: "\\overparen",
|
|
4701
|
+
napprox: "\\not\\approx",
|
|
4702
|
+
longdiv: "\\enclose{longdiv}",
|
|
4703
|
+
abs: ["\\left|#1\\right|", 1]
|
|
4704
|
+
};
|
|
4705
|
+
var s$1 = "[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)";
|
|
4706
|
+
var c$1 = /\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/;
|
|
4707
|
+
var l = /\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/;
|
|
4708
|
+
var u = /\\embed\{newLine\}\[\]/g;
|
|
4709
|
+
var d = [
|
|
4710
|
+
["$$", "$$"],
|
|
4711
|
+
["$", "$"],
|
|
4712
|
+
["\\[", "\\]"],
|
|
4713
|
+
["\\(", "\\)"]
|
|
4714
|
+
];
|
|
4715
|
+
var f = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading");
|
|
4716
|
+
var p = "PIE-MJX-CHTML-styles";
|
|
4717
|
+
var m = "MJX-CHTML-styles";
|
|
4718
|
+
var h = [m, "MJX-SVG-styles"];
|
|
4719
|
+
var g = 201;
|
|
4720
|
+
function _(e) {
|
|
4721
|
+
let t = [...e.matches("mjx-container") ? [e] : [], ...e.querySelectorAll("mjx-container")];
|
|
4722
|
+
for (let e of t) for (let t of [e, ...e.querySelectorAll("[data-latex],[data-latex-item]")]) t.removeAttribute("data-latex"), t.removeAttribute("data-latex-item");
|
|
4723
|
+
}
|
|
4724
|
+
function v() {
|
|
4725
|
+
return window.MathJax;
|
|
4726
|
+
}
|
|
4727
|
+
function y(e) {
|
|
4728
|
+
for (let [t, n] of d) if (e.startsWith(t) && e.endsWith(n)) return e.substring(t.length, e.length - n.length);
|
|
4729
|
+
return e;
|
|
4730
|
+
}
|
|
4731
|
+
function b(e) {
|
|
4732
|
+
return y(e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e);
|
|
4733
|
+
}
|
|
4734
|
+
var x = "mathjax_ignore";
|
|
4735
|
+
var S = "mathjax_process";
|
|
4736
|
+
function C(e, t) {
|
|
4737
|
+
let n = e.closest(`.${x}, .${S}`);
|
|
4738
|
+
return n !== null && t.contains(n) && !n.classList.contains(S);
|
|
4739
|
+
}
|
|
4740
|
+
function w(e) {
|
|
4741
|
+
for (let t of e.querySelectorAll("[data-latex]")) {
|
|
4742
|
+
if (t.dataset.mathHandled || t.closest("mjx-container") || C(t, e)) continue;
|
|
4743
|
+
let n = t.textContent;
|
|
4744
|
+
n && (t.textContent = `\\(${b(n)}\\)`.replace(u, "\\newline "), t.dataset.mathHandled = "true");
|
|
4745
|
+
}
|
|
4746
|
+
}
|
|
4747
|
+
function T(e, t) {
|
|
4748
|
+
for (let t of e.querySelectorAll("math")) if (!t.closest("mjx-assistive-mml")) return !0;
|
|
4749
|
+
return (t ? l : c$1).test(e.textContent ?? "");
|
|
4750
|
+
}
|
|
4751
|
+
function E(e) {
|
|
4752
|
+
return new Promise((t, n) => {
|
|
4753
|
+
let { useSingleDollar: r = !1, accessibility: i = !0, loadFonts: c = !0, srcUrl: l } = e, u = {
|
|
4754
|
+
loader: {
|
|
4755
|
+
load: i ? ["a11y/assistive-mml"] : [],
|
|
4756
|
+
failed: (e) => n(e)
|
|
4757
|
+
},
|
|
4758
|
+
startup: {
|
|
4759
|
+
typeset: !1,
|
|
4760
|
+
ready: () => {
|
|
4761
|
+
let e = v(), r = e?.startup, i = !!e?.version?.startsWith("4.");
|
|
4762
|
+
i && D(e), r?.defaultReady?.(), i && O(r?.document), Promise.resolve(r?.promise).then(() => t(), n);
|
|
4687
4763
|
}
|
|
4688
4764
|
},
|
|
4765
|
+
tex: { macros: { ...o } },
|
|
4689
4766
|
options: {
|
|
4690
4767
|
enableMenu: i,
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4768
|
+
menuOptions: { settings: {
|
|
4769
|
+
assistiveMml: i,
|
|
4770
|
+
enrich: !1,
|
|
4771
|
+
inTabOrder: !1
|
|
4772
|
+
} }
|
|
4773
|
+
}
|
|
4774
|
+
};
|
|
4775
|
+
r && u.tex && (console.warn(s$1), u.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], u.tex.processEscapes = !0), c || (u.chtml = { fontURL: "" }), window.MathJax = u;
|
|
4776
|
+
let d = document.createElement("script");
|
|
4777
|
+
d.src = l || a, d.async = !0, d.onerror = () => n(/* @__PURE__ */ Error("Failed to load MathJax")), document.head.appendChild(d);
|
|
4778
|
+
});
|
|
4779
|
+
}
|
|
4780
|
+
function D(e) {
|
|
4781
|
+
let t = e?._?.output?.chtml_ts?.CHTML;
|
|
4782
|
+
t && (t.STYLESHEETID = p);
|
|
4783
|
+
}
|
|
4784
|
+
function O(e) {
|
|
4785
|
+
if (!e) return;
|
|
4786
|
+
let t = /* @__PURE__ */ new WeakSet(), n = (e) => {
|
|
4787
|
+
let n = e.typesetRoot;
|
|
4788
|
+
!n || t.has(n) || (_(n), t.add(n));
|
|
4789
|
+
};
|
|
4790
|
+
e.addRenderAction?.("pie-strip-latex", g, (e) => {
|
|
4791
|
+
for (let t of e.math ?? []) n(t);
|
|
4792
|
+
return !1;
|
|
4793
|
+
}, (e) => {
|
|
4794
|
+
let t = e.typesetRoot;
|
|
4795
|
+
return t && _(t), !1;
|
|
4796
|
+
});
|
|
4797
|
+
let r = e.outputJax?.chtmlStyles;
|
|
4798
|
+
r?.id === m && (r.id = p), j();
|
|
4799
|
+
}
|
|
4800
|
+
function k(e) {
|
|
4801
|
+
return e instanceof HTMLStyleElement && h.includes(e.id);
|
|
4802
|
+
}
|
|
4803
|
+
function A(e) {
|
|
4804
|
+
r$2("foreign-output-stylesheet", `another MathJax added <style id="${e.id}"> to <head>`);
|
|
4805
|
+
}
|
|
4806
|
+
function j() {
|
|
4807
|
+
let e = document.head, t = [...e.children].find(k);
|
|
4808
|
+
if (t) {
|
|
4809
|
+
A(t);
|
|
4810
|
+
return;
|
|
4811
|
+
}
|
|
4812
|
+
let n = new MutationObserver((e) => {
|
|
4813
|
+
for (let t of e) {
|
|
4814
|
+
let e = [...t.addedNodes].find(k);
|
|
4815
|
+
if (e) {
|
|
4816
|
+
A(e), n.disconnect();
|
|
4817
|
+
return;
|
|
4699
4818
|
}
|
|
4819
|
+
}
|
|
4820
|
+
});
|
|
4821
|
+
n.observe(e, { childList: !0 });
|
|
4822
|
+
}
|
|
4823
|
+
function M(e) {
|
|
4824
|
+
return new Promise((t, n) => {
|
|
4825
|
+
let r = e.startup ?? {};
|
|
4826
|
+
e.startup = r;
|
|
4827
|
+
let i = r.ready;
|
|
4828
|
+
r.ready = () => {
|
|
4829
|
+
let e = v()?.startup;
|
|
4830
|
+
i ? i.call(r) : e?.defaultReady?.(), Promise.resolve(e?.promise).then(() => t(), n);
|
|
4700
4831
|
};
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4832
|
+
});
|
|
4833
|
+
}
|
|
4834
|
+
function N(e) {
|
|
4835
|
+
let t = v();
|
|
4836
|
+
return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() : M(t) : E(e);
|
|
4837
|
+
}
|
|
4838
|
+
function P(e) {
|
|
4839
|
+
return N(e).then(() => {
|
|
4840
|
+
typeof v()?.typesetPromise != "function" && console.warn("[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.");
|
|
4841
|
+
});
|
|
4842
|
+
}
|
|
4843
|
+
function F(e) {
|
|
4844
|
+
let t = globalThis, n = t[f];
|
|
4845
|
+
return n || (n = P(e), t[f] = n), n;
|
|
4846
|
+
}
|
|
4847
|
+
function I(e = {}) {
|
|
4848
|
+
let t = e.useSingleDollar ?? !1;
|
|
4849
|
+
return async (n) => {
|
|
4850
|
+
if (typeof window > "u") return;
|
|
4851
|
+
let a = i();
|
|
4852
|
+
a && r$2("mathjax-3-global", `window.MathJax is MathJax ${a}`), w(n);
|
|
4853
|
+
let o = F(e);
|
|
4854
|
+
if (!T(n, t)) {
|
|
4855
|
+
o.catch(() => {});
|
|
4722
4856
|
return;
|
|
4723
4857
|
}
|
|
4724
|
-
await
|
|
4858
|
+
await o;
|
|
4859
|
+
let s = v();
|
|
4860
|
+
await s?.startup?.promise, typeof s?.typesetPromise == "function" && (await s.typesetPromise([n]), _(n));
|
|
4725
4861
|
};
|
|
4726
4862
|
}
|
|
4727
|
-
var
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4863
|
+
var R = "@pie-lib/math-rendering";
|
|
4864
|
+
var z = "@pie-lib/math-rendering@2";
|
|
4865
|
+
var B = "pie-print";
|
|
4866
|
+
var V = 50;
|
|
4867
|
+
var H = 1e4;
|
|
4868
|
+
var U = null;
|
|
4869
|
+
function W() {
|
|
4870
|
+
return !!window[z]?.opts?.useSingleDollar;
|
|
4871
|
+
}
|
|
4872
|
+
function G() {
|
|
4873
|
+
return U || (U = I({ useSingleDollar: W() })), U;
|
|
4733
4874
|
}
|
|
4734
|
-
function
|
|
4875
|
+
function K() {
|
|
4735
4876
|
if (typeof window > "u") return null;
|
|
4736
|
-
let e = window[
|
|
4737
|
-
return typeof e?.renderMath == "function" ? e : null;
|
|
4877
|
+
let e = window[R];
|
|
4878
|
+
return typeof e?.renderMath == "function" && e.renderMath !== X ? e : null;
|
|
4879
|
+
}
|
|
4880
|
+
function q(e) {
|
|
4881
|
+
let t = e;
|
|
4882
|
+
for (; t;) {
|
|
4883
|
+
if (t instanceof Element && t.localName === B) return t;
|
|
4884
|
+
t = t instanceof ShadowRoot ? t.host : t.parentNode;
|
|
4885
|
+
}
|
|
4886
|
+
return null;
|
|
4887
|
+
}
|
|
4888
|
+
function J() {
|
|
4889
|
+
let e = window.renderMath;
|
|
4890
|
+
return typeof e == "function" ? e : null;
|
|
4891
|
+
}
|
|
4892
|
+
async function Y(e) {
|
|
4893
|
+
let t = q(e);
|
|
4894
|
+
if (!t) return null;
|
|
4895
|
+
let n = J();
|
|
4896
|
+
if (n || t.mathRenderingModuleUrlImported !== !0) return n;
|
|
4897
|
+
let r = Date.now() + H;
|
|
4898
|
+
for (; Date.now() < r;) {
|
|
4899
|
+
await new Promise((e) => setTimeout(e, V));
|
|
4900
|
+
let e = J();
|
|
4901
|
+
if (e) return e;
|
|
4902
|
+
}
|
|
4903
|
+
return null;
|
|
4738
4904
|
}
|
|
4739
|
-
var
|
|
4905
|
+
var X = async (e) => {
|
|
4740
4906
|
if (typeof window > "u") return;
|
|
4741
4907
|
let t = typeof e == "string", n;
|
|
4742
4908
|
t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
|
|
4743
|
-
let r =
|
|
4744
|
-
return r ? await r.renderMath?.(n) : await
|
|
4909
|
+
let r = K(), i = r || t ? null : await Y(n);
|
|
4910
|
+
return r ? await r.renderMath?.(n) : i && i !== X ? await i(n) : await G()(n), t ? n.innerHTML : void 0;
|
|
4745
4911
|
};
|
|
4746
4912
|
//#endregion
|
|
4747
4913
|
//#region ../../shared/translator/dist/en.js
|
|
@@ -7182,7 +7348,7 @@ function SimpleCloze($$anchor, $$props) {
|
|
|
7182
7348
|
if (!get$1(promptElement) || !get$1(prompt)) return;
|
|
7183
7349
|
const warn = (err) => console.warn("simple-cloze: MathJax render failed", err);
|
|
7184
7350
|
try {
|
|
7185
|
-
Promise.resolve(
|
|
7351
|
+
Promise.resolve(X(get$1(promptElement))).catch(warn);
|
|
7186
7352
|
} catch (err) {
|
|
7187
7353
|
warn(err);
|
|
7188
7354
|
}
|