@absolutejs/absolute 0.19.0-beta.1083 → 0.19.0-beta.1085

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 (153) hide show
  1. package/dist/angular/browser.js +18 -18
  2. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  3. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  4. package/dist/angular/components/defer-slot-templates.directive.js +2 -2
  5. package/dist/angular/components/defer-slot.component.js +3 -3
  6. package/dist/angular/components/image.component.js +3 -3
  7. package/dist/angular/components/stream-slot.component.js +3 -3
  8. package/dist/angular/index.js +43 -43
  9. package/dist/angular/server.js +31 -31
  10. package/dist/build.js +105 -54
  11. package/dist/build.js.map +4 -4
  12. package/dist/cli/config/server.js +11 -11
  13. package/dist/client/index.js +13 -13
  14. package/dist/index.js +130 -79
  15. package/dist/index.js.map +4 -4
  16. package/dist/islands/index.js +14 -14
  17. package/dist/react/browser.js +3 -3
  18. package/dist/react/components/browser/index.js +5 -5
  19. package/dist/react/components/index.js +7 -7
  20. package/dist/react/hooks/index.js +2 -2
  21. package/dist/react/index.js +30 -30
  22. package/dist/react/jsxDevRuntimeCompat.js +1 -1
  23. package/dist/react/router/browser.js +2 -2
  24. package/dist/react/router/index.js +2 -2
  25. package/dist/react/server.js +13 -13
  26. package/dist/src/build/chainInlineSourcemaps.d.ts +1 -0
  27. package/dist/src/core/build.d.ts +5 -0
  28. package/dist/src/utils/loadConfig.d.ts +1 -0
  29. package/dist/svelte/index.js +26 -26
  30. package/dist/svelte/router/page.js +1 -1
  31. package/dist/svelte/server.js +13 -13
  32. package/dist/types/build.d.ts +1 -0
  33. package/dist/vue/browser.js +3 -3
  34. package/dist/vue/components/Image.js +1 -1
  35. package/dist/vue/components/index.js +5 -5
  36. package/dist/vue/index.js +36 -36
  37. package/dist/vue/server.js +13 -13
  38. package/package.json +1 -1
  39. package/dist/.absolutejs/generated/angular/indexes/angular-example.1g23yr9r.js +0 -167
  40. package/dist/.absolutejs/generated/react/indexes/ReactExample.e6kzvjqy.js +0 -3
  41. package/dist/.absolutejs/generated/svelte/client/pages/SvelteExample.5pq2wmw6.js +0 -1
  42. package/dist/.absolutejs/generated/svelte/indexes/pages/SvelteExample.9zcw5vtg.js +0 -1
  43. package/dist/.absolutejs/generated/vue/client/pages/VueExample.q47m56s4.js +0 -1
  44. package/dist/.absolutejs/generated/vue/indexes/VueExample.6bqszcxv.js +0 -1
  45. package/dist/_prerendered/angular.html +0 -45
  46. package/dist/_prerendered/angular.meta +0 -1
  47. package/dist/_prerendered/html.html +0 -70
  48. package/dist/_prerendered/html.meta +0 -1
  49. package/dist/_prerendered/htmx.html +0 -239
  50. package/dist/_prerendered/htmx.meta +0 -1
  51. package/dist/_prerendered/index.html +0 -70
  52. package/dist/_prerendered/index.meta +0 -1
  53. package/dist/_prerendered/react.html +0 -1
  54. package/dist/_prerendered/react.meta +0 -1
  55. package/dist/_prerendered/vue.html +0 -41
  56. package/dist/_prerendered/vue.meta +0 -1
  57. package/dist/angular/example/angular/pages/angular-example.djr1v9hj.js +0 -373
  58. package/dist/angular/vendor/angular_common.js +0 -310
  59. package/dist/angular/vendor/angular_common_http.js +0 -129
  60. package/dist/angular/vendor/angular_core.js +0 -1177
  61. package/dist/angular/vendor/angular_core_primitives_di.js +0 -36
  62. package/dist/angular/vendor/angular_core_primitives_signals.js +0 -132
  63. package/dist/angular/vendor/angular_platform-browser.js +0 -117
  64. package/dist/angular/vendor/angular_router.js +0 -6410
  65. package/dist/angular/vendor/chunk-2c9evnn0.js +0 -4764
  66. package/dist/angular/vendor/chunk-3evcs0sk.js +0 -2567
  67. package/dist/angular/vendor/chunk-5h3qyvpj.js +0 -729
  68. package/dist/angular/vendor/chunk-hgg0w52m.js +0 -62
  69. package/dist/angular/vendor/chunk-n6rt7w2y.js +0 -23
  70. package/dist/angular/vendor/chunk-t4tc7c8b.js +0 -28013
  71. package/dist/angular/vendor/chunk-vqd7j0kb.js +0 -1786
  72. package/dist/angular/vendor/chunk-yqjkhk8j.js +0 -145
  73. package/dist/angular/vendor/server/angular_common.js +0 -311
  74. package/dist/angular/vendor/server/angular_common_http.js +0 -130
  75. package/dist/angular/vendor/server/angular_core.js +0 -1178
  76. package/dist/angular/vendor/server/angular_core_primitives_di.js +0 -37
  77. package/dist/angular/vendor/server/angular_core_primitives_signals.js +0 -133
  78. package/dist/angular/vendor/server/angular_platform-browser.js +0 -118
  79. package/dist/angular/vendor/server/angular_platform-server.js +0 -59
  80. package/dist/angular/vendor/server/angular_router.js +0 -261
  81. package/dist/angular/vendor/server/angular_ssr.js +0 -11669
  82. package/dist/angular/vendor/server/chunk-2akxms5e.js +0 -2566
  83. package/dist/angular/vendor/server/chunk-659a9c3p.js +0 -6218
  84. package/dist/angular/vendor/server/chunk-8eecnjd1.js +0 -16686
  85. package/dist/angular/vendor/server/chunk-9jz2apvp.js +0 -743
  86. package/dist/angular/vendor/server/chunk-dhs2bg35.js +0 -48
  87. package/dist/angular/vendor/server/chunk-hs2gc8sr.js +0 -1787
  88. package/dist/angular/vendor/server/chunk-k46n34mb.js +0 -63
  89. package/dist/angular/vendor/server/chunk-p2fdvyh1.js +0 -4767
  90. package/dist/angular/vendor/server/chunk-r0w9r4bg.js +0 -730
  91. package/dist/angular/vendor/server/chunk-vthxj7kd.js +0 -146
  92. package/dist/angular/vendor/server/chunk-xahr7f2f.js +0 -35534
  93. package/dist/assets/css/tailwind.generated.css +0 -218
  94. package/dist/assets/css/vue-example-compiled.abzaxheq.css +0 -32
  95. package/dist/assets/ico/favicon.ico +0 -0
  96. package/dist/assets/png/absolutejs-temp.png +0 -0
  97. package/dist/assets/svg/HTML5_Badge.svg +0 -7
  98. package/dist/assets/svg/angular.svg +0 -18
  99. package/dist/assets/svg/htmx-logo-black.svg +0 -9
  100. package/dist/assets/svg/htmx-logo-white.svg +0 -9
  101. package/dist/assets/svg/react.svg +0 -1
  102. package/dist/assets/svg/svelte-logo.svg +0 -1
  103. package/dist/assets/svg/vue-logo.svg +0 -4
  104. package/dist/chunk-7pp6gkg8.js +0 -2
  105. package/dist/chunk-ek2qyx2c.js +0 -11
  106. package/dist/chunk-ysr5ycdt.js +0 -2
  107. package/dist/client.tsx +0 -15
  108. package/dist/example/html/scripts/typescript-example.fqn9zkdh.js +0 -1
  109. package/dist/html/pages/HTMLExample.html +0 -70
  110. package/dist/htmx/htmx.min.js +0 -1
  111. package/dist/htmx/pages/HTMXExample.html +0 -239
  112. package/dist/htmx.min.js +0 -1
  113. package/dist/indexes/angular-example.xsx88ph0.css +0 -227
  114. package/dist/indexes/html-example.s3banzdc.css +0 -221
  115. package/dist/indexes/htmx-example.5vgssc3f.css +0 -221
  116. package/dist/indexes/react-example.bz1k8xa2.css +0 -245
  117. package/dist/indexes/svelte-example.vy3015es.css +0 -221
  118. package/dist/indexes/vue-example.q4vf2wtq.css +0 -228
  119. package/dist/manifest.json +0 -26
  120. package/dist/nested/dynamic-module.txt +0 -1
  121. package/dist/package-asset.txt +0 -1
  122. package/dist/react/vendor/chunk-2kh60w9b.js +0 -33
  123. package/dist/react/vendor/chunk-9g12fvrw.js +0 -236
  124. package/dist/react/vendor/chunk-rejbymp5.js +0 -837
  125. package/dist/react/vendor/chunk-wwy122hz.js +0 -200
  126. package/dist/react/vendor/react-dom.js +0 -44
  127. package/dist/react/vendor/react-dom_client.js +0 -15864
  128. package/dist/react/vendor/react-refresh_runtime.js +0 -304
  129. package/dist/react/vendor/react.js +0 -103
  130. package/dist/react/vendor/react_jsx-dev-runtime.js +0 -17
  131. package/dist/react/vendor/react_jsx-runtime.js +0 -22
  132. package/dist/robots.txt +0 -2
  133. package/dist/runtime/blob.txt +0 -1
  134. package/dist/runtime/dir-join.txt +0 -1
  135. package/dist/runtime/nested/binary.bin +0 -1
  136. package/dist/runtime/nested/readfile.txt +0 -1
  137. package/dist/runtime/template.html +0 -1
  138. package/dist/server.js +0 -92156
  139. package/dist/sitemap.xml +0 -48
  140. package/dist/svelte/server/pages/SvelteExample.fxs20w1b.js +0 -290
  141. package/dist/svelte/vendor/chunk-5qdxn1p3.js +0 -4586
  142. package/dist/svelte/vendor/chunk-8qdfbbez.js +0 -12
  143. package/dist/svelte/vendor/chunk-r2jyyfjt.js +0 -4495
  144. package/dist/svelte/vendor/svelte.js +0 -49
  145. package/dist/svelte/vendor/svelte_internal.js +0 -2
  146. package/dist/svelte/vendor/svelte_internal_client.js +0 -395
  147. package/dist/svelte/vendor/svelte_internal_disclose-version.js +0 -7
  148. package/dist/svelte/vendor/svelte_internal_flags_async.js +0 -6
  149. package/dist/svelte/vendor/svelte_internal_flags_legacy.js +0 -6
  150. package/dist/svelte/vendor/svelte_store.js +0 -99
  151. package/dist/vue/server/pages/VueExample.fyhmna2p.css +0 -32
  152. package/dist/vue/server/pages/VueExample.fyhmna2p.js +0 -75
  153. package/dist/vue/vendor/vue.js +0 -11011
