@svgrid/enterprise 2.3.2 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/svgrid-enterprise.svelte-external.js +5917 -5545
- package/dist/designer/assets/index-oYok52zd.css +1 -0
- package/dist/designer/assets/{index-DVrv9dH6.js → index-qL7ir9C7.js} +89 -89
- package/dist/designer/assets/src-96d31O63.js +2873 -0
- package/dist/designer/assets/src-D-O2F805.css +1 -0
- package/dist/designer/index.html +6 -6
- package/dist/node/studio.js +681 -84
- package/package.json +3 -3
- package/src/SvGridEditPanel.dom.test.ts +174 -0
- package/src/SvGridEditPanel.svelte +209 -46
- package/src/edit-panel.test.ts +145 -36
- package/src/edit-panel.ts +167 -16
- package/src/expressions/evaluate.ts +1 -1
- package/src/expressions/parse.ts +3 -3
- package/src/index.ts +8 -0
- package/src/license-core.ts +77 -5
- package/src/license-expiry.test.ts +91 -0
- package/src/license.ts +31 -2
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/_svelte_metadata.json +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/_metadata.json +178 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/attachments-ZrPsKxob.js +3875 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/attachments-ZrPsKxob.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/constants-ACqvWGE2.js +21 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/constants-ACqvWGE2.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/dev-D3w5jt92.js +1938 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/dev-D3w5jt92.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/events-CC2V3H0y.js +205 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/events-CC2V3H0y.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/flags-BXP37tAa.js +18 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/flags-BXP37tAa.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/hydration-DwubnU5b.js +264 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/hydration-DwubnU5b.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/legacy-client-hD7f6PUz.js +697 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/legacy-client-hD7f6PUz.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/package.json +3 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte.js +134 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_animate.js +55 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_animate.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_attachments.js +2 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_compiler.js +46843 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_compiler.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_easing.js +237 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_easing.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_events.js +2 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal.js +4 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_client.js +7 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_disclose-version.js +4 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_disclose-version.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_async.js +5 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_async.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_legacy.js +5 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_legacy.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_tracing.js +5 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_tracing.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_server.js +6 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_legacy.js +83 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_legacy.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_motion.js +559 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_motion.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity.js +24 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity_window.js +122 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity_window.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_server.js +2 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_store.js +89 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_store.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_transition.js +241 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_transition.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-DBx1SCN6.js +4938 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-DBx1SCN6.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-gjfpSTFS.js +495 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-gjfpSTFS.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/validate-DKoOKg8S.js +190 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/validate-DKoOKg8S.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/version-C0MiR7eR.js +8 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/version-C0MiR7eR.js.map +1 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/warnings-B6Y7P0Q-.js +138 -0
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/warnings-B6Y7P0Q-.js.map +1 -0
- package/src/schema.ts +63 -0
- package/src/studio/emit-project.test.ts +191 -0
- package/src/studio/emit-project.ts +237 -27
- package/src/studio/emit-schema.ts +4 -1
- package/src/studio/index.ts +2 -0
- package/src/studio/init-flow.test.ts +150 -0
- package/src/studio/init-flow.ts +169 -22
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/_svelte_metadata.json +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/_metadata.json +178 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/attachments-BOv1rBKp.js +3875 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/attachments-BOv1rBKp.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/constants-B9vgIdCd.js +21 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/constants-B9vgIdCd.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/dev-T1qbW_qD.js +1938 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/dev-T1qbW_qD.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/events-Bo11SfVK.js +205 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/events-Bo11SfVK.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/flags-X7D4vfrZ.js +18 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/flags-X7D4vfrZ.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/hydration-oyUje5i1.js +264 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/hydration-oyUje5i1.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/legacy-client-DeSQgSFm.js +697 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/legacy-client-DeSQgSFm.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/package.json +3 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte.js +134 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_animate.js +55 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_animate.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_attachments.js +2 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_compiler.js +46843 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_compiler.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_easing.js +237 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_easing.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_events.js +2 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal.js +4 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_client.js +7 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_disclose-version.js +4 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_disclose-version.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_async.js +5 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_async.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_legacy.js +5 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_legacy.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_tracing.js +5 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_tracing.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_server.js +6 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_legacy.js +83 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_legacy.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_motion.js +559 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_motion.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity.js +24 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity_window.js +122 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity_window.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_server.js +2 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_store.js +89 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_store.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_transition.js +241 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_transition.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-BbWyXNk1.js +4938 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-BbWyXNk1.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-DI_fC7vt.js +495 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-DI_fC7vt.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/validate-Dyr3lQv9.js +190 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/validate-Dyr3lQv9.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/version-_9FHH-LF.js +8 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/version-_9FHH-LF.js.map +1 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/warnings-CUbSPnyP.js +138 -0
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/warnings-CUbSPnyP.js.map +1 -0
- package/src/studio/project.test.ts +30 -0
- package/src/studio/project.ts +72 -8
- package/src/studio/samples/crm.ts +11 -2
- package/src/studio/samples/insurance.ts +10 -4
- package/src/studio/samples/samples.test.ts +36 -0
- package/src/studio/samples/shared.ts +14 -0
- package/src/studio/samples/support.ts +12 -5
- package/src/studio/screen-suites.test.ts +43 -0
- package/src/studio/screen-suites.ts +5 -2
- package/src/studio/user-error.ts +31 -0
- package/src/upgrade-prompt.ts +23 -10
- package/src/version.test.ts +17 -0
- package/src/version.ts +13 -0
- package/dist/designer/assets/index-DjPp1mn7.css +0 -1
- package/dist/designer/assets/src-BRKu53tV.js +0 -2842
- package/dist/designer/assets/src-DseB1VRN.css +0 -1
|
@@ -0,0 +1,697 @@
|
|
|
1
|
+
import { $ as get_next_sibling, J as create_element, K as clear_text_content, Lt as flushSync, Mn as hydration_failed, Q as get_first_child, Tn as set_hydrating, X as create_text, Xn as LEGACY_PROPS, Y as create_fragment, Yn as IS_XHTML, _ as component_root, _n as hydrate_next, ar as define_property, bn as hydrating, cn as pop, dt as mutable_source, er as STATE_SYMBOL, et as init_operations, in as component_context, jt as boundary, ln as push, n as active_effect, nr as TEXT_CACHE, nt as merge_text_nodes, o as get, pt as set, q as create_comment, rr as array_from, rt as set_attribute, tt as is_firefox, vn as hydrate_node, wn as set_hydrate_node } from "./utils-BbWyXNk1.js";
|
|
2
|
+
import { t as async_mode_flag } from "./flags-X7D4vfrZ.js";
|
|
3
|
+
import { c as NAMESPACE_SVG, i as HYDRATION_ERROR, s as NAMESPACE_MATHML } from "./constants-B9vgIdCd.js";
|
|
4
|
+
import { d as is_passive_event } from "./utils-DI_fC7vt.js";
|
|
5
|
+
import { d as lifecycle_double_unmount, g as state_proxy_unmount, u as hydration_mismatch } from "./warnings-CUbSPnyP.js";
|
|
6
|
+
import { s as handle_event_propagation, t as all_registered_events, u as root_event_handles } from "./events-Bo11SfVK.js";
|
|
7
|
+
//#region ../../../../node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.67.0/node_modules/svelte/src/internal/client/dom/reconciler.js
|
|
8
|
+
var policy = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
9
|
+
/** @param {string} html */
|
|
10
|
+
createHTML: (html) => {
|
|
11
|
+
return html;
|
|
12
|
+
} });
|
|
13
|
+
/** @param {string} html */
|
|
14
|
+
function create_trusted_html(html) {
|
|
15
|
+
return policy?.createHTML(html) ?? html;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @param {string} html
|
|
19
|
+
*/
|
|
20
|
+
function create_fragment_from_html(html) {
|
|
21
|
+
var elem = create_element("template");
|
|
22
|
+
elem.innerHTML = create_trusted_html(html.replaceAll("<!>", "<!---->"));
|
|
23
|
+
return elem.content;
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region ../../../../node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.67.0/node_modules/svelte/src/internal/client/dom/template.js
|
|
27
|
+
/** @import { Effect, EffectNodes, TemplateNode } from '#client' */
|
|
28
|
+
/** @import { TemplateStructure } from './types' */
|
|
29
|
+
var TEMPLATE_TAG = IS_XHTML ? "template" : "TEMPLATE";
|
|
30
|
+
var SCRIPT_TAG = IS_XHTML ? "script" : "SCRIPT";
|
|
31
|
+
/**
|
|
32
|
+
* @param {TemplateNode} start
|
|
33
|
+
* @param {TemplateNode | null} end
|
|
34
|
+
*/
|
|
35
|
+
function assign_nodes(start, end) {
|
|
36
|
+
var effect = active_effect;
|
|
37
|
+
if (effect.nodes === null) effect.nodes = {
|
|
38
|
+
start,
|
|
39
|
+
end,
|
|
40
|
+
a: null,
|
|
41
|
+
t: null
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* @param {string} content
|
|
46
|
+
* @param {number} flags
|
|
47
|
+
* @returns {() => Node | Node[]}
|
|
48
|
+
*/
|
|
49
|
+
/*#__NO_SIDE_EFFECTS__*/
|
|
50
|
+
function from_html(content, flags) {
|
|
51
|
+
var is_fragment = (flags & 1) !== 0;
|
|
52
|
+
var use_import_node = (flags & 2) !== 0;
|
|
53
|
+
/** @type {Node} */
|
|
54
|
+
var node;
|
|
55
|
+
/**
|
|
56
|
+
* Whether or not the first item is a text/element node. If not, we need to
|
|
57
|
+
* create an additional comment node to act as `effect.nodes.start`
|
|
58
|
+
*/
|
|
59
|
+
var has_start = !content.startsWith("<!>");
|
|
60
|
+
return () => {
|
|
61
|
+
if (hydrating) {
|
|
62
|
+
assign_nodes(hydrate_node, null);
|
|
63
|
+
return hydrate_node;
|
|
64
|
+
}
|
|
65
|
+
if (node === void 0) {
|
|
66
|
+
node = create_fragment_from_html(has_start ? content : "<!>" + content);
|
|
67
|
+
if (!is_fragment) node = /* @__PURE__ */ get_first_child(node);
|
|
68
|
+
}
|
|
69
|
+
var clone = use_import_node || is_firefox ? document.importNode(node, true) : node.cloneNode(true);
|
|
70
|
+
if (is_fragment) {
|
|
71
|
+
var start = /* @__PURE__ */ get_first_child(clone);
|
|
72
|
+
var end = clone.lastChild;
|
|
73
|
+
assign_nodes(start, end);
|
|
74
|
+
} else assign_nodes(clone, clone);
|
|
75
|
+
return clone;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* @param {string} content
|
|
80
|
+
* @param {number} flags
|
|
81
|
+
* @param {'svg' | 'math'} ns
|
|
82
|
+
* @returns {() => Node | Node[]}
|
|
83
|
+
*/
|
|
84
|
+
/*#__NO_SIDE_EFFECTS__*/
|
|
85
|
+
function from_namespace(content, flags, ns = "svg") {
|
|
86
|
+
/**
|
|
87
|
+
* Whether or not the first item is a text/element node. If not, we need to
|
|
88
|
+
* create an additional comment node to act as `effect.nodes.start`
|
|
89
|
+
*/
|
|
90
|
+
var has_start = !content.startsWith("<!>");
|
|
91
|
+
var is_fragment = (flags & 1) !== 0;
|
|
92
|
+
var wrapped = `<${ns}>${has_start ? content : "<!>" + content}</${ns}>`;
|
|
93
|
+
/** @type {Element | DocumentFragment} */
|
|
94
|
+
var node;
|
|
95
|
+
return () => {
|
|
96
|
+
if (hydrating) {
|
|
97
|
+
assign_nodes(hydrate_node, null);
|
|
98
|
+
return hydrate_node;
|
|
99
|
+
}
|
|
100
|
+
if (!node) {
|
|
101
|
+
var fragment = create_fragment_from_html(wrapped);
|
|
102
|
+
var root = /* @__PURE__ */ get_first_child(fragment);
|
|
103
|
+
if (is_fragment) {
|
|
104
|
+
node = document.createDocumentFragment();
|
|
105
|
+
while (/* @__PURE__ */ get_first_child(root)) node.appendChild(/* @__PURE__ */ get_first_child(root));
|
|
106
|
+
} else node = /* @__PURE__ */ get_first_child(root);
|
|
107
|
+
}
|
|
108
|
+
var clone = node.cloneNode(true);
|
|
109
|
+
if (is_fragment) {
|
|
110
|
+
var start = /* @__PURE__ */ get_first_child(clone);
|
|
111
|
+
var end = clone.lastChild;
|
|
112
|
+
assign_nodes(start, end);
|
|
113
|
+
} else assign_nodes(clone, clone);
|
|
114
|
+
return clone;
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* @param {string} content
|
|
119
|
+
* @param {number} flags
|
|
120
|
+
*/
|
|
121
|
+
/*#__NO_SIDE_EFFECTS__*/
|
|
122
|
+
function from_svg(content, flags) {
|
|
123
|
+
return /* @__PURE__ */ from_namespace(content, flags, "svg");
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* @param {string} content
|
|
127
|
+
* @param {number} flags
|
|
128
|
+
*/
|
|
129
|
+
/*#__NO_SIDE_EFFECTS__*/
|
|
130
|
+
function from_mathml(content, flags) {
|
|
131
|
+
return /* @__PURE__ */ from_namespace(content, flags, "math");
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* @param {TemplateStructure[]} structure
|
|
135
|
+
* @param {typeof NAMESPACE_SVG | typeof NAMESPACE_MATHML | undefined} [ns]
|
|
136
|
+
*/
|
|
137
|
+
function fragment_from_tree(structure, ns) {
|
|
138
|
+
var fragment = create_fragment();
|
|
139
|
+
for (var item of structure) {
|
|
140
|
+
if (typeof item === "string") {
|
|
141
|
+
fragment.append(create_text(item));
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
if (item === void 0 || item[0][0] === "/") {
|
|
145
|
+
fragment.append(create_comment(item ? item[0].slice(3) : ""));
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
const [name, attributes, ...children] = item;
|
|
149
|
+
const namespace = name === "svg" ? NAMESPACE_SVG : name === "math" ? NAMESPACE_MATHML : ns;
|
|
150
|
+
var element = create_element(name, namespace, attributes?.is);
|
|
151
|
+
for (var key in attributes) set_attribute(element, key, attributes[key]);
|
|
152
|
+
if (children.length > 0) (element.nodeName === TEMPLATE_TAG ? element.content : element).append(fragment_from_tree(children, element.nodeName === "foreignObject" ? void 0 : namespace));
|
|
153
|
+
fragment.append(element);
|
|
154
|
+
}
|
|
155
|
+
return fragment;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* @param {TemplateStructure[]} structure
|
|
159
|
+
* @param {number} flags
|
|
160
|
+
* @returns {() => Node | Node[]}
|
|
161
|
+
*/
|
|
162
|
+
/*#__NO_SIDE_EFFECTS__*/
|
|
163
|
+
function from_tree(structure, flags) {
|
|
164
|
+
var is_fragment = (flags & 1) !== 0;
|
|
165
|
+
var use_import_node = (flags & 2) !== 0;
|
|
166
|
+
/** @type {Node} */
|
|
167
|
+
var node;
|
|
168
|
+
return () => {
|
|
169
|
+
if (hydrating) {
|
|
170
|
+
assign_nodes(hydrate_node, null);
|
|
171
|
+
return hydrate_node;
|
|
172
|
+
}
|
|
173
|
+
if (node === void 0) {
|
|
174
|
+
node = fragment_from_tree(structure, (flags & 4) !== 0 ? NAMESPACE_SVG : (flags & 8) !== 0 ? NAMESPACE_MATHML : void 0);
|
|
175
|
+
if (!is_fragment) node = /* @__PURE__ */ get_first_child(node);
|
|
176
|
+
}
|
|
177
|
+
var clone = use_import_node || is_firefox ? document.importNode(node, true) : node.cloneNode(true);
|
|
178
|
+
if (is_fragment) {
|
|
179
|
+
var start = /* @__PURE__ */ get_first_child(clone);
|
|
180
|
+
var end = clone.lastChild;
|
|
181
|
+
assign_nodes(start, end);
|
|
182
|
+
} else assign_nodes(clone, clone);
|
|
183
|
+
return clone;
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* @param {() => Element | DocumentFragment} fn
|
|
188
|
+
*/
|
|
189
|
+
function with_script(fn) {
|
|
190
|
+
return () => run_scripts(fn());
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Creating a document fragment from HTML that contains script tags will not execute
|
|
194
|
+
* the scripts. We need to replace the script tags with new ones so that they are executed.
|
|
195
|
+
* @param {Element | DocumentFragment} node
|
|
196
|
+
* @returns {Node | Node[]}
|
|
197
|
+
*/
|
|
198
|
+
function run_scripts(node) {
|
|
199
|
+
if (hydrating) return node;
|
|
200
|
+
const is_fragment = node.nodeType === 11;
|
|
201
|
+
const scripts = node.nodeName === SCRIPT_TAG ? [node] : node.querySelectorAll("script");
|
|
202
|
+
const effect = active_effect;
|
|
203
|
+
for (const script of scripts) {
|
|
204
|
+
const clone = create_element("script");
|
|
205
|
+
for (var attribute of script.attributes) clone.setAttribute(attribute.name, attribute.value);
|
|
206
|
+
clone.textContent = script.textContent;
|
|
207
|
+
if (is_fragment ? node.firstChild === script : node === script) effect.nodes.start = clone;
|
|
208
|
+
if (is_fragment ? node.lastChild === script : node === script) effect.nodes.end = clone;
|
|
209
|
+
script.replaceWith(clone);
|
|
210
|
+
}
|
|
211
|
+
return node;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Don't mark this as side-effect-free, hydration needs to walk all nodes
|
|
215
|
+
* @param {any} value
|
|
216
|
+
*/
|
|
217
|
+
function text(value = "") {
|
|
218
|
+
if (!hydrating) {
|
|
219
|
+
var t = create_text(value + "");
|
|
220
|
+
assign_nodes(t, t);
|
|
221
|
+
return t;
|
|
222
|
+
}
|
|
223
|
+
var node = hydrate_node;
|
|
224
|
+
if (node.nodeType !== 3) {
|
|
225
|
+
node.before(node = create_text());
|
|
226
|
+
set_hydrate_node(node);
|
|
227
|
+
} else merge_text_nodes(node);
|
|
228
|
+
assign_nodes(node, node);
|
|
229
|
+
return node;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* @returns {TemplateNode | DocumentFragment}
|
|
233
|
+
*/
|
|
234
|
+
function comment() {
|
|
235
|
+
if (hydrating) {
|
|
236
|
+
assign_nodes(hydrate_node, null);
|
|
237
|
+
return hydrate_node;
|
|
238
|
+
}
|
|
239
|
+
var frag = document.createDocumentFragment();
|
|
240
|
+
var start = document.createComment("");
|
|
241
|
+
var anchor = create_text();
|
|
242
|
+
frag.append(start, anchor);
|
|
243
|
+
assign_nodes(start, anchor);
|
|
244
|
+
return frag;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Assign the created (or in hydration mode, traversed) dom elements to the current block
|
|
248
|
+
* and insert the elements into the dom (in client mode).
|
|
249
|
+
* @param {Text | Comment | Element} anchor
|
|
250
|
+
* @param {DocumentFragment | Element} dom
|
|
251
|
+
*/
|
|
252
|
+
function append(anchor, dom) {
|
|
253
|
+
if (hydrating) {
|
|
254
|
+
var effect = active_effect;
|
|
255
|
+
if ((effect.f & 32768) === 0 || effect.nodes.end === null) effect.nodes.end = hydrate_node;
|
|
256
|
+
hydrate_next();
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
if (anchor === null) return;
|
|
260
|
+
anchor.before(dom);
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Create (or hydrate) an unique UID for the component instance.
|
|
264
|
+
*/
|
|
265
|
+
function props_id() {
|
|
266
|
+
if (hydrating && hydrate_node && hydrate_node.nodeType === 8 && hydrate_node.textContent?.startsWith(`$`)) {
|
|
267
|
+
const id = hydrate_node.textContent.substring(1);
|
|
268
|
+
hydrate_next();
|
|
269
|
+
return id;
|
|
270
|
+
}
|
|
271
|
+
(window.__svelte ??= {}).uid ??= 1;
|
|
272
|
+
return `c${window.__svelte.uid++}`;
|
|
273
|
+
}
|
|
274
|
+
//#endregion
|
|
275
|
+
//#region ../../../../node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.67.0/node_modules/svelte/src/internal/client/render.js
|
|
276
|
+
/** @import { ComponentContext, Effect, EffectNodes, TemplateNode } from '#client' */
|
|
277
|
+
/** @import { Component, ComponentType, SvelteComponent, MountOptions } from '../../index.js' */
|
|
278
|
+
/**
|
|
279
|
+
* This is normally true — block effects should run their intro transitions —
|
|
280
|
+
* but is false during hydration (unless `options.intro` is `true`) and
|
|
281
|
+
* when creating the children of a `<svelte:element>` that just changed tag
|
|
282
|
+
*/
|
|
283
|
+
var should_intro = true;
|
|
284
|
+
/** @param {boolean} value */
|
|
285
|
+
function set_should_intro(value) {
|
|
286
|
+
should_intro = value;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* @param {Element} text
|
|
290
|
+
* @param {string} value
|
|
291
|
+
* @returns {void}
|
|
292
|
+
*/
|
|
293
|
+
function set_text(text, value) {
|
|
294
|
+
var str = value == null ? "" : typeof value === "object" ? `${value}` : value;
|
|
295
|
+
if (str !== (text[TEXT_CACHE] ??= text.nodeValue)) {
|
|
296
|
+
/** @type {any} */ text[TEXT_CACHE] = str;
|
|
297
|
+
text.nodeValue = `${str}`;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Mounts a component to the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component.
|
|
302
|
+
* Transitions will play during the initial render unless the `intro` option is set to `false`.
|
|
303
|
+
*
|
|
304
|
+
* @template {Record<string, any>} Props
|
|
305
|
+
* @template {Record<string, any>} Exports
|
|
306
|
+
* @param {ComponentType<SvelteComponent<Props>> | Component<Props, Exports, any>} component
|
|
307
|
+
* @param {MountOptions<Props>} options
|
|
308
|
+
* @returns {Exports}
|
|
309
|
+
*/
|
|
310
|
+
function mount(component, options) {
|
|
311
|
+
return _mount(component, options);
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Hydrates a component on the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component
|
|
315
|
+
*
|
|
316
|
+
* @template {Record<string, any>} Props
|
|
317
|
+
* @template {Record<string, any>} Exports
|
|
318
|
+
* @param {ComponentType<SvelteComponent<Props>> | Component<Props, Exports, any>} component
|
|
319
|
+
* @param {{} extends Props ? {
|
|
320
|
+
* target: Document | Element | ShadowRoot;
|
|
321
|
+
* props?: Props;
|
|
322
|
+
* events?: Record<string, (e: any) => any>;
|
|
323
|
+
* context?: Map<any, any>;
|
|
324
|
+
* intro?: boolean;
|
|
325
|
+
* recover?: boolean;
|
|
326
|
+
* transformError?: (error: unknown) => unknown;
|
|
327
|
+
* } : {
|
|
328
|
+
* target: Document | Element | ShadowRoot;
|
|
329
|
+
* props: Props;
|
|
330
|
+
* events?: Record<string, (e: any) => any>;
|
|
331
|
+
* context?: Map<any, any>;
|
|
332
|
+
* intro?: boolean;
|
|
333
|
+
* recover?: boolean;
|
|
334
|
+
* transformError?: (error: unknown) => unknown;
|
|
335
|
+
* }} options
|
|
336
|
+
* @returns {Exports}
|
|
337
|
+
*/
|
|
338
|
+
function hydrate(component, options) {
|
|
339
|
+
init_operations();
|
|
340
|
+
options.intro = options.intro ?? false;
|
|
341
|
+
const target = options.target;
|
|
342
|
+
const was_hydrating = hydrating;
|
|
343
|
+
const previous_hydrate_node = hydrate_node;
|
|
344
|
+
try {
|
|
345
|
+
var anchor = /* @__PURE__ */ get_first_child(target);
|
|
346
|
+
while (anchor && (anchor.nodeType !== 8 || anchor.data !== "[")) anchor = /* @__PURE__ */ get_next_sibling(anchor);
|
|
347
|
+
if (!anchor) throw HYDRATION_ERROR;
|
|
348
|
+
set_hydrating(true);
|
|
349
|
+
set_hydrate_node(anchor);
|
|
350
|
+
const instance = _mount(component, {
|
|
351
|
+
...options,
|
|
352
|
+
anchor
|
|
353
|
+
});
|
|
354
|
+
set_hydrating(false);
|
|
355
|
+
return instance;
|
|
356
|
+
} catch (error) {
|
|
357
|
+
if (error instanceof Error && error.message.split("\n").some((line) => line.startsWith("https://svelte.dev/e/"))) throw error;
|
|
358
|
+
if (error !== HYDRATION_ERROR) console.warn("Failed to hydrate: ", error);
|
|
359
|
+
if (options.recover === false) hydration_failed();
|
|
360
|
+
init_operations();
|
|
361
|
+
clear_text_content(target);
|
|
362
|
+
set_hydrating(false);
|
|
363
|
+
return mount(component, options);
|
|
364
|
+
} finally {
|
|
365
|
+
set_hydrating(was_hydrating);
|
|
366
|
+
set_hydrate_node(previous_hydrate_node);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
/** @type {Map<EventTarget, Map<string, number>>} */
|
|
370
|
+
var listeners = /* @__PURE__ */ new Map();
|
|
371
|
+
/**
|
|
372
|
+
* @template {Record<string, any>} Exports
|
|
373
|
+
* @param {ComponentType<SvelteComponent<any>> | Component<any>} Component
|
|
374
|
+
* @param {MountOptions} options
|
|
375
|
+
* @returns {Exports}
|
|
376
|
+
*/
|
|
377
|
+
function _mount(Component, { target, anchor, props = {}, events, context, intro = true, transformError }) {
|
|
378
|
+
init_operations();
|
|
379
|
+
/** @type {Exports} */
|
|
380
|
+
var component = void 0;
|
|
381
|
+
var unmount = component_root(() => {
|
|
382
|
+
var anchor_node = anchor ?? target.appendChild(create_text());
|
|
383
|
+
boundary(anchor_node, { pending: () => {} }, (anchor_node) => {
|
|
384
|
+
push({});
|
|
385
|
+
var ctx = component_context;
|
|
386
|
+
if (context) ctx.c = context;
|
|
387
|
+
if (events)
|
|
388
|
+
/** @type {any} */ props.$$events = events;
|
|
389
|
+
if (hydrating) assign_nodes(anchor_node, null);
|
|
390
|
+
should_intro = intro;
|
|
391
|
+
component = Component(anchor_node, props) || {};
|
|
392
|
+
should_intro = true;
|
|
393
|
+
if (hydrating) {
|
|
394
|
+
/** @type {Effect & { nodes: EffectNodes }} */ active_effect.nodes.end = hydrate_node;
|
|
395
|
+
if (hydrate_node === null || hydrate_node.nodeType !== 8 || hydrate_node.data !== "]") {
|
|
396
|
+
hydration_mismatch();
|
|
397
|
+
throw HYDRATION_ERROR;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
pop();
|
|
401
|
+
}, transformError);
|
|
402
|
+
/** @type {Set<string>} */
|
|
403
|
+
var registered_events = /* @__PURE__ */ new Set();
|
|
404
|
+
/** @param {Array<string>} events */
|
|
405
|
+
var event_handle = (events) => {
|
|
406
|
+
for (var i = 0; i < events.length; i++) {
|
|
407
|
+
var event_name = events[i];
|
|
408
|
+
if (registered_events.has(event_name)) continue;
|
|
409
|
+
registered_events.add(event_name);
|
|
410
|
+
var passive = is_passive_event(event_name);
|
|
411
|
+
for (const node of [target, document]) {
|
|
412
|
+
var counts = listeners.get(node);
|
|
413
|
+
if (counts === void 0) {
|
|
414
|
+
counts = /* @__PURE__ */ new Map();
|
|
415
|
+
listeners.set(node, counts);
|
|
416
|
+
}
|
|
417
|
+
var count = counts.get(event_name);
|
|
418
|
+
if (count === void 0) {
|
|
419
|
+
node.addEventListener(event_name, handle_event_propagation, { passive });
|
|
420
|
+
counts.set(event_name, 1);
|
|
421
|
+
} else counts.set(event_name, count + 1);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
event_handle(array_from(all_registered_events));
|
|
426
|
+
root_event_handles.add(event_handle);
|
|
427
|
+
return () => {
|
|
428
|
+
for (var event_name of registered_events) for (const node of [target, document]) {
|
|
429
|
+
var counts = listeners.get(node);
|
|
430
|
+
var count = counts.get(event_name);
|
|
431
|
+
if (--count == 0) {
|
|
432
|
+
node.removeEventListener(event_name, handle_event_propagation);
|
|
433
|
+
counts.delete(event_name);
|
|
434
|
+
if (counts.size === 0) listeners.delete(node);
|
|
435
|
+
} else counts.set(event_name, count);
|
|
436
|
+
}
|
|
437
|
+
root_event_handles.delete(event_handle);
|
|
438
|
+
if (anchor_node !== anchor) anchor_node.parentNode?.removeChild(anchor_node);
|
|
439
|
+
};
|
|
440
|
+
});
|
|
441
|
+
mounted_components.set(component, unmount);
|
|
442
|
+
return component;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* References of the components that were mounted or hydrated.
|
|
446
|
+
* Uses a `WeakMap` to avoid memory leaks.
|
|
447
|
+
*/
|
|
448
|
+
var mounted_components = /* @__PURE__ */ new WeakMap();
|
|
449
|
+
/**
|
|
450
|
+
* Unmounts a component that was previously mounted using `mount` or `hydrate`.
|
|
451
|
+
*
|
|
452
|
+
* Since 5.13.0, if `options.outro` is `true`, [transitions](https://svelte.dev/docs/svelte/transition) will play before the component is removed from the DOM.
|
|
453
|
+
*
|
|
454
|
+
* Returns a `Promise` that resolves after transitions have completed if `options.outro` is true, or immediately otherwise (prior to 5.13.0, returns `void`).
|
|
455
|
+
*
|
|
456
|
+
* ```js
|
|
457
|
+
* import { mount, unmount } from 'svelte';
|
|
458
|
+
* import App from './App.svelte';
|
|
459
|
+
*
|
|
460
|
+
* const app = mount(App, { target: document.body });
|
|
461
|
+
*
|
|
462
|
+
* // later...
|
|
463
|
+
* unmount(app, { outro: true });
|
|
464
|
+
* ```
|
|
465
|
+
* @param {Record<string, any>} component
|
|
466
|
+
* @param {{ outro?: boolean }} [options]
|
|
467
|
+
* @returns {Promise<void>}
|
|
468
|
+
*/
|
|
469
|
+
function unmount(component, options) {
|
|
470
|
+
const fn = mounted_components.get(component);
|
|
471
|
+
if (fn) {
|
|
472
|
+
mounted_components.delete(component);
|
|
473
|
+
return fn(options);
|
|
474
|
+
}
|
|
475
|
+
if (STATE_SYMBOL in component) state_proxy_unmount();
|
|
476
|
+
else lifecycle_double_unmount();
|
|
477
|
+
return Promise.resolve();
|
|
478
|
+
}
|
|
479
|
+
//#endregion
|
|
480
|
+
//#region ../../../../node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.67.0/node_modules/svelte/src/internal/client/dom/legacy/event-modifiers.js
|
|
481
|
+
/**
|
|
482
|
+
* Substitute for the `trusted` event modifier
|
|
483
|
+
* @deprecated
|
|
484
|
+
* @param {(event: Event, ...args: Array<unknown>) => void} fn
|
|
485
|
+
* @returns {(event: Event, ...args: unknown[]) => void}
|
|
486
|
+
*/
|
|
487
|
+
function trusted(fn) {
|
|
488
|
+
return function(...args) {
|
|
489
|
+
if (args[0].isTrusted) fn?.apply(this, args);
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Substitute for the `self` event modifier
|
|
494
|
+
* @deprecated
|
|
495
|
+
* @param {(event: Event, ...args: Array<unknown>) => void} fn
|
|
496
|
+
* @returns {(event: Event, ...args: unknown[]) => void}
|
|
497
|
+
*/
|
|
498
|
+
function self(fn) {
|
|
499
|
+
return function(...args) {
|
|
500
|
+
if (args[0].target === this) fn?.apply(this, args);
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Substitute for the `stopPropagation` event modifier
|
|
505
|
+
* @deprecated
|
|
506
|
+
* @param {(event: Event, ...args: Array<unknown>) => void} fn
|
|
507
|
+
* @returns {(event: Event, ...args: unknown[]) => void}
|
|
508
|
+
*/
|
|
509
|
+
function stopPropagation(fn) {
|
|
510
|
+
return function(...args) {
|
|
511
|
+
args[0].stopPropagation();
|
|
512
|
+
return fn?.apply(this, args);
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Substitute for the `once` event modifier
|
|
517
|
+
* @deprecated
|
|
518
|
+
* @param {(event: Event, ...args: Array<unknown>) => void} fn
|
|
519
|
+
* @returns {(event: Event, ...args: unknown[]) => void}
|
|
520
|
+
*/
|
|
521
|
+
function once(fn) {
|
|
522
|
+
var ran = false;
|
|
523
|
+
return function(...args) {
|
|
524
|
+
if (ran) return;
|
|
525
|
+
ran = true;
|
|
526
|
+
return fn?.apply(this, args);
|
|
527
|
+
};
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Substitute for the `stopImmediatePropagation` event modifier
|
|
531
|
+
* @deprecated
|
|
532
|
+
* @param {(event: Event, ...args: Array<unknown>) => void} fn
|
|
533
|
+
* @returns {(event: Event, ...args: unknown[]) => void}
|
|
534
|
+
*/
|
|
535
|
+
function stopImmediatePropagation(fn) {
|
|
536
|
+
return function(...args) {
|
|
537
|
+
args[0].stopImmediatePropagation();
|
|
538
|
+
return fn?.apply(this, args);
|
|
539
|
+
};
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* Substitute for the `preventDefault` event modifier
|
|
543
|
+
* @deprecated
|
|
544
|
+
* @param {(event: Event, ...args: Array<unknown>) => void} fn
|
|
545
|
+
* @returns {(event: Event, ...args: unknown[]) => void}
|
|
546
|
+
*/
|
|
547
|
+
function preventDefault(fn) {
|
|
548
|
+
return function(...args) {
|
|
549
|
+
args[0].preventDefault();
|
|
550
|
+
return fn?.apply(this, args);
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
//#endregion
|
|
554
|
+
//#region ../../../../node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.67.0/node_modules/svelte/src/legacy/legacy-client.js
|
|
555
|
+
/** @import { ComponentConstructorOptions, ComponentType, SvelteComponent, Component } from 'svelte' */
|
|
556
|
+
/**
|
|
557
|
+
* Takes the same options as a Svelte 4 component and the component function and returns a Svelte 4 compatible component.
|
|
558
|
+
*
|
|
559
|
+
* @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5.
|
|
560
|
+
*
|
|
561
|
+
* @template {Record<string, any>} Props
|
|
562
|
+
* @template {Record<string, any>} Exports
|
|
563
|
+
* @template {Record<string, any>} Events
|
|
564
|
+
* @template {Record<string, any>} Slots
|
|
565
|
+
*
|
|
566
|
+
* @param {ComponentConstructorOptions<Props> & {
|
|
567
|
+
* component: ComponentType<SvelteComponent<Props, Events, Slots>> | Component<Props>;
|
|
568
|
+
* }} options
|
|
569
|
+
* @returns {SvelteComponent<Props, Events, Slots> & Exports}
|
|
570
|
+
*/
|
|
571
|
+
function createClassComponent(options) {
|
|
572
|
+
return new Svelte4Component(options);
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Takes the component function and returns a Svelte 4 compatible component constructor.
|
|
576
|
+
*
|
|
577
|
+
* @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5.
|
|
578
|
+
*
|
|
579
|
+
* @template {Record<string, any>} Props
|
|
580
|
+
* @template {Record<string, any>} Exports
|
|
581
|
+
* @template {Record<string, any>} Events
|
|
582
|
+
* @template {Record<string, any>} Slots
|
|
583
|
+
*
|
|
584
|
+
* @param {SvelteComponent<Props, Events, Slots> | Component<Props>} component
|
|
585
|
+
* @returns {ComponentType<SvelteComponent<Props, Events, Slots> & Exports>}
|
|
586
|
+
*/
|
|
587
|
+
function asClassComponent(component) {
|
|
588
|
+
return class extends Svelte4Component {
|
|
589
|
+
/** @param {any} options */
|
|
590
|
+
constructor(options) {
|
|
591
|
+
super({
|
|
592
|
+
component,
|
|
593
|
+
...options
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* Support using the component as both a class and function during the transition period
|
|
600
|
+
* @typedef {{new (o: ComponentConstructorOptions): SvelteComponent;(...args: Parameters<Component<Record<string, any>>>): ReturnType<Component<Record<string, any>, Record<string, any>>>;}} LegacyComponentType
|
|
601
|
+
*/
|
|
602
|
+
var Svelte4Component = class {
|
|
603
|
+
/** @type {any} */
|
|
604
|
+
#events;
|
|
605
|
+
/** @type {Record<string, any>} */
|
|
606
|
+
#instance;
|
|
607
|
+
/**
|
|
608
|
+
* @param {ComponentConstructorOptions & {
|
|
609
|
+
* component: any;
|
|
610
|
+
* }} options
|
|
611
|
+
*/
|
|
612
|
+
constructor(options) {
|
|
613
|
+
var sources = /* @__PURE__ */ new Map();
|
|
614
|
+
/**
|
|
615
|
+
* @param {string | symbol} key
|
|
616
|
+
* @param {unknown} value
|
|
617
|
+
*/
|
|
618
|
+
var add_source = (key, value) => {
|
|
619
|
+
var s = /* @__PURE__ */ mutable_source(value, false, false);
|
|
620
|
+
sources.set(key, s);
|
|
621
|
+
return s;
|
|
622
|
+
};
|
|
623
|
+
const props = new Proxy({
|
|
624
|
+
...options.props || {},
|
|
625
|
+
$$events: {}
|
|
626
|
+
}, {
|
|
627
|
+
get(target, prop) {
|
|
628
|
+
return get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));
|
|
629
|
+
},
|
|
630
|
+
has(target, prop) {
|
|
631
|
+
if (prop === LEGACY_PROPS) return true;
|
|
632
|
+
get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));
|
|
633
|
+
return Reflect.has(target, prop);
|
|
634
|
+
},
|
|
635
|
+
set(target, prop, value) {
|
|
636
|
+
set(sources.get(prop) ?? add_source(prop, value), value);
|
|
637
|
+
return Reflect.set(target, prop, value);
|
|
638
|
+
}
|
|
639
|
+
});
|
|
640
|
+
this.#instance = (options.hydrate ? hydrate : mount)(options.component, {
|
|
641
|
+
target: options.target,
|
|
642
|
+
anchor: options.anchor,
|
|
643
|
+
props,
|
|
644
|
+
context: options.context,
|
|
645
|
+
intro: options.intro ?? false,
|
|
646
|
+
recover: options.recover,
|
|
647
|
+
transformError: options.transformError
|
|
648
|
+
});
|
|
649
|
+
if (!async_mode_flag && (!options?.props?.$$host || options.sync === false)) flushSync();
|
|
650
|
+
this.#events = props.$$events;
|
|
651
|
+
for (const key of Object.keys(this.#instance)) {
|
|
652
|
+
if (key === "$set" || key === "$destroy" || key === "$on") continue;
|
|
653
|
+
define_property(this, key, {
|
|
654
|
+
get() {
|
|
655
|
+
return this.#instance[key];
|
|
656
|
+
},
|
|
657
|
+
/** @param {any} value */
|
|
658
|
+
set(value) {
|
|
659
|
+
this.#instance[key] = value;
|
|
660
|
+
},
|
|
661
|
+
enumerable: true
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
this.#instance.$set = (next) => {
|
|
665
|
+
Object.assign(props, next);
|
|
666
|
+
};
|
|
667
|
+
this.#instance.$destroy = () => {
|
|
668
|
+
unmount(this.#instance);
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
/** @param {Record<string, any>} props */
|
|
672
|
+
$set(props) {
|
|
673
|
+
this.#instance.$set(props);
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* @param {string} event
|
|
677
|
+
* @param {(...args: any[]) => any} callback
|
|
678
|
+
* @returns {any}
|
|
679
|
+
*/
|
|
680
|
+
$on(event, callback) {
|
|
681
|
+
this.#events[event] = this.#events[event] || [];
|
|
682
|
+
/** @param {any[]} args */
|
|
683
|
+
const cb = (...args) => callback.call(this, ...args);
|
|
684
|
+
this.#events[event].push(cb);
|
|
685
|
+
return () => {
|
|
686
|
+
this.#events[event] = this.#events[event].filter(
|
|
687
|
+
/** @param {any} fn */
|
|
688
|
+
(fn) => fn !== cb
|
|
689
|
+
);
|
|
690
|
+
};
|
|
691
|
+
}
|
|
692
|
+
$destroy() {
|
|
693
|
+
this.#instance.$destroy();
|
|
694
|
+
}
|
|
695
|
+
};
|
|
696
|
+
//#endregion
|
|
697
|
+
export { create_trusted_html as S, from_svg as _, self as a, text as b, trusted as c, should_intro as d, append as f, from_mathml as g, from_html as h, preventDefault as i, set_should_intro as l, comment as m, createClassComponent as n, stopImmediatePropagation as o, assign_nodes as p, once as r, stopPropagation as s, asClassComponent as t, set_text as u, from_tree as v, with_script as x, props_id as y };
|