@axerity/cli 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/axerity.default.json +1 -1
- package/dist/client/_app/immutable/assets/2.DhWLHyyI.css +1 -0
- package/dist/client/_app/immutable/chunks/{hOQd14_i.js → 3zhJCuPD.js} +1 -1
- package/dist/client/_app/immutable/chunks/{Dn1BfjD4.js → 53uZe945.js} +1 -1
- package/dist/client/_app/immutable/chunks/{BjVjgMFk2.js → BAYmjVfE2.js} +1 -1
- package/dist/client/_app/immutable/chunks/{SbORYBuH.js → BDI8hnph.js} +1 -1
- package/dist/client/_app/immutable/chunks/BFAQUmTz.js +1 -0
- package/dist/client/_app/immutable/chunks/{CjixP7Y6.js → BFQipqJB.js} +1 -1
- package/dist/client/_app/immutable/chunks/BFRg3W-F.js +1 -0
- package/dist/client/_app/immutable/chunks/{BG7FFg0W2.js → BHDeYRpO2.js} +1 -1
- package/dist/client/_app/immutable/chunks/{DDXR3Aw12.js → BHR_F_t32.js} +1 -1
- package/dist/client/_app/immutable/chunks/{9IekHN0-.js → BM8_zthS.js} +1 -1
- package/dist/client/_app/immutable/chunks/{B8E5l9fg2.js → BMOoVw-k2.js} +1 -1
- package/dist/client/_app/immutable/chunks/{BydbDrPy.js → BPMaLfda.js} +3 -3
- package/dist/client/_app/immutable/chunks/BR449RvF.js +1 -0
- package/dist/client/_app/immutable/chunks/BUz0I7ul.js +1 -0
- package/dist/client/_app/immutable/chunks/BXNSIfnG.js +124 -0
- package/dist/client/_app/immutable/chunks/{DgYtIg5Q2.js → BdDGssl42.js} +1 -1
- package/dist/client/_app/immutable/chunks/{29nvmPLe2.js → BlXvQjZe2.js} +1 -1
- package/dist/client/_app/immutable/chunks/Bnac6ltA.js +1 -0
- package/dist/client/_app/immutable/chunks/{CXC42hVj2.js → BtZX_eMV2.js} +1 -1
- package/dist/client/_app/immutable/chunks/BuVSglE6.js +1 -0
- package/dist/client/_app/immutable/chunks/{CUWABXvb2.js → C-p5-iNK2.js} +1 -1
- package/dist/client/_app/immutable/chunks/{0CIKaoUA.js → C18gA2PH.js} +1 -1
- package/dist/client/_app/immutable/chunks/{Chn8RaCU2.js → C6ca-Knu2.js} +1 -1
- package/dist/client/_app/immutable/chunks/{BdkVA8sR.js → CGbXsxiy.js} +1 -1
- package/dist/client/_app/immutable/chunks/CJipSaHd.js +1 -0
- package/dist/client/_app/immutable/chunks/{DG5yTEkY.js → CPz-TBEA.js} +1 -1
- package/dist/client/_app/immutable/chunks/{CPm95Jbd.js → CQORkk8-.js} +1 -1
- package/dist/client/_app/immutable/chunks/{DkLLcw4S2.js → CXLR2EHz2.js} +1 -1
- package/dist/client/_app/immutable/chunks/{C52bpLvU.js → CZ0cYm2x.js} +1 -1
- package/dist/client/_app/immutable/chunks/{mmyK4psQ.js → CZiFlYgk.js} +1 -1
- package/dist/client/_app/immutable/chunks/Cfv_UPq2.js +3 -0
- package/dist/client/_app/immutable/chunks/{DGHybmkM2.js → CgmTaJ8d2.js} +1 -1
- package/dist/client/_app/immutable/chunks/{D5KVydqU.js → CiHIt2YG.js} +1 -1
- package/dist/client/_app/immutable/chunks/{DITdNjTm.js → CiW5yEDh.js} +1 -1
- package/dist/client/_app/immutable/chunks/CknXd1We.js +3 -0
- package/dist/client/_app/immutable/chunks/CltrrRSS.js +1 -0
- package/dist/client/_app/immutable/chunks/CmTDhATw.js +1 -0
- package/dist/client/_app/immutable/chunks/{DjHIY2T-.js → CoCevRkN.js} +1 -1
- package/dist/client/_app/immutable/chunks/{jw1rI_K6.js → CyXMInz4.js} +1 -1
- package/dist/client/_app/immutable/chunks/{B9DYqOIj.js → Czol_Abj.js} +1 -1
- package/dist/client/_app/immutable/chunks/{DC_PITHB2.js → D-TGA8WR2.js} +1 -1
- package/dist/client/_app/immutable/chunks/{aheLp5ES.js → D6c3WrhX.js} +1 -1
- package/dist/client/_app/immutable/chunks/{B_WlrXGf.js → D7r2UEIp.js} +1 -1
- package/dist/client/_app/immutable/chunks/{nmxqo83B.js → DAx_rZyE.js} +2 -2
- package/dist/client/_app/immutable/chunks/{0oJDGpiH.js → DCLuoHbo.js} +1 -1
- package/dist/client/_app/immutable/chunks/{ED9-GWAc2.js → DCPWdIoq2.js} +1 -1
- package/dist/client/_app/immutable/chunks/{DguRYYoc.js → DDShjGNr.js} +1 -1
- package/dist/client/_app/immutable/chunks/{qD2cSsUD2.js → DD_46lBB2.js} +1 -1
- package/dist/client/_app/immutable/chunks/{BcuUc08l.js → DDqudhAi.js} +1 -1
- package/dist/client/_app/immutable/chunks/{DPoU52N62.js → DE5tNz5Y2.js} +1 -1
- package/dist/client/_app/immutable/chunks/DJ3ZXVXb.js +1 -0
- package/dist/client/_app/immutable/chunks/DTcvOvVk.js +1 -0
- package/dist/client/_app/immutable/chunks/{Bv0OTsBk.js → DV6jTwmw.js} +1 -1
- package/dist/client/_app/immutable/chunks/{0tC8Ubqr.js → DhYL8InI.js} +1 -1
- package/dist/client/_app/immutable/chunks/{BvKCZK04.js → DkVSDR0x.js} +1 -1
- package/dist/client/_app/immutable/chunks/DoXJbn9v2.js +1 -0
- package/dist/client/_app/immutable/chunks/{BpwmCo88.js → DokuivJC.js} +1 -1
- package/dist/client/_app/immutable/chunks/{DUE6JLE3.js → DpLZdHaM.js} +1 -1
- package/dist/client/_app/immutable/chunks/{vx_Tnhqd2.js → DzJbTx-x2.js} +2 -2
- package/dist/client/_app/immutable/chunks/{Drl36yuV.js → KR7vRKhR.js} +1 -1
- package/dist/client/_app/immutable/chunks/{DN7UZn62.js → M9khzxgc.js} +1 -1
- package/dist/client/_app/immutable/chunks/NJ05___j2.js +1 -0
- package/dist/client/_app/immutable/chunks/Nzh6khd2.js +1 -0
- package/dist/client/_app/immutable/chunks/YkkvKMZL.js +1 -0
- package/dist/client/_app/immutable/chunks/ZGh80ZHg.js +1 -0
- package/dist/client/_app/immutable/chunks/h6BdjjI92.js +321 -0
- package/dist/client/_app/immutable/chunks/h9kP9O3o2.js +1 -0
- package/dist/client/_app/immutable/chunks/{B-xzKD0v.js → i12c_YC7.js} +1 -1
- package/dist/client/_app/immutable/chunks/{BvvUMqJ3.js → lIaU_Ndo.js} +1 -1
- package/dist/client/_app/immutable/chunks/{CLrCY0qQ2.js → nVR6wzGD2.js} +1 -1
- package/dist/client/_app/immutable/chunks/{CaWcga612.js → xQVgh2Nz2.js} +1 -1
- package/dist/client/_app/immutable/chunks/{DvqUYvHq.js → xUGxzp67.js} +1 -1
- package/dist/client/_app/immutable/chunks/{Cj0bfwP6.js → ysrxrMHE.js} +1 -1
- package/dist/client/_app/immutable/chunks/{CIIr70Sw2.js → zrLSAr0G2.js} +1 -1
- package/dist/client/_app/immutable/entry/{app.BDLi0wHM.js → app.BVzGOhjG.js} +2 -2
- package/dist/client/_app/immutable/entry/start.k3yD06Si.js +1 -0
- package/dist/client/_app/immutable/nodes/{0.S0IuwSNI.js → 0.Cr0DJ0Ky.js} +1 -1
- package/dist/client/_app/immutable/nodes/{1.CGMKWkDs.js → 1.BQpgqzAh.js} +1 -1
- package/dist/client/_app/immutable/nodes/{2.BUVO8Cyj.js → 2.n7dsgCDR.js} +10 -10
- package/dist/client/_app/version.json +1 -1
- package/dist/server/chunks/{0-C2vlc3Qn.js → 0-VSsoIXA0.js} +6 -6
- package/dist/server/chunks/{0-C2vlc3Qn.js.map → 0-VSsoIXA0.js.map} +1 -1
- package/dist/server/chunks/1-DVU-8-9i.js +9 -0
- package/dist/server/chunks/{1-Br80A-fl.js.map → 1-DVU-8-9i.js.map} +1 -1
- package/dist/server/chunks/{2-BAJPegs3.js → 2-QJ6-LaGI.js} +7 -7
- package/dist/server/chunks/2-QJ6-LaGI.js.map +1 -0
- package/dist/server/chunks/{Icon-Bn7MB_9j.js → Icon-Cf35QSF9.js} +11 -10
- package/dist/server/chunks/Icon-Cf35QSF9.js.map +1 -0
- package/dist/server/chunks/{_error.svelte-4uW97Ztq.js → _error.svelte-d-BjEYcs.js} +6 -6
- package/dist/server/chunks/_error.svelte-d-BjEYcs.js.map +1 -0
- package/dist/server/chunks/{_layout.svelte-CbFOEXeX.js → _layout.svelte-wcEy01M0.js} +2 -2
- package/dist/server/chunks/_layout.svelte-wcEy01M0.js.map +1 -0
- package/dist/server/chunks/{_page.svelte-D1gIlQSi.js → _page.svelte-BOd5mfMw.js} +34 -29
- package/dist/server/chunks/_page.svelte-BOd5mfMw.js.map +1 -0
- package/dist/server/chunks/{_server.ts-P67RJKF7.js → _server.ts-B4oNrDKh.js} +4 -4
- package/dist/server/chunks/{_server.ts-P67RJKF7.js.map → _server.ts-B4oNrDKh.js.map} +1 -1
- package/dist/server/chunks/{_server.ts-BYnp5UH6.js → _server.ts-BTDCpOL5.js} +4 -4
- package/dist/server/chunks/_server.ts-BTDCpOL5.js.map +1 -0
- package/dist/server/chunks/{_server.ts-B2YUaKpI.js → _server.ts-BoXbbbOz.js} +4 -4
- package/dist/server/chunks/{_server.ts-B2YUaKpI.js.map → _server.ts-BoXbbbOz.js.map} +1 -1
- package/dist/server/chunks/{_server.ts-R7CXAsG6.js → _server.ts-CEX8Fp7r.js} +3 -3
- package/dist/server/chunks/{_server.ts-R7CXAsG6.js.map → _server.ts-CEX8Fp7r.js.map} +1 -1
- package/dist/server/chunks/{_server.ts-7iaXTzco.js → _server.ts-CMdj1oJD.js} +4 -4
- package/dist/server/chunks/_server.ts-CMdj1oJD.js.map +1 -0
- package/dist/server/chunks/{_server.ts-DeXWgdv1.js → _server.ts-CQg__e5D.js} +6 -5
- package/dist/server/chunks/_server.ts-CQg__e5D.js.map +1 -0
- package/dist/server/chunks/{_server.ts-BnNM_bMg.js → _server.ts-DupX5-bj.js} +4 -4
- package/dist/server/chunks/_server.ts-DupX5-bj.js.map +1 -0
- package/dist/server/chunks/{_server.ts-Dx6GXRUP.js → _server.ts-e7-P1GQu.js} +3 -3
- package/dist/server/chunks/_server.ts-e7-P1GQu.js.map +1 -0
- package/dist/server/chunks/{content-store-CxsJF8Lt.js → content-store-C_HWEaMv.js} +5 -4
- package/dist/server/chunks/{content-store-CxsJF8Lt.js.map → content-store-C_HWEaMv.js.map} +1 -1
- package/dist/server/chunks/{exports-DLRXs2AQ.js → exports-mmLR9hsw.js} +10 -10
- package/dist/server/chunks/exports-mmLR9hsw.js.map +1 -0
- package/dist/server/chunks/{hooks.server-BnQc6rOu.js → hooks.server-i3yJ8tQB.js} +3 -3
- package/dist/server/chunks/{hooks.server-BnQc6rOu.js.map → hooks.server-i3yJ8tQB.js.map} +1 -1
- package/dist/server/chunks/{internal-CzXVc2ua.js → internal2-BGg7Milx.js} +1118 -1113
- package/dist/server/chunks/internal2-BGg7Milx.js.map +1 -0
- package/dist/server/chunks/{site-Cv4fFtLw.js → site-bCTBBNTw.js} +2 -2
- package/dist/server/chunks/site-bCTBBNTw.js.map +1 -0
- package/dist/server/index.js +194 -177
- package/dist/server/index.js.map +1 -1
- package/dist/server/manifest.js +12 -12
- package/dist/server/manifest.js.map +1 -1
- package/package.json +8 -8
- package/dist/client/_app/immutable/assets/2.nEL1N7DM.css +0 -1
- package/dist/client/_app/immutable/chunks/BHpO4_hI.js +0 -1
- package/dist/client/_app/immutable/chunks/BLhBgXDr.js +0 -1
- package/dist/client/_app/immutable/chunks/BN2RMMml.js +0 -1
- package/dist/client/_app/immutable/chunks/BRJCmJIf.js +0 -1
- package/dist/client/_app/immutable/chunks/Bnqy3DA5.js +0 -1
- package/dist/client/_app/immutable/chunks/Bs4qCkME.js +0 -1
- package/dist/client/_app/immutable/chunks/BsRQXaRE2.js +0 -1
- package/dist/client/_app/immutable/chunks/BvEOHWFX.js +0 -1
- package/dist/client/_app/immutable/chunks/C6Oj8XFW.js +0 -1
- package/dist/client/_app/immutable/chunks/CEW3xh3M.js +0 -124
- package/dist/client/_app/immutable/chunks/CRCJVyiH.js +0 -1
- package/dist/client/_app/immutable/chunks/CRrzsWKu.js +0 -1
- package/dist/client/_app/immutable/chunks/CVM4zuXp.js +0 -1
- package/dist/client/_app/immutable/chunks/ChrKn_4b.js +0 -1
- package/dist/client/_app/immutable/chunks/D3mr2Pcs2.js +0 -1
- package/dist/client/_app/immutable/chunks/Dl6Yq-Hy.js +0 -1
- package/dist/client/_app/immutable/chunks/DowYdJZt.js +0 -1
- package/dist/client/_app/immutable/chunks/FqbQrHcz2.js +0 -321
- package/dist/client/_app/immutable/chunks/TUtWo753.js +0 -3
- package/dist/client/_app/immutable/chunks/dcFrWhgf2.js +0 -1
- package/dist/client/_app/immutable/chunks/wCc4pE4l.js +0 -3
- package/dist/client/_app/immutable/entry/start.CajtWzWK.js +0 -1
- package/dist/server/chunks/1-Br80A-fl.js +0 -9
- package/dist/server/chunks/2-BAJPegs3.js.map +0 -1
- package/dist/server/chunks/Icon-Bn7MB_9j.js.map +0 -1
- package/dist/server/chunks/_error.svelte-4uW97Ztq.js.map +0 -1
- package/dist/server/chunks/_layout.svelte-CbFOEXeX.js.map +0 -1
- package/dist/server/chunks/_page.svelte-D1gIlQSi.js.map +0 -1
- package/dist/server/chunks/_server.ts-7iaXTzco.js.map +0 -1
- package/dist/server/chunks/_server.ts-BYnp5UH6.js.map +0 -1
- package/dist/server/chunks/_server.ts-BnNM_bMg.js.map +0 -1
- package/dist/server/chunks/_server.ts-DeXWgdv1.js.map +0 -1
- package/dist/server/chunks/_server.ts-Dx6GXRUP.js.map +0 -1
- package/dist/server/chunks/exports-DLRXs2AQ.js.map +0 -1
- package/dist/server/chunks/internal-CzXVc2ua.js.map +0 -1
- package/dist/server/chunks/site-Cv4fFtLw.js.map +0 -1
|
@@ -11,7 +11,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
11
11
|
return target;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
14
|
-
//#region node_modules/.pnpm/@sveltejs+kit@2.
|
|
14
|
+
//#region node_modules/.pnpm/@sveltejs+kit@2.63.0_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.2_@typescript-eslin_9ed2d7f3800a1c77eec55a1d66c8792d/node_modules/@sveltejs/kit/src/runtime/app/paths/internal/server.js
|
|
15
15
|
var base = "";
|
|
16
16
|
var assets = base;
|
|
17
17
|
var app_dir = "_app";
|
|
@@ -484,7 +484,7 @@ function set_public_env(environment) {
|
|
|
484
484
|
public_env = environment;
|
|
485
485
|
}
|
|
486
486
|
//#endregion
|
|
487
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
487
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/shared/errors.js
|
|
488
488
|
/**
|
|
489
489
|
* Cannot use `%name%(...)` unless the `experimental.async` compiler option is `true`
|
|
490
490
|
* @param {string} name
|
|
@@ -586,7 +586,7 @@ function server_context_required() {
|
|
|
586
586
|
throw error;
|
|
587
587
|
}
|
|
588
588
|
//#endregion
|
|
589
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
589
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/server/context.js
|
|
590
590
|
/** @import { SSRContext } from '#server' */
|
|
591
591
|
/** @type {SSRContext | null} */
|
|
592
592
|
var ssr_context = null;
|
|
@@ -670,7 +670,7 @@ function get_parent_context(ssr_context) {
|
|
|
670
670
|
return null;
|
|
671
671
|
}
|
|
672
672
|
//#endregion
|
|
673
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
673
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/shared/utils.js
|
|
674
674
|
var is_array = Array.isArray;
|
|
675
675
|
var index_of = Array.prototype.indexOf;
|
|
676
676
|
var includes = Array.prototype.includes;
|
|
@@ -746,7 +746,7 @@ var STALE_REACTION = new class StaleReactionError extends Error {
|
|
|
746
746
|
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
747
747
|
}();
|
|
748
748
|
//#endregion
|
|
749
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
749
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/server/abort-signal.js
|
|
750
750
|
/** @type {AbortController | null} */
|
|
751
751
|
var controller = null;
|
|
752
752
|
function abort() {
|
|
@@ -765,7 +765,7 @@ function get_render_context() {
|
|
|
765
765
|
/** @type {AsyncLocalStorage<RenderContext | null> | null} */
|
|
766
766
|
var als = null;
|
|
767
767
|
//#endregion
|
|
768
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
768
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/constants.js
|
|
769
769
|
var HYDRATION_ERROR = {};
|
|
770
770
|
var UNINITIALIZED = Symbol("uninitialized");
|
|
771
771
|
/**
|
|
@@ -780,12 +780,12 @@ function unresolved_hydratable(key, stack) {
|
|
|
780
780
|
console.warn(`https://svelte.dev/e/unresolved_hydratable`);
|
|
781
781
|
}
|
|
782
782
|
//#endregion
|
|
783
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
783
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/server/hydration.js
|
|
784
784
|
var BLOCK_OPEN = `<!--[-->`;
|
|
785
785
|
var BLOCK_CLOSE = `<!--]-->`;
|
|
786
786
|
var EMPTY_COMMENT = `<!---->`;
|
|
787
787
|
//#endregion
|
|
788
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
788
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/escaping.js
|
|
789
789
|
var ATTR_REGEX = /[&"<]/g;
|
|
790
790
|
var CONTENT_REGEX = /[&<]/g;
|
|
791
791
|
/**
|
|
@@ -823,7 +823,7 @@ function clsx$1() {
|
|
|
823
823
|
return n;
|
|
824
824
|
}
|
|
825
825
|
//#endregion
|
|
826
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
826
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/shared/attributes.js
|
|
827
827
|
/**
|
|
828
828
|
* `<div translate={false}>` should be rendered as `<div translate="no">` and _not_
|
|
829
829
|
* `<div translate="false">`, which is equivalent to `<div translate="yes">`. There
|
|
@@ -1023,7 +1023,7 @@ function svelte_boundary_reset_noop() {
|
|
|
1023
1023
|
console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`);
|
|
1024
1024
|
}
|
|
1025
1025
|
//#endregion
|
|
1026
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
1026
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/client/dom/hydration.js
|
|
1027
1027
|
/** @import { TemplateNode } from '#client' */
|
|
1028
1028
|
/**
|
|
1029
1029
|
* Use this variable to guard everything related to hydration code so it can be treeshaken out
|
|
@@ -1082,7 +1082,7 @@ function skip_nodes(remove = true) {
|
|
|
1082
1082
|
}
|
|
1083
1083
|
}
|
|
1084
1084
|
//#endregion
|
|
1085
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
1085
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/client/reactivity/equality.js
|
|
1086
1086
|
/** @import { Equals } from '#client' */
|
|
1087
1087
|
/** @type {Equals} */
|
|
1088
1088
|
function equals(value) {
|
|
@@ -1101,7 +1101,7 @@ function safe_equals(value) {
|
|
|
1101
1101
|
return !safe_not_equal(value, this.v);
|
|
1102
1102
|
}
|
|
1103
1103
|
//#endregion
|
|
1104
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
1104
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/client/context.js
|
|
1105
1105
|
/** @import { ComponentContext, DevStackEntry, Effect } from '#client' */
|
|
1106
1106
|
/** @type {ComponentContext | null} */
|
|
1107
1107
|
var component_context = null;
|
|
@@ -1148,7 +1148,7 @@ function is_runes() {
|
|
|
1148
1148
|
return true;
|
|
1149
1149
|
}
|
|
1150
1150
|
//#endregion
|
|
1151
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
1151
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/client/dom/task.js
|
|
1152
1152
|
/** @type {Array<() => void>} */
|
|
1153
1153
|
var micro_tasks = [];
|
|
1154
1154
|
function run_micro_tasks() {
|
|
@@ -1206,7 +1206,7 @@ function invoke_error_boundary(error, effect) {
|
|
|
1206
1206
|
throw error;
|
|
1207
1207
|
}
|
|
1208
1208
|
//#endregion
|
|
1209
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
1209
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/client/reactivity/status.js
|
|
1210
1210
|
/** @import { Derived, Signal } from '#client' */
|
|
1211
1211
|
var STATUS_MASK = -7169;
|
|
1212
1212
|
/**
|
|
@@ -1225,7 +1225,7 @@ function update_derived_status(derived) {
|
|
|
1225
1225
|
else set_signal_status(derived, MAYBE_DIRTY);
|
|
1226
1226
|
}
|
|
1227
1227
|
//#endregion
|
|
1228
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
1228
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/client/reactivity/utils.js
|
|
1229
1229
|
/** @import { Derived, Effect, Value } from '#client' */
|
|
1230
1230
|
/**
|
|
1231
1231
|
* @param {Value[] | null} deps
|
|
@@ -1253,7 +1253,7 @@ function defer_effect(effect, dirty_effects, maybe_dirty_effects) {
|
|
|
1253
1253
|
set_signal_status(effect, CLEAN);
|
|
1254
1254
|
}
|
|
1255
1255
|
//#endregion
|
|
1256
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
1256
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/store/shared/index.js
|
|
1257
1257
|
/** @import { Readable, StartStopNotifier, Subscriber, Unsubscriber, Updater, Writable } from '../public.js' */
|
|
1258
1258
|
/** @import { Stores, StoresValues, SubscribeInvalidateTuple } from '../private.js' */
|
|
1259
1259
|
/**
|
|
@@ -1337,1205 +1337,1209 @@ function writable(value, start = noop) {
|
|
|
1337
1337
|
};
|
|
1338
1338
|
}
|
|
1339
1339
|
//#endregion
|
|
1340
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
1341
|
-
/** @import { Fork } from 'svelte' */
|
|
1342
|
-
/** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
|
|
1343
|
-
/** @type {Batch | null} */
|
|
1344
|
-
var first_batch = null;
|
|
1345
|
-
/** @type {Batch | null} */
|
|
1346
|
-
var last_batch = null;
|
|
1347
|
-
/** @type {Batch | null} */
|
|
1348
|
-
var current_batch = null;
|
|
1340
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/reactivity/create-subscriber.js
|
|
1349
1341
|
/**
|
|
1350
|
-
*
|
|
1351
|
-
*
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
*
|
|
1356
|
-
*
|
|
1357
|
-
*
|
|
1358
|
-
*
|
|
1342
|
+
* Returns a `subscribe` function that integrates external event-based systems with Svelte's reactivity.
|
|
1343
|
+
* It's particularly useful for integrating with web APIs like `MediaQuery`, `IntersectionObserver`, or `WebSocket`.
|
|
1344
|
+
*
|
|
1345
|
+
* If `subscribe` is called inside an effect (including indirectly, for example inside a getter),
|
|
1346
|
+
* the `start` callback will be called with an `update` function. Whenever `update` is called, the effect re-runs.
|
|
1347
|
+
*
|
|
1348
|
+
* If `start` returns a cleanup function, it will be called when the effect is destroyed.
|
|
1349
|
+
*
|
|
1350
|
+
* If `subscribe` is called in multiple effects, `start` will only be called once as long as the effects
|
|
1351
|
+
* are active, and the returned teardown function will only be called when all effects are destroyed.
|
|
1352
|
+
*
|
|
1353
|
+
* It's best understood with an example. Here's an implementation of [`MediaQuery`](https://svelte.dev/docs/svelte/svelte-reactivity#MediaQuery):
|
|
1354
|
+
*
|
|
1355
|
+
* ```js
|
|
1356
|
+
* import { createSubscriber } from 'svelte/reactivity';
|
|
1357
|
+
* import { on } from 'svelte/events';
|
|
1358
|
+
*
|
|
1359
|
+
* export class MediaQuery {
|
|
1360
|
+
* #query;
|
|
1361
|
+
* #subscribe;
|
|
1362
|
+
*
|
|
1363
|
+
* constructor(query) {
|
|
1364
|
+
* this.#query = window.matchMedia(`(${query})`);
|
|
1365
|
+
*
|
|
1366
|
+
* this.#subscribe = createSubscriber((update) => {
|
|
1367
|
+
* // when the `change` event occurs, re-run any effects that read `this.current`
|
|
1368
|
+
* const off = on(this.#query, 'change', update);
|
|
1369
|
+
*
|
|
1370
|
+
* // stop listening when all the effects are destroyed
|
|
1371
|
+
* return () => off();
|
|
1372
|
+
* });
|
|
1373
|
+
* }
|
|
1374
|
+
*
|
|
1375
|
+
* get current() {
|
|
1376
|
+
* // This makes the getter reactive, if read in an effect
|
|
1377
|
+
* this.#subscribe();
|
|
1378
|
+
*
|
|
1379
|
+
* // Return the current state of the query, whether or not we're in an effect
|
|
1380
|
+
* return this.#query.matches;
|
|
1381
|
+
* }
|
|
1382
|
+
* }
|
|
1383
|
+
* ```
|
|
1384
|
+
* @param {(update: () => void) => (() => void) | void} start
|
|
1385
|
+
* @since 5.7.0
|
|
1359
1386
|
*/
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1387
|
+
function createSubscriber(start) {
|
|
1388
|
+
let subscribers = 0;
|
|
1389
|
+
let version = source(0);
|
|
1390
|
+
/** @type {(() => void) | void} */
|
|
1391
|
+
let stop;
|
|
1392
|
+
return () => {
|
|
1393
|
+
if (effect_tracking()) {
|
|
1394
|
+
get(version);
|
|
1395
|
+
render_effect(() => {
|
|
1396
|
+
if (subscribers === 0) stop = untrack(() => start(() => increment(version)));
|
|
1397
|
+
subscribers += 1;
|
|
1398
|
+
return () => {
|
|
1399
|
+
queue_micro_task(() => {
|
|
1400
|
+
subscribers -= 1;
|
|
1401
|
+
if (subscribers === 0) {
|
|
1402
|
+
stop?.();
|
|
1403
|
+
stop = void 0;
|
|
1404
|
+
increment(version);
|
|
1405
|
+
}
|
|
1406
|
+
});
|
|
1407
|
+
};
|
|
1408
|
+
});
|
|
1409
|
+
}
|
|
1410
|
+
};
|
|
1411
|
+
}
|
|
1412
|
+
//#endregion
|
|
1413
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
|
|
1414
|
+
/** @import { Effect, Source, TemplateNode, } from '#client' */
|
|
1365
1415
|
/**
|
|
1366
|
-
*
|
|
1367
|
-
*
|
|
1368
|
-
*
|
|
1369
|
-
*
|
|
1416
|
+
* @typedef {{
|
|
1417
|
+
* onerror?: ((error: unknown, reset: () => void) => void) | null;
|
|
1418
|
+
* failed?: ((anchor: Node, error: () => unknown, reset: () => () => void) => void) | null;
|
|
1419
|
+
* pending?: ((anchor: Node) => void) | null;
|
|
1420
|
+
* }} BoundaryProps
|
|
1370
1421
|
*/
|
|
1371
|
-
var
|
|
1422
|
+
var flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED;
|
|
1372
1423
|
/**
|
|
1373
|
-
*
|
|
1374
|
-
*
|
|
1375
|
-
*
|
|
1376
|
-
* @
|
|
1377
|
-
* @
|
|
1424
|
+
* @param {TemplateNode} node
|
|
1425
|
+
* @param {BoundaryProps} props
|
|
1426
|
+
* @param {((anchor: Node) => void)} children
|
|
1427
|
+
* @param {((error: unknown) => unknown) | undefined} [transform_error]
|
|
1428
|
+
* @returns {void}
|
|
1378
1429
|
*/
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
var
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
linked = true;
|
|
1387
|
-
/** @type {Batch | null} */
|
|
1388
|
-
#prev = null;
|
|
1389
|
-
/** @type {Batch | null} */
|
|
1390
|
-
#next = null;
|
|
1391
|
-
/** @type {Map<Effect, ReturnType<typeof deferred<any>>>} */
|
|
1392
|
-
async_deriveds = /* @__PURE__ */ new Map();
|
|
1393
|
-
/**
|
|
1394
|
-
* The current values of any signals that are updated in this batch.
|
|
1395
|
-
* Tuple format: [value, is_derived] (note: is_derived is false for deriveds, too, if they were overridden via assignment)
|
|
1396
|
-
* They keys of this map are identical to `this.#previous`
|
|
1397
|
-
* @type {Map<Value, [any, boolean]>}
|
|
1398
|
-
*/
|
|
1399
|
-
current = /* @__PURE__ */ new Map();
|
|
1400
|
-
/**
|
|
1401
|
-
* The values of any signals (sources and deriveds) that are updated in this batch _before_ those updates took place.
|
|
1402
|
-
* They keys of this map are identical to `this.#current`
|
|
1403
|
-
* @type {Map<Value, any>}
|
|
1404
|
-
*/
|
|
1405
|
-
previous = /* @__PURE__ */ new Map();
|
|
1406
|
-
/**
|
|
1407
|
-
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
1408
|
-
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
1409
|
-
* @type {Set<(batch: Batch) => void>}
|
|
1410
|
-
*/
|
|
1411
|
-
#commit_callbacks = /* @__PURE__ */ new Set();
|
|
1412
|
-
/**
|
|
1413
|
-
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
1414
|
-
* @type {Set<(batch: Batch) => void>}
|
|
1415
|
-
*/
|
|
1416
|
-
#discard_callbacks = /* @__PURE__ */ new Set();
|
|
1417
|
-
/**
|
|
1418
|
-
* The number of async effects that are currently in flight
|
|
1419
|
-
*/
|
|
1420
|
-
#pending = 0;
|
|
1421
|
-
/**
|
|
1422
|
-
* Async effects that are currently in flight, _not_ inside a pending boundary
|
|
1423
|
-
* @type {Map<Effect, number>}
|
|
1424
|
-
*/
|
|
1425
|
-
#blocking_pending = /* @__PURE__ */ new Map();
|
|
1426
|
-
/**
|
|
1427
|
-
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
1428
|
-
* TODO replace with Promise.withResolvers once supported widely enough
|
|
1429
|
-
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
1430
|
-
*/
|
|
1431
|
-
#deferred = null;
|
|
1432
|
-
/**
|
|
1433
|
-
* The root effects that need to be flushed
|
|
1434
|
-
* @type {Effect[]}
|
|
1435
|
-
*/
|
|
1436
|
-
#roots = [];
|
|
1437
|
-
/**
|
|
1438
|
-
* Effects created while this batch was active.
|
|
1439
|
-
* @type {Effect[]}
|
|
1440
|
-
*/
|
|
1441
|
-
#new_effects = [];
|
|
1430
|
+
function boundary(node, props, children, transform_error) {
|
|
1431
|
+
new Boundary(node, props, children, transform_error);
|
|
1432
|
+
}
|
|
1433
|
+
var Boundary = class {
|
|
1434
|
+
/** @type {Boundary | null} */
|
|
1435
|
+
parent;
|
|
1436
|
+
is_pending = false;
|
|
1442
1437
|
/**
|
|
1443
|
-
*
|
|
1444
|
-
*
|
|
1438
|
+
* API-level transformError transform function. Transforms errors before they reach the `failed` snippet.
|
|
1439
|
+
* Inherited from parent boundary, or defaults to identity.
|
|
1440
|
+
* @type {(error: unknown) => unknown}
|
|
1445
1441
|
*/
|
|
1442
|
+
transform_error;
|
|
1443
|
+
/** @type {TemplateNode} */
|
|
1444
|
+
#anchor;
|
|
1445
|
+
/** @type {TemplateNode | null} */
|
|
1446
|
+
#hydrate_open = hydrating ? hydrate_node : null;
|
|
1447
|
+
/** @type {BoundaryProps} */
|
|
1448
|
+
#props;
|
|
1449
|
+
/** @type {((anchor: Node) => void)} */
|
|
1450
|
+
#children;
|
|
1451
|
+
/** @type {Effect} */
|
|
1452
|
+
#effect;
|
|
1453
|
+
/** @type {Effect | null} */
|
|
1454
|
+
#main_effect = null;
|
|
1455
|
+
/** @type {Effect | null} */
|
|
1456
|
+
#pending_effect = null;
|
|
1457
|
+
/** @type {Effect | null} */
|
|
1458
|
+
#failed_effect = null;
|
|
1459
|
+
/** @type {DocumentFragment | null} */
|
|
1460
|
+
#offscreen_fragment = null;
|
|
1461
|
+
#local_pending_count = 0;
|
|
1462
|
+
#pending_count = 0;
|
|
1463
|
+
#pending_count_update_queued = false;
|
|
1464
|
+
/** @type {Set<Effect>} */
|
|
1446
1465
|
#dirty_effects = /* @__PURE__ */ new Set();
|
|
1447
|
-
/**
|
|
1448
|
-
* Deferred effects that are MAYBE_DIRTY
|
|
1449
|
-
* @type {Set<Effect>}
|
|
1450
|
-
*/
|
|
1466
|
+
/** @type {Set<Effect>} */
|
|
1451
1467
|
#maybe_dirty_effects = /* @__PURE__ */ new Set();
|
|
1452
1468
|
/**
|
|
1453
|
-
* A
|
|
1454
|
-
*
|
|
1455
|
-
*
|
|
1456
|
-
*
|
|
1457
|
-
* @type {
|
|
1469
|
+
* A source containing the number of pending async deriveds/expressions.
|
|
1470
|
+
* Only created if `$effect.pending()` is used inside the boundary,
|
|
1471
|
+
* otherwise updating the source results in needless `Batch.ensure()`
|
|
1472
|
+
* calls followed by no-op flushes
|
|
1473
|
+
* @type {Source<number> | null}
|
|
1458
1474
|
*/
|
|
1459
|
-
#
|
|
1475
|
+
#effect_pending = null;
|
|
1476
|
+
#effect_pending_subscriber = createSubscriber(() => {
|
|
1477
|
+
this.#effect_pending = source(this.#local_pending_count);
|
|
1478
|
+
return () => {
|
|
1479
|
+
this.#effect_pending = null;
|
|
1480
|
+
};
|
|
1481
|
+
});
|
|
1460
1482
|
/**
|
|
1461
|
-
*
|
|
1462
|
-
* @
|
|
1483
|
+
* @param {TemplateNode} node
|
|
1484
|
+
* @param {BoundaryProps} props
|
|
1485
|
+
* @param {((anchor: Node) => void)} children
|
|
1486
|
+
* @param {((error: unknown) => unknown) | undefined} [transform_error]
|
|
1463
1487
|
*/
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
}
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
+
constructor(node, props, children, transform_error) {
|
|
1489
|
+
this.#anchor = node;
|
|
1490
|
+
this.#props = props;
|
|
1491
|
+
this.#children = (anchor) => {
|
|
1492
|
+
var effect = active_effect;
|
|
1493
|
+
effect.b = this;
|
|
1494
|
+
effect.f |= 128;
|
|
1495
|
+
children(anchor);
|
|
1496
|
+
};
|
|
1497
|
+
this.parent = active_effect.b;
|
|
1498
|
+
this.transform_error = transform_error ?? this.parent?.transform_error ?? ((e) => e);
|
|
1499
|
+
this.#effect = block(() => {
|
|
1500
|
+
if (hydrating) {
|
|
1501
|
+
const comment = this.#hydrate_open;
|
|
1502
|
+
hydrate_next();
|
|
1503
|
+
const server_rendered_pending = comment.data === "[!";
|
|
1504
|
+
if (comment.data.startsWith("[?")) {
|
|
1505
|
+
const serialized_error = JSON.parse(comment.data.slice(2));
|
|
1506
|
+
this.#hydrate_failed_content(serialized_error);
|
|
1507
|
+
} else if (server_rendered_pending) this.#hydrate_pending_content();
|
|
1508
|
+
else this.#hydrate_resolved_content();
|
|
1509
|
+
} else this.#render();
|
|
1510
|
+
}, flags);
|
|
1511
|
+
if (hydrating) this.#anchor = hydrate_node;
|
|
1512
|
+
}
|
|
1513
|
+
#hydrate_resolved_content() {
|
|
1514
|
+
try {
|
|
1515
|
+
this.#main_effect = branch(() => this.#children(this.#anchor));
|
|
1516
|
+
} catch (error) {
|
|
1517
|
+
this.error(error);
|
|
1488
1518
|
}
|
|
1489
|
-
return false;
|
|
1490
1519
|
}
|
|
1491
1520
|
/**
|
|
1492
|
-
*
|
|
1493
|
-
* @param {Effect} effect
|
|
1521
|
+
* @param {unknown} error The deserialized error from the server's hydration comment
|
|
1494
1522
|
*/
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1523
|
+
#hydrate_failed_content(error) {
|
|
1524
|
+
const failed = this.#props.failed;
|
|
1525
|
+
if (!failed) return;
|
|
1526
|
+
this.#failed_effect = branch(() => {
|
|
1527
|
+
failed(this.#anchor, () => error, () => () => {});
|
|
1499
1528
|
});
|
|
1500
|
-
|
|
1529
|
+
}
|
|
1530
|
+
#hydrate_pending_content() {
|
|
1531
|
+
const pending = this.#props.pending;
|
|
1532
|
+
if (!pending) return;
|
|
1533
|
+
this.is_pending = true;
|
|
1534
|
+
this.#pending_effect = branch(() => pending(this.#anchor));
|
|
1535
|
+
queue_micro_task(() => {
|
|
1536
|
+
var fragment = this.#offscreen_fragment = document.createDocumentFragment();
|
|
1537
|
+
var anchor = create_text();
|
|
1538
|
+
fragment.append(anchor);
|
|
1539
|
+
this.#main_effect = this.#run(() => {
|
|
1540
|
+
return branch(() => this.#children(anchor));
|
|
1541
|
+
});
|
|
1542
|
+
if (this.#pending_count === 0) {
|
|
1543
|
+
this.#anchor.before(fragment);
|
|
1544
|
+
this.#offscreen_fragment = null;
|
|
1545
|
+
pause_effect(this.#pending_effect, () => {
|
|
1546
|
+
this.#pending_effect = null;
|
|
1547
|
+
});
|
|
1548
|
+
this.#resolve(current_batch);
|
|
1549
|
+
}
|
|
1550
|
+
});
|
|
1551
|
+
}
|
|
1552
|
+
#render() {
|
|
1553
|
+
try {
|
|
1554
|
+
this.is_pending = this.has_pending_snippet();
|
|
1555
|
+
this.#pending_count = 0;
|
|
1556
|
+
this.#local_pending_count = 0;
|
|
1557
|
+
this.#main_effect = branch(() => {
|
|
1558
|
+
this.#children(this.#anchor);
|
|
1559
|
+
});
|
|
1560
|
+
if (this.#pending_count > 0) {
|
|
1561
|
+
var fragment = this.#offscreen_fragment = document.createDocumentFragment();
|
|
1562
|
+
move_effect(this.#main_effect, fragment);
|
|
1563
|
+
const pending = this.#props.pending;
|
|
1564
|
+
this.#pending_effect = branch(() => pending(this.#anchor));
|
|
1565
|
+
} else this.#resolve(current_batch);
|
|
1566
|
+
} catch (error) {
|
|
1567
|
+
this.error(error);
|
|
1568
|
+
}
|
|
1501
1569
|
}
|
|
1502
1570
|
/**
|
|
1503
|
-
*
|
|
1504
|
-
|
|
1571
|
+
* @param {Batch} batch
|
|
1572
|
+
*/
|
|
1573
|
+
#resolve(batch) {
|
|
1574
|
+
this.is_pending = false;
|
|
1575
|
+
batch.transfer_effects(this.#dirty_effects, this.#maybe_dirty_effects);
|
|
1576
|
+
}
|
|
1577
|
+
/**
|
|
1578
|
+
* Defer an effect inside a pending boundary until the boundary resolves
|
|
1505
1579
|
* @param {Effect} effect
|
|
1506
|
-
* @param {(e: Effect) => void} callback
|
|
1507
1580
|
*/
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
if (tracked) {
|
|
1511
|
-
this.#skipped_branches.delete(effect);
|
|
1512
|
-
for (var e of tracked.d) {
|
|
1513
|
-
set_signal_status(e, DIRTY);
|
|
1514
|
-
callback(e);
|
|
1515
|
-
}
|
|
1516
|
-
for (e of tracked.m) {
|
|
1517
|
-
set_signal_status(e, MAYBE_DIRTY);
|
|
1518
|
-
callback(e);
|
|
1519
|
-
}
|
|
1520
|
-
}
|
|
1521
|
-
this.#unskipped_branches.add(effect);
|
|
1581
|
+
defer_effect(effect) {
|
|
1582
|
+
defer_effect(effect, this.#dirty_effects, this.#maybe_dirty_effects);
|
|
1522
1583
|
}
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
* @deprecated when we get rid of legacy mode and stores, we can get rid of this
|
|
1548
|
-
*/
|
|
1549
|
-
var updates = legacy_updates = [];
|
|
1550
|
-
for (const root of roots) try {
|
|
1551
|
-
this.#traverse(root, effects, render_effects);
|
|
1584
|
+
/**
|
|
1585
|
+
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
1586
|
+
* @returns {boolean}
|
|
1587
|
+
*/
|
|
1588
|
+
is_rendered() {
|
|
1589
|
+
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
1590
|
+
}
|
|
1591
|
+
has_pending_snippet() {
|
|
1592
|
+
return !!this.#props.pending;
|
|
1593
|
+
}
|
|
1594
|
+
/**
|
|
1595
|
+
* @template T
|
|
1596
|
+
* @param {() => T} fn
|
|
1597
|
+
*/
|
|
1598
|
+
#run(fn) {
|
|
1599
|
+
var previous_effect = active_effect;
|
|
1600
|
+
var previous_reaction = active_reaction;
|
|
1601
|
+
var previous_ctx = component_context;
|
|
1602
|
+
set_active_effect(this.#effect);
|
|
1603
|
+
set_active_reaction(this.#effect);
|
|
1604
|
+
set_component_context(this.#effect.ctx);
|
|
1605
|
+
try {
|
|
1606
|
+
Batch.ensure();
|
|
1607
|
+
return fn();
|
|
1552
1608
|
} catch (e) {
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
var batch = Batch.ensure();
|
|
1560
|
-
for (const e of updates) batch.schedule(e);
|
|
1561
|
-
}
|
|
1562
|
-
collected_effects = null;
|
|
1563
|
-
legacy_updates = null;
|
|
1564
|
-
if (this.#is_deferred()) {
|
|
1565
|
-
this.#defer_effects(render_effects);
|
|
1566
|
-
this.#defer_effects(effects);
|
|
1567
|
-
for (const [e, t] of this.#skipped_branches) reset_branch(e, t);
|
|
1568
|
-
if (updates.length > 0)
|
|
1569
|
-
/** @type {Batch} */ current_batch.#process();
|
|
1570
|
-
return;
|
|
1609
|
+
handle_error(e);
|
|
1610
|
+
return null;
|
|
1611
|
+
} finally {
|
|
1612
|
+
set_active_effect(previous_effect);
|
|
1613
|
+
set_active_reaction(previous_reaction);
|
|
1614
|
+
set_component_context(previous_ctx);
|
|
1571
1615
|
}
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1616
|
+
}
|
|
1617
|
+
/**
|
|
1618
|
+
* Updates the pending count associated with the currently visible pending snippet,
|
|
1619
|
+
* if any, such that we can replace the snippet with content once work is done
|
|
1620
|
+
* @param {1 | -1} d
|
|
1621
|
+
* @param {Batch} batch
|
|
1622
|
+
*/
|
|
1623
|
+
#update_pending_count(d, batch) {
|
|
1624
|
+
if (!this.has_pending_snippet()) {
|
|
1625
|
+
if (this.parent) this.parent.#update_pending_count(d, batch);
|
|
1577
1626
|
return;
|
|
1578
1627
|
}
|
|
1579
|
-
this.#
|
|
1580
|
-
this.#
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
if (this.#pending === 0 && (this.#roots.length === 0 || next_batch !== null)) {
|
|
1590
|
-
this.#unlink();
|
|
1628
|
+
this.#pending_count += d;
|
|
1629
|
+
if (this.#pending_count === 0) {
|
|
1630
|
+
this.#resolve(batch);
|
|
1631
|
+
if (this.#pending_effect) pause_effect(this.#pending_effect, () => {
|
|
1632
|
+
this.#pending_effect = null;
|
|
1633
|
+
});
|
|
1634
|
+
if (this.#offscreen_fragment) {
|
|
1635
|
+
this.#anchor.before(this.#offscreen_fragment);
|
|
1636
|
+
this.#offscreen_fragment = null;
|
|
1637
|
+
}
|
|
1591
1638
|
}
|
|
1592
|
-
if (this.#roots.length > 0) if (next_batch !== null) {
|
|
1593
|
-
const batch = next_batch;
|
|
1594
|
-
batch.#roots.push(...this.#roots.filter((r) => !batch.#roots.includes(r)));
|
|
1595
|
-
} else next_batch = this;
|
|
1596
|
-
if (next_batch !== null) next_batch.#process();
|
|
1597
1639
|
}
|
|
1598
1640
|
/**
|
|
1599
|
-
*
|
|
1600
|
-
*
|
|
1601
|
-
*
|
|
1602
|
-
* @param {
|
|
1603
|
-
* @param {
|
|
1641
|
+
* Update the source that powers `$effect.pending()` inside this boundary,
|
|
1642
|
+
* and controls when the current `pending` snippet (if any) is removed.
|
|
1643
|
+
* Do not call from inside the class
|
|
1644
|
+
* @param {1 | -1} d
|
|
1645
|
+
* @param {Batch} batch
|
|
1604
1646
|
*/
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
else if (is_dirty(effect)) {
|
|
1615
|
-
if ((flags & 16) !== 0) this.#maybe_dirty_effects.add(effect);
|
|
1616
|
-
update_effect(effect);
|
|
1617
|
-
}
|
|
1618
|
-
var child = effect.first;
|
|
1619
|
-
if (child !== null) {
|
|
1620
|
-
effect = child;
|
|
1621
|
-
continue;
|
|
1622
|
-
}
|
|
1623
|
-
}
|
|
1624
|
-
while (effect !== null) {
|
|
1625
|
-
var next = effect.next;
|
|
1626
|
-
if (next !== null) {
|
|
1627
|
-
effect = next;
|
|
1628
|
-
break;
|
|
1629
|
-
}
|
|
1630
|
-
effect = effect.parent;
|
|
1631
|
-
}
|
|
1632
|
-
}
|
|
1633
|
-
}
|
|
1634
|
-
#find_earlier_batch() {
|
|
1635
|
-
var batch = this.#prev;
|
|
1636
|
-
while (batch !== null) {
|
|
1637
|
-
if (!batch.is_fork) {
|
|
1638
|
-
for (const [value, [, is_derived]] of this.current) if (batch.current.has(value) && !is_derived) return batch;
|
|
1639
|
-
}
|
|
1640
|
-
batch = batch.#prev;
|
|
1641
|
-
}
|
|
1642
|
-
return null;
|
|
1643
|
-
}
|
|
1644
|
-
/**
|
|
1645
|
-
* @param {Batch} batch
|
|
1646
|
-
*/
|
|
1647
|
-
#merge(batch) {
|
|
1648
|
-
for (const [source, value] of batch.current) {
|
|
1649
|
-
if (!this.previous.has(source) && batch.previous.has(source)) this.previous.set(source, batch.previous.get(source));
|
|
1650
|
-
this.current.set(source, value);
|
|
1651
|
-
}
|
|
1652
|
-
for (const [effect, deferred] of batch.async_deriveds) {
|
|
1653
|
-
const d = this.async_deriveds.get(effect);
|
|
1654
|
-
if (d) deferred.promise.then(d.resolve).catch(d.reject);
|
|
1655
|
-
}
|
|
1656
|
-
this.transfer_effects(batch.#dirty_effects, batch.#maybe_dirty_effects);
|
|
1657
|
-
/**
|
|
1658
|
-
* mark all effects that depend on `batch.current`, except the
|
|
1659
|
-
* async effects that we just resolved (TODO unless they depend
|
|
1660
|
-
* on values in this batch that are NOT in the later batch?).
|
|
1661
|
-
* Through this we also will populate the correct #skipped_branches,
|
|
1662
|
-
* oncommit callbacks etc, so we don't need to merge them separately.
|
|
1663
|
-
* @param {Value} value
|
|
1664
|
-
*/
|
|
1665
|
-
const mark = (value) => {
|
|
1666
|
-
var reactions = value.reactions;
|
|
1667
|
-
if (reactions === null) return;
|
|
1668
|
-
for (const reaction of reactions) {
|
|
1669
|
-
var flags = reaction.f;
|
|
1670
|
-
if ((flags & 2) !== 0) mark(reaction);
|
|
1671
|
-
else {
|
|
1672
|
-
var effect = reaction;
|
|
1673
|
-
if (flags & 4194320 && !this.async_deriveds.has(effect)) {
|
|
1674
|
-
this.#maybe_dirty_effects.delete(effect);
|
|
1675
|
-
set_signal_status(effect, DIRTY);
|
|
1676
|
-
this.schedule(effect);
|
|
1677
|
-
}
|
|
1678
|
-
}
|
|
1679
|
-
}
|
|
1680
|
-
};
|
|
1681
|
-
for (const source of this.current.keys()) mark(source);
|
|
1682
|
-
this.oncommit(() => batch.discard());
|
|
1683
|
-
batch.#unlink();
|
|
1684
|
-
current_batch = this;
|
|
1685
|
-
this.#process();
|
|
1686
|
-
}
|
|
1687
|
-
/**
|
|
1688
|
-
* @param {Effect[]} effects
|
|
1689
|
-
*/
|
|
1690
|
-
#defer_effects(effects) {
|
|
1691
|
-
for (var i = 0; i < effects.length; i += 1) defer_effect(effects[i], this.#dirty_effects, this.#maybe_dirty_effects);
|
|
1692
|
-
}
|
|
1693
|
-
/**
|
|
1694
|
-
* Associate a change to a given source with the current
|
|
1695
|
-
* batch, noting its previous and current values
|
|
1696
|
-
* @param {Value} source
|
|
1697
|
-
* @param {any} value
|
|
1698
|
-
* @param {boolean} [is_derived]
|
|
1699
|
-
*/
|
|
1700
|
-
capture(source, value, is_derived = false) {
|
|
1701
|
-
if (source.v !== UNINITIALIZED && !this.previous.has(source)) this.previous.set(source, source.v);
|
|
1702
|
-
if ((source.f & 8388608) === 0) {
|
|
1703
|
-
this.current.set(source, [value, is_derived]);
|
|
1704
|
-
batch_values?.set(source, value);
|
|
1705
|
-
}
|
|
1706
|
-
if (!this.is_fork) source.v = value;
|
|
1707
|
-
}
|
|
1708
|
-
activate() {
|
|
1709
|
-
current_batch = this;
|
|
1710
|
-
}
|
|
1711
|
-
deactivate() {
|
|
1712
|
-
current_batch = null;
|
|
1713
|
-
batch_values = null;
|
|
1714
|
-
}
|
|
1715
|
-
flush() {
|
|
1716
|
-
try {
|
|
1717
|
-
is_processing = true;
|
|
1718
|
-
current_batch = this;
|
|
1719
|
-
this.#process();
|
|
1720
|
-
} finally {
|
|
1721
|
-
flush_count = 0;
|
|
1722
|
-
last_scheduled_effect = null;
|
|
1723
|
-
collected_effects = null;
|
|
1724
|
-
legacy_updates = null;
|
|
1725
|
-
is_processing = false;
|
|
1726
|
-
current_batch = null;
|
|
1727
|
-
batch_values = null;
|
|
1728
|
-
old_values.clear();
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
|
-
discard() {
|
|
1732
|
-
for (const fn of this.#discard_callbacks) fn(this);
|
|
1733
|
-
this.#discard_callbacks.clear();
|
|
1734
|
-
this.#unlink();
|
|
1735
|
-
this.#deferred?.resolve();
|
|
1736
|
-
}
|
|
1737
|
-
/**
|
|
1738
|
-
* @param {Effect} effect
|
|
1739
|
-
*/
|
|
1740
|
-
register_created_effect(effect) {
|
|
1741
|
-
this.#new_effects.push(effect);
|
|
1742
|
-
}
|
|
1743
|
-
#commit() {
|
|
1744
|
-
for (let batch = first_batch; batch !== null; batch = batch.#next) {
|
|
1745
|
-
var is_earlier = batch.id < this.id;
|
|
1746
|
-
/** @type {Source[]} */
|
|
1747
|
-
var sources = [];
|
|
1748
|
-
for (const [source, [value, is_derived]] of this.current) {
|
|
1749
|
-
if (batch.current.has(source)) {
|
|
1750
|
-
var batch_value = batch.current.get(source)[0];
|
|
1751
|
-
if (is_earlier && value !== batch_value) batch.current.set(source, [value, is_derived]);
|
|
1752
|
-
else continue;
|
|
1753
|
-
}
|
|
1754
|
-
sources.push(source);
|
|
1755
|
-
}
|
|
1756
|
-
if (is_earlier) for (const [effect, deferred] of this.async_deriveds) {
|
|
1757
|
-
const d = batch.async_deriveds.get(effect);
|
|
1758
|
-
if (d) deferred.promise.then(d.resolve).catch(d.reject);
|
|
1759
|
-
}
|
|
1760
|
-
if (!batch.#started) continue;
|
|
1761
|
-
var others = [...batch.current.keys()].filter((s) => !batch.current.get(s)[1] && !this.current.has(s));
|
|
1762
|
-
if (others.length === 0) {
|
|
1763
|
-
if (is_earlier) batch.discard();
|
|
1764
|
-
} else if (sources.length > 0) {
|
|
1765
|
-
if (is_earlier) for (const unskipped of this.#unskipped_branches) batch.unskip_effect(unskipped, (e) => {
|
|
1766
|
-
if ((e.f & 4194320) !== 0) batch.schedule(e);
|
|
1767
|
-
else batch.#defer_effects([e]);
|
|
1768
|
-
});
|
|
1769
|
-
batch.activate();
|
|
1770
|
-
/** @type {Set<Value>} */
|
|
1771
|
-
var marked = /* @__PURE__ */ new Set();
|
|
1772
|
-
/** @type {Map<Reaction, boolean>} */
|
|
1773
|
-
var checked = /* @__PURE__ */ new Map();
|
|
1774
|
-
for (var source of sources) mark_effects(source, others, marked, checked);
|
|
1775
|
-
checked = /* @__PURE__ */ new Map();
|
|
1776
|
-
var current_unequal = [...batch.current].filter(([c, v1]) => {
|
|
1777
|
-
const v2 = this.current.get(c);
|
|
1778
|
-
if (!v2) return true;
|
|
1779
|
-
return v2[0] !== v1[0] || v2[1] !== v1[1];
|
|
1780
|
-
}).map(([c]) => c);
|
|
1781
|
-
if (current_unequal.length > 0) {
|
|
1782
|
-
for (const effect of this.#new_effects) if ((effect.f & 155648) === 0 && depends_on(effect, current_unequal, checked)) if ((effect.f & 4194320) !== 0) {
|
|
1783
|
-
set_signal_status(effect, DIRTY);
|
|
1784
|
-
batch.schedule(effect);
|
|
1785
|
-
} else batch.#dirty_effects.add(effect);
|
|
1786
|
-
}
|
|
1787
|
-
if (batch.#roots.length > 0 && !batch.#decrement_queued) {
|
|
1788
|
-
batch.apply();
|
|
1789
|
-
for (var root of batch.#roots) batch.#traverse(root, [], []);
|
|
1790
|
-
batch.#roots = [];
|
|
1791
|
-
}
|
|
1792
|
-
batch.deactivate();
|
|
1793
|
-
}
|
|
1794
|
-
}
|
|
1795
|
-
}
|
|
1796
|
-
/**
|
|
1797
|
-
* @param {boolean} blocking
|
|
1798
|
-
* @param {Effect} effect
|
|
1799
|
-
*/
|
|
1800
|
-
increment(blocking, effect) {
|
|
1801
|
-
this.#pending += 1;
|
|
1802
|
-
if (blocking) {
|
|
1803
|
-
let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
|
|
1804
|
-
this.#blocking_pending.set(effect, blocking_pending_count + 1);
|
|
1805
|
-
}
|
|
1806
|
-
}
|
|
1807
|
-
/**
|
|
1808
|
-
* @param {boolean} blocking
|
|
1809
|
-
* @param {Effect} effect
|
|
1810
|
-
*/
|
|
1811
|
-
decrement(blocking, effect) {
|
|
1812
|
-
this.#pending -= 1;
|
|
1813
|
-
if (blocking) {
|
|
1814
|
-
let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
|
|
1815
|
-
if (blocking_pending_count === 1) this.#blocking_pending.delete(effect);
|
|
1816
|
-
else this.#blocking_pending.set(effect, blocking_pending_count - 1);
|
|
1817
|
-
}
|
|
1818
|
-
if (this.#decrement_queued) return;
|
|
1819
|
-
this.#decrement_queued = true;
|
|
1820
|
-
queue_micro_task(() => {
|
|
1821
|
-
this.#decrement_queued = false;
|
|
1822
|
-
if (this.linked) this.flush();
|
|
1823
|
-
});
|
|
1824
|
-
}
|
|
1825
|
-
/**
|
|
1826
|
-
* @param {Set<Effect>} dirty_effects
|
|
1827
|
-
* @param {Set<Effect>} maybe_dirty_effects
|
|
1828
|
-
*/
|
|
1829
|
-
transfer_effects(dirty_effects, maybe_dirty_effects) {
|
|
1830
|
-
for (const e of dirty_effects) this.#dirty_effects.add(e);
|
|
1831
|
-
for (const e of maybe_dirty_effects) this.#maybe_dirty_effects.add(e);
|
|
1832
|
-
dirty_effects.clear();
|
|
1833
|
-
maybe_dirty_effects.clear();
|
|
1834
|
-
}
|
|
1835
|
-
/** @param {(batch: Batch) => void} fn */
|
|
1836
|
-
oncommit(fn) {
|
|
1837
|
-
this.#commit_callbacks.add(fn);
|
|
1838
|
-
}
|
|
1839
|
-
/** @param {(batch: Batch) => void} fn */
|
|
1840
|
-
ondiscard(fn) {
|
|
1841
|
-
this.#discard_callbacks.add(fn);
|
|
1842
|
-
}
|
|
1843
|
-
settled() {
|
|
1844
|
-
return (this.#deferred ??= deferred()).promise;
|
|
1845
|
-
}
|
|
1846
|
-
static ensure() {
|
|
1847
|
-
if (current_batch === null) {
|
|
1848
|
-
const batch = current_batch = new Batch();
|
|
1849
|
-
if (!is_processing && !is_flushing_sync) queue_micro_task(() => {
|
|
1850
|
-
if (!batch.#started) batch.flush();
|
|
1851
|
-
});
|
|
1852
|
-
}
|
|
1853
|
-
return current_batch;
|
|
1854
|
-
}
|
|
1855
|
-
apply() {
|
|
1856
|
-
{
|
|
1857
|
-
batch_values = null;
|
|
1858
|
-
return;
|
|
1859
|
-
}
|
|
1860
|
-
}
|
|
1861
|
-
/**
|
|
1862
|
-
*
|
|
1863
|
-
* @param {Effect} effect
|
|
1864
|
-
*/
|
|
1865
|
-
schedule(effect) {
|
|
1866
|
-
last_scheduled_effect = effect;
|
|
1867
|
-
if (effect.b?.is_pending && (effect.f & 16777228) !== 0 && (effect.f & 32768) === 0) {
|
|
1868
|
-
effect.b.defer_effect(effect);
|
|
1869
|
-
return;
|
|
1870
|
-
}
|
|
1871
|
-
var e = effect;
|
|
1872
|
-
while (e.parent !== null) {
|
|
1873
|
-
e = e.parent;
|
|
1874
|
-
var flags = e.f;
|
|
1875
|
-
if (collected_effects !== null && e === active_effect) {
|
|
1876
|
-
if ((active_reaction === null || (active_reaction.f & 2) === 0) && true) return;
|
|
1877
|
-
}
|
|
1878
|
-
if ((flags & 96) !== 0) {
|
|
1879
|
-
if ((flags & 1024) === 0) return;
|
|
1880
|
-
e.f ^= CLEAN;
|
|
1881
|
-
}
|
|
1882
|
-
}
|
|
1883
|
-
this.#roots.push(e);
|
|
1884
|
-
}
|
|
1885
|
-
#unlink() {
|
|
1886
|
-
if (!this.linked) return;
|
|
1887
|
-
var prev = this.#prev;
|
|
1888
|
-
var next = this.#next;
|
|
1889
|
-
if (prev === null) first_batch = next;
|
|
1890
|
-
else prev.#next = next;
|
|
1891
|
-
if (next === null) last_batch = prev;
|
|
1892
|
-
else next.#prev = prev;
|
|
1893
|
-
this.linked = false;
|
|
1894
|
-
}
|
|
1895
|
-
};
|
|
1896
|
-
/**
|
|
1897
|
-
* Synchronously flush any pending updates.
|
|
1898
|
-
* Returns void if no callback is provided, otherwise returns the result of calling the callback.
|
|
1899
|
-
* @template [T=void]
|
|
1900
|
-
* @param {(() => T) | undefined} [fn]
|
|
1901
|
-
* @returns {T}
|
|
1902
|
-
*/
|
|
1903
|
-
function flushSync(fn) {
|
|
1904
|
-
var was_flushing_sync = is_flushing_sync;
|
|
1905
|
-
is_flushing_sync = true;
|
|
1906
|
-
try {
|
|
1907
|
-
var result;
|
|
1908
|
-
if (fn) ;
|
|
1909
|
-
while (true) {
|
|
1910
|
-
flush_tasks();
|
|
1911
|
-
if (current_batch === null) return result;
|
|
1912
|
-
current_batch.flush();
|
|
1913
|
-
}
|
|
1914
|
-
} finally {
|
|
1915
|
-
is_flushing_sync = was_flushing_sync;
|
|
1916
|
-
}
|
|
1917
|
-
}
|
|
1918
|
-
function infinite_loop_guard() {
|
|
1919
|
-
try {
|
|
1920
|
-
effect_update_depth_exceeded();
|
|
1921
|
-
} catch (error) {
|
|
1922
|
-
invoke_error_boundary(error, last_scheduled_effect);
|
|
1923
|
-
}
|
|
1924
|
-
}
|
|
1925
|
-
/** @type {Set<Effect> | null} */
|
|
1926
|
-
var eager_block_effects = null;
|
|
1927
|
-
/**
|
|
1928
|
-
* @param {Array<Effect>} effects
|
|
1929
|
-
* @returns {void}
|
|
1930
|
-
*/
|
|
1931
|
-
function flush_queued_effects(effects) {
|
|
1932
|
-
var length = effects.length;
|
|
1933
|
-
if (length === 0) return;
|
|
1934
|
-
var i = 0;
|
|
1935
|
-
while (i < length) {
|
|
1936
|
-
var effect = effects[i++];
|
|
1937
|
-
if ((effect.f & 24576) === 0 && is_dirty(effect)) {
|
|
1938
|
-
eager_block_effects = /* @__PURE__ */ new Set();
|
|
1939
|
-
update_effect(effect);
|
|
1940
|
-
if (effect.deps === null && effect.first === null && effect.nodes === null && effect.teardown === null && effect.ac === null) unlink_effect(effect);
|
|
1941
|
-
if (eager_block_effects?.size > 0) {
|
|
1942
|
-
old_values.clear();
|
|
1943
|
-
for (const e of eager_block_effects) {
|
|
1944
|
-
if ((e.f & 24576) !== 0) continue;
|
|
1945
|
-
/** @type {Effect[]} */
|
|
1946
|
-
const ordered_effects = [e];
|
|
1947
|
-
let ancestor = e.parent;
|
|
1948
|
-
while (ancestor !== null) {
|
|
1949
|
-
if (eager_block_effects.has(ancestor)) {
|
|
1950
|
-
eager_block_effects.delete(ancestor);
|
|
1951
|
-
ordered_effects.push(ancestor);
|
|
1952
|
-
}
|
|
1953
|
-
ancestor = ancestor.parent;
|
|
1954
|
-
}
|
|
1955
|
-
for (let j = ordered_effects.length - 1; j >= 0; j--) {
|
|
1956
|
-
const e = ordered_effects[j];
|
|
1957
|
-
if ((e.f & 24576) !== 0) continue;
|
|
1958
|
-
update_effect(e);
|
|
1959
|
-
}
|
|
1960
|
-
}
|
|
1961
|
-
eager_block_effects.clear();
|
|
1962
|
-
}
|
|
1963
|
-
}
|
|
1647
|
+
update_pending_count(d, batch) {
|
|
1648
|
+
this.#update_pending_count(d, batch);
|
|
1649
|
+
this.#local_pending_count += d;
|
|
1650
|
+
if (!this.#effect_pending || this.#pending_count_update_queued) return;
|
|
1651
|
+
this.#pending_count_update_queued = true;
|
|
1652
|
+
queue_micro_task(() => {
|
|
1653
|
+
this.#pending_count_update_queued = false;
|
|
1654
|
+
if (this.#effect_pending) internal_set(this.#effect_pending, this.#local_pending_count);
|
|
1655
|
+
});
|
|
1964
1656
|
}
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
* This is similar to `mark_reactions`, but it only marks async/block effects
|
|
1969
|
-
* depending on `value` and at least one of the other `sources`, so that
|
|
1970
|
-
* these effects can re-run after another batch has been committed
|
|
1971
|
-
* @param {Value} value
|
|
1972
|
-
* @param {Source[]} sources
|
|
1973
|
-
* @param {Set<Value>} marked
|
|
1974
|
-
* @param {Map<Reaction, boolean>} checked
|
|
1975
|
-
*/
|
|
1976
|
-
function mark_effects(value, sources, marked, checked) {
|
|
1977
|
-
if (marked.has(value)) return;
|
|
1978
|
-
marked.add(value);
|
|
1979
|
-
if (value.reactions !== null) for (const reaction of value.reactions) {
|
|
1980
|
-
const flags = reaction.f;
|
|
1981
|
-
if ((flags & 2) !== 0) mark_effects(reaction, sources, marked, checked);
|
|
1982
|
-
else if ((flags & 4194320) !== 0 && (flags & 2048) === 0 && depends_on(reaction, sources, checked)) {
|
|
1983
|
-
set_signal_status(reaction, DIRTY);
|
|
1984
|
-
schedule_effect(reaction);
|
|
1985
|
-
}
|
|
1657
|
+
get_effect_pending() {
|
|
1658
|
+
this.#effect_pending_subscriber();
|
|
1659
|
+
return get(this.#effect_pending);
|
|
1986
1660
|
}
|
|
1987
|
-
}
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
1661
|
+
/** @param {unknown} error */
|
|
1662
|
+
error(error) {
|
|
1663
|
+
if (!this.#props.onerror && !this.#props.failed) throw error;
|
|
1664
|
+
if (current_batch?.is_fork) {
|
|
1665
|
+
if (this.#main_effect) current_batch.skip_effect(this.#main_effect);
|
|
1666
|
+
if (this.#pending_effect) current_batch.skip_effect(this.#pending_effect);
|
|
1667
|
+
if (this.#failed_effect) current_batch.skip_effect(this.#failed_effect);
|
|
1668
|
+
current_batch.oncommit(() => {
|
|
1669
|
+
this.#handle_error(error);
|
|
1670
|
+
});
|
|
1671
|
+
} else this.#handle_error(error);
|
|
1672
|
+
}
|
|
1673
|
+
/**
|
|
1674
|
+
* @param {unknown} error
|
|
1675
|
+
*/
|
|
1676
|
+
#handle_error(error) {
|
|
1677
|
+
if (this.#main_effect) {
|
|
1678
|
+
destroy_effect(this.#main_effect);
|
|
1679
|
+
this.#main_effect = null;
|
|
1680
|
+
}
|
|
1681
|
+
if (this.#pending_effect) {
|
|
1682
|
+
destroy_effect(this.#pending_effect);
|
|
1683
|
+
this.#pending_effect = null;
|
|
1684
|
+
}
|
|
1685
|
+
if (this.#failed_effect) {
|
|
1686
|
+
destroy_effect(this.#failed_effect);
|
|
1687
|
+
this.#failed_effect = null;
|
|
1688
|
+
}
|
|
1689
|
+
if (hydrating) {
|
|
1690
|
+
set_hydrate_node(this.#hydrate_open);
|
|
1691
|
+
next();
|
|
1692
|
+
set_hydrate_node(skip_nodes());
|
|
2001
1693
|
}
|
|
1694
|
+
var onerror = this.#props.onerror;
|
|
1695
|
+
let failed = this.#props.failed;
|
|
1696
|
+
var did_reset = false;
|
|
1697
|
+
var calling_on_error = false;
|
|
1698
|
+
const reset = () => {
|
|
1699
|
+
if (did_reset) {
|
|
1700
|
+
svelte_boundary_reset_noop();
|
|
1701
|
+
return;
|
|
1702
|
+
}
|
|
1703
|
+
did_reset = true;
|
|
1704
|
+
if (calling_on_error) svelte_boundary_reset_onerror();
|
|
1705
|
+
if (this.#failed_effect !== null) pause_effect(this.#failed_effect, () => {
|
|
1706
|
+
this.#failed_effect = null;
|
|
1707
|
+
});
|
|
1708
|
+
this.#run(() => {
|
|
1709
|
+
this.#render();
|
|
1710
|
+
});
|
|
1711
|
+
};
|
|
1712
|
+
/** @param {unknown} transformed_error */
|
|
1713
|
+
const handle_error_result = (transformed_error) => {
|
|
1714
|
+
try {
|
|
1715
|
+
calling_on_error = true;
|
|
1716
|
+
onerror?.(transformed_error, reset);
|
|
1717
|
+
calling_on_error = false;
|
|
1718
|
+
} catch (error) {
|
|
1719
|
+
invoke_error_boundary(error, this.#effect && this.#effect.parent);
|
|
1720
|
+
}
|
|
1721
|
+
if (failed) this.#failed_effect = this.#run(() => {
|
|
1722
|
+
try {
|
|
1723
|
+
return branch(() => {
|
|
1724
|
+
var effect = active_effect;
|
|
1725
|
+
effect.b = this;
|
|
1726
|
+
effect.f |= 128;
|
|
1727
|
+
failed(this.#anchor, () => transformed_error, () => reset);
|
|
1728
|
+
});
|
|
1729
|
+
} catch (error) {
|
|
1730
|
+
invoke_error_boundary(error, this.#effect.parent);
|
|
1731
|
+
return null;
|
|
1732
|
+
}
|
|
1733
|
+
});
|
|
1734
|
+
};
|
|
1735
|
+
queue_micro_task(() => {
|
|
1736
|
+
/** @type {unknown} */
|
|
1737
|
+
var result;
|
|
1738
|
+
try {
|
|
1739
|
+
result = this.transform_error(error);
|
|
1740
|
+
} catch (e) {
|
|
1741
|
+
invoke_error_boundary(e, this.#effect && this.#effect.parent);
|
|
1742
|
+
return;
|
|
1743
|
+
}
|
|
1744
|
+
if (result !== null && typeof result === "object" && typeof result.then === "function")
|
|
1745
|
+
/** @type {any} */ result.then(
|
|
1746
|
+
handle_error_result,
|
|
1747
|
+
/** @param {unknown} e */
|
|
1748
|
+
(e) => invoke_error_boundary(e, this.#effect && this.#effect.parent)
|
|
1749
|
+
);
|
|
1750
|
+
else handle_error_result(result);
|
|
1751
|
+
});
|
|
2002
1752
|
}
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
}
|
|
1753
|
+
};
|
|
1754
|
+
var OBSOLETE = Symbol("obsolete");
|
|
2006
1755
|
/**
|
|
2007
|
-
* @param {
|
|
1756
|
+
* @param {Derived} derived
|
|
2008
1757
|
* @returns {void}
|
|
2009
1758
|
*/
|
|
2010
|
-
function
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
* they can be correctly rescheduled later. Tracks dirty and maybe_dirty
|
|
2016
|
-
* effects so they can be rescheduled if the branch survives.
|
|
2017
|
-
* @param {Effect} effect
|
|
2018
|
-
* @param {{ d: Effect[], m: Effect[] }} tracked
|
|
2019
|
-
*/
|
|
2020
|
-
function reset_branch(effect, tracked) {
|
|
2021
|
-
if ((effect.f & 32) !== 0 && (effect.f & 1024) !== 0) return;
|
|
2022
|
-
if ((effect.f & 2048) !== 0) tracked.d.push(effect);
|
|
2023
|
-
else if ((effect.f & 4096) !== 0) tracked.m.push(effect);
|
|
2024
|
-
set_signal_status(effect, CLEAN);
|
|
2025
|
-
var e = effect.first;
|
|
2026
|
-
while (e !== null) {
|
|
2027
|
-
reset_branch(e, tracked);
|
|
2028
|
-
e = e.next;
|
|
1759
|
+
function destroy_derived_effects(derived) {
|
|
1760
|
+
var effects = derived.effects;
|
|
1761
|
+
if (effects !== null) {
|
|
1762
|
+
derived.effects = null;
|
|
1763
|
+
for (var i = 0; i < effects.length; i += 1) destroy_effect(effects[i]);
|
|
2029
1764
|
}
|
|
2030
1765
|
}
|
|
2031
1766
|
/**
|
|
2032
|
-
*
|
|
2033
|
-
* @param {
|
|
1767
|
+
* @template T
|
|
1768
|
+
* @param {Derived} derived
|
|
1769
|
+
* @returns {T}
|
|
2034
1770
|
*/
|
|
2035
|
-
function
|
|
2036
|
-
|
|
2037
|
-
var
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
1771
|
+
function execute_derived(derived) {
|
|
1772
|
+
var value;
|
|
1773
|
+
var prev_active_effect = active_effect;
|
|
1774
|
+
var parent = derived.parent;
|
|
1775
|
+
if (!is_destroying_effect && parent !== null && derived.v !== UNINITIALIZED && (parent.f & 24576) !== 0) {
|
|
1776
|
+
derived_inert();
|
|
1777
|
+
return derived.v;
|
|
2041
1778
|
}
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
*
|
|
2054
|
-
*
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
*
|
|
2070
|
-
* this.#subscribe = createSubscriber((update) => {
|
|
2071
|
-
* // when the `change` event occurs, re-run any effects that read `this.current`
|
|
2072
|
-
* const off = on(this.#query, 'change', update);
|
|
2073
|
-
*
|
|
2074
|
-
* // stop listening when all the effects are destroyed
|
|
2075
|
-
* return () => off();
|
|
2076
|
-
* });
|
|
2077
|
-
* }
|
|
2078
|
-
*
|
|
2079
|
-
* get current() {
|
|
2080
|
-
* // This makes the getter reactive, if read in an effect
|
|
2081
|
-
* this.#subscribe();
|
|
2082
|
-
*
|
|
2083
|
-
* // Return the current state of the query, whether or not we're in an effect
|
|
2084
|
-
* return this.#query.matches;
|
|
2085
|
-
* }
|
|
2086
|
-
* }
|
|
2087
|
-
* ```
|
|
2088
|
-
* @param {(update: () => void) => (() => void) | void} start
|
|
2089
|
-
* @since 5.7.0
|
|
2090
|
-
*/
|
|
2091
|
-
function createSubscriber(start) {
|
|
2092
|
-
let subscribers = 0;
|
|
2093
|
-
let version = source(0);
|
|
2094
|
-
/** @type {(() => void) | void} */
|
|
2095
|
-
let stop;
|
|
2096
|
-
return () => {
|
|
2097
|
-
if (effect_tracking()) {
|
|
2098
|
-
get(version);
|
|
2099
|
-
render_effect(() => {
|
|
2100
|
-
if (subscribers === 0) stop = untrack(() => start(() => increment(version)));
|
|
2101
|
-
subscribers += 1;
|
|
2102
|
-
return () => {
|
|
2103
|
-
queue_micro_task(() => {
|
|
2104
|
-
subscribers -= 1;
|
|
2105
|
-
if (subscribers === 0) {
|
|
2106
|
-
stop?.();
|
|
2107
|
-
stop = void 0;
|
|
2108
|
-
increment(version);
|
|
2109
|
-
}
|
|
2110
|
-
});
|
|
2111
|
-
};
|
|
2112
|
-
});
|
|
1779
|
+
set_active_effect(parent);
|
|
1780
|
+
try {
|
|
1781
|
+
derived.f &= ~WAS_MARKED;
|
|
1782
|
+
destroy_derived_effects(derived);
|
|
1783
|
+
value = update_reaction(derived);
|
|
1784
|
+
} finally {
|
|
1785
|
+
set_active_effect(prev_active_effect);
|
|
1786
|
+
}
|
|
1787
|
+
return value;
|
|
1788
|
+
}
|
|
1789
|
+
/**
|
|
1790
|
+
* @param {Derived} derived
|
|
1791
|
+
* @returns {void}
|
|
1792
|
+
*/
|
|
1793
|
+
function update_derived(derived) {
|
|
1794
|
+
var value = execute_derived(derived);
|
|
1795
|
+
if (!derived.equals(value)) {
|
|
1796
|
+
derived.wv = increment_write_version();
|
|
1797
|
+
if (!current_batch?.is_fork || derived.deps === null) {
|
|
1798
|
+
if (current_batch !== null) {
|
|
1799
|
+
current_batch.capture(derived, value, true);
|
|
1800
|
+
previous_batch?.capture(derived, value, true);
|
|
1801
|
+
} else derived.v = value;
|
|
1802
|
+
if (derived.deps === null) {
|
|
1803
|
+
set_signal_status(derived, CLEAN);
|
|
1804
|
+
return;
|
|
1805
|
+
}
|
|
2113
1806
|
}
|
|
2114
|
-
}
|
|
1807
|
+
}
|
|
1808
|
+
if (is_destroying_effect) return;
|
|
1809
|
+
if (batch_values !== null) {
|
|
1810
|
+
if (effect_tracking() || current_batch?.is_fork) batch_values.set(derived, value);
|
|
1811
|
+
} else update_derived_status(derived);
|
|
2115
1812
|
}
|
|
2116
|
-
//#endregion
|
|
2117
|
-
//#region node_modules/.pnpm/svelte@5.56.0_@typescript-eslint+types@8.60.0/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
|
|
2118
|
-
/** @import { Effect, Source, TemplateNode, } from '#client' */
|
|
2119
1813
|
/**
|
|
2120
|
-
* @
|
|
2121
|
-
* onerror?: ((error: unknown, reset: () => void) => void) | null;
|
|
2122
|
-
* failed?: ((anchor: Node, error: () => unknown, reset: () => () => void) => void) | null;
|
|
2123
|
-
* pending?: ((anchor: Node) => void) | null;
|
|
2124
|
-
* }} BoundaryProps
|
|
1814
|
+
* @param {Derived} derived
|
|
2125
1815
|
*/
|
|
2126
|
-
|
|
1816
|
+
function freeze_derived_effects(derived) {
|
|
1817
|
+
if (derived.effects === null) return;
|
|
1818
|
+
for (const e of derived.effects) if (e.teardown || e.ac) {
|
|
1819
|
+
e.teardown?.();
|
|
1820
|
+
e.ac?.abort(STALE_REACTION);
|
|
1821
|
+
if (e.fn !== null) e.teardown = noop;
|
|
1822
|
+
e.ac = null;
|
|
1823
|
+
remove_reactions(e, 0);
|
|
1824
|
+
destroy_effect_children(e);
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
2127
1827
|
/**
|
|
2128
|
-
* @param {
|
|
2129
|
-
* @param {BoundaryProps} props
|
|
2130
|
-
* @param {((anchor: Node) => void)} children
|
|
2131
|
-
* @param {((error: unknown) => unknown) | undefined} [transform_error]
|
|
2132
|
-
* @returns {void}
|
|
1828
|
+
* @param {Derived} derived
|
|
2133
1829
|
*/
|
|
2134
|
-
function
|
|
2135
|
-
|
|
1830
|
+
function unfreeze_derived_effects(derived) {
|
|
1831
|
+
if (derived.effects === null) return;
|
|
1832
|
+
for (const e of derived.effects) if (e.teardown && e.fn !== null) update_effect(e);
|
|
2136
1833
|
}
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
1834
|
+
//#endregion
|
|
1835
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/client/reactivity/batch.js
|
|
1836
|
+
/** @import { Fork } from 'svelte' */
|
|
1837
|
+
/** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
|
|
1838
|
+
/** @type {Batch | null} */
|
|
1839
|
+
var first_batch = null;
|
|
1840
|
+
/** @type {Batch | null} */
|
|
1841
|
+
var last_batch = null;
|
|
1842
|
+
/** @type {Batch | null} */
|
|
1843
|
+
var current_batch = null;
|
|
1844
|
+
/**
|
|
1845
|
+
* This is needed to avoid overwriting inputs
|
|
1846
|
+
* @type {Batch | null}
|
|
1847
|
+
*/
|
|
1848
|
+
var previous_batch = null;
|
|
1849
|
+
/**
|
|
1850
|
+
* When time travelling (i.e. working in one batch, while other batches
|
|
1851
|
+
* still have ongoing work), we ignore the real values of affected
|
|
1852
|
+
* signals in favour of their values within the batch
|
|
1853
|
+
* @type {Map<Value, any> | null}
|
|
1854
|
+
*/
|
|
1855
|
+
var batch_values = null;
|
|
1856
|
+
/** @type {Effect | null} */
|
|
1857
|
+
var last_scheduled_effect = null;
|
|
1858
|
+
var is_flushing_sync = false;
|
|
1859
|
+
var is_processing = false;
|
|
1860
|
+
/**
|
|
1861
|
+
* During traversal, this is an array. Newly created effects are (if not immediately
|
|
1862
|
+
* executed) pushed to this array, rather than going through the scheduling
|
|
1863
|
+
* rigamarole that would cause another turn of the flush loop.
|
|
1864
|
+
* @type {Effect[] | null}
|
|
1865
|
+
*/
|
|
1866
|
+
var collected_effects = null;
|
|
1867
|
+
/**
|
|
1868
|
+
* An array of effects that are marked during traversal as a result of a `set`
|
|
1869
|
+
* (not `internal_set`) call. These will be added to the next batch and
|
|
1870
|
+
* trigger another `batch.process()`
|
|
1871
|
+
* @type {Effect[] | null}
|
|
1872
|
+
* @deprecated when we get rid of legacy mode and stores, we can get rid of this
|
|
1873
|
+
*/
|
|
1874
|
+
var legacy_updates = null;
|
|
1875
|
+
var flush_count = 0;
|
|
1876
|
+
var uid = 1;
|
|
1877
|
+
var Batch = class Batch {
|
|
1878
|
+
id = uid++;
|
|
1879
|
+
/** True as soon as `#process` was called */
|
|
1880
|
+
#started = false;
|
|
1881
|
+
linked = true;
|
|
1882
|
+
/** @type {Batch | null} */
|
|
1883
|
+
#prev = null;
|
|
1884
|
+
/** @type {Batch | null} */
|
|
1885
|
+
#next = null;
|
|
1886
|
+
/** @type {Map<Effect, ReturnType<typeof deferred<any>>>} */
|
|
1887
|
+
async_deriveds = /* @__PURE__ */ new Map();
|
|
2141
1888
|
/**
|
|
2142
|
-
*
|
|
2143
|
-
*
|
|
2144
|
-
*
|
|
1889
|
+
* The current values of any signals that are updated in this batch.
|
|
1890
|
+
* Tuple format: [value, is_derived] (note: is_derived is false for deriveds, too, if they were overridden via assignment)
|
|
1891
|
+
* They keys of this map are identical to `this.#previous`
|
|
1892
|
+
* @type {Map<Value, [any, boolean]>}
|
|
1893
|
+
*/
|
|
1894
|
+
current = /* @__PURE__ */ new Map();
|
|
1895
|
+
/**
|
|
1896
|
+
* The values of any signals (sources and deriveds) that are updated in this batch _before_ those updates took place.
|
|
1897
|
+
* They keys of this map are identical to `this.#current`
|
|
1898
|
+
* @type {Map<Value, any>}
|
|
1899
|
+
*/
|
|
1900
|
+
previous = /* @__PURE__ */ new Map();
|
|
1901
|
+
/**
|
|
1902
|
+
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
1903
|
+
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
1904
|
+
* @type {Set<(batch: Batch) => void>}
|
|
1905
|
+
*/
|
|
1906
|
+
#commit_callbacks = /* @__PURE__ */ new Set();
|
|
1907
|
+
/**
|
|
1908
|
+
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
1909
|
+
* @type {Set<(batch: Batch) => void>}
|
|
1910
|
+
*/
|
|
1911
|
+
#discard_callbacks = /* @__PURE__ */ new Set();
|
|
1912
|
+
/**
|
|
1913
|
+
* The number of async effects that are currently in flight
|
|
1914
|
+
*/
|
|
1915
|
+
#pending = 0;
|
|
1916
|
+
/**
|
|
1917
|
+
* Async effects that are currently in flight, _not_ inside a pending boundary
|
|
1918
|
+
* @type {Map<Effect, number>}
|
|
1919
|
+
*/
|
|
1920
|
+
#blocking_pending = /* @__PURE__ */ new Map();
|
|
1921
|
+
/**
|
|
1922
|
+
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
1923
|
+
* TODO replace with Promise.withResolvers once supported widely enough
|
|
1924
|
+
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
1925
|
+
*/
|
|
1926
|
+
#deferred = null;
|
|
1927
|
+
/**
|
|
1928
|
+
* The root effects that need to be flushed
|
|
1929
|
+
* @type {Effect[]}
|
|
1930
|
+
*/
|
|
1931
|
+
#roots = [];
|
|
1932
|
+
/**
|
|
1933
|
+
* Effects created while this batch was active.
|
|
1934
|
+
* @type {Effect[]}
|
|
1935
|
+
*/
|
|
1936
|
+
#new_effects = [];
|
|
1937
|
+
/**
|
|
1938
|
+
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
1939
|
+
* @type {Set<Effect>}
|
|
2145
1940
|
*/
|
|
2146
|
-
transform_error;
|
|
2147
|
-
/** @type {TemplateNode} */
|
|
2148
|
-
#anchor;
|
|
2149
|
-
/** @type {TemplateNode | null} */
|
|
2150
|
-
#hydrate_open = hydrating ? hydrate_node : null;
|
|
2151
|
-
/** @type {BoundaryProps} */
|
|
2152
|
-
#props;
|
|
2153
|
-
/** @type {((anchor: Node) => void)} */
|
|
2154
|
-
#children;
|
|
2155
|
-
/** @type {Effect} */
|
|
2156
|
-
#effect;
|
|
2157
|
-
/** @type {Effect | null} */
|
|
2158
|
-
#main_effect = null;
|
|
2159
|
-
/** @type {Effect | null} */
|
|
2160
|
-
#pending_effect = null;
|
|
2161
|
-
/** @type {Effect | null} */
|
|
2162
|
-
#failed_effect = null;
|
|
2163
|
-
/** @type {DocumentFragment | null} */
|
|
2164
|
-
#offscreen_fragment = null;
|
|
2165
|
-
#local_pending_count = 0;
|
|
2166
|
-
#pending_count = 0;
|
|
2167
|
-
#pending_count_update_queued = false;
|
|
2168
|
-
/** @type {Set<Effect>} */
|
|
2169
1941
|
#dirty_effects = /* @__PURE__ */ new Set();
|
|
2170
|
-
/**
|
|
1942
|
+
/**
|
|
1943
|
+
* Deferred effects that are MAYBE_DIRTY
|
|
1944
|
+
* @type {Set<Effect>}
|
|
1945
|
+
*/
|
|
2171
1946
|
#maybe_dirty_effects = /* @__PURE__ */ new Set();
|
|
2172
1947
|
/**
|
|
2173
|
-
* A
|
|
2174
|
-
*
|
|
2175
|
-
*
|
|
2176
|
-
*
|
|
2177
|
-
* @type {
|
|
1948
|
+
* A map of branches that still exist, but will be destroyed when this batch
|
|
1949
|
+
* is committed — we skip over these during `process`.
|
|
1950
|
+
* The value contains child effects that were dirty/maybe_dirty before being reset,
|
|
1951
|
+
* so they can be rescheduled if the branch survives.
|
|
1952
|
+
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
2178
1953
|
*/
|
|
2179
|
-
#
|
|
2180
|
-
#effect_pending_subscriber = createSubscriber(() => {
|
|
2181
|
-
this.#effect_pending = source(this.#local_pending_count);
|
|
2182
|
-
return () => {
|
|
2183
|
-
this.#effect_pending = null;
|
|
2184
|
-
};
|
|
2185
|
-
});
|
|
1954
|
+
#skipped_branches = /* @__PURE__ */ new Map();
|
|
2186
1955
|
/**
|
|
2187
|
-
*
|
|
2188
|
-
* @
|
|
2189
|
-
* @param {((anchor: Node) => void)} children
|
|
2190
|
-
* @param {((error: unknown) => unknown) | undefined} [transform_error]
|
|
1956
|
+
* Inverse of #skipped_branches which we need to tell prior batches to unskip them when committing
|
|
1957
|
+
* @type {Set<Effect>}
|
|
2191
1958
|
*/
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
}
|
|
2201
|
-
|
|
2202
|
-
this.transform_error = transform_error ?? this.parent?.transform_error ?? ((e) => e);
|
|
2203
|
-
this.#effect = block(() => {
|
|
2204
|
-
if (hydrating) {
|
|
2205
|
-
const comment = this.#hydrate_open;
|
|
2206
|
-
hydrate_next();
|
|
2207
|
-
const server_rendered_pending = comment.data === "[!";
|
|
2208
|
-
if (comment.data.startsWith("[?")) {
|
|
2209
|
-
const serialized_error = JSON.parse(comment.data.slice(2));
|
|
2210
|
-
this.#hydrate_failed_content(serialized_error);
|
|
2211
|
-
} else if (server_rendered_pending) this.#hydrate_pending_content();
|
|
2212
|
-
else this.#hydrate_resolved_content();
|
|
2213
|
-
} else this.#render();
|
|
2214
|
-
}, flags);
|
|
2215
|
-
if (hydrating) this.#anchor = hydrate_node;
|
|
1959
|
+
#unskipped_branches = /* @__PURE__ */ new Set();
|
|
1960
|
+
is_fork = false;
|
|
1961
|
+
#decrement_queued = false;
|
|
1962
|
+
constructor() {
|
|
1963
|
+
if (last_batch === null) first_batch = last_batch = this;
|
|
1964
|
+
else {
|
|
1965
|
+
last_batch.#next = this;
|
|
1966
|
+
this.#prev = last_batch;
|
|
1967
|
+
}
|
|
1968
|
+
last_batch = this;
|
|
2216
1969
|
}
|
|
2217
|
-
#
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
1970
|
+
#is_deferred() {
|
|
1971
|
+
if (this.is_fork) return true;
|
|
1972
|
+
for (const effect of this.#blocking_pending.keys()) {
|
|
1973
|
+
var e = effect;
|
|
1974
|
+
var skipped = false;
|
|
1975
|
+
while (e.parent !== null) {
|
|
1976
|
+
if (this.#skipped_branches.has(e)) {
|
|
1977
|
+
skipped = true;
|
|
1978
|
+
break;
|
|
1979
|
+
}
|
|
1980
|
+
e = e.parent;
|
|
1981
|
+
}
|
|
1982
|
+
if (!skipped) return true;
|
|
2222
1983
|
}
|
|
1984
|
+
return false;
|
|
2223
1985
|
}
|
|
2224
1986
|
/**
|
|
2225
|
-
*
|
|
1987
|
+
* Add an effect to the #skipped_branches map and reset its children
|
|
1988
|
+
* @param {Effect} effect
|
|
2226
1989
|
*/
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
failed(this.#anchor, () => error, () => () => {});
|
|
1990
|
+
skip_effect(effect) {
|
|
1991
|
+
if (!this.#skipped_branches.has(effect)) this.#skipped_branches.set(effect, {
|
|
1992
|
+
d: [],
|
|
1993
|
+
m: []
|
|
2232
1994
|
});
|
|
1995
|
+
this.#unskipped_branches.delete(effect);
|
|
2233
1996
|
}
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
this.#
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
this.#anchor.before(fragment);
|
|
2248
|
-
this.#offscreen_fragment = null;
|
|
2249
|
-
pause_effect(this.#pending_effect, () => {
|
|
2250
|
-
this.#pending_effect = null;
|
|
2251
|
-
});
|
|
2252
|
-
this.#resolve(current_batch);
|
|
1997
|
+
/**
|
|
1998
|
+
* Remove an effect from the #skipped_branches map and reschedule
|
|
1999
|
+
* any tracked dirty/maybe_dirty child effects
|
|
2000
|
+
* @param {Effect} effect
|
|
2001
|
+
* @param {(e: Effect) => void} callback
|
|
2002
|
+
*/
|
|
2003
|
+
unskip_effect(effect, callback = (e) => this.schedule(e)) {
|
|
2004
|
+
var tracked = this.#skipped_branches.get(effect);
|
|
2005
|
+
if (tracked) {
|
|
2006
|
+
this.#skipped_branches.delete(effect);
|
|
2007
|
+
for (var e of tracked.d) {
|
|
2008
|
+
set_signal_status(e, DIRTY);
|
|
2009
|
+
callback(e);
|
|
2253
2010
|
}
|
|
2254
|
-
|
|
2011
|
+
for (e of tracked.m) {
|
|
2012
|
+
set_signal_status(e, MAYBE_DIRTY);
|
|
2013
|
+
callback(e);
|
|
2014
|
+
}
|
|
2015
|
+
}
|
|
2016
|
+
this.#unskipped_branches.add(effect);
|
|
2255
2017
|
}
|
|
2256
|
-
#
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
this.#
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
}
|
|
2271
|
-
|
|
2018
|
+
#process() {
|
|
2019
|
+
this.#started = true;
|
|
2020
|
+
if (flush_count++ > 1e3) {
|
|
2021
|
+
this.#unlink();
|
|
2022
|
+
infinite_loop_guard();
|
|
2023
|
+
}
|
|
2024
|
+
for (const e of this.#dirty_effects) {
|
|
2025
|
+
this.#maybe_dirty_effects.delete(e);
|
|
2026
|
+
set_signal_status(e, DIRTY);
|
|
2027
|
+
this.schedule(e);
|
|
2028
|
+
}
|
|
2029
|
+
for (const e of this.#maybe_dirty_effects) {
|
|
2030
|
+
set_signal_status(e, MAYBE_DIRTY);
|
|
2031
|
+
this.schedule(e);
|
|
2032
|
+
}
|
|
2033
|
+
const roots = this.#roots;
|
|
2034
|
+
this.#roots = [];
|
|
2035
|
+
this.apply();
|
|
2036
|
+
/** @type {Effect[]} */
|
|
2037
|
+
var effects = collected_effects = [];
|
|
2038
|
+
/** @type {Effect[]} */
|
|
2039
|
+
var render_effects = [];
|
|
2040
|
+
/**
|
|
2041
|
+
* @type {Effect[]}
|
|
2042
|
+
* @deprecated when we get rid of legacy mode and stores, we can get rid of this
|
|
2043
|
+
*/
|
|
2044
|
+
var updates = legacy_updates = [];
|
|
2045
|
+
for (const root of roots) try {
|
|
2046
|
+
this.#traverse(root, effects, render_effects);
|
|
2047
|
+
} catch (e) {
|
|
2048
|
+
reset_all(root);
|
|
2049
|
+
if (!this.#is_deferred()) this.discard();
|
|
2050
|
+
throw e;
|
|
2051
|
+
}
|
|
2052
|
+
current_batch = null;
|
|
2053
|
+
if (updates.length > 0) {
|
|
2054
|
+
var batch = Batch.ensure();
|
|
2055
|
+
for (const e of updates) batch.schedule(e);
|
|
2056
|
+
}
|
|
2057
|
+
collected_effects = null;
|
|
2058
|
+
legacy_updates = null;
|
|
2059
|
+
if (this.#is_deferred()) {
|
|
2060
|
+
this.#defer_effects(render_effects);
|
|
2061
|
+
this.#defer_effects(effects);
|
|
2062
|
+
for (const [e, t] of this.#skipped_branches) reset_branch(e, t);
|
|
2063
|
+
if (updates.length > 0)
|
|
2064
|
+
/** @type {Batch} */ current_batch.#process();
|
|
2065
|
+
return;
|
|
2066
|
+
}
|
|
2067
|
+
const earlier_batch = this.#find_earlier_batch();
|
|
2068
|
+
if (earlier_batch) {
|
|
2069
|
+
this.#defer_effects(render_effects);
|
|
2070
|
+
this.#defer_effects(effects);
|
|
2071
|
+
earlier_batch.#merge(this);
|
|
2072
|
+
return;
|
|
2073
|
+
}
|
|
2074
|
+
this.#dirty_effects.clear();
|
|
2075
|
+
this.#maybe_dirty_effects.clear();
|
|
2076
|
+
for (const fn of this.#commit_callbacks) fn(this);
|
|
2077
|
+
this.#commit_callbacks.clear();
|
|
2078
|
+
previous_batch = this;
|
|
2079
|
+
flush_queued_effects(render_effects);
|
|
2080
|
+
flush_queued_effects(effects);
|
|
2081
|
+
previous_batch = null;
|
|
2082
|
+
this.#deferred?.resolve();
|
|
2083
|
+
var next_batch = current_batch;
|
|
2084
|
+
if (this.#pending === 0 && (this.#roots.length === 0 || next_batch !== null)) {
|
|
2085
|
+
this.#unlink();
|
|
2272
2086
|
}
|
|
2087
|
+
if (this.#roots.length > 0) if (next_batch !== null) {
|
|
2088
|
+
const batch = next_batch;
|
|
2089
|
+
batch.#roots.push(...this.#roots.filter((r) => !batch.#roots.includes(r)));
|
|
2090
|
+
} else next_batch = this;
|
|
2091
|
+
if (next_batch !== null) next_batch.#process();
|
|
2273
2092
|
}
|
|
2274
2093
|
/**
|
|
2275
|
-
*
|
|
2094
|
+
* Traverse the effect tree, executing effects or stashing
|
|
2095
|
+
* them for later execution as appropriate
|
|
2096
|
+
* @param {Effect} root
|
|
2097
|
+
* @param {Effect[]} effects
|
|
2098
|
+
* @param {Effect[]} render_effects
|
|
2276
2099
|
*/
|
|
2277
|
-
#
|
|
2278
|
-
|
|
2279
|
-
|
|
2100
|
+
#traverse(root, effects, render_effects) {
|
|
2101
|
+
root.f ^= CLEAN;
|
|
2102
|
+
var effect = root.first;
|
|
2103
|
+
while (effect !== null) {
|
|
2104
|
+
var flags = effect.f;
|
|
2105
|
+
var is_branch = (flags & 96) !== 0;
|
|
2106
|
+
if (!(is_branch && (flags & 1024) !== 0 || (flags & 8192) !== 0 || this.#skipped_branches.has(effect)) && effect.fn !== null) {
|
|
2107
|
+
if (is_branch) effect.f ^= CLEAN;
|
|
2108
|
+
else if ((flags & 4) !== 0) effects.push(effect);
|
|
2109
|
+
else if (is_dirty(effect)) {
|
|
2110
|
+
if ((flags & 16) !== 0) this.#maybe_dirty_effects.add(effect);
|
|
2111
|
+
update_effect(effect);
|
|
2112
|
+
}
|
|
2113
|
+
var child = effect.first;
|
|
2114
|
+
if (child !== null) {
|
|
2115
|
+
effect = child;
|
|
2116
|
+
continue;
|
|
2117
|
+
}
|
|
2118
|
+
}
|
|
2119
|
+
while (effect !== null) {
|
|
2120
|
+
var next = effect.next;
|
|
2121
|
+
if (next !== null) {
|
|
2122
|
+
effect = next;
|
|
2123
|
+
break;
|
|
2124
|
+
}
|
|
2125
|
+
effect = effect.parent;
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2129
|
+
#find_earlier_batch() {
|
|
2130
|
+
var batch = this.#prev;
|
|
2131
|
+
while (batch !== null) {
|
|
2132
|
+
if (!batch.is_fork) {
|
|
2133
|
+
for (const [value, [, is_derived]] of this.current) if (batch.current.has(value) && !is_derived) return batch;
|
|
2134
|
+
}
|
|
2135
|
+
batch = batch.#prev;
|
|
2136
|
+
}
|
|
2137
|
+
return null;
|
|
2280
2138
|
}
|
|
2281
2139
|
/**
|
|
2282
|
-
*
|
|
2283
|
-
* @param {Effect} effect
|
|
2140
|
+
* @param {Batch} batch
|
|
2284
2141
|
*/
|
|
2285
|
-
|
|
2286
|
-
|
|
2142
|
+
#merge(batch) {
|
|
2143
|
+
for (const [source, value] of batch.current) {
|
|
2144
|
+
if (!this.previous.has(source) && batch.previous.has(source)) this.previous.set(source, batch.previous.get(source));
|
|
2145
|
+
this.current.set(source, value);
|
|
2146
|
+
}
|
|
2147
|
+
for (const [effect, deferred] of batch.async_deriveds) {
|
|
2148
|
+
const d = this.async_deriveds.get(effect);
|
|
2149
|
+
if (d) deferred.promise.then(d.resolve).catch(d.reject);
|
|
2150
|
+
}
|
|
2151
|
+
batch.async_deriveds.clear();
|
|
2152
|
+
this.transfer_effects(batch.#dirty_effects, batch.#maybe_dirty_effects);
|
|
2153
|
+
/**
|
|
2154
|
+
* mark all effects that depend on `batch.current`, except the
|
|
2155
|
+
* async effects that we just resolved (TODO unless they depend
|
|
2156
|
+
* on values in this batch that are NOT in the later batch?).
|
|
2157
|
+
* Through this we also will populate the correct #skipped_branches,
|
|
2158
|
+
* oncommit callbacks etc, so we don't need to merge them separately.
|
|
2159
|
+
* @param {Value} value
|
|
2160
|
+
*/
|
|
2161
|
+
const mark = (value) => {
|
|
2162
|
+
var reactions = value.reactions;
|
|
2163
|
+
if (reactions === null) return;
|
|
2164
|
+
for (const reaction of reactions) {
|
|
2165
|
+
var flags = reaction.f;
|
|
2166
|
+
if ((flags & 2) !== 0) mark(reaction);
|
|
2167
|
+
else {
|
|
2168
|
+
var effect = reaction;
|
|
2169
|
+
if (flags & 4194320 && !this.async_deriveds.has(effect)) {
|
|
2170
|
+
this.#maybe_dirty_effects.delete(effect);
|
|
2171
|
+
set_signal_status(effect, DIRTY);
|
|
2172
|
+
this.schedule(effect);
|
|
2173
|
+
}
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
};
|
|
2177
|
+
for (const source of this.current.keys()) mark(source);
|
|
2178
|
+
this.oncommit(() => batch.discard());
|
|
2179
|
+
batch.#unlink();
|
|
2180
|
+
current_batch = this;
|
|
2181
|
+
this.#process();
|
|
2287
2182
|
}
|
|
2288
2183
|
/**
|
|
2289
|
-
*
|
|
2290
|
-
* @returns {boolean}
|
|
2184
|
+
* @param {Effect[]} effects
|
|
2291
2185
|
*/
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
}
|
|
2295
|
-
has_pending_snippet() {
|
|
2296
|
-
return !!this.#props.pending;
|
|
2186
|
+
#defer_effects(effects) {
|
|
2187
|
+
for (var i = 0; i < effects.length; i += 1) defer_effect(effects[i], this.#dirty_effects, this.#maybe_dirty_effects);
|
|
2297
2188
|
}
|
|
2298
2189
|
/**
|
|
2299
|
-
*
|
|
2300
|
-
*
|
|
2190
|
+
* Associate a change to a given source with the current
|
|
2191
|
+
* batch, noting its previous and current values
|
|
2192
|
+
* @param {Value} source
|
|
2193
|
+
* @param {any} value
|
|
2194
|
+
* @param {boolean} [is_derived]
|
|
2301
2195
|
*/
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2196
|
+
capture(source, value, is_derived = false) {
|
|
2197
|
+
if (source.v !== UNINITIALIZED && !this.previous.has(source)) this.previous.set(source, source.v);
|
|
2198
|
+
if ((source.f & 8388608) === 0) {
|
|
2199
|
+
this.current.set(source, [value, is_derived]);
|
|
2200
|
+
batch_values?.set(source, value);
|
|
2201
|
+
}
|
|
2202
|
+
if (!this.is_fork) source.v = value;
|
|
2203
|
+
}
|
|
2204
|
+
activate() {
|
|
2205
|
+
current_batch = this;
|
|
2206
|
+
}
|
|
2207
|
+
deactivate() {
|
|
2208
|
+
current_batch = null;
|
|
2209
|
+
batch_values = null;
|
|
2210
|
+
}
|
|
2211
|
+
flush() {
|
|
2309
2212
|
try {
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
handle_error(e);
|
|
2314
|
-
return null;
|
|
2213
|
+
is_processing = true;
|
|
2214
|
+
current_batch = this;
|
|
2215
|
+
this.#process();
|
|
2315
2216
|
} finally {
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2217
|
+
flush_count = 0;
|
|
2218
|
+
last_scheduled_effect = null;
|
|
2219
|
+
collected_effects = null;
|
|
2220
|
+
legacy_updates = null;
|
|
2221
|
+
is_processing = false;
|
|
2222
|
+
current_batch = null;
|
|
2223
|
+
batch_values = null;
|
|
2224
|
+
old_values.clear();
|
|
2319
2225
|
}
|
|
2320
2226
|
}
|
|
2227
|
+
discard() {
|
|
2228
|
+
for (const fn of this.#discard_callbacks) fn(this);
|
|
2229
|
+
this.#discard_callbacks.clear();
|
|
2230
|
+
for (const deferred of this.async_deriveds.values()) deferred.reject(OBSOLETE);
|
|
2231
|
+
this.#unlink();
|
|
2232
|
+
this.#deferred?.resolve();
|
|
2233
|
+
}
|
|
2321
2234
|
/**
|
|
2322
|
-
*
|
|
2323
|
-
* if any, such that we can replace the snippet with content once work is done
|
|
2324
|
-
* @param {1 | -1} d
|
|
2325
|
-
* @param {Batch} batch
|
|
2235
|
+
* @param {Effect} effect
|
|
2326
2236
|
*/
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2237
|
+
register_created_effect(effect) {
|
|
2238
|
+
this.#new_effects.push(effect);
|
|
2239
|
+
}
|
|
2240
|
+
#commit() {
|
|
2241
|
+
for (let batch = first_batch; batch !== null; batch = batch.#next) {
|
|
2242
|
+
var is_earlier = batch.id < this.id;
|
|
2243
|
+
/** @type {Source[]} */
|
|
2244
|
+
var sources = [];
|
|
2245
|
+
for (const [source, [value, is_derived]] of this.current) {
|
|
2246
|
+
if (batch.current.has(source)) {
|
|
2247
|
+
var batch_value = batch.current.get(source)[0];
|
|
2248
|
+
if (is_earlier && value !== batch_value) batch.current.set(source, [value, is_derived]);
|
|
2249
|
+
else continue;
|
|
2250
|
+
}
|
|
2251
|
+
sources.push(source);
|
|
2252
|
+
}
|
|
2253
|
+
if (is_earlier) for (const [effect, deferred] of this.async_deriveds) {
|
|
2254
|
+
const d = batch.async_deriveds.get(effect);
|
|
2255
|
+
if (d) deferred.promise.then(d.resolve).catch(d.reject);
|
|
2256
|
+
}
|
|
2257
|
+
var current = [...batch.current.keys()].filter((source) => !batch.current.get(source)[1]);
|
|
2258
|
+
if (!batch.#started || current.length === 0) continue;
|
|
2259
|
+
var others = current.filter((source) => !this.current.has(source));
|
|
2260
|
+
if (others.length === 0) {
|
|
2261
|
+
if (is_earlier) batch.discard();
|
|
2262
|
+
} else if (sources.length > 0) {
|
|
2263
|
+
if (is_earlier) for (const unskipped of this.#unskipped_branches) batch.unskip_effect(unskipped, (e) => {
|
|
2264
|
+
if ((e.f & 4194320) !== 0) batch.schedule(e);
|
|
2265
|
+
else batch.#defer_effects([e]);
|
|
2266
|
+
});
|
|
2267
|
+
batch.activate();
|
|
2268
|
+
/** @type {Set<Value>} */
|
|
2269
|
+
var marked = /* @__PURE__ */ new Set();
|
|
2270
|
+
/** @type {Map<Reaction, boolean>} */
|
|
2271
|
+
var checked = /* @__PURE__ */ new Map();
|
|
2272
|
+
for (var source of sources) mark_effects(source, others, marked, checked);
|
|
2273
|
+
checked = /* @__PURE__ */ new Map();
|
|
2274
|
+
var current_unequal = [...batch.current].filter(([c, v1]) => {
|
|
2275
|
+
const v2 = this.current.get(c);
|
|
2276
|
+
if (!v2) return true;
|
|
2277
|
+
return v2[0] !== v1[0] || v2[1] !== v1[1];
|
|
2278
|
+
}).map(([c]) => c);
|
|
2279
|
+
if (current_unequal.length > 0) {
|
|
2280
|
+
for (const effect of this.#new_effects) if ((effect.f & 155648) === 0 && depends_on(effect, current_unequal, checked)) if ((effect.f & 4194320) !== 0) {
|
|
2281
|
+
set_signal_status(effect, DIRTY);
|
|
2282
|
+
batch.schedule(effect);
|
|
2283
|
+
} else batch.#dirty_effects.add(effect);
|
|
2284
|
+
}
|
|
2285
|
+
if (batch.#roots.length > 0 && !batch.#decrement_queued) {
|
|
2286
|
+
batch.apply();
|
|
2287
|
+
for (var root of batch.#roots) batch.#traverse(root, [], []);
|
|
2288
|
+
batch.#roots = [];
|
|
2289
|
+
}
|
|
2290
|
+
batch.deactivate();
|
|
2341
2291
|
}
|
|
2342
2292
|
}
|
|
2343
2293
|
}
|
|
2344
2294
|
/**
|
|
2345
|
-
*
|
|
2346
|
-
*
|
|
2347
|
-
* Do not call from inside the class
|
|
2348
|
-
* @param {1 | -1} d
|
|
2349
|
-
* @param {Batch} batch
|
|
2295
|
+
* @param {boolean} blocking
|
|
2296
|
+
* @param {Effect} effect
|
|
2350
2297
|
*/
|
|
2351
|
-
|
|
2352
|
-
this.#
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2298
|
+
increment(blocking, effect) {
|
|
2299
|
+
this.#pending += 1;
|
|
2300
|
+
if (blocking) {
|
|
2301
|
+
let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
|
|
2302
|
+
this.#blocking_pending.set(effect, blocking_pending_count + 1);
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
/**
|
|
2306
|
+
* @param {boolean} blocking
|
|
2307
|
+
* @param {Effect} effect
|
|
2308
|
+
*/
|
|
2309
|
+
decrement(blocking, effect) {
|
|
2310
|
+
this.#pending -= 1;
|
|
2311
|
+
if (blocking) {
|
|
2312
|
+
let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
|
|
2313
|
+
if (blocking_pending_count === 1) this.#blocking_pending.delete(effect);
|
|
2314
|
+
else this.#blocking_pending.set(effect, blocking_pending_count - 1);
|
|
2315
|
+
}
|
|
2316
|
+
if (this.#decrement_queued) return;
|
|
2317
|
+
this.#decrement_queued = true;
|
|
2356
2318
|
queue_micro_task(() => {
|
|
2357
|
-
this.#
|
|
2358
|
-
if (this
|
|
2319
|
+
this.#decrement_queued = false;
|
|
2320
|
+
if (this.linked) this.flush();
|
|
2359
2321
|
});
|
|
2360
2322
|
}
|
|
2361
|
-
get_effect_pending() {
|
|
2362
|
-
this.#effect_pending_subscriber();
|
|
2363
|
-
return get(this.#effect_pending);
|
|
2364
|
-
}
|
|
2365
|
-
/** @param {unknown} error */
|
|
2366
|
-
error(error) {
|
|
2367
|
-
if (!this.#props.onerror && !this.#props.failed) throw error;
|
|
2368
|
-
if (current_batch?.is_fork) {
|
|
2369
|
-
if (this.#main_effect) current_batch.skip_effect(this.#main_effect);
|
|
2370
|
-
if (this.#pending_effect) current_batch.skip_effect(this.#pending_effect);
|
|
2371
|
-
if (this.#failed_effect) current_batch.skip_effect(this.#failed_effect);
|
|
2372
|
-
current_batch.oncommit(() => {
|
|
2373
|
-
this.#handle_error(error);
|
|
2374
|
-
});
|
|
2375
|
-
} else this.#handle_error(error);
|
|
2376
|
-
}
|
|
2377
2323
|
/**
|
|
2378
|
-
* @param {
|
|
2324
|
+
* @param {Set<Effect>} dirty_effects
|
|
2325
|
+
* @param {Set<Effect>} maybe_dirty_effects
|
|
2379
2326
|
*/
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
const reset = () => {
|
|
2403
|
-
if (did_reset) {
|
|
2404
|
-
svelte_boundary_reset_noop();
|
|
2405
|
-
return;
|
|
2406
|
-
}
|
|
2407
|
-
did_reset = true;
|
|
2408
|
-
if (calling_on_error) svelte_boundary_reset_onerror();
|
|
2409
|
-
if (this.#failed_effect !== null) pause_effect(this.#failed_effect, () => {
|
|
2410
|
-
this.#failed_effect = null;
|
|
2411
|
-
});
|
|
2412
|
-
this.#run(() => {
|
|
2413
|
-
this.#render();
|
|
2414
|
-
});
|
|
2415
|
-
};
|
|
2416
|
-
/** @param {unknown} transformed_error */
|
|
2417
|
-
const handle_error_result = (transformed_error) => {
|
|
2418
|
-
try {
|
|
2419
|
-
calling_on_error = true;
|
|
2420
|
-
onerror?.(transformed_error, reset);
|
|
2421
|
-
calling_on_error = false;
|
|
2422
|
-
} catch (error) {
|
|
2423
|
-
invoke_error_boundary(error, this.#effect && this.#effect.parent);
|
|
2424
|
-
}
|
|
2425
|
-
if (failed) this.#failed_effect = this.#run(() => {
|
|
2426
|
-
try {
|
|
2427
|
-
return branch(() => {
|
|
2428
|
-
var effect = active_effect;
|
|
2429
|
-
effect.b = this;
|
|
2430
|
-
effect.f |= 128;
|
|
2431
|
-
failed(this.#anchor, () => transformed_error, () => reset);
|
|
2432
|
-
});
|
|
2433
|
-
} catch (error) {
|
|
2434
|
-
invoke_error_boundary(error, this.#effect.parent);
|
|
2435
|
-
return null;
|
|
2436
|
-
}
|
|
2327
|
+
transfer_effects(dirty_effects, maybe_dirty_effects) {
|
|
2328
|
+
for (const e of dirty_effects) this.#dirty_effects.add(e);
|
|
2329
|
+
for (const e of maybe_dirty_effects) this.#maybe_dirty_effects.add(e);
|
|
2330
|
+
dirty_effects.clear();
|
|
2331
|
+
maybe_dirty_effects.clear();
|
|
2332
|
+
}
|
|
2333
|
+
/** @param {(batch: Batch) => void} fn */
|
|
2334
|
+
oncommit(fn) {
|
|
2335
|
+
this.#commit_callbacks.add(fn);
|
|
2336
|
+
}
|
|
2337
|
+
/** @param {(batch: Batch) => void} fn */
|
|
2338
|
+
ondiscard(fn) {
|
|
2339
|
+
this.#discard_callbacks.add(fn);
|
|
2340
|
+
}
|
|
2341
|
+
settled() {
|
|
2342
|
+
return (this.#deferred ??= deferred()).promise;
|
|
2343
|
+
}
|
|
2344
|
+
static ensure() {
|
|
2345
|
+
if (current_batch === null) {
|
|
2346
|
+
const batch = current_batch = new Batch();
|
|
2347
|
+
if (!is_processing && !is_flushing_sync) queue_micro_task(() => {
|
|
2348
|
+
if (!batch.#started) batch.flush();
|
|
2437
2349
|
});
|
|
2438
|
-
}
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2350
|
+
}
|
|
2351
|
+
return current_batch;
|
|
2352
|
+
}
|
|
2353
|
+
apply() {
|
|
2354
|
+
{
|
|
2355
|
+
batch_values = null;
|
|
2356
|
+
return;
|
|
2357
|
+
}
|
|
2358
|
+
}
|
|
2359
|
+
/**
|
|
2360
|
+
*
|
|
2361
|
+
* @param {Effect} effect
|
|
2362
|
+
*/
|
|
2363
|
+
schedule(effect) {
|
|
2364
|
+
last_scheduled_effect = effect;
|
|
2365
|
+
if (effect.b?.is_pending && (effect.f & 16777228) !== 0 && (effect.f & 32768) === 0) {
|
|
2366
|
+
effect.b.defer_effect(effect);
|
|
2367
|
+
return;
|
|
2368
|
+
}
|
|
2369
|
+
var e = effect;
|
|
2370
|
+
while (e.parent !== null) {
|
|
2371
|
+
e = e.parent;
|
|
2372
|
+
var flags = e.f;
|
|
2373
|
+
if (collected_effects !== null && e === active_effect) {
|
|
2374
|
+
if ((active_reaction === null || (active_reaction.f & 2) === 0) && true) return;
|
|
2447
2375
|
}
|
|
2448
|
-
if (
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
else handle_error_result(result);
|
|
2455
|
-
});
|
|
2376
|
+
if ((flags & 96) !== 0) {
|
|
2377
|
+
if ((flags & 1024) === 0) return;
|
|
2378
|
+
e.f ^= CLEAN;
|
|
2379
|
+
}
|
|
2380
|
+
}
|
|
2381
|
+
this.#roots.push(e);
|
|
2456
2382
|
}
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
for (var i = 0; i < effects.length; i += 1) destroy_effect(effects[i]);
|
|
2383
|
+
#unlink() {
|
|
2384
|
+
if (!this.linked) return;
|
|
2385
|
+
var prev = this.#prev;
|
|
2386
|
+
var next = this.#next;
|
|
2387
|
+
if (prev === null) first_batch = next;
|
|
2388
|
+
else prev.#next = next;
|
|
2389
|
+
if (next === null) last_batch = prev;
|
|
2390
|
+
else next.#prev = prev;
|
|
2391
|
+
this.linked = false;
|
|
2467
2392
|
}
|
|
2468
|
-
}
|
|
2393
|
+
};
|
|
2469
2394
|
/**
|
|
2470
|
-
*
|
|
2471
|
-
*
|
|
2395
|
+
* Synchronously flush any pending updates.
|
|
2396
|
+
* Returns void if no callback is provided, otherwise returns the result of calling the callback.
|
|
2397
|
+
* @template [T=void]
|
|
2398
|
+
* @param {(() => T) | undefined} [fn]
|
|
2472
2399
|
* @returns {T}
|
|
2473
2400
|
*/
|
|
2474
|
-
function
|
|
2475
|
-
var
|
|
2476
|
-
|
|
2477
|
-
var parent = derived.parent;
|
|
2478
|
-
if (!is_destroying_effect && parent !== null && derived.v !== UNINITIALIZED && (parent.f & 24576) !== 0) {
|
|
2479
|
-
derived_inert();
|
|
2480
|
-
return derived.v;
|
|
2481
|
-
}
|
|
2482
|
-
set_active_effect(parent);
|
|
2401
|
+
function flushSync(fn) {
|
|
2402
|
+
var was_flushing_sync = is_flushing_sync;
|
|
2403
|
+
is_flushing_sync = true;
|
|
2483
2404
|
try {
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2405
|
+
var result;
|
|
2406
|
+
if (fn) ;
|
|
2407
|
+
while (true) {
|
|
2408
|
+
flush_tasks();
|
|
2409
|
+
if (current_batch === null) return result;
|
|
2410
|
+
current_batch.flush();
|
|
2411
|
+
}
|
|
2487
2412
|
} finally {
|
|
2488
|
-
|
|
2413
|
+
is_flushing_sync = was_flushing_sync;
|
|
2414
|
+
}
|
|
2415
|
+
}
|
|
2416
|
+
function infinite_loop_guard() {
|
|
2417
|
+
try {
|
|
2418
|
+
effect_update_depth_exceeded();
|
|
2419
|
+
} catch (error) {
|
|
2420
|
+
invoke_error_boundary(error, last_scheduled_effect);
|
|
2489
2421
|
}
|
|
2490
|
-
return value;
|
|
2491
2422
|
}
|
|
2423
|
+
/** @type {Set<Effect> | null} */
|
|
2424
|
+
var eager_block_effects = null;
|
|
2492
2425
|
/**
|
|
2493
|
-
* @param {
|
|
2426
|
+
* @param {Array<Effect>} effects
|
|
2494
2427
|
* @returns {void}
|
|
2495
2428
|
*/
|
|
2496
|
-
function
|
|
2497
|
-
var
|
|
2498
|
-
if (
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
if (
|
|
2506
|
-
|
|
2507
|
-
|
|
2429
|
+
function flush_queued_effects(effects) {
|
|
2430
|
+
var length = effects.length;
|
|
2431
|
+
if (length === 0) return;
|
|
2432
|
+
var i = 0;
|
|
2433
|
+
while (i < length) {
|
|
2434
|
+
var effect = effects[i++];
|
|
2435
|
+
if ((effect.f & 24576) === 0 && is_dirty(effect)) {
|
|
2436
|
+
eager_block_effects = /* @__PURE__ */ new Set();
|
|
2437
|
+
update_effect(effect);
|
|
2438
|
+
if (effect.deps === null && effect.first === null && effect.nodes === null && effect.teardown === null && effect.ac === null) unlink_effect(effect);
|
|
2439
|
+
if (eager_block_effects?.size > 0) {
|
|
2440
|
+
old_values.clear();
|
|
2441
|
+
for (const e of eager_block_effects) {
|
|
2442
|
+
if ((e.f & 24576) !== 0) continue;
|
|
2443
|
+
/** @type {Effect[]} */
|
|
2444
|
+
const ordered_effects = [e];
|
|
2445
|
+
let ancestor = e.parent;
|
|
2446
|
+
while (ancestor !== null) {
|
|
2447
|
+
if (eager_block_effects.has(ancestor)) {
|
|
2448
|
+
eager_block_effects.delete(ancestor);
|
|
2449
|
+
ordered_effects.push(ancestor);
|
|
2450
|
+
}
|
|
2451
|
+
ancestor = ancestor.parent;
|
|
2452
|
+
}
|
|
2453
|
+
for (let j = ordered_effects.length - 1; j >= 0; j--) {
|
|
2454
|
+
const e = ordered_effects[j];
|
|
2455
|
+
if ((e.f & 24576) !== 0) continue;
|
|
2456
|
+
update_effect(e);
|
|
2457
|
+
}
|
|
2458
|
+
}
|
|
2459
|
+
eager_block_effects.clear();
|
|
2508
2460
|
}
|
|
2509
2461
|
}
|
|
2510
2462
|
}
|
|
2511
|
-
|
|
2512
|
-
if (batch_values !== null) {
|
|
2513
|
-
if (effect_tracking() || current_batch?.is_fork) batch_values.set(derived, value);
|
|
2514
|
-
} else update_derived_status(derived);
|
|
2463
|
+
eager_block_effects = null;
|
|
2515
2464
|
}
|
|
2516
2465
|
/**
|
|
2517
|
-
*
|
|
2466
|
+
* This is similar to `mark_reactions`, but it only marks async/block effects
|
|
2467
|
+
* depending on `value` and at least one of the other `sources`, so that
|
|
2468
|
+
* these effects can re-run after another batch has been committed
|
|
2469
|
+
* @param {Value} value
|
|
2470
|
+
* @param {Source[]} sources
|
|
2471
|
+
* @param {Set<Value>} marked
|
|
2472
|
+
* @param {Map<Reaction, boolean>} checked
|
|
2518
2473
|
*/
|
|
2519
|
-
function
|
|
2520
|
-
if (
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
if (
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2474
|
+
function mark_effects(value, sources, marked, checked) {
|
|
2475
|
+
if (marked.has(value)) return;
|
|
2476
|
+
marked.add(value);
|
|
2477
|
+
if (value.reactions !== null) for (const reaction of value.reactions) {
|
|
2478
|
+
const flags = reaction.f;
|
|
2479
|
+
if ((flags & 2) !== 0) mark_effects(reaction, sources, marked, checked);
|
|
2480
|
+
else if ((flags & 4194320) !== 0 && (flags & 2048) === 0 && depends_on(reaction, sources, checked)) {
|
|
2481
|
+
set_signal_status(reaction, DIRTY);
|
|
2482
|
+
schedule_effect(reaction);
|
|
2483
|
+
}
|
|
2528
2484
|
}
|
|
2529
2485
|
}
|
|
2530
2486
|
/**
|
|
2531
|
-
* @param {
|
|
2487
|
+
* @param {Reaction} reaction
|
|
2488
|
+
* @param {Source[]} sources
|
|
2489
|
+
* @param {Map<Reaction, boolean>} checked
|
|
2532
2490
|
*/
|
|
2533
|
-
function
|
|
2534
|
-
|
|
2535
|
-
|
|
2491
|
+
function depends_on(reaction, sources, checked) {
|
|
2492
|
+
const depends = checked.get(reaction);
|
|
2493
|
+
if (depends !== void 0) return depends;
|
|
2494
|
+
if (reaction.deps !== null) for (const dep of reaction.deps) {
|
|
2495
|
+
if (includes.call(sources, dep)) return true;
|
|
2496
|
+
if ((dep.f & 2) !== 0 && depends_on(dep, sources, checked)) {
|
|
2497
|
+
checked.set(dep, true);
|
|
2498
|
+
return true;
|
|
2499
|
+
}
|
|
2500
|
+
}
|
|
2501
|
+
checked.set(reaction, false);
|
|
2502
|
+
return false;
|
|
2503
|
+
}
|
|
2504
|
+
/**
|
|
2505
|
+
* @param {Effect} effect
|
|
2506
|
+
* @returns {void}
|
|
2507
|
+
*/
|
|
2508
|
+
function schedule_effect(effect) {
|
|
2509
|
+
/** @type {Batch} */ current_batch.schedule(effect);
|
|
2510
|
+
}
|
|
2511
|
+
/**
|
|
2512
|
+
* Mark all the effects inside a skipped branch CLEAN, so that
|
|
2513
|
+
* they can be correctly rescheduled later. Tracks dirty and maybe_dirty
|
|
2514
|
+
* effects so they can be rescheduled if the branch survives.
|
|
2515
|
+
* @param {Effect} effect
|
|
2516
|
+
* @param {{ d: Effect[], m: Effect[] }} tracked
|
|
2517
|
+
*/
|
|
2518
|
+
function reset_branch(effect, tracked) {
|
|
2519
|
+
if ((effect.f & 32) !== 0 && (effect.f & 1024) !== 0) return;
|
|
2520
|
+
if ((effect.f & 2048) !== 0) tracked.d.push(effect);
|
|
2521
|
+
else if ((effect.f & 4096) !== 0) tracked.m.push(effect);
|
|
2522
|
+
set_signal_status(effect, CLEAN);
|
|
2523
|
+
var e = effect.first;
|
|
2524
|
+
while (e !== null) {
|
|
2525
|
+
reset_branch(e, tracked);
|
|
2526
|
+
e = e.next;
|
|
2527
|
+
}
|
|
2528
|
+
}
|
|
2529
|
+
/**
|
|
2530
|
+
* Mark an entire effect tree clean following an error
|
|
2531
|
+
* @param {Effect} effect
|
|
2532
|
+
*/
|
|
2533
|
+
function reset_all(effect) {
|
|
2534
|
+
set_signal_status(effect, CLEAN);
|
|
2535
|
+
var e = effect.first;
|
|
2536
|
+
while (e !== null) {
|
|
2537
|
+
reset_all(e);
|
|
2538
|
+
e = e.next;
|
|
2539
|
+
}
|
|
2536
2540
|
}
|
|
2537
2541
|
//#endregion
|
|
2538
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
2542
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/client/reactivity/sources.js
|
|
2539
2543
|
/** @import { Derived, Effect, Source, Value } from '#client' */
|
|
2540
2544
|
/** @type {Set<Effect>} */
|
|
2541
2545
|
var eager_effects = /* @__PURE__ */ new Set();
|
|
@@ -2825,7 +2829,7 @@ function proxy(value) {
|
|
|
2825
2829
|
});
|
|
2826
2830
|
}
|
|
2827
2831
|
//#endregion
|
|
2828
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
2832
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/client/dom/operations.js
|
|
2829
2833
|
/** @type {Window} */
|
|
2830
2834
|
var $window;
|
|
2831
2835
|
/** @type {() => Node | null} */
|
|
@@ -2885,7 +2889,7 @@ function clear_text_content(node) {
|
|
|
2885
2889
|
node.textContent = "";
|
|
2886
2890
|
}
|
|
2887
2891
|
//#endregion
|
|
2888
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
2892
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
|
|
2889
2893
|
/**
|
|
2890
2894
|
* @template T
|
|
2891
2895
|
* @param {() => T} fn
|
|
@@ -2903,7 +2907,7 @@ function without_reactive_context(fn) {
|
|
|
2903
2907
|
}
|
|
2904
2908
|
}
|
|
2905
2909
|
//#endregion
|
|
2906
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
2910
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/client/reactivity/effects.js
|
|
2907
2911
|
/** @import { Blocker, ComponentContext, ComponentContextLegacy, Derived, Effect, TemplateNode, TransitionManager } from '#client' */
|
|
2908
2912
|
/**
|
|
2909
2913
|
* @param {Effect} effect
|
|
@@ -3084,7 +3088,7 @@ function destroy_effect(effect, remove_dom = true) {
|
|
|
3084
3088
|
remove_effect_dom(effect.nodes.start, effect.nodes.end);
|
|
3085
3089
|
removed = true;
|
|
3086
3090
|
}
|
|
3087
|
-
|
|
3091
|
+
effect.f |= DESTROYING;
|
|
3088
3092
|
destroy_effect_children(effect, remove_dom && !removed);
|
|
3089
3093
|
remove_reactions(effect, 0);
|
|
3090
3094
|
var transitions = effect.nodes && effect.nodes.t;
|
|
@@ -3188,7 +3192,7 @@ function move_effect(effect, fragment) {
|
|
|
3188
3192
|
}
|
|
3189
3193
|
}
|
|
3190
3194
|
//#endregion
|
|
3191
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
3195
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/client/runtime.js
|
|
3192
3196
|
/** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
|
|
3193
3197
|
var is_updating_effect = false;
|
|
3194
3198
|
var is_destroying_effect = false;
|
|
@@ -3621,7 +3625,7 @@ function is_raw_text_element(name) {
|
|
|
3621
3625
|
}
|
|
3622
3626
|
var REGEX_VALID_TAG_NAME = /^[a-zA-Z][a-zA-Z0-9]*(-[a-zA-Z0-9.\-_\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}]*)?$/u;
|
|
3623
3627
|
//#endregion
|
|
3624
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
3628
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/server/blocks/html.js
|
|
3625
3629
|
/**
|
|
3626
3630
|
* @param {string} value
|
|
3627
3631
|
*/
|
|
@@ -3629,7 +3633,7 @@ function html(value) {
|
|
|
3629
3633
|
return "<!---->" + String(value ?? "") + "<!---->";
|
|
3630
3634
|
}
|
|
3631
3635
|
//#endregion
|
|
3632
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
3636
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/server/index.js
|
|
3633
3637
|
var INVALID_ATTR_NAME_CHAR_REGEX = /[\s'">/=\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u;
|
|
3634
3638
|
/**
|
|
3635
3639
|
* @param {Renderer} renderer
|
|
@@ -3788,7 +3792,7 @@ function derived(fn) {
|
|
|
3788
3792
|
};
|
|
3789
3793
|
}
|
|
3790
3794
|
//#endregion
|
|
3791
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
3795
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/server/crypto.js
|
|
3792
3796
|
var text_encoder;
|
|
3793
3797
|
var crypto;
|
|
3794
3798
|
/** @param {string} module_name */
|
|
@@ -3813,7 +3817,7 @@ function base64_encode(bytes) {
|
|
|
3813
3817
|
return btoa(binary);
|
|
3814
3818
|
}
|
|
3815
3819
|
//#endregion
|
|
3816
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
3820
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/server/renderer.js
|
|
3817
3821
|
/** @import { Component } from 'svelte' */
|
|
3818
3822
|
/** @import { Csp, HydratableContext, RenderOutput, SSRContext, SyncRenderOutput, Sha256Source } from './types.js' */
|
|
3819
3823
|
/** @import { MaybePromise } from '#shared' */
|
|
@@ -4488,7 +4492,7 @@ var SSRState = class {
|
|
|
4488
4492
|
}
|
|
4489
4493
|
};
|
|
4490
4494
|
//#endregion
|
|
4491
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
4495
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/server/hydratable.js
|
|
4492
4496
|
/** @import { HydratableLookupEntry } from '#server' */
|
|
4493
4497
|
/**
|
|
4494
4498
|
* @template T
|
|
@@ -4549,7 +4553,7 @@ function serialization_stack(root_stack, uneval_stack) {
|
|
|
4549
4553
|
return out || "<missing stack trace>";
|
|
4550
4554
|
}
|
|
4551
4555
|
//#endregion
|
|
4552
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
4556
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/server/blocks/snippet.js
|
|
4553
4557
|
/** @import { Snippet } from 'svelte' */
|
|
4554
4558
|
/** @import { Renderer } from '../renderer' */
|
|
4555
4559
|
/** @import { Getters } from '#shared' */
|
|
@@ -4569,7 +4573,7 @@ function createRawSnippet(fn) {
|
|
|
4569
4573
|
};
|
|
4570
4574
|
}
|
|
4571
4575
|
//#endregion
|
|
4572
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
4576
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/index-server.js
|
|
4573
4577
|
/** @import { SSRContext } from '#server' */
|
|
4574
4578
|
/** @import { Renderer } from './internal/server/renderer.js' */
|
|
4575
4579
|
var index_server_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -4617,7 +4621,7 @@ function fork() {
|
|
|
4617
4621
|
async function tick() {}
|
|
4618
4622
|
async function settled() {}
|
|
4619
4623
|
|
|
4620
|
-
//#region node_modules/.pnpm/@sveltejs+kit@2.
|
|
4624
|
+
//#region node_modules/.pnpm/@sveltejs+kit@2.63.0_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.2_@typescript-eslin_9ed2d7f3800a1c77eec55a1d66c8792d/node_modules/@sveltejs/kit/src/utils/url.js
|
|
4621
4625
|
/**
|
|
4622
4626
|
* Matches a URI scheme. See https://www.rfc-editor.org/rfc/rfc3986#section-3.1
|
|
4623
4627
|
* @type {RegExp}
|
|
@@ -4735,7 +4739,7 @@ function allow_nodejs_console_log(url) {
|
|
|
4735
4739
|
};
|
|
4736
4740
|
}
|
|
4737
4741
|
//#endregion
|
|
4738
|
-
//#region node_modules/.pnpm/@sveltejs+kit@2.
|
|
4742
|
+
//#region node_modules/.pnpm/@sveltejs+kit@2.63.0_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.2_@typescript-eslin_9ed2d7f3800a1c77eec55a1d66c8792d/node_modules/@sveltejs/kit/src/utils/routing.js
|
|
4739
4743
|
/**
|
|
4740
4744
|
* @param {RegExpMatchArray} match
|
|
4741
4745
|
* @param {import('types').RouteParam[]} params
|
|
@@ -4794,13 +4798,14 @@ function find_route(path, routes, matchers) {
|
|
|
4794
4798
|
return null;
|
|
4795
4799
|
}
|
|
4796
4800
|
|
|
4801
|
+
//#endregion
|
|
4797
4802
|
//#region \0virtual:__sveltekit/server
|
|
4798
4803
|
var read_implementation = null;
|
|
4799
4804
|
function set_read_implementation(fn) {
|
|
4800
4805
|
read_implementation = fn;
|
|
4801
4806
|
}
|
|
4802
4807
|
//#endregion
|
|
4803
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
4808
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/client/dom/elements/events.js
|
|
4804
4809
|
/**
|
|
4805
4810
|
* Used on elements, as a map of event type -> event handler,
|
|
4806
4811
|
* and on events themselves to track which element handled an event
|
|
@@ -4883,7 +4888,7 @@ function handle_event_propagation(event) {
|
|
|
4883
4888
|
}
|
|
4884
4889
|
}
|
|
4885
4890
|
//#endregion
|
|
4886
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
4891
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/client/dom/template.js
|
|
4887
4892
|
/**
|
|
4888
4893
|
* @param {TemplateNode} start
|
|
4889
4894
|
* @param {TemplateNode | null} end
|
|
@@ -5073,7 +5078,7 @@ function unmount(component, options) {
|
|
|
5073
5078
|
return Promise.resolve();
|
|
5074
5079
|
}
|
|
5075
5080
|
//#endregion
|
|
5076
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
5081
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/legacy/legacy-client.js
|
|
5077
5082
|
/** @import { ComponentConstructorOptions, ComponentType, SvelteComponent, Component } from 'svelte' */
|
|
5078
5083
|
/**
|
|
5079
5084
|
* Takes the component function and returns a Svelte 4 compatible component constructor.
|
|
@@ -5198,7 +5203,7 @@ var Svelte4Component = class {
|
|
|
5198
5203
|
}
|
|
5199
5204
|
};
|
|
5200
5205
|
//#endregion
|
|
5201
|
-
//#region node_modules/.pnpm/svelte@5.56.
|
|
5206
|
+
//#region node_modules/.pnpm/svelte@5.56.2_@typescript-eslint+types@8.60.1/node_modules/svelte/src/legacy/legacy-server.js
|
|
5202
5207
|
/** @import { SvelteComponent } from '../index.js' */
|
|
5203
5208
|
/** @import { Csp } from '#server' */
|
|
5204
5209
|
/** @typedef {{ head: string, html: string, css: { code: string, map: null }; hashes?: { script: `sha256-${string}`[] } }} LegacyRenderResult */
|
|
@@ -5348,7 +5353,7 @@ var options = {
|
|
|
5348
5353
|
app: ({ head, body, assets, nonce, env }) => "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <meta name=\"text-scale\" content=\"scale\" />\n <script>\n (() => {\n try {\n const pref = localStorage.getItem('axerity-theme') ?? 'dark';\n const dark =\n pref === 'dark' ||\n (pref === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches);\n document.documentElement.classList.toggle('dark', dark);\n } catch {}\n })();\n (() => {\n try {\n const hide = [];\n for (let i = 0; i < localStorage.length; i++) {\n const key = localStorage.key(i);\n if (key && key.indexOf('axerity-banner:') === 0 && localStorage.getItem(key) === '1') {\n hide.push('[data-banner-key=\"' + key.replace(/\"/g, '\\\\\"') + '\"]');\n }\n }\n if (hide.length) {\n const style = document.createElement('style');\n style.textContent = hide.join(',') + '{display:none!important}';\n document.head.appendChild(style);\n }\n } catch {}\n })();\n <\/script>\n " + head + "\n </head>\n <body data-sveltekit-preload-data=\"hover\">\n <div style=\"display: contents\">" + body + "</div>\n </body>\n</html>\n",
|
|
5349
5354
|
error: ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <title>" + message + "</title>\n\n <style>\n body {\n --bg: white;\n --fg: #222;\n --divider: #ccc;\n background: var(--bg);\n color: var(--fg);\n font-family:\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n Oxygen,\n Ubuntu,\n Cantarell,\n 'Open Sans',\n 'Helvetica Neue',\n sans-serif;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n margin: 0;\n }\n\n .error {\n display: flex;\n align-items: center;\n max-width: 32rem;\n margin: 0 1rem;\n }\n\n .status {\n font-weight: 200;\n font-size: 3rem;\n line-height: 1;\n position: relative;\n top: -0.05rem;\n }\n\n .message {\n border-left: 1px solid var(--divider);\n padding: 0 0 0 1rem;\n margin: 0 0 0 1rem;\n min-height: 2.5rem;\n display: flex;\n align-items: center;\n }\n\n .message h1 {\n font-weight: 400;\n font-size: 1em;\n margin: 0;\n }\n\n @media (prefers-color-scheme: dark) {\n body {\n --bg: #222;\n --fg: #ddd;\n --divider: #666;\n }\n }\n </style>\n </head>\n <body>\n <div class=\"error\">\n <span class=\"status\">" + status + "</span>\n <div class=\"message\">\n <h1>" + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n"
|
|
5350
5355
|
},
|
|
5351
|
-
version_hash: "
|
|
5356
|
+
version_hash: "6acpw3"
|
|
5352
5357
|
};
|
|
5353
5358
|
async function get_hooks() {
|
|
5354
5359
|
let handle;
|
|
@@ -5356,7 +5361,7 @@ async function get_hooks() {
|
|
|
5356
5361
|
let handleError;
|
|
5357
5362
|
let handleValidationError;
|
|
5358
5363
|
let init;
|
|
5359
|
-
({handle, handleFetch, handleError, handleValidationError, init} = await import('./hooks.server-
|
|
5364
|
+
({handle, handleFetch, handleError, handleValidationError, init} = await import('./hooks.server-i3yJ8tQB.js'));
|
|
5360
5365
|
let reroute;
|
|
5361
5366
|
let transport;
|
|
5362
5367
|
return {
|
|
@@ -5371,4 +5376,4 @@ async function get_hooks() {
|
|
|
5371
5376
|
}
|
|
5372
5377
|
|
|
5373
5378
|
export { attr_class as A, clsx as B, ensure_array_like as C, element as D, attributes as E, attr_style as F, run as G, tick as H, html as I, getContext as J, onDestroy as K, setContext as L, index_server_exports as M, noop as N, is_valid_array_len as O, MAX_ARRAY_INDEX as P, is_valid_array_index as Q, DevalueError as R, is_primitive as S, get_type as T, is_plain_object as U, enumerable_symbols as V, stringify_key as W, stringify_string as X, valid_array_indices as Y, __commonJSMin as _, set_public_env as a, base as b, disable_search as c, decode_pathname as d, read_implementation as e, find_route as f, get_hooks as g, reset as h, assets as i, app_dir as j, readable as k, set_read_implementation as l, make_trackable as m, normalize_path as n, options as o, public_env as p, head as q, resolve as r, set_private_env as s, derived as t, uneval as u, attr as v, writable as w, stringify as x, escape_html as y, spread_props as z };
|
|
5374
|
-
//# sourceMappingURL=
|
|
5379
|
+
//# sourceMappingURL=internal2-BGg7Milx.js.map
|