@@ -1,4495 +0,0 @@
1
- import {
2
- async_mode_flag,
3
- legacy_mode_flag,
4
- tracing_mode_flag
5
- } from "./chunk-8qdfbbez.js";
6
-
7
- // node_modules/svelte/src/internal/shared/utils.js
8
- var is_array = Array.isArray;
9
- var index_of = Array.prototype.indexOf;
10
- var includes = Array.prototype.includes;
11
- var array_from = Array.from;
12
- var object_keys = Object.keys;
13
- var define_property = Object.defineProperty;
14
- var get_descriptor = Object.getOwnPropertyDescriptor;
15
- var get_descriptors = Object.getOwnPropertyDescriptors;
16
- var object_prototype = Object.prototype;
17
- var array_prototype = Array.prototype;
18
- var get_prototype_of = Object.getPrototypeOf;
19
- var is_extensible = Object.isExtensible;
20
- var has_own_property = Object.prototype.hasOwnProperty;
21
- function is_function(thing) {
22
- return typeof thing === "function";
23
- }
24
- var noop = () => {};
25
- function is_promise(value) {
26
- return typeof value?.then === "function";
27
- }
28
- function run(fn) {
29
- return fn();
30
- }
31
- function run_all(arr) {
32
- for (var i = 0;i < arr.length; i++) {
33
- arr[i]();
34
- }
35
- }
36
- function deferred() {
37
- var resolve;
38
- var reject;
39
- var promise = new Promise((res, rej) => {
40
- resolve = res;
41
- reject = rej;
42
- });
43
- return { promise, resolve, reject };
44
- }
45
- function fallback(value, fallback2, lazy = false) {
46
- return value === undefined ? lazy ? fallback2() : fallback2 : value;
47
- }
48
- function to_array(value, n) {
49
- if (Array.isArray(value)) {
50
- return value;
51
- }
52
- if (n === undefined || !(Symbol.iterator in value)) {
53
- return Array.from(value);
54
- }
55
- const array = [];
56
- for (const element of value) {
57
- array.push(element);
58
- if (array.length === n)
59
- break;
60
- }
61
- return array;
62
- }
63
- function exclude_from_object(obj, keys) {
64
- var result = {};
65
- for (var key in obj) {
66
- if (!keys.includes(key)) {
67
- result[key] = obj[key];
68
- }
69
- }
70
- for (var symbol of Object.getOwnPropertySymbols(obj)) {
71
- if (Object.propertyIsEnumerable.call(obj, symbol) && !keys.includes(symbol)) {
72
- result[symbol] = obj[symbol];
73
- }
74
- }
75
- return result;
76
- }
77
-
78
- // node_modules/esm-env/true.js
79
- var true_default = true;
80
- // node_modules/svelte/src/internal/shared/errors.js
81
- function experimental_async_required(name) {
82
- if (true_default) {
83
- const error = new Error(`experimental_async_required
84
- Cannot use \`${name}(...)\` unless the \`experimental.async\` compiler option is \`true\`
85
- https://svelte.dev/e/experimental_async_required`);
86
- error.name = "Svelte error";
87
- throw error;
88
- } else {
89
- throw new Error(`https://svelte.dev/e/experimental_async_required`);
90
- }
91
- }
92
- function invalid_default_snippet() {
93
- if (true_default) {
94
- const error = new Error(`invalid_default_snippet
95
- Cannot use \`{@render children(...)}\` if the parent component uses \`let:\` directives. Consider using a named snippet instead
96
- https://svelte.dev/e/invalid_default_snippet`);
97
- error.name = "Svelte error";
98
- throw error;
99
- } else {
100
- throw new Error(`https://svelte.dev/e/invalid_default_snippet`);
101
- }
102
- }
103
- function invalid_snippet_arguments() {
104
- if (true_default) {
105
- const error = new Error(`invalid_snippet_arguments
106
- A snippet function was passed invalid arguments. Snippets should only be instantiated via \`{@render ...}\`
107
- https://svelte.dev/e/invalid_snippet_arguments`);
108
- error.name = "Svelte error";
109
- throw error;
110
- } else {
111
- throw new Error(`https://svelte.dev/e/invalid_snippet_arguments`);
112
- }
113
- }
114
- function invariant_violation(message) {
115
- if (true_default) {
116
- const error = new Error(`invariant_violation
117
- An invariant violation occurred, meaning Svelte's internal assumptions were flawed. This is a bug in Svelte, not your app — please open an issue at https://github.com/sveltejs/svelte, citing the following message: "${message}"
118
- https://svelte.dev/e/invariant_violation`);
119
- error.name = "Svelte error";
120
- throw error;
121
- } else {
122
- throw new Error(`https://svelte.dev/e/invariant_violation`);
123
- }
124
- }
125
- function lifecycle_outside_component(name) {
126
- if (true_default) {
127
- const error = new Error(`lifecycle_outside_component
128
- \`${name}(...)\` can only be used during component initialisation
129
- https://svelte.dev/e/lifecycle_outside_component`);
130
- error.name = "Svelte error";
131
- throw error;
132
- } else {
133
- throw new Error(`https://svelte.dev/e/lifecycle_outside_component`);
134
- }
135
- }
136
- function missing_context() {
137
- if (true_default) {
138
- const error = new Error(`missing_context
139
- Context was not set in a parent component
140
- https://svelte.dev/e/missing_context`);
141
- error.name = "Svelte error";
142
- throw error;
143
- } else {
144
- throw new Error(`https://svelte.dev/e/missing_context`);
145
- }
146
- }
147
- function snippet_without_render_tag() {
148
- if (true_default) {
149
- const error = new Error(`snippet_without_render_tag
150
- Attempted to render a snippet without a \`{@render}\` block. This would cause the snippet code to be stringified instead of its content being rendered to the DOM. To fix this, change \`{snippet}\` to \`{@render snippet()}\`.
151
- https://svelte.dev/e/snippet_without_render_tag`);
152
- error.name = "Svelte error";
153
- throw error;
154
- } else {
155
- throw new Error(`https://svelte.dev/e/snippet_without_render_tag`);
156
- }
157
- }
158
- function store_invalid_shape(name) {
159
- if (true_default) {
160
- const error = new Error(`store_invalid_shape
161
- \`${name}\` is not a store with a \`subscribe\` method
162
- https://svelte.dev/e/store_invalid_shape`);
163
- error.name = "Svelte error";
164
- throw error;
165
- } else {
166
- throw new Error(`https://svelte.dev/e/store_invalid_shape`);
167
- }
168
- }
169
- function svelte_element_invalid_this_value() {
170
- if (true_default) {
171
- const error = new Error(`svelte_element_invalid_this_value
172
- The \`this\` prop on \`<svelte:element>\` must be a string, if defined
173
- https://svelte.dev/e/svelte_element_invalid_this_value`);
174
- error.name = "Svelte error";
175
- throw error;
176
- } else {
177
- throw new Error(`https://svelte.dev/e/svelte_element_invalid_this_value`);
178
- }
179
- }
180
-
181
- // node_modules/svelte/src/constants.js
182
- var EACH_ITEM_REACTIVE = 1;
183
- var EACH_INDEX_REACTIVE = 1 << 1;
184
- var EACH_IS_CONTROLLED = 1 << 2;
185
- var EACH_IS_ANIMATED = 1 << 3;
186
- var EACH_ITEM_IMMUTABLE = 1 << 4;
187
- var PROPS_IS_IMMUTABLE = 1;
188
- var PROPS_IS_RUNES = 1 << 1;
189
- var PROPS_IS_UPDATED = 1 << 2;
190
- var PROPS_IS_BINDABLE = 1 << 3;
191
- var PROPS_IS_LAZY_INITIAL = 1 << 4;
192
- var TRANSITION_IN = 1;
193
- var TRANSITION_OUT = 1 << 1;
194
- var TRANSITION_GLOBAL = 1 << 2;
195
- var TEMPLATE_FRAGMENT = 1;
196
- var TEMPLATE_USE_IMPORT_NODE = 1 << 1;
197
- var TEMPLATE_USE_SVG = 1 << 2;
198
- var TEMPLATE_USE_MATHML = 1 << 3;
199
- var HYDRATION_START = "[";
200
- var HYDRATION_START_ELSE = "[!";
201
- var HYDRATION_START_FAILED = "[?";
202
- var HYDRATION_END = "]";
203
- var HYDRATION_ERROR = {};
204
- var ELEMENT_PRESERVE_ATTRIBUTE_CASE = 1 << 1;
205
- var ELEMENT_IS_INPUT = 1 << 2;
206
- var UNINITIALIZED = Symbol();
207
- var FILENAME = Symbol("filename");
208
- var HMR = Symbol("hmr");
209
- var NAMESPACE_HTML = "http://www.w3.org/1999/xhtml";
210
- var NAMESPACE_SVG = "http://www.w3.org/2000/svg";
211
- var NAMESPACE_MATHML = "http://www.w3.org/1998/Math/MathML";
212
- var ATTACHMENT_KEY = "@attach";
213
-
214
- // node_modules/svelte/src/internal/client/constants.js
215
- var DERIVED = 1 << 1;
216
- var EFFECT = 1 << 2;
217
- var RENDER_EFFECT = 1 << 3;
218
- var MANAGED_EFFECT = 1 << 24;
219
- var BLOCK_EFFECT = 1 << 4;
220
- var BRANCH_EFFECT = 1 << 5;
221
- var ROOT_EFFECT = 1 << 6;
222
- var BOUNDARY_EFFECT = 1 << 7;
223
- var CONNECTED = 1 << 9;
224
- var CLEAN = 1 << 10;
225
- var DIRTY = 1 << 11;
226
- var MAYBE_DIRTY = 1 << 12;
227
- var INERT = 1 << 13;
228
- var DESTROYED = 1 << 14;
229
- var REACTION_RAN = 1 << 15;
230
- var DESTROYING = 1 << 25;
231
- var EFFECT_TRANSPARENT = 1 << 16;
232
- var EAGER_EFFECT = 1 << 17;
233
- var HEAD_EFFECT = 1 << 18;
234
- var EFFECT_PRESERVED = 1 << 19;
235
- var USER_EFFECT = 1 << 20;
236
- var EFFECT_OFFSCREEN = 1 << 25;
237
- var WAS_MARKED = 1 << 16;
238
- var REACTION_IS_UPDATING = 1 << 21;
239
- var ASYNC = 1 << 22;
240
- var ERROR_VALUE = 1 << 23;
241
- var STATE_SYMBOL = Symbol("$state");
242
- var LEGACY_PROPS = Symbol("legacy props");
243
- var LOADING_ATTR_SYMBOL = Symbol("");
244
- var PROXY_PATH_SYMBOL = Symbol("proxy path");
245
- var STALE_REACTION = new class StaleReactionError extends Error {
246
- name = "StaleReactionError";
247
- message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
248
- };
249
- var IS_XHTML = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
250
- var ELEMENT_NODE = 1;
251
- var TEXT_NODE = 3;
252
- var COMMENT_NODE = 8;
253
- var DOCUMENT_FRAGMENT_NODE = 11;
254
-
255
- // node_modules/svelte/src/internal/client/warnings.js
256
- var bold = "font-weight: bold";
257
- var normal = "font-weight: normal";
258
- function assignment_value_stale(property, location) {
259
- if (true_default) {
260
- console.warn(`%c[svelte] assignment_value_stale
261
- %cAssignment to \`${property}\` property (${location}) will evaluate to the right-hand side, not the value of \`${property}\` following the assignment. This may result in unexpected behaviour.
262
- https://svelte.dev/e/assignment_value_stale`, bold, normal);
263
- } else {
264
- console.warn(`https://svelte.dev/e/assignment_value_stale`);
265
- }
266
- }
267
- function await_reactivity_loss(name) {
268
- if (true_default) {
269
- console.warn(`%c[svelte] await_reactivity_loss
270
- %cDetected reactivity loss when reading \`${name}\`. This happens when state is read in an async function after an earlier \`await\`
271
- https://svelte.dev/e/await_reactivity_loss`, bold, normal);
272
- } else {
273
- console.warn(`https://svelte.dev/e/await_reactivity_loss`);
274
- }
275
- }
276
- function await_waterfall(name, location) {
277
- if (true_default) {
278
- console.warn(`%c[svelte] await_waterfall
279
- %cAn async derived, \`${name}\` (${location}) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app
280
- https://svelte.dev/e/await_waterfall`, bold, normal);
281
- } else {
282
- console.warn(`https://svelte.dev/e/await_waterfall`);
283
- }
284
- }
285
- function binding_property_non_reactive(binding, location) {
286
- if (true_default) {
287
- console.warn(`%c[svelte] binding_property_non_reactive
288
- %c${location ? `\`${binding}\` (${location}) is binding to a non-reactive property` : `\`${binding}\` is binding to a non-reactive property`}
289
- https://svelte.dev/e/binding_property_non_reactive`, bold, normal);
290
- } else {
291
- console.warn(`https://svelte.dev/e/binding_property_non_reactive`);
292
- }
293
- }
294
- function console_log_state(method) {
295
- if (true_default) {
296
- console.warn(`%c[svelte] console_log_state
297
- %cYour \`console.${method}\` contained \`$state\` proxies. Consider using \`$inspect(...)\` or \`$state.snapshot(...)\` instead
298
- https://svelte.dev/e/console_log_state`, bold, normal);
299
- } else {
300
- console.warn(`https://svelte.dev/e/console_log_state`);
301
- }
302
- }
303
- function event_handler_invalid(handler, suggestion) {
304
- if (true_default) {
305
- console.warn(`%c[svelte] event_handler_invalid
306
- %c${handler} should be a function. Did you mean to ${suggestion}?
307
- https://svelte.dev/e/event_handler_invalid`, bold, normal);
308
- } else {
309
- console.warn(`https://svelte.dev/e/event_handler_invalid`);
310
- }
311
- }
312
- function hydratable_missing_but_expected(key) {
313
- if (true_default) {
314
- console.warn(`%c[svelte] hydratable_missing_but_expected
315
- %cExpected to find a hydratable with key \`${key}\` during hydration, but did not.
316
- https://svelte.dev/e/hydratable_missing_but_expected`, bold, normal);
317
- } else {
318
- console.warn(`https://svelte.dev/e/hydratable_missing_but_expected`);
319
- }
320
- }
321
- function hydration_attribute_changed(attribute, html, value) {
322
- if (true_default) {
323
- console.warn(`%c[svelte] hydration_attribute_changed
324
- %cThe \`${attribute}\` attribute on \`${html}\` changed its value between server and client renders. The client value, \`${value}\`, will be ignored in favour of the server value
325
- https://svelte.dev/e/hydration_attribute_changed`, bold, normal);
326
- } else {
327
- console.warn(`https://svelte.dev/e/hydration_attribute_changed`);
328
- }
329
- }
330
- function hydration_html_changed(location) {
331
- if (true_default) {
332
- console.warn(`%c[svelte] hydration_html_changed
333
- %c${location ? `The value of an \`{@html ...}\` block ${location} changed between server and client renders. The client value will be ignored in favour of the server value` : "The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}
334
- https://svelte.dev/e/hydration_html_changed`, bold, normal);
335
- } else {
336
- console.warn(`https://svelte.dev/e/hydration_html_changed`);
337
- }
338
- }
339
- function hydration_mismatch(location) {
340
- if (true_default) {
341
- console.warn(`%c[svelte] hydration_mismatch
342
- %c${location ? `Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${location}` : "Hydration failed because the initial UI does not match what was rendered on the server"}
343
- https://svelte.dev/e/hydration_mismatch`, bold, normal);
344
- } else {
345
- console.warn(`https://svelte.dev/e/hydration_mismatch`);
346
- }
347
- }
348
- function invalid_raw_snippet_render() {
349
- if (true_default) {
350
- console.warn(`%c[svelte] invalid_raw_snippet_render
351
- %cThe \`render\` function passed to \`createRawSnippet\` should return HTML for a single element
352
- https://svelte.dev/e/invalid_raw_snippet_render`, bold, normal);
353
- } else {
354
- console.warn(`https://svelte.dev/e/invalid_raw_snippet_render`);
355
- }
356
- }
357
- function lifecycle_double_unmount() {
358
- if (true_default) {
359
- console.warn(`%c[svelte] lifecycle_double_unmount
360
- %cTried to unmount a component that was not mounted
361
- https://svelte.dev/e/lifecycle_double_unmount`, bold, normal);
362
- } else {
363
- console.warn(`https://svelte.dev/e/lifecycle_double_unmount`);
364
- }
365
- }
366
- function ownership_invalid_binding(parent, prop, child, owner) {
367
- if (true_default) {
368
- console.warn(`%c[svelte] ownership_invalid_binding
369
- %c${parent} passed property \`${prop}\` to ${child} with \`bind:\`, but its parent component ${owner} did not declare \`${prop}\` as a binding. Consider creating a binding between ${owner} and ${parent} (e.g. \`bind:${prop}={...}\` instead of \`${prop}={...}\`)
370
- https://svelte.dev/e/ownership_invalid_binding`, bold, normal);
371
- } else {
372
- console.warn(`https://svelte.dev/e/ownership_invalid_binding`);
373
- }
374
- }
375
- function ownership_invalid_mutation(name, location, prop, parent) {
376
- if (true_default) {
377
- console.warn(`%c[svelte] ownership_invalid_mutation
378
- %cMutating unbound props (\`${name}\`, at ${location}) is strongly discouraged. Consider using \`bind:${prop}={...}\` in ${parent} (or using a callback) instead
379
- https://svelte.dev/e/ownership_invalid_mutation`, bold, normal);
380
- } else {
381
- console.warn(`https://svelte.dev/e/ownership_invalid_mutation`);
382
- }
383
- }
384
- function select_multiple_invalid_value() {
385
- if (true_default) {
386
- console.warn(`%c[svelte] select_multiple_invalid_value
387
- %cThe \`value\` property of a \`<select multiple>\` element should be an array, but it received a non-array value. The selection will be kept as is.
388
- https://svelte.dev/e/select_multiple_invalid_value`, bold, normal);
389
- } else {
390
- console.warn(`https://svelte.dev/e/select_multiple_invalid_value`);
391
- }
392
- }
393
- function state_proxy_equality_mismatch(operator) {
394
- if (true_default) {
395
- console.warn(`%c[svelte] state_proxy_equality_mismatch
396
- %cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${operator}\` will produce unexpected results
397
- https://svelte.dev/e/state_proxy_equality_mismatch`, bold, normal);
398
- } else {
399
- console.warn(`https://svelte.dev/e/state_proxy_equality_mismatch`);
400
- }
401
- }
402
- function state_proxy_unmount() {
403
- if (true_default) {
404
- console.warn(`%c[svelte] state_proxy_unmount
405
- %cTried to unmount a state proxy, rather than a component
406
- https://svelte.dev/e/state_proxy_unmount`, bold, normal);
407
- } else {
408
- console.warn(`https://svelte.dev/e/state_proxy_unmount`);
409
- }
410
- }
411
- function svelte_boundary_reset_noop() {
412
- if (true_default) {
413
- console.warn(`%c[svelte] svelte_boundary_reset_noop
414
- %cA \`<svelte:boundary>\` \`reset\` function only resets the boundary the first time it is called
415
- https://svelte.dev/e/svelte_boundary_reset_noop`, bold, normal);
416
- } else {
417
- console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`);
418
- }
419
- }
420
-
421
- // node_modules/svelte/src/internal/client/errors.js
422
- function async_derived_orphan() {
423
- if (true_default) {
424
- const error = new Error(`async_derived_orphan
425
- Cannot create a \`$derived(...)\` with an \`await\` expression outside of an effect tree
426
- https://svelte.dev/e/async_derived_orphan`);
427
- error.name = "Svelte error";
428
- throw error;
429
- } else {
430
- throw new Error(`https://svelte.dev/e/async_derived_orphan`);
431
- }
432
- }
433
- function bind_invalid_checkbox_value() {
434
- if (true_default) {
435
- const error = new Error(`bind_invalid_checkbox_value
436
- Using \`bind:value\` together with a checkbox input is not allowed. Use \`bind:checked\` instead
437
- https://svelte.dev/e/bind_invalid_checkbox_value`);
438
- error.name = "Svelte error";
439
- throw error;
440
- } else {
441
- throw new Error(`https://svelte.dev/e/bind_invalid_checkbox_value`);
442
- }
443
- }
444
- function component_api_changed(method, component) {
445
- if (true_default) {
446
- const error = new Error(`component_api_changed
447
- Calling \`${method}\` on a component instance (of ${component}) is no longer valid in Svelte 5
448
- https://svelte.dev/e/component_api_changed`);
449
- error.name = "Svelte error";
450
- throw error;
451
- } else {
452
- throw new Error(`https://svelte.dev/e/component_api_changed`);
453
- }
454
- }
455
- function component_api_invalid_new(component, name) {
456
- if (true_default) {
457
- const error = new Error(`component_api_invalid_new
458
- Attempted to instantiate ${component} with \`new ${name}\`, which is no longer valid in Svelte 5. If this component is not under your control, set the \`compatibility.componentApi\` compiler option to \`4\` to keep it working.
459
- https://svelte.dev/e/component_api_invalid_new`);
460
- error.name = "Svelte error";
461
- throw error;
462
- } else {
463
- throw new Error(`https://svelte.dev/e/component_api_invalid_new`);
464
- }
465
- }
466
- function derived_references_self() {
467
- if (true_default) {
468
- const error = new Error(`derived_references_self
469
- A derived value cannot reference itself recursively
470
- https://svelte.dev/e/derived_references_self`);
471
- error.name = "Svelte error";
472
- throw error;
473
- } else {
474
- throw new Error(`https://svelte.dev/e/derived_references_self`);
475
- }
476
- }
477
- function each_key_duplicate(a, b, value) {
478
- if (true_default) {
479
- const error = new Error(`each_key_duplicate
480
- ${value ? `Keyed each block has duplicate key \`${value}\` at indexes ${a} and ${b}` : `Keyed each block has duplicate key at indexes ${a} and ${b}`}
481
- https://svelte.dev/e/each_key_duplicate`);
482
- error.name = "Svelte error";
483
- throw error;
484
- } else {
485
- throw new Error(`https://svelte.dev/e/each_key_duplicate`);
486
- }
487
- }
488
- function each_key_volatile(index, a, b) {
489
- if (true_default) {
490
- const error = new Error(`each_key_volatile
491
- Keyed each block has key that is not idempotent — the key for item at index ${index} was \`${a}\` but is now \`${b}\`. Keys must be the same each time for a given item
492
- https://svelte.dev/e/each_key_volatile`);
493
- error.name = "Svelte error";
494
- throw error;
495
- } else {
496
- throw new Error(`https://svelte.dev/e/each_key_volatile`);
497
- }
498
- }
499
- function effect_in_teardown(rune) {
500
- if (true_default) {
501
- const error = new Error(`effect_in_teardown
502
- \`${rune}\` cannot be used inside an effect cleanup function
503
- https://svelte.dev/e/effect_in_teardown`);
504
- error.name = "Svelte error";
505
- throw error;
506
- } else {
507
- throw new Error(`https://svelte.dev/e/effect_in_teardown`);
508
- }
509
- }
510
- function effect_in_unowned_derived() {
511
- if (true_default) {
512
- const error = new Error(`effect_in_unowned_derived
513
- Effect cannot be created inside a \`$derived\` value that was not itself created inside an effect
514
- https://svelte.dev/e/effect_in_unowned_derived`);
515
- error.name = "Svelte error";
516
- throw error;
517
- } else {
518
- throw new Error(`https://svelte.dev/e/effect_in_unowned_derived`);
519
- }
520
- }
521
- function effect_orphan(rune) {
522
- if (true_default) {
523
- const error = new Error(`effect_orphan
524
- \`${rune}\` can only be used inside an effect (e.g. during component initialisation)
525
- https://svelte.dev/e/effect_orphan`);
526
- error.name = "Svelte error";
527
- throw error;
528
- } else {
529
- throw new Error(`https://svelte.dev/e/effect_orphan`);
530
- }
531
- }
532
- function effect_pending_outside_reaction() {
533
- if (true_default) {
534
- const error = new Error(`effect_pending_outside_reaction
535
- \`$effect.pending()\` can only be called inside an effect or derived
536
- https://svelte.dev/e/effect_pending_outside_reaction`);
537
- error.name = "Svelte error";
538
- throw error;
539
- } else {
540
- throw new Error(`https://svelte.dev/e/effect_pending_outside_reaction`);
541
- }
542
- }
543
- function effect_update_depth_exceeded() {
544
- if (true_default) {
545
- const error = new Error(`effect_update_depth_exceeded
546
- Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
547
- https://svelte.dev/e/effect_update_depth_exceeded`);
548
- error.name = "Svelte error";
549
- throw error;
550
- } else {
551
- throw new Error(`https://svelte.dev/e/effect_update_depth_exceeded`);
552
- }
553
- }
554
- function fork_discarded() {
555
- if (true_default) {
556
- const error = new Error(`fork_discarded
557
- Cannot commit a fork that was already discarded
558
- https://svelte.dev/e/fork_discarded`);
559
- error.name = "Svelte error";
560
- throw error;
561
- } else {
562
- throw new Error(`https://svelte.dev/e/fork_discarded`);
563
- }
564
- }
565
- function fork_timing() {
566
- if (true_default) {
567
- const error = new Error(`fork_timing
568
- Cannot create a fork inside an effect or when state changes are pending
569
- https://svelte.dev/e/fork_timing`);
570
- error.name = "Svelte error";
571
- throw error;
572
- } else {
573
- throw new Error(`https://svelte.dev/e/fork_timing`);
574
- }
575
- }
576
- function get_abort_signal_outside_reaction() {
577
- if (true_default) {
578
- const error = new Error(`get_abort_signal_outside_reaction
579
- \`getAbortSignal()\` can only be called inside an effect or derived
580
- https://svelte.dev/e/get_abort_signal_outside_reaction`);
581
- error.name = "Svelte error";
582
- throw error;
583
- } else {
584
- throw new Error(`https://svelte.dev/e/get_abort_signal_outside_reaction`);
585
- }
586
- }
587
- function hydratable_missing_but_required(key) {
588
- if (true_default) {
589
- const error = new Error(`hydratable_missing_but_required
590
- Expected to find a hydratable with key \`${key}\` during hydration, but did not.
591
- https://svelte.dev/e/hydratable_missing_but_required`);
592
- error.name = "Svelte error";
593
- throw error;
594
- } else {
595
- throw new Error(`https://svelte.dev/e/hydratable_missing_but_required`);
596
- }
597
- }
598
- function hydration_failed() {
599
- if (true_default) {
600
- const error = new Error(`hydration_failed
601
- Failed to hydrate the application
602
- https://svelte.dev/e/hydration_failed`);
603
- error.name = "Svelte error";
604
- throw error;
605
- } else {
606
- throw new Error(`https://svelte.dev/e/hydration_failed`);
607
- }
608
- }
609
- function invalid_snippet() {
610
- if (true_default) {
611
- const error = new Error(`invalid_snippet
612
- Could not \`{@render}\` snippet due to the expression being \`null\` or \`undefined\`. Consider using optional chaining \`{@render snippet?.()}\`
613
- https://svelte.dev/e/invalid_snippet`);
614
- error.name = "Svelte error";
615
- throw error;
616
- } else {
617
- throw new Error(`https://svelte.dev/e/invalid_snippet`);
618
- }
619
- }
620
- function lifecycle_legacy_only(name) {
621
- if (true_default) {
622
- const error = new Error(`lifecycle_legacy_only
623
- \`${name}(...)\` cannot be used in runes mode
624
- https://svelte.dev/e/lifecycle_legacy_only`);
625
- error.name = "Svelte error";
626
- throw error;
627
- } else {
628
- throw new Error(`https://svelte.dev/e/lifecycle_legacy_only`);
629
- }
630
- }
631
- function props_invalid_value(key) {
632
- if (true_default) {
633
- const error = new Error(`props_invalid_value
634
- Cannot do \`bind:${key}={undefined}\` when \`${key}\` has a fallback value
635
- https://svelte.dev/e/props_invalid_value`);
636
- error.name = "Svelte error";
637
- throw error;
638
- } else {
639
- throw new Error(`https://svelte.dev/e/props_invalid_value`);
640
- }
641
- }
642
- function props_rest_readonly(property) {
643
- if (true_default) {
644
- const error = new Error(`props_rest_readonly
645
- Rest element properties of \`$props()\` such as \`${property}\` are readonly
646
- https://svelte.dev/e/props_rest_readonly`);
647
- error.name = "Svelte error";
648
- throw error;
649
- } else {
650
- throw new Error(`https://svelte.dev/e/props_rest_readonly`);
651
- }
652
- }
653
- function rune_outside_svelte(rune) {
654
- if (true_default) {
655
- const error = new Error(`rune_outside_svelte
656
- The \`${rune}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
657
- https://svelte.dev/e/rune_outside_svelte`);
658
- error.name = "Svelte error";
659
- throw error;
660
- } else {
661
- throw new Error(`https://svelte.dev/e/rune_outside_svelte`);
662
- }
663
- }
664
- function set_context_after_init() {
665
- if (true_default) {
666
- const error = new Error(`set_context_after_init
667
- \`setContext\` must be called when a component first initializes, not in a subsequent effect or after an \`await\` expression
668
- https://svelte.dev/e/set_context_after_init`);
669
- error.name = "Svelte error";
670
- throw error;
671
- } else {
672
- throw new Error(`https://svelte.dev/e/set_context_after_init`);
673
- }
674
- }
675
- function state_descriptors_fixed() {
676
- if (true_default) {
677
- const error = new Error(`state_descriptors_fixed
678
- Property descriptors defined on \`$state\` objects must contain \`value\` and always be \`enumerable\`, \`configurable\` and \`writable\`.
679
- https://svelte.dev/e/state_descriptors_fixed`);
680
- error.name = "Svelte error";
681
- throw error;
682
- } else {
683
- throw new Error(`https://svelte.dev/e/state_descriptors_fixed`);
684
- }
685
- }
686
- function state_prototype_fixed() {
687
- if (true_default) {
688
- const error = new Error(`state_prototype_fixed
689
- Cannot set prototype of \`$state\` object
690
- https://svelte.dev/e/state_prototype_fixed`);
691
- error.name = "Svelte error";
692
- throw error;
693
- } else {
694
- throw new Error(`https://svelte.dev/e/state_prototype_fixed`);
695
- }
696
- }
697
- function state_unsafe_mutation() {
698
- if (true_default) {
699
- const error = new Error(`state_unsafe_mutation
700
- Updating state inside \`$derived(...)\`, \`$inspect(...)\` or a template expression is forbidden. If the value should not be reactive, declare it without \`$state\`
701
- https://svelte.dev/e/state_unsafe_mutation`);
702
- error.name = "Svelte error";
703
- throw error;
704
- } else {
705
- throw new Error(`https://svelte.dev/e/state_unsafe_mutation`);
706
- }
707
- }
708
- function svelte_boundary_reset_onerror() {
709
- if (true_default) {
710
- const error = new Error(`svelte_boundary_reset_onerror
711
- A \`<svelte:boundary>\` \`reset\` function cannot be called while an error is still being handled
712
- https://svelte.dev/e/svelte_boundary_reset_onerror`);
713
- error.name = "Svelte error";
714
- throw error;
715
- } else {
716
- throw new Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`);
717
- }
718
- }
719
-
720
- // node_modules/svelte/src/internal/client/context.js
721
- var component_context = null;
722
- function set_component_context(context) {
723
- component_context = context;
724
- }
725
- var dev_stack = null;
726
- function set_dev_stack(stack) {
727
- dev_stack = stack;
728
- }
729
- function add_svelte_meta(callback, type, component, line, column, additional) {
730
- const parent = dev_stack;
731
- dev_stack = {
732
- type,
733
- file: component[FILENAME],
734
- line,
735
- column,
736
- parent,
737
- ...additional
738
- };
739
- try {
740
- return callback();
741
- } finally {
742
- dev_stack = parent;
743
- }
744
- }
745
- var dev_current_component_function = null;
746
- function set_dev_current_component_function(fn) {
747
- dev_current_component_function = fn;
748
- }
749
- function createContext() {
750
- const key = {};
751
- return [
752
- () => {
753
- if (!hasContext(key)) {
754
- missing_context();
755
- }
756
- return getContext(key);
757
- },
758
- (context) => setContext(key, context)
759
- ];
760
- }
761
- function getContext(key) {
762
- const context_map = get_or_init_context_map("getContext");
763
- const result = context_map.get(key);
764
- return result;
765
- }
766
- function setContext(key, context) {
767
- const context_map = get_or_init_context_map("setContext");
768
- if (async_mode_flag) {
769
- var flags = active_effect.f;
770
- var valid = !active_reaction && (flags & BRANCH_EFFECT) !== 0 && !component_context.i;
771
- if (!valid) {
772
- set_context_after_init();
773
- }
774
- }
775
- context_map.set(key, context);
776
- return context;
777
- }
778
- function hasContext(key) {
779
- const context_map = get_or_init_context_map("hasContext");
780
- return context_map.has(key);
781
- }
782
- function getAllContexts() {
783
- const context_map = get_or_init_context_map("getAllContexts");
784
- return context_map;
785
- }
786
- function push(props, runes = false, fn) {
787
- component_context = {
788
- p: component_context,
789
- i: false,
790
- c: null,
791
- e: null,
792
- s: props,
793
- x: null,
794
- r: active_effect,
795
- l: legacy_mode_flag && !runes ? { s: null, u: null, $: [] } : null
796
- };
797
- if (true_default) {
798
- component_context.function = fn;
799
- dev_current_component_function = fn;
800
- }
801
- }
802
- function pop(component) {
803
- var context = component_context;
804
- var effects = context.e;
805
- if (effects !== null) {
806
- context.e = null;
807
- for (var fn of effects) {
808
- create_user_effect(fn);
809
- }
810
- }
811
- if (component !== undefined) {
812
- context.x = component;
813
- }
814
- context.i = true;
815
- component_context = context.p;
816
- if (true_default) {
817
- dev_current_component_function = component_context?.function ?? null;
818
- }
819
- return component ?? {};
820
- }
821
- function is_runes() {
822
- return !legacy_mode_flag || component_context !== null && component_context.l === null;
823
- }
824
- function get_or_init_context_map(name) {
825
- if (component_context === null) {
826
- lifecycle_outside_component(name);
827
- }
828
- return component_context.c ??= new Map(get_parent_context(component_context) || undefined);
829
- }
830
- function get_parent_context(component_context2) {
831
- let parent = component_context2.p;
832
- while (parent !== null) {
833
- const context_map = parent.c;
834
- if (context_map !== null) {
835
- return context_map;
836
- }
837
- parent = parent.p;
838
- }
839
- return null;
840
- }
841
-
842
- // node_modules/svelte/src/internal/client/dom/task.js
843
- var micro_tasks = [];
844
- function run_micro_tasks() {
845
- var tasks = micro_tasks;
846
- micro_tasks = [];
847
- run_all(tasks);
848
- }
849
- function queue_micro_task(fn) {
850
- if (micro_tasks.length === 0 && !is_flushing_sync) {
851
- var tasks = micro_tasks;
852
- queueMicrotask(() => {
853
- if (tasks === micro_tasks)
854
- run_micro_tasks();
855
- });
856
- }
857
- micro_tasks.push(fn);
858
- }
859
- function flush_tasks() {
860
- while (micro_tasks.length > 0) {
861
- run_micro_tasks();
862
- }
863
- }
864
-
865
- // node_modules/svelte/src/internal/client/error-handling.js
866
- var adjustments = new WeakMap;
867
- function handle_error(error) {
868
- var effect = active_effect;
869
- if (effect === null) {
870
- active_reaction.f |= ERROR_VALUE;
871
- return error;
872
- }
873
- if (true_default && error instanceof Error && !adjustments.has(error)) {
874
- adjustments.set(error, get_adjustments(error, effect));
875
- }
876
- if ((effect.f & REACTION_RAN) === 0 && (effect.f & EFFECT) === 0) {
877
- if (true_default && !effect.parent && error instanceof Error) {
878
- apply_adjustments(error);
879
- }
880
- throw error;
881
- }
882
- invoke_error_boundary(error, effect);
883
- }
884
- function invoke_error_boundary(error, effect) {
885
- while (effect !== null) {
886
- if ((effect.f & BOUNDARY_EFFECT) !== 0) {
887
- if ((effect.f & REACTION_RAN) === 0) {
888
- throw error;
889
- }
890
- try {
891
- effect.b.error(error);
892
- return;
893
- } catch (e) {
894
- error = e;
895
- }
896
- }
897
- effect = effect.parent;
898
- }
899
- if (true_default && error instanceof Error) {
900
- apply_adjustments(error);
901
- }
902
- throw error;
903
- }
904
- function get_adjustments(error, effect) {
905
- const message_descriptor = get_descriptor(error, "message");
906
- if (message_descriptor && !message_descriptor.configurable)
907
- return;
908
- var indent = is_firefox ? " " : "\t";
909
- var component_stack = `
910
- ${indent}in ${effect.fn?.name || "<unknown>"}`;
911
- var context = effect.ctx;
912
- while (context !== null) {
913
- component_stack += `
914
- ${indent}in ${context.function?.[FILENAME].split("/").pop()}`;
915
- context = context.p;
916
- }
917
- return {
918
- message: error.message + `
919
- ${component_stack}
920
- `,
921
- stack: error.stack?.split(`
922
- `).filter((line) => !line.includes("svelte/src/internal")).join(`
923
- `)
924
- };
925
- }
926
- function apply_adjustments(error) {
927
- const adjusted = adjustments.get(error);
928
- if (adjusted) {
929
- define_property(error, "message", {
930
- value: adjusted.message
931
- });
932
- define_property(error, "stack", {
933
- value: adjusted.stack
934
- });
935
- }
936
- }
937
-
938
- // node_modules/svelte/src/internal/client/reactivity/equality.js
939
- function equals(value) {
940
- return value === this.v;
941
- }
942
- function safe_not_equal(a, b) {
943
- return a != a ? b == b : a !== b || a !== null && typeof a === "object" || typeof a === "function";
944
- }
945
- function safe_equals(value) {
946
- return !safe_not_equal(value, this.v);
947
- }
948
-
949
- // node_modules/svelte/src/internal/shared/warnings.js
950
- var bold2 = "font-weight: bold";
951
- var normal2 = "font-weight: normal";
952
- function dynamic_void_element_content(tag) {
953
- if (true_default) {
954
- console.warn(`%c[svelte] dynamic_void_element_content
955
- %c\`<svelte:element this="${tag}">\` is a void element — it cannot have content
956
- https://svelte.dev/e/dynamic_void_element_content`, bold2, normal2);
957
- } else {
958
- console.warn(`https://svelte.dev/e/dynamic_void_element_content`);
959
- }
960
- }
961
- function state_snapshot_uncloneable(properties) {
962
- if (true_default) {
963
- console.warn(`%c[svelte] state_snapshot_uncloneable
964
- %c${properties ? `The following properties cannot be cloned with \`$state.snapshot\` — the return value contains the originals:
965
-
966
- ${properties}` : "Value cannot be cloned with `$state.snapshot` — the original value was returned"}
967
- https://svelte.dev/e/state_snapshot_uncloneable`, bold2, normal2);
968
- } else {
969
- console.warn(`https://svelte.dev/e/state_snapshot_uncloneable`);
970
- }
971
- }
972
-
973
- // node_modules/svelte/src/internal/shared/clone.js
974
- var empty = [];
975
- function snapshot(value, skip_warning = false, no_tojson = false) {
976
- if (true_default && !skip_warning) {
977
- const paths = [];
978
- const copy = clone(value, new Map, "", paths, null, no_tojson);
979
- if (paths.length === 1 && paths[0] === "") {
980
- state_snapshot_uncloneable();
981
- } else if (paths.length > 0) {
982
- const slice = paths.length > 10 ? paths.slice(0, 7) : paths.slice(0, 10);
983
- const excess = paths.length - slice.length;
984
- let uncloned = slice.map((path) => `- <value>${path}`).join(`
985
- `);
986
- if (excess > 0)
987
- uncloned += `
988
- - ...and ${excess} more`;
989
- state_snapshot_uncloneable(uncloned);
990
- }
991
- return copy;
992
- }
993
- return clone(value, new Map, "", empty, null, no_tojson);
994
- }
995
- function clone(value, cloned, path, paths, original = null, no_tojson = false) {
996
- if (typeof value === "object" && value !== null) {
997
- var unwrapped = cloned.get(value);
998
- if (unwrapped !== undefined)
999
- return unwrapped;
1000
- if (value instanceof Map)
1001
- return new Map(value);
1002
- if (value instanceof Set)
1003
- return new Set(value);
1004
- if (is_array(value)) {
1005
- var copy = Array(value.length);
1006
- cloned.set(value, copy);
1007
- if (original !== null) {
1008
- cloned.set(original, copy);
1009
- }
1010
- for (var i = 0;i < value.length; i += 1) {
1011
- var element = value[i];
1012
- if (i in value) {
1013
- copy[i] = clone(element, cloned, true_default ? `${path}[${i}]` : path, paths, null, no_tojson);
1014
- }
1015
- }
1016
- return copy;
1017
- }
1018
- if (get_prototype_of(value) === object_prototype) {
1019
- copy = {};
1020
- cloned.set(value, copy);
1021
- if (original !== null) {
1022
- cloned.set(original, copy);
1023
- }
1024
- for (var key of Object.keys(value)) {
1025
- copy[key] = clone(value[key], cloned, true_default ? `${path}.${key}` : path, paths, null, no_tojson);
1026
- }
1027
- return copy;
1028
- }
1029
- if (value instanceof Date) {
1030
- return structuredClone(value);
1031
- }
1032
- if (typeof value.toJSON === "function" && !no_tojson) {
1033
- return clone(value.toJSON(), cloned, true_default ? `${path}.toJSON()` : path, paths, value);
1034
- }
1035
- }
1036
- if (value instanceof EventTarget) {
1037
- return value;
1038
- }
1039
- try {
1040
- return structuredClone(value);
1041
- } catch (e) {
1042
- if (true_default) {
1043
- paths.push(path);
1044
- }
1045
- return value;
1046
- }
1047
- }
1048
-
1049
- // node_modules/svelte/src/internal/client/dev/tracing.js
1050
- var tracing_expressions = null;
1051
- function log_entry(signal, entry) {
1052
- const value = signal.v;
1053
- if (value === UNINITIALIZED) {
1054
- return;
1055
- }
1056
- const type = get_type(signal);
1057
- const current_reaction = active_reaction;
1058
- const dirty = signal.wv > current_reaction.wv || current_reaction.wv === 0;
1059
- const style = dirty ? "color: CornflowerBlue; font-weight: bold" : "color: grey; font-weight: normal";
1060
- console.groupCollapsed(signal.label ? `%c${type}%c ${signal.label}` : `%c${type}%c`, style, dirty ? "font-weight: normal" : style, typeof value === "object" && value !== null && STATE_SYMBOL in value ? snapshot(value, true) : value);
1061
- if (type === "$derived") {
1062
- const deps = new Set(signal.deps);
1063
- for (const dep of deps) {
1064
- log_entry(dep);
1065
- }
1066
- }
1067
- if (signal.created) {
1068
- console.log(signal.created);
1069
- }
1070
- if (dirty && signal.updated) {
1071
- for (const updated of signal.updated.values()) {
1072
- if (updated.error) {
1073
- console.log(updated.error);
1074
- }
1075
- }
1076
- }
1077
- if (entry) {
1078
- for (var trace of entry.traces) {
1079
- console.log(trace);
1080
- }
1081
- }
1082
- console.groupEnd();
1083
- }
1084
- function get_type(signal) {
1085
- if ((signal.f & (DERIVED | ASYNC)) !== 0)
1086
- return "$derived";
1087
- return signal.label?.startsWith("$") ? "store" : "$state";
1088
- }
1089
- function trace(label, fn) {
1090
- var previously_tracing_expressions = tracing_expressions;
1091
- try {
1092
- tracing_expressions = { entries: new Map, reaction: active_reaction };
1093
- var start = performance.now();
1094
- var value = fn();
1095
- var time = (performance.now() - start).toFixed(2);
1096
- var prefix = untrack(label);
1097
- if (!effect_tracking()) {
1098
- console.log(`${prefix} %cran outside of an effect (${time}ms)`, "color: grey");
1099
- } else if (tracing_expressions.entries.size === 0) {
1100
- console.log(`${prefix} %cno reactive dependencies (${time}ms)`, "color: grey");
1101
- } else {
1102
- console.group(`${prefix} %c(${time}ms)`, "color: grey");
1103
- var entries = tracing_expressions.entries;
1104
- untrack(() => {
1105
- for (const [signal, traces] of entries) {
1106
- log_entry(signal, traces);
1107
- }
1108
- });
1109
- tracing_expressions = null;
1110
- console.groupEnd();
1111
- }
1112
- return value;
1113
- } finally {
1114
- tracing_expressions = previously_tracing_expressions;
1115
- }
1116
- }
1117
- function tag(source, label) {
1118
- source.label = label;
1119
- tag_proxy(source.v, label);
1120
- return source;
1121
- }
1122
- function tag_proxy(value, label) {
1123
- value?.[PROXY_PATH_SYMBOL]?.(label);
1124
- return value;
1125
- }
1126
-
1127
- // node_modules/svelte/src/internal/shared/dev.js
1128
- function get_error(label) {
1129
- const error = new Error;
1130
- const stack = get_stack();
1131
- if (stack.length === 0) {
1132
- return null;
1133
- }
1134
- stack.unshift(`
1135
- `);
1136
- define_property(error, "stack", {
1137
- value: stack.join(`
1138
- `)
1139
- });
1140
- define_property(error, "name", {
1141
- value: label
1142
- });
1143
- return error;
1144
- }
1145
- function get_stack() {
1146
- const limit = Error.stackTraceLimit;
1147
- Error.stackTraceLimit = Infinity;
1148
- const stack = new Error().stack;
1149
- Error.stackTraceLimit = limit;
1150
- if (!stack)
1151
- return [];
1152
- const lines = stack.split(`
1153
- `);
1154
- const new_lines = [];
1155
- for (let i = 0;i < lines.length; i++) {
1156
- const line = lines[i];
1157
- const posixified = line.replaceAll("\\", "/");
1158
- if (line.trim() === "Error") {
1159
- continue;
1160
- }
1161
- if (line.includes("validate_each_keys")) {
1162
- return [];
1163
- }
1164
- if (posixified.includes("svelte/src/internal") || posixified.includes("node_modules/.vite")) {
1165
- continue;
1166
- }
1167
- new_lines.push(line);
1168
- }
1169
- return new_lines;
1170
- }
1171
- function invariant(condition, message) {
1172
- if (!true_default) {
1173
- throw new Error("invariant(...) was not guarded by if (DEV)");
1174
- }
1175
- if (!condition)
1176
- invariant_violation(message);
1177
- }
1178
-
1179
- // node_modules/svelte/src/reactivity/create-subscriber.js
1180
- function createSubscriber(start) {
1181
- let subscribers = 0;
1182
- let version = source(0);
1183
- let stop;
1184
- if (true_default) {
1185
- tag(version, "createSubscriber version");
1186
- }
1187
- return () => {
1188
- if (effect_tracking()) {
1189
- get(version);
1190
- render_effect(() => {
1191
- if (subscribers === 0) {
1192
- stop = untrack(() => start(() => increment(version)));
1193
- }
1194
- subscribers += 1;
1195
- return () => {
1196
- queue_micro_task(() => {
1197
- subscribers -= 1;
1198
- if (subscribers === 0) {
1199
- stop?.();
1200
- stop = undefined;
1201
- increment(version);
1202
- }
1203
- });
1204
- };
1205
- });
1206
- }
1207
- };
1208
- }
1209
-
1210
- // node_modules/svelte/src/internal/client/reactivity/status.js
1211
- var STATUS_MASK = ~(DIRTY | MAYBE_DIRTY | CLEAN);
1212
- function set_signal_status(signal, status) {
1213
- signal.f = signal.f & STATUS_MASK | status;
1214
- }
1215
- function update_derived_status(derived) {
1216
- if ((derived.f & CONNECTED) !== 0 || derived.deps === null) {
1217
- set_signal_status(derived, CLEAN);
1218
- } else {
1219
- set_signal_status(derived, MAYBE_DIRTY);
1220
- }
1221
- }
1222
-
1223
- // node_modules/svelte/src/internal/client/reactivity/utils.js
1224
- function clear_marked(deps) {
1225
- if (deps === null)
1226
- return;
1227
- for (const dep of deps) {
1228
- if ((dep.f & DERIVED) === 0 || (dep.f & WAS_MARKED) === 0) {
1229
- continue;
1230
- }
1231
- dep.f ^= WAS_MARKED;
1232
- clear_marked(dep.deps);
1233
- }
1234
- }
1235
- function defer_effect(effect, dirty_effects, maybe_dirty_effects) {
1236
- if ((effect.f & DIRTY) !== 0) {
1237
- dirty_effects.add(effect);
1238
- } else if ((effect.f & MAYBE_DIRTY) !== 0) {
1239
- maybe_dirty_effects.add(effect);
1240
- }
1241
- clear_marked(effect.deps);
1242
- set_signal_status(effect, CLEAN);
1243
- }
1244
-
1245
- // node_modules/svelte/src/internal/client/dom/blocks/boundary.js
1246
- var flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED;
1247
- function boundary(node, props, children, transform_error) {
1248
- new Boundary(node, props, children, transform_error);
1249
- }
1250
-
1251
- class Boundary {
1252
- parent;
1253
- is_pending = false;
1254
- transform_error;
1255
- #anchor;
1256
- #hydrate_open = hydrating ? hydrate_node : null;
1257
- #props;
1258
- #children;
1259
- #effect;
1260
- #main_effect = null;
1261
- #pending_effect = null;
1262
- #failed_effect = null;
1263
- #offscreen_fragment = null;
1264
- #local_pending_count = 0;
1265
- #pending_count = 0;
1266
- #pending_count_update_queued = false;
1267
- #dirty_effects = new Set;
1268
- #maybe_dirty_effects = new Set;
1269
- #effect_pending = null;
1270
- #effect_pending_subscriber = createSubscriber(() => {
1271
- this.#effect_pending = source(this.#local_pending_count);
1272
- if (true_default) {
1273
- tag(this.#effect_pending, "$effect.pending()");
1274
- }
1275
- return () => {
1276
- this.#effect_pending = null;
1277
- };
1278
- });
1279
- constructor(node, props, children, transform_error) {
1280
- this.#anchor = node;
1281
- this.#props = props;
1282
- this.#children = (anchor) => {
1283
- var effect = active_effect;
1284
- effect.b = this;
1285
- effect.f |= BOUNDARY_EFFECT;
1286
- children(anchor);
1287
- };
1288
- this.parent = active_effect.b;
1289
- this.transform_error = transform_error ?? this.parent?.transform_error ?? ((e) => e);
1290
- this.#effect = block(() => {
1291
- if (hydrating) {
1292
- const comment = this.#hydrate_open;
1293
- hydrate_next();
1294
- const server_rendered_pending = comment.data === HYDRATION_START_ELSE;
1295
- const server_rendered_failed = comment.data.startsWith(HYDRATION_START_FAILED);
1296
- if (server_rendered_failed) {
1297
- const serialized_error = JSON.parse(comment.data.slice(HYDRATION_START_FAILED.length));
1298
- this.#hydrate_failed_content(serialized_error);
1299
- } else if (server_rendered_pending) {
1300
- this.#hydrate_pending_content();
1301
- } else {
1302
- this.#hydrate_resolved_content();
1303
- }
1304
- } else {
1305
- this.#render();
1306
- }
1307
- }, flags);
1308
- if (hydrating) {
1309
- this.#anchor = hydrate_node;
1310
- }
1311
- }
1312
- #hydrate_resolved_content() {
1313
- try {
1314
- this.#main_effect = branch(() => this.#children(this.#anchor));
1315
- } catch (error) {
1316
- this.error(error);
1317
- }
1318
- }
1319
- #hydrate_failed_content(error) {
1320
- const failed = this.#props.failed;
1321
- if (!failed)
1322
- return;
1323
- this.#failed_effect = branch(() => {
1324
- failed(this.#anchor, () => error, () => () => {});
1325
- });
1326
- }
1327
- #hydrate_pending_content() {
1328
- const pending = this.#props.pending;
1329
- if (!pending)
1330
- return;
1331
- this.is_pending = true;
1332
- this.#pending_effect = branch(() => pending(this.#anchor));
1333
- queue_micro_task(() => {
1334
- var fragment = this.#offscreen_fragment = document.createDocumentFragment();
1335
- var anchor = create_text();
1336
- fragment.append(anchor);
1337
- this.#main_effect = this.#run(() => {
1338
- return branch(() => this.#children(anchor));
1339
- });
1340
- if (this.#pending_count === 0) {
1341
- this.#anchor.before(fragment);
1342
- this.#offscreen_fragment = null;
1343
- pause_effect(this.#pending_effect, () => {
1344
- this.#pending_effect = null;
1345
- });
1346
- this.#resolve(current_batch);
1347
- }
1348
- });
1349
- }
1350
- #render() {
1351
- try {
1352
- this.is_pending = this.has_pending_snippet();
1353
- this.#pending_count = 0;
1354
- this.#local_pending_count = 0;
1355
- this.#main_effect = branch(() => {
1356
- this.#children(this.#anchor);
1357
- });
1358
- if (this.#pending_count > 0) {
1359
- var fragment = this.#offscreen_fragment = document.createDocumentFragment();
1360
- move_effect(this.#main_effect, fragment);
1361
- const pending = this.#props.pending;
1362
- this.#pending_effect = branch(() => pending(this.#anchor));
1363
- } else {
1364
- this.#resolve(current_batch);
1365
- }
1366
- } catch (error) {
1367
- this.error(error);
1368
- }
1369
- }
1370
- #resolve(batch) {
1371
- this.is_pending = false;
1372
- batch.transfer_effects(this.#dirty_effects, this.#maybe_dirty_effects);
1373
- }
1374
- defer_effect(effect) {
1375
- defer_effect(effect, this.#dirty_effects, this.#maybe_dirty_effects);
1376
- }
1377
- is_rendered() {
1378
- return !this.is_pending && (!this.parent || this.parent.is_rendered());
1379
- }
1380
- has_pending_snippet() {
1381
- return !!this.#props.pending;
1382
- }
1383
- #run(fn) {
1384
- var previous_effect = active_effect;
1385
- var previous_reaction = active_reaction;
1386
- var previous_ctx = component_context;
1387
- set_active_effect(this.#effect);
1388
- set_active_reaction(this.#effect);
1389
- set_component_context(this.#effect.ctx);
1390
- try {
1391
- Batch.ensure();
1392
- return fn();
1393
- } catch (e) {
1394
- handle_error(e);
1395
- return null;
1396
- } finally {
1397
- set_active_effect(previous_effect);
1398
- set_active_reaction(previous_reaction);
1399
- set_component_context(previous_ctx);
1400
- }
1401
- }
1402
- #update_pending_count(d, batch) {
1403
- if (!this.has_pending_snippet()) {
1404
- if (this.parent) {
1405
- this.parent.#update_pending_count(d, batch);
1406
- }
1407
- return;
1408
- }
1409
- this.#pending_count += d;
1410
- if (this.#pending_count === 0) {
1411
- this.#resolve(batch);
1412
- if (this.#pending_effect) {
1413
- pause_effect(this.#pending_effect, () => {
1414
- this.#pending_effect = null;
1415
- });
1416
- }
1417
- if (this.#offscreen_fragment) {
1418
- this.#anchor.before(this.#offscreen_fragment);
1419
- this.#offscreen_fragment = null;
1420
- }
1421
- }
1422
- }
1423
- update_pending_count(d, batch) {
1424
- this.#update_pending_count(d, batch);
1425
- this.#local_pending_count += d;
1426
- if (!this.#effect_pending || this.#pending_count_update_queued)
1427
- return;
1428
- this.#pending_count_update_queued = true;
1429
- queue_micro_task(() => {
1430
- this.#pending_count_update_queued = false;
1431
- if (this.#effect_pending) {
1432
- internal_set(this.#effect_pending, this.#local_pending_count);
1433
- }
1434
- });
1435
- }
1436
- get_effect_pending() {
1437
- this.#effect_pending_subscriber();
1438
- return get(this.#effect_pending);
1439
- }
1440
- error(error) {
1441
- var onerror = this.#props.onerror;
1442
- let failed = this.#props.failed;
1443
- if (!onerror && !failed) {
1444
- throw error;
1445
- }
1446
- if (this.#main_effect) {
1447
- destroy_effect(this.#main_effect);
1448
- this.#main_effect = null;
1449
- }
1450
- if (this.#pending_effect) {
1451
- destroy_effect(this.#pending_effect);
1452
- this.#pending_effect = null;
1453
- }
1454
- if (this.#failed_effect) {
1455
- destroy_effect(this.#failed_effect);
1456
- this.#failed_effect = null;
1457
- }
1458
- if (hydrating) {
1459
- set_hydrate_node(this.#hydrate_open);
1460
- next();
1461
- set_hydrate_node(skip_nodes());
1462
- }
1463
- var did_reset = false;
1464
- var calling_on_error = false;
1465
- const reset = () => {
1466
- if (did_reset) {
1467
- svelte_boundary_reset_noop();
1468
- return;
1469
- }
1470
- did_reset = true;
1471
- if (calling_on_error) {
1472
- svelte_boundary_reset_onerror();
1473
- }
1474
- if (this.#failed_effect !== null) {
1475
- pause_effect(this.#failed_effect, () => {
1476
- this.#failed_effect = null;
1477
- });
1478
- }
1479
- this.#run(() => {
1480
- this.#render();
1481
- });
1482
- };
1483
- const handle_error_result = (transformed_error) => {
1484
- try {
1485
- calling_on_error = true;
1486
- onerror?.(transformed_error, reset);
1487
- calling_on_error = false;
1488
- } catch (error2) {
1489
- invoke_error_boundary(error2, this.#effect && this.#effect.parent);
1490
- }
1491
- if (failed) {
1492
- this.#failed_effect = this.#run(() => {
1493
- try {
1494
- return branch(() => {
1495
- var effect = active_effect;
1496
- effect.b = this;
1497
- effect.f |= BOUNDARY_EFFECT;
1498
- failed(this.#anchor, () => transformed_error, () => reset);
1499
- });
1500
- } catch (error2) {
1501
- invoke_error_boundary(error2, this.#effect.parent);
1502
- return null;
1503
- }
1504
- });
1505
- }
1506
- };
1507
- queue_micro_task(() => {
1508
- var result;
1509
- try {
1510
- result = this.transform_error(error);
1511
- } catch (e) {
1512
- invoke_error_boundary(e, this.#effect && this.#effect.parent);
1513
- return;
1514
- }
1515
- if (result !== null && typeof result === "object" && typeof result.then === "function") {
1516
- result.then(handle_error_result, (e) => invoke_error_boundary(e, this.#effect && this.#effect.parent));
1517
- } else {
1518
- handle_error_result(result);
1519
- }
1520
- });
1521
- }
1522
- }
1523
- function pending() {
1524
- if (active_effect === null) {
1525
- effect_pending_outside_reaction();
1526
- }
1527
- var boundary2 = active_effect.b;
1528
- if (boundary2 === null) {
1529
- return 0;
1530
- }
1531
- return boundary2.get_effect_pending();
1532
- }
1533
-
1534
- // node_modules/svelte/src/internal/client/reactivity/async.js
1535
- function flatten(blockers, sync, async, fn) {
1536
- const d = is_runes() ? derived : derived_safe_equal;
1537
- var pending2 = blockers.filter((b) => !b.settled);
1538
- if (async.length === 0 && pending2.length === 0) {
1539
- fn(sync.map(d));
1540
- return;
1541
- }
1542
- var parent = active_effect;
1543
- var restore = capture();
1544
- var blocker_promise = pending2.length === 1 ? pending2[0].promise : pending2.length > 1 ? Promise.all(pending2.map((b) => b.promise)) : null;
1545
- function finish(values) {
1546
- restore();
1547
- try {
1548
- fn(values);
1549
- } catch (error) {
1550
- if ((parent.f & DESTROYED) === 0) {
1551
- invoke_error_boundary(error, parent);
1552
- }
1553
- }
1554
- unset_context();
1555
- }
1556
- if (async.length === 0) {
1557
- blocker_promise.then(() => finish(sync.map(d)));
1558
- return;
1559
- }
1560
- var decrement_pending = increment_pending();
1561
- function run2() {
1562
- Promise.all(async.map((expression) => async_derived(expression))).then((result) => finish([...sync.map(d), ...result])).catch((error) => invoke_error_boundary(error, parent)).finally(() => decrement_pending());
1563
- }
1564
- if (blocker_promise) {
1565
- blocker_promise.then(() => {
1566
- restore();
1567
- run2();
1568
- unset_context();
1569
- });
1570
- } else {
1571
- run2();
1572
- }
1573
- }
1574
- function run_after_blockers(blockers, fn) {
1575
- flatten(blockers, [], [], fn);
1576
- }
1577
- function capture() {
1578
- var previous_effect = active_effect;
1579
- var previous_reaction = active_reaction;
1580
- var previous_component_context = component_context;
1581
- var previous_batch = current_batch;
1582
- if (true_default) {
1583
- var previous_dev_stack = dev_stack;
1584
- }
1585
- return function restore(activate_batch = true) {
1586
- set_active_effect(previous_effect);
1587
- set_active_reaction(previous_reaction);
1588
- set_component_context(previous_component_context);
1589
- if (activate_batch && (previous_effect.f & DESTROYED) === 0) {
1590
- previous_batch?.activate();
1591
- previous_batch?.apply();
1592
- }
1593
- if (true_default) {
1594
- set_reactivity_loss_tracker(null);
1595
- set_dev_stack(previous_dev_stack);
1596
- }
1597
- };
1598
- }
1599
- async function save(promise) {
1600
- var restore = capture();
1601
- var value = await promise;
1602
- return () => {
1603
- restore();
1604
- return value;
1605
- };
1606
- }
1607
- async function track_reactivity_loss(promise) {
1608
- var previous_async_effect = reactivity_loss_tracker;
1609
- var value = await promise;
1610
- return () => {
1611
- set_reactivity_loss_tracker(previous_async_effect);
1612
- return value;
1613
- };
1614
- }
1615
- async function* for_await_track_reactivity_loss(iterable) {
1616
- const iterator = iterable[Symbol.asyncIterator]?.() ?? iterable[Symbol.iterator]?.();
1617
- if (iterator === undefined) {
1618
- throw new TypeError("value is not async iterable");
1619
- }
1620
- let normal_completion = false;
1621
- try {
1622
- while (true) {
1623
- const { done, value } = (await track_reactivity_loss(iterator.next()))();
1624
- if (done) {
1625
- normal_completion = true;
1626
- break;
1627
- }
1628
- yield value;
1629
- }
1630
- } finally {
1631
- if (!normal_completion && iterator.return !== undefined) {
1632
- return (await track_reactivity_loss(iterator.return()))().value;
1633
- }
1634
- }
1635
- }
1636
- function unset_context(deactivate_batch = true) {
1637
- set_active_effect(null);
1638
- set_active_reaction(null);
1639
- set_component_context(null);
1640
- if (deactivate_batch)
1641
- current_batch?.deactivate();
1642
- if (true_default) {
1643
- set_reactivity_loss_tracker(null);
1644
- set_dev_stack(null);
1645
- }
1646
- }
1647
- function run2(thunks) {
1648
- const restore = capture();
1649
- const decrement_pending = increment_pending();
1650
- var active = active_effect;
1651
- var errored = null;
1652
- const handle_error2 = (error) => {
1653
- errored = { error };
1654
- if (!aborted(active)) {
1655
- invoke_error_boundary(error, active);
1656
- }
1657
- };
1658
- var promise = Promise.resolve(thunks[0]()).catch(handle_error2);
1659
- var blocker = { promise, settled: false };
1660
- var blockers = [blocker];
1661
- promise.finally(() => {
1662
- blocker.settled = true;
1663
- unset_context();
1664
- });
1665
- for (const fn of thunks.slice(1)) {
1666
- promise = promise.then(() => {
1667
- if (errored) {
1668
- throw errored.error;
1669
- }
1670
- if (aborted(active)) {
1671
- throw STALE_REACTION;
1672
- }
1673
- restore();
1674
- return fn();
1675
- }).catch(handle_error2);
1676
- const blocker2 = { promise, settled: false };
1677
- blockers.push(blocker2);
1678
- promise.finally(() => {
1679
- blocker2.settled = true;
1680
- unset_context();
1681
- });
1682
- }
1683
- promise.then(() => Promise.resolve()).finally(() => decrement_pending());
1684
- return blockers;
1685
- }
1686
- function wait(blockers) {
1687
- return Promise.all(blockers.map((b) => b.promise));
1688
- }
1689
- function increment_pending() {
1690
- var effect = active_effect;
1691
- var boundary2 = effect.b;
1692
- var batch = current_batch;
1693
- var blocking = boundary2.is_rendered();
1694
- boundary2.update_pending_count(1, batch);
1695
- batch.increment(blocking, effect);
1696
- return (skip = false) => {
1697
- boundary2.update_pending_count(-1, batch);
1698
- batch.decrement(blocking, effect, skip);
1699
- };
1700
- }
1701
-
1702
- // node_modules/svelte/src/internal/client/reactivity/deriveds.js
1703
- var reactivity_loss_tracker = null;
1704
- function set_reactivity_loss_tracker(v) {
1705
- reactivity_loss_tracker = v;
1706
- }
1707
- var recent_async_deriveds = new Set;
1708
- function derived(fn) {
1709
- var flags2 = DERIVED | DIRTY;
1710
- var parent_derived = active_reaction !== null && (active_reaction.f & DERIVED) !== 0 ? active_reaction : null;
1711
- if (active_effect !== null) {
1712
- active_effect.f |= EFFECT_PRESERVED;
1713
- }
1714
- const signal = {
1715
- ctx: component_context,
1716
- deps: null,
1717
- effects: null,
1718
- equals,
1719
- f: flags2,
1720
- fn,
1721
- reactions: null,
1722
- rv: 0,
1723
- v: UNINITIALIZED,
1724
- wv: 0,
1725
- parent: parent_derived ?? active_effect,
1726
- ac: null
1727
- };
1728
- if (true_default && tracing_mode_flag) {
1729
- signal.created = get_error("created at");
1730
- }
1731
- return signal;
1732
- }
1733
- function async_derived(fn, label, location) {
1734
- let parent = active_effect;
1735
- if (parent === null) {
1736
- async_derived_orphan();
1737
- }
1738
- var promise = undefined;
1739
- var signal = source(UNINITIALIZED);
1740
- if (true_default)
1741
- signal.label = label;
1742
- var should_suspend = !active_reaction;
1743
- var deferreds = new Map;
1744
- async_effect(() => {
1745
- if (true_default) {
1746
- reactivity_loss_tracker = {
1747
- effect: active_effect,
1748
- warned: false
1749
- };
1750
- }
1751
- var effect = active_effect;
1752
- var d = deferred();
1753
- promise = d.promise;
1754
- try {
1755
- Promise.resolve(fn()).then(d.resolve, d.reject).finally(unset_context);
1756
- } catch (error) {
1757
- d.reject(error);
1758
- unset_context();
1759
- }
1760
- if (true_default) {
1761
- reactivity_loss_tracker = null;
1762
- }
1763
- var batch = current_batch;
1764
- if (should_suspend) {
1765
- if ((effect.f & REACTION_RAN) !== 0) {
1766
- var decrement_pending = increment_pending();
1767
- }
1768
- if (parent.b.is_rendered()) {
1769
- deferreds.get(batch)?.reject(STALE_REACTION);
1770
- deferreds.delete(batch);
1771
- } else {
1772
- for (const d2 of deferreds.values()) {
1773
- d2.reject(STALE_REACTION);
1774
- }
1775
- deferreds.clear();
1776
- }
1777
- deferreds.set(batch, d);
1778
- }
1779
- const handler = (value, error = undefined) => {
1780
- if (true_default) {
1781
- reactivity_loss_tracker = null;
1782
- }
1783
- if (decrement_pending) {
1784
- var skip = error === STALE_REACTION;
1785
- decrement_pending(skip);
1786
- }
1787
- if (error === STALE_REACTION || (effect.f & DESTROYED) !== 0) {
1788
- return;
1789
- }
1790
- batch.activate();
1791
- if (error) {
1792
- signal.f |= ERROR_VALUE;
1793
- internal_set(signal, error);
1794
- } else {
1795
- if ((signal.f & ERROR_VALUE) !== 0) {
1796
- signal.f ^= ERROR_VALUE;
1797
- }
1798
- internal_set(signal, value);
1799
- for (const [b, d2] of deferreds) {
1800
- deferreds.delete(b);
1801
- if (b === batch)
1802
- break;
1803
- d2.reject(STALE_REACTION);
1804
- }
1805
- if (true_default && location !== undefined) {
1806
- recent_async_deriveds.add(signal);
1807
- setTimeout(() => {
1808
- if (recent_async_deriveds.has(signal)) {
1809
- await_waterfall(signal.label, location);
1810
- recent_async_deriveds.delete(signal);
1811
- }
1812
- });
1813
- }
1814
- }
1815
- batch.deactivate();
1816
- };
1817
- d.promise.then(handler, (e) => handler(null, e || "unknown"));
1818
- });
1819
- teardown(() => {
1820
- for (const d of deferreds.values()) {
1821
- d.reject(STALE_REACTION);
1822
- }
1823
- });
1824
- if (true_default) {
1825
- signal.f |= ASYNC;
1826
- }
1827
- return new Promise((fulfil) => {
1828
- function next2(p) {
1829
- function go() {
1830
- if (p === promise) {
1831
- fulfil(signal);
1832
- } else {
1833
- next2(promise);
1834
- }
1835
- }
1836
- p.then(go, go);
1837
- }
1838
- next2(promise);
1839
- });
1840
- }
1841
- function user_derived(fn) {
1842
- const d = derived(fn);
1843
- if (!async_mode_flag)
1844
- push_reaction_value(d);
1845
- return d;
1846
- }
1847
- function derived_safe_equal(fn) {
1848
- const signal = derived(fn);
1849
- signal.equals = safe_equals;
1850
- return signal;
1851
- }
1852
- function destroy_derived_effects(derived2) {
1853
- var effects = derived2.effects;
1854
- if (effects !== null) {
1855
- derived2.effects = null;
1856
- for (var i = 0;i < effects.length; i += 1) {
1857
- destroy_effect(effects[i]);
1858
- }
1859
- }
1860
- }
1861
- var stack = [];
1862
- function get_derived_parent_effect(derived2) {
1863
- var parent = derived2.parent;
1864
- while (parent !== null) {
1865
- if ((parent.f & DERIVED) === 0) {
1866
- return (parent.f & DESTROYED) === 0 ? parent : null;
1867
- }
1868
- parent = parent.parent;
1869
- }
1870
- return null;
1871
- }
1872
- function execute_derived(derived2) {
1873
- var value;
1874
- var prev_active_effect = active_effect;
1875
- set_active_effect(get_derived_parent_effect(derived2));
1876
- if (true_default) {
1877
- let prev_eager_effects = eager_effects;
1878
- set_eager_effects(new Set);
1879
- try {
1880
- if (includes.call(stack, derived2)) {
1881
- derived_references_self();
1882
- }
1883
- stack.push(derived2);
1884
- derived2.f &= ~WAS_MARKED;
1885
- destroy_derived_effects(derived2);
1886
- value = update_reaction(derived2);
1887
- } finally {
1888
- set_active_effect(prev_active_effect);
1889
- set_eager_effects(prev_eager_effects);
1890
- stack.pop();
1891
- }
1892
- } else {
1893
- try {
1894
- derived2.f &= ~WAS_MARKED;
1895
- destroy_derived_effects(derived2);
1896
- value = update_reaction(derived2);
1897
- } finally {
1898
- set_active_effect(prev_active_effect);
1899
- }
1900
- }
1901
- return value;
1902
- }
1903
- function update_derived(derived2) {
1904
- var old_value = derived2.v;
1905
- var value = execute_derived(derived2);
1906
- if (!derived2.equals(value)) {
1907
- derived2.wv = increment_write_version();
1908
- if (!current_batch?.is_fork || derived2.deps === null) {
1909
- derived2.v = value;
1910
- current_batch?.capture(derived2, old_value, true);
1911
- if (derived2.deps === null) {
1912
- set_signal_status(derived2, CLEAN);
1913
- return;
1914
- }
1915
- }
1916
- }
1917
- if (is_destroying_effect) {
1918
- return;
1919
- }
1920
- if (batch_values !== null) {
1921
- if (effect_tracking() || current_batch?.is_fork) {
1922
- batch_values.set(derived2, value);
1923
- }
1924
- } else {
1925
- update_derived_status(derived2);
1926
- }
1927
- }
1928
- function freeze_derived_effects(derived2) {
1929
- if (derived2.effects === null)
1930
- return;
1931
- for (const e of derived2.effects) {
1932
- if (e.teardown || e.ac) {
1933
- e.teardown?.();
1934
- e.ac?.abort(STALE_REACTION);
1935
- e.teardown = noop;
1936
- e.ac = null;
1937
- remove_reactions(e, 0);
1938
- destroy_effect_children(e);
1939
- }
1940
- }
1941
- }
1942
- function unfreeze_derived_effects(derived2) {
1943
- if (derived2.effects === null)
1944
- return;
1945
- for (const e of derived2.effects) {
1946
- if (e.teardown) {
1947
- update_effect(e);
1948
- }
1949
- }
1950
- }
1951
-
1952
- // node_modules/svelte/src/internal/client/reactivity/sources.js
1953
- var eager_effects = new Set;
1954
- var old_values = new Map;
1955
- function set_eager_effects(v) {
1956
- eager_effects = v;
1957
- }
1958
- var eager_effects_deferred = false;
1959
- function set_eager_effects_deferred() {
1960
- eager_effects_deferred = true;
1961
- }
1962
- function source(v, stack2) {
1963
- var signal = {
1964
- f: 0,
1965
- v,
1966
- reactions: null,
1967
- equals,
1968
- rv: 0,
1969
- wv: 0
1970
- };
1971
- if (true_default && tracing_mode_flag) {
1972
- signal.created = stack2 ?? get_error("created at");
1973
- signal.updated = null;
1974
- signal.set_during_effect = false;
1975
- signal.trace = null;
1976
- }
1977
- return signal;
1978
- }
1979
- function state(v, stack2) {
1980
- const s = source(v, stack2);
1981
- push_reaction_value(s);
1982
- return s;
1983
- }
1984
- function mutable_source(initial_value, immutable = false, trackable = true) {
1985
- const s = source(initial_value);
1986
- if (!immutable) {
1987
- s.equals = safe_equals;
1988
- }
1989
- if (legacy_mode_flag && trackable && component_context !== null && component_context.l !== null) {
1990
- (component_context.l.s ??= []).push(s);
1991
- }
1992
- return s;
1993
- }
1994
- function mutate(source2, value) {
1995
- set(source2, untrack(() => get(source2)));
1996
- return value;
1997
- }
1998
- function set(source2, value, should_proxy = false) {
1999
- if (active_reaction !== null && (!untracking || (active_reaction.f & EAGER_EFFECT) !== 0) && is_runes() && (active_reaction.f & (DERIVED | BLOCK_EFFECT | ASYNC | EAGER_EFFECT)) !== 0 && (current_sources === null || !includes.call(current_sources, source2))) {
2000
- state_unsafe_mutation();
2001
- }
2002
- let new_value = should_proxy ? proxy(value) : value;
2003
- if (true_default) {
2004
- tag_proxy(new_value, source2.label);
2005
- }
2006
- return internal_set(source2, new_value, legacy_updates);
2007
- }
2008
- function internal_set(source2, value, updated_during_traversal = null) {
2009
- if (!source2.equals(value)) {
2010
- var old_value = source2.v;
2011
- if (is_destroying_effect) {
2012
- old_values.set(source2, value);
2013
- } else {
2014
- old_values.set(source2, old_value);
2015
- }
2016
- source2.v = value;
2017
- var batch = Batch.ensure();
2018
- batch.capture(source2, old_value);
2019
- if (true_default) {
2020
- if (tracing_mode_flag || active_effect !== null) {
2021
- source2.updated ??= new Map;
2022
- const count = (source2.updated.get("")?.count ?? 0) + 1;
2023
- source2.updated.set("", { error: null, count });
2024
- if (tracing_mode_flag || count > 5) {
2025
- const error = get_error("updated at");
2026
- if (error !== null) {
2027
- let entry = source2.updated.get(error.stack);
2028
- if (!entry) {
2029
- entry = { error, count: 0 };
2030
- source2.updated.set(error.stack, entry);
2031
- }
2032
- entry.count++;
2033
- }
2034
- }
2035
- }
2036
- if (active_effect !== null) {
2037
- source2.set_during_effect = true;
2038
- }
2039
- }
2040
- if ((source2.f & DERIVED) !== 0) {
2041
- const derived2 = source2;
2042
- if ((source2.f & DIRTY) !== 0) {
2043
- execute_derived(derived2);
2044
- }
2045
- if (batch_values === null) {
2046
- update_derived_status(derived2);
2047
- }
2048
- }
2049
- source2.wv = increment_write_version();
2050
- mark_reactions(source2, DIRTY, updated_during_traversal);
2051
- if (is_runes() && active_effect !== null && (active_effect.f & CLEAN) !== 0 && (active_effect.f & (BRANCH_EFFECT | ROOT_EFFECT)) === 0) {
2052
- if (untracked_writes === null) {
2053
- set_untracked_writes([source2]);
2054
- } else {
2055
- untracked_writes.push(source2);
2056
- }
2057
- }
2058
- if (!batch.is_fork && eager_effects.size > 0 && !eager_effects_deferred) {
2059
- flush_eager_effects();
2060
- }
2061
- }
2062
- return value;
2063
- }
2064
- function flush_eager_effects() {
2065
- eager_effects_deferred = false;
2066
- for (const effect of eager_effects) {
2067
- if ((effect.f & CLEAN) !== 0) {
2068
- set_signal_status(effect, MAYBE_DIRTY);
2069
- }
2070
- if (is_dirty(effect)) {
2071
- update_effect(effect);
2072
- }
2073
- }
2074
- eager_effects.clear();
2075
- }
2076
- function update(source2, d = 1) {
2077
- var value = get(source2);
2078
- var result = d === 1 ? value++ : value--;
2079
- set(source2, value);
2080
- return result;
2081
- }
2082
- function update_pre(source2, d = 1) {
2083
- var value = get(source2);
2084
- return set(source2, d === 1 ? ++value : --value);
2085
- }
2086
- function increment(source2) {
2087
- set(source2, source2.v + 1);
2088
- }
2089
- function mark_reactions(signal, status, updated_during_traversal) {
2090
- var reactions = signal.reactions;
2091
- if (reactions === null)
2092
- return;
2093
- var runes = is_runes();
2094
- var length = reactions.length;
2095
- for (var i = 0;i < length; i++) {
2096
- var reaction = reactions[i];
2097
- var flags2 = reaction.f;
2098
- if (!runes && reaction === active_effect)
2099
- continue;
2100
- if (true_default && (flags2 & EAGER_EFFECT) !== 0) {
2101
- eager_effects.add(reaction);
2102
- continue;
2103
- }
2104
- var not_dirty = (flags2 & DIRTY) === 0;
2105
- if (not_dirty) {
2106
- set_signal_status(reaction, status);
2107
- }
2108
- if ((flags2 & DERIVED) !== 0) {
2109
- var derived2 = reaction;
2110
- batch_values?.delete(derived2);
2111
- if ((flags2 & WAS_MARKED) === 0) {
2112
- if (flags2 & CONNECTED) {
2113
- reaction.f |= WAS_MARKED;
2114
- }
2115
- mark_reactions(derived2, MAYBE_DIRTY, updated_during_traversal);
2116
- }
2117
- } else if (not_dirty) {
2118
- var effect = reaction;
2119
- if ((flags2 & BLOCK_EFFECT) !== 0 && eager_block_effects !== null) {
2120
- eager_block_effects.add(effect);
2121
- }
2122
- if (updated_during_traversal !== null) {
2123
- updated_during_traversal.push(effect);
2124
- } else {
2125
- schedule_effect(effect);
2126
- }
2127
- }
2128
- }
2129
- }
2130
-
2131
- // node_modules/svelte/src/store/utils.js
2132
- function subscribe_to_store(store, run3, invalidate) {
2133
- if (store == null) {
2134
- run3(undefined);
2135
- if (invalidate)
2136
- invalidate(undefined);
2137
- return noop;
2138
- }
2139
- const unsub = untrack(() => store.subscribe(run3, invalidate));
2140
- return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
2141
- }
2142
-
2143
- // node_modules/svelte/src/store/shared/index.js
2144
- var subscriber_queue = [];
2145
- function readable(value, start) {
2146
- return {
2147
- subscribe: writable(value, start).subscribe
2148
- };
2149
- }
2150
- function writable(value, start = noop) {
2151
- let stop = null;
2152
- const subscribers = new Set;
2153
- function set2(new_value) {
2154
- if (safe_not_equal(value, new_value)) {
2155
- value = new_value;
2156
- if (stop) {
2157
- const run_queue = !subscriber_queue.length;
2158
- for (const subscriber of subscribers) {
2159
- subscriber[1]();
2160
- subscriber_queue.push(subscriber, value);
2161
- }
2162
- if (run_queue) {
2163
- for (let i = 0;i < subscriber_queue.length; i += 2) {
2164
- subscriber_queue[i][0](subscriber_queue[i + 1]);
2165
- }
2166
- subscriber_queue.length = 0;
2167
- }
2168
- }
2169
- }
2170
- }
2171
- function update2(fn) {
2172
- set2(fn(value));
2173
- }
2174
- function subscribe(run3, invalidate = noop) {
2175
- const subscriber = [run3, invalidate];
2176
- subscribers.add(subscriber);
2177
- if (subscribers.size === 1) {
2178
- stop = start(set2, update2) || noop;
2179
- }
2180
- run3(value);
2181
- return () => {
2182
- subscribers.delete(subscriber);
2183
- if (subscribers.size === 0 && stop) {
2184
- stop();
2185
- stop = null;
2186
- }
2187
- };
2188
- }
2189
- return { set: set2, update: update2, subscribe };
2190
- }
2191
- function derived2(stores, fn, initial_value) {
2192
- const single = !Array.isArray(stores);
2193
- const stores_array = single ? [stores] : stores;
2194
- if (!stores_array.every(Boolean)) {
2195
- throw new Error("derived() expects stores as input, got a falsy value");
2196
- }
2197
- const auto = fn.length < 2;
2198
- return readable(initial_value, (set2, update2) => {
2199
- let started = false;
2200
- const values = [];
2201
- let pending2 = 0;
2202
- let cleanup = noop;
2203
- const sync = () => {
2204
- if (pending2) {
2205
- return;
2206
- }
2207
- cleanup();
2208
- const result = fn(single ? values[0] : values, set2, update2);
2209
- if (auto) {
2210
- set2(result);
2211
- } else {
2212
- cleanup = typeof result === "function" ? result : noop;
2213
- }
2214
- };
2215
- const unsubscribers = stores_array.map((store, i) => subscribe_to_store(store, (value) => {
2216
- values[i] = value;
2217
- pending2 &= ~(1 << i);
2218
- if (started) {
2219
- sync();
2220
- }
2221
- }, () => {
2222
- pending2 |= 1 << i;
2223
- }));
2224
- started = true;
2225
- sync();
2226
- return function stop() {
2227
- run_all(unsubscribers);
2228
- cleanup();
2229
- started = false;
2230
- };
2231
- });
2232
- }
2233
- function readonly(store) {
2234
- return {
2235
- subscribe: store.subscribe.bind(store)
2236
- };
2237
- }
2238
- function get2(store) {
2239
- let value;
2240
- subscribe_to_store(store, (_) => value = _)();
2241
- return value;
2242
- }
2243
-
2244
- // node_modules/svelte/src/internal/client/reactivity/store.js
2245
- var legacy_is_updating_store = false;
2246
- var is_store_binding = false;
2247
- var IS_UNMOUNTED = Symbol();
2248
- function store_get(store, store_name, stores) {
2249
- const entry = stores[store_name] ??= {
2250
- store: null,
2251
- source: mutable_source(undefined),
2252
- unsubscribe: noop
2253
- };
2254
- if (true_default) {
2255
- entry.source.label = store_name;
2256
- }
2257
- if (entry.store !== store && !(IS_UNMOUNTED in stores)) {
2258
- entry.unsubscribe();
2259
- entry.store = store ?? null;
2260
- if (store == null) {
2261
- entry.source.v = undefined;
2262
- entry.unsubscribe = noop;
2263
- } else {
2264
- var is_synchronous_callback = true;
2265
- entry.unsubscribe = subscribe_to_store(store, (v) => {
2266
- if (is_synchronous_callback) {
2267
- entry.source.v = v;
2268
- } else {
2269
- set(entry.source, v);
2270
- }
2271
- });
2272
- is_synchronous_callback = false;
2273
- }
2274
- }
2275
- if (store && IS_UNMOUNTED in stores) {
2276
- return get2(store);
2277
- }
2278
- return get(entry.source);
2279
- }
2280
- function store_unsub(store, store_name, stores) {
2281
- let entry = stores[store_name];
2282
- if (entry && entry.store !== store) {
2283
- entry.unsubscribe();
2284
- entry.unsubscribe = noop;
2285
- }
2286
- return store;
2287
- }
2288
- function store_set(store, value) {
2289
- update_with_flag(store, value);
2290
- return value;
2291
- }
2292
- function invalidate_store(stores, store_name) {
2293
- var entry = stores[store_name];
2294
- if (entry.store !== null) {
2295
- store_set(entry.store, entry.source.v);
2296
- }
2297
- }
2298
- function setup_stores() {
2299
- const stores = {};
2300
- function cleanup() {
2301
- teardown(() => {
2302
- for (var store_name in stores) {
2303
- const ref = stores[store_name];
2304
- ref.unsubscribe();
2305
- }
2306
- define_property(stores, IS_UNMOUNTED, {
2307
- enumerable: false,
2308
- value: true
2309
- });
2310
- });
2311
- }
2312
- return [stores, cleanup];
2313
- }
2314
- function update_with_flag(store, value) {
2315
- legacy_is_updating_store = true;
2316
- try {
2317
- store.set(value);
2318
- } finally {
2319
- legacy_is_updating_store = false;
2320
- }
2321
- }
2322
- function store_mutate(store, expression, new_value) {
2323
- update_with_flag(store, new_value);
2324
- return expression;
2325
- }
2326
- function update_store(store, store_value, d = 1) {
2327
- update_with_flag(store, store_value + d);
2328
- return store_value;
2329
- }
2330
- function update_pre_store(store, store_value, d = 1) {
2331
- const value = store_value + d;
2332
- update_with_flag(store, value);
2333
- return value;
2334
- }
2335
- function mark_store_binding() {
2336
- is_store_binding = true;
2337
- }
2338
- function capture_store_binding(fn) {
2339
- var previous_is_store_binding = is_store_binding;
2340
- try {
2341
- is_store_binding = false;
2342
- return [fn(), is_store_binding];
2343
- } finally {
2344
- is_store_binding = previous_is_store_binding;
2345
- }
2346
- }
2347
-
2348
- // node_modules/svelte/src/internal/client/reactivity/batch.js
2349
- var batches = new Set;
2350
- var current_batch = null;
2351
- var previous_batch = null;
2352
- var batch_values = null;
2353
- var last_scheduled_effect = null;
2354
- var is_flushing_sync = false;
2355
- var is_processing = false;
2356
- var collected_effects = null;
2357
- var legacy_updates = null;
2358
- var flush_count = 0;
2359
- var source_stacks = true_default ? new Set : null;
2360
- var uid = 1;
2361
-
2362
- class Batch {
2363
- id = uid++;
2364
- current = new Map;
2365
- previous = new Map;
2366
- #commit_callbacks = new Set;
2367
- #discard_callbacks = new Set;
2368
- #pending = new Map;
2369
- #blocking_pending = new Map;
2370
- #deferred = null;
2371
- #roots = [];
2372
- #dirty_effects = new Set;
2373
- #maybe_dirty_effects = new Set;
2374
- #skipped_branches = new Map;
2375
- is_fork = false;
2376
- #decrement_queued = false;
2377
- #blockers = new Set;
2378
- #is_deferred() {
2379
- return this.is_fork || this.#blocking_pending.size > 0;
2380
- }
2381
- #is_blocked() {
2382
- for (const batch of this.#blockers) {
2383
- for (const effect of batch.#blocking_pending.keys()) {
2384
- var skipped = false;
2385
- var e = effect;
2386
- while (e.parent !== null) {
2387
- if (this.#skipped_branches.has(e)) {
2388
- skipped = true;
2389
- break;
2390
- }
2391
- e = e.parent;
2392
- }
2393
- if (!skipped) {
2394
- return true;
2395
- }
2396
- }
2397
- }
2398
- return false;
2399
- }
2400
- skip_effect(effect) {
2401
- if (!this.#skipped_branches.has(effect)) {
2402
- this.#skipped_branches.set(effect, { d: [], m: [] });
2403
- }
2404
- }
2405
- unskip_effect(effect) {
2406
- var tracked = this.#skipped_branches.get(effect);
2407
- if (tracked) {
2408
- this.#skipped_branches.delete(effect);
2409
- for (var e of tracked.d) {
2410
- set_signal_status(e, DIRTY);
2411
- this.schedule(e);
2412
- }
2413
- for (e of tracked.m) {
2414
- set_signal_status(e, MAYBE_DIRTY);
2415
- this.schedule(e);
2416
- }
2417
- }
2418
- }
2419
- #process() {
2420
- if (flush_count++ > 1000) {
2421
- batches.delete(this);
2422
- infinite_loop_guard();
2423
- }
2424
- if (!this.#is_deferred()) {
2425
- for (const e of this.#dirty_effects) {
2426
- this.#maybe_dirty_effects.delete(e);
2427
- set_signal_status(e, DIRTY);
2428
- this.schedule(e);
2429
- }
2430
- for (const e of this.#maybe_dirty_effects) {
2431
- set_signal_status(e, MAYBE_DIRTY);
2432
- this.schedule(e);
2433
- }
2434
- }
2435
- const roots = this.#roots;
2436
- this.#roots = [];
2437
- this.apply();
2438
- var effects = collected_effects = [];
2439
- var render_effects = [];
2440
- var updates = legacy_updates = [];
2441
- for (const root of roots) {
2442
- try {
2443
- this.#traverse(root, effects, render_effects);
2444
- } catch (e) {
2445
- reset_all(root);
2446
- throw e;
2447
- }
2448
- }
2449
- current_batch = null;
2450
- if (updates.length > 0) {
2451
- var batch = Batch.ensure();
2452
- for (const e of updates) {
2453
- batch.schedule(e);
2454
- }
2455
- }
2456
- collected_effects = null;
2457
- legacy_updates = null;
2458
- if (this.#is_deferred() || this.#is_blocked()) {
2459
- this.#defer_effects(render_effects);
2460
- this.#defer_effects(effects);
2461
- for (const [e, t] of this.#skipped_branches) {
2462
- reset_branch(e, t);
2463
- }
2464
- } else {
2465
- if (this.#pending.size === 0) {
2466
- batches.delete(this);
2467
- }
2468
- this.#dirty_effects.clear();
2469
- this.#maybe_dirty_effects.clear();
2470
- for (const fn of this.#commit_callbacks)
2471
- fn(this);
2472
- this.#commit_callbacks.clear();
2473
- previous_batch = this;
2474
- flush_queued_effects(render_effects);
2475
- flush_queued_effects(effects);
2476
- previous_batch = null;
2477
- this.#deferred?.resolve();
2478
- }
2479
- var next_batch = current_batch;
2480
- if (this.#roots.length > 0) {
2481
- const batch2 = next_batch ??= this;
2482
- batch2.#roots.push(...this.#roots.filter((r) => !batch2.#roots.includes(r)));
2483
- }
2484
- if (next_batch !== null) {
2485
- batches.add(next_batch);
2486
- if (true_default) {
2487
- for (const source2 of this.current.keys()) {
2488
- source_stacks.add(source2);
2489
- }
2490
- }
2491
- next_batch.#process();
2492
- }
2493
- if (!batches.has(this)) {
2494
- this.#commit();
2495
- }
2496
- }
2497
- #traverse(root, effects, render_effects) {
2498
- root.f ^= CLEAN;
2499
- var effect = root.first;
2500
- while (effect !== null) {
2501
- var flags2 = effect.f;
2502
- var is_branch = (flags2 & (BRANCH_EFFECT | ROOT_EFFECT)) !== 0;
2503
- var is_skippable_branch = is_branch && (flags2 & CLEAN) !== 0;
2504
- var skip = is_skippable_branch || (flags2 & INERT) !== 0 || this.#skipped_branches.has(effect);
2505
- if (!skip && effect.fn !== null) {
2506
- if (is_branch) {
2507
- effect.f ^= CLEAN;
2508
- } else if ((flags2 & EFFECT) !== 0) {
2509
- effects.push(effect);
2510
- } else if (async_mode_flag && (flags2 & (RENDER_EFFECT | MANAGED_EFFECT)) !== 0) {
2511
- render_effects.push(effect);
2512
- } else if (is_dirty(effect)) {
2513
- if ((flags2 & BLOCK_EFFECT) !== 0)
2514
- this.#maybe_dirty_effects.add(effect);
2515
- update_effect(effect);
2516
- }
2517
- var child = effect.first;
2518
- if (child !== null) {
2519
- effect = child;
2520
- continue;
2521
- }
2522
- }
2523
- while (effect !== null) {
2524
- var next2 = effect.next;
2525
- if (next2 !== null) {
2526
- effect = next2;
2527
- break;
2528
- }
2529
- effect = effect.parent;
2530
- }
2531
- }
2532
- }
2533
- #defer_effects(effects) {
2534
- for (var i = 0;i < effects.length; i += 1) {
2535
- defer_effect(effects[i], this.#dirty_effects, this.#maybe_dirty_effects);
2536
- }
2537
- }
2538
- capture(source2, old_value, is_derived = false) {
2539
- if (old_value !== UNINITIALIZED && !this.previous.has(source2)) {
2540
- this.previous.set(source2, old_value);
2541
- }
2542
- if ((source2.f & ERROR_VALUE) === 0) {
2543
- this.current.set(source2, [source2.v, is_derived]);
2544
- batch_values?.set(source2, source2.v);
2545
- }
2546
- }
2547
- activate() {
2548
- current_batch = this;
2549
- }
2550
- deactivate() {
2551
- current_batch = null;
2552
- batch_values = null;
2553
- }
2554
- flush() {
2555
- var source_stacks2 = true_default ? new Set : null;
2556
- try {
2557
- is_processing = true;
2558
- current_batch = this;
2559
- this.#process();
2560
- } finally {
2561
- flush_count = 0;
2562
- last_scheduled_effect = null;
2563
- collected_effects = null;
2564
- legacy_updates = null;
2565
- is_processing = false;
2566
- current_batch = null;
2567
- batch_values = null;
2568
- old_values.clear();
2569
- if (true_default) {
2570
- for (const source2 of source_stacks2) {
2571
- source2.updated = null;
2572
- }
2573
- }
2574
- }
2575
- }
2576
- discard() {
2577
- for (const fn of this.#discard_callbacks)
2578
- fn(this);
2579
- this.#discard_callbacks.clear();
2580
- batches.delete(this);
2581
- }
2582
- #commit() {
2583
- for (const batch of batches) {
2584
- var is_earlier = batch.id < this.id;
2585
- var sources = [];
2586
- for (const [source3, [value, is_derived]] of this.current) {
2587
- if (batch.current.has(source3)) {
2588
- var batch_value = batch.current.get(source3)[0];
2589
- if (is_earlier && value !== batch_value) {
2590
- batch.current.set(source3, [value, is_derived]);
2591
- } else {
2592
- continue;
2593
- }
2594
- }
2595
- sources.push(source3);
2596
- }
2597
- var others = [...batch.current.keys()].filter((s) => !this.current.has(s));
2598
- if (others.length === 0) {
2599
- if (is_earlier) {
2600
- batch.discard();
2601
- }
2602
- } else if (sources.length > 0) {
2603
- if (true_default) {
2604
- invariant(batch.#roots.length === 0, "Batch has scheduled roots");
2605
- }
2606
- batch.activate();
2607
- var marked = new Set;
2608
- var checked = new Map;
2609
- for (var source2 of sources) {
2610
- mark_effects(source2, others, marked, checked);
2611
- }
2612
- if (batch.#roots.length > 0) {
2613
- batch.apply();
2614
- for (var root of batch.#roots) {
2615
- batch.#traverse(root, [], []);
2616
- }
2617
- batch.#roots = [];
2618
- }
2619
- batch.deactivate();
2620
- }
2621
- }
2622
- for (const batch of batches) {
2623
- if (batch.#blockers.has(this)) {
2624
- batch.#blockers.delete(this);
2625
- if (batch.#blockers.size === 0 && !batch.#is_deferred()) {
2626
- batch.activate();
2627
- batch.#process();
2628
- }
2629
- }
2630
- }
2631
- }
2632
- increment(blocking, effect) {
2633
- let pending_count = this.#pending.get(effect) ?? 0;
2634
- this.#pending.set(effect, pending_count + 1);
2635
- if (blocking) {
2636
- let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
2637
- this.#blocking_pending.set(effect, blocking_pending_count + 1);
2638
- }
2639
- }
2640
- decrement(blocking, effect, skip) {
2641
- let pending_count = this.#pending.get(effect) ?? 0;
2642
- if (pending_count === 1) {
2643
- this.#pending.delete(effect);
2644
- } else {
2645
- this.#pending.set(effect, pending_count - 1);
2646
- }
2647
- if (blocking) {
2648
- let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
2649
- if (blocking_pending_count === 1) {
2650
- this.#blocking_pending.delete(effect);
2651
- } else {
2652
- this.#blocking_pending.set(effect, blocking_pending_count - 1);
2653
- }
2654
- }
2655
- if (this.#decrement_queued || skip)
2656
- return;
2657
- this.#decrement_queued = true;
2658
- queue_micro_task(() => {
2659
- this.#decrement_queued = false;
2660
- this.flush();
2661
- });
2662
- }
2663
- transfer_effects(dirty_effects, maybe_dirty_effects) {
2664
- for (const e of dirty_effects) {
2665
- this.#dirty_effects.add(e);
2666
- }
2667
- for (const e of maybe_dirty_effects) {
2668
- this.#maybe_dirty_effects.add(e);
2669
- }
2670
- dirty_effects.clear();
2671
- maybe_dirty_effects.clear();
2672
- }
2673
- oncommit(fn) {
2674
- this.#commit_callbacks.add(fn);
2675
- }
2676
- ondiscard(fn) {
2677
- this.#discard_callbacks.add(fn);
2678
- }
2679
- settled() {
2680
- return (this.#deferred ??= deferred()).promise;
2681
- }
2682
- static ensure() {
2683
- if (current_batch === null) {
2684
- const batch = current_batch = new Batch;
2685
- if (!is_processing) {
2686
- batches.add(current_batch);
2687
- if (!is_flushing_sync) {
2688
- queue_micro_task(() => {
2689
- if (current_batch !== batch) {
2690
- return;
2691
- }
2692
- batch.flush();
2693
- });
2694
- }
2695
- }
2696
- }
2697
- return current_batch;
2698
- }
2699
- apply() {
2700
- if (!async_mode_flag || !this.is_fork && batches.size === 1) {
2701
- batch_values = null;
2702
- return;
2703
- }
2704
- batch_values = new Map;
2705
- for (const [source2, [value]] of this.current) {
2706
- batch_values.set(source2, value);
2707
- }
2708
- for (const batch of batches) {
2709
- if (batch === this || batch.is_fork)
2710
- continue;
2711
- var intersects = false;
2712
- var differs = false;
2713
- if (batch.id < this.id) {
2714
- for (const [source2, [, is_derived]] of batch.current) {
2715
- if (is_derived)
2716
- continue;
2717
- intersects ||= this.current.has(source2);
2718
- differs ||= !this.current.has(source2);
2719
- }
2720
- }
2721
- if (intersects && differs) {
2722
- this.#blockers.add(batch);
2723
- } else {
2724
- for (const [source2, previous] of batch.previous) {
2725
- if (!batch_values.has(source2)) {
2726
- batch_values.set(source2, previous);
2727
- }
2728
- }
2729
- }
2730
- }
2731
- }
2732
- schedule(effect) {
2733
- last_scheduled_effect = effect;
2734
- if (effect.b?.is_pending && (effect.f & (EFFECT | RENDER_EFFECT | MANAGED_EFFECT)) !== 0 && (effect.f & REACTION_RAN) === 0) {
2735
- effect.b.defer_effect(effect);
2736
- return;
2737
- }
2738
- var e = effect;
2739
- while (e.parent !== null) {
2740
- e = e.parent;
2741
- var flags2 = e.f;
2742
- if (collected_effects !== null && e === active_effect) {
2743
- if (async_mode_flag)
2744
- return;
2745
- if ((active_reaction === null || (active_reaction.f & DERIVED) === 0) && !legacy_is_updating_store) {
2746
- return;
2747
- }
2748
- }
2749
- if ((flags2 & (ROOT_EFFECT | BRANCH_EFFECT)) !== 0) {
2750
- if ((flags2 & CLEAN) === 0) {
2751
- return;
2752
- }
2753
- e.f ^= CLEAN;
2754
- }
2755
- }
2756
- this.#roots.push(e);
2757
- }
2758
- }
2759
- function flushSync(fn) {
2760
- var was_flushing_sync = is_flushing_sync;
2761
- is_flushing_sync = true;
2762
- try {
2763
- var result;
2764
- if (fn) {
2765
- if (current_batch !== null && !current_batch.is_fork) {
2766
- current_batch.flush();
2767
- }
2768
- result = fn();
2769
- }
2770
- while (true) {
2771
- flush_tasks();
2772
- if (current_batch === null) {
2773
- return result;
2774
- }
2775
- current_batch.flush();
2776
- }
2777
- } finally {
2778
- is_flushing_sync = was_flushing_sync;
2779
- }
2780
- }
2781
- function infinite_loop_guard() {
2782
- if (true_default) {
2783
- var updates = new Map;
2784
- for (const source2 of current_batch.current.keys()) {
2785
- for (const [stack2, update2] of source2.updated ?? []) {
2786
- var entry = updates.get(stack2);
2787
- if (!entry) {
2788
- entry = { error: update2.error, count: 0 };
2789
- updates.set(stack2, entry);
2790
- }
2791
- entry.count += update2.count;
2792
- }
2793
- }
2794
- for (const update2 of updates.values()) {
2795
- if (update2.error) {
2796
- console.error(update2.error);
2797
- }
2798
- }
2799
- }
2800
- try {
2801
- effect_update_depth_exceeded();
2802
- } catch (error) {
2803
- if (true_default) {
2804
- define_property(error, "stack", { value: "" });
2805
- }
2806
- invoke_error_boundary(error, last_scheduled_effect);
2807
- }
2808
- }
2809
- var eager_block_effects = null;
2810
- function flush_queued_effects(effects) {
2811
- var length = effects.length;
2812
- if (length === 0)
2813
- return;
2814
- var i = 0;
2815
- while (i < length) {
2816
- var effect = effects[i++];
2817
- if ((effect.f & (DESTROYED | INERT)) === 0 && is_dirty(effect)) {
2818
- eager_block_effects = new Set;
2819
- update_effect(effect);
2820
- if (effect.deps === null && effect.first === null && effect.nodes === null && effect.teardown === null && effect.ac === null) {
2821
- unlink_effect(effect);
2822
- }
2823
- if (eager_block_effects?.size > 0) {
2824
- old_values.clear();
2825
- for (const e of eager_block_effects) {
2826
- if ((e.f & (DESTROYED | INERT)) !== 0)
2827
- continue;
2828
- const ordered_effects = [e];
2829
- let ancestor = e.parent;
2830
- while (ancestor !== null) {
2831
- if (eager_block_effects.has(ancestor)) {
2832
- eager_block_effects.delete(ancestor);
2833
- ordered_effects.push(ancestor);
2834
- }
2835
- ancestor = ancestor.parent;
2836
- }
2837
- for (let j = ordered_effects.length - 1;j >= 0; j--) {
2838
- const e2 = ordered_effects[j];
2839
- if ((e2.f & (DESTROYED | INERT)) !== 0)
2840
- continue;
2841
- update_effect(e2);
2842
- }
2843
- }
2844
- eager_block_effects.clear();
2845
- }
2846
- }
2847
- }
2848
- eager_block_effects = null;
2849
- }
2850
- function mark_effects(value, sources, marked, checked) {
2851
- if (marked.has(value))
2852
- return;
2853
- marked.add(value);
2854
- if (value.reactions !== null) {
2855
- for (const reaction of value.reactions) {
2856
- const flags2 = reaction.f;
2857
- if ((flags2 & DERIVED) !== 0) {
2858
- mark_effects(reaction, sources, marked, checked);
2859
- } else if ((flags2 & (ASYNC | BLOCK_EFFECT)) !== 0 && (flags2 & DIRTY) === 0 && depends_on(reaction, sources, checked)) {
2860
- set_signal_status(reaction, DIRTY);
2861
- schedule_effect(reaction);
2862
- }
2863
- }
2864
- }
2865
- }
2866
- function mark_eager_effects(value, effects) {
2867
- if (value.reactions === null)
2868
- return;
2869
- for (const reaction of value.reactions) {
2870
- const flags2 = reaction.f;
2871
- if ((flags2 & DERIVED) !== 0) {
2872
- mark_eager_effects(reaction, effects);
2873
- } else if ((flags2 & EAGER_EFFECT) !== 0) {
2874
- set_signal_status(reaction, DIRTY);
2875
- effects.add(reaction);
2876
- }
2877
- }
2878
- }
2879
- function depends_on(reaction, sources, checked) {
2880
- const depends = checked.get(reaction);
2881
- if (depends !== undefined)
2882
- return depends;
2883
- if (reaction.deps !== null) {
2884
- for (const dep of reaction.deps) {
2885
- if (includes.call(sources, dep)) {
2886
- return true;
2887
- }
2888
- if ((dep.f & DERIVED) !== 0 && depends_on(dep, sources, checked)) {
2889
- checked.set(dep, true);
2890
- return true;
2891
- }
2892
- }
2893
- }
2894
- checked.set(reaction, false);
2895
- return false;
2896
- }
2897
- function schedule_effect(effect) {
2898
- current_batch.schedule(effect);
2899
- }
2900
- var eager_versions = [];
2901
- function eager_flush() {
2902
- try {
2903
- flushSync(() => {
2904
- for (const version of eager_versions) {
2905
- update(version);
2906
- }
2907
- });
2908
- } finally {
2909
- eager_versions = [];
2910
- }
2911
- }
2912
- function eager(fn) {
2913
- var version = source(0);
2914
- var initial = true;
2915
- var value = undefined;
2916
- get(version);
2917
- eager_effect(() => {
2918
- if (initial) {
2919
- var previous_batch_values = batch_values;
2920
- try {
2921
- batch_values = null;
2922
- value = fn();
2923
- } finally {
2924
- batch_values = previous_batch_values;
2925
- }
2926
- return;
2927
- }
2928
- if (eager_versions.length === 0) {
2929
- queue_micro_task(eager_flush);
2930
- }
2931
- eager_versions.push(version);
2932
- });
2933
- initial = false;
2934
- return value;
2935
- }
2936
- function reset_branch(effect, tracked) {
2937
- if ((effect.f & BRANCH_EFFECT) !== 0 && (effect.f & CLEAN) !== 0) {
2938
- return;
2939
- }
2940
- if ((effect.f & DIRTY) !== 0) {
2941
- tracked.d.push(effect);
2942
- } else if ((effect.f & MAYBE_DIRTY) !== 0) {
2943
- tracked.m.push(effect);
2944
- }
2945
- set_signal_status(effect, CLEAN);
2946
- var e = effect.first;
2947
- while (e !== null) {
2948
- reset_branch(e, tracked);
2949
- e = e.next;
2950
- }
2951
- }
2952
- function reset_all(effect) {
2953
- set_signal_status(effect, CLEAN);
2954
- var e = effect.first;
2955
- while (e !== null) {
2956
- reset_all(e);
2957
- e = e.next;
2958
- }
2959
- }
2960
- function fork(fn) {
2961
- if (!async_mode_flag) {
2962
- experimental_async_required("fork");
2963
- }
2964
- if (current_batch !== null) {
2965
- fork_timing();
2966
- }
2967
- var batch = Batch.ensure();
2968
- batch.is_fork = true;
2969
- batch_values = new Map;
2970
- var committed = false;
2971
- var settled = batch.settled();
2972
- flushSync(fn);
2973
- for (var [source2, value] of batch.previous) {
2974
- source2.v = value;
2975
- }
2976
- return {
2977
- commit: async () => {
2978
- if (committed) {
2979
- await settled;
2980
- return;
2981
- }
2982
- if (!batches.has(batch)) {
2983
- fork_discarded();
2984
- }
2985
- committed = true;
2986
- batch.is_fork = false;
2987
- for (var [source3, [value2]] of batch.current) {
2988
- source3.v = value2;
2989
- source3.wv = increment_write_version();
2990
- }
2991
- flushSync(() => {
2992
- var eager_effects2 = new Set;
2993
- for (var source4 of batch.current.keys()) {
2994
- mark_eager_effects(source4, eager_effects2);
2995
- }
2996
- set_eager_effects(eager_effects2);
2997
- flush_eager_effects();
2998
- });
2999
- batch.flush();
3000
- await settled;
3001
- },
3002
- discard: () => {
3003
- for (var source3 of batch.current.keys()) {
3004
- source3.wv = increment_write_version();
3005
- }
3006
- if (!committed && batches.has(batch)) {
3007
- batch.discard();
3008
- }
3009
- }
3010
- };
3011
- }
3012
-
3013
- // node_modules/svelte/src/internal/client/dom/elements/misc.js
3014
- function autofocus(dom, value) {
3015
- if (value) {
3016
- const body = document.body;
3017
- dom.autofocus = true;
3018
- queue_micro_task(() => {
3019
- if (document.activeElement === body) {
3020
- dom.focus();
3021
- }
3022
- });
3023
- }
3024
- }
3025
- function remove_textarea_child(dom) {
3026
- if (hydrating && get_first_child(dom) !== null) {
3027
- clear_text_content(dom);
3028
- }
3029
- }
3030
- var listening_to_form_reset = false;
3031
- function add_form_reset_listener() {
3032
- if (!listening_to_form_reset) {
3033
- listening_to_form_reset = true;
3034
- document.addEventListener("reset", (evt) => {
3035
- Promise.resolve().then(() => {
3036
- if (!evt.defaultPrevented) {
3037
- for (const e of evt.target.elements) {
3038
- e.__on_r?.();
3039
- }
3040
- }
3041
- });
3042
- }, { capture: true });
3043
- }
3044
- }
3045
-
3046
- // node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
3047
- function listen(target, events, handler, call_handler_immediately = true) {
3048
- if (call_handler_immediately) {
3049
- handler();
3050
- }
3051
- for (var name of events) {
3052
- target.addEventListener(name, handler);
3053
- }
3054
- teardown(() => {
3055
- for (var name2 of events) {
3056
- target.removeEventListener(name2, handler);
3057
- }
3058
- });
3059
- }
3060
- function without_reactive_context(fn) {
3061
- var previous_reaction = active_reaction;
3062
- var previous_effect = active_effect;
3063
- set_active_reaction(null);
3064
- set_active_effect(null);
3065
- try {
3066
- return fn();
3067
- } finally {
3068
- set_active_reaction(previous_reaction);
3069
- set_active_effect(previous_effect);
3070
- }
3071
- }
3072
- function listen_to_event_and_reset_event(element, event, handler, on_reset = handler) {
3073
- element.addEventListener(event, () => without_reactive_context(handler));
3074
- const prev = element.__on_r;
3075
- if (prev) {
3076
- element.__on_r = () => {
3077
- prev();
3078
- on_reset(true);
3079
- };
3080
- } else {
3081
- element.__on_r = () => on_reset(true);
3082
- }
3083
- add_form_reset_listener();
3084
- }
3085
-
3086
- // node_modules/svelte/src/internal/client/reactivity/effects.js
3087
- function validate_effect(rune) {
3088
- if (active_effect === null) {
3089
- if (active_reaction === null) {
3090
- effect_orphan(rune);
3091
- }
3092
- effect_in_unowned_derived();
3093
- }
3094
- if (is_destroying_effect) {
3095
- effect_in_teardown(rune);
3096
- }
3097
- }
3098
- function push_effect(effect, parent_effect) {
3099
- var parent_last = parent_effect.last;
3100
- if (parent_last === null) {
3101
- parent_effect.last = parent_effect.first = effect;
3102
- } else {
3103
- parent_last.next = effect;
3104
- effect.prev = parent_last;
3105
- parent_effect.last = effect;
3106
- }
3107
- }
3108
- function create_effect(type, fn) {
3109
- var parent = active_effect;
3110
- if (true_default) {
3111
- while (parent !== null && (parent.f & EAGER_EFFECT) !== 0) {
3112
- parent = parent.parent;
3113
- }
3114
- }
3115
- if (parent !== null && (parent.f & INERT) !== 0) {
3116
- type |= INERT;
3117
- }
3118
- var effect = {
3119
- ctx: component_context,
3120
- deps: null,
3121
- nodes: null,
3122
- f: type | DIRTY | CONNECTED,
3123
- first: null,
3124
- fn,
3125
- last: null,
3126
- next: null,
3127
- parent,
3128
- b: parent && parent.b,
3129
- prev: null,
3130
- teardown: null,
3131
- wv: 0,
3132
- ac: null
3133
- };
3134
- if (true_default) {
3135
- effect.component_function = dev_current_component_function;
3136
- }
3137
- var e = effect;
3138
- if ((type & EFFECT) !== 0) {
3139
- if (collected_effects !== null) {
3140
- collected_effects.push(effect);
3141
- } else {
3142
- Batch.ensure().schedule(effect);
3143
- }
3144
- } else if (fn !== null) {
3145
- try {
3146
- update_effect(effect);
3147
- } catch (e2) {
3148
- destroy_effect(effect);
3149
- throw e2;
3150
- }
3151
- if (e.deps === null && e.teardown === null && e.nodes === null && e.first === e.last && (e.f & EFFECT_PRESERVED) === 0) {
3152
- e = e.first;
3153
- if ((type & BLOCK_EFFECT) !== 0 && (type & EFFECT_TRANSPARENT) !== 0 && e !== null) {
3154
- e.f |= EFFECT_TRANSPARENT;
3155
- }
3156
- }
3157
- }
3158
- if (e !== null) {
3159
- e.parent = parent;
3160
- if (parent !== null) {
3161
- push_effect(e, parent);
3162
- }
3163
- if (active_reaction !== null && (active_reaction.f & DERIVED) !== 0 && (type & ROOT_EFFECT) === 0) {
3164
- var derived3 = active_reaction;
3165
- (derived3.effects ??= []).push(e);
3166
- }
3167
- }
3168
- return effect;
3169
- }
3170
- function effect_tracking() {
3171
- return active_reaction !== null && !untracking;
3172
- }
3173
- function teardown(fn) {
3174
- const effect = create_effect(RENDER_EFFECT, null);
3175
- set_signal_status(effect, CLEAN);
3176
- effect.teardown = fn;
3177
- return effect;
3178
- }
3179
- function user_effect(fn) {
3180
- validate_effect("$effect");
3181
- if (true_default) {
3182
- define_property(fn, "name", {
3183
- value: "$effect"
3184
- });
3185
- }
3186
- var flags2 = active_effect.f;
3187
- var defer = !active_reaction && (flags2 & BRANCH_EFFECT) !== 0 && (flags2 & REACTION_RAN) === 0;
3188
- if (defer) {
3189
- var context = component_context;
3190
- (context.e ??= []).push(fn);
3191
- } else {
3192
- return create_user_effect(fn);
3193
- }
3194
- }
3195
- function create_user_effect(fn) {
3196
- return create_effect(EFFECT | USER_EFFECT, fn);
3197
- }
3198
- function user_pre_effect(fn) {
3199
- validate_effect("$effect.pre");
3200
- if (true_default) {
3201
- define_property(fn, "name", {
3202
- value: "$effect.pre"
3203
- });
3204
- }
3205
- return create_effect(RENDER_EFFECT | USER_EFFECT, fn);
3206
- }
3207
- function eager_effect(fn) {
3208
- return create_effect(EAGER_EFFECT, fn);
3209
- }
3210
- function effect_root(fn) {
3211
- Batch.ensure();
3212
- const effect = create_effect(ROOT_EFFECT | EFFECT_PRESERVED, fn);
3213
- return () => {
3214
- destroy_effect(effect);
3215
- };
3216
- }
3217
- function component_root(fn) {
3218
- Batch.ensure();
3219
- const effect = create_effect(ROOT_EFFECT | EFFECT_PRESERVED, fn);
3220
- return (options = {}) => {
3221
- return new Promise((fulfil) => {
3222
- if (options.outro) {
3223
- pause_effect(effect, () => {
3224
- destroy_effect(effect);
3225
- fulfil(undefined);
3226
- });
3227
- } else {
3228
- destroy_effect(effect);
3229
- fulfil(undefined);
3230
- }
3231
- });
3232
- };
3233
- }
3234
- function effect(fn) {
3235
- return create_effect(EFFECT, fn);
3236
- }
3237
- function legacy_pre_effect(deps, fn) {
3238
- var context = component_context;
3239
- var token = { effect: null, ran: false, deps };
3240
- context.l.$.push(token);
3241
- token.effect = render_effect(() => {
3242
- deps();
3243
- if (token.ran)
3244
- return;
3245
- token.ran = true;
3246
- var effect2 = active_effect;
3247
- try {
3248
- set_active_effect(effect2.parent);
3249
- untrack(fn);
3250
- } finally {
3251
- set_active_effect(effect2);
3252
- }
3253
- });
3254
- }
3255
- function legacy_pre_effect_reset() {
3256
- var context = component_context;
3257
- render_effect(() => {
3258
- for (var token of context.l.$) {
3259
- token.deps();
3260
- var effect2 = token.effect;
3261
- if ((effect2.f & CLEAN) !== 0 && effect2.deps !== null) {
3262
- set_signal_status(effect2, MAYBE_DIRTY);
3263
- }
3264
- if (is_dirty(effect2)) {
3265
- update_effect(effect2);
3266
- }
3267
- token.ran = false;
3268
- }
3269
- });
3270
- }
3271
- function async_effect(fn) {
3272
- return create_effect(ASYNC | EFFECT_PRESERVED, fn);
3273
- }
3274
- function render_effect(fn, flags2 = 0) {
3275
- return create_effect(RENDER_EFFECT | flags2, fn);
3276
- }
3277
- function template_effect(fn, sync = [], async = [], blockers = []) {
3278
- flatten(blockers, sync, async, (values) => {
3279
- create_effect(RENDER_EFFECT, () => fn(...values.map(get)));
3280
- });
3281
- }
3282
- function deferred_template_effect(fn, sync = [], async = [], blockers = []) {
3283
- if (async.length > 0 || blockers.length > 0) {
3284
- var decrement_pending = increment_pending();
3285
- }
3286
- flatten(blockers, sync, async, (values) => {
3287
- create_effect(EFFECT, () => fn(...values.map(get)));
3288
- if (decrement_pending) {
3289
- decrement_pending();
3290
- }
3291
- });
3292
- }
3293
- function block(fn, flags2 = 0) {
3294
- var effect2 = create_effect(BLOCK_EFFECT | flags2, fn);
3295
- if (true_default) {
3296
- effect2.dev_stack = dev_stack;
3297
- }
3298
- return effect2;
3299
- }
3300
- function managed(fn, flags2 = 0) {
3301
- var effect2 = create_effect(MANAGED_EFFECT | flags2, fn);
3302
- if (true_default) {
3303
- effect2.dev_stack = dev_stack;
3304
- }
3305
- return effect2;
3306
- }
3307
- function branch(fn) {
3308
- return create_effect(BRANCH_EFFECT | EFFECT_PRESERVED, fn);
3309
- }
3310
- function execute_effect_teardown(effect2) {
3311
- var teardown2 = effect2.teardown;
3312
- if (teardown2 !== null) {
3313
- const previously_destroying_effect = is_destroying_effect;
3314
- const previous_reaction = active_reaction;
3315
- set_is_destroying_effect(true);
3316
- set_active_reaction(null);
3317
- try {
3318
- teardown2.call(null);
3319
- } finally {
3320
- set_is_destroying_effect(previously_destroying_effect);
3321
- set_active_reaction(previous_reaction);
3322
- }
3323
- }
3324
- }
3325
- function destroy_effect_children(signal, remove_dom = false) {
3326
- var effect2 = signal.first;
3327
- signal.first = signal.last = null;
3328
- while (effect2 !== null) {
3329
- const controller = effect2.ac;
3330
- if (controller !== null) {
3331
- without_reactive_context(() => {
3332
- controller.abort(STALE_REACTION);
3333
- });
3334
- }
3335
- var next2 = effect2.next;
3336
- if ((effect2.f & ROOT_EFFECT) !== 0) {
3337
- effect2.parent = null;
3338
- } else {
3339
- destroy_effect(effect2, remove_dom);
3340
- }
3341
- effect2 = next2;
3342
- }
3343
- }
3344
- function destroy_block_effect_children(signal) {
3345
- var effect2 = signal.first;
3346
- while (effect2 !== null) {
3347
- var next2 = effect2.next;
3348
- if ((effect2.f & BRANCH_EFFECT) === 0) {
3349
- destroy_effect(effect2);
3350
- }
3351
- effect2 = next2;
3352
- }
3353
- }
3354
- function destroy_effect(effect2, remove_dom = true) {
3355
- var removed = false;
3356
- if ((remove_dom || (effect2.f & HEAD_EFFECT) !== 0) && effect2.nodes !== null && effect2.nodes.end !== null) {
3357
- remove_effect_dom(effect2.nodes.start, effect2.nodes.end);
3358
- removed = true;
3359
- }
3360
- set_signal_status(effect2, DESTROYING);
3361
- destroy_effect_children(effect2, remove_dom && !removed);
3362
- remove_reactions(effect2, 0);
3363
- var transitions = effect2.nodes && effect2.nodes.t;
3364
- if (transitions !== null) {
3365
- for (const transition of transitions) {
3366
- transition.stop();
3367
- }
3368
- }
3369
- execute_effect_teardown(effect2);
3370
- effect2.f ^= DESTROYING;
3371
- effect2.f |= DESTROYED;
3372
- var parent = effect2.parent;
3373
- if (parent !== null && parent.first !== null) {
3374
- unlink_effect(effect2);
3375
- }
3376
- if (true_default) {
3377
- effect2.component_function = null;
3378
- }
3379
- effect2.next = effect2.prev = effect2.teardown = effect2.ctx = effect2.deps = effect2.fn = effect2.nodes = effect2.ac = effect2.b = null;
3380
- }
3381
- function remove_effect_dom(node, end) {
3382
- while (node !== null) {
3383
- var next2 = node === end ? null : get_next_sibling(node);
3384
- node.remove();
3385
- node = next2;
3386
- }
3387
- }
3388
- function unlink_effect(effect2) {
3389
- var parent = effect2.parent;
3390
- var prev = effect2.prev;
3391
- var next2 = effect2.next;
3392
- if (prev !== null)
3393
- prev.next = next2;
3394
- if (next2 !== null)
3395
- next2.prev = prev;
3396
- if (parent !== null) {
3397
- if (parent.first === effect2)
3398
- parent.first = next2;
3399
- if (parent.last === effect2)
3400
- parent.last = prev;
3401
- }
3402
- }
3403
- function pause_effect(effect2, callback, destroy = true) {
3404
- var transitions = [];
3405
- pause_children(effect2, transitions, true);
3406
- var fn = () => {
3407
- if (destroy)
3408
- destroy_effect(effect2);
3409
- if (callback)
3410
- callback();
3411
- };
3412
- var remaining = transitions.length;
3413
- if (remaining > 0) {
3414
- var check = () => --remaining || fn();
3415
- for (var transition of transitions) {
3416
- transition.out(check);
3417
- }
3418
- } else {
3419
- fn();
3420
- }
3421
- }
3422
- function pause_children(effect2, transitions, local) {
3423
- if ((effect2.f & INERT) !== 0)
3424
- return;
3425
- effect2.f ^= INERT;
3426
- var t = effect2.nodes && effect2.nodes.t;
3427
- if (t !== null) {
3428
- for (const transition of t) {
3429
- if (transition.is_global || local) {
3430
- transitions.push(transition);
3431
- }
3432
- }
3433
- }
3434
- var child = effect2.first;
3435
- while (child !== null) {
3436
- var sibling = child.next;
3437
- var transparent = (child.f & EFFECT_TRANSPARENT) !== 0 || (child.f & BRANCH_EFFECT) !== 0 && (effect2.f & BLOCK_EFFECT) !== 0;
3438
- pause_children(child, transitions, transparent ? local : false);
3439
- child = sibling;
3440
- }
3441
- }
3442
- function resume_effect(effect2) {
3443
- resume_children(effect2, true);
3444
- }
3445
- function resume_children(effect2, local) {
3446
- if ((effect2.f & INERT) === 0)
3447
- return;
3448
- effect2.f ^= INERT;
3449
- if ((effect2.f & CLEAN) === 0) {
3450
- set_signal_status(effect2, DIRTY);
3451
- Batch.ensure().schedule(effect2);
3452
- }
3453
- var child = effect2.first;
3454
- while (child !== null) {
3455
- var sibling = child.next;
3456
- var transparent = (child.f & EFFECT_TRANSPARENT) !== 0 || (child.f & BRANCH_EFFECT) !== 0;
3457
- resume_children(child, transparent ? local : false);
3458
- child = sibling;
3459
- }
3460
- var t = effect2.nodes && effect2.nodes.t;
3461
- if (t !== null) {
3462
- for (const transition of t) {
3463
- if (transition.is_global || local) {
3464
- transition.in();
3465
- }
3466
- }
3467
- }
3468
- }
3469
- function aborted(effect2 = active_effect) {
3470
- return (effect2.f & DESTROYED) !== 0;
3471
- }
3472
- function move_effect(effect2, fragment) {
3473
- if (!effect2.nodes)
3474
- return;
3475
- var node = effect2.nodes.start;
3476
- var end = effect2.nodes.end;
3477
- while (node !== null) {
3478
- var next2 = node === end ? null : get_next_sibling(node);
3479
- fragment.append(node);
3480
- node = next2;
3481
- }
3482
- }
3483
-
3484
- // node_modules/svelte/src/internal/client/legacy.js
3485
- var captured_signals = null;
3486
- function capture_signals(fn) {
3487
- var previous_captured_signals = captured_signals;
3488
- try {
3489
- captured_signals = new Set;
3490
- untrack(fn);
3491
- if (previous_captured_signals !== null) {
3492
- for (var signal of captured_signals) {
3493
- previous_captured_signals.add(signal);
3494
- }
3495
- }
3496
- return captured_signals;
3497
- } finally {
3498
- captured_signals = previous_captured_signals;
3499
- }
3500
- }
3501
- function invalidate_inner_signals(fn) {
3502
- for (var signal of capture_signals(fn)) {
3503
- internal_set(signal, signal.v);
3504
- }
3505
- }
3506
-
3507
- // node_modules/svelte/src/internal/client/runtime.js
3508
- var is_updating_effect = false;
3509
- var is_destroying_effect = false;
3510
- function set_is_destroying_effect(value) {
3511
- is_destroying_effect = value;
3512
- }
3513
- var active_reaction = null;
3514
- var untracking = false;
3515
- function set_active_reaction(reaction) {
3516
- active_reaction = reaction;
3517
- }
3518
- var active_effect = null;
3519
- function set_active_effect(effect2) {
3520
- active_effect = effect2;
3521
- }
3522
- var current_sources = null;
3523
- function push_reaction_value(value) {
3524
- if (active_reaction !== null && (!async_mode_flag || (active_reaction.f & DERIVED) !== 0)) {
3525
- if (current_sources === null) {
3526
- current_sources = [value];
3527
- } else {
3528
- current_sources.push(value);
3529
- }
3530
- }
3531
- }
3532
- var new_deps = null;
3533
- var skipped_deps = 0;
3534
- var untracked_writes = null;
3535
- function set_untracked_writes(value) {
3536
- untracked_writes = value;
3537
- }
3538
- var write_version = 1;
3539
- var read_version = 0;
3540
- var update_version = read_version;
3541
- function set_update_version(value) {
3542
- update_version = value;
3543
- }
3544
- function increment_write_version() {
3545
- return ++write_version;
3546
- }
3547
- function is_dirty(reaction) {
3548
- var flags2 = reaction.f;
3549
- if ((flags2 & DIRTY) !== 0) {
3550
- return true;
3551
- }
3552
- if (flags2 & DERIVED) {
3553
- reaction.f &= ~WAS_MARKED;
3554
- }
3555
- if ((flags2 & MAYBE_DIRTY) !== 0) {
3556
- var dependencies = reaction.deps;
3557
- var length = dependencies.length;
3558
- for (var i = 0;i < length; i++) {
3559
- var dependency = dependencies[i];
3560
- if (is_dirty(dependency)) {
3561
- update_derived(dependency);
3562
- }
3563
- if (dependency.wv > reaction.wv) {
3564
- return true;
3565
- }
3566
- }
3567
- if ((flags2 & CONNECTED) !== 0 && batch_values === null) {
3568
- set_signal_status(reaction, CLEAN);
3569
- }
3570
- }
3571
- return false;
3572
- }
3573
- function schedule_possible_effect_self_invalidation(signal, effect2, root = true) {
3574
- var reactions = signal.reactions;
3575
- if (reactions === null)
3576
- return;
3577
- if (!async_mode_flag && current_sources !== null && includes.call(current_sources, signal)) {
3578
- return;
3579
- }
3580
- for (var i = 0;i < reactions.length; i++) {
3581
- var reaction = reactions[i];
3582
- if ((reaction.f & DERIVED) !== 0) {
3583
- schedule_possible_effect_self_invalidation(reaction, effect2, false);
3584
- } else if (effect2 === reaction) {
3585
- if (root) {
3586
- set_signal_status(reaction, DIRTY);
3587
- } else if ((reaction.f & CLEAN) !== 0) {
3588
- set_signal_status(reaction, MAYBE_DIRTY);
3589
- }
3590
- schedule_effect(reaction);
3591
- }
3592
- }
3593
- }
3594
- function update_reaction(reaction) {
3595
- var previous_deps = new_deps;
3596
- var previous_skipped_deps = skipped_deps;
3597
- var previous_untracked_writes = untracked_writes;
3598
- var previous_reaction = active_reaction;
3599
- var previous_sources = current_sources;
3600
- var previous_component_context = component_context;
3601
- var previous_untracking = untracking;
3602
- var previous_update_version = update_version;
3603
- var flags2 = reaction.f;
3604
- new_deps = null;
3605
- skipped_deps = 0;
3606
- untracked_writes = null;
3607
- active_reaction = (flags2 & (BRANCH_EFFECT | ROOT_EFFECT)) === 0 ? reaction : null;
3608
- current_sources = null;
3609
- set_component_context(reaction.ctx);
3610
- untracking = false;
3611
- update_version = ++read_version;
3612
- if (reaction.ac !== null) {
3613
- without_reactive_context(() => {
3614
- reaction.ac.abort(STALE_REACTION);
3615
- });
3616
- reaction.ac = null;
3617
- }
3618
- try {
3619
- reaction.f |= REACTION_IS_UPDATING;
3620
- var fn = reaction.fn;
3621
- var result = fn();
3622
- reaction.f |= REACTION_RAN;
3623
- var deps = reaction.deps;
3624
- var is_fork = current_batch?.is_fork;
3625
- if (new_deps !== null) {
3626
- var i;
3627
- if (!is_fork) {
3628
- remove_reactions(reaction, skipped_deps);
3629
- }
3630
- if (deps !== null && skipped_deps > 0) {
3631
- deps.length = skipped_deps + new_deps.length;
3632
- for (i = 0;i < new_deps.length; i++) {
3633
- deps[skipped_deps + i] = new_deps[i];
3634
- }
3635
- } else {
3636
- reaction.deps = deps = new_deps;
3637
- }
3638
- if (effect_tracking() && (reaction.f & CONNECTED) !== 0) {
3639
- for (i = skipped_deps;i < deps.length; i++) {
3640
- (deps[i].reactions ??= []).push(reaction);
3641
- }
3642
- }
3643
- } else if (!is_fork && deps !== null && skipped_deps < deps.length) {
3644
- remove_reactions(reaction, skipped_deps);
3645
- deps.length = skipped_deps;
3646
- }
3647
- if (is_runes() && untracked_writes !== null && !untracking && deps !== null && (reaction.f & (DERIVED | MAYBE_DIRTY | DIRTY)) === 0) {
3648
- for (i = 0;i < untracked_writes.length; i++) {
3649
- schedule_possible_effect_self_invalidation(untracked_writes[i], reaction);
3650
- }
3651
- }
3652
- if (previous_reaction !== null && previous_reaction !== reaction) {
3653
- read_version++;
3654
- if (previous_reaction.deps !== null) {
3655
- for (let i2 = 0;i2 < previous_skipped_deps; i2 += 1) {
3656
- previous_reaction.deps[i2].rv = read_version;
3657
- }
3658
- }
3659
- if (previous_deps !== null) {
3660
- for (const dep of previous_deps) {
3661
- dep.rv = read_version;
3662
- }
3663
- }
3664
- if (untracked_writes !== null) {
3665
- if (previous_untracked_writes === null) {
3666
- previous_untracked_writes = untracked_writes;
3667
- } else {
3668
- previous_untracked_writes.push(...untracked_writes);
3669
- }
3670
- }
3671
- }
3672
- if ((reaction.f & ERROR_VALUE) !== 0) {
3673
- reaction.f ^= ERROR_VALUE;
3674
- }
3675
- return result;
3676
- } catch (error) {
3677
- return handle_error(error);
3678
- } finally {
3679
- reaction.f ^= REACTION_IS_UPDATING;
3680
- new_deps = previous_deps;
3681
- skipped_deps = previous_skipped_deps;
3682
- untracked_writes = previous_untracked_writes;
3683
- active_reaction = previous_reaction;
3684
- current_sources = previous_sources;
3685
- set_component_context(previous_component_context);
3686
- untracking = previous_untracking;
3687
- update_version = previous_update_version;
3688
- }
3689
- }
3690
- function remove_reaction(signal, dependency) {
3691
- let reactions = dependency.reactions;
3692
- if (reactions !== null) {
3693
- var index = index_of.call(reactions, signal);
3694
- if (index !== -1) {
3695
- var new_length = reactions.length - 1;
3696
- if (new_length === 0) {
3697
- reactions = dependency.reactions = null;
3698
- } else {
3699
- reactions[index] = reactions[new_length];
3700
- reactions.pop();
3701
- }
3702
- }
3703
- }
3704
- if (reactions === null && (dependency.f & DERIVED) !== 0 && (new_deps === null || !includes.call(new_deps, dependency))) {
3705
- var derived3 = dependency;
3706
- if ((derived3.f & CONNECTED) !== 0) {
3707
- derived3.f ^= CONNECTED;
3708
- derived3.f &= ~WAS_MARKED;
3709
- }
3710
- update_derived_status(derived3);
3711
- freeze_derived_effects(derived3);
3712
- remove_reactions(derived3, 0);
3713
- }
3714
- }
3715
- function remove_reactions(signal, start_index) {
3716
- var dependencies = signal.deps;
3717
- if (dependencies === null)
3718
- return;
3719
- for (var i = start_index;i < dependencies.length; i++) {
3720
- remove_reaction(signal, dependencies[i]);
3721
- }
3722
- }
3723
- function update_effect(effect2) {
3724
- var flags2 = effect2.f;
3725
- if ((flags2 & DESTROYED) !== 0) {
3726
- return;
3727
- }
3728
- set_signal_status(effect2, CLEAN);
3729
- var previous_effect = active_effect;
3730
- var was_updating_effect = is_updating_effect;
3731
- active_effect = effect2;
3732
- is_updating_effect = true;
3733
- if (true_default) {
3734
- var previous_component_fn = dev_current_component_function;
3735
- set_dev_current_component_function(effect2.component_function);
3736
- var previous_stack = dev_stack;
3737
- set_dev_stack(effect2.dev_stack ?? dev_stack);
3738
- }
3739
- try {
3740
- if ((flags2 & (BLOCK_EFFECT | MANAGED_EFFECT)) !== 0) {
3741
- destroy_block_effect_children(effect2);
3742
- } else {
3743
- destroy_effect_children(effect2);
3744
- }
3745
- execute_effect_teardown(effect2);
3746
- var teardown2 = update_reaction(effect2);
3747
- effect2.teardown = typeof teardown2 === "function" ? teardown2 : null;
3748
- effect2.wv = write_version;
3749
- if (true_default && tracing_mode_flag && (effect2.f & DIRTY) !== 0 && effect2.deps !== null) {
3750
- for (var dep of effect2.deps) {
3751
- if (dep.set_during_effect) {
3752
- dep.wv = increment_write_version();
3753
- dep.set_during_effect = false;
3754
- }
3755
- }
3756
- }
3757
- } finally {
3758
- is_updating_effect = was_updating_effect;
3759
- active_effect = previous_effect;
3760
- if (true_default) {
3761
- set_dev_current_component_function(previous_component_fn);
3762
- set_dev_stack(previous_stack);
3763
- }
3764
- }
3765
- }
3766
- async function tick() {
3767
- if (async_mode_flag) {
3768
- return new Promise((f) => {
3769
- requestAnimationFrame(() => f());
3770
- setTimeout(() => f());
3771
- });
3772
- }
3773
- await Promise.resolve();
3774
- flushSync();
3775
- }
3776
- function settled() {
3777
- return Batch.ensure().settled();
3778
- }
3779
- function get(signal) {
3780
- var flags2 = signal.f;
3781
- var is_derived = (flags2 & DERIVED) !== 0;
3782
- captured_signals?.add(signal);
3783
- if (active_reaction !== null && !untracking) {
3784
- var destroyed = active_effect !== null && (active_effect.f & DESTROYED) !== 0;
3785
- if (!destroyed && (current_sources === null || !includes.call(current_sources, signal))) {
3786
- var deps = active_reaction.deps;
3787
- if ((active_reaction.f & REACTION_IS_UPDATING) !== 0) {
3788
- if (signal.rv < read_version) {
3789
- signal.rv = read_version;
3790
- if (new_deps === null && deps !== null && deps[skipped_deps] === signal) {
3791
- skipped_deps++;
3792
- } else if (new_deps === null) {
3793
- new_deps = [signal];
3794
- } else {
3795
- new_deps.push(signal);
3796
- }
3797
- }
3798
- } else {
3799
- (active_reaction.deps ??= []).push(signal);
3800
- var reactions = signal.reactions;
3801
- if (reactions === null) {
3802
- signal.reactions = [active_reaction];
3803
- } else if (!includes.call(reactions, active_reaction)) {
3804
- reactions.push(active_reaction);
3805
- }
3806
- }
3807
- }
3808
- }
3809
- if (true_default) {
3810
- if (!untracking && reactivity_loss_tracker && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & REACTION_IS_UPDATING) === 0) {
3811
- reactivity_loss_tracker.warned = true;
3812
- await_reactivity_loss(signal.label);
3813
- var trace2 = get_error("traced at");
3814
- if (trace2)
3815
- console.warn(trace2);
3816
- }
3817
- recent_async_deriveds.delete(signal);
3818
- if (tracing_mode_flag && !untracking && tracing_expressions !== null && active_reaction !== null && tracing_expressions.reaction === active_reaction) {
3819
- if (signal.trace) {
3820
- signal.trace();
3821
- } else {
3822
- trace2 = get_error("traced at");
3823
- if (trace2) {
3824
- var entry = tracing_expressions.entries.get(signal);
3825
- if (entry === undefined) {
3826
- entry = { traces: [] };
3827
- tracing_expressions.entries.set(signal, entry);
3828
- }
3829
- var last = entry.traces[entry.traces.length - 1];
3830
- if (trace2.stack !== last?.stack) {
3831
- entry.traces.push(trace2);
3832
- }
3833
- }
3834
- }
3835
- }
3836
- }
3837
- if (is_destroying_effect && old_values.has(signal)) {
3838
- return old_values.get(signal);
3839
- }
3840
- if (is_derived) {
3841
- var derived3 = signal;
3842
- if (is_destroying_effect) {
3843
- var value = derived3.v;
3844
- if ((derived3.f & CLEAN) === 0 && derived3.reactions !== null || depends_on_old_values(derived3)) {
3845
- value = execute_derived(derived3);
3846
- }
3847
- old_values.set(derived3, value);
3848
- return value;
3849
- }
3850
- var should_connect = (derived3.f & CONNECTED) === 0 && !untracking && active_reaction !== null && (is_updating_effect || (active_reaction.f & CONNECTED) !== 0);
3851
- var is_new = (derived3.f & REACTION_RAN) === 0;
3852
- if (is_dirty(derived3)) {
3853
- if (should_connect) {
3854
- derived3.f |= CONNECTED;
3855
- }
3856
- update_derived(derived3);
3857
- }
3858
- if (should_connect && !is_new) {
3859
- unfreeze_derived_effects(derived3);
3860
- reconnect(derived3);
3861
- }
3862
- }
3863
- if (batch_values?.has(signal)) {
3864
- return batch_values.get(signal);
3865
- }
3866
- if ((signal.f & ERROR_VALUE) !== 0) {
3867
- throw signal.v;
3868
- }
3869
- return signal.v;
3870
- }
3871
- function reconnect(derived3) {
3872
- derived3.f |= CONNECTED;
3873
- if (derived3.deps === null)
3874
- return;
3875
- for (const dep of derived3.deps) {
3876
- (dep.reactions ??= []).push(derived3);
3877
- if ((dep.f & DERIVED) !== 0 && (dep.f & CONNECTED) === 0) {
3878
- unfreeze_derived_effects(dep);
3879
- reconnect(dep);
3880
- }
3881
- }
3882
- }
3883
- function depends_on_old_values(derived3) {
3884
- if (derived3.v === UNINITIALIZED)
3885
- return true;
3886
- if (derived3.deps === null)
3887
- return false;
3888
- for (const dep of derived3.deps) {
3889
- if (old_values.has(dep)) {
3890
- return true;
3891
- }
3892
- if ((dep.f & DERIVED) !== 0 && depends_on_old_values(dep)) {
3893
- return true;
3894
- }
3895
- }
3896
- return false;
3897
- }
3898
- function safe_get(signal) {
3899
- return signal && get(signal);
3900
- }
3901
- function untrack(fn) {
3902
- var previous_untracking = untracking;
3903
- try {
3904
- untracking = true;
3905
- return fn();
3906
- } finally {
3907
- untracking = previous_untracking;
3908
- }
3909
- }
3910
- function deep_read_state(value) {
3911
- if (typeof value !== "object" || !value || value instanceof EventTarget) {
3912
- return;
3913
- }
3914
- if (STATE_SYMBOL in value) {
3915
- deep_read(value);
3916
- } else if (!Array.isArray(value)) {
3917
- for (let key in value) {
3918
- const prop = value[key];
3919
- if (typeof prop === "object" && prop && STATE_SYMBOL in prop) {
3920
- deep_read(prop);
3921
- }
3922
- }
3923
- }
3924
- }
3925
- function deep_read(value, visited = new Set) {
3926
- if (typeof value === "object" && value !== null && !(value instanceof EventTarget) && !visited.has(value)) {
3927
- visited.add(value);
3928
- if (value instanceof Date) {
3929
- value.getTime();
3930
- }
3931
- for (let key in value) {
3932
- try {
3933
- deep_read(value[key], visited);
3934
- } catch (e) {}
3935
- }
3936
- const proto = get_prototype_of(value);
3937
- if (proto !== Object.prototype && proto !== Array.prototype && proto !== Map.prototype && proto !== Set.prototype && proto !== Date.prototype) {
3938
- const descriptors = get_descriptors(proto);
3939
- for (let key in descriptors) {
3940
- const get3 = descriptors[key].get;
3941
- if (get3) {
3942
- try {
3943
- get3.call(value);
3944
- } catch (e) {}
3945
- }
3946
- }
3947
- }
3948
- }
3949
- }
3950
-
3951
- // node_modules/svelte/src/internal/client/proxy.js
3952
- var regex_is_valid_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
3953
- function proxy(value) {
3954
- if (typeof value !== "object" || value === null || STATE_SYMBOL in value) {
3955
- return value;
3956
- }
3957
- const prototype = get_prototype_of(value);
3958
- if (prototype !== object_prototype && prototype !== array_prototype) {
3959
- return value;
3960
- }
3961
- var sources = new Map;
3962
- var is_proxied_array = is_array(value);
3963
- var version = state(0);
3964
- var stack2 = true_default && tracing_mode_flag ? get_error("created at") : null;
3965
- var parent_version = update_version;
3966
- var with_parent = (fn) => {
3967
- if (update_version === parent_version) {
3968
- return fn();
3969
- }
3970
- var reaction = active_reaction;
3971
- var version2 = update_version;
3972
- set_active_reaction(null);
3973
- set_update_version(parent_version);
3974
- var result = fn();
3975
- set_active_reaction(reaction);
3976
- set_update_version(version2);
3977
- return result;
3978
- };
3979
- if (is_proxied_array) {
3980
- sources.set("length", state(value.length, stack2));
3981
- if (true_default) {
3982
- value = inspectable_array(value);
3983
- }
3984
- }
3985
- var path = "";
3986
- let updating = false;
3987
- function update_path(new_path) {
3988
- if (updating)
3989
- return;
3990
- updating = true;
3991
- path = new_path;
3992
- tag(version, `${path} version`);
3993
- for (const [prop, source2] of sources) {
3994
- tag(source2, get_label(path, prop));
3995
- }
3996
- updating = false;
3997
- }
3998
- return new Proxy(value, {
3999
- defineProperty(_, prop, descriptor) {
4000
- if (!("value" in descriptor) || descriptor.configurable === false || descriptor.enumerable === false || descriptor.writable === false) {
4001
- state_descriptors_fixed();
4002
- }
4003
- var s = sources.get(prop);
4004
- if (s === undefined) {
4005
- with_parent(() => {
4006
- var s2 = state(descriptor.value, stack2);
4007
- sources.set(prop, s2);
4008
- if (true_default && typeof prop === "string") {
4009
- tag(s2, get_label(path, prop));
4010
- }
4011
- return s2;
4012
- });
4013
- } else {
4014
- set(s, descriptor.value, true);
4015
- }
4016
- return true;
4017
- },
4018
- deleteProperty(target, prop) {
4019
- var s = sources.get(prop);
4020
- if (s === undefined) {
4021
- if (prop in target) {
4022
- const s2 = with_parent(() => state(UNINITIALIZED, stack2));
4023
- sources.set(prop, s2);
4024
- increment(version);
4025
- if (true_default) {
4026
- tag(s2, get_label(path, prop));
4027
- }
4028
- }
4029
- } else {
4030
- set(s, UNINITIALIZED);
4031
- increment(version);
4032
- }
4033
- return true;
4034
- },
4035
- get(target, prop, receiver) {
4036
- if (prop === STATE_SYMBOL) {
4037
- return value;
4038
- }
4039
- if (true_default && prop === PROXY_PATH_SYMBOL) {
4040
- return update_path;
4041
- }
4042
- var s = sources.get(prop);
4043
- var exists = prop in target;
4044
- if (s === undefined && (!exists || get_descriptor(target, prop)?.writable)) {
4045
- s = with_parent(() => {
4046
- var p = proxy(exists ? target[prop] : UNINITIALIZED);
4047
- var s2 = state(p, stack2);
4048
- if (true_default) {
4049
- tag(s2, get_label(path, prop));
4050
- }
4051
- return s2;
4052
- });
4053
- sources.set(prop, s);
4054
- }
4055
- if (s !== undefined) {
4056
- var v = get(s);
4057
- return v === UNINITIALIZED ? undefined : v;
4058
- }
4059
- return Reflect.get(target, prop, receiver);
4060
- },
4061
- getOwnPropertyDescriptor(target, prop) {
4062
- var descriptor = Reflect.getOwnPropertyDescriptor(target, prop);
4063
- if (descriptor && "value" in descriptor) {
4064
- var s = sources.get(prop);
4065
- if (s)
4066
- descriptor.value = get(s);
4067
- } else if (descriptor === undefined) {
4068
- var source2 = sources.get(prop);
4069
- var value2 = source2?.v;
4070
- if (source2 !== undefined && value2 !== UNINITIALIZED) {
4071
- return {
4072
- enumerable: true,
4073
- configurable: true,
4074
- value: value2,
4075
- writable: true
4076
- };
4077
- }
4078
- }
4079
- return descriptor;
4080
- },
4081
- has(target, prop) {
4082
- if (prop === STATE_SYMBOL) {
4083
- return true;
4084
- }
4085
- var s = sources.get(prop);
4086
- var has = s !== undefined && s.v !== UNINITIALIZED || Reflect.has(target, prop);
4087
- if (s !== undefined || active_effect !== null && (!has || get_descriptor(target, prop)?.writable)) {
4088
- if (s === undefined) {
4089
- s = with_parent(() => {
4090
- var p = has ? proxy(target[prop]) : UNINITIALIZED;
4091
- var s2 = state(p, stack2);
4092
- if (true_default) {
4093
- tag(s2, get_label(path, prop));
4094
- }
4095
- return s2;
4096
- });
4097
- sources.set(prop, s);
4098
- }
4099
- var value2 = get(s);
4100
- if (value2 === UNINITIALIZED) {
4101
- return false;
4102
- }
4103
- }
4104
- return has;
4105
- },
4106
- set(target, prop, value2, receiver) {
4107
- var s = sources.get(prop);
4108
- var has = prop in target;
4109
- if (is_proxied_array && prop === "length") {
4110
- for (var i = value2;i < s.v; i += 1) {
4111
- var other_s = sources.get(i + "");
4112
- if (other_s !== undefined) {
4113
- set(other_s, UNINITIALIZED);
4114
- } else if (i in target) {
4115
- other_s = with_parent(() => state(UNINITIALIZED, stack2));
4116
- sources.set(i + "", other_s);
4117
- if (true_default) {
4118
- tag(other_s, get_label(path, i));
4119
- }
4120
- }
4121
- }
4122
- }
4123
- if (s === undefined) {
4124
- if (!has || get_descriptor(target, prop)?.writable) {
4125
- s = with_parent(() => state(undefined, stack2));
4126
- if (true_default) {
4127
- tag(s, get_label(path, prop));
4128
- }
4129
- set(s, proxy(value2));
4130
- sources.set(prop, s);
4131
- }
4132
- } else {
4133
- has = s.v !== UNINITIALIZED;
4134
- var p = with_parent(() => proxy(value2));
4135
- set(s, p);
4136
- }
4137
- var descriptor = Reflect.getOwnPropertyDescriptor(target, prop);
4138
- if (descriptor?.set) {
4139
- descriptor.set.call(receiver, value2);
4140
- }
4141
- if (!has) {
4142
- if (is_proxied_array && typeof prop === "string") {
4143
- var ls = sources.get("length");
4144
- var n = Number(prop);
4145
- if (Number.isInteger(n) && n >= ls.v) {
4146
- set(ls, n + 1);
4147
- }
4148
- }
4149
- increment(version);
4150
- }
4151
- return true;
4152
- },
4153
- ownKeys(target) {
4154
- get(version);
4155
- var own_keys = Reflect.ownKeys(target).filter((key2) => {
4156
- var source3 = sources.get(key2);
4157
- return source3 === undefined || source3.v !== UNINITIALIZED;
4158
- });
4159
- for (var [key, source2] of sources) {
4160
- if (source2.v !== UNINITIALIZED && !(key in target)) {
4161
- own_keys.push(key);
4162
- }
4163
- }
4164
- return own_keys;
4165
- },
4166
- setPrototypeOf() {
4167
- state_prototype_fixed();
4168
- }
4169
- });
4170
- }
4171
- function get_label(path, prop) {
4172
- if (typeof prop === "symbol")
4173
- return `${path}[Symbol(${prop.description ?? ""})]`;
4174
- if (regex_is_valid_identifier.test(prop))
4175
- return `${path}.${prop}`;
4176
- return /^\d+$/.test(prop) ? `${path}[${prop}]` : `${path}['${prop}']`;
4177
- }
4178
- function get_proxied_value(value) {
4179
- try {
4180
- if (value !== null && typeof value === "object" && STATE_SYMBOL in value) {
4181
- return value[STATE_SYMBOL];
4182
- }
4183
- } catch {}
4184
- return value;
4185
- }
4186
- function is(a, b) {
4187
- return Object.is(get_proxied_value(a), get_proxied_value(b));
4188
- }
4189
- var ARRAY_MUTATING_METHODS = new Set([
4190
- "copyWithin",
4191
- "fill",
4192
- "pop",
4193
- "push",
4194
- "reverse",
4195
- "shift",
4196
- "sort",
4197
- "splice",
4198
- "unshift"
4199
- ]);
4200
- function inspectable_array(array) {
4201
- return new Proxy(array, {
4202
- get(target, prop, receiver) {
4203
- var value = Reflect.get(target, prop, receiver);
4204
- if (!ARRAY_MUTATING_METHODS.has(prop)) {
4205
- return value;
4206
- }
4207
- return function(...args) {
4208
- set_eager_effects_deferred();
4209
- var result = value.apply(this, args);
4210
- flush_eager_effects();
4211
- return result;
4212
- };
4213
- }
4214
- });
4215
- }
4216
-
4217
- // node_modules/svelte/src/internal/client/dev/equality.js
4218
- function init_array_prototype_warnings() {
4219
- const array_prototype2 = Array.prototype;
4220
- const cleanup = Array.__svelte_cleanup;
4221
- if (cleanup) {
4222
- cleanup();
4223
- }
4224
- const { indexOf, lastIndexOf, includes: includes2 } = array_prototype2;
4225
- array_prototype2.indexOf = function(item, from_index) {
4226
- const index = indexOf.call(this, item, from_index);
4227
- if (index === -1) {
4228
- for (let i = from_index ?? 0;i < this.length; i += 1) {
4229
- if (get_proxied_value(this[i]) === item) {
4230
- state_proxy_equality_mismatch("array.indexOf(...)");
4231
- break;
4232
- }
4233
- }
4234
- }
4235
- return index;
4236
- };
4237
- array_prototype2.lastIndexOf = function(item, from_index) {
4238
- const index = lastIndexOf.call(this, item, from_index ?? this.length - 1);
4239
- if (index === -1) {
4240
- for (let i = 0;i <= (from_index ?? this.length - 1); i += 1) {
4241
- if (get_proxied_value(this[i]) === item) {
4242
- state_proxy_equality_mismatch("array.lastIndexOf(...)");
4243
- break;
4244
- }
4245
- }
4246
- }
4247
- return index;
4248
- };
4249
- array_prototype2.includes = function(item, from_index) {
4250
- const has = includes2.call(this, item, from_index);
4251
- if (!has) {
4252
- for (let i = 0;i < this.length; i += 1) {
4253
- if (get_proxied_value(this[i]) === item) {
4254
- state_proxy_equality_mismatch("array.includes(...)");
4255
- break;
4256
- }
4257
- }
4258
- }
4259
- return has;
4260
- };
4261
- Array.__svelte_cleanup = () => {
4262
- array_prototype2.indexOf = indexOf;
4263
- array_prototype2.lastIndexOf = lastIndexOf;
4264
- array_prototype2.includes = includes2;
4265
- };
4266
- }
4267
- function strict_equals(a, b, equal = true) {
4268
- try {
4269
- if (a === b !== (get_proxied_value(a) === get_proxied_value(b))) {
4270
- state_proxy_equality_mismatch(equal ? "===" : "!==");
4271
- }
4272
- } catch {}
4273
- return a === b === equal;
4274
- }
4275
- function equals2(a, b, equal = true) {
4276
- if (a == b !== (get_proxied_value(a) == get_proxied_value(b))) {
4277
- state_proxy_equality_mismatch(equal ? "==" : "!=");
4278
- }
4279
- return a == b === equal;
4280
- }
4281
-
4282
- // node_modules/svelte/src/internal/client/dom/operations.js
4283
- var $window;
4284
- var $document;
4285
- var is_firefox;
4286
- var first_child_getter;
4287
- var next_sibling_getter;
4288
- function init_operations() {
4289
- if ($window !== undefined) {
4290
- return;
4291
- }
4292
- $window = window;
4293
- $document = document;
4294
- is_firefox = /Firefox/.test(navigator.userAgent);
4295
- var element_prototype = Element.prototype;
4296
- var node_prototype = Node.prototype;
4297
- var text_prototype = Text.prototype;
4298
- first_child_getter = get_descriptor(node_prototype, "firstChild").get;
4299
- next_sibling_getter = get_descriptor(node_prototype, "nextSibling").get;
4300
- if (is_extensible(element_prototype)) {
4301
- element_prototype.__click = undefined;
4302
- element_prototype.__className = undefined;
4303
- element_prototype.__attributes = null;
4304
- element_prototype.__style = undefined;
4305
- element_prototype.__e = undefined;
4306
- }
4307
- if (is_extensible(text_prototype)) {
4308
- text_prototype.__t = undefined;
4309
- }
4310
- if (true_default) {
4311
- element_prototype.__svelte_meta = null;
4312
- init_array_prototype_warnings();
4313
- }
4314
- }
4315
- function create_text(value = "") {
4316
- return document.createTextNode(value);
4317
- }
4318
- function get_first_child(node) {
4319
- return first_child_getter.call(node);
4320
- }
4321
- function get_next_sibling(node) {
4322
- return next_sibling_getter.call(node);
4323
- }
4324
- function child(node, is_text) {
4325
- if (!hydrating) {
4326
- return get_first_child(node);
4327
- }
4328
- var child2 = get_first_child(hydrate_node);
4329
- if (child2 === null) {
4330
- child2 = hydrate_node.appendChild(create_text());
4331
- } else if (is_text && child2.nodeType !== TEXT_NODE) {
4332
- var text = create_text();
4333
- child2?.before(text);
4334
- set_hydrate_node(text);
4335
- return text;
4336
- }
4337
- if (is_text) {
4338
- merge_text_nodes(child2);
4339
- }
4340
- set_hydrate_node(child2);
4341
- return child2;
4342
- }
4343
- function first_child(node, is_text = false) {
4344
- if (!hydrating) {
4345
- var first = get_first_child(node);
4346
- if (first instanceof Comment && first.data === "")
4347
- return get_next_sibling(first);
4348
- return first;
4349
- }
4350
- if (is_text) {
4351
- if (hydrate_node?.nodeType !== TEXT_NODE) {
4352
- var text = create_text();
4353
- hydrate_node?.before(text);
4354
- set_hydrate_node(text);
4355
- return text;
4356
- }
4357
- merge_text_nodes(hydrate_node);
4358
- }
4359
- return hydrate_node;
4360
- }
4361
- function sibling(node, count = 1, is_text = false) {
4362
- let next_sibling = hydrating ? hydrate_node : node;
4363
- var last_sibling;
4364
- while (count--) {
4365
- last_sibling = next_sibling;
4366
- next_sibling = get_next_sibling(next_sibling);
4367
- }
4368
- if (!hydrating) {
4369
- return next_sibling;
4370
- }
4371
- if (is_text) {
4372
- if (next_sibling?.nodeType !== TEXT_NODE) {
4373
- var text = create_text();
4374
- if (next_sibling === null) {
4375
- last_sibling?.after(text);
4376
- } else {
4377
- next_sibling.before(text);
4378
- }
4379
- set_hydrate_node(text);
4380
- return text;
4381
- }
4382
- merge_text_nodes(next_sibling);
4383
- }
4384
- set_hydrate_node(next_sibling);
4385
- return next_sibling;
4386
- }
4387
- function clear_text_content(node) {
4388
- node.textContent = "";
4389
- }
4390
- function should_defer_append() {
4391
- if (!async_mode_flag)
4392
- return false;
4393
- if (eager_block_effects !== null)
4394
- return false;
4395
- var flags2 = active_effect.f;
4396
- return (flags2 & REACTION_RAN) !== 0;
4397
- }
4398
- function create_element(tag2, namespace, is2) {
4399
- let options = is2 ? { is: is2 } : undefined;
4400
- return document.createElementNS(namespace ?? NAMESPACE_HTML, tag2, options);
4401
- }
4402
- function create_fragment() {
4403
- return document.createDocumentFragment();
4404
- }
4405
- function create_comment(data = "") {
4406
- return document.createComment(data);
4407
- }
4408
- function set_attribute(element, key, value = "") {
4409
- if (key.startsWith("xlink:")) {
4410
- element.setAttributeNS("http://www.w3.org/1999/xlink", key, value);
4411
- return;
4412
- }
4413
- return element.setAttribute(key, value);
4414
- }
4415
- function merge_text_nodes(text) {
4416
- if (text.nodeValue.length < 65536) {
4417
- return;
4418
- }
4419
- let next2 = text.nextSibling;
4420
- while (next2 !== null && next2.nodeType === TEXT_NODE) {
4421
- next2.remove();
4422
- text.nodeValue += next2.nodeValue;
4423
- next2 = text.nextSibling;
4424
- }
4425
- }
4426
-
4427
- // node_modules/svelte/src/internal/client/dom/hydration.js
4428
- var hydrating = false;
4429
- function set_hydrating(value) {
4430
- hydrating = value;
4431
- }
4432
- var hydrate_node;
4433
- function set_hydrate_node(node) {
4434
- if (node === null) {
4435
- hydration_mismatch();
4436
- throw HYDRATION_ERROR;
4437
- }
4438
- return hydrate_node = node;
4439
- }
4440
- function hydrate_next() {
4441
- return set_hydrate_node(get_next_sibling(hydrate_node));
4442
- }
4443
- function reset(node) {
4444
- if (!hydrating)
4445
- return;
4446
- if (get_next_sibling(hydrate_node) !== null) {
4447
- hydration_mismatch();
4448
- throw HYDRATION_ERROR;
4449
- }
4450
- hydrate_node = node;
4451
- }
4452
- function hydrate_template(template) {
4453
- if (hydrating) {
4454
- hydrate_node = template.content;
4455
- }
4456
- }
4457
- function next(count = 1) {
4458
- if (hydrating) {
4459
- var i = count;
4460
- var node = hydrate_node;
4461
- while (i--) {
4462
- node = get_next_sibling(node);
4463
- }
4464
- hydrate_node = node;
4465
- }
4466
- }
4467
- function skip_nodes(remove = true) {
4468
- var depth = 0;
4469
- var node = hydrate_node;
4470
- while (true) {
4471
- if (node.nodeType === COMMENT_NODE) {
4472
- var data = node.data;
4473
- if (data === HYDRATION_END) {
4474
- if (depth === 0)
4475
- return node;
4476
- depth -= 1;
4477
- } else if (data === HYDRATION_START || data === HYDRATION_START_ELSE || data[0] === "[" && !isNaN(Number(data.slice(1)))) {
4478
- depth += 1;
4479
- }
4480
- }
4481
- var next2 = get_next_sibling(node);
4482
- if (remove)
4483
- node.remove();
4484
- node = next2;
4485
- }
4486
- }
4487
- function read_hydration_instruction(node) {
4488
- if (!node || node.nodeType !== COMMENT_NODE) {
4489
- hydration_mismatch();
4490
- throw HYDRATION_ERROR;
4491
- }
4492
- return node.data;
4493
- }
4494
-
4495
- export { true_default, is_array, array_from, object_keys, define_property, get_descriptor, get_descriptors, get_prototype_of, has_own_property, is_function, noop, is_promise, run, run_all, fallback, to_array, exclude_from_object, BLOCK_EFFECT, BRANCH_EFFECT, INERT, DESTROYED, REACTION_RAN, DESTROYING, EFFECT_TRANSPARENT, HEAD_EFFECT, EFFECT_PRESERVED, EFFECT_OFFSCREEN, STATE_SYMBOL, LEGACY_PROPS, LOADING_ATTR_SYMBOL, IS_XHTML, ELEMENT_NODE, TEXT_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, experimental_async_required, invalid_default_snippet, invalid_snippet_arguments, lifecycle_outside_component, snippet_without_render_tag, store_invalid_shape, svelte_element_invalid_this_value, bind_invalid_checkbox_value, component_api_changed, component_api_invalid_new, each_key_duplicate, each_key_volatile, get_abort_signal_outside_reaction, hydratable_missing_but_required, hydration_failed, invalid_snippet, lifecycle_legacy_only, props_invalid_value, props_rest_readonly, rune_outside_svelte, EACH_ITEM_REACTIVE, EACH_INDEX_REACTIVE, EACH_IS_CONTROLLED, EACH_IS_ANIMATED, EACH_ITEM_IMMUTABLE, PROPS_IS_IMMUTABLE, PROPS_IS_RUNES, PROPS_IS_UPDATED, PROPS_IS_BINDABLE, PROPS_IS_LAZY_INITIAL, TRANSITION_IN, TRANSITION_OUT, TRANSITION_GLOBAL, TEMPLATE_FRAGMENT, TEMPLATE_USE_IMPORT_NODE, TEMPLATE_USE_SVG, TEMPLATE_USE_MATHML, HYDRATION_START, HYDRATION_START_ELSE, HYDRATION_END, HYDRATION_ERROR, UNINITIALIZED, FILENAME, HMR, NAMESPACE_HTML, NAMESPACE_SVG, NAMESPACE_MATHML, ATTACHMENT_KEY, assignment_value_stale, binding_property_non_reactive, console_log_state, event_handler_invalid, hydratable_missing_but_expected, hydration_attribute_changed, hydration_html_changed, hydration_mismatch, invalid_raw_snippet_render, lifecycle_double_unmount, ownership_invalid_binding, ownership_invalid_mutation, select_multiple_invalid_value, state_proxy_unmount, hydrating, set_hydrating, hydrate_node, set_hydrate_node, hydrate_next, reset, hydrate_template, next, skip_nodes, read_hydration_instruction, safe_not_equal, dynamic_void_element_content, snapshot, trace, tag, tag_proxy, get_error, component_context, dev_stack, add_svelte_meta, dev_current_component_function, set_dev_current_component_function, createContext, getContext, setContext, hasContext, getAllContexts, push, pop, is_runes, queue_micro_task, invoke_error_boundary, readable, writable, derived2 as derived, readonly, get2 as get, store_get, store_unsub, store_set, invalidate_store, setup_stores, store_mutate, update_store, update_pre_store, mark_store_binding, capture_store_binding, current_batch, previous_batch, is_flushing_sync, Batch, flushSync, eager, fork, createSubscriber, boundary, pending, flatten, run_after_blockers, capture, save, track_reactivity_loss, for_await_track_reactivity_loss, unset_context, run2 as run1, wait, increment_pending, derived as derived1, async_derived, user_derived, derived_safe_equal, source, state, mutable_source, mutate, set, internal_set, update, update_pre, proxy, is, strict_equals, equals2 as equals, $window, $document, is_firefox, init_operations, create_text, get_first_child, get_next_sibling, child, first_child, sibling, clear_text_content, should_defer_append, create_element, create_fragment, create_comment, set_attribute, merge_text_nodes, autofocus, remove_textarea_child, add_form_reset_listener, listen, without_reactive_context, listen_to_event_and_reset_event, validate_effect, effect_tracking, teardown, user_effect, user_pre_effect, eager_effect, effect_root, component_root, effect, legacy_pre_effect, legacy_pre_effect_reset, render_effect, template_effect, deferred_template_effect, block, managed, branch, destroy_effect, remove_effect_dom, pause_effect, resume_effect, aborted, move_effect, invalidate_inner_signals, is_destroying_effect, active_reaction, set_active_reaction, active_effect, set_active_effect, tick, settled, get as get1, safe_get, untrack, deep_read_state, deep_read };