nebula-cms 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/README.md +3 -1
  2. package/dist/astro/index.d.ts +43 -0
  3. package/dist/astro/index.d.ts.map +1 -0
  4. package/dist/astro/index.js +223 -0
  5. package/{src → dist}/client/Admin.svelte +20 -11
  6. package/dist/client/Admin.svelte.d.ts +11 -0
  7. package/dist/client/Admin.svelte.d.ts.map +1 -0
  8. package/dist/client/components/BackendPicker.svelte.d.ts +4 -0
  9. package/dist/client/components/BackendPicker.svelte.d.ts.map +1 -0
  10. package/dist/client/components/DraftChip.svelte.d.ts +10 -0
  11. package/dist/client/components/DraftChip.svelte.d.ts.map +1 -0
  12. package/dist/client/components/MetadataForm.svelte.d.ts +12 -0
  13. package/dist/client/components/MetadataForm.svelte.d.ts.map +1 -0
  14. package/dist/client/components/ThemeToggle.svelte.d.ts +19 -0
  15. package/dist/client/components/ThemeToggle.svelte.d.ts.map +1 -0
  16. package/dist/client/components/dialogs/DeleteDraftDialog.svelte.d.ts +11 -0
  17. package/dist/client/components/dialogs/DeleteDraftDialog.svelte.d.ts.map +1 -0
  18. package/{src → dist}/client/components/dialogs/FilenameDialog.svelte +1 -2
  19. package/dist/client/components/dialogs/FilenameDialog.svelte.d.ts +13 -0
  20. package/dist/client/components/dialogs/FilenameDialog.svelte.d.ts.map +1 -0
  21. package/dist/client/components/editor/EditorPane.svelte.d.ts +4 -0
  22. package/dist/client/components/editor/EditorPane.svelte.d.ts.map +1 -0
  23. package/dist/client/components/editor/EditorTabs.svelte.d.ts +8 -0
  24. package/dist/client/components/editor/EditorTabs.svelte.d.ts.map +1 -0
  25. package/dist/client/components/editor/EditorToolbar.svelte.d.ts +4 -0
  26. package/dist/client/components/editor/EditorToolbar.svelte.d.ts.map +1 -0
  27. package/dist/client/components/editor/FormatSelector.svelte.d.ts +4 -0
  28. package/dist/client/components/editor/FormatSelector.svelte.d.ts.map +1 -0
  29. package/dist/client/components/editor/Toolbar.svelte.d.ts +19 -0
  30. package/dist/client/components/editor/Toolbar.svelte.d.ts.map +1 -0
  31. package/dist/client/components/fields/ArrayField.svelte.d.ts +15 -0
  32. package/dist/client/components/fields/ArrayField.svelte.d.ts.map +1 -0
  33. package/dist/client/components/fields/ArrayItem.svelte.d.ts +28 -0
  34. package/dist/client/components/fields/ArrayItem.svelte.d.ts.map +1 -0
  35. package/dist/client/components/fields/BooleanField.svelte.d.ts +16 -0
  36. package/dist/client/components/fields/BooleanField.svelte.d.ts.map +1 -0
  37. package/dist/client/components/fields/DateField.svelte.d.ts +16 -0
  38. package/dist/client/components/fields/DateField.svelte.d.ts.map +1 -0
  39. package/dist/client/components/fields/EnumField.svelte.d.ts +17 -0
  40. package/dist/client/components/fields/EnumField.svelte.d.ts.map +1 -0
  41. package/dist/client/components/fields/FieldWrapper.svelte.d.ts +18 -0
  42. package/dist/client/components/fields/FieldWrapper.svelte.d.ts.map +1 -0
  43. package/dist/client/components/fields/NumberField.svelte.d.ts +16 -0
  44. package/dist/client/components/fields/NumberField.svelte.d.ts.map +1 -0
  45. package/dist/client/components/fields/ObjectField.svelte.d.ts +16 -0
  46. package/dist/client/components/fields/ObjectField.svelte.d.ts.map +1 -0
  47. package/dist/client/components/fields/SchemaField.svelte.d.ts +16 -0
  48. package/dist/client/components/fields/SchemaField.svelte.d.ts.map +1 -0
  49. package/dist/client/components/fields/StringField.svelte.d.ts +16 -0
  50. package/dist/client/components/fields/StringField.svelte.d.ts.map +1 -0
  51. package/{src → dist}/client/components/sidebar/AdminSidebar.svelte +2 -4
  52. package/dist/client/components/sidebar/AdminSidebar.svelte.d.ts +19 -0
  53. package/dist/client/components/sidebar/AdminSidebar.svelte.d.ts.map +1 -0
  54. package/dist/client/components/sidebar/AdminSidebarSort.svelte.d.ts +12 -0
  55. package/dist/client/components/sidebar/AdminSidebarSort.svelte.d.ts.map +1 -0
  56. package/dist/client/css/icons.css +29 -0
  57. package/dist/client/index.d.ts +2 -0
  58. package/dist/client/index.d.ts.map +1 -0
  59. package/dist/client/js/drafts/merge.svelte.d.ts +24 -0
  60. package/dist/client/js/drafts/merge.svelte.d.ts.map +1 -0
  61. package/dist/client/js/drafts/merge.svelte.js +106 -0
  62. package/dist/client/js/drafts/ops.svelte.d.ts +31 -0
  63. package/dist/client/js/drafts/ops.svelte.d.ts.map +1 -0
  64. package/dist/client/js/drafts/ops.svelte.js +182 -0
  65. package/dist/client/js/drafts/storage.d.ts +45 -0
  66. package/dist/client/js/drafts/storage.d.ts.map +1 -0
  67. package/dist/client/js/drafts/storage.js +76 -0
  68. package/dist/client/js/drafts/workers/diff.d.ts +2 -0
  69. package/dist/client/js/drafts/workers/diff.d.ts.map +1 -0
  70. package/dist/client/js/drafts/workers/diff.js +20 -0
  71. package/dist/client/js/editor/editor.svelte.d.ts +124 -0
  72. package/dist/client/js/editor/editor.svelte.d.ts.map +1 -0
  73. package/dist/client/js/editor/editor.svelte.js +294 -0
  74. package/dist/client/js/editor/languages.d.ts +11 -0
  75. package/dist/client/js/editor/languages.d.ts.map +1 -0
  76. package/dist/client/js/editor/languages.js +93 -0
  77. package/dist/client/js/editor/link-wrap.d.ts +6 -0
  78. package/dist/client/js/editor/link-wrap.d.ts.map +1 -0
  79. package/{src/client/js/editor/link-wrap.ts → dist/client/js/editor/link-wrap.js} +17 -24
  80. package/dist/client/js/editor/markdown-shortcuts.d.ts +4 -0
  81. package/dist/client/js/editor/markdown-shortcuts.d.ts.map +1 -0
  82. package/dist/client/js/editor/markdown-shortcuts.js +219 -0
  83. package/dist/client/js/handlers/admin.d.ts +64 -0
  84. package/dist/client/js/handlers/admin.d.ts.map +1 -0
  85. package/dist/client/js/handlers/admin.js +186 -0
  86. package/dist/client/js/state/dialogs.svelte.d.ts +16 -0
  87. package/dist/client/js/state/dialogs.svelte.d.ts.map +1 -0
  88. package/dist/client/js/state/dialogs.svelte.js +28 -0
  89. package/dist/client/js/state/router.svelte.d.ts +44 -0
  90. package/dist/client/js/state/router.svelte.d.ts.map +1 -0
  91. package/dist/client/js/state/router.svelte.js +141 -0
  92. package/dist/client/js/state/schema.svelte.d.ts +51 -0
  93. package/dist/client/js/state/schema.svelte.d.ts.map +1 -0
  94. package/{src/client/js/state/schema.svelte.ts → dist/client/js/state/schema.svelte.js} +55 -70
  95. package/dist/client/js/state/state.svelte.d.ts +68 -0
  96. package/dist/client/js/state/state.svelte.d.ts.map +1 -0
  97. package/dist/client/js/state/state.svelte.js +300 -0
  98. package/dist/client/js/state/theme.svelte.d.ts +24 -0
  99. package/dist/client/js/state/theme.svelte.d.ts.map +1 -0
  100. package/{src/client/js/state/theme.svelte.ts → dist/client/js/state/theme.svelte.js} +54 -91
  101. package/dist/client/js/storage/adapter.d.ts +130 -0
  102. package/dist/client/js/storage/adapter.d.ts.map +1 -0
  103. package/dist/client/js/storage/adapter.js +5 -0
  104. package/dist/client/js/storage/client.d.ts +72 -0
  105. package/dist/client/js/storage/client.d.ts.map +1 -0
  106. package/dist/client/js/storage/client.js +121 -0
  107. package/dist/client/js/storage/db.d.ts +8 -0
  108. package/dist/client/js/storage/db.d.ts.map +1 -0
  109. package/dist/client/js/storage/db.js +35 -0
  110. package/dist/client/js/storage/fsa.d.ts +51 -0
  111. package/dist/client/js/storage/fsa.d.ts.map +1 -0
  112. package/dist/client/js/storage/fsa.js +91 -0
  113. package/dist/client/js/storage/github.d.ts +62 -0
  114. package/dist/client/js/storage/github.d.ts.map +1 -0
  115. package/dist/client/js/storage/github.js +216 -0
  116. package/dist/client/js/storage/storage.d.ts +32 -0
  117. package/dist/client/js/storage/storage.d.ts.map +1 -0
  118. package/dist/client/js/storage/storage.js +68 -0
  119. package/dist/client/js/storage/workers/frontmatter.d.ts +2 -0
  120. package/dist/client/js/storage/workers/frontmatter.d.ts.map +1 -0
  121. package/dist/client/js/storage/workers/frontmatter.js +253 -0
  122. package/dist/client/js/storage/workers/storage.d.ts +2 -0
  123. package/dist/client/js/storage/workers/storage.d.ts.map +1 -0
  124. package/dist/client/js/storage/workers/storage.js +167 -0
  125. package/dist/client/js/storage/workers/toml-parser.d.ts +2 -0
  126. package/dist/client/js/storage/workers/toml-parser.d.ts.map +1 -0
  127. package/dist/client/js/storage/workers/toml-parser.js +75 -0
  128. package/dist/client/js/storage/workers/yaml-parser.d.ts +2 -0
  129. package/dist/client/js/storage/workers/yaml-parser.d.ts.map +1 -0
  130. package/dist/client/js/storage/workers/yaml-parser.js +100 -0
  131. package/dist/client/js/utils/file-types.d.ts +58 -0
  132. package/dist/client/js/utils/file-types.d.ts.map +1 -0
  133. package/{src/client/js/utils/file-types.ts → dist/client/js/utils/file-types.js} +75 -107
  134. package/dist/client/js/utils/format.d.ts +8 -0
  135. package/dist/client/js/utils/format.d.ts.map +1 -0
  136. package/{src/client/js/utils/format.ts → dist/client/js/utils/format.js} +5 -6
  137. package/dist/client/js/utils/frontmatter.d.ts +12 -0
  138. package/dist/client/js/utils/frontmatter.d.ts.map +1 -0
  139. package/dist/client/js/utils/frontmatter.js +29 -0
  140. package/dist/client/js/utils/schema-utils.d.ts +110 -0
  141. package/dist/client/js/utils/schema-utils.d.ts.map +1 -0
  142. package/dist/client/js/utils/schema-utils.js +242 -0
  143. package/dist/client/js/utils/slug.d.ts +8 -0
  144. package/dist/client/js/utils/slug.d.ts.map +1 -0
  145. package/{src/client/js/utils/slug.ts → dist/client/js/utils/slug.js} +6 -7
  146. package/dist/client/js/utils/sort.d.ts +41 -0
  147. package/dist/client/js/utils/sort.d.ts.map +1 -0
  148. package/dist/client/js/utils/sort.js +65 -0
  149. package/dist/client/js/utils/stable-stringify.d.ts +8 -0
  150. package/dist/client/js/utils/stable-stringify.d.ts.map +1 -0
  151. package/dist/client/js/utils/stable-stringify.js +23 -0
  152. package/dist/client/js/utils/url-utils.d.ts +11 -0
  153. package/dist/client/js/utils/url-utils.d.ts.map +1 -0
  154. package/{src/client/js/utils/url-utils.ts → dist/client/js/utils/url-utils.js} +22 -23
  155. package/dist/client/types/browser-apis.d.ts +39 -0
  156. package/dist/types.d.ts +22 -0
  157. package/dist/types.d.ts.map +1 -0
  158. package/dist/types.js +1 -0
  159. package/package.json +13 -3
  160. package/.github/workflows/ci.yml +0 -27
  161. package/.github/workflows/publish.yml +0 -34
  162. package/.mcp.json +0 -12
  163. package/.prettierignore +0 -5
  164. package/.prettierrc.cjs +0 -22
  165. package/AGENTS.md +0 -183
  166. package/playground/astro.config.mjs +0 -7
  167. package/playground/node_modules/.bin/astro +0 -21
  168. package/playground/node_modules/.vite/deps/@astrojs_svelte_client__js.js +0 -85
  169. package/playground/node_modules/.vite/deps/@astrojs_svelte_client__js.js.map +0 -7
  170. package/playground/node_modules/.vite/deps/_metadata.json +0 -184
  171. package/playground/node_modules/.vite/deps/astro___aria-query.js +0 -6776
  172. package/playground/node_modules/.vite/deps/astro___aria-query.js.map +0 -7
  173. package/playground/node_modules/.vite/deps/astro___axobject-query.js +0 -3754
  174. package/playground/node_modules/.vite/deps/astro___axobject-query.js.map +0 -7
  175. package/playground/node_modules/.vite/deps/astro___html-escaper.js +0 -34
  176. package/playground/node_modules/.vite/deps/astro___html-escaper.js.map +0 -7
  177. package/playground/node_modules/.vite/deps/chunk-AJXJMYAF.js +0 -0
  178. package/playground/node_modules/.vite/deps/chunk-AJXJMYAF.js.map +0 -7
  179. package/playground/node_modules/.vite/deps/chunk-BUSYA2B4.js +0 -8
  180. package/playground/node_modules/.vite/deps/chunk-BUSYA2B4.js.map +0 -7
  181. package/playground/node_modules/.vite/deps/chunk-CNYJBM5F.js +0 -21
  182. package/playground/node_modules/.vite/deps/chunk-CNYJBM5F.js.map +0 -7
  183. package/playground/node_modules/.vite/deps/chunk-DBPNBGEI.js +0 -223
  184. package/playground/node_modules/.vite/deps/chunk-DBPNBGEI.js.map +0 -7
  185. package/playground/node_modules/.vite/deps/chunk-FPEUJ7DG.js +0 -27
  186. package/playground/node_modules/.vite/deps/chunk-FPEUJ7DG.js.map +0 -7
  187. package/playground/node_modules/.vite/deps/chunk-MHDZ3SK7.js +0 -1005
  188. package/playground/node_modules/.vite/deps/chunk-MHDZ3SK7.js.map +0 -7
  189. package/playground/node_modules/.vite/deps/chunk-RBDTDTPY.js +0 -204
  190. package/playground/node_modules/.vite/deps/chunk-RBDTDTPY.js.map +0 -7
  191. package/playground/node_modules/.vite/deps/chunk-RJGEXL5C.js +0 -688
  192. package/playground/node_modules/.vite/deps/chunk-RJGEXL5C.js.map +0 -7
  193. package/playground/node_modules/.vite/deps/chunk-YL4MIWGJ.js +0 -5099
  194. package/playground/node_modules/.vite/deps/chunk-YL4MIWGJ.js.map +0 -7
  195. package/playground/node_modules/.vite/deps/chunk-ZOV3DWEJ.js +0 -4376
  196. package/playground/node_modules/.vite/deps/chunk-ZOV3DWEJ.js.map +0 -7
  197. package/playground/node_modules/.vite/deps/chunk-ZP4UNCSN.js +0 -23
  198. package/playground/node_modules/.vite/deps/chunk-ZP4UNCSN.js.map +0 -7
  199. package/playground/node_modules/.vite/deps/chunk-ZREFNRZZ.js +0 -148
  200. package/playground/node_modules/.vite/deps/chunk-ZREFNRZZ.js.map +0 -7
  201. package/playground/node_modules/.vite/deps/package.json +0 -3
  202. package/playground/node_modules/.vite/deps/smol-toml.js +0 -843
  203. package/playground/node_modules/.vite/deps/smol-toml.js.map +0 -7
  204. package/playground/node_modules/.vite/deps/svelte.js +0 -55
  205. package/playground/node_modules/.vite/deps/svelte.js.map +0 -7
  206. package/playground/node_modules/.vite/deps/svelte___clsx.js +0 -9
  207. package/playground/node_modules/.vite/deps/svelte___clsx.js.map +0 -7
  208. package/playground/node_modules/.vite/deps/svelte_animate.js +0 -57
  209. package/playground/node_modules/.vite/deps/svelte_animate.js.map +0 -7
  210. package/playground/node_modules/.vite/deps/svelte_attachments.js +0 -15
  211. package/playground/node_modules/.vite/deps/svelte_attachments.js.map +0 -7
  212. package/playground/node_modules/.vite/deps/svelte_easing.js +0 -67
  213. package/playground/node_modules/.vite/deps/svelte_easing.js.map +0 -7
  214. package/playground/node_modules/.vite/deps/svelte_events.js +0 -11
  215. package/playground/node_modules/.vite/deps/svelte_events.js.map +0 -7
  216. package/playground/node_modules/.vite/deps/svelte_internal.js +0 -5
  217. package/playground/node_modules/.vite/deps/svelte_internal.js.map +0 -7
  218. package/playground/node_modules/.vite/deps/svelte_internal_client.js +0 -402
  219. package/playground/node_modules/.vite/deps/svelte_internal_client.js.map +0 -7
  220. package/playground/node_modules/.vite/deps/svelte_internal_disclose-version.js +0 -10
  221. package/playground/node_modules/.vite/deps/svelte_internal_disclose-version.js.map +0 -7
  222. package/playground/node_modules/.vite/deps/svelte_internal_flags_async.js +0 -8
  223. package/playground/node_modules/.vite/deps/svelte_internal_flags_async.js.map +0 -7
  224. package/playground/node_modules/.vite/deps/svelte_internal_flags_legacy.js +0 -8
  225. package/playground/node_modules/.vite/deps/svelte_internal_flags_legacy.js.map +0 -7
  226. package/playground/node_modules/.vite/deps/svelte_internal_flags_tracing.js +0 -8
  227. package/playground/node_modules/.vite/deps/svelte_internal_flags_tracing.js.map +0 -7
  228. package/playground/node_modules/.vite/deps/svelte_legacy.js +0 -35
  229. package/playground/node_modules/.vite/deps/svelte_legacy.js.map +0 -7
  230. package/playground/node_modules/.vite/deps/svelte_motion.js +0 -545
  231. package/playground/node_modules/.vite/deps/svelte_motion.js.map +0 -7
  232. package/playground/node_modules/.vite/deps/svelte_reactivity.js +0 -29
  233. package/playground/node_modules/.vite/deps/svelte_reactivity.js.map +0 -7
  234. package/playground/node_modules/.vite/deps/svelte_reactivity_window.js +0 -127
  235. package/playground/node_modules/.vite/deps/svelte_reactivity_window.js.map +0 -7
  236. package/playground/node_modules/.vite/deps/svelte_store.js +0 -103
  237. package/playground/node_modules/.vite/deps/svelte_store.js.map +0 -7
  238. package/playground/node_modules/.vite/deps/svelte_transition.js +0 -208
  239. package/playground/node_modules/.vite/deps/svelte_transition.js.map +0 -7
  240. package/playground/package.json +0 -16
  241. package/playground/pnpm-lock.yaml +0 -3167
  242. package/playground/src/content/authors/jane-doe.json +0 -8
  243. package/playground/src/content/config/build.toml +0 -2
  244. package/playground/src/content/courses/web-fundamentals.json +0 -29
  245. package/playground/src/content/docs/advanced.mdx +0 -6
  246. package/playground/src/content/docs/intro.md +0 -6
  247. package/playground/src/content/guides/getting-started.mdx +0 -6
  248. package/playground/src/content/posts/hello-world.md +0 -7
  249. package/playground/src/content/products/t-shirt.json +0 -16
  250. package/playground/src/content/recipes/pancakes.mdoc +0 -8
  251. package/playground/src/content/settings/site.yml +0 -2
  252. package/playground/src/content.config.ts +0 -198
  253. package/playground/src/env.d.ts +0 -1
  254. package/playground/src/pages/index.astro +0 -11
  255. package/playground/src/pages/nebula.astro +0 -14
  256. package/pnpm-workspace.yaml +0 -2
  257. package/scripts/subset-icons.mjs +0 -178
  258. package/src/astro/index.ts +0 -295
  259. package/src/client/js/drafts/merge.svelte.ts +0 -121
  260. package/src/client/js/drafts/ops.svelte.ts +0 -227
  261. package/src/client/js/drafts/storage.ts +0 -108
  262. package/src/client/js/drafts/workers/diff.ts +0 -40
  263. package/src/client/js/editor/editor.svelte.ts +0 -343
  264. package/src/client/js/editor/languages.ts +0 -98
  265. package/src/client/js/editor/markdown-shortcuts.ts +0 -261
  266. package/src/client/js/handlers/admin.ts +0 -246
  267. package/src/client/js/state/dialogs.svelte.ts +0 -35
  268. package/src/client/js/state/router.svelte.ts +0 -156
  269. package/src/client/js/state/state.svelte.ts +0 -334
  270. package/src/client/js/storage/adapter.ts +0 -102
  271. package/src/client/js/storage/client.ts +0 -150
  272. package/src/client/js/storage/db.ts +0 -36
  273. package/src/client/js/storage/fsa.ts +0 -110
  274. package/src/client/js/storage/github.ts +0 -297
  275. package/src/client/js/storage/storage.ts +0 -83
  276. package/src/client/js/storage/workers/frontmatter.ts +0 -320
  277. package/src/client/js/storage/workers/storage.ts +0 -177
  278. package/src/client/js/storage/workers/toml-parser.ts +0 -106
  279. package/src/client/js/storage/workers/yaml-parser.ts +0 -132
  280. package/src/client/js/utils/frontmatter.ts +0 -38
  281. package/src/client/js/utils/schema-utils.ts +0 -295
  282. package/src/client/js/utils/sort.ts +0 -84
  283. package/src/client/js/utils/stable-stringify.ts +0 -27
  284. package/src/types.ts +0 -25
  285. package/svelte.config.js +0 -4
  286. package/tests/astro/build.test.ts +0 -63
  287. package/tests/astro/index.test.ts +0 -689
  288. package/tests/client/components/Admin.test.ts +0 -446
  289. package/tests/client/components/BackendPicker.test.ts +0 -239
  290. package/tests/client/components/DraftChip.test.ts +0 -53
  291. package/tests/client/components/MetadataForm.test.ts +0 -164
  292. package/tests/client/components/dialogs/DeleteDraftDialog.test.ts +0 -91
  293. package/tests/client/components/dialogs/FilenameDialog.test.ts +0 -209
  294. package/tests/client/components/dialogs/dialog-stubs.ts +0 -19
  295. package/tests/client/components/editor/EditorPane.test.ts +0 -100
  296. package/tests/client/components/editor/EditorTabs.test.ts +0 -253
  297. package/tests/client/components/editor/EditorToolbar.test.ts +0 -252
  298. package/tests/client/components/editor/fixtures.ts +0 -31
  299. package/tests/client/components/fields/ArrayField.test.ts +0 -197
  300. package/tests/client/components/fields/BooleanField.test.ts +0 -206
  301. package/tests/client/components/fields/DateField.test.ts +0 -210
  302. package/tests/client/components/fields/EnumField.test.ts +0 -246
  303. package/tests/client/components/fields/NumberField.test.ts +0 -240
  304. package/tests/client/components/fields/ObjectField.test.ts +0 -157
  305. package/tests/client/components/fields/SchemaField.test.ts +0 -190
  306. package/tests/client/components/fields/StringField.test.ts +0 -223
  307. package/tests/client/components/sidebar/AdminSidebar.test.ts +0 -285
  308. package/tests/client/components/sidebar/AdminSidebarSort.test.ts +0 -135
  309. package/tests/client/components/sidebar/sort-mock.ts +0 -23
  310. package/tests/client/js/drafts/fixtures.ts +0 -22
  311. package/tests/client/js/drafts/merge.test.ts +0 -282
  312. package/tests/client/js/drafts/ops.test.ts +0 -658
  313. package/tests/client/js/drafts/storage.test.ts +0 -200
  314. package/tests/client/js/drafts/workers/diff.test.ts +0 -165
  315. package/tests/client/js/editor/editor.test.ts +0 -616
  316. package/tests/client/js/editor/link-wrap.test.ts +0 -225
  317. package/tests/client/js/editor/markdown-shortcuts.test.ts +0 -370
  318. package/tests/client/js/handlers/admin.test.ts +0 -467
  319. package/tests/client/js/state/router.test.ts +0 -619
  320. package/tests/client/js/state/schema.test.ts +0 -266
  321. package/tests/client/js/state/state.test.ts +0 -328
  322. package/tests/client/js/storage/adapter.test.ts +0 -115
  323. package/tests/client/js/storage/client.test.ts +0 -250
  324. package/tests/client/js/storage/db.test.ts +0 -59
  325. package/tests/client/js/storage/fsa.test.ts +0 -284
  326. package/tests/client/js/storage/github.test.ts +0 -349
  327. package/tests/client/js/storage/mock-port.ts +0 -95
  328. package/tests/client/js/storage/storage.test.ts +0 -77
  329. package/tests/client/js/storage/workers/frontmatter.test.ts +0 -479
  330. package/tests/client/js/storage/workers/storage.test.ts +0 -299
  331. package/tests/client/js/storage/workers/toml-parser.test.ts +0 -169
  332. package/tests/client/js/storage/workers/yaml-parser.test.ts +0 -168
  333. package/tests/client/js/utils/file-types.test.ts +0 -268
  334. package/tests/client/js/utils/frontmatter.test.ts +0 -87
  335. package/tests/client/js/utils/schema-utils.test.ts +0 -318
  336. package/tests/client/js/utils/slug.test.ts +0 -58
  337. package/tests/client/js/utils/sort.test.ts +0 -276
  338. package/tests/client/js/utils/stable-stringify.test.ts +0 -68
  339. package/tests/client/js/utils/url-utils.test.ts +0 -70
  340. package/tests/e2e/backend-connection.test.ts +0 -301
  341. package/tests/e2e/draft-lifecycle.test.ts +0 -388
  342. package/tests/e2e/editing.test.ts +0 -355
  343. package/tests/e2e/github-adapter.test.ts +0 -330
  344. package/tests/e2e/helpers/mock-adapter.ts +0 -166
  345. package/tests/e2e/helpers/test-app.ts +0 -155
  346. package/tests/e2e/navigation.test.ts +0 -358
  347. package/tests/e2e/publishing.test.ts +0 -345
  348. package/tests/e2e/unsaved-changes.test.ts +0 -317
  349. package/tests/setup.ts +0 -2
  350. package/tests/stubs/codemirror.ts +0 -197
  351. package/tsconfig.json +0 -19
  352. package/vitest.config.ts +0 -178
  353. /package/{src → dist}/client/components/BackendPicker.svelte +0 -0
  354. /package/{src → dist}/client/components/DraftChip.svelte +0 -0
  355. /package/{src → dist}/client/components/MetadataForm.svelte +0 -0
  356. /package/{src → dist}/client/components/ThemeToggle.svelte +0 -0
  357. /package/{src → dist}/client/components/dialogs/DeleteDraftDialog.svelte +0 -0
  358. /package/{src → dist}/client/components/editor/EditorPane.svelte +0 -0
  359. /package/{src → dist}/client/components/editor/EditorTabs.svelte +0 -0
  360. /package/{src → dist}/client/components/editor/EditorToolbar.svelte +0 -0
  361. /package/{src → dist}/client/components/editor/FormatSelector.svelte +0 -0
  362. /package/{src → dist}/client/components/editor/Toolbar.svelte +0 -0
  363. /package/{src → dist}/client/components/fields/ArrayField.svelte +0 -0
  364. /package/{src → dist}/client/components/fields/ArrayItem.svelte +0 -0
  365. /package/{src → dist}/client/components/fields/BooleanField.svelte +0 -0
  366. /package/{src → dist}/client/components/fields/DateField.svelte +0 -0
  367. /package/{src → dist}/client/components/fields/EnumField.svelte +0 -0
  368. /package/{src → dist}/client/components/fields/FieldWrapper.svelte +0 -0
  369. /package/{src → dist}/client/components/fields/NumberField.svelte +0 -0
  370. /package/{src → dist}/client/components/fields/ObjectField.svelte +0 -0
  371. /package/{src → dist}/client/components/fields/SchemaField.svelte +0 -0
  372. /package/{src → dist}/client/components/fields/StringField.svelte +0 -0
  373. /package/{src → dist}/client/components/sidebar/AdminSidebarSort.svelte +0 -0
  374. /package/{src → dist}/client/css/a11y.css +0 -0
  375. /package/{src → dist}/client/css/btn.css +0 -0
  376. /package/{src → dist}/client/css/dialog.css +0 -0
  377. /package/{src → dist}/client/css/field-input.css +0 -0
  378. /package/{src → dist}/client/css/reset.css +0 -0
  379. /package/{src → dist}/client/css/theme.css +0 -0
  380. /package/{src/client/index.ts → dist/client/index.js} +0 -0
  381. /package/{src → dist}/virtual.d.ts +0 -0
