@juspay/shooter 1.9.2 → 1.9.3
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/build/client/_app/immutable/assets/ColorPicker.CV4IKef4.css +1 -0
- package/build/client/_app/immutable/assets/ColorPicker.CV4IKef4.css.br +0 -0
- package/build/client/_app/immutable/assets/ColorPicker.CV4IKef4.css.gz +0 -0
- package/build/client/_app/immutable/chunks/BRqaaL5D.js +5 -0
- package/build/client/_app/immutable/chunks/BRqaaL5D.js.br +0 -0
- package/build/client/_app/immutable/chunks/BRqaaL5D.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C5VOyQCG.js +1 -0
- package/build/client/_app/immutable/chunks/C5VOyQCG.js.br +0 -0
- package/build/client/_app/immutable/chunks/C5VOyQCG.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{B-XSrufh.js → C_9BZILB.js} +1 -1
- package/build/client/_app/immutable/chunks/C_9BZILB.js.br +0 -0
- package/build/client/_app/immutable/chunks/C_9BZILB.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Cg3dlX05.js +2 -0
- package/build/client/_app/immutable/chunks/Cg3dlX05.js.br +0 -0
- package/build/client/_app/immutable/chunks/Cg3dlX05.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DYuMZGL5.js +1 -0
- package/build/client/_app/immutable/chunks/DYuMZGL5.js.br +0 -0
- package/build/client/_app/immutable/chunks/DYuMZGL5.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DZQMsHM5.js +1 -0
- package/build/client/_app/immutable/chunks/DZQMsHM5.js.br +0 -0
- package/build/client/_app/immutable/chunks/DZQMsHM5.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DZvnhU_8.js +21 -0
- package/build/client/_app/immutable/chunks/DZvnhU_8.js.br +0 -0
- package/build/client/_app/immutable/chunks/DZvnhU_8.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{WigD-5P0.js → Dl_UrWML.js} +1 -1
- package/build/client/_app/immutable/chunks/Dl_UrWML.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dl_UrWML.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Pw0jDB7M.js +1 -0
- package/build/client/_app/immutable/chunks/Pw0jDB7M.js.br +0 -0
- package/build/client/_app/immutable/chunks/Pw0jDB7M.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Woyb7K_R.js +3 -0
- package/build/client/_app/immutable/chunks/Woyb7K_R.js.br +0 -0
- package/build/client/_app/immutable/chunks/Woyb7K_R.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DjIci1dg.js → heMtFUOe.js} +1 -1
- package/build/client/_app/immutable/chunks/heMtFUOe.js.br +0 -0
- package/build/client/_app/immutable/chunks/heMtFUOe.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.yF5DyySX.js +2 -0
- package/build/client/_app/immutable/entry/app.yF5DyySX.js.br +0 -0
- package/build/client/_app/immutable/entry/app.yF5DyySX.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.qT_T2NM7.js +1 -0
- package/build/client/_app/immutable/entry/start.qT_T2NM7.js.br +2 -0
- package/build/client/_app/immutable/entry/start.qT_T2NM7.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{0.HapN5UGE.js → 0.B8ldaXrw.js} +2 -2
- package/build/client/_app/immutable/nodes/0.B8ldaXrw.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.B8ldaXrw.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.IBlbkVOD.js → 1.BaQFc0zK.js} +1 -1
- package/build/client/_app/immutable/nodes/1.BaQFc0zK.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.BaQFc0zK.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{2.BSGzQPKE.js → 2.DzMPM9CG.js} +1 -1
- package/build/client/_app/immutable/nodes/2.DzMPM9CG.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.DzMPM9CG.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{3.CVaviSxa.js → 3.Bj2gzFb0.js} +1 -1
- package/build/client/_app/immutable/nodes/3.Bj2gzFb0.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.Bj2gzFb0.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{4.DgZG6DiA.js → 4.BSVqdrrD.js} +3 -3
- package/build/client/_app/immutable/nodes/4.BSVqdrrD.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.BSVqdrrD.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{5.BsPQpbNC.js → 5.Cfj35gpY.js} +1 -1
- package/build/client/_app/immutable/nodes/5.Cfj35gpY.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.Cfj35gpY.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{6.DqlYBRxO.js → 6.YxEM6HVV.js} +1 -1
- package/build/client/_app/immutable/nodes/6.YxEM6HVV.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.YxEM6HVV.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{7.C-mKfSQ6.js → 7.CYSmE4eH.js} +1 -1
- package/build/client/_app/immutable/nodes/7.CYSmE4eH.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.CYSmE4eH.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{8.CWs7RaU8.js → 8.BiyoREYq.js} +2 -2
- package/build/client/_app/immutable/nodes/8.BiyoREYq.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.BiyoREYq.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{9.CjYdYDhF.js → 9.DetO0mOw.js} +1 -1
- package/build/client/_app/immutable/nodes/9.DetO0mOw.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.DetO0mOw.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/server/chunks/{0-D9OfRI2k.js → 0-B2E6heaO.js} +4 -4
- package/build/server/chunks/{0-D9OfRI2k.js.map → 0-B2E6heaO.js.map} +1 -1
- package/build/server/chunks/1-G_9ph7fY.js +9 -0
- package/build/server/chunks/{1-DgGFkvlg.js.map → 1-G_9ph7fY.js.map} +1 -1
- package/build/server/chunks/{2-SWCYKisx.js → 2-Bn0siTxF.js} +4 -4
- package/build/server/chunks/{2-SWCYKisx.js.map → 2-Bn0siTxF.js.map} +1 -1
- package/build/server/chunks/{3-i9IbPZ0L.js → 3-Ckkb4IvB.js} +4 -4
- package/build/server/chunks/{3-i9IbPZ0L.js.map → 3-Ckkb4IvB.js.map} +1 -1
- package/build/server/chunks/{4-BzsFX_T-.js → 4-CbejE1SC.js} +4 -4
- package/build/server/chunks/{4-BzsFX_T-.js.map → 4-CbejE1SC.js.map} +1 -1
- package/build/server/chunks/{5-BnyMNyuy.js → 5-BwqumuR1.js} +4 -4
- package/build/server/chunks/{5-BnyMNyuy.js.map → 5-BwqumuR1.js.map} +1 -1
- package/build/server/chunks/6-BBZkhy6X.js +9 -0
- package/build/server/chunks/{6-BIsh7BZP.js.map → 6-BBZkhy6X.js.map} +1 -1
- package/build/server/chunks/7-BCSmnzEz.js +9 -0
- package/build/server/chunks/{7-BtO1NV6d.js.map → 7-BCSmnzEz.js.map} +1 -1
- package/build/server/chunks/8-D1orKzaf.js +9 -0
- package/build/server/chunks/{8-Cm04OX_8.js.map → 8-D1orKzaf.js.map} +1 -1
- package/build/server/chunks/9-BpBG1IO-.js +9 -0
- package/build/server/chunks/{9-D1iRD-KU.js.map → 9-BpBG1IO-.js.map} +1 -1
- package/build/server/chunks/{Button-DVLTQJyD.js → Button-Dpueno77.js} +9 -9
- package/build/server/chunks/Button-Dpueno77.js.map +1 -0
- package/build/server/chunks/{Icon-BXE5-3Zt.js → Icon-aOLx5ELI.js} +7 -7
- package/build/server/chunks/Icon-aOLx5ELI.js.map +1 -0
- package/build/server/chunks/{Input-CgEj-A6D.js → Input-Cq7ZdLxS.js} +8 -8
- package/build/server/chunks/{Input-CgEj-A6D.js.map → Input-Cq7ZdLxS.js.map} +1 -1
- package/build/server/chunks/{Pill-CfGbZF-f.js → Pill-Bn597jm0.js} +5 -5
- package/build/server/chunks/Pill-Bn597jm0.js.map +1 -0
- package/build/server/chunks/Shimmer-5o7MVwXF.js +10 -0
- package/build/server/chunks/Shimmer-5o7MVwXF.js.map +1 -0
- package/build/server/chunks/{_error.svelte-DTYKLBYi.js → _error.svelte-C85mEsv9.js} +8 -8
- package/build/server/chunks/{_error.svelte-DTYKLBYi.js.map → _error.svelte-C85mEsv9.js.map} +1 -1
- package/build/server/chunks/{_layout.svelte-C0TOcumt.js → _layout.svelte-rpYLLajc.js} +10 -10
- package/build/server/chunks/{_layout.svelte-C0TOcumt.js.map → _layout.svelte-rpYLLajc.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-DWJcHYX2.js → _page.svelte-B6O0uTrK.js} +4 -4
- package/build/server/chunks/{_page.svelte-DWJcHYX2.js.map → _page.svelte-B6O0uTrK.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-BDyAukVH.js → _page.svelte-BfCXobKv.js} +11 -11
- package/build/server/chunks/{_page.svelte-BDyAukVH.js.map → _page.svelte-BfCXobKv.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-HCIg_ijq.js → _page.svelte-CA46TyHk.js} +5 -5
- package/build/server/chunks/{_page.svelte-HCIg_ijq.js.map → _page.svelte-CA46TyHk.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-Cn_oMd4r.js → _page.svelte-CCpVmMpU.js} +9 -9
- package/build/server/chunks/{_page.svelte-Cn_oMd4r.js.map → _page.svelte-CCpVmMpU.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-DiHgZ-Qm.js → _page.svelte-D0FBtMtH.js} +11 -11
- package/build/server/chunks/{_page.svelte-DiHgZ-Qm.js.map → _page.svelte-D0FBtMtH.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-BXZjHaxR.js → _page.svelte-DUj1mSq0.js} +7 -7
- package/build/server/chunks/{_page.svelte-BXZjHaxR.js.map → _page.svelte-DUj1mSq0.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-DF8N4KBc.js → _page.svelte-DjADcbfZ.js} +34 -34
- package/build/server/chunks/_page.svelte-DjADcbfZ.js.map +1 -0
- package/build/server/chunks/{_page.svelte-CnavwBE6.js → _page.svelte-fkR4xqGu.js} +20 -20
- package/build/server/chunks/_page.svelte-fkR4xqGu.js.map +1 -0
- package/build/server/chunks/{cache-DQLC_4X6.js → cache-5_eamjtv.js} +6 -6
- package/build/server/chunks/cache-5_eamjtv.js.map +1 -0
- package/build/server/chunks/{client-DFS_oze8.js → client-w1WsLDGu.js} +4 -4
- package/build/server/chunks/{client-DFS_oze8.js.map → client-w1WsLDGu.js.map} +1 -1
- package/build/server/chunks/client2-B5wCRDQi.js +7 -0
- package/build/server/chunks/{client2-CuecdIgG.js.map → client2-B5wCRDQi.js.map} +1 -1
- package/build/server/chunks/index-CoD1IJuy.js.map +1 -1
- package/build/server/chunks/{index-Ce_T9BSa.js → index-DMikC9Qy.js} +327 -126
- package/build/server/chunks/index-DMikC9Qy.js.map +1 -0
- package/build/server/chunks/{index-server-DuadcihK.js → index-server-DHNcb_Bd.js} +2 -2
- package/build/server/chunks/{index-server-DuadcihK.js.map → index-server-DHNcb_Bd.js.map} +1 -1
- package/build/server/chunks/{index2-3-jnyNZ0.js → index2-BTTf6mSG.js} +2 -2
- package/build/server/chunks/{index2-3-jnyNZ0.js.map → index2-BTTf6mSG.js.map} +1 -1
- package/build/server/chunks/{root-CodmFd7L.js → root-DhBbA8QD.js} +20 -15
- package/build/server/chunks/root-DhBbA8QD.js.map +1 -0
- package/build/server/chunks/{state.svelte-BJz4uYyw.js → state.svelte-M8y8rROy.js} +3 -3
- package/build/server/chunks/{state.svelte-BJz4uYyw.js.map → state.svelte-M8y8rROy.js.map} +1 -1
- package/build/server/chunks/{stores-fLftuVrV.js → stores-CwkRmCHA.js} +4 -4
- package/build/server/chunks/{stores-fLftuVrV.js.map → stores-CwkRmCHA.js.map} +1 -1
- package/build/server/index.js +227 -123
- package/build/server/index.js.map +1 -1
- package/build/server/manifest.js +11 -11
- package/build/server/manifest.js.map +1 -1
- package/package.json +10 -3
- package/build/client/_app/immutable/assets/ColorPicker.Hf6zQzuB.css +0 -1
- package/build/client/_app/immutable/assets/ColorPicker.Hf6zQzuB.css.br +0 -0
- package/build/client/_app/immutable/assets/ColorPicker.Hf6zQzuB.css.gz +0 -0
- package/build/client/_app/immutable/chunks/3MMtouT7.js +0 -2
- package/build/client/_app/immutable/chunks/3MMtouT7.js.br +0 -0
- package/build/client/_app/immutable/chunks/3MMtouT7.js.gz +0 -0
- package/build/client/_app/immutable/chunks/780RSrro.js +0 -1
- package/build/client/_app/immutable/chunks/780RSrro.js.br +0 -0
- package/build/client/_app/immutable/chunks/780RSrro.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B-XSrufh.js.br +0 -0
- package/build/client/_app/immutable/chunks/B-XSrufh.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B-aj0tWo.js +0 -3
- package/build/client/_app/immutable/chunks/B-aj0tWo.js.br +0 -0
- package/build/client/_app/immutable/chunks/B-aj0tWo.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BTu-2gkj.js +0 -21
- package/build/client/_app/immutable/chunks/BTu-2gkj.js.br +0 -0
- package/build/client/_app/immutable/chunks/BTu-2gkj.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CMQw-Fc-.js +0 -1
- package/build/client/_app/immutable/chunks/CMQw-Fc-.js.br +0 -0
- package/build/client/_app/immutable/chunks/CMQw-Fc-.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Ce0VRwE1.js +0 -1
- package/build/client/_app/immutable/chunks/Ce0VRwE1.js.br +0 -0
- package/build/client/_app/immutable/chunks/Ce0VRwE1.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DFPEaIHz.js +0 -1
- package/build/client/_app/immutable/chunks/DFPEaIHz.js.br +0 -0
- package/build/client/_app/immutable/chunks/DFPEaIHz.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DdpA9n1s.js +0 -5
- package/build/client/_app/immutable/chunks/DdpA9n1s.js.br +0 -4
- package/build/client/_app/immutable/chunks/DdpA9n1s.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DjIci1dg.js.br +0 -0
- package/build/client/_app/immutable/chunks/DjIci1dg.js.gz +0 -0
- package/build/client/_app/immutable/chunks/WigD-5P0.js.br +0 -0
- package/build/client/_app/immutable/chunks/WigD-5P0.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.ueUUTVo4.js +0 -2
- package/build/client/_app/immutable/entry/app.ueUUTVo4.js.br +0 -0
- package/build/client/_app/immutable/entry/app.ueUUTVo4.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.CQhGkr1I.js +0 -1
- package/build/client/_app/immutable/entry/start.CQhGkr1I.js.br +0 -2
- package/build/client/_app/immutable/entry/start.CQhGkr1I.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.HapN5UGE.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.HapN5UGE.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.IBlbkVOD.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.IBlbkVOD.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.BSGzQPKE.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.BSGzQPKE.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.CVaviSxa.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.CVaviSxa.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.DgZG6DiA.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.DgZG6DiA.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.BsPQpbNC.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.BsPQpbNC.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.DqlYBRxO.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.DqlYBRxO.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.C-mKfSQ6.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.C-mKfSQ6.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.CWs7RaU8.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.CWs7RaU8.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.CjYdYDhF.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.CjYdYDhF.js.gz +0 -0
- package/build/server/chunks/1-DgGFkvlg.js +0 -9
- package/build/server/chunks/6-BIsh7BZP.js +0 -9
- package/build/server/chunks/7-BtO1NV6d.js +0 -9
- package/build/server/chunks/8-Cm04OX_8.js +0 -9
- package/build/server/chunks/9-D1iRD-KU.js +0 -9
- package/build/server/chunks/Button-DVLTQJyD.js.map +0 -1
- package/build/server/chunks/Icon-BXE5-3Zt.js.map +0 -1
- package/build/server/chunks/Pill-CfGbZF-f.js.map +0 -1
- package/build/server/chunks/Shimmer-D9TPXvO4.js +0 -10
- package/build/server/chunks/Shimmer-D9TPXvO4.js.map +0 -1
- package/build/server/chunks/_page.svelte-CnavwBE6.js.map +0 -1
- package/build/server/chunks/_page.svelte-DF8N4KBc.js.map +0 -1
- package/build/server/chunks/cache-DQLC_4X6.js.map +0 -1
- package/build/server/chunks/client2-CuecdIgG.js +0 -7
- package/build/server/chunks/index-Ce_T9BSa.js.map +0 -1
- package/build/server/chunks/root-CodmFd7L.js.map +0 -1
|
@@ -561,6 +561,10 @@ const ASYNC = 1 << 22;
|
|
|
561
561
|
const ERROR_VALUE = 1 << 23;
|
|
562
562
|
const STATE_SYMBOL = /* @__PURE__ */ Symbol("$state");
|
|
563
563
|
const LEGACY_PROPS = /* @__PURE__ */ Symbol("legacy props");
|
|
564
|
+
const ATTRIBUTES_CACHE = /* @__PURE__ */ Symbol("attributes");
|
|
565
|
+
const CLASS_CACHE = /* @__PURE__ */ Symbol("class");
|
|
566
|
+
const STYLE_CACHE = /* @__PURE__ */ Symbol("style");
|
|
567
|
+
const TEXT_CACHE = /* @__PURE__ */ Symbol("text");
|
|
564
568
|
const STALE_REACTION = new class StaleReactionError extends Error {
|
|
565
569
|
name = "StaleReactionError";
|
|
566
570
|
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
@@ -610,6 +614,21 @@ const ELEMENT_IS_NAMESPACED = 1;
|
|
|
610
614
|
const ELEMENT_PRESERVE_ATTRIBUTE_CASE = 1 << 1;
|
|
611
615
|
const ELEMENT_IS_INPUT = 1 << 2;
|
|
612
616
|
const UNINITIALIZED = /* @__PURE__ */ Symbol();
|
|
617
|
+
function derived_inert() {
|
|
618
|
+
{
|
|
619
|
+
console.warn(`https://svelte.dev/e/derived_inert`);
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
function hydration_mismatch(location) {
|
|
623
|
+
{
|
|
624
|
+
console.warn(`https://svelte.dev/e/hydration_mismatch`);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
function svelte_boundary_reset_noop() {
|
|
628
|
+
{
|
|
629
|
+
console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`);
|
|
630
|
+
}
|
|
631
|
+
}
|
|
613
632
|
let tracing_mode_flag = false;
|
|
614
633
|
let component_context = null;
|
|
615
634
|
function set_component_context(context) {
|
|
@@ -733,8 +752,10 @@ function defer_effect(effect, dirty_effects, maybe_dirty_effects) {
|
|
|
733
752
|
clear_marked(effect.deps);
|
|
734
753
|
set_signal_status(effect, CLEAN);
|
|
735
754
|
}
|
|
736
|
-
|
|
755
|
+
let first_batch = null;
|
|
756
|
+
let last_batch = null;
|
|
737
757
|
let current_batch = null;
|
|
758
|
+
let previous_batch = null;
|
|
738
759
|
let batch_values = null;
|
|
739
760
|
let last_scheduled_effect = null;
|
|
740
761
|
let is_flushing_sync = false;
|
|
@@ -745,6 +766,15 @@ var flush_count = 0;
|
|
|
745
766
|
let uid = 1;
|
|
746
767
|
class Batch {
|
|
747
768
|
id = uid++;
|
|
769
|
+
/** True as soon as `#process` was called */
|
|
770
|
+
#started = false;
|
|
771
|
+
linked = true;
|
|
772
|
+
/** @type {Batch | null} */
|
|
773
|
+
#prev = null;
|
|
774
|
+
/** @type {Batch | null} */
|
|
775
|
+
#next = null;
|
|
776
|
+
/** @type {Map<Effect, ReturnType<typeof deferred<any>>>} */
|
|
777
|
+
async_deriveds = /* @__PURE__ */ new Map();
|
|
748
778
|
/**
|
|
749
779
|
* The current values of any signals that are updated in this batch.
|
|
750
780
|
* Tuple format: [value, is_derived] (note: is_derived is false for deriveds, too, if they were overridden via assignment)
|
|
@@ -758,6 +788,12 @@ class Batch {
|
|
|
758
788
|
* @type {Map<Value, any>}
|
|
759
789
|
*/
|
|
760
790
|
previous = /* @__PURE__ */ new Map();
|
|
791
|
+
/**
|
|
792
|
+
* Async effects which this batch doesn't take into account anymore when calculating blockers,
|
|
793
|
+
* as it has a value for it already.
|
|
794
|
+
* @type {Set<Effect>}
|
|
795
|
+
*/
|
|
796
|
+
unblocked = /* @__PURE__ */ new Set();
|
|
761
797
|
/**
|
|
762
798
|
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
763
799
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
@@ -770,10 +806,14 @@ class Batch {
|
|
|
770
806
|
*/
|
|
771
807
|
#discard_callbacks = /* @__PURE__ */ new Set();
|
|
772
808
|
/**
|
|
773
|
-
*
|
|
774
|
-
* @type {
|
|
809
|
+
* Callbacks that should run only when a fork is committed.
|
|
810
|
+
* @type {Set<(batch: Batch) => void>}
|
|
811
|
+
*/
|
|
812
|
+
#fork_commit_callbacks = /* @__PURE__ */ new Set();
|
|
813
|
+
/**
|
|
814
|
+
* The number of async effects that are currently in flight
|
|
775
815
|
*/
|
|
776
|
-
#pending =
|
|
816
|
+
#pending = 0;
|
|
777
817
|
/**
|
|
778
818
|
* Async effects that are currently in flight, _not_ inside a pending boundary
|
|
779
819
|
* @type {Map<Effect, number>}
|
|
@@ -790,6 +830,11 @@ class Batch {
|
|
|
790
830
|
* @type {Effect[]}
|
|
791
831
|
*/
|
|
792
832
|
#roots = [];
|
|
833
|
+
/**
|
|
834
|
+
* Effects created while this batch was active.
|
|
835
|
+
* @type {Effect[]}
|
|
836
|
+
*/
|
|
837
|
+
#new_effects = [];
|
|
793
838
|
/**
|
|
794
839
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
795
840
|
* @type {Set<Effect>}
|
|
@@ -808,28 +853,27 @@ class Batch {
|
|
|
808
853
|
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
809
854
|
*/
|
|
810
855
|
#skipped_branches = /* @__PURE__ */ new Map();
|
|
856
|
+
/**
|
|
857
|
+
* Inverse of #skipped_branches which we need to tell prior batches to unskip them when committing
|
|
858
|
+
* @type {Set<Effect>}
|
|
859
|
+
*/
|
|
860
|
+
#unskipped_branches = /* @__PURE__ */ new Set();
|
|
811
861
|
is_fork = false;
|
|
812
862
|
#decrement_queued = false;
|
|
813
|
-
/** @type {Set<Batch>} */
|
|
814
|
-
#blockers = /* @__PURE__ */ new Set();
|
|
815
863
|
#is_deferred() {
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
if (this.#skipped_branches.has(e)) {
|
|
825
|
-
skipped = true;
|
|
826
|
-
break;
|
|
827
|
-
}
|
|
828
|
-
e = e.parent;
|
|
829
|
-
}
|
|
830
|
-
if (!skipped) {
|
|
831
|
-
return true;
|
|
864
|
+
if (this.is_fork) return true;
|
|
865
|
+
for (const effect of this.#blocking_pending.keys()) {
|
|
866
|
+
var e = effect;
|
|
867
|
+
var skipped = false;
|
|
868
|
+
while (e.parent !== null) {
|
|
869
|
+
if (this.#skipped_branches.has(e)) {
|
|
870
|
+
skipped = true;
|
|
871
|
+
break;
|
|
832
872
|
}
|
|
873
|
+
e = e.parent;
|
|
874
|
+
}
|
|
875
|
+
if (!skipped) {
|
|
876
|
+
return true;
|
|
833
877
|
}
|
|
834
878
|
}
|
|
835
879
|
return false;
|
|
@@ -842,29 +886,33 @@ class Batch {
|
|
|
842
886
|
if (!this.#skipped_branches.has(effect)) {
|
|
843
887
|
this.#skipped_branches.set(effect, { d: [], m: [] });
|
|
844
888
|
}
|
|
889
|
+
this.#unskipped_branches.delete(effect);
|
|
845
890
|
}
|
|
846
891
|
/**
|
|
847
892
|
* Remove an effect from the #skipped_branches map and reschedule
|
|
848
893
|
* any tracked dirty/maybe_dirty child effects
|
|
849
894
|
* @param {Effect} effect
|
|
895
|
+
* @param {(e: Effect) => void} callback
|
|
850
896
|
*/
|
|
851
|
-
unskip_effect(effect) {
|
|
897
|
+
unskip_effect(effect, callback = (e) => this.schedule(e)) {
|
|
852
898
|
var tracked = this.#skipped_branches.get(effect);
|
|
853
899
|
if (tracked) {
|
|
854
900
|
this.#skipped_branches.delete(effect);
|
|
855
901
|
for (var e of tracked.d) {
|
|
856
902
|
set_signal_status(e, DIRTY);
|
|
857
|
-
|
|
903
|
+
callback(e);
|
|
858
904
|
}
|
|
859
905
|
for (e of tracked.m) {
|
|
860
906
|
set_signal_status(e, MAYBE_DIRTY);
|
|
861
|
-
|
|
907
|
+
callback(e);
|
|
862
908
|
}
|
|
863
909
|
}
|
|
910
|
+
this.#unskipped_branches.add(effect);
|
|
864
911
|
}
|
|
865
912
|
#process() {
|
|
913
|
+
this.#started = true;
|
|
866
914
|
if (flush_count++ > 1e3) {
|
|
867
|
-
|
|
915
|
+
this.#unlink();
|
|
868
916
|
infinite_loop_guard();
|
|
869
917
|
}
|
|
870
918
|
if (!this.#is_deferred()) {
|
|
@@ -901,40 +949,51 @@ class Batch {
|
|
|
901
949
|
}
|
|
902
950
|
collected_effects = null;
|
|
903
951
|
legacy_updates = null;
|
|
904
|
-
if (this.#is_deferred()
|
|
952
|
+
if (this.#is_deferred()) {
|
|
905
953
|
this.#defer_effects(render_effects);
|
|
906
954
|
this.#defer_effects(effects);
|
|
907
955
|
for (const [e, t] of this.#skipped_branches) {
|
|
908
956
|
reset_branch(e, t);
|
|
909
957
|
}
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
958
|
+
if (updates.length > 0) {
|
|
959
|
+
/** @type {unknown} */
|
|
960
|
+
current_batch.#process();
|
|
913
961
|
}
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
this.#deferred?.resolve();
|
|
962
|
+
return;
|
|
963
|
+
}
|
|
964
|
+
const earlier_batch = this.#find_earlier_batch();
|
|
965
|
+
if (earlier_batch) {
|
|
966
|
+
earlier_batch.#merge(this);
|
|
967
|
+
return;
|
|
921
968
|
}
|
|
969
|
+
this.#dirty_effects.clear();
|
|
970
|
+
this.#maybe_dirty_effects.clear();
|
|
971
|
+
for (const fn of this.#commit_callbacks) fn(this);
|
|
972
|
+
this.#commit_callbacks.clear();
|
|
973
|
+
previous_batch = this;
|
|
974
|
+
flush_queued_effects(render_effects);
|
|
975
|
+
flush_queued_effects(effects);
|
|
976
|
+
previous_batch = null;
|
|
977
|
+
this.#deferred?.resolve();
|
|
922
978
|
var next_batch = (
|
|
923
979
|
/** @type {Batch | null} */
|
|
924
980
|
/** @type {unknown} */
|
|
925
981
|
current_batch
|
|
926
982
|
);
|
|
983
|
+
if (this.linked && this.#pending === 0) {
|
|
984
|
+
this.#unlink();
|
|
985
|
+
}
|
|
927
986
|
if (this.#roots.length > 0) {
|
|
928
|
-
|
|
987
|
+
if (next_batch === null) {
|
|
988
|
+
next_batch = this;
|
|
989
|
+
this.#link();
|
|
990
|
+
}
|
|
991
|
+
const batch2 = next_batch;
|
|
929
992
|
batch2.#roots.push(...this.#roots.filter((r2) => !batch2.#roots.includes(r2)));
|
|
930
993
|
}
|
|
931
994
|
if (next_batch !== null) {
|
|
932
|
-
batches.add(next_batch);
|
|
933
995
|
next_batch.#process();
|
|
934
996
|
}
|
|
935
|
-
if (!batches.has(this)) {
|
|
936
|
-
this.#commit();
|
|
937
|
-
}
|
|
938
997
|
}
|
|
939
998
|
/**
|
|
940
999
|
* Traverse the effect tree, executing effects or stashing
|
|
@@ -976,6 +1035,65 @@ class Batch {
|
|
|
976
1035
|
}
|
|
977
1036
|
}
|
|
978
1037
|
}
|
|
1038
|
+
#find_earlier_batch() {
|
|
1039
|
+
var batch = this.#prev;
|
|
1040
|
+
while (batch !== null) {
|
|
1041
|
+
if (!batch.is_fork) {
|
|
1042
|
+
for (const [value, [, is_derived]] of this.current) {
|
|
1043
|
+
if (batch.current.has(value) && !is_derived) {
|
|
1044
|
+
return batch;
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
batch = batch.#prev;
|
|
1049
|
+
}
|
|
1050
|
+
return null;
|
|
1051
|
+
}
|
|
1052
|
+
/**
|
|
1053
|
+
* @param {Batch} batch
|
|
1054
|
+
*/
|
|
1055
|
+
#merge(batch) {
|
|
1056
|
+
for (const [source2, value] of batch.current) {
|
|
1057
|
+
if (!this.previous.has(source2) && batch.previous.has(source2)) {
|
|
1058
|
+
this.previous.set(source2, batch.previous.get(source2));
|
|
1059
|
+
}
|
|
1060
|
+
this.current.set(source2, value);
|
|
1061
|
+
}
|
|
1062
|
+
for (const [effect, deferred2] of batch.async_deriveds) {
|
|
1063
|
+
const d = this.async_deriveds.get(effect);
|
|
1064
|
+
if (d) deferred2.promise.then(d.resolve);
|
|
1065
|
+
}
|
|
1066
|
+
const mark = (value) => {
|
|
1067
|
+
var reactions = value.reactions;
|
|
1068
|
+
if (reactions === null) return;
|
|
1069
|
+
for (const reaction of reactions) {
|
|
1070
|
+
var flags = reaction.f;
|
|
1071
|
+
if ((flags & DERIVED) !== 0) {
|
|
1072
|
+
mark(
|
|
1073
|
+
/** @type {Derived} */
|
|
1074
|
+
reaction
|
|
1075
|
+
);
|
|
1076
|
+
} else {
|
|
1077
|
+
var effect = (
|
|
1078
|
+
/** @type {Effect} */
|
|
1079
|
+
reaction
|
|
1080
|
+
);
|
|
1081
|
+
if (flags & (ASYNC | BLOCK_EFFECT) && !this.async_deriveds.has(effect)) {
|
|
1082
|
+
this.#maybe_dirty_effects.delete(effect);
|
|
1083
|
+
set_signal_status(effect, DIRTY);
|
|
1084
|
+
this.schedule(effect);
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
};
|
|
1089
|
+
for (const source2 of this.current.keys()) {
|
|
1090
|
+
mark(source2);
|
|
1091
|
+
}
|
|
1092
|
+
this.oncommit(() => batch.discard());
|
|
1093
|
+
batch.#unlink();
|
|
1094
|
+
current_batch = this;
|
|
1095
|
+
this.#process();
|
|
1096
|
+
}
|
|
979
1097
|
/**
|
|
980
1098
|
* @param {Effect[]} effects
|
|
981
1099
|
*/
|
|
@@ -988,16 +1106,19 @@ class Batch {
|
|
|
988
1106
|
* Associate a change to a given source with the current
|
|
989
1107
|
* batch, noting its previous and current values
|
|
990
1108
|
* @param {Value} source
|
|
991
|
-
* @param {any}
|
|
1109
|
+
* @param {any} value
|
|
992
1110
|
* @param {boolean} [is_derived]
|
|
993
1111
|
*/
|
|
994
|
-
capture(source2,
|
|
995
|
-
if (
|
|
996
|
-
this.previous.set(source2,
|
|
1112
|
+
capture(source2, value, is_derived = false) {
|
|
1113
|
+
if (source2.v !== UNINITIALIZED && !this.previous.has(source2)) {
|
|
1114
|
+
this.previous.set(source2, source2.v);
|
|
997
1115
|
}
|
|
998
1116
|
if ((source2.f & ERROR_VALUE) === 0) {
|
|
999
|
-
this.current.set(source2, [
|
|
1000
|
-
batch_values?.set(source2,
|
|
1117
|
+
this.current.set(source2, [value, is_derived]);
|
|
1118
|
+
batch_values?.set(source2, value);
|
|
1119
|
+
}
|
|
1120
|
+
if (!this.is_fork) {
|
|
1121
|
+
source2.v = value;
|
|
1001
1122
|
}
|
|
1002
1123
|
}
|
|
1003
1124
|
activate() {
|
|
@@ -1009,6 +1130,7 @@ class Batch {
|
|
|
1009
1130
|
}
|
|
1010
1131
|
flush() {
|
|
1011
1132
|
try {
|
|
1133
|
+
if (browser) ;
|
|
1012
1134
|
is_processing = true;
|
|
1013
1135
|
current_batch = this;
|
|
1014
1136
|
this.#process();
|
|
@@ -1026,10 +1148,18 @@ class Batch {
|
|
|
1026
1148
|
discard() {
|
|
1027
1149
|
for (const fn of this.#discard_callbacks) fn(this);
|
|
1028
1150
|
this.#discard_callbacks.clear();
|
|
1029
|
-
|
|
1151
|
+
this.#fork_commit_callbacks.clear();
|
|
1152
|
+
this.#unlink();
|
|
1153
|
+
}
|
|
1154
|
+
/**
|
|
1155
|
+
* @param {Effect} effect
|
|
1156
|
+
*/
|
|
1157
|
+
register_created_effect(effect) {
|
|
1158
|
+
this.#new_effects.push(effect);
|
|
1030
1159
|
}
|
|
1031
1160
|
#commit() {
|
|
1032
|
-
|
|
1161
|
+
this.#unlink();
|
|
1162
|
+
for (let batch = first_batch; batch !== null; batch = batch.#next) {
|
|
1033
1163
|
var is_earlier = batch.id < this.id;
|
|
1034
1164
|
var sources = [];
|
|
1035
1165
|
for (const [source3, [value, is_derived]] of this.current) {
|
|
@@ -1046,18 +1176,55 @@ class Batch {
|
|
|
1046
1176
|
}
|
|
1047
1177
|
sources.push(source3);
|
|
1048
1178
|
}
|
|
1179
|
+
if (is_earlier) {
|
|
1180
|
+
for (const [effect, deferred2] of this.async_deriveds) {
|
|
1181
|
+
const d = batch.async_deriveds.get(effect);
|
|
1182
|
+
if (d) deferred2.promise.then(d.resolve);
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
if (!batch.#started) continue;
|
|
1049
1186
|
var others = [...batch.current.keys()].filter((s) => !this.current.has(s));
|
|
1050
1187
|
if (others.length === 0) {
|
|
1051
1188
|
if (is_earlier) {
|
|
1052
1189
|
batch.discard();
|
|
1053
1190
|
}
|
|
1054
1191
|
} else if (sources.length > 0) {
|
|
1192
|
+
if (is_earlier) {
|
|
1193
|
+
for (const unskipped of this.#unskipped_branches) {
|
|
1194
|
+
batch.unskip_effect(unskipped, (e) => {
|
|
1195
|
+
if ((e.f & (BLOCK_EFFECT | ASYNC)) !== 0) {
|
|
1196
|
+
batch.schedule(e);
|
|
1197
|
+
} else {
|
|
1198
|
+
batch.#defer_effects([e]);
|
|
1199
|
+
}
|
|
1200
|
+
});
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1055
1203
|
batch.activate();
|
|
1056
1204
|
var marked = /* @__PURE__ */ new Set();
|
|
1057
1205
|
var checked = /* @__PURE__ */ new Map();
|
|
1058
1206
|
for (var source2 of sources) {
|
|
1059
1207
|
mark_effects(source2, others, marked, checked);
|
|
1060
1208
|
}
|
|
1209
|
+
checked = /* @__PURE__ */ new Map();
|
|
1210
|
+
var current_unequal = [...batch.current.keys()].filter(
|
|
1211
|
+
(c) => this.current.has(c) ? (
|
|
1212
|
+
/** @type {[any, boolean]} */
|
|
1213
|
+
this.current.get(c)[0] !== c.v
|
|
1214
|
+
) : true
|
|
1215
|
+
);
|
|
1216
|
+
if (current_unequal.length > 0) {
|
|
1217
|
+
for (const effect of this.#new_effects) {
|
|
1218
|
+
if ((effect.f & (DESTROYED | INERT | EAGER_EFFECT)) === 0 && depends_on(effect, current_unequal, checked)) {
|
|
1219
|
+
if ((effect.f & (ASYNC | BLOCK_EFFECT)) !== 0) {
|
|
1220
|
+
set_signal_status(effect, DIRTY);
|
|
1221
|
+
batch.schedule(effect);
|
|
1222
|
+
} else {
|
|
1223
|
+
batch.#dirty_effects.add(effect);
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1061
1228
|
if (batch.#roots.length > 0) {
|
|
1062
1229
|
batch.apply();
|
|
1063
1230
|
for (var root of batch.#roots) {
|
|
@@ -1068,23 +1235,13 @@ class Batch {
|
|
|
1068
1235
|
batch.deactivate();
|
|
1069
1236
|
}
|
|
1070
1237
|
}
|
|
1071
|
-
for (const batch of batches) {
|
|
1072
|
-
if (batch.#blockers.has(this)) {
|
|
1073
|
-
batch.#blockers.delete(this);
|
|
1074
|
-
if (batch.#blockers.size === 0 && !batch.#is_deferred()) {
|
|
1075
|
-
batch.activate();
|
|
1076
|
-
batch.#process();
|
|
1077
|
-
}
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
1238
|
}
|
|
1081
1239
|
/**
|
|
1082
1240
|
* @param {boolean} blocking
|
|
1083
1241
|
* @param {Effect} effect
|
|
1084
1242
|
*/
|
|
1085
1243
|
increment(blocking, effect) {
|
|
1086
|
-
|
|
1087
|
-
this.#pending.set(effect, pending_count + 1);
|
|
1244
|
+
this.#pending += 1;
|
|
1088
1245
|
if (blocking) {
|
|
1089
1246
|
let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
|
|
1090
1247
|
this.#blocking_pending.set(effect, blocking_pending_count + 1);
|
|
@@ -1093,15 +1250,9 @@ class Batch {
|
|
|
1093
1250
|
/**
|
|
1094
1251
|
* @param {boolean} blocking
|
|
1095
1252
|
* @param {Effect} effect
|
|
1096
|
-
* @param {boolean} skip - whether to skip updates (because this is triggered by a stale reaction)
|
|
1097
1253
|
*/
|
|
1098
|
-
decrement(blocking, effect
|
|
1099
|
-
|
|
1100
|
-
if (pending_count === 1) {
|
|
1101
|
-
this.#pending.delete(effect);
|
|
1102
|
-
} else {
|
|
1103
|
-
this.#pending.set(effect, pending_count - 1);
|
|
1104
|
-
}
|
|
1254
|
+
decrement(blocking, effect) {
|
|
1255
|
+
this.#pending -= 1;
|
|
1105
1256
|
if (blocking) {
|
|
1106
1257
|
let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
|
|
1107
1258
|
if (blocking_pending_count === 1) {
|
|
@@ -1110,11 +1261,13 @@ class Batch {
|
|
|
1110
1261
|
this.#blocking_pending.set(effect, blocking_pending_count - 1);
|
|
1111
1262
|
}
|
|
1112
1263
|
}
|
|
1113
|
-
if (this.#decrement_queued
|
|
1264
|
+
if (this.#decrement_queued) return;
|
|
1114
1265
|
this.#decrement_queued = true;
|
|
1115
1266
|
queue_micro_task(() => {
|
|
1116
1267
|
this.#decrement_queued = false;
|
|
1117
|
-
this.
|
|
1268
|
+
if (this.linked) {
|
|
1269
|
+
this.flush();
|
|
1270
|
+
}
|
|
1118
1271
|
});
|
|
1119
1272
|
}
|
|
1120
1273
|
/**
|
|
@@ -1139,22 +1292,27 @@ class Batch {
|
|
|
1139
1292
|
ondiscard(fn) {
|
|
1140
1293
|
this.#discard_callbacks.add(fn);
|
|
1141
1294
|
}
|
|
1295
|
+
/** @param {(batch: Batch) => void} fn */
|
|
1296
|
+
on_fork_commit(fn) {
|
|
1297
|
+
this.#fork_commit_callbacks.add(fn);
|
|
1298
|
+
}
|
|
1299
|
+
run_fork_commit_callbacks() {
|
|
1300
|
+
for (const fn of this.#fork_commit_callbacks) fn(this);
|
|
1301
|
+
this.#fork_commit_callbacks.clear();
|
|
1302
|
+
}
|
|
1142
1303
|
settled() {
|
|
1143
1304
|
return (this.#deferred ??= deferred()).promise;
|
|
1144
1305
|
}
|
|
1145
1306
|
static ensure() {
|
|
1146
1307
|
if (current_batch === null) {
|
|
1147
1308
|
const batch = current_batch = new Batch();
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
if (current_batch !== batch) {
|
|
1153
|
-
return;
|
|
1154
|
-
}
|
|
1309
|
+
batch.#link();
|
|
1310
|
+
if (!is_processing && !is_flushing_sync) {
|
|
1311
|
+
queue_micro_task(() => {
|
|
1312
|
+
if (!batch.#started) {
|
|
1155
1313
|
batch.flush();
|
|
1156
|
-
}
|
|
1157
|
-
}
|
|
1314
|
+
}
|
|
1315
|
+
});
|
|
1158
1316
|
}
|
|
1159
1317
|
}
|
|
1160
1318
|
return current_batch;
|
|
@@ -1193,6 +1351,30 @@ class Batch {
|
|
|
1193
1351
|
}
|
|
1194
1352
|
this.#roots.push(e);
|
|
1195
1353
|
}
|
|
1354
|
+
#link() {
|
|
1355
|
+
if (last_batch === null) {
|
|
1356
|
+
first_batch = last_batch = this;
|
|
1357
|
+
} else {
|
|
1358
|
+
last_batch.#next = this;
|
|
1359
|
+
this.#prev = last_batch;
|
|
1360
|
+
}
|
|
1361
|
+
last_batch = this;
|
|
1362
|
+
}
|
|
1363
|
+
#unlink() {
|
|
1364
|
+
var prev = this.#prev;
|
|
1365
|
+
var next = this.#next;
|
|
1366
|
+
if (prev === null) {
|
|
1367
|
+
first_batch = next;
|
|
1368
|
+
} else {
|
|
1369
|
+
prev.#next = next;
|
|
1370
|
+
}
|
|
1371
|
+
if (next === null) {
|
|
1372
|
+
last_batch = prev;
|
|
1373
|
+
} else {
|
|
1374
|
+
next.#prev = prev;
|
|
1375
|
+
}
|
|
1376
|
+
this.linked = false;
|
|
1377
|
+
}
|
|
1196
1378
|
}
|
|
1197
1379
|
function flushSync(fn) {
|
|
1198
1380
|
var was_flushing_sync = is_flushing_sync;
|
|
@@ -1348,23 +1530,15 @@ function destroy_derived_effects(derived2) {
|
|
|
1348
1530
|
}
|
|
1349
1531
|
}
|
|
1350
1532
|
}
|
|
1351
|
-
function get_derived_parent_effect(derived2) {
|
|
1352
|
-
var parent = derived2.parent;
|
|
1353
|
-
while (parent !== null) {
|
|
1354
|
-
if ((parent.f & DERIVED) === 0) {
|
|
1355
|
-
return (parent.f & DESTROYED) === 0 ? (
|
|
1356
|
-
/** @type {Effect} */
|
|
1357
|
-
parent
|
|
1358
|
-
) : null;
|
|
1359
|
-
}
|
|
1360
|
-
parent = parent.parent;
|
|
1361
|
-
}
|
|
1362
|
-
return null;
|
|
1363
|
-
}
|
|
1364
1533
|
function execute_derived(derived2) {
|
|
1365
1534
|
var value;
|
|
1366
1535
|
var prev_active_effect = active_effect;
|
|
1367
|
-
|
|
1536
|
+
var parent = derived2.parent;
|
|
1537
|
+
if (!is_destroying_effect && parent !== null && (parent.f & (DESTROYED | INERT)) !== 0) {
|
|
1538
|
+
derived_inert();
|
|
1539
|
+
return derived2.v;
|
|
1540
|
+
}
|
|
1541
|
+
set_active_effect(parent);
|
|
1368
1542
|
{
|
|
1369
1543
|
try {
|
|
1370
1544
|
derived2.f &= ~WAS_MARKED;
|
|
@@ -1377,13 +1551,16 @@ function execute_derived(derived2) {
|
|
|
1377
1551
|
return value;
|
|
1378
1552
|
}
|
|
1379
1553
|
function update_derived(derived2) {
|
|
1380
|
-
var old_value = derived2.v;
|
|
1381
1554
|
var value = execute_derived(derived2);
|
|
1382
1555
|
if (!derived2.equals(value)) {
|
|
1383
1556
|
derived2.wv = increment_write_version();
|
|
1384
1557
|
if (!current_batch?.is_fork || derived2.deps === null) {
|
|
1385
|
-
|
|
1386
|
-
|
|
1558
|
+
if (current_batch !== null) {
|
|
1559
|
+
current_batch.capture(derived2, value, true);
|
|
1560
|
+
previous_batch?.capture(derived2, value, true);
|
|
1561
|
+
} else {
|
|
1562
|
+
derived2.v = value;
|
|
1563
|
+
}
|
|
1387
1564
|
if (derived2.deps === null) {
|
|
1388
1565
|
set_signal_status(derived2, CLEAN);
|
|
1389
1566
|
return;
|
|
@@ -1462,15 +1639,9 @@ function set(source2, value, should_proxy = false) {
|
|
|
1462
1639
|
}
|
|
1463
1640
|
function internal_set(source2, value, updated_during_traversal = null) {
|
|
1464
1641
|
if (!source2.equals(value)) {
|
|
1465
|
-
|
|
1466
|
-
if (is_destroying_effect) {
|
|
1467
|
-
old_values.set(source2, value);
|
|
1468
|
-
} else {
|
|
1469
|
-
old_values.set(source2, old_value);
|
|
1470
|
-
}
|
|
1471
|
-
source2.v = value;
|
|
1642
|
+
old_values.set(source2, is_destroying_effect ? value : source2.v);
|
|
1472
1643
|
var batch = Batch.ensure();
|
|
1473
|
-
batch.capture(source2,
|
|
1644
|
+
batch.capture(source2, value);
|
|
1474
1645
|
if ((source2.f & DERIVED) !== 0) {
|
|
1475
1646
|
const derived2 = (
|
|
1476
1647
|
/** @type {Derived} */
|
|
@@ -1504,7 +1675,13 @@ function flush_eager_effects() {
|
|
|
1504
1675
|
if ((effect.f & CLEAN) !== 0) {
|
|
1505
1676
|
set_signal_status(effect, MAYBE_DIRTY);
|
|
1506
1677
|
}
|
|
1507
|
-
|
|
1678
|
+
let dirty;
|
|
1679
|
+
try {
|
|
1680
|
+
dirty = is_dirty(effect);
|
|
1681
|
+
} catch {
|
|
1682
|
+
dirty = true;
|
|
1683
|
+
}
|
|
1684
|
+
if (dirty) {
|
|
1508
1685
|
update_effect(effect);
|
|
1509
1686
|
}
|
|
1510
1687
|
}
|
|
@@ -1524,14 +1701,19 @@ function mark_reactions(signal, status, updated_during_traversal) {
|
|
|
1524
1701
|
if (not_dirty) {
|
|
1525
1702
|
set_signal_status(reaction, status);
|
|
1526
1703
|
}
|
|
1527
|
-
if ((flags &
|
|
1704
|
+
if ((flags & EAGER_EFFECT) !== 0) {
|
|
1705
|
+
eager_effects.add(
|
|
1706
|
+
/** @type {Effect} */
|
|
1707
|
+
reaction
|
|
1708
|
+
);
|
|
1709
|
+
} else if ((flags & DERIVED) !== 0) {
|
|
1528
1710
|
var derived2 = (
|
|
1529
1711
|
/** @type {Derived} */
|
|
1530
1712
|
reaction
|
|
1531
1713
|
);
|
|
1532
1714
|
batch_values?.delete(derived2);
|
|
1533
1715
|
if ((flags & WAS_MARKED) === 0) {
|
|
1534
|
-
if (flags & CONNECTED) {
|
|
1716
|
+
if (flags & CONNECTED && (active_effect === null || (active_effect.f & REACTION_IS_UPDATING) === 0)) {
|
|
1535
1717
|
reaction.f |= WAS_MARKED;
|
|
1536
1718
|
}
|
|
1537
1719
|
mark_reactions(derived2, MAYBE_DIRTY, updated_during_traversal);
|
|
@@ -1756,14 +1938,13 @@ function init_operations() {
|
|
|
1756
1938
|
first_child_getter = get_descriptor(node_prototype, "firstChild").get;
|
|
1757
1939
|
next_sibling_getter = get_descriptor(node_prototype, "nextSibling").get;
|
|
1758
1940
|
if (is_extensible(element_prototype)) {
|
|
1759
|
-
element_prototype
|
|
1760
|
-
element_prototype
|
|
1761
|
-
element_prototype
|
|
1762
|
-
element_prototype.__style = void 0;
|
|
1941
|
+
element_prototype[CLASS_CACHE] = void 0;
|
|
1942
|
+
element_prototype[ATTRIBUTES_CACHE] = null;
|
|
1943
|
+
element_prototype[STYLE_CACHE] = void 0;
|
|
1763
1944
|
element_prototype.__e = void 0;
|
|
1764
1945
|
}
|
|
1765
1946
|
if (is_extensible(text_prototype)) {
|
|
1766
|
-
text_prototype
|
|
1947
|
+
text_prototype[TEXT_CACHE] = void 0;
|
|
1767
1948
|
}
|
|
1768
1949
|
}
|
|
1769
1950
|
function create_text(value = "") {
|
|
@@ -1829,6 +2010,7 @@ function create_effect(type, fn) {
|
|
|
1829
2010
|
wv: 0,
|
|
1830
2011
|
ac: null
|
|
1831
2012
|
};
|
|
2013
|
+
current_batch?.register_created_effect(effect);
|
|
1832
2014
|
var e = effect;
|
|
1833
2015
|
if ((type & EFFECT) !== 0) {
|
|
1834
2016
|
if (collected_effects !== null) {
|
|
@@ -2020,11 +2202,13 @@ function pause_children(effect, transitions, local) {
|
|
|
2020
2202
|
var child = effect.first;
|
|
2021
2203
|
while (child !== null) {
|
|
2022
2204
|
var sibling = child.next;
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2205
|
+
if ((child.f & ROOT_EFFECT) === 0) {
|
|
2206
|
+
var transparent = (child.f & EFFECT_TRANSPARENT) !== 0 || // If this is a branch effect without a block effect parent,
|
|
2207
|
+
// it means the parent block effect was pruned. In that case,
|
|
2208
|
+
// transparency information was transferred to the branch effect.
|
|
2209
|
+
(child.f & BRANCH_EFFECT) !== 0 && (effect.f & BLOCK_EFFECT) !== 0;
|
|
2210
|
+
pause_children(child, transitions, transparent ? local : false);
|
|
2211
|
+
}
|
|
2028
2212
|
child = sibling;
|
|
2029
2213
|
}
|
|
2030
2214
|
}
|
|
@@ -2274,7 +2458,9 @@ function remove_reaction(signal, dependency) {
|
|
|
2274
2458
|
derived2.f ^= CONNECTED;
|
|
2275
2459
|
derived2.f &= ~WAS_MARKED;
|
|
2276
2460
|
}
|
|
2277
|
-
|
|
2461
|
+
if (derived2.v !== UNINITIALIZED) {
|
|
2462
|
+
update_derived_status(derived2);
|
|
2463
|
+
}
|
|
2278
2464
|
freeze_derived_effects(derived2);
|
|
2279
2465
|
remove_reactions(derived2, 0);
|
|
2280
2466
|
}
|
|
@@ -2664,6 +2850,13 @@ https://svelte.dev/e/invalid_csp`);
|
|
|
2664
2850
|
error.name = "Svelte error";
|
|
2665
2851
|
throw error;
|
|
2666
2852
|
}
|
|
2853
|
+
function invalid_id_prefix() {
|
|
2854
|
+
const error = new Error(`invalid_id_prefix
|
|
2855
|
+
The \`idPrefix\` option cannot include \`--\`.
|
|
2856
|
+
https://svelte.dev/e/invalid_id_prefix`);
|
|
2857
|
+
error.name = "Svelte error";
|
|
2858
|
+
throw error;
|
|
2859
|
+
}
|
|
2667
2860
|
function server_context_required() {
|
|
2668
2861
|
const error = new Error(`server_context_required
|
|
2669
2862
|
Could not resolve \`render\` context.
|
|
@@ -3106,9 +3299,11 @@ class Renderer {
|
|
|
3106
3299
|
);
|
|
3107
3300
|
}
|
|
3108
3301
|
this.local = other.local;
|
|
3109
|
-
this.#out = other.#out.map((item) => {
|
|
3110
|
-
|
|
3111
|
-
|
|
3302
|
+
this.#out = other.#out.map((item, i) => {
|
|
3303
|
+
const current = this.#out[i];
|
|
3304
|
+
if (current instanceof Renderer && item instanceof Renderer) {
|
|
3305
|
+
current.subsume(item);
|
|
3306
|
+
return current;
|
|
3112
3307
|
}
|
|
3113
3308
|
return item;
|
|
3114
3309
|
});
|
|
@@ -3313,7 +3508,10 @@ class Renderer {
|
|
|
3313
3508
|
} catch (error) {
|
|
3314
3509
|
const { context, failed, transformError } = item.#boundary;
|
|
3315
3510
|
set_ssr_context(context);
|
|
3316
|
-
let
|
|
3511
|
+
let promise = transformError(error);
|
|
3512
|
+
set_ssr_context(null);
|
|
3513
|
+
let transformed = await promise;
|
|
3514
|
+
set_ssr_context(context);
|
|
3317
3515
|
const failed_renderer = new Renderer(item.global, item);
|
|
3318
3516
|
failed_renderer.type = item.type;
|
|
3319
3517
|
failed_renderer.#out.push(Renderer.#serialize_failed_boundary(transformed));
|
|
@@ -3346,6 +3544,9 @@ class Renderer {
|
|
|
3346
3544
|
* @returns {Renderer}
|
|
3347
3545
|
*/
|
|
3348
3546
|
static #open_render(mode, component, options) {
|
|
3547
|
+
if (options.idPrefix?.includes("--")) {
|
|
3548
|
+
invalid_id_prefix();
|
|
3549
|
+
}
|
|
3349
3550
|
var previous_context = ssr_context;
|
|
3350
3551
|
try {
|
|
3351
3552
|
const renderer = new Renderer(
|
|
@@ -3520,7 +3721,7 @@ function attributes(attrs, css_hash, classes, styles, flags = 0) {
|
|
|
3520
3721
|
for (name of Object.keys(attrs)) {
|
|
3521
3722
|
if (typeof attrs[name] === "function") continue;
|
|
3522
3723
|
if (name[0] === "$" && name[1] === "$") continue;
|
|
3523
|
-
if (INVALID_ATTR_NAME_CHAR_REGEX.test(name)) continue;
|
|
3724
|
+
if (name === "" || INVALID_ATTR_NAME_CHAR_REGEX.test(name)) continue;
|
|
3524
3725
|
var value = attrs[name];
|
|
3525
3726
|
var lower = name.toLowerCase();
|
|
3526
3727
|
if (lowercase) name = lower;
|
|
@@ -3621,5 +3822,5 @@ function derived(fn) {
|
|
|
3621
3822
|
};
|
|
3622
3823
|
}
|
|
3623
3824
|
|
|
3624
|
-
export {
|
|
3625
|
-
//# sourceMappingURL=index-
|
|
3825
|
+
export { setContext as $, define_property as A, mutable_source as B, init_operations as C, DevalueError as D, get_first_child as E, COMMENT_NODE as F, HYDRATION_START as G, HOLE as H, get_next_sibling as I, HYDRATION_ERROR as J, hydration_failed as K, LEGACY_PROPS as L, MAX_ARRAY_INDEX as M, NAN as N, clear_text_content as O, POSITIVE_INFINITY as P, hydration_mismatch as Q, component_root as R, SPARSE as S, create_text as T, UNDEFINED as U, array_from as V, is_passive_event as W, set_active_reaction as X, set_active_effect as Y, active_reaction as Z, active_effect as _, NEGATIVE_INFINITY as a, BOUNDARY_EFFECT as a0, block as a1, branch as a2, queue_micro_task as a3, pause_effect as a4, current_batch as a5, move_effect as a6, defer_effect as a7, set_component_context as a8, Batch as a9, clsx as aA, handle_error as aa, component_context as ab, internal_set as ac, destroy_effect as ad, invoke_error_boundary as ae, effect_tracking as af, render_effect as ag, HYDRATION_END as ah, HYDRATION_START_ELSE as ai, svelte_boundary_reset_onerror as aj, source as ak, untrack as al, increment as am, HYDRATION_START_FAILED as an, svelte_boundary_reset_noop as ao, push$1 as ap, pop$1 as aq, EFFECT_TRANSPARENT as ar, EFFECT_PRESERVED as as, noop as at, safe_not_equal as au, attr as av, bind_props as aw, spread_props as ax, ssr_context as ay, attr_style as az, NEGATIVE_ZERO as b, is_valid_array_index as c, is_primitive as d, is_plain_object as e, enumerable_symbols as f, get_type as g, stringify_string as h, is_valid_array_len as i, browser as j, stringify as k, store_get as l, attr_class as m, unsubscribe_stores as n, head as o, escape_html as p, getContext as q, derived as r, stringify_key as s, ensure_array_like as t, uneval as u, valid_array_indices as v, render as w, set as x, get as y, flushSync as z };
|
|
3826
|
+
//# sourceMappingURL=index-DMikC9Qy.js.map
|