@@ -1,4376 +0,0 @@
1
- import {
2
- clsx
3
- } from "./chunk-CNYJBM5F.js";
4
- import {
5
- append,
6
- assign_nodes,
7
- can_delegate_event,
8
- createClassComponent,
9
- create_fragment_from_html,
10
- create_trusted_html,
11
- hash,
12
- is_capture_event,
13
- is_raw_text_element,
14
- is_void,
15
- normalize_attribute,
16
- sanitize_location,
17
- set_should_intro,
18
- should_intro
19
- } from "./chunk-MHDZ3SK7.js";
20
- import {
21
- create_event,
22
- delegate,
23
- delegated
24
- } from "./chunk-RBDTDTPY.js";
25
- import {
26
- ATTACHMENT_KEY,
27
- BLOCK_EFFECT,
28
- BRANCH_EFFECT,
29
- Batch,
30
- COMMENT_NODE,
31
- DESTROYED,
32
- DESTROYING,
33
- DOCUMENT_FRAGMENT_NODE,
34
- EACH_INDEX_REACTIVE,
35
- EACH_IS_ANIMATED,
36
- EACH_IS_CONTROLLED,
37
- EACH_ITEM_IMMUTABLE,
38
- EACH_ITEM_REACTIVE,
39
- EFFECT_OFFSCREEN,
40
- EFFECT_PRESERVED,
41
- EFFECT_TRANSPARENT,
42
- ELEMENT_NODE,
43
- FILENAME,
44
- HEAD_EFFECT,
45
- HMR,
46
- HYDRATION_END,
47
- HYDRATION_ERROR,
48
- HYDRATION_START,
49
- HYDRATION_START_ELSE,
50
- INERT,
51
- IS_XHTML,
52
- LEGACY_PROPS,
53
- LOADING_ATTR_SYMBOL,
54
- NAMESPACE_HTML,
55
- NAMESPACE_MATHML,
56
- NAMESPACE_SVG,
57
- PROPS_IS_BINDABLE,
58
- PROPS_IS_IMMUTABLE,
59
- PROPS_IS_LAZY_INITIAL,
60
- PROPS_IS_RUNES,
61
- PROPS_IS_UPDATED,
62
- REACTION_RAN,
63
- STATE_SYMBOL,
64
- TRANSITION_GLOBAL,
65
- TRANSITION_IN,
66
- TRANSITION_OUT,
67
- UNINITIALIZED,
68
- active_effect,
69
- active_reaction,
70
- add_form_reset_listener,
71
- array_from,
72
- autofocus,
73
- bind_invalid_checkbox_value,
74
- block,
75
- branch,
76
- capture,
77
- capture_store_binding,
78
- clear_text_content,
79
- component_api_changed,
80
- component_api_invalid_new,
81
- component_context,
82
- create_comment,
83
- create_element,
84
- create_text,
85
- current_batch,
86
- deep_read_state,
87
- define_property,
88
- derived2 as derived,
89
- derived_safe_equal,
90
- destroy_effect,
91
- dev_current_component_function,
92
- dev_stack,
93
- dynamic_void_element_content,
94
- each_key_duplicate,
95
- each_key_volatile,
96
- eager_effect,
97
- effect,
98
- effect_root,
99
- experimental_async_required,
100
- flatten,
101
- flushSync,
102
- get2 as get,
103
- get_abort_signal_outside_reaction,
104
- get_descriptor,
105
- get_descriptors,
106
- get_error,
107
- get_first_child,
108
- get_next_sibling,
109
- get_prototype_of,
110
- has_own_property,
111
- hydratable_missing_but_required,
112
- hydrate_next,
113
- hydrate_node,
114
- hydrating,
115
- increment_pending,
116
- internal_set,
117
- invalid_snippet,
118
- invalid_snippet_arguments,
119
- is,
120
- is_array,
121
- is_destroying_effect,
122
- is_flushing_sync,
123
- is_function,
124
- is_promise,
125
- is_runes,
126
- lifecycle_legacy_only,
127
- lifecycle_outside_component,
128
- listen,
129
- listen_to_event_and_reset_event,
130
- managed,
131
- move_effect,
132
- mutable_source,
133
- noop,
134
- object_keys,
135
- pause_effect,
136
- previous_batch,
137
- props_invalid_value,
138
- props_rest_readonly,
139
- proxy,
140
- queue_micro_task,
141
- read_hydration_instruction,
142
- remove_effect_dom,
143
- render_effect,
144
- reset,
145
- resume_effect,
146
- run,
147
- run_after_blockers,
148
- run_all,
149
- rune_outside_svelte,
150
- safe_not_equal,
151
- set,
152
- set_active_effect,
153
- set_active_reaction,
154
- set_dev_current_component_function,
155
- set_hydrate_node,
156
- set_hydrating,
157
- should_defer_append,
158
- skip_nodes,
159
- snapshot,
160
- snippet_without_render_tag,
161
- source,
162
- store_invalid_shape,
163
- svelte_element_invalid_this_value,
164
- teardown,
165
- template_effect,
166
- tick,
167
- unset_context,
168
- untrack,
169
- update,
170
- user_effect,
171
- user_pre_effect,
172
- validate_effect,
173
- without_reactive_context
174
- } from "./chunk-YL4MIWGJ.js";
175
- import {
176
- assignment_value_stale,
177
- binding_property_non_reactive,
178
- console_log_state,
179
- hydratable_missing_but_expected,
180
- hydration_attribute_changed,
181
- hydration_html_changed,
182
- hydration_mismatch,
183
- invalid_raw_snippet_render,
184
- ownership_invalid_binding,
185
- ownership_invalid_mutation,
186
- select_multiple_invalid_value,
187
- true_default
188
- } from "./chunk-DBPNBGEI.js";
189
- import {
190
- async_mode_flag,
191
- legacy_mode_flag
192
- } from "./chunk-ZP4UNCSN.js";
193
-
194
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dev/assign.js
195
- function compare(a, b, property, location) {
196
- if (a !== b && typeof b === "object" && STATE_SYMBOL in b) {
197
- assignment_value_stale(
198
- property,
199
- /** @type {string} */
200
- sanitize_location(location)
201
- );
202
- }
203
- return a;
204
- }
205
- function assign(object, property, operator, rhs, location) {
206
- return compare(
207
- operator === "=" ? object[property] = rhs : operator === "&&=" ? object[property] &&= rhs() : operator === "||=" ? object[property] ||= rhs() : operator === "??=" ? object[property] ??= rhs() : null,
208
- untrack(() => object[property]),
209
- property,
210
- location
211
- );
212
- }
213
- async function assign_async(object, property, operator, rhs, location) {
214
- return compare(
215
- operator === "=" ? object[property] = await rhs : operator === "&&=" ? object[property] &&= await rhs() : operator === "||=" ? object[property] ||= await rhs() : operator === "??=" ? object[property] ??= await rhs() : null,
216
- untrack(() => object[property]),
217
- property,
218
- location
219
- );
220
- }
221
-
222
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dev/css.js
223
- var all_styles = /* @__PURE__ */ new Map();
224
- function register_style(hash2, style) {
225
- var styles = all_styles.get(hash2);
226
- if (!styles) {
227
- styles = /* @__PURE__ */ new Set();
228
- all_styles.set(hash2, styles);
229
- }
230
- styles.add(style);
231
- }
232
- function cleanup_styles(hash2) {
233
- var styles = all_styles.get(hash2);
234
- if (!styles) return;
235
- for (const style of styles) {
236
- style.remove();
237
- }
238
- all_styles.delete(hash2);
239
- }
240
-
241
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dev/elements.js
242
- function add_locations(fn, filename, locations) {
243
- return (...args) => {
244
- const dom = fn(...args);
245
- var node = hydrating ? dom : dom.nodeType === DOCUMENT_FRAGMENT_NODE ? dom.firstChild : dom;
246
- assign_locations(node, filename, locations);
247
- return dom;
248
- };
249
- }
250
- function assign_location(element2, filename, location) {
251
- element2.__svelte_meta = {
252
- parent: dev_stack,
253
- loc: { file: filename, line: location[0], column: location[1] }
254
- };
255
- if (location[2]) {
256
- assign_locations(element2.firstChild, filename, location[2]);
257
- }
258
- }
259
- function assign_locations(node, filename, locations) {
260
- var i = 0;
261
- var depth = 0;
262
- while (node && i < locations.length) {
263
- if (hydrating && node.nodeType === COMMENT_NODE) {
264
- var comment2 = (
265
- /** @type {Comment} */
266
- node
267
- );
268
- if (comment2.data[0] === HYDRATION_START) depth += 1;
269
- else if (comment2.data[0] === HYDRATION_END) depth -= 1;
270
- }
271
- if (depth === 0 && node.nodeType === ELEMENT_NODE) {
272
- assign_location(
273
- /** @type {Element} */
274
- node,
275
- filename,
276
- locations[i++]
277
- );
278
- }
279
- node = node.nextSibling;
280
- }
281
- }
282
-
283
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dev/hmr.js
284
- function hmr(fn) {
285
- const current = source(fn);
286
- function wrapper(anchor, props) {
287
- let component2 = {};
288
- let instance = {};
289
- let effect2;
290
- let ran = false;
291
- let start = create_comment();
292
- let end = create_comment();
293
- if (!hydrating) {
294
- anchor.before(start);
295
- }
296
- block(() => {
297
- if (component2 === (component2 = get(current))) {
298
- return;
299
- }
300
- if (effect2) {
301
- for (var k in instance) delete instance[k];
302
- destroy_effect(effect2);
303
- }
304
- effect2 = branch(() => {
305
- if (ran) set_should_intro(false);
306
- var result = (
307
- // @ts-expect-error
308
- new.target ? new component2(anchor, props) : component2(anchor, props)
309
- );
310
- if (result) {
311
- Object.defineProperties(instance, Object.getOwnPropertyDescriptors(result));
312
- }
313
- if (ran) set_should_intro(true);
314
- });
315
- }, EFFECT_TRANSPARENT);
316
- ran = true;
317
- if (hydrating) {
318
- anchor.before(start);
319
- anchor = hydrate_node;
320
- }
321
- anchor.before(end);
322
- assign_nodes(start, end);
323
- return instance;
324
- }
325
- wrapper[FILENAME] = fn[FILENAME];
326
- wrapper[HMR] = {
327
- fn,
328
- current,
329
- update: (incoming) => {
330
- set(wrapper[HMR].current, incoming[HMR].fn);
331
- incoming[HMR].current = wrapper[HMR].current;
332
- }
333
- };
334
- return wrapper;
335
- }
336
-
337
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dev/ownership.js
338
- function create_ownership_validator(props) {
339
- const component2 = component_context?.function;
340
- const parent = component_context?.p?.function;
341
- return {
342
- /**
343
- * @param {string} prop
344
- * @param {any[]} path
345
- * @param {any} result
346
- * @param {number} line
347
- * @param {number} column
348
- */
349
- mutation: (prop2, path, result, line, column) => {
350
- const name = path[0];
351
- if (is_bound_or_unset(props, name) || !parent) {
352
- return result;
353
- }
354
- let value = props;
355
- for (let i = 0; i < path.length - 1; i++) {
356
- value = value[path[i]];
357
- if (!value?.[STATE_SYMBOL]) {
358
- return result;
359
- }
360
- }
361
- const location = sanitize_location(`${component2[FILENAME]}:${line}:${column}`);
362
- ownership_invalid_mutation(name, location, prop2, parent[FILENAME]);
363
- return result;
364
- },
365
- /**
366
- * @param {any} key
367
- * @param {any} child_component
368
- * @param {() => any} value
369
- */
370
- binding: (key2, child_component, value) => {
371
- if (!is_bound_or_unset(props, key2) && parent && value()?.[STATE_SYMBOL]) {
372
- ownership_invalid_binding(
373
- component2[FILENAME],
374
- key2,
375
- child_component[FILENAME],
376
- parent[FILENAME]
377
- );
378
- }
379
- }
380
- };
381
- }
382
- function is_bound_or_unset(props, prop_name) {
383
- const is_entry_props = STATE_SYMBOL in props || LEGACY_PROPS in props;
384
- return !!get_descriptor(props, prop_name)?.set || is_entry_props && prop_name in props || !(prop_name in props);
385
- }
386
-
387
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dev/legacy.js
388
- function check_target(target) {
389
- if (target) {
390
- component_api_invalid_new(target[FILENAME] ?? "a component", target.name);
391
- }
392
- }
393
- function legacy_api() {
394
- const component2 = component_context?.function;
395
- function error(method) {
396
- component_api_changed(method, component2[FILENAME]);
397
- }
398
- return {
399
- $destroy: () => error("$destroy()"),
400
- $on: () => error("$on(...)"),
401
- $set: () => error("$set(...)")
402
- };
403
- }
404
-
405
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dev/inspect.js
406
- function inspect(get_value, inspector, show_stack = false) {
407
- validate_effect("$inspect");
408
- let initial = true;
409
- let error = (
410
- /** @type {any} */
411
- UNINITIALIZED
412
- );
413
- eager_effect(() => {
414
- try {
415
- var value = get_value();
416
- } catch (e) {
417
- error = e;
418
- return;
419
- }
420
- var snap = snapshot(value, true, true);
421
- untrack(() => {
422
- if (show_stack) {
423
- inspector(...snap);
424
- if (!initial) {
425
- const stack = get_error("$inspect(...)");
426
- if (stack) {
427
- console.groupCollapsed("stack trace");
428
- console.log(stack);
429
- console.groupEnd();
430
- }
431
- }
432
- } else {
433
- inspector(initial ? "init" : "update", ...snap);
434
- }
435
- });
436
- initial = false;
437
- });
438
- render_effect(() => {
439
- try {
440
- get_value();
441
- } catch {
442
- }
443
- if (error !== UNINITIALIZED) {
444
- console.error(error);
445
- error = UNINITIALIZED;
446
- }
447
- });
448
- }
449
-
450
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/blocks/async.js
451
- function async(node, blockers = [], expressions = [], fn) {
452
- var was_hydrating = hydrating;
453
- var end = null;
454
- if (was_hydrating) {
455
- hydrate_next();
456
- end = skip_nodes(false);
457
- }
458
- if (expressions.length === 0 && blockers.every((b) => b.settled)) {
459
- fn(node);
460
- if (was_hydrating) {
461
- set_hydrate_node(end);
462
- }
463
- return;
464
- }
465
- const decrement_pending = increment_pending();
466
- if (was_hydrating) {
467
- var previous_hydrate_node = hydrate_node;
468
- set_hydrate_node(end);
469
- }
470
- flatten(blockers, [], expressions, (values) => {
471
- if (was_hydrating) {
472
- set_hydrating(true);
473
- set_hydrate_node(previous_hydrate_node);
474
- }
475
- try {
476
- for (const d of values) get(d);
477
- fn(node, ...values);
478
- } finally {
479
- if (was_hydrating) {
480
- set_hydrating(false);
481
- }
482
- decrement_pending();
483
- }
484
- });
485
- }
486
-
487
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dev/validation.js
488
- function validate_snippet_args(anchor, ...args) {
489
- if (typeof anchor !== "object" || !(anchor instanceof Node)) {
490
- invalid_snippet_arguments();
491
- }
492
- for (let arg of args) {
493
- if (typeof arg !== "function") {
494
- invalid_snippet_arguments();
495
- }
496
- }
497
- }
498
-
499
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/blocks/branches.js
500
- var BranchManager = class {
501
- /** @type {TemplateNode} */
502
- anchor;
503
- /** @type {Map<Batch, Key>} */
504
- #batches = /* @__PURE__ */ new Map();
505
- /**
506
- * Map of keys to effects that are currently rendered in the DOM.
507
- * These effects are visible and actively part of the document tree.
508
- * Example:
509
- * ```
510
- * {#if condition}
511
- * foo
512
- * {:else}
513
- * bar
514
- * {/if}
515
- * ```
516
- * Can result in the entries `true->Effect` and `false->Effect`
517
- * @type {Map<Key, Effect>}
518
- */
519
- #onscreen = /* @__PURE__ */ new Map();
520
- /**
521
- * Similar to #onscreen with respect to the keys, but contains branches that are not yet
522
- * in the DOM, because their insertion is deferred.
523
- * @type {Map<Key, Branch>}
524
- */
525
- #offscreen = /* @__PURE__ */ new Map();
526
- /**
527
- * Keys of effects that are currently outroing
528
- * @type {Set<Key>}
529
- */
530
- #outroing = /* @__PURE__ */ new Set();
531
- /**
532
- * Whether to pause (i.e. outro) on change, or destroy immediately.
533
- * This is necessary for `<svelte:element>`
534
- */
535
- #transition = true;
536
- /**
537
- * @param {TemplateNode} anchor
538
- * @param {boolean} transition
539
- */
540
- constructor(anchor, transition2 = true) {
541
- this.anchor = anchor;
542
- this.#transition = transition2;
543
- }
544
- /**
545
- * @param {Batch} batch
546
- */
547
- #commit = (batch) => {
548
- if (!this.#batches.has(batch)) return;
549
- var key2 = (
550
- /** @type {Key} */
551
- this.#batches.get(batch)
552
- );
553
- var onscreen = this.#onscreen.get(key2);
554
- if (onscreen) {
555
- resume_effect(onscreen);
556
- this.#outroing.delete(key2);
557
- } else {
558
- var offscreen = this.#offscreen.get(key2);
559
- if (offscreen) {
560
- this.#onscreen.set(key2, offscreen.effect);
561
- this.#offscreen.delete(key2);
562
- offscreen.fragment.lastChild.remove();
563
- this.anchor.before(offscreen.fragment);
564
- onscreen = offscreen.effect;
565
- }
566
- }
567
- for (const [b, k] of this.#batches) {
568
- this.#batches.delete(b);
569
- if (b === batch) {
570
- break;
571
- }
572
- const offscreen2 = this.#offscreen.get(k);
573
- if (offscreen2) {
574
- destroy_effect(offscreen2.effect);
575
- this.#offscreen.delete(k);
576
- }
577
- }
578
- for (const [k, effect2] of this.#onscreen) {
579
- if (k === key2 || this.#outroing.has(k)) continue;
580
- const on_destroy = () => {
581
- const keys = Array.from(this.#batches.values());
582
- if (keys.includes(k)) {
583
- var fragment = document.createDocumentFragment();
584
- move_effect(effect2, fragment);
585
- fragment.append(create_text());
586
- this.#offscreen.set(k, { effect: effect2, fragment });
587
- } else {
588
- destroy_effect(effect2);
589
- }
590
- this.#outroing.delete(k);
591
- this.#onscreen.delete(k);
592
- };
593
- if (this.#transition || !onscreen) {
594
- this.#outroing.add(k);
595
- pause_effect(effect2, on_destroy, false);
596
- } else {
597
- on_destroy();
598
- }
599
- }
600
- };
601
- /**
602
- * @param {Batch} batch
603
- */
604
- #discard = (batch) => {
605
- this.#batches.delete(batch);
606
- const keys = Array.from(this.#batches.values());
607
- for (const [k, branch2] of this.#offscreen) {
608
- if (!keys.includes(k)) {
609
- destroy_effect(branch2.effect);
610
- this.#offscreen.delete(k);
611
- }
612
- }
613
- };
614
- /**
615
- *
616
- * @param {any} key
617
- * @param {null | ((target: TemplateNode) => void)} fn
618
- */
619
- ensure(key2, fn) {
620
- var batch = (
621
- /** @type {Batch} */
622
- current_batch
623
- );
624
- var defer = should_defer_append();
625
- if (fn && !this.#onscreen.has(key2) && !this.#offscreen.has(key2)) {
626
- if (defer) {
627
- var fragment = document.createDocumentFragment();
628
- var target = create_text();
629
- fragment.append(target);
630
- this.#offscreen.set(key2, {
631
- effect: branch(() => fn(target)),
632
- fragment
633
- });
634
- } else {
635
- this.#onscreen.set(
636
- key2,
637
- branch(() => fn(this.anchor))
638
- );
639
- }
640
- }
641
- this.#batches.set(batch, key2);
642
- if (defer) {
643
- for (const [k, effect2] of this.#onscreen) {
644
- if (k === key2) {
645
- batch.unskip_effect(effect2);
646
- } else {
647
- batch.skip_effect(effect2);
648
- }
649
- }
650
- for (const [k, branch2] of this.#offscreen) {
651
- if (k === key2) {
652
- batch.unskip_effect(branch2.effect);
653
- } else {
654
- batch.skip_effect(branch2.effect);
655
- }
656
- }
657
- batch.oncommit(this.#commit);
658
- batch.ondiscard(this.#discard);
659
- } else {
660
- if (hydrating) {
661
- this.anchor = hydrate_node;
662
- }
663
- this.#commit(batch);
664
- }
665
- }
666
- };
667
-
668
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/blocks/await.js
669
- var PENDING = 0;
670
- var THEN = 1;
671
- var CATCH = 2;
672
- function await_block(node, get_input, pending_fn, then_fn, catch_fn) {
673
- if (hydrating) {
674
- hydrate_next();
675
- }
676
- var runes = is_runes();
677
- var v = (
678
- /** @type {V} */
679
- UNINITIALIZED
680
- );
681
- var value = runes ? source(v) : mutable_source(v, false, false);
682
- var error = runes ? source(v) : mutable_source(v, false, false);
683
- var branches = new BranchManager(node);
684
- block(() => {
685
- var batch = (
686
- /** @type {Batch} */
687
- current_batch
688
- );
689
- batch.deactivate();
690
- var input = get_input();
691
- batch.activate();
692
- var destroyed = false;
693
- let mismatch = hydrating && is_promise(input) === (node.data === HYDRATION_START_ELSE);
694
- if (mismatch) {
695
- set_hydrate_node(skip_nodes());
696
- set_hydrating(false);
697
- }
698
- if (is_promise(input)) {
699
- var restore = capture();
700
- var resolved = false;
701
- const resolve = (fn) => {
702
- if (destroyed) return;
703
- resolved = true;
704
- restore(false);
705
- Batch.ensure();
706
- if (hydrating) {
707
- set_hydrating(false);
708
- }
709
- try {
710
- fn();
711
- } finally {
712
- unset_context(false);
713
- if (!is_flushing_sync) flushSync();
714
- }
715
- };
716
- input.then(
717
- (v2) => {
718
- resolve(() => {
719
- internal_set(value, v2);
720
- branches.ensure(THEN, then_fn && ((target) => then_fn(target, value)));
721
- });
722
- },
723
- (e) => {
724
- resolve(() => {
725
- internal_set(error, e);
726
- branches.ensure(CATCH, catch_fn && ((target) => catch_fn(target, error)));
727
- if (!catch_fn) {
728
- throw error.v;
729
- }
730
- });
731
- }
732
- );
733
- if (hydrating) {
734
- branches.ensure(PENDING, pending_fn);
735
- } else {
736
- queue_micro_task(() => {
737
- if (!resolved) {
738
- resolve(() => {
739
- branches.ensure(PENDING, pending_fn);
740
- });
741
- }
742
- });
743
- }
744
- } else {
745
- internal_set(value, input);
746
- branches.ensure(THEN, then_fn && ((target) => then_fn(target, value)));
747
- }
748
- if (mismatch) {
749
- set_hydrating(true);
750
- }
751
- return () => {
752
- destroyed = true;
753
- };
754
- });
755
- }
756
-
757
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/blocks/if.js
758
- function if_block(node, fn, elseif = false) {
759
- var marker;
760
- if (hydrating) {
761
- marker = hydrate_node;
762
- hydrate_next();
763
- }
764
- var branches = new BranchManager(node);
765
- var flags = elseif ? EFFECT_TRANSPARENT : 0;
766
- function update_branch(key2, fn2) {
767
- if (hydrating) {
768
- var data = read_hydration_instruction(
769
- /** @type {TemplateNode} */
770
- marker
771
- );
772
- if (key2 !== parseInt(data.substring(1))) {
773
- var anchor = skip_nodes();
774
- set_hydrate_node(anchor);
775
- branches.anchor = anchor;
776
- set_hydrating(false);
777
- branches.ensure(key2, fn2);
778
- set_hydrating(true);
779
- return;
780
- }
781
- }
782
- branches.ensure(key2, fn2);
783
- }
784
- block(() => {
785
- var has_branch = false;
786
- fn((fn2, key2 = 0) => {
787
- has_branch = true;
788
- update_branch(key2, fn2);
789
- });
790
- if (!has_branch) {
791
- update_branch(-1, null);
792
- }
793
- }, flags);
794
- }
795
-
796
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/blocks/key.js
797
- var NAN = /* @__PURE__ */ Symbol("NaN");
798
- function key(node, get_key, render_fn) {
799
- if (hydrating) {
800
- hydrate_next();
801
- }
802
- var branches = new BranchManager(node);
803
- var legacy = !is_runes();
804
- block(() => {
805
- var key2 = get_key();
806
- if (key2 !== key2) {
807
- key2 = /** @type {any} */
808
- NAN;
809
- }
810
- if (legacy && key2 !== null && typeof key2 === "object") {
811
- key2 = /** @type {V} */
812
- {};
813
- }
814
- branches.ensure(key2, render_fn);
815
- });
816
- }
817
-
818
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/blocks/css-props.js
819
- function css_props(element2, get_styles) {
820
- if (hydrating) {
821
- set_hydrate_node(get_first_child(element2));
822
- }
823
- render_effect(() => {
824
- var styles = get_styles();
825
- for (var key2 in styles) {
826
- var value = styles[key2];
827
- if (value) {
828
- element2.style.setProperty(key2, value);
829
- } else {
830
- element2.style.removeProperty(key2);
831
- }
832
- }
833
- });
834
- }
835
-
836
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/blocks/each.js
837
- function index(_, i) {
838
- return i;
839
- }
840
- function pause_effects(state2, to_destroy, controlled_anchor) {
841
- var transitions = [];
842
- var length = to_destroy.length;
843
- var group;
844
- var remaining = to_destroy.length;
845
- for (var i = 0; i < length; i++) {
846
- let effect2 = to_destroy[i];
847
- pause_effect(
848
- effect2,
849
- () => {
850
- if (group) {
851
- group.pending.delete(effect2);
852
- group.done.add(effect2);
853
- if (group.pending.size === 0) {
854
- var groups = (
855
- /** @type {Set<EachOutroGroup>} */
856
- state2.outrogroups
857
- );
858
- destroy_effects(state2, array_from(group.done));
859
- groups.delete(group);
860
- if (groups.size === 0) {
861
- state2.outrogroups = null;
862
- }
863
- }
864
- } else {
865
- remaining -= 1;
866
- }
867
- },
868
- false
869
- );
870
- }
871
- if (remaining === 0) {
872
- var fast_path = transitions.length === 0 && controlled_anchor !== null;
873
- if (fast_path) {
874
- var anchor = (
875
- /** @type {Element} */
876
- controlled_anchor
877
- );
878
- var parent_node = (
879
- /** @type {Element} */
880
- anchor.parentNode
881
- );
882
- clear_text_content(parent_node);
883
- parent_node.append(anchor);
884
- state2.items.clear();
885
- }
886
- destroy_effects(state2, to_destroy, !fast_path);
887
- } else {
888
- group = {
889
- pending: new Set(to_destroy),
890
- done: /* @__PURE__ */ new Set()
891
- };
892
- (state2.outrogroups ??= /* @__PURE__ */ new Set()).add(group);
893
- }
894
- }
895
- function destroy_effects(state2, to_destroy, remove_dom = true) {
896
- var preserved_effects;
897
- if (state2.pending.size > 0) {
898
- preserved_effects = /* @__PURE__ */ new Set();
899
- for (const keys of state2.pending.values()) {
900
- for (const key2 of keys) {
901
- preserved_effects.add(
902
- /** @type {EachItem} */
903
- state2.items.get(key2).e
904
- );
905
- }
906
- }
907
- }
908
- for (var i = 0; i < to_destroy.length; i++) {
909
- var e = to_destroy[i];
910
- if (preserved_effects?.has(e)) {
911
- e.f |= EFFECT_OFFSCREEN;
912
- const fragment = document.createDocumentFragment();
913
- move_effect(e, fragment);
914
- } else {
915
- destroy_effect(to_destroy[i], remove_dom);
916
- }
917
- }
918
- }
919
- var offscreen_anchor;
920
- function each(node, flags, get_collection, get_key, render_fn, fallback_fn = null) {
921
- var anchor = node;
922
- var items = /* @__PURE__ */ new Map();
923
- var is_controlled = (flags & EACH_IS_CONTROLLED) !== 0;
924
- if (is_controlled) {
925
- var parent_node = (
926
- /** @type {Element} */
927
- node
928
- );
929
- anchor = hydrating ? set_hydrate_node(get_first_child(parent_node)) : parent_node.appendChild(create_text());
930
- }
931
- if (hydrating) {
932
- hydrate_next();
933
- }
934
- var fallback2 = null;
935
- var each_array = derived_safe_equal(() => {
936
- var collection = get_collection();
937
- return is_array(collection) ? collection : collection == null ? [] : array_from(collection);
938
- });
939
- var array;
940
- var pending3 = /* @__PURE__ */ new Map();
941
- var first_run = true;
942
- function commit(batch) {
943
- if ((state2.effect.f & DESTROYED) !== 0) {
944
- return;
945
- }
946
- state2.pending.delete(batch);
947
- state2.fallback = fallback2;
948
- reconcile(state2, array, anchor, flags, get_key);
949
- if (fallback2 !== null) {
950
- if (array.length === 0) {
951
- if ((fallback2.f & EFFECT_OFFSCREEN) === 0) {
952
- resume_effect(fallback2);
953
- } else {
954
- fallback2.f ^= EFFECT_OFFSCREEN;
955
- move(fallback2, null, anchor);
956
- }
957
- } else {
958
- pause_effect(fallback2, () => {
959
- fallback2 = null;
960
- });
961
- }
962
- }
963
- }
964
- function discard(batch) {
965
- state2.pending.delete(batch);
966
- }
967
- var effect2 = block(() => {
968
- array = /** @type {V[]} */
969
- get(each_array);
970
- var length = array.length;
971
- let mismatch = false;
972
- if (hydrating) {
973
- var is_else = read_hydration_instruction(anchor) === HYDRATION_START_ELSE;
974
- if (is_else !== (length === 0)) {
975
- anchor = skip_nodes();
976
- set_hydrate_node(anchor);
977
- set_hydrating(false);
978
- mismatch = true;
979
- }
980
- }
981
- var keys = /* @__PURE__ */ new Set();
982
- var batch = (
983
- /** @type {Batch} */
984
- current_batch
985
- );
986
- var defer = should_defer_append();
987
- for (var index2 = 0; index2 < length; index2 += 1) {
988
- if (hydrating && hydrate_node.nodeType === COMMENT_NODE && /** @type {Comment} */
989
- hydrate_node.data === HYDRATION_END) {
990
- anchor = /** @type {Comment} */
991
- hydrate_node;
992
- mismatch = true;
993
- set_hydrating(false);
994
- }
995
- var value = array[index2];
996
- var key2 = get_key(value, index2);
997
- if (true_default) {
998
- var key_again = get_key(value, index2);
999
- if (key2 !== key_again) {
1000
- each_key_volatile(String(index2), String(key2), String(key_again));
1001
- }
1002
- }
1003
- var item = first_run ? null : items.get(key2);
1004
- if (item) {
1005
- if (item.v) internal_set(item.v, value);
1006
- if (item.i) internal_set(item.i, index2);
1007
- if (defer) {
1008
- batch.unskip_effect(item.e);
1009
- }
1010
- } else {
1011
- item = create_item(
1012
- items,
1013
- first_run ? anchor : offscreen_anchor ??= create_text(),
1014
- value,
1015
- key2,
1016
- index2,
1017
- render_fn,
1018
- flags,
1019
- get_collection
1020
- );
1021
- if (!first_run) {
1022
- item.e.f |= EFFECT_OFFSCREEN;
1023
- }
1024
- items.set(key2, item);
1025
- }
1026
- keys.add(key2);
1027
- }
1028
- if (length === 0 && fallback_fn && !fallback2) {
1029
- if (first_run) {
1030
- fallback2 = branch(() => fallback_fn(anchor));
1031
- } else {
1032
- fallback2 = branch(() => fallback_fn(offscreen_anchor ??= create_text()));
1033
- fallback2.f |= EFFECT_OFFSCREEN;
1034
- }
1035
- }
1036
- if (length > keys.size) {
1037
- if (true_default) {
1038
- validate_each_keys(array, get_key);
1039
- } else {
1040
- each_key_duplicate("", "", "");
1041
- }
1042
- }
1043
- if (hydrating && length > 0) {
1044
- set_hydrate_node(skip_nodes());
1045
- }
1046
- if (!first_run) {
1047
- pending3.set(batch, keys);
1048
- if (defer) {
1049
- for (const [key3, item2] of items) {
1050
- if (!keys.has(key3)) {
1051
- batch.skip_effect(item2.e);
1052
- }
1053
- }
1054
- batch.oncommit(commit);
1055
- batch.ondiscard(discard);
1056
- } else {
1057
- commit(batch);
1058
- }
1059
- }
1060
- if (mismatch) {
1061
- set_hydrating(true);
1062
- }
1063
- get(each_array);
1064
- });
1065
- var state2 = { effect: effect2, flags, items, pending: pending3, outrogroups: null, fallback: fallback2 };
1066
- first_run = false;
1067
- if (hydrating) {
1068
- anchor = hydrate_node;
1069
- }
1070
- }
1071
- function skip_to_branch(effect2) {
1072
- while (effect2 !== null && (effect2.f & BRANCH_EFFECT) === 0) {
1073
- effect2 = effect2.next;
1074
- }
1075
- return effect2;
1076
- }
1077
- function reconcile(state2, array, anchor, flags, get_key) {
1078
- var is_animated = (flags & EACH_IS_ANIMATED) !== 0;
1079
- var length = array.length;
1080
- var items = state2.items;
1081
- var current = skip_to_branch(state2.effect.first);
1082
- var seen;
1083
- var prev = null;
1084
- var to_animate;
1085
- var matched = [];
1086
- var stashed = [];
1087
- var value;
1088
- var key2;
1089
- var effect2;
1090
- var i;
1091
- if (is_animated) {
1092
- for (i = 0; i < length; i += 1) {
1093
- value = array[i];
1094
- key2 = get_key(value, i);
1095
- effect2 = /** @type {EachItem} */
1096
- items.get(key2).e;
1097
- if ((effect2.f & EFFECT_OFFSCREEN) === 0) {
1098
- effect2.nodes?.a?.measure();
1099
- (to_animate ??= /* @__PURE__ */ new Set()).add(effect2);
1100
- }
1101
- }
1102
- }
1103
- for (i = 0; i < length; i += 1) {
1104
- value = array[i];
1105
- key2 = get_key(value, i);
1106
- effect2 = /** @type {EachItem} */
1107
- items.get(key2).e;
1108
- if (state2.outrogroups !== null) {
1109
- for (const group of state2.outrogroups) {
1110
- group.pending.delete(effect2);
1111
- group.done.delete(effect2);
1112
- }
1113
- }
1114
- if ((effect2.f & INERT) !== 0) {
1115
- resume_effect(effect2);
1116
- if (is_animated) {
1117
- effect2.nodes?.a?.unfix();
1118
- (to_animate ??= /* @__PURE__ */ new Set()).delete(effect2);
1119
- }
1120
- }
1121
- if ((effect2.f & EFFECT_OFFSCREEN) !== 0) {
1122
- effect2.f ^= EFFECT_OFFSCREEN;
1123
- if (effect2 === current) {
1124
- move(effect2, null, anchor);
1125
- } else {
1126
- var next2 = prev ? prev.next : current;
1127
- if (effect2 === state2.effect.last) {
1128
- state2.effect.last = effect2.prev;
1129
- }
1130
- if (effect2.prev) effect2.prev.next = effect2.next;
1131
- if (effect2.next) effect2.next.prev = effect2.prev;
1132
- link(state2, prev, effect2);
1133
- link(state2, effect2, next2);
1134
- move(effect2, next2, anchor);
1135
- prev = effect2;
1136
- matched = [];
1137
- stashed = [];
1138
- current = skip_to_branch(prev.next);
1139
- continue;
1140
- }
1141
- }
1142
- if (effect2 !== current) {
1143
- if (seen !== void 0 && seen.has(effect2)) {
1144
- if (matched.length < stashed.length) {
1145
- var start = stashed[0];
1146
- var j;
1147
- prev = start.prev;
1148
- var a = matched[0];
1149
- var b = matched[matched.length - 1];
1150
- for (j = 0; j < matched.length; j += 1) {
1151
- move(matched[j], start, anchor);
1152
- }
1153
- for (j = 0; j < stashed.length; j += 1) {
1154
- seen.delete(stashed[j]);
1155
- }
1156
- link(state2, a.prev, b.next);
1157
- link(state2, prev, a);
1158
- link(state2, b, start);
1159
- current = start;
1160
- prev = b;
1161
- i -= 1;
1162
- matched = [];
1163
- stashed = [];
1164
- } else {
1165
- seen.delete(effect2);
1166
- move(effect2, current, anchor);
1167
- link(state2, effect2.prev, effect2.next);
1168
- link(state2, effect2, prev === null ? state2.effect.first : prev.next);
1169
- link(state2, prev, effect2);
1170
- prev = effect2;
1171
- }
1172
- continue;
1173
- }
1174
- matched = [];
1175
- stashed = [];
1176
- while (current !== null && current !== effect2) {
1177
- (seen ??= /* @__PURE__ */ new Set()).add(current);
1178
- stashed.push(current);
1179
- current = skip_to_branch(current.next);
1180
- }
1181
- if (current === null) {
1182
- continue;
1183
- }
1184
- }
1185
- if ((effect2.f & EFFECT_OFFSCREEN) === 0) {
1186
- matched.push(effect2);
1187
- }
1188
- prev = effect2;
1189
- current = skip_to_branch(effect2.next);
1190
- }
1191
- if (state2.outrogroups !== null) {
1192
- for (const group of state2.outrogroups) {
1193
- if (group.pending.size === 0) {
1194
- destroy_effects(state2, array_from(group.done));
1195
- state2.outrogroups?.delete(group);
1196
- }
1197
- }
1198
- if (state2.outrogroups.size === 0) {
1199
- state2.outrogroups = null;
1200
- }
1201
- }
1202
- if (current !== null || seen !== void 0) {
1203
- var to_destroy = [];
1204
- if (seen !== void 0) {
1205
- for (effect2 of seen) {
1206
- if ((effect2.f & INERT) === 0) {
1207
- to_destroy.push(effect2);
1208
- }
1209
- }
1210
- }
1211
- while (current !== null) {
1212
- if ((current.f & INERT) === 0 && current !== state2.fallback) {
1213
- to_destroy.push(current);
1214
- }
1215
- current = skip_to_branch(current.next);
1216
- }
1217
- var destroy_length = to_destroy.length;
1218
- if (destroy_length > 0) {
1219
- var controlled_anchor = (flags & EACH_IS_CONTROLLED) !== 0 && length === 0 ? anchor : null;
1220
- if (is_animated) {
1221
- for (i = 0; i < destroy_length; i += 1) {
1222
- to_destroy[i].nodes?.a?.measure();
1223
- }
1224
- for (i = 0; i < destroy_length; i += 1) {
1225
- to_destroy[i].nodes?.a?.fix();
1226
- }
1227
- }
1228
- pause_effects(state2, to_destroy, controlled_anchor);
1229
- }
1230
- }
1231
- if (is_animated) {
1232
- queue_micro_task(() => {
1233
- if (to_animate === void 0) return;
1234
- for (effect2 of to_animate) {
1235
- effect2.nodes?.a?.apply();
1236
- }
1237
- });
1238
- }
1239
- }
1240
- function create_item(items, anchor, value, key2, index2, render_fn, flags, get_collection) {
1241
- var v = (flags & EACH_ITEM_REACTIVE) !== 0 ? (flags & EACH_ITEM_IMMUTABLE) === 0 ? mutable_source(value, false, false) : source(value) : null;
1242
- var i = (flags & EACH_INDEX_REACTIVE) !== 0 ? source(index2) : null;
1243
- if (true_default && v) {
1244
- v.trace = () => {
1245
- get_collection()[i?.v ?? index2];
1246
- };
1247
- }
1248
- return {
1249
- v,
1250
- i,
1251
- e: branch(() => {
1252
- render_fn(anchor, v ?? value, i ?? index2, get_collection);
1253
- return () => {
1254
- items.delete(key2);
1255
- };
1256
- })
1257
- };
1258
- }
1259
- function move(effect2, next2, anchor) {
1260
- if (!effect2.nodes) return;
1261
- var node = effect2.nodes.start;
1262
- var end = effect2.nodes.end;
1263
- var dest = next2 && (next2.f & EFFECT_OFFSCREEN) === 0 ? (
1264
- /** @type {EffectNodes} */
1265
- next2.nodes.start
1266
- ) : anchor;
1267
- while (node !== null) {
1268
- var next_node = (
1269
- /** @type {TemplateNode} */
1270
- get_next_sibling(node)
1271
- );
1272
- dest.before(node);
1273
- if (node === end) {
1274
- return;
1275
- }
1276
- node = next_node;
1277
- }
1278
- }
1279
- function link(state2, prev, next2) {
1280
- if (prev === null) {
1281
- state2.effect.first = next2;
1282
- } else {
1283
- prev.next = next2;
1284
- }
1285
- if (next2 === null) {
1286
- state2.effect.last = prev;
1287
- } else {
1288
- next2.prev = prev;
1289
- }
1290
- }
1291
- function validate_each_keys(array, key_fn) {
1292
- const keys = /* @__PURE__ */ new Map();
1293
- const length = array.length;
1294
- for (let i = 0; i < length; i++) {
1295
- const key2 = key_fn(array[i], i);
1296
- if (keys.has(key2)) {
1297
- const a = String(keys.get(key2));
1298
- const b = String(i);
1299
- let k = String(key2);
1300
- if (k.startsWith("[object ")) k = null;
1301
- each_key_duplicate(a, b, k);
1302
- }
1303
- keys.set(key2, i);
1304
- }
1305
- }
1306
-
1307
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/blocks/html.js
1308
- function check_hash(element2, server_hash, value) {
1309
- if (!server_hash || server_hash === hash(String(value ?? ""))) return;
1310
- let location;
1311
- const loc = element2.__svelte_meta?.loc;
1312
- if (loc) {
1313
- location = `near ${loc.file}:${loc.line}:${loc.column}`;
1314
- } else if (dev_current_component_function?.[FILENAME]) {
1315
- location = `in ${dev_current_component_function[FILENAME]}`;
1316
- }
1317
- hydration_html_changed(sanitize_location(location));
1318
- }
1319
- function html(node, get_value, is_controlled = false, svg = false, mathml = false, skip_warning = false) {
1320
- var anchor = node;
1321
- var value = "";
1322
- if (is_controlled) {
1323
- var parent_node = (
1324
- /** @type {Element} */
1325
- node
1326
- );
1327
- if (hydrating) {
1328
- anchor = set_hydrate_node(get_first_child(parent_node));
1329
- }
1330
- }
1331
- template_effect(() => {
1332
- var effect2 = (
1333
- /** @type {Effect} */
1334
- active_effect
1335
- );
1336
- if (value === (value = get_value() ?? "")) {
1337
- if (hydrating) hydrate_next();
1338
- return;
1339
- }
1340
- if (is_controlled && !hydrating) {
1341
- effect2.nodes = null;
1342
- parent_node.innerHTML = /** @type {string} */
1343
- value;
1344
- if (value !== "") {
1345
- assign_nodes(
1346
- /** @type {TemplateNode} */
1347
- get_first_child(parent_node),
1348
- /** @type {TemplateNode} */
1349
- parent_node.lastChild
1350
- );
1351
- }
1352
- return;
1353
- }
1354
- if (effect2.nodes !== null) {
1355
- remove_effect_dom(
1356
- effect2.nodes.start,
1357
- /** @type {TemplateNode} */
1358
- effect2.nodes.end
1359
- );
1360
- effect2.nodes = null;
1361
- }
1362
- if (value === "") return;
1363
- if (hydrating) {
1364
- var hash2 = (
1365
- /** @type {Comment} */
1366
- hydrate_node.data
1367
- );
1368
- var next2 = hydrate_next();
1369
- var last = next2;
1370
- while (next2 !== null && (next2.nodeType !== COMMENT_NODE || /** @type {Comment} */
1371
- next2.data !== "")) {
1372
- last = next2;
1373
- next2 = get_next_sibling(next2);
1374
- }
1375
- if (next2 === null) {
1376
- hydration_mismatch();
1377
- throw HYDRATION_ERROR;
1378
- }
1379
- if (true_default && !skip_warning) {
1380
- check_hash(
1381
- /** @type {Element} */
1382
- next2.parentNode,
1383
- hash2,
1384
- value
1385
- );
1386
- }
1387
- assign_nodes(hydrate_node, last);
1388
- anchor = set_hydrate_node(next2);
1389
- return;
1390
- }
1391
- var ns = svg ? NAMESPACE_SVG : mathml ? NAMESPACE_MATHML : void 0;
1392
- var wrapper = (
1393
- /** @type {HTMLTemplateElement | SVGElement | MathMLElement} */
1394
- create_element(svg ? "svg" : mathml ? "math" : "template", ns)
1395
- );
1396
- wrapper.innerHTML = /** @type {any} */
1397
- value;
1398
- var node2 = svg || mathml ? wrapper : (
1399
- /** @type {HTMLTemplateElement} */
1400
- wrapper.content
1401
- );
1402
- assign_nodes(
1403
- /** @type {TemplateNode} */
1404
- get_first_child(node2),
1405
- /** @type {TemplateNode} */
1406
- node2.lastChild
1407
- );
1408
- if (svg || mathml) {
1409
- while (get_first_child(node2)) {
1410
- anchor.before(
1411
- /** @type {TemplateNode} */
1412
- get_first_child(node2)
1413
- );
1414
- }
1415
- } else {
1416
- anchor.before(node2);
1417
- }
1418
- });
1419
- }
1420
-
1421
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/blocks/slot.js
1422
- function slot(anchor, $$props, name, slot_props, fallback_fn) {
1423
- if (hydrating) {
1424
- hydrate_next();
1425
- }
1426
- var slot_fn = $$props.$$slots?.[name];
1427
- var is_interop = false;
1428
- if (slot_fn === true) {
1429
- slot_fn = $$props[name === "default" ? "children" : name];
1430
- is_interop = true;
1431
- }
1432
- if (slot_fn === void 0) {
1433
- if (fallback_fn !== null) {
1434
- fallback_fn(anchor);
1435
- }
1436
- } else {
1437
- slot_fn(anchor, is_interop ? () => slot_props : slot_props);
1438
- }
1439
- }
1440
- function sanitize_slots(props) {
1441
- const sanitized = {};
1442
- if (props.children) sanitized.default = true;
1443
- for (const key2 in props.$$slots) {
1444
- sanitized[key2] = true;
1445
- }
1446
- return sanitized;
1447
- }
1448
-
1449
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/shared/validate.js
1450
- function validate_void_dynamic_element(tag_fn) {
1451
- const tag2 = tag_fn();
1452
- if (tag2 && is_void(tag2)) {
1453
- dynamic_void_element_content(tag2);
1454
- }
1455
- }
1456
- function validate_dynamic_element_tag(tag_fn) {
1457
- const tag2 = tag_fn();
1458
- const is_string = typeof tag2 === "string";
1459
- if (tag2 && !is_string) {
1460
- svelte_element_invalid_this_value();
1461
- }
1462
- }
1463
- function validate_store(store, name) {
1464
- if (store != null && typeof store.subscribe !== "function") {
1465
- store_invalid_shape(name);
1466
- }
1467
- }
1468
- function prevent_snippet_stringification(fn) {
1469
- fn.toString = () => {
1470
- snippet_without_render_tag();
1471
- return "";
1472
- };
1473
- return fn;
1474
- }
1475
-
1476
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/blocks/snippet.js
1477
- function snippet(node, get_snippet, ...args) {
1478
- var branches = new BranchManager(node);
1479
- block(() => {
1480
- const snippet2 = get_snippet() ?? null;
1481
- if (true_default && snippet2 == null) {
1482
- invalid_snippet();
1483
- }
1484
- branches.ensure(snippet2, snippet2 && ((anchor) => snippet2(anchor, ...args)));
1485
- }, EFFECT_TRANSPARENT);
1486
- }
1487
- function wrap_snippet(component2, fn) {
1488
- const snippet2 = (node, ...args) => {
1489
- var previous_component_function = dev_current_component_function;
1490
- set_dev_current_component_function(component2);
1491
- try {
1492
- return fn(node, ...args);
1493
- } finally {
1494
- set_dev_current_component_function(previous_component_function);
1495
- }
1496
- };
1497
- prevent_snippet_stringification(snippet2);
1498
- return snippet2;
1499
- }
1500
- function createRawSnippet(fn) {
1501
- return (anchor, ...params) => {
1502
- var snippet2 = fn(...params);
1503
- var element2;
1504
- if (hydrating) {
1505
- element2 = /** @type {Element} */
1506
- hydrate_node;
1507
- hydrate_next();
1508
- } else {
1509
- var html2 = snippet2.render().trim();
1510
- var fragment = create_fragment_from_html(html2);
1511
- element2 = /** @type {Element} */
1512
- get_first_child(fragment);
1513
- if (true_default && (get_next_sibling(element2) !== null || element2.nodeType !== ELEMENT_NODE)) {
1514
- invalid_raw_snippet_render();
1515
- }
1516
- anchor.before(element2);
1517
- }
1518
- const result = snippet2.setup?.(element2);
1519
- assign_nodes(element2, element2);
1520
- if (typeof result === "function") {
1521
- teardown(result);
1522
- }
1523
- };
1524
- }
1525
-
1526
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/blocks/svelte-component.js
1527
- function component(node, get_component, render_fn) {
1528
- var hydration_start_node;
1529
- if (hydrating) {
1530
- hydration_start_node = hydrate_node;
1531
- hydrate_next();
1532
- }
1533
- var branches = new BranchManager(node);
1534
- block(() => {
1535
- var component2 = get_component() ?? null;
1536
- if (hydrating) {
1537
- var data = read_hydration_instruction(
1538
- /** @type {TemplateNode} */
1539
- hydration_start_node
1540
- );
1541
- var server_had_component = data === HYDRATION_START;
1542
- var client_has_component = component2 !== null;
1543
- if (server_had_component !== client_has_component) {
1544
- var anchor = skip_nodes();
1545
- set_hydrate_node(anchor);
1546
- branches.anchor = anchor;
1547
- set_hydrating(false);
1548
- branches.ensure(component2, component2 && ((target) => render_fn(target, component2)));
1549
- set_hydrating(true);
1550
- return;
1551
- }
1552
- }
1553
- branches.ensure(component2, component2 && ((target) => render_fn(target, component2)));
1554
- }, EFFECT_TRANSPARENT);
1555
- }
1556
-
1557
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/timing.js
1558
- var now = true_default ? () => performance.now() : () => Date.now();
1559
- var raf = {
1560
- // don't access requestAnimationFrame eagerly outside method
1561
- // this allows basic testing of user code without JSDOM
1562
- // bunder will eval and remove ternary when the user's app is built
1563
- tick: (
1564
- /** @param {any} _ */
1565
- (_) => (true_default ? requestAnimationFrame : noop)(_)
1566
- ),
1567
- now: () => now(),
1568
- tasks: /* @__PURE__ */ new Set()
1569
- };
1570
-
1571
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/loop.js
1572
- function run_tasks() {
1573
- const now2 = raf.now();
1574
- raf.tasks.forEach((task) => {
1575
- if (!task.c(now2)) {
1576
- raf.tasks.delete(task);
1577
- task.f();
1578
- }
1579
- });
1580
- if (raf.tasks.size !== 0) {
1581
- raf.tick(run_tasks);
1582
- }
1583
- }
1584
- function loop(callback) {
1585
- let task;
1586
- if (raf.tasks.size === 0) {
1587
- raf.tick(run_tasks);
1588
- }
1589
- return {
1590
- promise: new Promise((fulfill) => {
1591
- raf.tasks.add(task = { c: callback, f: fulfill });
1592
- }),
1593
- abort() {
1594
- raf.tasks.delete(task);
1595
- }
1596
- };
1597
- }
1598
-
1599
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/elements/transitions.js
1600
- function dispatch_event(element2, type) {
1601
- without_reactive_context(() => {
1602
- element2.dispatchEvent(new CustomEvent(type));
1603
- });
1604
- }
1605
- function css_property_to_camelcase(style) {
1606
- if (style === "float") return "cssFloat";
1607
- if (style === "offset") return "cssOffset";
1608
- if (style.startsWith("--")) return style;
1609
- const parts = style.split("-");
1610
- if (parts.length === 1) return parts[0];
1611
- return parts[0] + parts.slice(1).map(
1612
- /** @param {any} word */
1613
- (word) => word[0].toUpperCase() + word.slice(1)
1614
- ).join("");
1615
- }
1616
- function css_to_keyframe(css) {
1617
- const keyframe = {};
1618
- const parts = css.split(";");
1619
- for (const part of parts) {
1620
- const [property, value] = part.split(":");
1621
- if (!property || value === void 0) break;
1622
- const formatted_property = css_property_to_camelcase(property.trim());
1623
- keyframe[formatted_property] = value.trim();
1624
- }
1625
- return keyframe;
1626
- }
1627
- var linear = (t) => t;
1628
- var animation_effect_override = null;
1629
- function set_animation_effect_override(v) {
1630
- animation_effect_override = v;
1631
- }
1632
- function animation(element2, get_fn, get_params) {
1633
- var effect2 = animation_effect_override ?? /** @type {Effect} */
1634
- active_effect;
1635
- var nodes = (
1636
- /** @type {EffectNodes} */
1637
- effect2.nodes
1638
- );
1639
- var from;
1640
- var to;
1641
- var animation2;
1642
- var original_styles = null;
1643
- nodes.a ??= {
1644
- element: element2,
1645
- measure() {
1646
- from = this.element.getBoundingClientRect();
1647
- },
1648
- apply() {
1649
- animation2?.abort();
1650
- to = this.element.getBoundingClientRect();
1651
- if (from.left !== to.left || from.right !== to.right || from.top !== to.top || from.bottom !== to.bottom) {
1652
- const options = get_fn()(this.element, { from, to }, get_params?.());
1653
- animation2 = animate(this.element, options, void 0, 1, () => {
1654
- animation2?.abort();
1655
- animation2 = void 0;
1656
- });
1657
- }
1658
- },
1659
- fix() {
1660
- if (element2.getAnimations().length) return;
1661
- var { position, width, height } = getComputedStyle(element2);
1662
- if (position !== "absolute" && position !== "fixed") {
1663
- var style = (
1664
- /** @type {HTMLElement | SVGElement} */
1665
- element2.style
1666
- );
1667
- original_styles = {
1668
- position: style.position,
1669
- width: style.width,
1670
- height: style.height,
1671
- transform: style.transform
1672
- };
1673
- style.position = "absolute";
1674
- style.width = width;
1675
- style.height = height;
1676
- var to2 = element2.getBoundingClientRect();
1677
- if (from.left !== to2.left || from.top !== to2.top) {
1678
- var transform = `translate(${from.left - to2.left}px, ${from.top - to2.top}px)`;
1679
- style.transform = style.transform ? `${style.transform} ${transform}` : transform;
1680
- }
1681
- }
1682
- },
1683
- unfix() {
1684
- if (original_styles) {
1685
- var style = (
1686
- /** @type {HTMLElement | SVGElement} */
1687
- element2.style
1688
- );
1689
- style.position = original_styles.position;
1690
- style.width = original_styles.width;
1691
- style.height = original_styles.height;
1692
- style.transform = original_styles.transform;
1693
- }
1694
- }
1695
- };
1696
- nodes.a.element = element2;
1697
- }
1698
- function transition(flags, element2, get_fn, get_params) {
1699
- var is_intro = (flags & TRANSITION_IN) !== 0;
1700
- var is_outro = (flags & TRANSITION_OUT) !== 0;
1701
- var is_both = is_intro && is_outro;
1702
- var is_global = (flags & TRANSITION_GLOBAL) !== 0;
1703
- var direction = is_both ? "both" : is_intro ? "in" : "out";
1704
- var current_options;
1705
- var inert = element2.inert;
1706
- var overflow = element2.style.overflow;
1707
- var intro;
1708
- var outro;
1709
- function get_options() {
1710
- return without_reactive_context(() => {
1711
- return current_options ??= get_fn()(element2, get_params?.() ?? /** @type {P} */
1712
- {}, {
1713
- direction
1714
- });
1715
- });
1716
- }
1717
- var transition2 = {
1718
- is_global,
1719
- in() {
1720
- element2.inert = inert;
1721
- if (!is_intro) {
1722
- outro?.abort();
1723
- outro?.reset?.();
1724
- return;
1725
- }
1726
- if (!is_outro) {
1727
- intro?.abort();
1728
- }
1729
- intro = animate(element2, get_options(), outro, 1, () => {
1730
- dispatch_event(element2, "introend");
1731
- intro?.abort();
1732
- intro = current_options = void 0;
1733
- element2.style.overflow = overflow;
1734
- });
1735
- },
1736
- out(fn) {
1737
- if (!is_outro) {
1738
- fn?.();
1739
- current_options = void 0;
1740
- return;
1741
- }
1742
- element2.inert = true;
1743
- outro = animate(element2, get_options(), intro, 0, () => {
1744
- dispatch_event(element2, "outroend");
1745
- fn?.();
1746
- });
1747
- },
1748
- stop: () => {
1749
- intro?.abort();
1750
- outro?.abort();
1751
- }
1752
- };
1753
- var e = (
1754
- /** @type {Effect & { nodes: EffectNodes }} */
1755
- active_effect
1756
- );
1757
- (e.nodes.t ??= []).push(transition2);
1758
- if (is_intro && should_intro) {
1759
- var run3 = is_global;
1760
- if (!run3) {
1761
- var block2 = (
1762
- /** @type {Effect | null} */
1763
- e.parent
1764
- );
1765
- while (block2 && (block2.f & EFFECT_TRANSPARENT) !== 0) {
1766
- while (block2 = block2.parent) {
1767
- if ((block2.f & BLOCK_EFFECT) !== 0) break;
1768
- }
1769
- }
1770
- run3 = !block2 || (block2.f & REACTION_RAN) !== 0;
1771
- }
1772
- if (run3) {
1773
- effect(() => {
1774
- untrack(() => transition2.in());
1775
- });
1776
- }
1777
- }
1778
- }
1779
- function animate(element2, options, counterpart, t2, on_finish) {
1780
- var is_intro = t2 === 1;
1781
- if (is_function(options)) {
1782
- var a;
1783
- var aborted2 = false;
1784
- queue_micro_task(() => {
1785
- if (aborted2) return;
1786
- var o = options({ direction: is_intro ? "in" : "out" });
1787
- a = animate(element2, o, counterpart, t2, on_finish);
1788
- });
1789
- return {
1790
- abort: () => {
1791
- aborted2 = true;
1792
- a?.abort();
1793
- },
1794
- deactivate: () => a.deactivate(),
1795
- reset: () => a.reset(),
1796
- t: () => a.t()
1797
- };
1798
- }
1799
- counterpart?.deactivate();
1800
- if (!options?.duration && !options?.delay) {
1801
- dispatch_event(element2, is_intro ? "introstart" : "outrostart");
1802
- on_finish();
1803
- return {
1804
- abort: noop,
1805
- deactivate: noop,
1806
- reset: noop,
1807
- t: () => t2
1808
- };
1809
- }
1810
- const { delay = 0, css, tick: tick2, easing = linear } = options;
1811
- var keyframes = [];
1812
- if (is_intro && counterpart === void 0) {
1813
- if (tick2) {
1814
- tick2(0, 1);
1815
- }
1816
- if (css) {
1817
- var styles = css_to_keyframe(css(0, 1));
1818
- keyframes.push(styles, styles);
1819
- }
1820
- }
1821
- var get_t = () => 1 - t2;
1822
- var animation2 = element2.animate(keyframes, { duration: delay, fill: "forwards" });
1823
- animation2.onfinish = () => {
1824
- animation2.cancel();
1825
- dispatch_event(element2, is_intro ? "introstart" : "outrostart");
1826
- var t1 = counterpart?.t() ?? 1 - t2;
1827
- counterpart?.abort();
1828
- var delta = t2 - t1;
1829
- var duration = (
1830
- /** @type {number} */
1831
- options.duration * Math.abs(delta)
1832
- );
1833
- var keyframes2 = [];
1834
- if (duration > 0) {
1835
- var needs_overflow_hidden = false;
1836
- if (css) {
1837
- var n = Math.ceil(duration / (1e3 / 60));
1838
- for (var i = 0; i <= n; i += 1) {
1839
- var t = t1 + delta * easing(i / n);
1840
- var styles2 = css_to_keyframe(css(t, 1 - t));
1841
- keyframes2.push(styles2);
1842
- needs_overflow_hidden ||= styles2.overflow === "hidden";
1843
- }
1844
- }
1845
- if (needs_overflow_hidden) {
1846
- element2.style.overflow = "hidden";
1847
- }
1848
- get_t = () => {
1849
- var time = (
1850
- /** @type {number} */
1851
- /** @type {globalThis.Animation} */
1852
- animation2.currentTime
1853
- );
1854
- return t1 + delta * easing(time / duration);
1855
- };
1856
- if (tick2) {
1857
- loop(() => {
1858
- if (animation2.playState !== "running") return false;
1859
- var t3 = get_t();
1860
- tick2(t3, 1 - t3);
1861
- return true;
1862
- });
1863
- }
1864
- }
1865
- animation2 = element2.animate(keyframes2, { duration, fill: "forwards" });
1866
- animation2.onfinish = () => {
1867
- get_t = () => t2;
1868
- tick2?.(t2, 1 - t2);
1869
- on_finish();
1870
- };
1871
- };
1872
- return {
1873
- abort: () => {
1874
- if (animation2) {
1875
- animation2.cancel();
1876
- animation2.effect = null;
1877
- animation2.onfinish = noop;
1878
- }
1879
- },
1880
- deactivate: () => {
1881
- on_finish = noop;
1882
- },
1883
- reset: () => {
1884
- if (t2 === 0) {
1885
- tick2?.(1, 0);
1886
- }
1887
- },
1888
- t: () => get_t()
1889
- };
1890
- }
1891
-
1892
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/blocks/svelte-element.js
1893
- function element(node, get_tag, is_svg, render_fn, get_namespace, location) {
1894
- let was_hydrating = hydrating;
1895
- if (hydrating) {
1896
- hydrate_next();
1897
- }
1898
- var filename = true_default && location && component_context?.function[FILENAME];
1899
- var element2 = null;
1900
- if (hydrating && hydrate_node.nodeType === ELEMENT_NODE) {
1901
- element2 = /** @type {Element} */
1902
- hydrate_node;
1903
- hydrate_next();
1904
- }
1905
- var anchor = (
1906
- /** @type {TemplateNode} */
1907
- hydrating ? hydrate_node : node
1908
- );
1909
- var parent_effect = (
1910
- /** @type {Effect} */
1911
- active_effect
1912
- );
1913
- var branches = new BranchManager(anchor, false);
1914
- block(() => {
1915
- const next_tag = get_tag() || null;
1916
- var ns = get_namespace ? get_namespace() : is_svg || next_tag === "svg" ? NAMESPACE_SVG : void 0;
1917
- if (next_tag === null) {
1918
- branches.ensure(null, null);
1919
- set_should_intro(true);
1920
- return;
1921
- }
1922
- branches.ensure(next_tag, (anchor2) => {
1923
- if (next_tag) {
1924
- element2 = hydrating ? (
1925
- /** @type {Element} */
1926
- element2
1927
- ) : create_element(next_tag, ns);
1928
- if (true_default && location) {
1929
- element2.__svelte_meta = {
1930
- parent: dev_stack,
1931
- loc: {
1932
- file: filename,
1933
- line: location[0],
1934
- column: location[1]
1935
- }
1936
- };
1937
- }
1938
- assign_nodes(element2, element2);
1939
- if (render_fn) {
1940
- if (hydrating && is_raw_text_element(next_tag)) {
1941
- element2.append(document.createComment(""));
1942
- }
1943
- var child_anchor = hydrating ? get_first_child(element2) : element2.appendChild(create_text());
1944
- if (hydrating) {
1945
- if (child_anchor === null) {
1946
- set_hydrating(false);
1947
- } else {
1948
- set_hydrate_node(child_anchor);
1949
- }
1950
- }
1951
- set_animation_effect_override(parent_effect);
1952
- render_fn(element2, child_anchor);
1953
- set_animation_effect_override(null);
1954
- }
1955
- active_effect.nodes.end = element2;
1956
- anchor2.before(element2);
1957
- }
1958
- if (hydrating) {
1959
- set_hydrate_node(anchor2);
1960
- }
1961
- });
1962
- set_should_intro(true);
1963
- return () => {
1964
- if (next_tag) {
1965
- set_should_intro(false);
1966
- }
1967
- };
1968
- }, EFFECT_TRANSPARENT);
1969
- teardown(() => {
1970
- set_should_intro(true);
1971
- });
1972
- if (was_hydrating) {
1973
- set_hydrating(true);
1974
- set_hydrate_node(anchor);
1975
- }
1976
- }
1977
-
1978
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/blocks/svelte-head.js
1979
- function head(hash2, render_fn) {
1980
- let previous_hydrate_node = null;
1981
- let was_hydrating = hydrating;
1982
- var anchor;
1983
- if (hydrating) {
1984
- previous_hydrate_node = hydrate_node;
1985
- var head_anchor = get_first_child(document.head);
1986
- while (head_anchor !== null && (head_anchor.nodeType !== COMMENT_NODE || /** @type {Comment} */
1987
- head_anchor.data !== hash2)) {
1988
- head_anchor = get_next_sibling(head_anchor);
1989
- }
1990
- if (head_anchor === null) {
1991
- set_hydrating(false);
1992
- } else {
1993
- var start = (
1994
- /** @type {TemplateNode} */
1995
- get_next_sibling(head_anchor)
1996
- );
1997
- head_anchor.remove();
1998
- set_hydrate_node(start);
1999
- }
2000
- }
2001
- if (!hydrating) {
2002
- anchor = document.head.appendChild(create_text());
2003
- }
2004
- try {
2005
- block(() => render_fn(anchor), HEAD_EFFECT | EFFECT_PRESERVED);
2006
- } finally {
2007
- if (was_hydrating) {
2008
- set_hydrating(true);
2009
- set_hydrate_node(
2010
- /** @type {TemplateNode} */
2011
- previous_hydrate_node
2012
- );
2013
- }
2014
- }
2015
- }
2016
-
2017
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/css.js
2018
- function append_styles(anchor, css) {
2019
- effect(() => {
2020
- var root = anchor.getRootNode();
2021
- var target = (
2022
- /** @type {ShadowRoot} */
2023
- root.host ? (
2024
- /** @type {ShadowRoot} */
2025
- root
2026
- ) : (
2027
- /** @type {Document} */
2028
- root.head ?? /** @type {Document} */
2029
- root.ownerDocument.head
2030
- )
2031
- );
2032
- if (!target.querySelector("#" + css.hash)) {
2033
- const style = create_element("style");
2034
- style.id = css.hash;
2035
- style.textContent = css.code;
2036
- target.appendChild(style);
2037
- if (true_default) {
2038
- register_style(css.hash, style);
2039
- }
2040
- }
2041
- });
2042
- }
2043
-
2044
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/elements/actions.js
2045
- function action(dom, action2, get_value) {
2046
- effect(() => {
2047
- var payload = untrack(() => action2(dom, get_value?.()) || {});
2048
- if (get_value && payload?.update) {
2049
- var inited = false;
2050
- var prev = (
2051
- /** @type {any} */
2052
- {}
2053
- );
2054
- render_effect(() => {
2055
- var value = get_value();
2056
- deep_read_state(value);
2057
- if (inited && safe_not_equal(prev, value)) {
2058
- prev = value;
2059
- payload.update(value);
2060
- }
2061
- });
2062
- inited = true;
2063
- }
2064
- if (payload?.destroy) {
2065
- return () => (
2066
- /** @type {Function} */
2067
- payload.destroy()
2068
- );
2069
- }
2070
- });
2071
- }
2072
-
2073
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/elements/attachments.js
2074
- function attach(node, get_fn) {
2075
- var fn = void 0;
2076
- var e;
2077
- managed(() => {
2078
- if (fn !== (fn = get_fn())) {
2079
- if (e) {
2080
- destroy_effect(e);
2081
- e = null;
2082
- }
2083
- if (fn) {
2084
- e = branch(() => {
2085
- effect(() => (
2086
- /** @type {(node: Element) => void} */
2087
- fn(node)
2088
- ));
2089
- });
2090
- }
2091
- }
2092
- });
2093
- }
2094
-
2095
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/escaping.js
2096
- var ATTR_REGEX = /[&"<]/g;
2097
- var CONTENT_REGEX = /[&<]/g;
2098
- function escape_html(value, is_attr) {
2099
- const str = String(value ?? "");
2100
- const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX;
2101
- pattern.lastIndex = 0;
2102
- let escaped = "";
2103
- let last = 0;
2104
- while (pattern.test(str)) {
2105
- const i = pattern.lastIndex - 1;
2106
- const ch = str[i];
2107
- escaped += str.substring(last, i) + (ch === "&" ? "&amp;" : ch === '"' ? "&quot;" : "&lt;");
2108
- last = i + 1;
2109
- }
2110
- return escaped + str.substring(last);
2111
- }
2112
-
2113
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/shared/attributes.js
2114
- var replacements = {
2115
- translate: /* @__PURE__ */ new Map([
2116
- [true, "yes"],
2117
- [false, "no"]
2118
- ])
2119
- };
2120
- function attr(name, value, is_boolean = false) {
2121
- if (name === "hidden" && value !== "until-found") {
2122
- is_boolean = true;
2123
- }
2124
- if (value == null || !value && is_boolean) return "";
2125
- const normalized = has_own_property.call(replacements, name) && replacements[name].get(value) || value;
2126
- const assignment = is_boolean ? `=""` : `="${escape_html(normalized, true)}"`;
2127
- return ` ${name}${assignment}`;
2128
- }
2129
- function clsx2(value) {
2130
- if (typeof value === "object") {
2131
- return clsx(value);
2132
- } else {
2133
- return value ?? "";
2134
- }
2135
- }
2136
- var whitespace = [..." \n\r\f \v\uFEFF"];
2137
- function to_class(value, hash2, directives) {
2138
- var classname = value == null ? "" : "" + value;
2139
- if (hash2) {
2140
- classname = classname ? classname + " " + hash2 : hash2;
2141
- }
2142
- if (directives) {
2143
- for (var key2 of Object.keys(directives)) {
2144
- if (directives[key2]) {
2145
- classname = classname ? classname + " " + key2 : key2;
2146
- } else if (classname.length) {
2147
- var len = key2.length;
2148
- var a = 0;
2149
- while ((a = classname.indexOf(key2, a)) >= 0) {
2150
- var b = a + len;
2151
- if ((a === 0 || whitespace.includes(classname[a - 1])) && (b === classname.length || whitespace.includes(classname[b]))) {
2152
- classname = (a === 0 ? "" : classname.substring(0, a)) + classname.substring(b + 1);
2153
- } else {
2154
- a = b;
2155
- }
2156
- }
2157
- }
2158
- }
2159
- }
2160
- return classname === "" ? null : classname;
2161
- }
2162
- function append_styles2(styles, important = false) {
2163
- var separator = important ? " !important;" : ";";
2164
- var css = "";
2165
- for (var key2 of Object.keys(styles)) {
2166
- var value = styles[key2];
2167
- if (value != null && value !== "") {
2168
- css += " " + key2 + ": " + value + separator;
2169
- }
2170
- }
2171
- return css;
2172
- }
2173
- function to_css_name(name) {
2174
- if (name[0] !== "-" || name[1] !== "-") {
2175
- return name.toLowerCase();
2176
- }
2177
- return name;
2178
- }
2179
- function to_style(value, styles) {
2180
- if (styles) {
2181
- var new_style = "";
2182
- var normal_styles;
2183
- var important_styles;
2184
- if (Array.isArray(styles)) {
2185
- normal_styles = styles[0];
2186
- important_styles = styles[1];
2187
- } else {
2188
- normal_styles = styles;
2189
- }
2190
- if (value) {
2191
- value = String(value).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
2192
- var in_str = false;
2193
- var in_apo = 0;
2194
- var in_comment = false;
2195
- var reserved_names = [];
2196
- if (normal_styles) {
2197
- reserved_names.push(...Object.keys(normal_styles).map(to_css_name));
2198
- }
2199
- if (important_styles) {
2200
- reserved_names.push(...Object.keys(important_styles).map(to_css_name));
2201
- }
2202
- var start_index = 0;
2203
- var name_index = -1;
2204
- const len = value.length;
2205
- for (var i = 0; i < len; i++) {
2206
- var c = value[i];
2207
- if (in_comment) {
2208
- if (c === "/" && value[i - 1] === "*") {
2209
- in_comment = false;
2210
- }
2211
- } else if (in_str) {
2212
- if (in_str === c) {
2213
- in_str = false;
2214
- }
2215
- } else if (c === "/" && value[i + 1] === "*") {
2216
- in_comment = true;
2217
- } else if (c === '"' || c === "'") {
2218
- in_str = c;
2219
- } else if (c === "(") {
2220
- in_apo++;
2221
- } else if (c === ")") {
2222
- in_apo--;
2223
- }
2224
- if (!in_comment && in_str === false && in_apo === 0) {
2225
- if (c === ":" && name_index === -1) {
2226
- name_index = i;
2227
- } else if (c === ";" || i === len - 1) {
2228
- if (name_index !== -1) {
2229
- var name = to_css_name(value.substring(start_index, name_index).trim());
2230
- if (!reserved_names.includes(name)) {
2231
- if (c !== ";") {
2232
- i++;
2233
- }
2234
- var property = value.substring(start_index, i).trim();
2235
- new_style += " " + property + ";";
2236
- }
2237
- }
2238
- start_index = i + 1;
2239
- name_index = -1;
2240
- }
2241
- }
2242
- }
2243
- }
2244
- if (normal_styles) {
2245
- new_style += append_styles2(normal_styles);
2246
- }
2247
- if (important_styles) {
2248
- new_style += append_styles2(important_styles, true);
2249
- }
2250
- new_style = new_style.trim();
2251
- return new_style === "" ? null : new_style;
2252
- }
2253
- return value == null ? null : String(value);
2254
- }
2255
-
2256
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/elements/class.js
2257
- function set_class(dom, is_html, value, hash2, prev_classes, next_classes) {
2258
- var prev = dom.__className;
2259
- if (hydrating || prev !== value || prev === void 0) {
2260
- var next_class_name = to_class(value, hash2, next_classes);
2261
- if (!hydrating || next_class_name !== dom.getAttribute("class")) {
2262
- if (next_class_name == null) {
2263
- dom.removeAttribute("class");
2264
- } else if (is_html) {
2265
- dom.className = next_class_name;
2266
- } else {
2267
- dom.setAttribute("class", next_class_name);
2268
- }
2269
- }
2270
- dom.__className = value;
2271
- } else if (next_classes && prev_classes !== next_classes) {
2272
- for (var key2 in next_classes) {
2273
- var is_present = !!next_classes[key2];
2274
- if (prev_classes == null || is_present !== !!prev_classes[key2]) {
2275
- dom.classList.toggle(key2, is_present);
2276
- }
2277
- }
2278
- }
2279
- return next_classes;
2280
- }
2281
-
2282
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/elements/style.js
2283
- function update_styles(dom, prev = {}, next2, priority) {
2284
- for (var key2 in next2) {
2285
- var value = next2[key2];
2286
- if (prev[key2] !== value) {
2287
- if (next2[key2] == null) {
2288
- dom.style.removeProperty(key2);
2289
- } else {
2290
- dom.style.setProperty(key2, value, priority);
2291
- }
2292
- }
2293
- }
2294
- }
2295
- function set_style(dom, value, prev_styles, next_styles) {
2296
- var prev = dom.__style;
2297
- if (hydrating || prev !== value) {
2298
- var next_style_attr = to_style(value, next_styles);
2299
- if (!hydrating || next_style_attr !== dom.getAttribute("style")) {
2300
- if (next_style_attr == null) {
2301
- dom.removeAttribute("style");
2302
- } else {
2303
- dom.style.cssText = next_style_attr;
2304
- }
2305
- }
2306
- dom.__style = value;
2307
- } else if (next_styles) {
2308
- if (Array.isArray(next_styles)) {
2309
- update_styles(dom, prev_styles?.[0], next_styles[0]);
2310
- update_styles(dom, prev_styles?.[1], next_styles[1], "important");
2311
- } else {
2312
- update_styles(dom, prev_styles, next_styles);
2313
- }
2314
- }
2315
- return next_styles;
2316
- }
2317
-
2318
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/elements/bindings/select.js
2319
- function select_option(select, value, mounting = false) {
2320
- if (select.multiple) {
2321
- if (value == void 0) {
2322
- return;
2323
- }
2324
- if (!is_array(value)) {
2325
- return select_multiple_invalid_value();
2326
- }
2327
- for (var option of select.options) {
2328
- option.selected = value.includes(get_option_value(option));
2329
- }
2330
- return;
2331
- }
2332
- for (option of select.options) {
2333
- var option_value = get_option_value(option);
2334
- if (is(option_value, value)) {
2335
- option.selected = true;
2336
- return;
2337
- }
2338
- }
2339
- if (!mounting || value !== void 0) {
2340
- select.selectedIndex = -1;
2341
- }
2342
- }
2343
- function init_select(select) {
2344
- var observer = new MutationObserver(() => {
2345
- select_option(select, select.__value);
2346
- });
2347
- observer.observe(select, {
2348
- // Listen to option element changes
2349
- childList: true,
2350
- subtree: true,
2351
- // because of <optgroup>
2352
- // Listen to option element value attribute changes
2353
- // (doesn't get notified of select value changes,
2354
- // because that property is not reflected as an attribute)
2355
- attributes: true,
2356
- attributeFilter: ["value"]
2357
- });
2358
- teardown(() => {
2359
- observer.disconnect();
2360
- });
2361
- }
2362
- function bind_select_value(select, get2, set2 = get2) {
2363
- var batches = /* @__PURE__ */ new WeakSet();
2364
- var mounting = true;
2365
- listen_to_event_and_reset_event(select, "change", (is_reset) => {
2366
- var query = is_reset ? "[selected]" : ":checked";
2367
- var value;
2368
- if (select.multiple) {
2369
- value = [].map.call(select.querySelectorAll(query), get_option_value);
2370
- } else {
2371
- var selected_option = select.querySelector(query) ?? // will fall back to first non-disabled option if no option is selected
2372
- select.querySelector("option:not([disabled])");
2373
- value = selected_option && get_option_value(selected_option);
2374
- }
2375
- set2(value);
2376
- select.__value = value;
2377
- if (current_batch !== null) {
2378
- batches.add(current_batch);
2379
- }
2380
- });
2381
- effect(() => {
2382
- var value = get2();
2383
- if (select === document.activeElement) {
2384
- var batch = (
2385
- /** @type {Batch} */
2386
- async_mode_flag ? previous_batch : current_batch
2387
- );
2388
- if (batches.has(batch)) {
2389
- return;
2390
- }
2391
- }
2392
- select_option(select, value, mounting);
2393
- if (mounting && value === void 0) {
2394
- var selected_option = select.querySelector(":checked");
2395
- if (selected_option !== null) {
2396
- value = get_option_value(selected_option);
2397
- set2(value);
2398
- }
2399
- }
2400
- select.__value = value;
2401
- mounting = false;
2402
- });
2403
- init_select(select);
2404
- }
2405
- function get_option_value(option) {
2406
- if ("__value" in option) {
2407
- return option.__value;
2408
- } else {
2409
- return option.value;
2410
- }
2411
- }
2412
-
2413
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/elements/attributes.js
2414
- var CLASS = /* @__PURE__ */ Symbol("class");
2415
- var STYLE = /* @__PURE__ */ Symbol("style");
2416
- var IS_CUSTOM_ELEMENT = /* @__PURE__ */ Symbol("is custom element");
2417
- var IS_HTML = /* @__PURE__ */ Symbol("is html");
2418
- var LINK_TAG = IS_XHTML ? "link" : "LINK";
2419
- var INPUT_TAG = IS_XHTML ? "input" : "INPUT";
2420
- var OPTION_TAG = IS_XHTML ? "option" : "OPTION";
2421
- var SELECT_TAG = IS_XHTML ? "select" : "SELECT";
2422
- var PROGRESS_TAG = IS_XHTML ? "progress" : "PROGRESS";
2423
- function remove_input_defaults(input) {
2424
- if (!hydrating) return;
2425
- var already_removed = false;
2426
- var remove_defaults = () => {
2427
- if (already_removed) return;
2428
- already_removed = true;
2429
- if (input.hasAttribute("value")) {
2430
- var value = input.value;
2431
- set_attribute(input, "value", null);
2432
- input.value = value;
2433
- }
2434
- if (input.hasAttribute("checked")) {
2435
- var checked = input.checked;
2436
- set_attribute(input, "checked", null);
2437
- input.checked = checked;
2438
- }
2439
- };
2440
- input.__on_r = remove_defaults;
2441
- queue_micro_task(remove_defaults);
2442
- add_form_reset_listener();
2443
- }
2444
- function set_value(element2, value) {
2445
- var attributes = get_attributes(element2);
2446
- if (attributes.value === (attributes.value = // treat null and undefined the same for the initial value
2447
- value ?? void 0) || // @ts-expect-error
2448
- // `progress` elements always need their value set when it's `0`
2449
- element2.value === value && (value !== 0 || element2.nodeName !== PROGRESS_TAG)) {
2450
- return;
2451
- }
2452
- element2.value = value ?? "";
2453
- }
2454
- function set_checked(element2, checked) {
2455
- var attributes = get_attributes(element2);
2456
- if (attributes.checked === (attributes.checked = // treat null and undefined the same for the initial value
2457
- checked ?? void 0)) {
2458
- return;
2459
- }
2460
- element2.checked = checked;
2461
- }
2462
- function set_selected(element2, selected) {
2463
- if (selected) {
2464
- if (!element2.hasAttribute("selected")) {
2465
- element2.setAttribute("selected", "");
2466
- }
2467
- } else {
2468
- element2.removeAttribute("selected");
2469
- }
2470
- }
2471
- function set_default_checked(element2, checked) {
2472
- const existing_value = element2.checked;
2473
- element2.defaultChecked = checked;
2474
- element2.checked = existing_value;
2475
- }
2476
- function set_default_value(element2, value) {
2477
- const existing_value = element2.value;
2478
- element2.defaultValue = value;
2479
- element2.value = existing_value;
2480
- }
2481
- function set_attribute(element2, attribute, value, skip_warning) {
2482
- var attributes = get_attributes(element2);
2483
- if (hydrating) {
2484
- attributes[attribute] = element2.getAttribute(attribute);
2485
- if (attribute === "src" || attribute === "srcset" || attribute === "href" && element2.nodeName === LINK_TAG) {
2486
- if (!skip_warning) {
2487
- check_src_in_dev_hydration(element2, attribute, value ?? "");
2488
- }
2489
- return;
2490
- }
2491
- }
2492
- if (attributes[attribute] === (attributes[attribute] = value)) return;
2493
- if (attribute === "loading") {
2494
- element2[LOADING_ATTR_SYMBOL] = value;
2495
- }
2496
- if (value == null) {
2497
- element2.removeAttribute(attribute);
2498
- } else if (typeof value !== "string" && get_setters(element2).includes(attribute)) {
2499
- element2[attribute] = value;
2500
- } else {
2501
- element2.setAttribute(attribute, value);
2502
- }
2503
- }
2504
- function set_xlink_attribute(dom, attribute, value) {
2505
- dom.setAttributeNS("http://www.w3.org/1999/xlink", attribute, value);
2506
- }
2507
- function set_custom_element_data(node, prop2, value) {
2508
- var previous_reaction = active_reaction;
2509
- var previous_effect = active_effect;
2510
- let was_hydrating = hydrating;
2511
- if (hydrating) {
2512
- set_hydrating(false);
2513
- }
2514
- set_active_reaction(null);
2515
- set_active_effect(null);
2516
- try {
2517
- if (
2518
- // `style` should use `set_attribute` rather than the setter
2519
- prop2 !== "style" && // Don't compute setters for custom elements while they aren't registered yet,
2520
- // because during their upgrade/instantiation they might add more setters.
2521
- // Instead, fall back to a simple "an object, then set as property" heuristic.
2522
- (setters_cache.has(node.getAttribute("is") || node.nodeName) || // customElements may not be available in browser extension contexts
2523
- !customElements || customElements.get(node.getAttribute("is") || node.nodeName.toLowerCase()) ? get_setters(node).includes(prop2) : value && typeof value === "object")
2524
- ) {
2525
- node[prop2] = value;
2526
- } else {
2527
- set_attribute(node, prop2, value == null ? value : String(value));
2528
- }
2529
- } finally {
2530
- set_active_reaction(previous_reaction);
2531
- set_active_effect(previous_effect);
2532
- if (was_hydrating) {
2533
- set_hydrating(true);
2534
- }
2535
- }
2536
- }
2537
- function set_attributes(element2, prev, next2, css_hash, should_remove_defaults = false, skip_warning = false) {
2538
- if (hydrating && should_remove_defaults && element2.nodeName === INPUT_TAG) {
2539
- var input = (
2540
- /** @type {HTMLInputElement} */
2541
- element2
2542
- );
2543
- var attribute = input.type === "checkbox" ? "defaultChecked" : "defaultValue";
2544
- if (!(attribute in next2)) {
2545
- remove_input_defaults(input);
2546
- }
2547
- }
2548
- var attributes = get_attributes(element2);
2549
- var is_custom_element = attributes[IS_CUSTOM_ELEMENT];
2550
- var preserve_attribute_case = !attributes[IS_HTML];
2551
- let is_hydrating_custom_element = hydrating && is_custom_element;
2552
- if (is_hydrating_custom_element) {
2553
- set_hydrating(false);
2554
- }
2555
- var current = prev || {};
2556
- var is_option_element = element2.nodeName === OPTION_TAG;
2557
- for (var key2 in prev) {
2558
- if (!(key2 in next2)) {
2559
- next2[key2] = null;
2560
- }
2561
- }
2562
- if (next2.class) {
2563
- next2.class = clsx2(next2.class);
2564
- } else if (css_hash || next2[CLASS]) {
2565
- next2.class = null;
2566
- }
2567
- if (next2[STYLE]) {
2568
- next2.style ??= null;
2569
- }
2570
- var setters = get_setters(element2);
2571
- for (const key3 in next2) {
2572
- let value = next2[key3];
2573
- if (is_option_element && key3 === "value" && value == null) {
2574
- element2.value = element2.__value = "";
2575
- current[key3] = value;
2576
- continue;
2577
- }
2578
- if (key3 === "class") {
2579
- var is_html = element2.namespaceURI === "http://www.w3.org/1999/xhtml";
2580
- set_class(element2, is_html, value, css_hash, prev?.[CLASS], next2[CLASS]);
2581
- current[key3] = value;
2582
- current[CLASS] = next2[CLASS];
2583
- continue;
2584
- }
2585
- if (key3 === "style") {
2586
- set_style(element2, value, prev?.[STYLE], next2[STYLE]);
2587
- current[key3] = value;
2588
- current[STYLE] = next2[STYLE];
2589
- continue;
2590
- }
2591
- var prev_value = current[key3];
2592
- if (value === prev_value && !(value === void 0 && element2.hasAttribute(key3))) {
2593
- continue;
2594
- }
2595
- current[key3] = value;
2596
- var prefix = key3[0] + key3[1];
2597
- if (prefix === "$$") continue;
2598
- if (prefix === "on") {
2599
- const opts = {};
2600
- const event_handle_key = "$$" + key3;
2601
- let event_name = key3.slice(2);
2602
- var is_delegated = can_delegate_event(event_name);
2603
- if (is_capture_event(event_name)) {
2604
- event_name = event_name.slice(0, -7);
2605
- opts.capture = true;
2606
- }
2607
- if (!is_delegated && prev_value) {
2608
- if (value != null) continue;
2609
- element2.removeEventListener(event_name, current[event_handle_key], opts);
2610
- current[event_handle_key] = null;
2611
- }
2612
- if (is_delegated) {
2613
- delegated(event_name, element2, value);
2614
- delegate([event_name]);
2615
- } else if (value != null) {
2616
- let handle = function(evt) {
2617
- current[key3].call(this, evt);
2618
- };
2619
- current[event_handle_key] = create_event(event_name, element2, handle, opts);
2620
- }
2621
- } else if (key3 === "style") {
2622
- set_attribute(element2, key3, value);
2623
- } else if (key3 === "autofocus") {
2624
- autofocus(
2625
- /** @type {HTMLElement} */
2626
- element2,
2627
- Boolean(value)
2628
- );
2629
- } else if (!is_custom_element && (key3 === "__value" || key3 === "value" && value != null)) {
2630
- element2.value = element2.__value = value;
2631
- } else if (key3 === "selected" && is_option_element) {
2632
- set_selected(
2633
- /** @type {HTMLOptionElement} */
2634
- element2,
2635
- value
2636
- );
2637
- } else {
2638
- var name = key3;
2639
- if (!preserve_attribute_case) {
2640
- name = normalize_attribute(name);
2641
- }
2642
- var is_default = name === "defaultValue" || name === "defaultChecked";
2643
- if (value == null && !is_custom_element && !is_default) {
2644
- attributes[key3] = null;
2645
- if (name === "value" || name === "checked") {
2646
- let input2 = (
2647
- /** @type {HTMLInputElement} */
2648
- element2
2649
- );
2650
- const use_default = prev === void 0;
2651
- if (name === "value") {
2652
- let previous = input2.defaultValue;
2653
- input2.removeAttribute(name);
2654
- input2.defaultValue = previous;
2655
- input2.value = input2.__value = use_default ? previous : null;
2656
- } else {
2657
- let previous = input2.defaultChecked;
2658
- input2.removeAttribute(name);
2659
- input2.defaultChecked = previous;
2660
- input2.checked = use_default ? previous : false;
2661
- }
2662
- } else {
2663
- element2.removeAttribute(key3);
2664
- }
2665
- } else if (is_default || setters.includes(name) && (is_custom_element || typeof value !== "string")) {
2666
- element2[name] = value;
2667
- if (name in attributes) attributes[name] = UNINITIALIZED;
2668
- } else if (typeof value !== "function") {
2669
- set_attribute(element2, name, value, skip_warning);
2670
- }
2671
- }
2672
- }
2673
- if (is_hydrating_custom_element) {
2674
- set_hydrating(true);
2675
- }
2676
- return current;
2677
- }
2678
- function attribute_effect(element2, fn, sync = [], async2 = [], blockers = [], css_hash, should_remove_defaults = false, skip_warning = false) {
2679
- flatten(blockers, sync, async2, (values) => {
2680
- var prev = void 0;
2681
- var effects = {};
2682
- var is_select = element2.nodeName === SELECT_TAG;
2683
- var inited = false;
2684
- managed(() => {
2685
- var next2 = fn(...values.map(get));
2686
- var current = set_attributes(
2687
- element2,
2688
- prev,
2689
- next2,
2690
- css_hash,
2691
- should_remove_defaults,
2692
- skip_warning
2693
- );
2694
- if (inited && is_select && "value" in next2) {
2695
- select_option(
2696
- /** @type {HTMLSelectElement} */
2697
- element2,
2698
- next2.value
2699
- );
2700
- }
2701
- for (let symbol of Object.getOwnPropertySymbols(effects)) {
2702
- if (!next2[symbol]) destroy_effect(effects[symbol]);
2703
- }
2704
- for (let symbol of Object.getOwnPropertySymbols(next2)) {
2705
- var n = next2[symbol];
2706
- if (symbol.description === ATTACHMENT_KEY && (!prev || n !== prev[symbol])) {
2707
- if (effects[symbol]) destroy_effect(effects[symbol]);
2708
- effects[symbol] = branch(() => attach(element2, () => n));
2709
- }
2710
- current[symbol] = n;
2711
- }
2712
- prev = current;
2713
- });
2714
- if (is_select) {
2715
- var select = (
2716
- /** @type {HTMLSelectElement} */
2717
- element2
2718
- );
2719
- effect(() => {
2720
- select_option(
2721
- select,
2722
- /** @type {Record<string | symbol, any>} */
2723
- prev.value,
2724
- true
2725
- );
2726
- init_select(select);
2727
- });
2728
- }
2729
- inited = true;
2730
- });
2731
- }
2732
- function get_attributes(element2) {
2733
- return (
2734
- /** @type {Record<string | symbol, unknown>} **/
2735
- // @ts-expect-error
2736
- element2.__attributes ??= {
2737
- [IS_CUSTOM_ELEMENT]: element2.nodeName.includes("-"),
2738
- [IS_HTML]: element2.namespaceURI === NAMESPACE_HTML
2739
- }
2740
- );
2741
- }
2742
- var setters_cache = /* @__PURE__ */ new Map();
2743
- function get_setters(element2) {
2744
- var cache_key = element2.getAttribute("is") || element2.nodeName;
2745
- var setters = setters_cache.get(cache_key);
2746
- if (setters) return setters;
2747
- setters_cache.set(cache_key, setters = []);
2748
- var descriptors;
2749
- var proto = element2;
2750
- var element_proto = Element.prototype;
2751
- while (element_proto !== proto) {
2752
- descriptors = get_descriptors(proto);
2753
- for (var key2 in descriptors) {
2754
- if (descriptors[key2].set) {
2755
- setters.push(key2);
2756
- }
2757
- }
2758
- proto = get_prototype_of(proto);
2759
- }
2760
- return setters;
2761
- }
2762
- function check_src_in_dev_hydration(element2, attribute, value) {
2763
- if (!true_default) return;
2764
- if (attribute === "srcset" && srcset_url_equal(element2, value)) return;
2765
- if (src_url_equal(element2.getAttribute(attribute) ?? "", value)) return;
2766
- hydration_attribute_changed(
2767
- attribute,
2768
- element2.outerHTML.replace(element2.innerHTML, element2.innerHTML && "..."),
2769
- String(value)
2770
- );
2771
- }
2772
- function src_url_equal(element_src, url) {
2773
- if (element_src === url) return true;
2774
- return new URL(element_src, document.baseURI).href === new URL(url, document.baseURI).href;
2775
- }
2776
- function split_srcset(srcset) {
2777
- return srcset.split(",").map((src) => src.trim().split(" ").filter(Boolean));
2778
- }
2779
- function srcset_url_equal(element2, srcset) {
2780
- var element_urls = split_srcset(element2.srcset);
2781
- var urls = split_srcset(srcset);
2782
- return urls.length === element_urls.length && urls.every(
2783
- ([url, width], i) => width === element_urls[i][1] && // We need to test both ways because Vite will create an a full URL with
2784
- // `new URL(asset, import.meta.url).href` for the client when `base: './'`, and the
2785
- // relative URLs inside srcset are not automatically resolved to absolute URLs by
2786
- // browsers (in contrast to img.src). This means both SSR and DOM code could
2787
- // contain relative or absolute URLs.
2788
- (src_url_equal(element_urls[i][0], url) || src_url_equal(url, element_urls[i][0]))
2789
- );
2790
- }
2791
-
2792
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/elements/customizable-select.js
2793
- var supported = null;
2794
- function is_supported() {
2795
- if (supported === null) {
2796
- var select = create_element("select");
2797
- select.innerHTML = create_trusted_html("<option><span>t</span></option>");
2798
- supported = /** @type {Element} */
2799
- select.firstChild?.firstChild?.nodeType === 1;
2800
- }
2801
- return supported;
2802
- }
2803
- function selectedcontent(element2, update_element) {
2804
- if (!is_supported()) return;
2805
- attach(element2, () => () => {
2806
- const select = element2.closest("select");
2807
- if (!select) return;
2808
- const observer = new MutationObserver((entries) => {
2809
- var selected = false;
2810
- for (const entry of entries) {
2811
- if (entry.target === element2) {
2812
- return;
2813
- }
2814
- selected ||= !!entry.target.parentElement?.closest("option")?.selected;
2815
- }
2816
- if (selected) {
2817
- element2.replaceWith(element2 = /** @type {HTMLElement} */
2818
- element2.cloneNode(true));
2819
- update_element(element2);
2820
- }
2821
- });
2822
- observer.observe(select, {
2823
- childList: true,
2824
- characterData: true,
2825
- subtree: true
2826
- });
2827
- return () => {
2828
- observer.disconnect();
2829
- };
2830
- });
2831
- }
2832
- function customizable_select(element2, rich_fn) {
2833
- var was_hydrating = hydrating;
2834
- if (!is_supported()) {
2835
- set_hydrating(false);
2836
- element2.textContent = "";
2837
- element2.append(create_comment(""));
2838
- }
2839
- try {
2840
- rich_fn();
2841
- } finally {
2842
- if (was_hydrating) {
2843
- if (hydrating) {
2844
- reset(element2);
2845
- } else {
2846
- set_hydrating(true);
2847
- set_hydrate_node(element2);
2848
- }
2849
- }
2850
- }
2851
- }
2852
-
2853
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/elements/bindings/document.js
2854
- function bind_active_element(update2) {
2855
- listen(document, ["focusin", "focusout"], (event2) => {
2856
- if (event2 && event2.type === "focusout" && /** @type {FocusEvent} */
2857
- event2.relatedTarget) {
2858
- return;
2859
- }
2860
- update2(document.activeElement);
2861
- });
2862
- }
2863
-
2864
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/elements/bindings/input.js
2865
- function bind_value(input, get2, set2 = get2) {
2866
- var batches = /* @__PURE__ */ new WeakSet();
2867
- listen_to_event_and_reset_event(input, "input", async (is_reset) => {
2868
- if (true_default && input.type === "checkbox") {
2869
- bind_invalid_checkbox_value();
2870
- }
2871
- var value = is_reset ? input.defaultValue : input.value;
2872
- value = is_numberlike_input(input) ? to_number(value) : value;
2873
- set2(value);
2874
- if (current_batch !== null) {
2875
- batches.add(current_batch);
2876
- }
2877
- await tick();
2878
- if (value !== (value = get2())) {
2879
- var start = input.selectionStart;
2880
- var end = input.selectionEnd;
2881
- var length = input.value.length;
2882
- input.value = value ?? "";
2883
- if (end !== null) {
2884
- var new_length = input.value.length;
2885
- if (start === end && end === length && new_length > length) {
2886
- input.selectionStart = new_length;
2887
- input.selectionEnd = new_length;
2888
- } else {
2889
- input.selectionStart = start;
2890
- input.selectionEnd = Math.min(end, new_length);
2891
- }
2892
- }
2893
- }
2894
- });
2895
- if (
2896
- // If we are hydrating and the value has since changed,
2897
- // then use the updated value from the input instead.
2898
- hydrating && input.defaultValue !== input.value || // If defaultValue is set, then value == defaultValue
2899
- // TODO Svelte 6: remove input.value check and set to empty string?
2900
- untrack(get2) == null && input.value
2901
- ) {
2902
- set2(is_numberlike_input(input) ? to_number(input.value) : input.value);
2903
- if (current_batch !== null) {
2904
- batches.add(current_batch);
2905
- }
2906
- }
2907
- render_effect(() => {
2908
- if (true_default && input.type === "checkbox") {
2909
- bind_invalid_checkbox_value();
2910
- }
2911
- var value = get2();
2912
- if (input === document.activeElement) {
2913
- var batch = (
2914
- /** @type {Batch} */
2915
- async_mode_flag ? previous_batch : current_batch
2916
- );
2917
- if (batches.has(batch)) {
2918
- return;
2919
- }
2920
- }
2921
- if (is_numberlike_input(input) && value === to_number(input.value)) {
2922
- return;
2923
- }
2924
- if (input.type === "date" && !value && !input.value) {
2925
- return;
2926
- }
2927
- if (value !== input.value) {
2928
- input.value = value ?? "";
2929
- }
2930
- });
2931
- }
2932
- var pending = /* @__PURE__ */ new Set();
2933
- function bind_group(inputs, group_index, input, get2, set2 = get2) {
2934
- var is_checkbox = input.getAttribute("type") === "checkbox";
2935
- var binding_group = inputs;
2936
- let hydration_mismatch2 = false;
2937
- if (group_index !== null) {
2938
- for (var index2 of group_index) {
2939
- binding_group = binding_group[index2] ??= [];
2940
- }
2941
- }
2942
- binding_group.push(input);
2943
- listen_to_event_and_reset_event(
2944
- input,
2945
- "change",
2946
- () => {
2947
- var value = input.__value;
2948
- if (is_checkbox) {
2949
- value = get_binding_group_value(binding_group, value, input.checked);
2950
- }
2951
- set2(value);
2952
- },
2953
- // TODO better default value handling
2954
- () => set2(is_checkbox ? [] : null)
2955
- );
2956
- render_effect(() => {
2957
- var value = get2();
2958
- if (hydrating && input.defaultChecked !== input.checked) {
2959
- hydration_mismatch2 = true;
2960
- return;
2961
- }
2962
- if (is_checkbox) {
2963
- value = value || [];
2964
- input.checked = value.includes(input.__value);
2965
- } else {
2966
- input.checked = is(input.__value, value);
2967
- }
2968
- });
2969
- teardown(() => {
2970
- var index3 = binding_group.indexOf(input);
2971
- if (index3 !== -1) {
2972
- binding_group.splice(index3, 1);
2973
- }
2974
- });
2975
- if (!pending.has(binding_group)) {
2976
- pending.add(binding_group);
2977
- queue_micro_task(() => {
2978
- binding_group.sort((a, b) => a.compareDocumentPosition(b) === 4 ? -1 : 1);
2979
- pending.delete(binding_group);
2980
- });
2981
- }
2982
- queue_micro_task(() => {
2983
- if (hydration_mismatch2) {
2984
- var value;
2985
- if (is_checkbox) {
2986
- value = get_binding_group_value(binding_group, value, input.checked);
2987
- } else {
2988
- var hydration_input = binding_group.find((input2) => input2.checked);
2989
- value = hydration_input?.__value;
2990
- }
2991
- set2(value);
2992
- }
2993
- });
2994
- }
2995
- function bind_checked(input, get2, set2 = get2) {
2996
- listen_to_event_and_reset_event(input, "change", (is_reset) => {
2997
- var value = is_reset ? input.defaultChecked : input.checked;
2998
- set2(value);
2999
- });
3000
- if (
3001
- // If we are hydrating and the value has since changed,
3002
- // then use the update value from the input instead.
3003
- hydrating && input.defaultChecked !== input.checked || // If defaultChecked is set, then checked == defaultChecked
3004
- untrack(get2) == null
3005
- ) {
3006
- set2(input.checked);
3007
- }
3008
- render_effect(() => {
3009
- var value = get2();
3010
- input.checked = Boolean(value);
3011
- });
3012
- }
3013
- function get_binding_group_value(group, __value, checked) {
3014
- var value = /* @__PURE__ */ new Set();
3015
- for (var i = 0; i < group.length; i += 1) {
3016
- if (group[i].checked) {
3017
- value.add(group[i].__value);
3018
- }
3019
- }
3020
- if (!checked) {
3021
- value.delete(__value);
3022
- }
3023
- return Array.from(value);
3024
- }
3025
- function is_numberlike_input(input) {
3026
- var type = input.type;
3027
- return type === "number" || type === "range";
3028
- }
3029
- function to_number(value) {
3030
- return value === "" ? null : +value;
3031
- }
3032
- function bind_files(input, get2, set2 = get2) {
3033
- listen_to_event_and_reset_event(input, "change", () => {
3034
- set2(input.files);
3035
- });
3036
- if (
3037
- // If we are hydrating and the value has since changed,
3038
- // then use the updated value from the input instead.
3039
- hydrating && input.files
3040
- ) {
3041
- set2(input.files);
3042
- }
3043
- render_effect(() => {
3044
- input.files = get2();
3045
- });
3046
- }
3047
-
3048
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/elements/bindings/media.js
3049
- function time_ranges_to_array(ranges) {
3050
- var array = [];
3051
- for (var i = 0; i < ranges.length; i += 1) {
3052
- array.push({ start: ranges.start(i), end: ranges.end(i) });
3053
- }
3054
- return array;
3055
- }
3056
- function bind_current_time(media, get2, set2 = get2) {
3057
- var raf_id;
3058
- var value;
3059
- var callback = () => {
3060
- cancelAnimationFrame(raf_id);
3061
- if (!media.paused) {
3062
- raf_id = requestAnimationFrame(callback);
3063
- }
3064
- var next_value = media.currentTime;
3065
- if (value !== next_value) {
3066
- set2(value = next_value);
3067
- }
3068
- };
3069
- raf_id = requestAnimationFrame(callback);
3070
- media.addEventListener("timeupdate", callback);
3071
- render_effect(() => {
3072
- var next_value = Number(get2());
3073
- if (value !== next_value && !isNaN(
3074
- /** @type {any} */
3075
- next_value
3076
- )) {
3077
- media.currentTime = value = next_value;
3078
- }
3079
- });
3080
- teardown(() => {
3081
- cancelAnimationFrame(raf_id);
3082
- media.removeEventListener("timeupdate", callback);
3083
- });
3084
- }
3085
- function bind_buffered(media, set2) {
3086
- var current;
3087
- listen(media, ["loadedmetadata", "progress", "timeupdate", "seeking"], () => {
3088
- var ranges = media.buffered;
3089
- if (!current || current.length !== ranges.length || current.some((range, i) => ranges.start(i) !== range.start || ranges.end(i) !== range.end)) {
3090
- current = time_ranges_to_array(ranges);
3091
- set2(current);
3092
- }
3093
- });
3094
- }
3095
- function bind_seekable(media, set2) {
3096
- listen(media, ["loadedmetadata"], () => set2(time_ranges_to_array(media.seekable)));
3097
- }
3098
- function bind_played(media, set2) {
3099
- listen(media, ["timeupdate"], () => set2(time_ranges_to_array(media.played)));
3100
- }
3101
- function bind_seeking(media, set2) {
3102
- listen(media, ["seeking", "seeked"], () => set2(media.seeking));
3103
- }
3104
- function bind_ended(media, set2) {
3105
- listen(media, ["timeupdate", "ended"], () => set2(media.ended));
3106
- }
3107
- function bind_ready_state(media, set2) {
3108
- listen(
3109
- media,
3110
- ["loadedmetadata", "loadeddata", "canplay", "canplaythrough", "playing", "waiting", "emptied"],
3111
- () => set2(media.readyState)
3112
- );
3113
- }
3114
- function bind_playback_rate(media, get2, set2 = get2) {
3115
- effect(() => {
3116
- var value = Number(get2());
3117
- if (value !== media.playbackRate && !isNaN(value)) {
3118
- media.playbackRate = value;
3119
- }
3120
- });
3121
- effect(() => {
3122
- listen(media, ["ratechange"], () => {
3123
- set2(media.playbackRate);
3124
- });
3125
- });
3126
- }
3127
- function bind_paused(media, get2, set2 = get2) {
3128
- var paused = get2();
3129
- var update2 = () => {
3130
- if (paused !== media.paused) {
3131
- set2(paused = media.paused);
3132
- }
3133
- };
3134
- listen(media, ["play", "pause", "canplay"], update2, paused == null);
3135
- effect(() => {
3136
- if ((paused = !!get2()) !== media.paused) {
3137
- if (paused) {
3138
- media.pause();
3139
- } else {
3140
- media.play().catch((error) => {
3141
- set2(paused = true);
3142
- throw error;
3143
- });
3144
- }
3145
- }
3146
- });
3147
- }
3148
- function bind_volume(media, get2, set2 = get2) {
3149
- var callback = () => {
3150
- set2(media.volume);
3151
- };
3152
- if (get2() == null) {
3153
- callback();
3154
- }
3155
- listen(media, ["volumechange"], callback, false);
3156
- render_effect(() => {
3157
- var value = Number(get2());
3158
- if (value !== media.volume && !isNaN(value)) {
3159
- media.volume = value;
3160
- }
3161
- });
3162
- }
3163
- function bind_muted(media, get2, set2 = get2) {
3164
- var callback = () => {
3165
- set2(media.muted);
3166
- };
3167
- if (get2() == null) {
3168
- callback();
3169
- }
3170
- listen(media, ["volumechange"], callback, false);
3171
- render_effect(() => {
3172
- var value = !!get2();
3173
- if (media.muted !== value) media.muted = value;
3174
- });
3175
- }
3176
-
3177
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/elements/bindings/navigator.js
3178
- function bind_online(update2) {
3179
- listen(window, ["online", "offline"], () => {
3180
- update2(navigator.onLine);
3181
- });
3182
- }
3183
-
3184
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/elements/bindings/props.js
3185
- function bind_prop(props, prop2, value) {
3186
- var desc = get_descriptor(props, prop2);
3187
- if (desc && desc.set) {
3188
- props[prop2] = value;
3189
- teardown(() => {
3190
- props[prop2] = null;
3191
- });
3192
- }
3193
- }
3194
-
3195
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/elements/bindings/size.js
3196
- var ResizeObserverSingleton = class _ResizeObserverSingleton {
3197
- /** */
3198
- #listeners = /* @__PURE__ */ new WeakMap();
3199
- /** @type {ResizeObserver | undefined} */
3200
- #observer;
3201
- /** @type {ResizeObserverOptions} */
3202
- #options;
3203
- /** @static */
3204
- static entries = /* @__PURE__ */ new WeakMap();
3205
- /** @param {ResizeObserverOptions} options */
3206
- constructor(options) {
3207
- this.#options = options;
3208
- }
3209
- /**
3210
- * @param {Element} element
3211
- * @param {(entry: ResizeObserverEntry) => any} listener
3212
- */
3213
- observe(element2, listener) {
3214
- var listeners = this.#listeners.get(element2) || /* @__PURE__ */ new Set();
3215
- listeners.add(listener);
3216
- this.#listeners.set(element2, listeners);
3217
- this.#getObserver().observe(element2, this.#options);
3218
- return () => {
3219
- var listeners2 = this.#listeners.get(element2);
3220
- listeners2.delete(listener);
3221
- if (listeners2.size === 0) {
3222
- this.#listeners.delete(element2);
3223
- this.#observer.unobserve(element2);
3224
- }
3225
- };
3226
- }
3227
- #getObserver() {
3228
- return this.#observer ?? (this.#observer = new ResizeObserver(
3229
- /** @param {any} entries */
3230
- (entries) => {
3231
- for (var entry of entries) {
3232
- _ResizeObserverSingleton.entries.set(entry.target, entry);
3233
- for (var listener of this.#listeners.get(entry.target) || []) {
3234
- listener(entry);
3235
- }
3236
- }
3237
- }
3238
- ));
3239
- }
3240
- };
3241
- var resize_observer_content_box = new ResizeObserverSingleton({
3242
- box: "content-box"
3243
- });
3244
- var resize_observer_border_box = new ResizeObserverSingleton({
3245
- box: "border-box"
3246
- });
3247
- var resize_observer_device_pixel_content_box = new ResizeObserverSingleton({
3248
- box: "device-pixel-content-box"
3249
- });
3250
- function bind_resize_observer(element2, type, set2) {
3251
- var observer = type === "contentRect" || type === "contentBoxSize" ? resize_observer_content_box : type === "borderBoxSize" ? resize_observer_border_box : resize_observer_device_pixel_content_box;
3252
- var unsub = observer.observe(
3253
- element2,
3254
- /** @param {any} entry */
3255
- (entry) => set2(entry[type])
3256
- );
3257
- teardown(unsub);
3258
- }
3259
- function bind_element_size(element2, type, set2) {
3260
- var unsub = resize_observer_border_box.observe(element2, () => set2(element2[type]));
3261
- effect(() => {
3262
- untrack(() => set2(element2[type]));
3263
- return unsub;
3264
- });
3265
- }
3266
-
3267
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/elements/bindings/this.js
3268
- function is_bound_this(bound_value, element_or_component) {
3269
- return bound_value === element_or_component || bound_value?.[STATE_SYMBOL] === element_or_component;
3270
- }
3271
- function bind_this(element_or_component = {}, update2, get_value, get_parts) {
3272
- var component_effect = (
3273
- /** @type {ComponentContext} */
3274
- component_context.r
3275
- );
3276
- var parent = (
3277
- /** @type {Effect} */
3278
- active_effect
3279
- );
3280
- effect(() => {
3281
- var old_parts;
3282
- var parts;
3283
- render_effect(() => {
3284
- old_parts = parts;
3285
- parts = get_parts?.() || [];
3286
- untrack(() => {
3287
- if (element_or_component !== get_value(...parts)) {
3288
- update2(element_or_component, ...parts);
3289
- if (old_parts && is_bound_this(get_value(...old_parts), element_or_component)) {
3290
- update2(null, ...old_parts);
3291
- }
3292
- }
3293
- });
3294
- });
3295
- return () => {
3296
- let p = parent;
3297
- while (p !== component_effect && p.parent !== null && p.parent.f & DESTROYING) {
3298
- p = p.parent;
3299
- }
3300
- const teardown2 = () => {
3301
- if (parts && is_bound_this(get_value(...parts), element_or_component)) {
3302
- update2(null, ...parts);
3303
- }
3304
- };
3305
- const original_teardown = p.teardown;
3306
- p.teardown = () => {
3307
- teardown2();
3308
- original_teardown?.();
3309
- };
3310
- };
3311
- });
3312
- return element_or_component;
3313
- }
3314
-
3315
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/elements/bindings/universal.js
3316
- function bind_content_editable(property, element2, get2, set2 = get2) {
3317
- element2.addEventListener("input", () => {
3318
- set2(element2[property]);
3319
- });
3320
- render_effect(() => {
3321
- var value = get2();
3322
- if (element2[property] !== value) {
3323
- if (value == null) {
3324
- var non_null_value = element2[property];
3325
- set2(non_null_value);
3326
- } else {
3327
- element2[property] = value + "";
3328
- }
3329
- }
3330
- });
3331
- }
3332
- function bind_property(property, event_name, element2, set2, get2) {
3333
- var handler = () => {
3334
- set2(element2[property]);
3335
- };
3336
- element2.addEventListener(event_name, handler);
3337
- if (get2) {
3338
- render_effect(() => {
3339
- element2[property] = get2();
3340
- });
3341
- } else {
3342
- handler();
3343
- }
3344
- if (element2 === document.body || element2 === window || element2 === document) {
3345
- teardown(() => {
3346
- element2.removeEventListener(event_name, handler);
3347
- });
3348
- }
3349
- }
3350
- function bind_focused(element2, set2) {
3351
- listen(element2, ["focus", "blur"], () => {
3352
- set2(element2 === document.activeElement);
3353
- });
3354
- }
3355
-
3356
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/elements/bindings/window.js
3357
- function bind_window_scroll(type, get2, set2 = get2) {
3358
- var is_scrolling_x = type === "x";
3359
- var target_handler = () => without_reactive_context(() => {
3360
- scrolling = true;
3361
- clearTimeout(timeout);
3362
- timeout = setTimeout(clear, 100);
3363
- set2(window[is_scrolling_x ? "scrollX" : "scrollY"]);
3364
- });
3365
- addEventListener("scroll", target_handler, {
3366
- passive: true
3367
- });
3368
- var scrolling = false;
3369
- var timeout;
3370
- var clear = () => {
3371
- scrolling = false;
3372
- };
3373
- var first = true;
3374
- render_effect(() => {
3375
- var latest_value = get2();
3376
- if (first) {
3377
- first = false;
3378
- } else if (!scrolling && latest_value != null) {
3379
- scrolling = true;
3380
- clearTimeout(timeout);
3381
- if (is_scrolling_x) {
3382
- scrollTo(latest_value, window.scrollY);
3383
- } else {
3384
- scrollTo(window.scrollX, latest_value);
3385
- }
3386
- timeout = setTimeout(clear, 100);
3387
- }
3388
- });
3389
- effect(target_handler);
3390
- teardown(() => {
3391
- removeEventListener("scroll", target_handler);
3392
- });
3393
- }
3394
- function bind_window_size(type, set2) {
3395
- listen(window, ["resize"], () => without_reactive_context(() => set2(window[type])));
3396
- }
3397
-
3398
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/legacy/lifecycle.js
3399
- function init(immutable = false) {
3400
- const context = (
3401
- /** @type {ComponentContextLegacy} */
3402
- component_context
3403
- );
3404
- const callbacks = context.l.u;
3405
- if (!callbacks) return;
3406
- let props = () => deep_read_state(context.s);
3407
- if (immutable) {
3408
- let version = 0;
3409
- let prev = (
3410
- /** @type {Record<string, any>} */
3411
- {}
3412
- );
3413
- const d = derived(() => {
3414
- let changed = false;
3415
- const props2 = context.s;
3416
- for (const key2 in props2) {
3417
- if (props2[key2] !== prev[key2]) {
3418
- prev[key2] = props2[key2];
3419
- changed = true;
3420
- }
3421
- }
3422
- if (changed) version++;
3423
- return version;
3424
- });
3425
- props = () => get(d);
3426
- }
3427
- if (callbacks.b.length) {
3428
- user_pre_effect(() => {
3429
- observe_all(context, props);
3430
- run_all(callbacks.b);
3431
- });
3432
- }
3433
- user_effect(() => {
3434
- const fns = untrack(() => callbacks.m.map(run));
3435
- return () => {
3436
- for (const fn of fns) {
3437
- if (typeof fn === "function") {
3438
- fn();
3439
- }
3440
- }
3441
- };
3442
- });
3443
- if (callbacks.a.length) {
3444
- user_effect(() => {
3445
- observe_all(context, props);
3446
- run_all(callbacks.a);
3447
- });
3448
- }
3449
- }
3450
- function observe_all(context, props) {
3451
- if (context.l.s) {
3452
- for (const signal of context.l.s) get(signal);
3453
- }
3454
- props();
3455
- }
3456
-
3457
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/legacy/misc.js
3458
- function reactive_import(fn) {
3459
- var s = source(0);
3460
- return function() {
3461
- if (arguments.length === 1) {
3462
- set(s, get(s) + 1);
3463
- return arguments[0];
3464
- } else {
3465
- get(s);
3466
- return fn();
3467
- }
3468
- };
3469
- }
3470
- function bubble_event($$props, event2) {
3471
- var events = (
3472
- /** @type {Record<string, Function[] | Function>} */
3473
- $$props.$$events?.[event2.type]
3474
- );
3475
- var callbacks = is_array(events) ? events.slice() : events == null ? [] : [events];
3476
- for (var fn of callbacks) {
3477
- fn.call(this, event2);
3478
- }
3479
- }
3480
- function add_legacy_event_listener($$props, event_name, event_callback) {
3481
- $$props.$$events ||= {};
3482
- $$props.$$events[event_name] ||= [];
3483
- $$props.$$events[event_name].push(event_callback);
3484
- }
3485
- function update_legacy_props($$new_props) {
3486
- for (var key2 in $$new_props) {
3487
- if (key2 in this) {
3488
- this[key2] = $$new_props[key2];
3489
- }
3490
- }
3491
- }
3492
-
3493
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/reactivity/props.js
3494
- function update_prop(fn, d = 1) {
3495
- const value = fn();
3496
- fn(value + d);
3497
- return value;
3498
- }
3499
- function update_pre_prop(fn, d = 1) {
3500
- const value = fn() + d;
3501
- fn(value);
3502
- return value;
3503
- }
3504
- var rest_props_handler = {
3505
- get(target, key2) {
3506
- if (target.exclude.includes(key2)) return;
3507
- return target.props[key2];
3508
- },
3509
- set(target, key2) {
3510
- if (true_default) {
3511
- props_rest_readonly(`${target.name}.${String(key2)}`);
3512
- }
3513
- return false;
3514
- },
3515
- getOwnPropertyDescriptor(target, key2) {
3516
- if (target.exclude.includes(key2)) return;
3517
- if (key2 in target.props) {
3518
- return {
3519
- enumerable: true,
3520
- configurable: true,
3521
- value: target.props[key2]
3522
- };
3523
- }
3524
- },
3525
- has(target, key2) {
3526
- if (target.exclude.includes(key2)) return false;
3527
- return key2 in target.props;
3528
- },
3529
- ownKeys(target) {
3530
- return Reflect.ownKeys(target.props).filter((key2) => !target.exclude.includes(key2));
3531
- }
3532
- };
3533
- function rest_props(props, exclude, name) {
3534
- return new Proxy(
3535
- true_default ? { props, exclude, name, other: {}, to_proxy: [] } : { props, exclude },
3536
- rest_props_handler
3537
- );
3538
- }
3539
- var legacy_rest_props_handler = {
3540
- get(target, key2) {
3541
- if (target.exclude.includes(key2)) return;
3542
- get(target.version);
3543
- return key2 in target.special ? target.special[key2]() : target.props[key2];
3544
- },
3545
- set(target, key2, value) {
3546
- if (!(key2 in target.special)) {
3547
- var previous_effect = active_effect;
3548
- try {
3549
- set_active_effect(target.parent_effect);
3550
- target.special[key2] = prop(
3551
- {
3552
- get [key2]() {
3553
- return target.props[key2];
3554
- }
3555
- },
3556
- /** @type {string} */
3557
- key2,
3558
- PROPS_IS_UPDATED
3559
- );
3560
- } finally {
3561
- set_active_effect(previous_effect);
3562
- }
3563
- }
3564
- target.special[key2](value);
3565
- update(target.version);
3566
- return true;
3567
- },
3568
- getOwnPropertyDescriptor(target, key2) {
3569
- if (target.exclude.includes(key2)) return;
3570
- if (key2 in target.props) {
3571
- return {
3572
- enumerable: true,
3573
- configurable: true,
3574
- value: target.props[key2]
3575
- };
3576
- }
3577
- },
3578
- deleteProperty(target, key2) {
3579
- if (target.exclude.includes(key2)) return true;
3580
- target.exclude.push(key2);
3581
- update(target.version);
3582
- return true;
3583
- },
3584
- has(target, key2) {
3585
- if (target.exclude.includes(key2)) return false;
3586
- return key2 in target.props;
3587
- },
3588
- ownKeys(target) {
3589
- return Reflect.ownKeys(target.props).filter((key2) => !target.exclude.includes(key2));
3590
- }
3591
- };
3592
- function legacy_rest_props(props, exclude) {
3593
- return new Proxy(
3594
- {
3595
- props,
3596
- exclude,
3597
- special: {},
3598
- version: source(0),
3599
- // TODO this is only necessary because we need to track component
3600
- // destruction inside `prop`, because of `bind:this`, but it
3601
- // seems likely that we can simplify `bind:this` instead
3602
- parent_effect: (
3603
- /** @type {Effect} */
3604
- active_effect
3605
- )
3606
- },
3607
- legacy_rest_props_handler
3608
- );
3609
- }
3610
- var spread_props_handler = {
3611
- get(target, key2) {
3612
- let i = target.props.length;
3613
- while (i--) {
3614
- let p = target.props[i];
3615
- if (is_function(p)) p = p();
3616
- if (typeof p === "object" && p !== null && key2 in p) return p[key2];
3617
- }
3618
- },
3619
- set(target, key2, value) {
3620
- let i = target.props.length;
3621
- while (i--) {
3622
- let p = target.props[i];
3623
- if (is_function(p)) p = p();
3624
- const desc = get_descriptor(p, key2);
3625
- if (desc && desc.set) {
3626
- desc.set(value);
3627
- return true;
3628
- }
3629
- }
3630
- return false;
3631
- },
3632
- getOwnPropertyDescriptor(target, key2) {
3633
- let i = target.props.length;
3634
- while (i--) {
3635
- let p = target.props[i];
3636
- if (is_function(p)) p = p();
3637
- if (typeof p === "object" && p !== null && key2 in p) {
3638
- const descriptor = get_descriptor(p, key2);
3639
- if (descriptor && !descriptor.configurable) {
3640
- descriptor.configurable = true;
3641
- }
3642
- return descriptor;
3643
- }
3644
- }
3645
- },
3646
- has(target, key2) {
3647
- if (key2 === STATE_SYMBOL || key2 === LEGACY_PROPS) return false;
3648
- for (let p of target.props) {
3649
- if (is_function(p)) p = p();
3650
- if (p != null && key2 in p) return true;
3651
- }
3652
- return false;
3653
- },
3654
- ownKeys(target) {
3655
- const keys = [];
3656
- for (let p of target.props) {
3657
- if (is_function(p)) p = p();
3658
- if (!p) continue;
3659
- for (const key2 in p) {
3660
- if (!keys.includes(key2)) keys.push(key2);
3661
- }
3662
- for (const key2 of Object.getOwnPropertySymbols(p)) {
3663
- if (!keys.includes(key2)) keys.push(key2);
3664
- }
3665
- }
3666
- return keys;
3667
- }
3668
- };
3669
- function spread_props(...props) {
3670
- return new Proxy({ props }, spread_props_handler);
3671
- }
3672
- function prop(props, key2, flags, fallback2) {
3673
- var runes = !legacy_mode_flag || (flags & PROPS_IS_RUNES) !== 0;
3674
- var bindable = (flags & PROPS_IS_BINDABLE) !== 0;
3675
- var lazy = (flags & PROPS_IS_LAZY_INITIAL) !== 0;
3676
- var fallback_value = (
3677
- /** @type {V} */
3678
- fallback2
3679
- );
3680
- var fallback_dirty = true;
3681
- var get_fallback = () => {
3682
- if (fallback_dirty) {
3683
- fallback_dirty = false;
3684
- fallback_value = lazy ? untrack(
3685
- /** @type {() => V} */
3686
- fallback2
3687
- ) : (
3688
- /** @type {V} */
3689
- fallback2
3690
- );
3691
- }
3692
- return fallback_value;
3693
- };
3694
- let setter;
3695
- if (bindable) {
3696
- var is_entry_props = STATE_SYMBOL in props || LEGACY_PROPS in props;
3697
- setter = get_descriptor(props, key2)?.set ?? (is_entry_props && key2 in props ? (v) => props[key2] = v : void 0);
3698
- }
3699
- var initial_value;
3700
- var is_store_sub = false;
3701
- if (bindable) {
3702
- [initial_value, is_store_sub] = capture_store_binding(() => (
3703
- /** @type {V} */
3704
- props[key2]
3705
- ));
3706
- } else {
3707
- initial_value = /** @type {V} */
3708
- props[key2];
3709
- }
3710
- if (initial_value === void 0 && fallback2 !== void 0) {
3711
- initial_value = get_fallback();
3712
- if (setter) {
3713
- if (runes) props_invalid_value(key2);
3714
- setter(initial_value);
3715
- }
3716
- }
3717
- var getter;
3718
- if (runes) {
3719
- getter = () => {
3720
- var value = (
3721
- /** @type {V} */
3722
- props[key2]
3723
- );
3724
- if (value === void 0) return get_fallback();
3725
- fallback_dirty = true;
3726
- return value;
3727
- };
3728
- } else {
3729
- getter = () => {
3730
- var value = (
3731
- /** @type {V} */
3732
- props[key2]
3733
- );
3734
- if (value !== void 0) {
3735
- fallback_value = /** @type {V} */
3736
- void 0;
3737
- }
3738
- return value === void 0 ? fallback_value : value;
3739
- };
3740
- }
3741
- if (runes && (flags & PROPS_IS_UPDATED) === 0) {
3742
- return getter;
3743
- }
3744
- if (setter) {
3745
- var legacy_parent = props.$$legacy;
3746
- return (
3747
- /** @type {() => V} */
3748
- (function(value, mutation) {
3749
- if (arguments.length > 0) {
3750
- if (!runes || !mutation || legacy_parent || is_store_sub) {
3751
- setter(mutation ? getter() : value);
3752
- }
3753
- return value;
3754
- }
3755
- return getter();
3756
- })
3757
- );
3758
- }
3759
- var overridden = false;
3760
- var d = ((flags & PROPS_IS_IMMUTABLE) !== 0 ? derived : derived_safe_equal)(() => {
3761
- overridden = false;
3762
- return getter();
3763
- });
3764
- if (true_default) {
3765
- d.label = key2;
3766
- }
3767
- if (bindable) get(d);
3768
- var parent_effect = (
3769
- /** @type {Effect} */
3770
- active_effect
3771
- );
3772
- return (
3773
- /** @type {() => V} */
3774
- (function(value, mutation) {
3775
- if (arguments.length > 0) {
3776
- const new_value = mutation ? get(d) : runes && bindable ? proxy(value) : value;
3777
- set(d, new_value);
3778
- overridden = true;
3779
- if (fallback_value !== void 0) {
3780
- fallback_value = new_value;
3781
- }
3782
- return value;
3783
- }
3784
- if (is_destroying_effect && overridden || (parent_effect.f & DESTROYED) !== 0) {
3785
- return d.v;
3786
- }
3787
- return get(d);
3788
- })
3789
- );
3790
- }
3791
-
3792
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/validate.js
3793
- function validate_binding(binding, blockers, get_object, get_property, line, column) {
3794
- run_after_blockers(blockers, () => {
3795
- var warned = false;
3796
- var filename = dev_current_component_function?.[FILENAME];
3797
- render_effect(() => {
3798
- if (warned) return;
3799
- var [object, is_store_sub] = capture_store_binding(get_object);
3800
- if (is_store_sub) return;
3801
- var property = get_property();
3802
- var ran = false;
3803
- var effect2 = render_effect(() => {
3804
- if (ran) return;
3805
- object[property];
3806
- });
3807
- ran = true;
3808
- if (effect2.deps === null) {
3809
- var location = `${filename}:${line}:${column}`;
3810
- binding_property_non_reactive(binding, location);
3811
- warned = true;
3812
- }
3813
- });
3814
- });
3815
- }
3816
-
3817
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dom/elements/custom-element.js
3818
- var SvelteElement;
3819
- if (typeof HTMLElement === "function") {
3820
- SvelteElement = class extends HTMLElement {
3821
- /** The Svelte component constructor */
3822
- $$ctor;
3823
- /** Slots */
3824
- $$s;
3825
- /** @type {any} The Svelte component instance */
3826
- $$c;
3827
- /** Whether or not the custom element is connected */
3828
- $$cn = false;
3829
- /** @type {Record<string, any>} Component props data */
3830
- $$d = {};
3831
- /** `true` if currently in the process of reflecting component props back to attributes */
3832
- $$r = false;
3833
- /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
3834
- $$p_d = {};
3835
- /** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
3836
- $$l = {};
3837
- /** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
3838
- $$l_u = /* @__PURE__ */ new Map();
3839
- /** @type {any} The managed render effect for reflecting attributes */
3840
- $$me;
3841
- /** @type {ShadowRoot | null} The ShadowRoot of the custom element */
3842
- $$shadowRoot = null;
3843
- /**
3844
- * @param {*} $$componentCtor
3845
- * @param {*} $$slots
3846
- * @param {ShadowRootInit | undefined} shadow_root_init
3847
- */
3848
- constructor($$componentCtor, $$slots, shadow_root_init) {
3849
- super();
3850
- this.$$ctor = $$componentCtor;
3851
- this.$$s = $$slots;
3852
- if (shadow_root_init) {
3853
- this.$$shadowRoot = this.attachShadow(shadow_root_init);
3854
- }
3855
- }
3856
- /**
3857
- * @param {string} type
3858
- * @param {EventListenerOrEventListenerObject} listener
3859
- * @param {boolean | AddEventListenerOptions} [options]
3860
- */
3861
- addEventListener(type, listener, options) {
3862
- this.$$l[type] = this.$$l[type] || [];
3863
- this.$$l[type].push(listener);
3864
- if (this.$$c) {
3865
- const unsub = this.$$c.$on(type, listener);
3866
- this.$$l_u.set(listener, unsub);
3867
- }
3868
- super.addEventListener(type, listener, options);
3869
- }
3870
- /**
3871
- * @param {string} type
3872
- * @param {EventListenerOrEventListenerObject} listener
3873
- * @param {boolean | AddEventListenerOptions} [options]
3874
- */
3875
- removeEventListener(type, listener, options) {
3876
- super.removeEventListener(type, listener, options);
3877
- if (this.$$c) {
3878
- const unsub = this.$$l_u.get(listener);
3879
- if (unsub) {
3880
- unsub();
3881
- this.$$l_u.delete(listener);
3882
- }
3883
- }
3884
- }
3885
- async connectedCallback() {
3886
- this.$$cn = true;
3887
- if (!this.$$c) {
3888
- let create_slot = function(name) {
3889
- return (anchor) => {
3890
- const slot2 = create_element("slot");
3891
- if (name !== "default") slot2.name = name;
3892
- append(anchor, slot2);
3893
- };
3894
- };
3895
- await Promise.resolve();
3896
- if (!this.$$cn || this.$$c) {
3897
- return;
3898
- }
3899
- const $$slots = {};
3900
- const existing_slots = get_custom_elements_slots(this);
3901
- for (const name of this.$$s) {
3902
- if (name in existing_slots) {
3903
- if (name === "default" && !this.$$d.children) {
3904
- this.$$d.children = create_slot(name);
3905
- $$slots.default = true;
3906
- } else {
3907
- $$slots[name] = create_slot(name);
3908
- }
3909
- }
3910
- }
3911
- for (const attribute of this.attributes) {
3912
- const name = this.$$g_p(attribute.name);
3913
- if (!(name in this.$$d)) {
3914
- this.$$d[name] = get_custom_element_value(name, attribute.value, this.$$p_d, "toProp");
3915
- }
3916
- }
3917
- for (const key2 in this.$$p_d) {
3918
- if (!(key2 in this.$$d) && this[key2] !== void 0) {
3919
- this.$$d[key2] = this[key2];
3920
- delete this[key2];
3921
- }
3922
- }
3923
- this.$$c = createClassComponent({
3924
- component: this.$$ctor,
3925
- target: this.$$shadowRoot || this,
3926
- props: {
3927
- ...this.$$d,
3928
- $$slots,
3929
- $$host: this
3930
- }
3931
- });
3932
- this.$$me = effect_root(() => {
3933
- render_effect(() => {
3934
- this.$$r = true;
3935
- for (const key2 of object_keys(this.$$c)) {
3936
- if (!this.$$p_d[key2]?.reflect) continue;
3937
- this.$$d[key2] = this.$$c[key2];
3938
- const attribute_value = get_custom_element_value(
3939
- key2,
3940
- this.$$d[key2],
3941
- this.$$p_d,
3942
- "toAttribute"
3943
- );
3944
- if (attribute_value == null) {
3945
- this.removeAttribute(this.$$p_d[key2].attribute || key2);
3946
- } else {
3947
- this.setAttribute(this.$$p_d[key2].attribute || key2, attribute_value);
3948
- }
3949
- }
3950
- this.$$r = false;
3951
- });
3952
- });
3953
- for (const type in this.$$l) {
3954
- for (const listener of this.$$l[type]) {
3955
- const unsub = this.$$c.$on(type, listener);
3956
- this.$$l_u.set(listener, unsub);
3957
- }
3958
- }
3959
- this.$$l = {};
3960
- }
3961
- }
3962
- // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
3963
- // and setting attributes through setAttribute etc, this is helpful
3964
- /**
3965
- * @param {string} attr
3966
- * @param {string} _oldValue
3967
- * @param {string} newValue
3968
- */
3969
- attributeChangedCallback(attr2, _oldValue, newValue) {
3970
- if (this.$$r) return;
3971
- attr2 = this.$$g_p(attr2);
3972
- this.$$d[attr2] = get_custom_element_value(attr2, newValue, this.$$p_d, "toProp");
3973
- this.$$c?.$set({ [attr2]: this.$$d[attr2] });
3974
- }
3975
- disconnectedCallback() {
3976
- this.$$cn = false;
3977
- Promise.resolve().then(() => {
3978
- if (!this.$$cn && this.$$c) {
3979
- this.$$c.$destroy();
3980
- this.$$me();
3981
- this.$$c = void 0;
3982
- }
3983
- });
3984
- }
3985
- /**
3986
- * @param {string} attribute_name
3987
- */
3988
- $$g_p(attribute_name) {
3989
- return object_keys(this.$$p_d).find(
3990
- (key2) => this.$$p_d[key2].attribute === attribute_name || !this.$$p_d[key2].attribute && key2.toLowerCase() === attribute_name
3991
- ) || attribute_name;
3992
- }
3993
- };
3994
- }
3995
- function get_custom_element_value(prop2, value, props_definition, transform) {
3996
- const type = props_definition[prop2]?.type;
3997
- value = type === "Boolean" && typeof value !== "boolean" ? value != null : value;
3998
- if (!transform || !props_definition[prop2]) {
3999
- return value;
4000
- } else if (transform === "toAttribute") {
4001
- switch (type) {
4002
- case "Object":
4003
- case "Array":
4004
- return value == null ? null : JSON.stringify(value);
4005
- case "Boolean":
4006
- return value ? "" : null;
4007
- case "Number":
4008
- return value == null ? null : value;
4009
- default:
4010
- return value;
4011
- }
4012
- } else {
4013
- switch (type) {
4014
- case "Object":
4015
- case "Array":
4016
- return value && JSON.parse(value);
4017
- case "Boolean":
4018
- return value;
4019
- // conversion already handled above
4020
- case "Number":
4021
- return value != null ? +value : value;
4022
- default:
4023
- return value;
4024
- }
4025
- }
4026
- }
4027
- function get_custom_elements_slots(element2) {
4028
- const result = {};
4029
- element2.childNodes.forEach((node) => {
4030
- result[
4031
- /** @type {Element} node */
4032
- node.slot || "default"
4033
- ] = true;
4034
- });
4035
- return result;
4036
- }
4037
- function create_custom_element(Component, props_definition, slots, exports, shadow_root_init, extend) {
4038
- let Class = class extends SvelteElement {
4039
- constructor() {
4040
- super(Component, slots, shadow_root_init);
4041
- this.$$p_d = props_definition;
4042
- }
4043
- static get observedAttributes() {
4044
- return object_keys(props_definition).map(
4045
- (key2) => (props_definition[key2].attribute || key2).toLowerCase()
4046
- );
4047
- }
4048
- };
4049
- object_keys(props_definition).forEach((prop2) => {
4050
- define_property(Class.prototype, prop2, {
4051
- get() {
4052
- return this.$$c && prop2 in this.$$c ? this.$$c[prop2] : this.$$d[prop2];
4053
- },
4054
- set(value) {
4055
- value = get_custom_element_value(prop2, value, props_definition);
4056
- this.$$d[prop2] = value;
4057
- var component2 = this.$$c;
4058
- if (component2) {
4059
- var setter = get_descriptor(component2, prop2)?.get;
4060
- if (setter) {
4061
- component2[prop2] = value;
4062
- } else {
4063
- component2.$set({ [prop2]: value });
4064
- }
4065
- }
4066
- }
4067
- });
4068
- });
4069
- exports.forEach((property) => {
4070
- define_property(Class.prototype, property, {
4071
- get() {
4072
- return this.$$c?.[property];
4073
- }
4074
- });
4075
- });
4076
- if (extend) {
4077
- Class = extend(Class);
4078
- }
4079
- Component.element = /** @type {any} */
4080
- Class;
4081
- return Class;
4082
- }
4083
-
4084
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/dev/console-log.js
4085
- function log_if_contains_state(method, ...objects) {
4086
- untrack(() => {
4087
- try {
4088
- let has_state = false;
4089
- const transformed = [];
4090
- for (const obj of objects) {
4091
- if (obj && typeof obj === "object" && STATE_SYMBOL in obj) {
4092
- transformed.push(snapshot(obj, true));
4093
- has_state = true;
4094
- } else {
4095
- transformed.push(obj);
4096
- }
4097
- }
4098
- if (has_state) {
4099
- console_log_state(method);
4100
- console.log("%c[snapshot]", "color: grey", ...transformed);
4101
- }
4102
- } catch {
4103
- }
4104
- });
4105
- return objects;
4106
- }
4107
-
4108
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/hydratable.js
4109
- function hydratable(key2, fn) {
4110
- if (!async_mode_flag) {
4111
- experimental_async_required("hydratable");
4112
- }
4113
- if (hydrating) {
4114
- const store = window.__svelte?.h;
4115
- if (store?.has(key2)) {
4116
- return (
4117
- /** @type {T} */
4118
- store.get(key2)
4119
- );
4120
- }
4121
- if (true_default) {
4122
- hydratable_missing_but_required(key2);
4123
- } else {
4124
- hydratable_missing_but_expected(key2);
4125
- }
4126
- }
4127
- return fn();
4128
- }
4129
-
4130
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/index-client.js
4131
- if (true_default) {
4132
- let throw_rune_error = function(rune) {
4133
- if (!(rune in globalThis)) {
4134
- let value;
4135
- Object.defineProperty(globalThis, rune, {
4136
- configurable: true,
4137
- // eslint-disable-next-line getter-return
4138
- get: () => {
4139
- if (value !== void 0) {
4140
- return value;
4141
- }
4142
- rune_outside_svelte(rune);
4143
- },
4144
- set: (v) => {
4145
- value = v;
4146
- }
4147
- });
4148
- }
4149
- };
4150
- throw_rune_error("$state");
4151
- throw_rune_error("$effect");
4152
- throw_rune_error("$derived");
4153
- throw_rune_error("$inspect");
4154
- throw_rune_error("$props");
4155
- throw_rune_error("$bindable");
4156
- }
4157
- function getAbortSignal() {
4158
- if (active_reaction === null) {
4159
- get_abort_signal_outside_reaction();
4160
- }
4161
- return (active_reaction.ac ??= new AbortController()).signal;
4162
- }
4163
- function onMount(fn) {
4164
- if (component_context === null) {
4165
- lifecycle_outside_component("onMount");
4166
- }
4167
- if (legacy_mode_flag && component_context.l !== null) {
4168
- init_update_callbacks(component_context).m.push(fn);
4169
- } else {
4170
- user_effect(() => {
4171
- const cleanup = untrack(fn);
4172
- if (typeof cleanup === "function") return (
4173
- /** @type {() => void} */
4174
- cleanup
4175
- );
4176
- });
4177
- }
4178
- }
4179
- function onDestroy(fn) {
4180
- if (component_context === null) {
4181
- lifecycle_outside_component("onDestroy");
4182
- }
4183
- onMount(() => () => untrack(fn));
4184
- }
4185
- function create_custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {
4186
- return new CustomEvent(type, { detail, bubbles, cancelable });
4187
- }
4188
- function createEventDispatcher() {
4189
- const active_component_context = component_context;
4190
- if (active_component_context === null) {
4191
- lifecycle_outside_component("createEventDispatcher");
4192
- }
4193
- return (type, detail, options) => {
4194
- const events = (
4195
- /** @type {Record<string, Function | Function[]>} */
4196
- active_component_context.s.$$events?.[
4197
- /** @type {string} */
4198
- type
4199
- ]
4200
- );
4201
- if (events) {
4202
- const callbacks = is_array(events) ? events.slice() : [events];
4203
- const event2 = create_custom_event(
4204
- /** @type {string} */
4205
- type,
4206
- detail,
4207
- options
4208
- );
4209
- for (const fn of callbacks) {
4210
- fn.call(active_component_context.x, event2);
4211
- }
4212
- return !event2.defaultPrevented;
4213
- }
4214
- return true;
4215
- };
4216
- }
4217
- function beforeUpdate(fn) {
4218
- if (component_context === null) {
4219
- lifecycle_outside_component("beforeUpdate");
4220
- }
4221
- if (component_context.l === null) {
4222
- lifecycle_legacy_only("beforeUpdate");
4223
- }
4224
- init_update_callbacks(component_context).b.push(fn);
4225
- }
4226
- function afterUpdate(fn) {
4227
- if (component_context === null) {
4228
- lifecycle_outside_component("afterUpdate");
4229
- }
4230
- if (component_context.l === null) {
4231
- lifecycle_legacy_only("afterUpdate");
4232
- }
4233
- init_update_callbacks(component_context).a.push(fn);
4234
- }
4235
- function init_update_callbacks(context) {
4236
- var l = (
4237
- /** @type {ComponentContextLegacy} */
4238
- context.l
4239
- );
4240
- return l.u ??= { a: [], b: [], m: [] };
4241
- }
4242
-
4243
- // ../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/attachments/index.js
4244
- function createAttachmentKey() {
4245
- return Symbol(ATTACHMENT_KEY);
4246
- }
4247
- function fromAction(action2, fn = (
4248
- /** @type {() => T} */
4249
- noop
4250
- )) {
4251
- return (element2) => {
4252
- const { update: update2, destroy } = untrack(() => action2(element2, fn()) ?? {});
4253
- if (update2) {
4254
- var ran = false;
4255
- render_effect(() => {
4256
- const arg = fn();
4257
- if (ran) update2(arg);
4258
- });
4259
- ran = true;
4260
- }
4261
- if (destroy) {
4262
- teardown(destroy);
4263
- }
4264
- };
4265
- }
4266
-
4267
- export {
4268
- createAttachmentKey,
4269
- fromAction,
4270
- assign,
4271
- assign_async,
4272
- cleanup_styles,
4273
- add_locations,
4274
- hmr,
4275
- create_ownership_validator,
4276
- check_target,
4277
- legacy_api,
4278
- inspect,
4279
- async,
4280
- validate_snippet_args,
4281
- await_block,
4282
- if_block,
4283
- key,
4284
- css_props,
4285
- index,
4286
- each,
4287
- html,
4288
- slot,
4289
- sanitize_slots,
4290
- validate_void_dynamic_element,
4291
- validate_dynamic_element_tag,
4292
- validate_store,
4293
- prevent_snippet_stringification,
4294
- snippet,
4295
- wrap_snippet,
4296
- createRawSnippet,
4297
- component,
4298
- raf,
4299
- loop,
4300
- animation,
4301
- transition,
4302
- element,
4303
- head,
4304
- append_styles,
4305
- action,
4306
- attach,
4307
- attr,
4308
- clsx2 as clsx,
4309
- set_class,
4310
- set_style,
4311
- select_option,
4312
- init_select,
4313
- bind_select_value,
4314
- CLASS,
4315
- STYLE,
4316
- remove_input_defaults,
4317
- set_value,
4318
- set_checked,
4319
- set_selected,
4320
- set_default_checked,
4321
- set_default_value,
4322
- set_attribute,
4323
- set_xlink_attribute,
4324
- set_custom_element_data,
4325
- attribute_effect,
4326
- selectedcontent,
4327
- customizable_select,
4328
- bind_active_element,
4329
- bind_value,
4330
- bind_group,
4331
- bind_checked,
4332
- bind_files,
4333
- bind_current_time,
4334
- bind_buffered,
4335
- bind_seekable,
4336
- bind_played,
4337
- bind_seeking,
4338
- bind_ended,
4339
- bind_ready_state,
4340
- bind_playback_rate,
4341
- bind_paused,
4342
- bind_volume,
4343
- bind_muted,
4344
- bind_online,
4345
- bind_prop,
4346
- bind_resize_observer,
4347
- bind_element_size,
4348
- bind_this,
4349
- bind_content_editable,
4350
- bind_property,
4351
- bind_focused,
4352
- bind_window_scroll,
4353
- bind_window_size,
4354
- init,
4355
- reactive_import,
4356
- bubble_event,
4357
- add_legacy_event_listener,
4358
- update_legacy_props,
4359
- update_prop,
4360
- update_pre_prop,
4361
- rest_props,
4362
- legacy_rest_props,
4363
- spread_props,
4364
- prop,
4365
- validate_binding,
4366
- create_custom_element,
4367
- log_if_contains_state,
4368
- hydratable,
4369
- getAbortSignal,
4370
- onMount,
4371
- onDestroy,
4372
- createEventDispatcher,
4373
- beforeUpdate,
4374
- afterUpdate
4375
- };
4376
- //# sourceMappingURL=chunk-ZOV3DWEJ.js.map