@svgrid/grid 2.2.32 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (405) hide show
  1. package/README.md +199 -199
  2. package/dist/DockNodeView.svelte +1 -1
  3. package/dist/FlexRender.svelte +96 -96
  4. package/dist/GridFooter.svelte +178 -179
  5. package/dist/GridMenus.svelte +705 -782
  6. package/dist/SvAutoComplete.svelte +165 -165
  7. package/dist/SvAvatar.svelte +75 -75
  8. package/dist/SvCalendar.svelte +503 -503
  9. package/dist/SvCarousel.svelte +141 -141
  10. package/dist/SvCheckBox.svelte +102 -102
  11. package/dist/SvCircularProgress.svelte +109 -109
  12. package/dist/SvColorInput.svelte +181 -181
  13. package/dist/SvComboBox.svelte +275 -275
  14. package/dist/SvContextMenu.svelte +116 -116
  15. package/dist/SvCountryInput.svelte +160 -160
  16. package/dist/SvDateRangeInput.svelte +1 -1
  17. package/dist/SvDrawer.svelte +254 -254
  18. package/dist/SvDropDownList.svelte +374 -374
  19. package/dist/SvDurationInput.svelte +126 -126
  20. package/dist/SvField.svelte +293 -293
  21. package/dist/SvForm.svelte +437 -437
  22. package/dist/SvGrid.css +2814 -2804
  23. package/dist/SvGrid.svelte +3490 -3513
  24. package/dist/SvGridChart.svelte +1716 -1724
  25. package/dist/SvGridChartPanel.svelte +485 -485
  26. package/dist/SvGridChartView.svelte +70 -70
  27. package/dist/SvGridDropdown.svelte +728 -728
  28. package/dist/SvGridSelect.svelte +266 -268
  29. package/dist/SvGroupCell.svelte +116 -116
  30. package/dist/SvKbd.svelte +1 -1
  31. package/dist/SvList.svelte +1 -1
  32. package/dist/SvListBox.svelte +326 -326
  33. package/dist/SvMaskedInput.svelte +122 -122
  34. package/dist/SvMenu.svelte +124 -124
  35. package/dist/SvMenuList.svelte +146 -146
  36. package/dist/SvMenubar.svelte +1 -1
  37. package/dist/SvMultiSelect.svelte +289 -290
  38. package/dist/SvNumberInput.svelte +168 -168
  39. package/dist/SvOtpInput.svelte +158 -158
  40. package/dist/SvPasswordInput.svelte +151 -151
  41. package/dist/SvPhoneInput.svelte +133 -133
  42. package/dist/SvPopover.svelte +197 -197
  43. package/dist/SvProgress.svelte +116 -116
  44. package/dist/SvRadioGroup.svelte +107 -107
  45. package/dist/SvRating.svelte +112 -112
  46. package/dist/SvResult.svelte +73 -73
  47. package/dist/SvRichText.svelte +211 -207
  48. package/dist/SvRowGroupPanel.svelte +170 -170
  49. package/dist/SvScrollArea.svelte +61 -61
  50. package/dist/SvSlider.svelte +200 -200
  51. package/dist/SvSwitchButton.svelte +108 -108
  52. package/dist/SvTagsInput.svelte +112 -112
  53. package/dist/SvTextInput.svelte +147 -147
  54. package/dist/SvTimePicker.svelte +245 -245
  55. package/dist/SvToaster.svelte +159 -159
  56. package/dist/SvToggleButton.svelte +85 -85
  57. package/dist/SvTooltip.svelte +161 -161
  58. package/dist/SvTour.svelte +208 -204
  59. package/dist/SvTree.svelte +444 -444
  60. package/dist/SvTreeSelect.svelte +235 -237
  61. package/dist/cdn/{GridMenus-C6ixSGWW.js → GridMenus-BpVcKyUr.js} +5 -7
  62. package/dist/cdn/{GridMenus-Cyk3qpJ7.js → GridMenus-CeXL5IW4.js} +153 -152
  63. package/dist/cdn/{SvDateTimePicker-ClqtVIj3.js → SvDateTimePicker-DSUhIta8.js} +165 -165
  64. package/dist/cdn/{SvDateTimePicker-CdqaP61H.js → SvDateTimePicker-h9kPyszT.js} +572 -555
  65. package/dist/cdn/{SvGridChart-BcLCYvw9.js → SvGridChart-Bs2GIR2Q.js} +28 -21
  66. package/dist/cdn/{SvGridChart-BhnFdLd0.js → SvGridChart-CwhFz7GV.js} +2 -2
  67. package/dist/cdn/{SvGridChartPanel-Cmx9DHAS.js → SvGridChartPanel-1WXuStzM.js} +2 -2
  68. package/dist/cdn/{SvGridChartPanel-DvjwxLvK.js → SvGridChartPanel-e5_nqNP9.js} +22 -14
  69. package/dist/cdn/{SvGridChartView-PwqI4s02.js → SvGridChartView-SmPW10dI.js} +3 -3
  70. package/dist/cdn/{SvGridChartView-B40DTJSX.js → SvGridChartView-eSPuJE6g.js} +2 -2
  71. package/dist/cdn/{SvGridDropdown-D0VdjeR8.js → SvGridDropdown-B1ZcLpgs.js} +1 -1
  72. package/dist/cdn/{SvGridDropdown-Dh-2ej8j.js → SvGridDropdown-CtdbHcIS.js} +6 -5
  73. package/dist/cdn/{chart-T1usDN0o.js → chart-i4XcXyHJ.js} +12 -10
  74. package/dist/cdn/disclose-version-Dr7rEVv-.js +2866 -0
  75. package/dist/cdn/{export-format-JT5pWVT8.js → export-format-Cv1Dll6k.js} +66 -245
  76. package/dist/cdn/{src-CgD-wiuS.js → src-DbeN1ReZ.js} +9223 -8944
  77. package/dist/cdn/{src-BgHjWF0Q.js → src-DmEQFW5_.js} +9023 -8828
  78. package/dist/cdn/svgrid.js +9 -9
  79. package/dist/cdn/svgrid.svelte-external.js +9 -9
  80. package/dist/chart-export.js +8 -8
  81. package/dist/chart.d.ts +2 -0
  82. package/dist/chart.js +1 -4
  83. package/dist/columns.js +9 -2
  84. package/dist/createMenu.svelte.js +0 -1
  85. package/dist/createPopoverSelect.svelte.d.ts +2 -2
  86. package/dist/editing.js +1 -1
  87. package/dist/export-format.js +3 -0
  88. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/_svelte_metadata.json +1 -0
  89. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/_metadata.json +178 -0
  90. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/attachments-qzRy9DX4.js +3843 -0
  91. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/attachments-qzRy9DX4.js.map +1 -0
  92. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/constants-RLNOXCpz.js +23 -0
  93. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/constants-RLNOXCpz.js.map +1 -0
  94. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/dev-DPd12uEU.js +1925 -0
  95. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/dev-DPd12uEU.js.map +1 -0
  96. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/events-CDC4DKuQ.js +206 -0
  97. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/events-CDC4DKuQ.js.map +1 -0
  98. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/flags-BD-lYX7s.js +20 -0
  99. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/flags-BD-lYX7s.js.map +1 -0
  100. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/hydration-D3UBU2t8.js +264 -0
  101. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/hydration-D3UBU2t8.js.map +1 -0
  102. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/legacy-client-B0ZUlbSQ.js +698 -0
  103. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/legacy-client-B0ZUlbSQ.js.map +1 -0
  104. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/package.json +3 -0
  105. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte.js +135 -0
  106. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte.js.map +1 -0
  107. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_animate.js +57 -0
  108. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_animate.js.map +1 -0
  109. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_attachments.js +2 -0
  110. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_compiler.js +46691 -0
  111. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_compiler.js.map +1 -0
  112. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_easing.js +239 -0
  113. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_easing.js.map +1 -0
  114. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_events.js +2 -0
  115. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal.js +6 -0
  116. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal.js.map +1 -0
  117. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal_client.js +7 -0
  118. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal_disclose-version.js +6 -0
  119. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal_disclose-version.js.map +1 -0
  120. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal_flags_async.js +7 -0
  121. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal_flags_async.js.map +1 -0
  122. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal_flags_legacy.js +7 -0
  123. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal_flags_legacy.js.map +1 -0
  124. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal_flags_tracing.js +7 -0
  125. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal_flags_tracing.js.map +1 -0
  126. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal_server.js +6 -0
  127. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_legacy.js +85 -0
  128. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_legacy.js.map +1 -0
  129. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_motion.js +561 -0
  130. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_motion.js.map +1 -0
  131. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_reactivity.js +26 -0
  132. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_reactivity.js.map +1 -0
  133. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_reactivity_window.js +124 -0
  134. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_reactivity_window.js.map +1 -0
  135. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_server.js +2 -0
  136. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_store.js +91 -0
  137. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_store.js.map +1 -0
  138. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_transition.js +242 -0
  139. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_transition.js.map +1 -0
  140. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/utils-lObbumRX.js +497 -0
  141. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/utils-lObbumRX.js.map +1 -0
  142. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/utils-mR9mAWyK.js +4929 -0
  143. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/utils-mR9mAWyK.js.map +1 -0
  144. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/validate-CezNmRkM.js +192 -0
  145. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/validate-CezNmRkM.js.map +1 -0
  146. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/version-BHHo0WE-.js +10 -0
  147. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/version-BHHo0WE-.js.map +1 -0
  148. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/warnings-yiExAB06.js +140 -0
  149. package/dist/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/warnings-yiExAB06.js.map +1 -0
  150. package/dist/selection.js +0 -1
  151. package/package.json +11 -10
  152. package/src/DockNodeView.svelte +1 -1
  153. package/src/FlexRender.svelte +96 -96
  154. package/src/GridFooter.svelte +178 -179
  155. package/src/GridMenus.svelte +705 -782
  156. package/src/SvAutoComplete.svelte +165 -165
  157. package/src/SvAvatar.svelte +75 -75
  158. package/src/SvCalendar.svelte +503 -503
  159. package/src/SvCalendar.test.ts +226 -226
  160. package/src/SvCarousel.svelte +141 -141
  161. package/src/SvCheckBox.svelte +102 -102
  162. package/src/SvCircularProgress.svelte +109 -109
  163. package/src/SvColorInput.svelte +181 -181
  164. package/src/SvComboBox.svelte +275 -275
  165. package/src/SvContextMenu.svelte +116 -116
  166. package/src/SvCountryInput.svelte +160 -160
  167. package/src/SvDateRangeInput.svelte +1 -1
  168. package/src/SvDrawer.svelte +254 -254
  169. package/src/SvDropDownList.svelte +374 -374
  170. package/src/SvDurationInput.svelte +126 -126
  171. package/src/SvField.svelte +293 -293
  172. package/src/SvForm.svelte +437 -437
  173. package/src/SvForm.test.ts +411 -411
  174. package/src/SvGrid.controller.svelte.ts +3680 -3685
  175. package/src/SvGrid.css +2814 -2804
  176. package/src/SvGrid.svelte +3490 -3513
  177. package/src/SvGrid.types.ts +1708 -1709
  178. package/src/SvGridChart.svelte +1716 -1724
  179. package/src/SvGridChartPanel.svelte +485 -485
  180. package/src/SvGridChartView.svelte +70 -70
  181. package/src/SvGridDropdown.svelte +728 -728
  182. package/src/SvGridSelect.svelte +266 -268
  183. package/src/SvGroupCell.svelte +116 -116
  184. package/src/SvKbd.svelte +1 -1
  185. package/src/SvList.svelte +1 -1
  186. package/src/SvListBox.svelte +326 -326
  187. package/src/SvMaskedInput.svelte +122 -122
  188. package/src/SvMenu.svelte +124 -124
  189. package/src/SvMenu.test.ts +97 -97
  190. package/src/SvMenuList.svelte +146 -146
  191. package/src/SvMenubar.svelte +1 -1
  192. package/src/SvMultiSelect.svelte +289 -290
  193. package/src/SvNumberInput.svelte +168 -168
  194. package/src/SvOtpInput.svelte +158 -158
  195. package/src/SvPasswordInput.svelte +151 -151
  196. package/src/SvPhoneInput.svelte +133 -133
  197. package/src/SvPopover.svelte +197 -197
  198. package/src/SvProgress.svelte +116 -116
  199. package/src/SvRadioGroup.svelte +107 -107
  200. package/src/SvRating.svelte +112 -112
  201. package/src/SvResult.svelte +73 -73
  202. package/src/SvRichText.svelte +211 -207
  203. package/src/SvRowGroupPanel.svelte +170 -170
  204. package/src/SvScrollArea.svelte +61 -61
  205. package/src/SvSlider.svelte +200 -200
  206. package/src/SvSwitchButton.svelte +108 -108
  207. package/src/SvTagsInput.svelte +112 -112
  208. package/src/SvTextInput.svelte +147 -147
  209. package/src/SvTimePicker.svelte +245 -245
  210. package/src/SvToaster.svelte +159 -159
  211. package/src/SvToaster.test.ts +95 -95
  212. package/src/SvToggleButton.svelte +85 -85
  213. package/src/SvTooltip.svelte +161 -161
  214. package/src/SvTour.svelte +208 -204
  215. package/src/SvTree.svelte +444 -444
  216. package/src/SvTreeSelect.svelte +235 -237
  217. package/src/a11y/dismissable.test.ts +119 -119
  218. package/src/a11y/dismissable.ts +114 -114
  219. package/src/a11y.contract.test.ts +49 -49
  220. package/src/a11y.test.ts +59 -59
  221. package/src/a11y.ts +61 -61
  222. package/src/ai.test.ts +502 -502
  223. package/src/ai.ts +1391 -1391
  224. package/src/build-api.coverage.test.ts +633 -633
  225. package/src/build-api.ts +805 -910
  226. package/src/builtin-editors.grid.test.ts +85 -85
  227. package/src/cell-formatting.test.ts +1 -1
  228. package/src/cell-formatting.ts +169 -169
  229. package/src/cell-render.test.ts +513 -513
  230. package/src/cell-render.ts +496 -590
  231. package/src/cell-values.ts +118 -118
  232. package/src/chart-export.ts +201 -201
  233. package/src/chart-view.svelte.ts +36 -36
  234. package/src/chart.ts +2295 -2296
  235. package/src/clipboard.ts +0 -102
  236. package/src/collaboration.test.ts +104 -104
  237. package/src/collaboration.ts +167 -167
  238. package/src/columns.ts +7 -117
  239. package/src/core.performance.test.ts +30 -30
  240. package/src/core.ts +1261 -1261
  241. package/src/createAutocomplete.svelte.ts +132 -132
  242. package/src/createCombobox.svelte.ts +191 -191
  243. package/src/createCountryInput.svelte.ts +157 -157
  244. package/src/createDropdownList.svelte.ts +168 -168
  245. package/src/createForm.svelte.ts +386 -386
  246. package/src/createGrid.svelte.ts +42 -42
  247. package/src/createGrid.test.ts +10 -10
  248. package/src/createGridState.svelte.ts +17 -17
  249. package/src/createListbox.svelte.ts +250 -250
  250. package/src/createMenu.svelte.ts +224 -225
  251. package/src/createPopoverSelect.svelte.ts +213 -213
  252. package/src/createSlider.svelte.ts +191 -191
  253. package/src/createTooltip.svelte.ts +144 -144
  254. package/src/createTree.svelte.ts +319 -319
  255. package/src/editing.test.ts +949 -949
  256. package/src/editing.ts +606 -709
  257. package/src/editor-contract.ts +164 -164
  258. package/src/editor-registry.grid.test.ts +144 -146
  259. package/src/editor-registry.ts +122 -122
  260. package/src/export-data-api.test.ts +126 -126
  261. package/src/export-format.test.ts +107 -107
  262. package/src/export-format.ts +601 -598
  263. package/src/features.ts +0 -90
  264. package/src/filter-operators.ts +157 -157
  265. package/src/flex-render.ts +3 -3
  266. package/src/form-field.ts +127 -127
  267. package/src/group-display.test.ts +167 -167
  268. package/src/group-display.ts +200 -200
  269. package/src/index.ts +724 -724
  270. package/src/js-scroller.svelte.ts +173 -173
  271. package/src/keyboard-handlers.coverage.test.ts +1 -1
  272. package/src/keyboard-handlers.ts +270 -390
  273. package/src/keyboard.test.ts +59 -59
  274. package/src/keyboard.ts +97 -97
  275. package/src/list-nav.test.ts +49 -49
  276. package/src/list-nav.ts +29 -29
  277. package/src/list-option.test.ts +56 -56
  278. package/src/list-option.ts +172 -172
  279. package/src/menus.test.ts +0 -1
  280. package/src/menus.ts +567 -679
  281. package/src/merge-objects.ts +48 -48
  282. package/src/new-features.test.ts +3 -1
  283. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/_svelte_metadata.json +1 -0
  284. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/_metadata.json +178 -0
  285. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/attachments-qzRy9DX4.js +3843 -0
  286. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/attachments-qzRy9DX4.js.map +1 -0
  287. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/constants-RLNOXCpz.js +23 -0
  288. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/constants-RLNOXCpz.js.map +1 -0
  289. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/dev-DPd12uEU.js +1925 -0
  290. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/dev-DPd12uEU.js.map +1 -0
  291. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/events-CDC4DKuQ.js +206 -0
  292. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/events-CDC4DKuQ.js.map +1 -0
  293. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/flags-BD-lYX7s.js +20 -0
  294. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/flags-BD-lYX7s.js.map +1 -0
  295. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/hydration-D3UBU2t8.js +264 -0
  296. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/hydration-D3UBU2t8.js.map +1 -0
  297. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/legacy-client-B0ZUlbSQ.js +698 -0
  298. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/legacy-client-B0ZUlbSQ.js.map +1 -0
  299. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/package.json +3 -0
  300. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte.js +135 -0
  301. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte.js.map +1 -0
  302. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_animate.js +57 -0
  303. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_animate.js.map +1 -0
  304. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_attachments.js +2 -0
  305. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_compiler.js +46691 -0
  306. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_compiler.js.map +1 -0
  307. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_easing.js +239 -0
  308. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_easing.js.map +1 -0
  309. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_events.js +2 -0
  310. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal.js +6 -0
  311. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal.js.map +1 -0
  312. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal_client.js +7 -0
  313. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal_disclose-version.js +6 -0
  314. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal_disclose-version.js.map +1 -0
  315. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal_flags_async.js +7 -0
  316. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal_flags_async.js.map +1 -0
  317. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal_flags_legacy.js +7 -0
  318. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal_flags_legacy.js.map +1 -0
  319. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal_flags_tracing.js +7 -0
  320. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal_flags_tracing.js.map +1 -0
  321. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_internal_server.js +6 -0
  322. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_legacy.js +85 -0
  323. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_legacy.js.map +1 -0
  324. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_motion.js +561 -0
  325. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_motion.js.map +1 -0
  326. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_reactivity.js +26 -0
  327. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_reactivity.js.map +1 -0
  328. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_reactivity_window.js +124 -0
  329. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_reactivity_window.js.map +1 -0
  330. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_server.js +2 -0
  331. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_store.js +91 -0
  332. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_store.js.map +1 -0
  333. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_transition.js +242 -0
  334. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/svelte_transition.js.map +1 -0
  335. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/utils-lObbumRX.js +497 -0
  336. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/utils-lObbumRX.js.map +1 -0
  337. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/utils-mR9mAWyK.js +4929 -0
  338. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/utils-mR9mAWyK.js.map +1 -0
  339. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/validate-CezNmRkM.js +192 -0
  340. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/validate-CezNmRkM.js.map +1 -0
  341. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/version-BHHo0WE-.js +10 -0
  342. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/version-BHHo0WE-.js.map +1 -0
  343. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/warnings-yiExAB06.js +140 -0
  344. package/src/node_modules/.vite/vitest/67d8ed22ed986c5e2e948f64d892f30be166cc36/deps___vitest__/warnings-yiExAB06.js.map +1 -0
  345. package/src/overlays.test.ts +90 -90
  346. package/src/render-component.ts +28 -28
  347. package/src/row-drag.test.ts +1 -1
  348. package/src/row-resize.test.ts +1 -2
  349. package/src/row-resize.ts +210 -210
  350. package/src/scheduler-model.test.ts +562 -562
  351. package/src/scheduler-model.ts +872 -872
  352. package/src/scroll-sync.test.ts +4 -7
  353. package/src/scroll-sync.ts +0 -122
  354. package/src/selection.test.ts +754 -754
  355. package/src/selection.ts +491 -600
  356. package/src/server-data-source.test.ts +289 -289
  357. package/src/server-data-source.ts +413 -413
  358. package/src/server-group-model.test.ts +2 -2
  359. package/src/sparkline.test.ts +68 -68
  360. package/src/sparkline.ts +169 -169
  361. package/src/spreadsheet.test.ts +488 -488
  362. package/src/spreadsheet.ts +312 -312
  363. package/src/static-functions.ts +11 -11
  364. package/src/subscribe.ts +38 -38
  365. package/src/summaries.ts +0 -112
  366. package/src/svgrid-wrapper.types.ts +526 -526
  367. package/src/svgrid.async-editor-options.test.ts +271 -271
  368. package/src/svgrid.auto-row-height.test.ts +204 -204
  369. package/src/svgrid.behavior.test.ts +705 -706
  370. package/src/svgrid.charting.test.ts +534 -534
  371. package/src/svgrid.column-reorder.test.ts +0 -8
  372. package/src/svgrid.comments-autocomplete.test.ts +123 -123
  373. package/src/svgrid.context-menu.test.ts +147 -147
  374. package/src/svgrid.features.test.ts +157 -157
  375. package/src/svgrid.filter-depth.test.ts +163 -163
  376. package/src/svgrid.filter-menu-listbox.svelte.test.ts +322 -322
  377. package/src/svgrid.filter-menu-scroll.test.ts +112 -112
  378. package/src/svgrid.footer-pagesize.svelte.test.ts +86 -0
  379. package/src/svgrid.grand-total.test.ts +188 -188
  380. package/src/svgrid.group-display-mode.test.ts +171 -171
  381. package/src/svgrid.group-footers.test.ts +121 -121
  382. package/src/svgrid.group-pagination.test.ts +153 -153
  383. package/src/svgrid.new-features.wrapper.test.ts +251 -251
  384. package/src/svgrid.tree-data.test.ts +186 -186
  385. package/src/svgrid.wrapper.test.ts +40 -40
  386. package/src/svgriddropdown.async-panel.svelte.test.ts +195 -195
  387. package/src/test-setup.ts +62 -62
  388. package/src/themes/index.ts +257 -257
  389. package/src/toast-store.svelte.ts +246 -246
  390. package/src/toast-store.test.ts +147 -147
  391. package/src/tree-row-model.test.ts +168 -169
  392. package/src/ui-buttons.test.ts +144 -144
  393. package/src/ui-inputs.test.ts +118 -118
  394. package/src/ui-localization.test.ts +113 -113
  395. package/src/ui-range.test.ts +70 -70
  396. package/src/ui-selection.test.ts +155 -155
  397. package/src/ui-tier1.test.ts +142 -142
  398. package/src/virtual.test.ts +88 -88
  399. package/src/virtualization/column-virtualizer.test.ts +27 -27
  400. package/src/virtualization/column-virtualizer.ts +30 -30
  401. package/src/virtualization/svelte-virtualizer.svelte.ts +26 -26
  402. package/src/virtualization/types.ts +30 -30
  403. package/src/virtualization/virtualizer.test.ts +47 -47
  404. package/src/virtualization/virtualizer.ts +296 -296
  405. package/dist/cdn/disclose-version-DoD9AFD_.js +0 -2958
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-DPd12uEU.js","names":["#parent","#out","#boundary","#serialize_failed_boundary","#is_component_body","#collect_content_async","#collect_content","#on_destroy","#render","#render_async","#collect_on_destroy","#traverse_components","#collect_ondestroy","#open_render","#close_render","#collect_hydratables","#hydratable_block","devalue.uneval","#title"],"sources":["../../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/server/errors.js","../../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/server/context.js","../../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/server/abort-signal.js","../../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/server/render-context.js","../../../../../../../../node_modules/.pnpm/devalue@5.8.1/node_modules/devalue/src/constants.js","../../../../../../../../node_modules/.pnpm/devalue@5.8.1/node_modules/devalue/src/utils.js","../../../../../../../../node_modules/.pnpm/devalue@5.8.1/node_modules/devalue/src/uneval.js","../../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/server/warnings.js","../../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/server/blocks/html.js","../../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/server/index.js","../../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/server/crypto.js","../../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/server/renderer.js","../../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/server/dev.js"],"sourcesContent":["/* This file is generated by scripts/process-messages/index.js. Do not edit! */\n\nexport * from '../shared/errors.js';\n\n/**\n * The node API `AsyncLocalStorage` is not available, but is required to use async server rendering.\n * @returns {never}\n */\nexport function async_local_storage_unavailable() {\n\tconst error = new Error(`async_local_storage_unavailable\\nThe node API \\`AsyncLocalStorage\\` is not available, but is required to use async server rendering.\\nhttps://svelte.dev/e/async_local_storage_unavailable`);\n\n\terror.name = 'Svelte error';\n\n\tthrow error;\n}\n\n/**\n * Encountered asynchronous work while rendering synchronously.\n * @returns {never}\n */\nexport function await_invalid() {\n\tconst error = new Error(`await_invalid\\nEncountered asynchronous work while rendering synchronously.\\nhttps://svelte.dev/e/await_invalid`);\n\n\terror.name = 'Svelte error';\n\n\tthrow error;\n}\n\n/**\n * `<svelte:element this=\"%tag%\">` is not a valid element name — the element will not be rendered\n * @param {string} tag\n * @returns {never}\n */\nexport function dynamic_element_invalid_tag(tag) {\n\tconst error = new Error(`dynamic_element_invalid_tag\\n\\`<svelte:element this=\"${tag}\">\\` is not a valid element name — the element will not be rendered\\nhttps://svelte.dev/e/dynamic_element_invalid_tag`);\n\n\terror.name = 'Svelte error';\n\n\tthrow error;\n}\n\n/**\n * The `html` property of server render results has been deprecated. Use `body` instead.\n * @returns {never}\n */\nexport function html_deprecated() {\n\tconst error = new Error(`html_deprecated\\nThe \\`html\\` property of server render results has been deprecated. Use \\`body\\` instead.\\nhttps://svelte.dev/e/html_deprecated`);\n\n\terror.name = 'Svelte error';\n\n\tthrow error;\n}\n\n/**\n * Attempted to set `hydratable` with key `%key%` twice with different values.\n * \n * %stack%\n * @param {string} key\n * @param {string} stack\n * @returns {never}\n */\nexport function hydratable_clobbering(key, stack) {\n\tconst error = new Error(`hydratable_clobbering\\nAttempted to set \\`hydratable\\` with key \\`${key}\\` twice with different values.\n\n${stack}\\nhttps://svelte.dev/e/hydratable_clobbering`);\n\n\terror.name = 'Svelte error';\n\n\tthrow error;\n}\n\n/**\n * Failed to serialize `hydratable` data for key `%key%`.\n * \n * `hydratable` can serialize anything [`uneval` from `devalue`](https://npmjs.com/package/uneval) can, plus Promises.\n * \n * Cause:\n * %stack%\n * @param {string} key\n * @param {string} stack\n * @returns {never}\n */\nexport function hydratable_serialization_failed(key, stack) {\n\tconst error = new Error(`hydratable_serialization_failed\\nFailed to serialize \\`hydratable\\` data for key \\`${key}\\`.\n\n\\`hydratable\\` can serialize anything [\\`uneval\\` from \\`devalue\\`](https://npmjs.com/package/uneval) can, plus Promises.\n\nCause:\n${stack}\\nhttps://svelte.dev/e/hydratable_serialization_failed`);\n\n\terror.name = 'Svelte error';\n\n\tthrow error;\n}\n\n/**\n * `csp.nonce` was set while `csp.hash` was `true`. These options cannot be used simultaneously.\n * @returns {never}\n */\nexport function invalid_csp() {\n\tconst error = new Error(`invalid_csp\\n\\`csp.nonce\\` was set while \\`csp.hash\\` was \\`true\\`. These options cannot be used simultaneously.\\nhttps://svelte.dev/e/invalid_csp`);\n\n\terror.name = 'Svelte error';\n\n\tthrow error;\n}\n\n/**\n * The `idPrefix` option cannot include `--`.\n * @returns {never}\n */\nexport function invalid_id_prefix() {\n\tconst error = new Error(`invalid_id_prefix\\nThe \\`idPrefix\\` option cannot include \\`--\\`.\\nhttps://svelte.dev/e/invalid_id_prefix`);\n\n\terror.name = 'Svelte error';\n\n\tthrow error;\n}\n\n/**\n * `%name%(...)` is not available on the server\n * @param {string} name\n * @returns {never}\n */\nexport function lifecycle_function_unavailable(name) {\n\tconst error = new Error(`lifecycle_function_unavailable\\n\\`${name}(...)\\` is not available on the server\\nhttps://svelte.dev/e/lifecycle_function_unavailable`);\n\n\terror.name = 'Svelte error';\n\n\tthrow error;\n}\n\n/**\n * Could not resolve `render` context.\n * @returns {never}\n */\nexport function server_context_required() {\n\tconst error = new Error(`server_context_required\\nCould not resolve \\`render\\` context.\\nhttps://svelte.dev/e/server_context_required`);\n\n\terror.name = 'Svelte error';\n\n\tthrow error;\n}","/** @import { SSRContext } from '#server' */\nimport { DEV } from 'esm-env';\nimport * as e from './errors.js';\n\n/** @type {SSRContext | null} */\nexport var ssr_context = null;\n\n/** @param {SSRContext | null} v */\nexport function set_ssr_context(v) {\n\tssr_context = v;\n}\n\n/**\n * @template T\n * @returns {[() => T, (context: T) => T]}\n * @since 5.40.0\n */\nexport function createContext() {\n\tconst key = {};\n\n\treturn [\n\t\t() => {\n\t\t\tif (!hasContext(key)) {\n\t\t\t\te.missing_context();\n\t\t\t}\n\n\t\t\treturn getContext(key);\n\t\t},\n\t\t(context) => setContext(key, context)\n\t];\n}\n\n/**\n * @template T\n * @param {any} key\n * @returns {T}\n */\nexport function getContext(key) {\n\tconst context_map = get_or_init_context_map('getContext');\n\tconst result = /** @type {T} */ (context_map.get(key));\n\n\treturn result;\n}\n\n/**\n * @template T\n * @param {any} key\n * @param {T} context\n * @returns {T}\n */\nexport function setContext(key, context) {\n\tget_or_init_context_map('setContext').set(key, context);\n\treturn context;\n}\n\n/**\n * @param {any} key\n * @returns {boolean}\n */\nexport function hasContext(key) {\n\treturn get_or_init_context_map('hasContext').has(key);\n}\n\n/** @returns {Map<any, any>} */\nexport function getAllContexts() {\n\treturn get_or_init_context_map('getAllContexts');\n}\n\n/**\n * @param {string} name\n * @returns {Map<unknown, unknown>}\n */\nfunction get_or_init_context_map(name) {\n\tif (ssr_context === null) {\n\t\te.lifecycle_outside_component(name);\n\t}\n\n\treturn (ssr_context.c ??= new Map(get_parent_context(ssr_context) || undefined));\n}\n\n/**\n * @param {Function} [fn]\n */\nexport function push(fn) {\n\tssr_context = { p: ssr_context, c: null, r: null };\n\n\tif (DEV) {\n\t\tssr_context.function = fn;\n\t\tssr_context.element = ssr_context.p?.element;\n\t}\n}\n\nexport function pop() {\n\tssr_context = /** @type {SSRContext} */ (ssr_context).p;\n}\n\n/**\n * @param {SSRContext} ssr_context\n * @returns {Map<unknown, unknown> | null}\n */\nfunction get_parent_context(ssr_context) {\n\tlet parent = ssr_context.p;\n\n\twhile (parent !== null) {\n\t\tconst context_map = parent.c;\n\t\tif (context_map !== null) {\n\t\t\treturn context_map;\n\t\t}\n\t\tparent = parent.p;\n\t}\n\n\treturn null;\n}\n\n/**\n * Wraps an `await` expression in such a way that the component context that was\n * active before the expression evaluated can be reapplied afterwards —\n * `await a + b()` becomes `(await $.save(a))() + b()`, meaning `b()` will have access\n * to the context of its component.\n * @template T\n * @param {Promise<T>} promise\n * @returns {Promise<() => T>}\n */\nexport async function save(promise) {\n\tvar previous_context = ssr_context;\n\tvar value = await promise;\n\n\treturn () => {\n\t\tssr_context = previous_context;\n\t\treturn value;\n\t};\n}\n","import { STALE_REACTION } from '#client/constants';\n\n/** @type {AbortController | null} */\nlet controller = null;\n\nexport function abort() {\n\tcontroller?.abort(STALE_REACTION);\n\tcontroller = null;\n}\n\nexport function getAbortSignal() {\n\treturn (controller ??= new AbortController()).signal;\n}\n","// @ts-ignore -- we don't include node types in the production build\n/** @import { AsyncLocalStorage } from 'node:async_hooks' */\n/** @import { RenderContext } from '#server' */\n\nimport { deferred, noop } from '../shared/utils.js';\nimport * as e from './errors.js';\n\n/** @type {Promise<void> | null} */\nlet current_render = null;\n\n/** @type {RenderContext | null} */\nlet context = null;\n\n/** @returns {RenderContext} */\nexport function get_render_context() {\n\tconst store = context ?? als?.getStore();\n\n\tif (!store) {\n\t\te.server_context_required();\n\t}\n\n\treturn store;\n}\n\n/**\n * @template T\n * @param {() => Promise<T>} fn\n * @returns {Promise<T>}\n */\nexport async function with_render_context(fn) {\n\tcontext = {\n\t\thydratable: {\n\t\t\tlookup: new Map(),\n\t\t\tcomparisons: [],\n\t\t\tunresolved_promises: new Map()\n\t\t}\n\t};\n\n\tif (in_webcontainer()) {\n\t\tconst { promise, resolve } = deferred();\n\t\tconst previous_render = current_render;\n\t\tcurrent_render = promise;\n\t\tawait previous_render;\n\t\treturn fn().finally(resolve);\n\t}\n\n\ttry {\n\t\tif (als === null) {\n\t\t\te.async_local_storage_unavailable();\n\t\t}\n\t\treturn als.run(context, fn);\n\t} finally {\n\t\tcontext = null;\n\t}\n}\n\n/** @type {AsyncLocalStorage<RenderContext | null> | null} */\nlet als = null;\n/** @type {Promise<void> | null} */\nlet als_import = null;\n\n/**\n *\n * @returns {Promise<void>}\n */\nexport function init_render_context() {\n\t// It's important the right side of this assignment can run a maximum of one time\n\t// otherwise it's possible for a very, very well-timed race condition to assign to `als`\n\t// at the beginning of a render, and then another render to assign to it again, which causes\n\t// the first render's second half to use a new instance of `als` which doesn't have its\n\t// context anymore.\n\t// @ts-ignore -- we don't include node types in the production build\n\tals_import ??= import('node:async_hooks')\n\t\t.then((hooks) => {\n\t\t\tals = new hooks.AsyncLocalStorage();\n\t\t})\n\t\t.then(noop, noop);\n\treturn als_import;\n}\n\n// this has to be a function because rollup won't treeshake it if it's a constant\nfunction in_webcontainer() {\n\t// @ts-ignore -- this will fail when we run typecheck because we exclude node types\n\t// eslint-disable-next-line n/prefer-global/process\n\treturn !!globalThis.process?.versions?.webcontainer;\n}\n","export const UNDEFINED = -1;\nexport const HOLE = -2;\nexport const NAN = -3;\nexport const POSITIVE_INFINITY = -4;\nexport const NEGATIVE_INFINITY = -5;\nexport const NEGATIVE_ZERO = -6;\nexport const SPARSE = -7;\n\n// The largest valid value for a JavaScript array's `length` property,\n// and the largest valid array index (one less than the max length).\nexport const MAX_ARRAY_LEN = 2 ** 32 - 1;\nexport const MAX_ARRAY_INDEX = MAX_ARRAY_LEN - 1;\n","import { MAX_ARRAY_INDEX, MAX_ARRAY_LEN } from './constants.js';\n\n/** @type {Record<string, string>} */\nexport const escaped = {\n\t'<': '\\\\u003C',\n\t'\\\\': '\\\\\\\\',\n\t'\\b': '\\\\b',\n\t'\\f': '\\\\f',\n\t'\\n': '\\\\n',\n\t'\\r': '\\\\r',\n\t'\\t': '\\\\t',\n\t'\\u2028': '\\\\u2028',\n\t'\\u2029': '\\\\u2029'\n};\n\nexport class DevalueError extends Error {\n\t/**\n\t * @param {string} message\n\t * @param {string[]} keys\n\t * @param {any} [value] - The value that failed to be serialized\n\t * @param {any} [root] - The root value being serialized\n\t */\n\tconstructor(message, keys, value, root) {\n\t\tsuper(message);\n\t\tthis.name = 'DevalueError';\n\t\tthis.path = keys.join('');\n\t\tthis.value = value;\n\t\tthis.root = root;\n\t}\n}\n\n/** @param {any} thing */\nexport function is_primitive(thing) {\n\treturn thing === null || (typeof thing !== 'object' && typeof thing !== 'function');\n}\n\nconst object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(Object.prototype)\n\t.sort()\n\t.join('\\0');\n\n/** @param {any} thing */\nexport function is_plain_object(thing) {\n\tconst proto = Object.getPrototypeOf(thing);\n\n\treturn (\n\t\tproto === Object.prototype ||\n\t\tproto === null ||\n\t\tObject.getPrototypeOf(proto) === null ||\n\t\tObject.getOwnPropertyNames(proto).sort().join('\\0') === object_proto_names\n\t);\n}\n\n/** @param {any} thing */\nexport function get_type(thing) {\n\treturn Object.prototype.toString.call(thing).slice(8, -1);\n}\n\n/** @param {string} char */\nfunction get_escaped_char(char) {\n\tswitch (char) {\n\t\tcase '\"':\n\t\t\treturn '\\\\\"';\n\t\tcase '<':\n\t\t\treturn '\\\\u003C';\n\t\tcase '\\\\':\n\t\t\treturn '\\\\\\\\';\n\t\tcase '\\n':\n\t\t\treturn '\\\\n';\n\t\tcase '\\r':\n\t\t\treturn '\\\\r';\n\t\tcase '\\t':\n\t\t\treturn '\\\\t';\n\t\tcase '\\b':\n\t\t\treturn '\\\\b';\n\t\tcase '\\f':\n\t\t\treturn '\\\\f';\n\t\tcase '\\u2028':\n\t\t\treturn '\\\\u2028';\n\t\tcase '\\u2029':\n\t\t\treturn '\\\\u2029';\n\t\tdefault:\n\t\t\treturn char < ' ' ? `\\\\u${char.charCodeAt(0).toString(16).padStart(4, '0')}` : '';\n\t}\n}\n\n/** @param {string} str */\nexport function stringify_string(str) {\n\tlet result = '';\n\tlet last_pos = 0;\n\tconst len = str.length;\n\n\tfor (let i = 0; i < len; i += 1) {\n\t\tconst char = str[i];\n\t\tconst replacement = get_escaped_char(char);\n\t\tif (replacement) {\n\t\t\tresult += str.slice(last_pos, i) + replacement;\n\t\t\tlast_pos = i + 1;\n\t\t}\n\t}\n\n\treturn `\"${last_pos === 0 ? str : result + str.slice(last_pos)}\"`;\n}\n\n/** @param {Record<string | symbol, any>} object */\nexport function enumerable_symbols(object) {\n\treturn Object.getOwnPropertySymbols(object).filter(\n\t\t(symbol) => Object.getOwnPropertyDescriptor(object, symbol).enumerable\n\t);\n}\n\nconst is_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;\n\n/** @param {string} key */\nexport function stringify_key(key) {\n\treturn is_identifier.test(key) ? '.' + key : '[' + JSON.stringify(key) + ']';\n}\n\n/** @param {number} n */\nexport function is_valid_array_index(n) {\n\tif (!Number.isInteger(n)) return false;\n\tif (n < 0) return false;\n\tif (n > MAX_ARRAY_INDEX) return false;\n\treturn true;\n}\n\n/** @param {number} n */\nexport function is_valid_array_len(n) {\n\tif (!Number.isInteger(n)) return false;\n\tif (n < 0) return false;\n\tif (n > MAX_ARRAY_LEN) return false;\n\treturn true;\n}\n\n/** @param {string} s */\nfunction is_valid_array_index_string(s) {\n\tif (s.length === 0) return false;\n\tif (s.length > 1 && s.charCodeAt(0) === 48) return false; // leading zero\n\tfor (let i = 0; i < s.length; i++) {\n\t\tconst c = s.charCodeAt(i);\n\t\tif (c < 48 || c > 57) return false;\n\t}\n\t// by this point we know it's a string of digits, but it has to be within\n\t// the range of valid array indices\n\treturn is_valid_array_index(+s);\n}\n\n/**\n * Finds the populated indices of an array.\n * @param {unknown[]} array\n */\nexport function valid_array_indices(array) {\n\tconst keys = Object.keys(array);\n\tfor (var i = keys.length - 1; i >= 0; i--) {\n\t\tif (is_valid_array_index_string(keys[i])) {\n\t\t\tbreak;\n\t\t}\n\t}\n\tkeys.length = i + 1;\n\treturn keys;\n}\n","import {\n\tDevalueError,\n\tenumerable_symbols,\n\tescaped,\n\tget_type,\n\tis_plain_object,\n\tis_primitive,\n\tstringify_key,\n\tstringify_string,\n\tvalid_array_indices\n} from './utils.js';\n\nconst chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$';\nconst unsafe_chars = /[<\\b\\f\\n\\r\\t\\0\\u2028\\u2029]/g;\nconst reserved =\n\t/^(?:do|if|in|for|int|let|new|try|var|byte|case|char|else|enum|goto|long|this|void|with|await|break|catch|class|const|final|float|short|super|throw|while|yield|delete|double|export|import|native|return|switch|throws|typeof|boolean|default|extends|finally|package|private|abstract|continue|debugger|function|volatile|interface|protected|transient|implements|instanceof|synchronized)$/;\n\n/**\n * Turn a value into the JavaScript that creates an equivalent value\n * @param {any} value\n * @param {(value: any, uneval: (value: any) => string) => string | void} [replacer]\n */\nexport function uneval(value, replacer) {\n\tconst counts = new Map();\n\n\t/** @type {string[]} */\n\tconst keys = [];\n\n\tconst custom = new Map();\n\n\t/** @param {any} thing */\n\tfunction walk(thing) {\n\t\tif (!is_primitive(thing)) {\n\t\t\tif (counts.has(thing)) {\n\t\t\t\tcounts.set(thing, counts.get(thing) + 1);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcounts.set(thing, 1);\n\n\t\t\tif (replacer) {\n\t\t\t\tconst str = replacer(thing, (value) => uneval(value, replacer));\n\n\t\t\t\tif (typeof str === 'string') {\n\t\t\t\t\tcustom.set(thing, str);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof thing === 'function') {\n\t\t\t\tthrow new DevalueError(`Cannot stringify a function`, keys, thing, value);\n\t\t\t}\n\n\t\t\tconst type = get_type(thing);\n\n\t\t\tswitch (type) {\n\t\t\t\tcase 'Number':\n\t\t\t\tcase 'BigInt':\n\t\t\t\tcase 'String':\n\t\t\t\tcase 'Boolean':\n\t\t\t\tcase 'Date':\n\t\t\t\tcase 'RegExp':\n\t\t\t\tcase 'URL':\n\t\t\t\tcase 'URLSearchParams':\n\t\t\t\t\treturn;\n\n\t\t\t\tcase 'Array':\n\t\t\t\t\t/** @type {any[]} */ (thing).forEach((value, i) => {\n\t\t\t\t\t\tkeys.push(`[${i}]`);\n\t\t\t\t\t\twalk(value);\n\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Set':\n\t\t\t\t\tArray.from(thing).forEach(walk);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Map':\n\t\t\t\t\tfor (const [key, value] of thing) {\n\t\t\t\t\t\tkeys.push(`.get(${is_primitive(key) ? stringify_primitive(key) : '...'})`);\n\t\t\t\t\t\twalk(value);\n\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Int8Array':\n\t\t\t\tcase 'Uint8Array':\n\t\t\t\tcase 'Uint8ClampedArray':\n\t\t\t\tcase 'Int16Array':\n\t\t\t\tcase 'Uint16Array':\n\t\t\t\tcase 'Float16Array':\n\t\t\t\tcase 'Int32Array':\n\t\t\t\tcase 'Uint32Array':\n\t\t\t\tcase 'Float32Array':\n\t\t\t\tcase 'Float64Array':\n\t\t\t\tcase 'BigInt64Array':\n\t\t\t\tcase 'BigUint64Array':\n\t\t\t\tcase 'DataView':\n\t\t\t\t\twalk(thing.buffer);\n\t\t\t\t\treturn;\n\n\t\t\t\tcase 'ArrayBuffer':\n\t\t\t\t\treturn;\n\n\t\t\t\tcase 'Temporal.Duration':\n\t\t\t\tcase 'Temporal.Instant':\n\t\t\t\tcase 'Temporal.PlainDate':\n\t\t\t\tcase 'Temporal.PlainTime':\n\t\t\t\tcase 'Temporal.PlainDateTime':\n\t\t\t\tcase 'Temporal.PlainMonthDay':\n\t\t\t\tcase 'Temporal.PlainYearMonth':\n\t\t\t\tcase 'Temporal.ZonedDateTime':\n\t\t\t\t\treturn;\n\n\t\t\t\tdefault:\n\t\t\t\t\tif (!is_plain_object(thing)) {\n\t\t\t\t\t\tthrow new DevalueError(`Cannot stringify arbitrary non-POJOs`, keys, thing, value);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (enumerable_symbols(thing).length > 0) {\n\t\t\t\t\t\tthrow new DevalueError(`Cannot stringify POJOs with symbolic keys`, keys, thing, value);\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (const key of Object.keys(thing)) {\n\t\t\t\t\t\tif (key === '__proto__') {\n\t\t\t\t\t\t\tthrow new DevalueError(\n\t\t\t\t\t\t\t\t`Cannot stringify objects with __proto__ keys`,\n\t\t\t\t\t\t\t\tkeys,\n\t\t\t\t\t\t\t\tthing,\n\t\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tkeys.push(stringify_key(key));\n\t\t\t\t\t\twalk(thing[key]);\n\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t}\n\t\t\t}\n\t\t} else if (typeof thing === 'symbol') {\n\t\t\tthrow new DevalueError(`Cannot stringify a Symbol primitive`, keys, thing, value);\n\t\t}\n\t}\n\n\twalk(value);\n\n\tconst names = new Map();\n\n\tArray.from(counts)\n\t\t.filter((entry) => entry[1] > 1)\n\t\t.sort((a, b) => b[1] - a[1])\n\t\t.forEach((entry, i) => {\n\t\t\tnames.set(entry[0], get_name(i));\n\t\t});\n\n\t/**\n\t * @param {any} thing\n\t * @returns {string}\n\t */\n\tfunction stringify(thing) {\n\t\tif (names.has(thing)) {\n\t\t\treturn names.get(thing);\n\t\t}\n\n\t\tif (is_primitive(thing)) {\n\t\t\treturn stringify_primitive(thing);\n\t\t}\n\n\t\tif (custom.has(thing)) {\n\t\t\treturn custom.get(thing);\n\t\t}\n\n\t\tconst type = get_type(thing);\n\n\t\tswitch (type) {\n\t\t\tcase 'Number':\n\t\t\tcase 'String':\n\t\t\tcase 'Boolean':\n\t\t\tcase 'BigInt':\n\t\t\t\treturn `Object(${stringify(thing.valueOf())})`;\n\n\t\t\tcase 'RegExp':\n\t\t\t\tconst { source, flags } = thing;\n\t\t\t\treturn flags\n\t\t\t\t\t? `new RegExp(${stringify_string(source)},\"${flags}\")`\n\t\t\t\t\t: `new RegExp(${stringify_string(source)})`;\n\n\t\t\tcase 'Date':\n\t\t\t\treturn `new Date(${thing.getTime()})`;\n\n\t\t\tcase 'URL':\n\t\t\t\treturn `new URL(${stringify_string(thing.toString())})`;\n\n\t\t\tcase 'URLSearchParams':\n\t\t\t\treturn `new URLSearchParams(${stringify_string(thing.toString())})`;\n\n\t\t\tcase 'Array': {\n\t\t\t\t// For dense arrays (no holes), we iterate normally.\n\t\t\t\t// When we encounter the first hole, we call Object.keys\n\t\t\t\t// to determine the sparseness, then decide between:\n\t\t\t\t// - Array literal with holes: [,\"a\",,] (default)\n\t\t\t\t// - Object.assign: Object.assign(Array(n),{...}) (for very sparse arrays)\n\t\t\t\t// Only the Object.assign path avoids iterating every slot, which\n\t\t\t\t// is what protects against the DoS of e.g. `arr[1000000] = 1`.\n\t\t\t\tlet has_holes = false;\n\n\t\t\t\tlet result = '[';\n\n\t\t\t\tfor (let i = 0; i < thing.length; i += 1) {\n\t\t\t\t\tif (i > 0) result += ',';\n\n\t\t\t\t\tif (Object.hasOwn(thing, i)) {\n\t\t\t\t\t\tresult += stringify(thing[i]);\n\t\t\t\t\t} else if (!has_holes) {\n\t\t\t\t\t\t// Decide between array literal and Object.assign.\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// Array literal: holes are consecutive commas.\n\t\t\t\t\t\t// For example, [, \"a\", ,] is written as [,\"a\",,].\n\t\t\t\t\t\t// Each hole costs 1 char (a comma).\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// Object.assign: populated indices are listed explicitly.\n\t\t\t\t\t\t// For example, [, \"a\", ,] would be written as\n\t\t\t\t\t\t// Object.assign(Array(3),{1:\"a\"}). This avoids paying\n\t\t\t\t\t\t// per-hole, but has a large fixed overhead for the\n\t\t\t\t\t\t// \"Object.assign(Array(n),{...})\" wrapper, and each\n\t\t\t\t\t\t// element costs extra chars for its index and colon.\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// The serialized values are the same size either way, so\n\t\t\t\t\t\t// the choice comes down to the structural overhead:\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// Array literal overhead:\n\t\t\t\t\t\t// 1 char per element or hole (comma separators)\n\t\t\t\t\t\t// + 2 chars for \"[\" and \"]\"\n\t\t\t\t\t\t// = L + 2\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// Object.assign overhead:\n\t\t\t\t\t\t// \"Object.assign(Array(\" — 20 chars\n\t\t\t\t\t\t// + length — d chars\n\t\t\t\t\t\t// + \"),{\" — 3 chars\n\t\t\t\t\t\t// + for each populated element:\n\t\t\t\t\t\t// index + \":\" + \",\" — (d + 2) chars\n\t\t\t\t\t\t// + \"})\" — 2 chars\n\t\t\t\t\t\t// = (25 + d) + P * (d + 2)\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// where L is the array length, P is the number of\n\t\t\t\t\t\t// populated elements, and d is the number of digits\n\t\t\t\t\t\t// in L (an upper bound on the digits in any index).\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// Object.assign is cheaper when:\n\t\t\t\t\t\t// (25 + d) + P * (d + 2) < L + 2\n\t\t\t\t\t\tconst populated_keys = valid_array_indices(/** @type {any[]} */ (thing));\n\t\t\t\t\t\tconst population = populated_keys.length;\n\t\t\t\t\t\tconst d = String(thing.length).length;\n\n\t\t\t\t\t\tconst hole_cost = thing.length + 2;\n\t\t\t\t\t\tconst sparse_cost = 25 + d + population * (d + 2);\n\n\t\t\t\t\t\tif (hole_cost > sparse_cost) {\n\t\t\t\t\t\t\tconst entries = populated_keys.map((k) => `${k}:${stringify(thing[k])}`).join(',');\n\t\t\t\t\t\t\treturn `Object.assign(Array(${thing.length}),{${entries}})`;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Re-process this index as a hole in the array literal\n\t\t\t\t\t\thas_holes = true;\n\t\t\t\t\t\ti -= 1;\n\t\t\t\t\t}\n\t\t\t\t\t// else: already decided on array literal, hole is just an empty slot\n\t\t\t\t\t// (the comma separator is all we need — no content for this position)\n\t\t\t\t}\n\n\t\t\t\tconst tail = thing.length === 0 || thing.length - 1 in thing ? '' : ',';\n\t\t\t\treturn result + tail + ']';\n\t\t\t}\n\n\t\t\tcase 'Set':\n\t\t\tcase 'Map':\n\t\t\t\treturn `new ${type}([${Array.from(thing).map(stringify).join(',')}])`;\n\n\t\t\tcase 'Int8Array':\n\t\t\tcase 'Uint8Array':\n\t\t\tcase 'Uint8ClampedArray':\n\t\t\tcase 'Int16Array':\n\t\t\tcase 'Uint16Array':\n\t\t\tcase 'Float16Array':\n\t\t\tcase 'Int32Array':\n\t\t\tcase 'Uint32Array':\n\t\t\tcase 'Float32Array':\n\t\t\tcase 'Float64Array':\n\t\t\tcase 'BigInt64Array':\n\t\t\tcase 'BigUint64Array': {\n\t\t\t\tlet str = `new ${type}`;\n\n\t\t\t\tif (!names.has(thing.buffer)) {\n\t\t\t\t\tconst array = new thing.constructor(thing.buffer);\n\t\t\t\t\tstr += `([${array}])`;\n\t\t\t\t} else {\n\t\t\t\t\tstr += `(${stringify(thing.buffer)})`;\n\t\t\t\t}\n\n\t\t\t\t// handle subarrays\n\t\t\t\tif (thing.byteLength !== thing.buffer.byteLength) {\n\t\t\t\t\tconst start = thing.byteOffset / thing.BYTES_PER_ELEMENT;\n\t\t\t\t\tconst end = start + thing.length;\n\t\t\t\t\tstr += `.subarray(${start},${end})`;\n\t\t\t\t}\n\n\t\t\t\treturn str;\n\t\t\t}\n\n\t\t\tcase 'DataView': {\n\t\t\t\tlet str = `new DataView`;\n\n\t\t\t\tif (!names.has(thing.buffer)) {\n\t\t\t\t\tstr += `(new Uint8Array([${new Uint8Array(thing.buffer)}]).buffer`;\n\t\t\t\t} else {\n\t\t\t\t\tstr += `(${stringify(thing.buffer)}`;\n\t\t\t\t}\n\n\t\t\t\t// handle subviews\n\t\t\t\tif (thing.byteLength !== thing.buffer.byteLength) {\n\t\t\t\t\tstr += `,${thing.startOffset},${thing.byteLength}`;\n\t\t\t\t}\n\n\t\t\t\treturn str + ')';\n\t\t\t}\n\n\t\t\tcase 'ArrayBuffer': {\n\t\t\t\tconst ui8 = new Uint8Array(thing);\n\t\t\t\treturn `new Uint8Array([${ui8.toString()}]).buffer`;\n\t\t\t}\n\n\t\t\tcase 'Temporal.Duration':\n\t\t\tcase 'Temporal.Instant':\n\t\t\tcase 'Temporal.PlainDate':\n\t\t\tcase 'Temporal.PlainTime':\n\t\t\tcase 'Temporal.PlainDateTime':\n\t\t\tcase 'Temporal.PlainMonthDay':\n\t\t\tcase 'Temporal.PlainYearMonth':\n\t\t\tcase 'Temporal.ZonedDateTime':\n\t\t\t\treturn `${type}.from(${stringify_string(thing.toString())})`;\n\n\t\t\tdefault:\n\t\t\t\tconst keys = Object.keys(thing);\n\t\t\t\tconst obj = keys.map((key) => `${safe_key(key)}:${stringify(thing[key])}`).join(',');\n\t\t\t\tconst proto = Object.getPrototypeOf(thing);\n\t\t\t\tif (proto === null) {\n\t\t\t\t\treturn keys.length > 0 ? `{${obj},__proto__:null}` : `{__proto__:null}`;\n\t\t\t\t}\n\n\t\t\t\treturn `{${obj}}`;\n\t\t}\n\t}\n\n\tconst str = stringify(value);\n\n\tif (names.size) {\n\t\t/** @type {string[]} */\n\t\tconst params = [];\n\n\t\t/** @type {string[]} */\n\t\tconst statements = [];\n\n\t\t/** @type {string[]} */\n\t\tconst values = [];\n\n\t\tnames.forEach((name, thing) => {\n\t\t\tparams.push(name);\n\n\t\t\tif (custom.has(thing)) {\n\t\t\t\tvalues.push(/** @type {string} */ (custom.get(thing)));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (is_primitive(thing)) {\n\t\t\t\tvalues.push(stringify_primitive(thing));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst type = get_type(thing);\n\n\t\t\tswitch (type) {\n\t\t\t\tcase 'Number':\n\t\t\t\tcase 'String':\n\t\t\t\tcase 'Boolean':\n\t\t\t\tcase 'BigInt':\n\t\t\t\t\tvalues.push(`Object(${stringify(thing.valueOf())})`);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'RegExp':\n\t\t\t\t\tconst { source, flags } = thing;\n\t\t\t\t\tconst regexp = flags\n\t\t\t\t\t\t? `new RegExp(${stringify_string(source)},\"${flags}\")`\n\t\t\t\t\t\t: `new RegExp(${stringify_string(source)})`\n\t\t\t\t\tvalues.push(regexp);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Date':\n\t\t\t\t\tvalues.push(`new Date(${thing.getTime()})`);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'URL':\n\t\t\t\t\tvalues.push(`new URL(${stringify_string(thing.toString())})`);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'URLSearchParams':\n\t\t\t\t\tvalues.push(`new URLSearchParams(${stringify_string(thing.toString())})`);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Array':\n\t\t\t\t\tvalues.push(`Array(${thing.length})`);\n\t\t\t\t\t/** @type {any[]} */ (thing).forEach((v, i) => {\n\t\t\t\t\t\tstatements.push(`${name}[${i}]=${stringify(v)}`);\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Set':\n\t\t\t\t\tvalues.push(`new Set`);\n\t\t\t\t\tstatements.push(\n\t\t\t\t\t\t`${name}.${Array.from(thing)\n\t\t\t\t\t\t\t.map((v) => `add(${stringify(v)})`)\n\t\t\t\t\t\t\t.join('.')}`\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Map':\n\t\t\t\t\tvalues.push(`new Map`);\n\t\t\t\t\tstatements.push(\n\t\t\t\t\t\t`${name}.${Array.from(thing)\n\t\t\t\t\t\t\t.map(([k, v]) => `set(${stringify(k)}, ${stringify(v)})`)\n\t\t\t\t\t\t\t.join('.')}`\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Int8Array':\n\t\t\t\tcase 'Uint8Array':\n\t\t\t\tcase 'Uint8ClampedArray':\n\t\t\t\tcase 'Int16Array':\n\t\t\t\tcase 'Uint16Array':\n\t\t\t\tcase 'Float16Array':\n\t\t\t\tcase 'Int32Array':\n\t\t\t\tcase 'Uint32Array':\n\t\t\t\tcase 'Float32Array':\n\t\t\t\tcase 'Float64Array':\n\t\t\t\tcase 'BigInt64Array':\n\t\t\t\tcase 'BigUint64Array': {\n\t\t\t\t\tlet str = `new ${type}`;\n\n\t\t\t\t\tif (!names.has(thing.buffer)) {\n\t\t\t\t\t\tconst array = new thing.constructor(thing.buffer);\n\t\t\t\t\t\tstr += `([${array}])`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstr += `(${stringify(thing.buffer)})`;\n\t\t\t\t\t}\n\n\t\t\t\t\t// handle subarrays\n\t\t\t\t\tif (thing.byteLength !== thing.buffer.byteLength) {\n\t\t\t\t\t\tconst start = thing.byteOffset / thing.BYTES_PER_ELEMENT;\n\t\t\t\t\t\tconst end = start + thing.length;\n\t\t\t\t\t\tstr += `.subarray(${start},${end})`;\n\t\t\t\t\t}\n\n\t\t\t\t\tvalues.push(`{}`);\n\t\t\t\t\tstatements.push(`${name}=${str}`);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase 'DataView': {\n\t\t\t\t\tlet str = `new DataView`;\n\n\t\t\t\t\tif (!names.has(thing.buffer)) {\n\t\t\t\t\t\tstr += `(new Uint8Array([${new Uint8Array(thing.buffer)}]).buffer`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstr += `(${stringify(thing.buffer)}`;\n\t\t\t\t\t}\n\n\t\t\t\t\t// handle subviews\n\t\t\t\t\tif (thing.byteLength !== thing.buffer.byteLength) {\n\t\t\t\t\t\tstr += `,${thing.byteOffset},${thing.byteLength}`;\n\t\t\t\t\t}\n\n\t\t\t\t\tstr += ')';\n\n\t\t\t\t\tvalues.push(`{}`);\n\t\t\t\t\tstatements.push(`${name}=${str}`);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase 'ArrayBuffer':\n\t\t\t\t\tvalues.push(`new Uint8Array([${new Uint8Array(thing)}]).buffer`);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tvalues.push(Object.getPrototypeOf(thing) === null ? 'Object.create(null)' : '{}');\n\t\t\t\t\tObject.keys(thing).forEach((key) => {\n\t\t\t\t\t\tstatements.push(`${name}${safe_prop(key)}=${stringify(thing[key])}`);\n\t\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tstatements.push(`return ${str}`);\n\n\t\treturn `(function(${params.join(',')}){${statements.join(';')}}(${values.join(',')}))`;\n\t} else {\n\t\treturn str;\n\t}\n}\n\n/** @param {number} num */\nfunction get_name(num) {\n\tlet name = '';\n\n\tdo {\n\t\tname = chars[num % chars.length] + name;\n\t\tnum = ~~(num / chars.length) - 1;\n\t} while (num >= 0);\n\n\treturn reserved.test(name) ? `${name}0` : name;\n}\n\n/** @param {string} c */\nfunction escape_unsafe_char(c) {\n\treturn escaped[c] || c;\n}\n\n/** @param {string} str */\nfunction escape_unsafe_chars(str) {\n\treturn str.replace(unsafe_chars, escape_unsafe_char);\n}\n\n/** @param {string} key */\nfunction safe_key(key) {\n\treturn /^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(key) ? key : escape_unsafe_chars(JSON.stringify(key));\n}\n\n/** @param {string} key */\nfunction safe_prop(key) {\n\treturn /^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(key)\n\t\t? `.${key}`\n\t\t: `[${escape_unsafe_chars(JSON.stringify(key))}]`;\n}\n\n/** @param {any} thing */\nfunction stringify_primitive(thing) {\n\tconst type = typeof thing;\n\tif (type === 'string') return stringify_string(thing);\n\tif (thing === void 0) return 'void 0';\n\tif (thing === 0 && 1 / thing < 0) return '-0';\n\tconst str = String(thing);\n\tif (type === 'number') return str.replace(/^(-)?0\\./, '$1.');\n\tif (type === 'bigint') return thing + 'n';\n\treturn str;\n}\n","/* This file is generated by scripts/process-messages/index.js. Do not edit! */\n\nimport { DEV } from 'esm-env';\n\nvar bold = 'font-weight: bold';\nvar normal = 'font-weight: normal';\n\n/**\n * A `hydratable` value with key `%key%` was created, but at least part of it was not used during the render.\n * \n * The `hydratable` was initialized in:\n * %stack%\n * @param {string} key\n * @param {string} stack\n */\nexport function unresolved_hydratable(key, stack) {\n\tif (DEV) {\n\t\tconsole.warn(\n\t\t\t`%c[svelte] unresolved_hydratable\\n%cA \\`hydratable\\` value with key \\`${key}\\` was created, but at least part of it was not used during the render.\n\nThe \\`hydratable\\` was initialized in:\n${stack}\\nhttps://svelte.dev/e/unresolved_hydratable`,\n\t\t\tbold,\n\t\t\tnormal\n\t\t);\n\t} else {\n\t\tconsole.warn(`https://svelte.dev/e/unresolved_hydratable`);\n\t}\n}","import { DEV } from 'esm-env';\nimport { hash } from '../../../utils.js';\n\n/**\n * @param {string} value\n */\nexport function html(value) {\n\tvar html = String(value ?? '');\n\tvar open = DEV ? `<!--${hash(html)}-->` : '<!---->';\n\treturn open + html + '<!---->';\n}\n","/** @import { ComponentType, SvelteComponent, Component } from 'svelte' */\n/** @import { Csp, RenderOutput } from '#server' */\n/** @import { Store } from '#shared' */\nexport { FILENAME, HMR } from '../../constants.js';\nimport { attr, clsx, to_class, to_style } from '../shared/attributes.js';\nimport { is_promise, noop } from '../shared/utils.js';\nimport { subscribe_to_store } from '../../store/utils.js';\nimport {\n\tUNINITIALIZED,\n\tELEMENT_PRESERVE_ATTRIBUTE_CASE,\n\tELEMENT_IS_NAMESPACED,\n\tELEMENT_IS_INPUT\n} from '../../constants.js';\nimport { escape_html } from '../../escaping.js';\nimport { DEV } from 'esm-env';\nimport { EMPTY_COMMENT, BLOCK_OPEN, BLOCK_OPEN_ELSE } from './hydration.js';\nimport { validate_store } from '../shared/validate.js';\nimport {\n\tis_boolean_attribute,\n\tis_raw_text_element,\n\tis_void,\n\tREGEX_VALID_TAG_NAME\n} from '../../utils.js';\nimport { Renderer } from './renderer.js';\nimport * as e from './errors.js';\nimport { ssr_context } from './context.js';\n\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nconst INVALID_ATTR_NAME_CHAR_REGEX =\n\t/[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n\n/**\n * @param {Renderer} renderer\n * @param {string} tag\n * @param {() => void} attributes_fn\n * @param {() => void} children_fn\n * @returns {void}\n */\nexport function element(renderer, tag, attributes_fn = noop, children_fn = noop) {\n\trenderer.push('<!---->');\n\n\tif (tag) {\n\t\tif (!REGEX_VALID_TAG_NAME.test(tag)) {\n\t\t\te.dynamic_element_invalid_tag(tag);\n\t\t}\n\t\trenderer.push(`<${tag}`);\n\t\tattributes_fn();\n\t\trenderer.push(`>`);\n\n\t\tif (!is_void(tag)) {\n\t\t\tchildren_fn();\n\t\t\tif (!is_raw_text_element(tag)) {\n\t\t\t\trenderer.push(EMPTY_COMMENT);\n\t\t\t}\n\t\t\trenderer.push(`</${tag}>`);\n\t\t}\n\t}\n\n\trenderer.push('<!---->');\n}\n\n/**\n * Only available on the server and when compiling with the `server` option.\n * Takes a component and returns an object with `body` and `head` properties on it, which you can use to populate the HTML when server-rendering your app.\n * @template {Record<string, any>} Props\n * @param {Component<Props> | ComponentType<SvelteComponent<Props>>} component\n * @param {{ props?: Omit<Props, '$$slots' | '$$events'>; context?: Map<any, any>; idPrefix?: string; csp?: Csp; transformError?: (error: unknown) => unknown }} [options]\n * @returns {RenderOutput}\n */\nexport function render(component, options = {}) {\n\tif (options.csp?.hash && options.csp.nonce) {\n\t\te.invalid_csp();\n\t}\n\treturn Renderer.render(/** @type {Component<Props>} */ (component), options);\n}\n\n/**\n * @param {string} hash\n * @param {Renderer} renderer\n * @param {(renderer: Renderer) => Promise<void> | void} fn\n * @returns {void}\n */\nexport function head(hash, renderer, fn) {\n\trenderer.head((renderer) => {\n\t\trenderer.push(`<!--${hash}-->`);\n\t\trenderer.child(fn);\n\t\trenderer.push(EMPTY_COMMENT);\n\t});\n}\n\n/**\n * @param {Renderer} renderer\n * @param {boolean} is_html\n * @param {Record<string, string>} props\n * @param {() => void} component\n * @param {boolean} dynamic\n * @returns {void}\n */\nexport function css_props(renderer, is_html, props, component, dynamic = false) {\n\tconst styles = style_object_to_string(props);\n\n\tif (is_html) {\n\t\trenderer.push(`<svelte-css-wrapper style=\"display: contents; ${styles}\">`);\n\t} else {\n\t\trenderer.push(`<g style=\"${styles}\">`);\n\t}\n\n\tcomponent();\n\n\tif (!dynamic) {\n\t\trenderer.push('<!---->');\n\t}\n\n\tif (is_html) {\n\t\trenderer.push('</svelte-css-wrapper>');\n\t} else {\n\t\trenderer.push('</g>');\n\t}\n}\n\n/**\n * @param {Record<string, unknown>} attrs\n * @param {string} [css_hash]\n * @param {Record<string, boolean>} [classes]\n * @param {Record<string, string>} [styles]\n * @param {number} [flags]\n * @returns {string}\n */\nexport function attributes(attrs, css_hash, classes, styles, flags = 0) {\n\tif (styles) {\n\t\tattrs.style = to_style(attrs.style, styles);\n\t}\n\n\tif (attrs.class) {\n\t\tattrs.class = clsx(attrs.class);\n\t}\n\n\tif (css_hash || classes) {\n\t\tattrs.class = to_class(attrs.class, css_hash, classes);\n\t}\n\n\tlet attr_str = '';\n\tlet name;\n\n\tconst is_html = (flags & ELEMENT_IS_NAMESPACED) === 0;\n\tconst lowercase = (flags & ELEMENT_PRESERVE_ATTRIBUTE_CASE) === 0;\n\tconst is_input = (flags & ELEMENT_IS_INPUT) !== 0;\n\n\tfor (name of Object.keys(attrs)) {\n\t\t// omit functions, internal svelte properties and invalid attribute names\n\t\tif (typeof attrs[name] === 'function') continue;\n\t\tif (name[0] === '$' && name[1] === '$') continue; // faster than name.startsWith('$$')\n\t\tif (name === '' || INVALID_ATTR_NAME_CHAR_REGEX.test(name)) continue;\n\n\t\tvar value = attrs[name];\n\t\tvar lower = name.toLowerCase();\n\n\t\tif (lowercase) name = lower;\n\n\t\t// omit event handler attributes\n\t\tif (lower.length > 2 && lower.startsWith('on')) continue;\n\n\t\tif (is_input) {\n\t\t\tif (name === 'defaultvalue' || name === 'defaultchecked') {\n\t\t\t\tname = name === 'defaultvalue' ? 'value' : 'checked';\n\t\t\t\tif (attrs[name]) continue;\n\t\t\t}\n\t\t}\n\n\t\tattr_str += attr(name, value, is_html && is_boolean_attribute(name));\n\t}\n\n\treturn attr_str;\n}\n\n/**\n * @param {Record<string, unknown>[]} props\n * @returns {Record<string, unknown>}\n */\nexport function spread_props(props) {\n\t/** @type {Record<string, unknown>} */\n\tconst merged_props = {};\n\tlet key;\n\n\tfor (let i = 0; i < props.length; i++) {\n\t\tconst obj = props[i];\n\t\tif (obj == null) continue;\n\t\tfor (key of Object.keys(obj)) {\n\t\t\tconst desc = Object.getOwnPropertyDescriptor(obj, key);\n\t\t\tif (desc) {\n\t\t\t\tObject.defineProperty(merged_props, key, desc);\n\t\t\t} else {\n\t\t\t\tmerged_props[key] = obj[key];\n\t\t\t}\n\t\t}\n\t}\n\treturn merged_props;\n}\n\n/**\n * @param {unknown} value\n * @returns {string}\n */\nexport function stringify(value) {\n\treturn typeof value === 'string' ? value : value == null ? '' : value + '';\n}\n\n/** @param {Record<string, string>} style_object */\nfunction style_object_to_string(style_object) {\n\treturn Object.keys(style_object)\n\t\t.filter(/** @param {any} key */ (key) => style_object[key] != null && style_object[key] !== '')\n\t\t.map(/** @param {any} key */ (key) => `${key}: ${escape_html(style_object[key], true)};`)\n\t\t.join(' ');\n}\n\n/**\n * @param {any} value\n * @param {string | undefined} [hash]\n * @param {Record<string, boolean>} [directives]\n */\nexport function attr_class(value, hash, directives) {\n\tvar result = to_class(value, hash, directives);\n\treturn result ? ` class=\"${escape_html(result, true)}\"` : '';\n}\n\n/**\n * @param {any} value\n * @param {Record<string,any>|[Record<string,any>,Record<string,any>]} [directives]\n */\nexport function attr_style(value, directives) {\n\tvar result = to_style(value, directives);\n\treturn result ? ` style=\"${escape_html(result, true)}\"` : '';\n}\n\n/**\n * @template V\n * @param {Record<string, [any, any, any]>} store_values\n * @param {string} store_name\n * @param {Store<V> | null | undefined} store\n * @returns {V}\n */\nexport function store_get(store_values, store_name, store) {\n\tif (DEV) {\n\t\tvalidate_store(store, store_name.slice(1));\n\t}\n\n\t// it could be that someone eagerly updates the store in the instance script, so\n\t// we should only reuse the store value in the template\n\tif (store_name in store_values && store_values[store_name][0] === store) {\n\t\treturn store_values[store_name][2];\n\t}\n\n\tstore_values[store_name]?.[1](); // if store was switched, unsubscribe from old store\n\tstore_values[store_name] = [store, null, undefined];\n\tconst unsub = subscribe_to_store(\n\t\tstore,\n\t\t/** @param {any} v */ (v) => (store_values[store_name][2] = v)\n\t);\n\tstore_values[store_name][1] = unsub;\n\treturn store_values[store_name][2];\n}\n\n/**\n * Sets the new value of a store and returns that value.\n * @template V\n * @param {Store<V>} store\n * @param {V} value\n * @returns {V}\n */\nexport function store_set(store, value) {\n\tstore.set(value);\n\treturn value;\n}\n\n/**\n * Updates a store with a new value.\n * @template V\n * @param {Record<string, [any, any, any]>} store_values\n * @param {string} store_name\n * @param {Store<V>} store\n * @param {any} expression\n */\nexport function store_mutate(store_values, store_name, store, expression) {\n\tstore_set(store, store_get(store_values, store_name, store));\n\treturn expression;\n}\n\n/**\n * @param {Record<string, [any, any, any]>} store_values\n * @param {string} store_name\n * @param {Store<number>} store\n * @param {1 | -1} [d]\n * @returns {number}\n */\nexport function update_store(store_values, store_name, store, d = 1) {\n\tlet store_value = store_get(store_values, store_name, store);\n\tstore.set(store_value + d);\n\treturn store_value;\n}\n\n/**\n * @param {Record<string, [any, any, any]>} store_values\n * @param {string} store_name\n * @param {Store<number>} store\n * @param {1 | -1} [d]\n * @returns {number}\n */\nexport function update_store_pre(store_values, store_name, store, d = 1) {\n\tconst value = store_get(store_values, store_name, store) + d;\n\tstore.set(value);\n\treturn value;\n}\n\n/** @param {Record<string, [any, any, any]>} store_values */\nexport function unsubscribe_stores(store_values) {\n\tfor (const store_name of Object.keys(store_values)) {\n\t\tstore_values[store_name][1]();\n\t}\n}\n\n/**\n * @param {Renderer} renderer\n * @param {Record<string, any>} $$props\n * @param {string} name\n * @param {Record<string, unknown>} slot_props\n * @param {null | (() => void)} fallback_fn\n * @returns {void}\n */\nexport function slot(renderer, $$props, name, slot_props, fallback_fn) {\n\tvar slot_fn = $$props.$$slots?.[name];\n\t// Interop: Can use snippets to fill slots\n\tif (slot_fn === true) {\n\t\tslot_fn = $$props[name === 'default' ? 'children' : name];\n\t}\n\n\tif (slot_fn !== undefined) {\n\t\tslot_fn(renderer, slot_props);\n\t} else {\n\t\tfallback_fn?.();\n\t}\n}\n\n/**\n * @param {Record<string, unknown>} props\n * @param {string[]} rest\n * @returns {Record<string, unknown>}\n */\nexport function rest_props(props, rest) {\n\t/** @type {Record<string, unknown>} */\n\tconst rest_props = {};\n\tlet key;\n\tfor (key of Object.keys(props)) {\n\t\tif (!rest.includes(key)) {\n\t\t\trest_props[key] = props[key];\n\t\t}\n\t}\n\treturn rest_props;\n}\n\n/**\n * @param {Record<string, unknown>} props\n * @returns {Record<string, unknown>}\n */\nexport function sanitize_props(props) {\n\tconst { children, $$slots, ...sanitized } = props;\n\treturn sanitized;\n}\n\n/**\n * @param {Record<string, any>} props\n * @returns {Record<string, boolean>}\n */\nexport function sanitize_slots(props) {\n\t/** @type {Record<string, boolean>} */\n\tconst sanitized = {};\n\tif (props.children) sanitized.default = true;\n\tfor (const key of Object.keys(props.$$slots || {})) {\n\t\tsanitized[key] = true;\n\t}\n\treturn sanitized;\n}\n\n/**\n * Legacy mode: If the prop has a fallback and is bound in the\n * parent component, propagate the fallback value upwards.\n * @param {Record<string, unknown>} props_parent\n * @param {Record<string, unknown>} props_now\n */\nexport function bind_props(props_parent, props_now) {\n\tfor (const key of Object.keys(props_now)) {\n\t\tconst initial_value = props_parent[key];\n\t\tconst value = props_now[key];\n\t\tif (\n\t\t\tinitial_value === undefined &&\n\t\t\tvalue !== undefined &&\n\t\t\tObject.getOwnPropertyDescriptor(props_parent, key)?.set\n\t\t) {\n\t\t\tprops_parent[key] = value;\n\t\t}\n\t}\n}\n\n/**\n * @template V\n * @param {Renderer} renderer\n * @param {Promise<V>} promise\n * @param {null | (() => void)} pending_fn\n * @param {(value: V) => void} then_fn\n * @returns {void}\n */\nfunction await_block(renderer, promise, pending_fn, then_fn) {\n\tif (is_promise(promise)) {\n\t\trenderer.push(BLOCK_OPEN);\n\t\tpromise.then(null, noop);\n\t\tif (pending_fn !== null) {\n\t\t\tpending_fn();\n\t\t}\n\t} else if (then_fn !== null) {\n\t\trenderer.push(BLOCK_OPEN_ELSE);\n\t\tthen_fn(promise);\n\t}\n}\n\nexport { await_block as await };\n\n/** @param {any} array_like_or_iterator */\nexport function ensure_array_like(array_like_or_iterator) {\n\tif (array_like_or_iterator) {\n\t\treturn array_like_or_iterator.length !== undefined\n\t\t\t? array_like_or_iterator\n\t\t\t: Array.from(array_like_or_iterator);\n\t}\n\treturn [];\n}\n\n/**\n * @template V\n * @param {() => V} get_value\n */\nexport function once(get_value) {\n\tlet value = /** @type {V} */ (UNINITIALIZED);\n\treturn () => {\n\t\tif (value === UNINITIALIZED) {\n\t\t\tvalue = get_value();\n\t\t}\n\t\treturn value;\n\t};\n}\n\n/**\n * Create an unique ID\n * @param {Renderer} renderer\n * @returns {string}\n */\nexport function props_id(renderer) {\n\tconst uid = renderer.global.uid();\n\trenderer.push('<!--$' + uid + '-->');\n\treturn uid;\n}\n\nexport { attr, clsx };\n\nexport { html } from './blocks/html.js';\n\nexport { save } from './context.js';\n\nexport { push_element, pop_element, validate_snippet_args } from './dev.js';\n\nexport { snapshot } from '../shared/clone.js';\n\nexport { fallback, to_array, exclude_from_object } from '../shared/utils.js';\n\nexport {\n\tinvalid_default_snippet,\n\tvalidate_dynamic_element_tag,\n\tvalidate_void_dynamic_element,\n\tprevent_snippet_stringification\n} from '../shared/validate.js';\n\nexport { escape_html as escape };\n\n/**\n * @template T\n * @param {()=>T} fn\n * @returns {(new_value?: T) => (T | void)}\n */\nexport function derived(fn) {\n\t// deriveds created during render are memoized,\n\t// deriveds created outside (e.g. SvelteKit `page` stuff) are not\n\tconst get_value = ssr_context === null ? fn : once(fn);\n\n\t/** @type {T | undefined} */\n\tlet updated_value;\n\n\treturn function (new_value) {\n\t\tif (arguments.length === 0) {\n\t\t\treturn updated_value ?? get_value();\n\t\t}\n\n\t\tupdated_value = new_value;\n\t\treturn updated_value;\n\t};\n}\n\n/**\n * @template {number | bigint} T\n * @param {(value?: T) => T} derived\n * @param {1 | -1} [d]\n * @returns {T}\n */\nexport function update_derived(derived, d = 1) {\n\tconst value = derived();\n\tlet increase = typeof value === 'bigint' ? BigInt(d) : d;\n\t// for some reason TS is mad even if T is always number or bigint\n\tderived(value + /** @type {*} */ (increase));\n\treturn value;\n}\n\n/**\n * @template {number | bigint} T\n * @param {(value?: T) => T} derived\n * @param {1 | -1} [d]\n * @returns {T}\n */\nexport function update_derived_pre(derived, d = 1) {\n\tconst old_value = derived();\n\tlet increase = typeof old_value === 'bigint' ? BigInt(d) : d;\n\t// for some reason TS is mad even if T is always number or bigint\n\tconst value = old_value + /** @type {*} */ (increase);\n\tderived(value);\n\treturn value;\n}\n\n/**\n * @template T\n * @param {()=>T} fn\n */\nexport function async_derived(fn) {\n\treturn Promise.resolve(fn()).then((value) => {\n\t\treturn () => value;\n\t});\n}\n","import { BROWSER } from 'esm-env';\n\nlet text_encoder;\n// TODO - remove this and use global `crypto` when we drop Node 18\nlet crypto;\n\n/** @param {string} module_name */\nconst obfuscated_import = (module_name) => import(/* @vite-ignore */ module_name);\n\n/** @param {string} data */\nexport async function sha256(data) {\n\ttext_encoder ??= new TextEncoder();\n\n\t// @ts-expect-error\n\tcrypto ??= globalThis.crypto?.subtle?.digest\n\t\t? globalThis.crypto\n\t\t: // @ts-ignore - we don't install node types in the prod build\n\t\t\t// don't use import('node:crypto') directly because static analysers will think we rely on node when we don't\n\t\t\t(await obfuscated_import('node:crypto')).webcrypto;\n\n\tconst hash_buffer = await crypto.subtle.digest('SHA-256', text_encoder.encode(data));\n\n\treturn base64_encode(hash_buffer);\n}\n\n/**\n * @param {Uint8Array} bytes\n * @returns {string}\n */\nexport function base64_encode(bytes) {\n\t// Using `Buffer` is faster than iterating\n\t// @ts-ignore\n\tif (!BROWSER && globalThis.Buffer) {\n\t\t// @ts-ignore\n\t\treturn globalThis.Buffer.from(bytes).toString('base64');\n\t}\n\n\tlet binary = '';\n\n\tfor (let i = 0; i < bytes.length; i++) {\n\t\tbinary += String.fromCharCode(bytes[i]);\n\t}\n\n\treturn btoa(binary);\n}\n","/** @import { Component } from 'svelte' */\n/** @import { Csp, HydratableContext, RenderOutput, SSRContext, SyncRenderOutput, Sha256Source } from './types.js' */\n/** @import { MaybePromise } from '#shared' */\nimport { async_mode_flag } from '../flags/index.js';\nimport { abort } from './abort-signal.js';\nimport { pop, push, set_ssr_context, ssr_context } from './context.js';\nimport * as e from './errors.js';\nimport * as w from './warnings.js';\nimport { BLOCK_CLOSE, BLOCK_OPEN } from './hydration.js';\nimport { HYDRATION_START_FAILED } from '../../constants.js';\nimport { attributes } from './index.js';\nimport { get_render_context, with_render_context, init_render_context } from './render-context.js';\nimport { sha256 } from './crypto.js';\nimport * as devalue from 'devalue';\nimport { has_own_property, noop } from '../shared/utils.js';\nimport { escape_html } from '../../escaping.js';\n\n/** @typedef {'head' | 'body'} RendererType */\n/** @typedef {{ [key in RendererType]: string }} AccumulatedContent */\n\n/**\n * @typedef {string | Renderer} RendererItem\n */\n\n/**\n * Renderers are basically a tree of `string | Renderer`s, where each `Renderer` in the tree represents\n * work that may or may not have completed. A renderer can be {@link collect}ed to aggregate the\n * content from itself and all of its children, but this will throw if any of the children are\n * performing asynchronous work. To asynchronously collect a renderer, just `await` it.\n *\n * The `string` values within a renderer are always associated with the {@link type} of that renderer. To switch types,\n * call {@link child} with a different `type` argument.\n */\nexport class Renderer {\n\t/**\n\t * The contents of the renderer.\n\t * @type {RendererItem[]}\n\t */\n\t#out = [];\n\n\t/**\n\t * Any `onDestroy` callbacks registered during execution of this renderer.\n\t * @type {(() => void)[] | undefined}\n\t */\n\t#on_destroy = undefined;\n\n\t/**\n\t * Whether this renderer is a component body.\n\t * @type {boolean}\n\t */\n\t#is_component_body = false;\n\n\t/**\n\t * If set, this renderer is an error boundary. When async collection\n\t * of the children fails, the failed snippet is rendered instead.\n\t * @type {{\n\t * \tfailed: (renderer: Renderer, error: unknown, reset: () => void) => void;\n\t * \ttransformError: (error: unknown) => unknown;\n\t * \tcontext: SSRContext | null;\n\t * } | null}\n\t */\n\t#boundary = null;\n\n\t/**\n\t * The type of string content that this renderer is accumulating.\n\t * @type {RendererType}\n\t */\n\ttype;\n\n\t/** @type {Renderer | undefined} */\n\t#parent;\n\n\t/**\n\t * Asynchronous work associated with this renderer\n\t * @type {Promise<void> | undefined}\n\t */\n\tpromise = undefined;\n\n\t/**\n\t * State which is associated with the content tree as a whole.\n\t * It will be re-exposed, uncopied, on all children.\n\t * @type {SSRState}\n\t * @readonly\n\t */\n\tglobal;\n\n\t/**\n\t * State that is local to the branch it is declared in.\n\t * It will be shallow-copied to all children.\n\t *\n\t * @type {{ select_value: string | undefined }}\n\t */\n\tlocal;\n\n\t/**\n\t * @param {SSRState} global\n\t * @param {Renderer | undefined} [parent]\n\t */\n\tconstructor(global, parent) {\n\t\tthis.#parent = parent;\n\n\t\tthis.global = global;\n\t\tthis.local = parent ? { ...parent.local } : { select_value: undefined };\n\t\tthis.type = parent ? parent.type : 'body';\n\t}\n\n\t/**\n\t * @param {(renderer: Renderer) => void} fn\n\t */\n\thead(fn) {\n\t\tconst head = new Renderer(this.global, this);\n\t\thead.type = 'head';\n\n\t\tthis.#out.push(head);\n\t\thead.child(fn);\n\t}\n\n\t/**\n\t * @param {Array<Promise<void>>} blockers\n\t * @param {(renderer: Renderer) => void} fn\n\t */\n\tasync_block(blockers, fn) {\n\t\tthis.#out.push(BLOCK_OPEN);\n\t\tthis.async(blockers, fn);\n\t\tthis.#out.push(BLOCK_CLOSE);\n\t}\n\n\t/**\n\t * @param {Array<Promise<void>>} blockers\n\t * @param {(renderer: Renderer) => void} fn\n\t */\n\tasync(blockers, fn) {\n\t\tlet callback = fn;\n\n\t\tif (blockers.length > 0) {\n\t\t\tconst context = ssr_context;\n\n\t\t\tcallback = (renderer) => {\n\t\t\t\treturn Promise.all(blockers).then(() => {\n\t\t\t\t\tconst previous_context = ssr_context;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tset_ssr_context(context);\n\t\t\t\t\t\treturn fn(renderer);\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tset_ssr_context(previous_context);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};\n\t\t}\n\n\t\tthis.child(callback);\n\t}\n\n\t/**\n\t * @param {Array<() => void>} thunks\n\t */\n\trun(thunks) {\n\t\tconst context = ssr_context;\n\n\t\tlet promise = Promise.resolve(thunks[0]());\n\t\tconst promises = [promise];\n\n\t\tfor (const fn of thunks.slice(1)) {\n\t\t\tpromise = promise.then(() => {\n\t\t\t\tconst previous_context = ssr_context;\n\t\t\t\tset_ssr_context(context);\n\n\t\t\t\ttry {\n\t\t\t\t\treturn fn();\n\t\t\t\t} finally {\n\t\t\t\t\tset_ssr_context(previous_context);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tpromises.push(promise);\n\t\t}\n\n\t\t// prevent unhandled rejections, and attach the promise to the renderer instance\n\t\t// so that rejections correctly cause rendering to fail\n\t\tpromise.catch(noop);\n\t\tthis.promise = promise;\n\n\t\treturn promises;\n\t}\n\n\t/**\n\t * @param {(renderer: Renderer) => MaybePromise<void>} fn\n\t */\n\tchild_block(fn) {\n\t\tthis.#out.push(BLOCK_OPEN);\n\t\tthis.child(fn);\n\t\tthis.#out.push(BLOCK_CLOSE);\n\t}\n\n\t/**\n\t * Create a child renderer. The child renderer inherits the state from the parent,\n\t * but has its own content.\n\t * @param {(renderer: Renderer) => MaybePromise<void>} fn\n\t */\n\tchild(fn) {\n\t\tconst child = new Renderer(this.global, this);\n\t\tthis.#out.push(child);\n\n\t\tconst parent = ssr_context;\n\n\t\tset_ssr_context({\n\t\t\t...ssr_context,\n\t\t\tp: parent,\n\t\t\tc: null,\n\t\t\tr: child\n\t\t});\n\n\t\tconst result = fn(child);\n\n\t\tset_ssr_context(parent);\n\n\t\tif (result instanceof Promise) {\n\t\t\t// catch to avoid unhandled promise rejections - we'll end up throwing in `collect_async` if something fails\n\t\t\tresult.catch(noop);\n\t\t\tresult.finally(() => set_ssr_context(null)).catch(noop);\n\n\t\t\tif (child.global.mode === 'sync') {\n\t\t\t\te.await_invalid();\n\t\t\t}\n\n\t\t\tchild.promise = result;\n\t\t}\n\n\t\treturn child;\n\t}\n\n\t/**\n\t * Render children inside an error boundary. If the children throw and the API-level\n\t * `transformError` transform handles the error (doesn't re-throw), the `failed` snippet is\n\t * rendered instead. Otherwise the error propagates.\n\t *\n\t * @param {{ failed?: (renderer: Renderer, error: unknown, reset: () => void) => void }} props\n\t * @param {(renderer: Renderer) => MaybePromise<void>} children_fn\n\t */\n\tboundary(props, children_fn) {\n\t\t// Create a child renderer for the boundary content.\n\t\t// Mark it as a boundary so that #collect_content_async can catch\n\t\t// errors from nested async children and render the failed snippet.\n\t\tconst child = new Renderer(this.global, this);\n\t\tthis.#out.push(child);\n\n\t\tconst parent_context = ssr_context;\n\n\t\tif (props.failed) {\n\t\t\tchild.#boundary = {\n\t\t\t\tfailed: props.failed,\n\t\t\t\ttransformError: this.global.transformError,\n\t\t\t\tcontext: parent_context\n\t\t\t};\n\t\t}\n\n\t\tset_ssr_context({\n\t\t\t...ssr_context,\n\t\t\tp: parent_context,\n\t\t\tc: null,\n\t\t\tr: child\n\t\t});\n\n\t\ttry {\n\t\t\tconst result = children_fn(child);\n\n\t\t\tset_ssr_context(parent_context);\n\n\t\t\tif (result instanceof Promise) {\n\t\t\t\tif (child.global.mode === 'sync') {\n\t\t\t\t\te.await_invalid();\n\t\t\t\t}\n\t\t\t\tresult.catch(noop);\n\t\t\t\tchild.promise = result;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t// synchronous errors are handled here, async errors will be handled in #collect_content_async\n\t\t\tset_ssr_context(parent_context);\n\n\t\t\tconst failed_snippet = props.failed;\n\n\t\t\tif (!failed_snippet) throw error;\n\n\t\t\tconst result = this.global.transformError(error);\n\n\t\t\tchild.#out.length = 0;\n\t\t\tchild.#boundary = null;\n\n\t\t\tif (result instanceof Promise) {\n\t\t\t\tif (this.global.mode === 'sync') {\n\t\t\t\t\te.await_invalid();\n\t\t\t\t}\n\n\t\t\t\tchild.promise = /** @type {Promise<unknown>} */ (result).then((transformed) => {\n\t\t\t\t\tset_ssr_context(parent_context);\n\t\t\t\t\tchild.#out.push(Renderer.#serialize_failed_boundary(transformed));\n\t\t\t\t\tfailed_snippet(child, transformed, noop);\n\t\t\t\t\tchild.#out.push(BLOCK_CLOSE);\n\t\t\t\t});\n\t\t\t\tchild.promise.catch(noop);\n\t\t\t} else {\n\t\t\t\tchild.#out.push(Renderer.#serialize_failed_boundary(result));\n\t\t\t\tfailed_snippet(child, result, noop);\n\t\t\t\tchild.#out.push(BLOCK_CLOSE);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Create a component renderer. The component renderer inherits the state from the parent,\n\t * but has its own content. It is treated as an ordering boundary for ondestroy callbacks.\n\t * @param {(renderer: Renderer) => MaybePromise<void>} fn\n\t * @param {Function} [component_fn]\n\t * @returns {void}\n\t */\n\tcomponent(fn, component_fn) {\n\t\tpush(component_fn);\n\t\tconst child = this.child(fn);\n\t\tchild.#is_component_body = true;\n\t\tpop();\n\t}\n\n\t/**\n\t * @param {Record<string, any>} attrs\n\t * @param {(renderer: Renderer) => void} fn\n\t * @param {string | undefined} [css_hash]\n\t * @param {Record<string, boolean> | undefined} [classes]\n\t * @param {Record<string, string> | undefined} [styles]\n\t * @param {number | undefined} [flags]\n\t * @param {boolean | undefined} [is_rich]\n\t * @returns {void}\n\t */\n\tselect(attrs, fn, css_hash, classes, styles, flags, is_rich) {\n\t\tconst { value, ...select_attrs } = attrs;\n\n\t\tthis.push(`<select${attributes(select_attrs, css_hash, classes, styles, flags)}>`);\n\t\tthis.child((renderer) => {\n\t\t\trenderer.local.select_value = value;\n\t\t\tfn(renderer);\n\t\t});\n\t\tthis.push(`${is_rich ? '<!>' : ''}</select>`);\n\t}\n\n\t/**\n\t * @param {Record<string, any>} attrs\n\t * @param {string | number | boolean | ((renderer: Renderer) => void)} body\n\t * @param {string | undefined} [css_hash]\n\t * @param {Record<string, boolean> | undefined} [classes]\n\t * @param {Record<string, string> | undefined} [styles]\n\t * @param {number | undefined} [flags]\n\t * @param {boolean | undefined} [is_rich]\n\t */\n\toption(attrs, body, css_hash, classes, styles, flags, is_rich) {\n\t\tthis.#out.push(`<option${attributes(attrs, css_hash, classes, styles, flags)}`);\n\n\t\t/**\n\t\t * @param {Renderer} renderer\n\t\t * @param {any} value\n\t\t * @param {{ head?: string, body: any }} content\n\t\t */\n\t\tconst close = (renderer, value, { head, body }) => {\n\t\t\tif (has_own_property.call(attrs, 'value')) {\n\t\t\t\tvalue = attrs.value;\n\t\t\t}\n\n\t\t\tif (value === this.local.select_value) {\n\t\t\t\trenderer.#out.push(' selected=\"\"');\n\t\t\t}\n\n\t\t\trenderer.#out.push(`>${body}${is_rich ? '<!>' : ''}</option>`);\n\n\t\t\t// super edge case, but may as well handle it\n\t\t\tif (head) {\n\t\t\t\trenderer.head((child) => child.push(head));\n\t\t\t}\n\t\t};\n\n\t\tif (typeof body === 'function') {\n\t\t\tthis.child((renderer) => {\n\t\t\t\tconst r = new Renderer(this.global, this);\n\t\t\t\tbody(r);\n\n\t\t\t\tif (this.global.mode === 'async') {\n\t\t\t\t\treturn r.#collect_content_async().then((content) => {\n\t\t\t\t\t\tclose(renderer, content.body.replaceAll('<!---->', ''), content);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tconst content = r.#collect_content();\n\t\t\t\t\tclose(renderer, content.body.replaceAll('<!---->', ''), content);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tclose(this, body, { body: escape_html(body) });\n\t\t}\n\t}\n\n\t/**\n\t * @param {(renderer: Renderer) => void} fn\n\t */\n\ttitle(fn) {\n\t\tconst path = this.get_path();\n\n\t\t/** @param {string} head */\n\t\tconst close = (head) => {\n\t\t\tthis.global.set_title(head, path);\n\t\t};\n\n\t\tthis.child((renderer) => {\n\t\t\tconst r = new Renderer(renderer.global, renderer);\n\t\t\tfn(r);\n\n\t\t\tif (renderer.global.mode === 'async') {\n\t\t\t\treturn r.#collect_content_async().then((content) => {\n\t\t\t\t\tclose(content.head);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tconst content = r.#collect_content();\n\t\t\t\tclose(content.head);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * @param {string | (() => Promise<string>)} content\n\t */\n\tpush(content) {\n\t\tif (typeof content === 'function') {\n\t\t\tthis.child(async (renderer) => renderer.push(await content()));\n\t\t} else {\n\t\t\tthis.#out.push(content);\n\t\t}\n\t}\n\n\t/**\n\t * @param {() => void} fn\n\t */\n\ton_destroy(fn) {\n\t\t(this.#on_destroy ??= []).push(fn);\n\t}\n\n\t/**\n\t * @returns {number[]}\n\t */\n\tget_path() {\n\t\treturn this.#parent ? [...this.#parent.get_path(), this.#parent.#out.indexOf(this)] : [];\n\t}\n\n\t/**\n\t * @deprecated this is needed for legacy component bindings\n\t */\n\tcopy() {\n\t\tconst copy = new Renderer(this.global, this.#parent);\n\t\tcopy.#out = this.#out.map((item) => (item instanceof Renderer ? item.copy() : item));\n\t\tcopy.promise = this.promise;\n\t\treturn copy;\n\t}\n\n\t/**\n\t * @param {Renderer} other\n\t * @deprecated this is needed for legacy component bindings\n\t */\n\tsubsume(other) {\n\t\tif (this.global.mode !== other.global.mode) {\n\t\t\tthrow new Error(\n\t\t\t\t\"invariant: A renderer cannot switch modes. If you're seeing this, there's a compiler bug. File an issue!\"\n\t\t\t);\n\t\t}\n\n\t\tthis.local = other.local;\n\t\tthis.#out = other.#out.map((item, i) => {\n\t\t\tconst current = this.#out[i];\n\n\t\t\tif (current instanceof Renderer && item instanceof Renderer) {\n\t\t\t\tcurrent.subsume(item);\n\t\t\t\treturn current;\n\t\t\t}\n\n\t\t\treturn item;\n\t\t});\n\t\tthis.promise = other.promise;\n\t\tthis.type = other.type;\n\t}\n\n\tget length() {\n\t\treturn this.#out.length;\n\t}\n\n\t/**\n\t * Creates the hydration comment that marks the start of a failed boundary.\n\t * The error is JSON-serialized and embedded inside an HTML comment for the client\n\t * to parse during hydration. The JSON is escaped to prevent `-->` or `<!--` sequences\n\t * from breaking out of the comment (XSS). Uses unicode escapes which `JSON.parse()`\n\t * handles transparently.\n\t * @param {unknown} error\n\t * @returns {string}\n\t */\n\tstatic #serialize_failed_boundary(error) {\n\t\tvar json = JSON.stringify(error);\n\t\tvar escaped = json.replace(/>/g, '\\\\u003e').replace(/</g, '\\\\u003c');\n\t\treturn `<!--${HYDRATION_START_FAILED}${escaped}-->`;\n\t}\n\n\t/**\n\t * Only available on the server and when compiling with the `server` option.\n\t * Takes a component and returns an object with `body` and `head` properties on it, which you can use to populate the HTML when server-rendering your app.\n\t * @template {Record<string, any>} Props\n\t * @param {Component<Props>} component\n\t * @param {{ props?: Omit<Props, '$$slots' | '$$events'>; context?: Map<any, any>; idPrefix?: string; csp?: Csp }} [options]\n\t * @returns {RenderOutput}\n\t */\n\tstatic render(component, options = {}) {\n\t\t/** @type {AccumulatedContent | undefined} */\n\t\tlet sync;\n\t\t/** @type {Promise<AccumulatedContent & { hashes: { script: Sha256Source[] } }> | undefined} */\n\t\tlet async;\n\n\t\tconst result = /** @type {RenderOutput} */ ({});\n\t\t// making these properties non-enumerable so that console.logging\n\t\t// doesn't trigger a sync render\n\t\tObject.defineProperties(result, {\n\t\t\thtml: {\n\t\t\t\tget: () => {\n\t\t\t\t\treturn (sync ??= Renderer.#render(component, options)).body;\n\t\t\t\t}\n\t\t\t},\n\t\t\thead: {\n\t\t\t\tget: () => {\n\t\t\t\t\treturn (sync ??= Renderer.#render(component, options)).head;\n\t\t\t\t}\n\t\t\t},\n\t\t\tbody: {\n\t\t\t\tget: () => {\n\t\t\t\t\treturn (sync ??= Renderer.#render(component, options)).body;\n\t\t\t\t}\n\t\t\t},\n\t\t\thashes: {\n\t\t\t\tvalue: {\n\t\t\t\t\tscript: ''\n\t\t\t\t}\n\t\t\t},\n\t\t\tthen: {\n\t\t\t\tvalue:\n\t\t\t\t\t/**\n\t\t\t\t\t * this is not type-safe, but honestly it's the best I can do right now, and it's a straightforward function.\n\t\t\t\t\t *\n\t\t\t\t\t * @template TResult1\n\t\t\t\t\t * @template [TResult2=never]\n\t\t\t\t\t * @param { (value: SyncRenderOutput) => TResult1 } onfulfilled\n\t\t\t\t\t * @param { (reason: unknown) => TResult2 } onrejected\n\t\t\t\t\t */\n\t\t\t\t\t(onfulfilled, onrejected) => {\n\t\t\t\t\t\tif (!async_mode_flag) {\n\t\t\t\t\t\t\tconst result = (sync ??= Renderer.#render(component, options));\n\t\t\t\t\t\t\tconst user_result = onfulfilled({\n\t\t\t\t\t\t\t\thead: result.head,\n\t\t\t\t\t\t\t\tbody: result.body,\n\t\t\t\t\t\t\t\thtml: result.body,\n\t\t\t\t\t\t\t\thashes: { script: [] }\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\treturn Promise.resolve(user_result);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tasync ??= init_render_context().then(() =>\n\t\t\t\t\t\t\twith_render_context(() => Renderer.#render_async(component, options))\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn async.then((result) => {\n\t\t\t\t\t\t\tObject.defineProperty(result, 'html', {\n\t\t\t\t\t\t\t\t// eslint-disable-next-line getter-return\n\t\t\t\t\t\t\t\tget: () => {\n\t\t\t\t\t\t\t\t\te.html_deprecated();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\treturn onfulfilled(/** @type {SyncRenderOutput} */ (result));\n\t\t\t\t\t\t}, onrejected);\n\t\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Collect all of the `onDestroy` callbacks registered during rendering. In an async context, this is only safe to call\n\t * after awaiting `collect_async`.\n\t *\n\t * Child renderers are \"porous\" and don't affect execution order, but component body renderers\n\t * create ordering boundaries. Within a renderer, callbacks run in order until hitting a component boundary.\n\t * @returns {Iterable<() => void>}\n\t */\n\t*#collect_on_destroy() {\n\t\tfor (const component of this.#traverse_components()) {\n\t\t\tyield* component.#collect_ondestroy();\n\t\t}\n\t}\n\n\t/**\n\t * Performs a depth-first search of renderers, yielding the deepest components first, then additional components as we backtrack up the tree.\n\t * @returns {Iterable<Renderer>}\n\t */\n\t*#traverse_components() {\n\t\tfor (const child of this.#out) {\n\t\t\tif (typeof child !== 'string') {\n\t\t\t\tyield* child.#traverse_components();\n\t\t\t}\n\t\t}\n\t\tif (this.#is_component_body) {\n\t\t\tyield this;\n\t\t}\n\t}\n\n\t/**\n\t * @returns {Iterable<() => void>}\n\t */\n\t*#collect_ondestroy() {\n\t\tif (this.#on_destroy) {\n\t\t\tfor (const fn of this.#on_destroy) {\n\t\t\t\tyield fn;\n\t\t\t}\n\t\t}\n\t\tfor (const child of this.#out) {\n\t\t\tif (child instanceof Renderer && !child.#is_component_body) {\n\t\t\t\tyield* child.#collect_ondestroy();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Render a component. Throws if any of the children are performing asynchronous work.\n\t *\n\t * @template {Record<string, any>} Props\n\t * @param {Component<Props>} component\n\t * @param {{ props?: Omit<Props, '$$slots' | '$$events'>; context?: Map<any, any>; idPrefix?: string }} options\n\t * @returns {AccumulatedContent}\n\t */\n\tstatic #render(component, options) {\n\t\tvar previous_context = ssr_context;\n\t\ttry {\n\t\t\tconst renderer = Renderer.#open_render('sync', component, options);\n\n\t\t\tconst content = renderer.#collect_content();\n\t\t\treturn Renderer.#close_render(content, renderer);\n\t\t} finally {\n\t\t\tabort();\n\t\t\tset_ssr_context(previous_context);\n\t\t}\n\t}\n\n\t/**\n\t * Render a component.\n\t *\n\t * @template {Record<string, any>} Props\n\t * @param {Component<Props>} component\n\t * @param {{ props?: Omit<Props, '$$slots' | '$$events'>; context?: Map<any, any>; idPrefix?: string; csp?: Csp }} options\n\t * @returns {Promise<AccumulatedContent & { hashes: { script: Sha256Source[] } }>}\n\t */\n\tstatic async #render_async(component, options) {\n\t\tconst previous_context = ssr_context;\n\n\t\ttry {\n\t\t\tconst renderer = Renderer.#open_render('async', component, options);\n\t\t\tconst content = await renderer.#collect_content_async();\n\t\t\tconst hydratables = await renderer.#collect_hydratables();\n\t\t\tif (hydratables !== null) {\n\t\t\t\tcontent.head = hydratables + content.head;\n\t\t\t}\n\t\t\treturn Renderer.#close_render(content, renderer);\n\t\t} finally {\n\t\t\tset_ssr_context(previous_context);\n\t\t\tabort();\n\t\t}\n\t}\n\n\t/**\n\t * Collect all of the code from the `out` array and return it as a string, or a promise resolving to a string.\n\t * @param {AccumulatedContent} content\n\t * @returns {AccumulatedContent}\n\t */\n\t#collect_content(content = { head: '', body: '' }) {\n\t\tfor (const item of this.#out) {\n\t\t\tif (typeof item === 'string') {\n\t\t\t\tcontent[this.type] += item;\n\t\t\t} else if (item instanceof Renderer) {\n\t\t\t\titem.#collect_content(content);\n\t\t\t}\n\t\t}\n\n\t\treturn content;\n\t}\n\n\t/**\n\t * Collect all of the code from the `out` array and return it as a string.\n\t * @param {AccumulatedContent} content\n\t * @returns {Promise<AccumulatedContent>}\n\t */\n\tasync #collect_content_async(content = { head: '', body: '' }) {\n\t\tawait this.promise;\n\n\t\t// no danger to sequentially awaiting stuff in here; all of the work is already kicked off\n\t\tfor (const item of this.#out) {\n\t\t\tif (typeof item === 'string') {\n\t\t\t\tcontent[this.type] += item;\n\t\t\t} else if (item instanceof Renderer) {\n\t\t\t\tif (item.#boundary) {\n\t\t\t\t\t// This renderer is an error boundary - collect into a separate\n\t\t\t\t\t// accumulator so we can discard partial content on error\n\t\t\t\t\t/** @type {AccumulatedContent} */\n\t\t\t\t\tconst boundary_content = { head: '', body: '' };\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait item.#collect_content_async(boundary_content);\n\t\t\t\t\t\t// Success - merge into the main content\n\t\t\t\t\t\tcontent.head += boundary_content.head;\n\t\t\t\t\t\tcontent.body += boundary_content.body;\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconst { context, failed, transformError } = item.#boundary;\n\n\t\t\t\t\t\tset_ssr_context(context);\n\n\t\t\t\t\t\tlet promise = transformError(error);\n\t\t\t\t\t\tset_ssr_context(null);\n\n\t\t\t\t\t\tlet transformed = await promise;\n\t\t\t\t\t\tset_ssr_context(context);\n\n\t\t\t\t\t\t// Render the failed snippet instead of the partial children content\n\t\t\t\t\t\tconst failed_renderer = new Renderer(item.global, item);\n\t\t\t\t\t\tfailed_renderer.type = item.type;\n\t\t\t\t\t\tfailed_renderer.#out.push(Renderer.#serialize_failed_boundary(transformed));\n\t\t\t\t\t\tfailed(failed_renderer, transformed, noop);\n\t\t\t\t\t\tfailed_renderer.#out.push(BLOCK_CLOSE);\n\t\t\t\t\t\tawait failed_renderer.#collect_content_async(content);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tawait item.#collect_content_async(content);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn content;\n\t}\n\n\tasync #collect_hydratables() {\n\t\tconst ctx = get_render_context().hydratable;\n\n\t\tfor (const [_, key] of ctx.unresolved_promises) {\n\t\t\t// this is a problem -- it means we've finished the render but we're still waiting on a promise to resolve so we can\n\t\t\t// serialize it, so we're blocking the response on useless content.\n\t\t\tw.unresolved_hydratable(key, ctx.lookup.get(key)?.stack ?? '<missing stack trace>');\n\t\t}\n\n\t\tfor (const comparison of ctx.comparisons) {\n\t\t\t// these reject if there's a mismatch\n\t\t\tawait comparison;\n\t\t}\n\n\t\treturn await this.#hydratable_block(ctx);\n\t}\n\n\t/**\n\t * @template {Record<string, any>} Props\n\t * @param {'sync' | 'async'} mode\n\t * @param {import('svelte').Component<Props>} component\n\t * @param {{ props?: Omit<Props, '$$slots' | '$$events'>; context?: Map<any, any>; idPrefix?: string; csp?: Csp; transformError?: (error: unknown) => unknown }} options\n\t * @returns {Renderer}\n\t */\n\tstatic #open_render(mode, component, options) {\n\t\tif (options.idPrefix?.includes('--')) {\n\t\t\te.invalid_id_prefix();\n\t\t}\n\n\t\tvar previous_context = ssr_context;\n\n\t\ttry {\n\t\t\tconst renderer = new Renderer(\n\t\t\t\tnew SSRState(\n\t\t\t\t\tmode,\n\t\t\t\t\toptions.idPrefix ? options.idPrefix + '-' : '',\n\t\t\t\t\toptions.csp,\n\t\t\t\t\toptions.transformError\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t/** @type {SSRContext} */\n\t\t\tconst context = { p: null, c: options.context ?? null, r: renderer };\n\t\t\tset_ssr_context(context);\n\n\t\t\trenderer.push(BLOCK_OPEN);\n\t\t\t// @ts-expect-error\n\t\t\tcomponent(renderer, options.props ?? {});\n\t\t\trenderer.push(BLOCK_CLOSE);\n\n\t\t\treturn renderer;\n\t\t} finally {\n\t\t\tset_ssr_context(previous_context);\n\t\t}\n\t}\n\n\t/**\n\t * @param {AccumulatedContent} content\n\t * @param {Renderer} renderer\n\t * @returns {AccumulatedContent & { hashes: { script: Sha256Source[] } }}\n\t */\n\tstatic #close_render(content, renderer) {\n\t\tfor (const cleanup of renderer.#collect_on_destroy()) {\n\t\t\tcleanup();\n\t\t}\n\n\t\tlet head = content.head + renderer.global.get_title();\n\t\tlet body = content.body;\n\n\t\tfor (const { hash, code } of renderer.global.css) {\n\t\t\thead += `<style id=\"${hash}\">${code}</style>`;\n\t\t}\n\n\t\treturn {\n\t\t\thead,\n\t\t\tbody,\n\t\t\thashes: {\n\t\t\t\tscript: renderer.global.csp.script_hashes\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * @param {HydratableContext} ctx\n\t */\n\tasync #hydratable_block(ctx) {\n\t\tif (ctx.lookup.size === 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet entries = [];\n\t\tlet has_promises = false;\n\n\t\tfor (const [k, v] of ctx.lookup) {\n\t\t\tif (v.promises) {\n\t\t\t\thas_promises = true;\n\t\t\t\tfor (const p of v.promises) await p;\n\t\t\t}\n\n\t\t\tentries.push(`[${devalue.uneval(k)},${v.serialized}]`);\n\t\t}\n\n\t\tlet prelude = `const h = (window.__svelte ??= {}).h ??= new Map();`;\n\n\t\tif (has_promises) {\n\t\t\tprelude = `const r = (v) => Promise.resolve(v);\n\t\t\t\t${prelude}`;\n\t\t}\n\n\t\tconst body = `\n\t\t\t{\n\t\t\t\t${prelude}\n\n\t\t\t\tfor (const [k, v] of [\n\t\t\t\t\t${entries.join(',\\n\\t\\t\\t\\t\\t')}\n\t\t\t\t]) {\n\t\t\t\t\th.set(k, v);\n\t\t\t\t}\n\t\t\t}\n\t\t`;\n\n\t\tlet csp_attr = '';\n\t\tif (this.global.csp.nonce) {\n\t\t\tcsp_attr = ` nonce=\"${this.global.csp.nonce}\"`;\n\t\t} else if (this.global.csp.hash) {\n\t\t\t// note to future selves: this doesn't need to be optimized with a Map<body, hash>\n\t\t\t// because the it's impossible for identical data to occur multiple times in a single render\n\t\t\t// (this would require the same hydratable key:value pair to be serialized multiple times)\n\t\t\tconst hash = await sha256(body);\n\t\t\tthis.global.csp.script_hashes.push(`sha256-${hash}`);\n\t\t}\n\n\t\treturn `\\n\\t\\t<script${csp_attr}>${body}</script>`;\n\t}\n}\n\nexport class SSRState {\n\t/** @readonly @type {Csp & { script_hashes: Sha256Source[] }} */\n\tcsp;\n\n\t/** @readonly @type {'sync' | 'async'} */\n\tmode;\n\n\t/** @readonly @type {() => string} */\n\tuid;\n\n\t/** @readonly @type {Set<{ hash: string; code: string }>} */\n\tcss = new Set();\n\n\t/**\n\t * `transformError` passed to `render`. Called when an error boundary catches an error.\n\t * Throws by default if unset in `render`.\n\t * @type {(error: unknown) => unknown}\n\t */\n\ttransformError;\n\n\t/** @type {{ path: number[], value: string }} */\n\t#title = { path: [], value: '' };\n\n\t/**\n\t * @param {'sync' | 'async'} mode\n\t * @param {string} id_prefix\n\t * @param {Csp} csp\n\t * @param {((error: unknown) => unknown) | undefined} [transformError]\n\t */\n\tconstructor(mode, id_prefix = '', csp = { hash: false }, transformError) {\n\t\tthis.mode = mode;\n\t\tthis.csp = { ...csp, script_hashes: [] };\n\n\t\tthis.transformError =\n\t\t\ttransformError ??\n\t\t\t((error) => {\n\t\t\t\tthrow error;\n\t\t\t});\n\n\t\tlet uid = 1;\n\t\tthis.uid = () => `${id_prefix}s${uid++}`;\n\t}\n\n\tget_title() {\n\t\treturn this.#title.value;\n\t}\n\n\t/**\n\t * Performs a depth-first (lexicographic) comparison using the path. Rejects sets\n\t * from earlier than or equal to the current value.\n\t * @param {string} value\n\t * @param {number[]} path\n\t */\n\tset_title(value, path) {\n\t\tconst current = this.#title.path;\n\n\t\tlet i = 0;\n\t\tlet l = Math.min(path.length, current.length);\n\n\t\t// skip identical prefixes - [1, 2, 3, ...] === [1, 2, 3, ...]\n\t\twhile (i < l && path[i] === current[i]) i += 1;\n\n\t\tif (path[i] === undefined) return;\n\n\t\t// replace title if\n\t\t// - incoming path is longer - [7, 8, 9] > [7, 8]\n\t\t// - incoming path is later - [7, 8, 9] > [7, 8, 8]\n\t\tif (current[i] === undefined || path[i] > current[i]) {\n\t\t\tthis.#title.path = path;\n\t\t\tthis.#title.value = value;\n\t\t}\n\t}\n}\n","/** @import { SSRContext } from '#server' */\nimport { FILENAME } from '../../constants.js';\nimport {\n\tis_tag_valid_with_ancestor,\n\tis_tag_valid_with_parent\n} from '../../html-tree-validation.js';\nimport { get_stack } from '../shared/dev.js';\nimport { set_ssr_context, ssr_context } from './context.js';\nimport * as e from './errors.js';\nimport { Renderer } from './renderer.js';\n\n// TODO move this\n/**\n * @typedef {{\n * \ttag: string;\n * \tparent: undefined | Element;\n * filename: undefined | string;\n * line: number;\n * column: number;\n * }} Element\n */\n\n/**\n * This is exported so that it can be cleared between tests\n * @type {Set<string>}\n */\nexport let seen;\n\n/**\n * @param {Renderer} renderer\n * @param {string} message\n */\nfunction print_error(renderer, message) {\n\tmessage =\n\t\t`node_invalid_placement_ssr: ${message}\\n\\n` +\n\t\t'This can cause content to shift around as the browser repairs the HTML, and will likely result in a `hydration_mismatch` warning.';\n\n\tif ((seen ??= new Set()).has(message)) return;\n\tseen.add(message);\n\n\t// eslint-disable-next-line no-console\n\tconsole.error(message);\n\trenderer.head((r) =>\n\t\tr.push(\n\t\t\t// ensure that `</script>` can't leak in to the script contents\n\t\t\t`<script>console.error(${JSON.stringify(message).replaceAll('</', '<\\\\u002f')})</script>`\n\t\t)\n\t);\n}\n\n/**\n * @param {Renderer} renderer\n * @param {string} tag\n * @param {number} line\n * @param {number} column\n */\nexport function push_element(renderer, tag, line, column) {\n\tvar context = /** @type {SSRContext} */ (ssr_context);\n\tvar filename = context.function[FILENAME];\n\tvar parent = context.element;\n\tvar element = { tag, parent, filename, line, column };\n\n\tif (parent !== undefined) {\n\t\tvar ancestor = parent.parent;\n\t\tvar ancestors = [parent.tag];\n\n\t\tconst child_loc = filename ? `${filename}:${line}:${column}` : undefined;\n\t\tconst parent_loc = parent.filename\n\t\t\t? `${parent.filename}:${parent.line}:${parent.column}`\n\t\t\t: undefined;\n\n\t\tconst message = is_tag_valid_with_parent(tag, parent.tag, child_loc, parent_loc);\n\t\tif (message) print_error(renderer, message);\n\n\t\twhile (ancestor != null) {\n\t\t\tancestors.push(ancestor.tag);\n\t\t\tconst ancestor_loc = ancestor.filename\n\t\t\t\t? `${ancestor.filename}:${ancestor.line}:${ancestor.column}`\n\t\t\t\t: undefined;\n\n\t\t\tconst message = is_tag_valid_with_ancestor(tag, ancestors, child_loc, ancestor_loc);\n\t\t\tif (message) print_error(renderer, message);\n\n\t\t\tancestor = ancestor.parent;\n\t\t}\n\t}\n\n\tset_ssr_context({ ...context, p: context, element });\n}\n\nexport function pop_element() {\n\tset_ssr_context(/** @type {SSRContext} */ (ssr_context).p);\n}\n\n/**\n * @param {Renderer} renderer\n */\nexport function validate_snippet_args(renderer) {\n\tif (\n\t\ttypeof renderer !== 'object' ||\n\t\t// for some reason typescript consider the type of renderer as never after the first instanceof\n\t\t!(renderer instanceof Renderer)\n\t) {\n\t\te.invalid_snippet_arguments();\n\t}\n}\n\nexport function get_user_code_location() {\n\tconst stack = get_stack();\n\n\treturn stack\n\t\t.filter((line) => line.trim().startsWith('at '))\n\t\t.map((line) => line.replace(/\\((.*):\\d+:\\d+\\)$/, (_, file) => `(${file})`))\n\t\t.join('\\n');\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12],"mappings":";;;;;;;;;;;AAQA,SAAgB,kCAAkC;CACjD,MAAM,wBAAQ,IAAI,MAAM,4LAA4L;CAEpN,MAAM,OAAO;CAEb,MAAM;AACP;;;;;AAMA,SAAgB,gBAAgB;CAC/B,MAAM,wBAAQ,IAAI,MAAM,iHAAiH;CAEzI,MAAM,OAAO;CAEb,MAAM;AACP;;;;;;AAOA,SAAgB,4BAA4B,KAAK;CAChD,MAAM,wBAAQ,IAAI,MAAM,wDAAwD,IAAI,sHAAsH;CAE1M,MAAM,OAAO;CAEb,MAAM;AACP;;;;;AAMA,SAAgB,kBAAkB;CACjC,MAAM,wBAAQ,IAAI,MAAM,kJAAkJ;CAE1K,MAAM,OAAO;CAEb,MAAM;AACP;;;;;;;;;AAUA,SAAgB,sBAAsB,KAAK,OAAO;CACjD,MAAM,wBAAQ,IAAI,MAAM,qEAAqE,IAAI;;EAEhG,MAAM,6CAA6C;CAEpD,MAAM,OAAO;CAEb,MAAM;AACP;;;;;;;;;;;;AAaA,SAAgB,gCAAgC,KAAK,OAAO;CAC3D,MAAM,wBAAQ,IAAI,MAAM,sFAAsF,IAAI;;;;;EAKjH,MAAM,uDAAuD;CAE9D,MAAM,OAAO;CAEb,MAAM;AACP;;;;;AAMA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AAc;CAC7B;;EAA2C,YAAa;CAAC;AAC1D;;;;AAKA,SAAgB,sBAAsB,UAAU;CAC/C,IACC,OAAO,aAAa,YAEpB,EAAE,oBAAoB,WAEtB,0BAA4B;AAE9B;AAEA,SAAgB,yBAAyB;CAGxC,OAFc,UAEH,EACT,QAAQ,SAAS,KAAK,KAAK,EAAE,WAAW,KAAK,CAAC,EAC9C,KAAK,SAAS,KAAK,QAAQ,sBAAsB,GAAG,SAAS,IAAI,KAAK,EAAE,CAAC,EACzE,KAAK,IAAI;AACZ"}
@@ -0,0 +1,206 @@
1
+ import { M as teardown, ar as define_property, bn as hydrating, l as set_active_effect, n as active_effect, nn as queue_micro_task, r as active_reaction, u as set_active_reaction, z as without_reactive_context } from "./utils-mR9mAWyK.js";
2
+ import { n as FILENAME } from "./constants-RLNOXCpz.js";
3
+ import { s as event_handler_invalid } from "./warnings-yiExAB06.js";
4
+ //#region ../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/client/dom/elements/events.js
5
+ /**
6
+ * Used on elements, as a map of event type -> event handler,
7
+ * and on events themselves to track which element handled an event
8
+ */
9
+ var event_symbol = Symbol("events");
10
+ /** @type {Set<string>} */
11
+ var all_registered_events = /* @__PURE__ */ new Set();
12
+ /** @type {Set<(events: Array<string>) => void>} */
13
+ var root_event_handles = /* @__PURE__ */ new Set();
14
+ /**
15
+ * SSR adds onload and onerror attributes to catch those events before the hydration.
16
+ * This function detects those cases, removes the attributes and replays the events.
17
+ * @param {HTMLElement} dom
18
+ */
19
+ function replay_events(dom) {
20
+ if (!hydrating) return;
21
+ dom.removeAttribute("onload");
22
+ dom.removeAttribute("onerror");
23
+ const event = dom.__e;
24
+ if (event !== void 0) {
25
+ dom.__e = void 0;
26
+ queueMicrotask(() => {
27
+ if (dom.isConnected) dom.dispatchEvent(event);
28
+ });
29
+ }
30
+ }
31
+ /**
32
+ * @param {string} event_name
33
+ * @param {EventTarget} dom
34
+ * @param {EventListener} [handler]
35
+ * @param {AddEventListenerOptions} [options]
36
+ */
37
+ function create_event(event_name, dom, handler, options = {}) {
38
+ /**
39
+ * @this {EventTarget}
40
+ */
41
+ function target_handler(event) {
42
+ if (!options.capture) handle_event_propagation.call(dom, event);
43
+ if (!event.cancelBubble) return without_reactive_context(() => {
44
+ return handler?.call(this, event);
45
+ });
46
+ }
47
+ if (event_name.startsWith("pointer") || event_name.startsWith("touch") || event_name === "wheel") queue_micro_task(() => {
48
+ dom.addEventListener(event_name, target_handler, options);
49
+ });
50
+ else dom.addEventListener(event_name, target_handler, options);
51
+ return target_handler;
52
+ }
53
+ /**
54
+ * Attaches an event handler to an element and returns a function that removes the handler. Using this
55
+ * rather than `addEventListener` will preserve the correct order relative to handlers added declaratively
56
+ * (with attributes like `onclick`), which use event delegation for performance reasons
57
+ *
58
+ * @param {EventTarget} element
59
+ * @param {string} type
60
+ * @param {EventListener} handler
61
+ * @param {AddEventListenerOptions} [options]
62
+ */
63
+ function on(element, type, handler, options = {}) {
64
+ var target_handler = create_event(type, element, handler, options);
65
+ return () => {
66
+ element.removeEventListener(type, target_handler, options);
67
+ };
68
+ }
69
+ /**
70
+ * @param {string} event_name
71
+ * @param {Element} dom
72
+ * @param {EventListener} [handler]
73
+ * @param {boolean} [capture]
74
+ * @param {boolean} [passive]
75
+ * @returns {void}
76
+ */
77
+ function event(event_name, dom, handler, capture, passive) {
78
+ var options = {
79
+ capture,
80
+ passive
81
+ };
82
+ var target_handler = create_event(event_name, dom, handler, options);
83
+ if (dom === document.body || dom === window || dom === document || dom instanceof HTMLMediaElement) teardown(() => {
84
+ dom.removeEventListener(event_name, target_handler, options);
85
+ });
86
+ }
87
+ /**
88
+ * @param {string} event_name
89
+ * @param {Element} element
90
+ * @param {EventListener} [handler]
91
+ * @returns {void}
92
+ */
93
+ function delegated(event_name, element, handler) {
94
+ (element[event_symbol] ??= {})[event_name] = handler;
95
+ }
96
+ /**
97
+ * @param {Array<string>} events
98
+ * @returns {void}
99
+ */
100
+ function delegate(events) {
101
+ for (var i = 0; i < events.length; i++) all_registered_events.add(events[i]);
102
+ for (var fn of root_event_handles) fn(events);
103
+ }
104
+ var last_propagated_event = null;
105
+ /**
106
+ * @this {EventTarget}
107
+ * @param {Event} event
108
+ * @returns {void}
109
+ */
110
+ function handle_event_propagation(event) {
111
+ var handler_element = this;
112
+ var owner_document = handler_element.ownerDocument;
113
+ var event_name = event.type;
114
+ var path = event.composedPath?.() || [];
115
+ var current_target = path[0] || event.target;
116
+ last_propagated_event = event;
117
+ var path_idx = 0;
118
+ var handled_at = last_propagated_event === event && event[event_symbol];
119
+ if (handled_at) {
120
+ var at_idx = path.indexOf(handled_at);
121
+ if (at_idx !== -1 && (handler_element === document || handler_element === window)) {
122
+ event[event_symbol] = handler_element;
123
+ return;
124
+ }
125
+ var handler_idx = path.indexOf(handler_element);
126
+ if (handler_idx === -1) return;
127
+ if (at_idx <= handler_idx) path_idx = at_idx;
128
+ }
129
+ current_target = path[path_idx] || event.target;
130
+ if (current_target === handler_element) return;
131
+ define_property(event, "currentTarget", {
132
+ configurable: true,
133
+ get() {
134
+ return current_target || owner_document;
135
+ }
136
+ });
137
+ var previous_reaction = active_reaction;
138
+ var previous_effect = active_effect;
139
+ set_active_reaction(null);
140
+ set_active_effect(null);
141
+ try {
142
+ /**
143
+ * @type {unknown}
144
+ */
145
+ var throw_error;
146
+ /**
147
+ * @type {unknown[]}
148
+ */
149
+ var other_errors = [];
150
+ while (current_target !== null) {
151
+ /** @type {null | Element} */
152
+ var parent_element = current_target.assignedSlot || current_target.parentNode || current_target.host || null;
153
+ try {
154
+ var delegated = current_target[event_symbol]?.[event_name];
155
+ if (delegated != null && (!current_target.disabled || event.target === current_target)) delegated.call(current_target, event);
156
+ } catch (error) {
157
+ if (throw_error) other_errors.push(error);
158
+ else throw_error = error;
159
+ }
160
+ if (event.cancelBubble || parent_element === handler_element || parent_element === null) break;
161
+ current_target = parent_element;
162
+ }
163
+ if (throw_error) {
164
+ for (let error of other_errors) queueMicrotask(() => {
165
+ throw error;
166
+ });
167
+ throw throw_error;
168
+ }
169
+ } finally {
170
+ event[event_symbol] = handler_element;
171
+ delete event.currentTarget;
172
+ set_active_reaction(previous_reaction);
173
+ set_active_effect(previous_effect);
174
+ }
175
+ }
176
+ /**
177
+ * In dev, warn if an event handler is not a function, as it means the
178
+ * user probably called the handler or forgot to add a `() =>`
179
+ * @param {() => (event: Event, ...args: any) => void} thunk
180
+ * @param {EventTarget} element
181
+ * @param {[Event, ...any]} args
182
+ * @param {any} component
183
+ * @param {[number, number]} [loc]
184
+ * @param {boolean} [remove_parens]
185
+ */
186
+ function apply(thunk, element, args, component, loc, has_side_effects = false, remove_parens = false) {
187
+ let handler;
188
+ let error;
189
+ try {
190
+ handler = thunk();
191
+ } catch (e) {
192
+ error = e;
193
+ }
194
+ if (typeof handler !== "function" && (has_side_effects || handler != null || error)) {
195
+ const filename = component?.[FILENAME];
196
+ const location = loc ? ` at ${filename}:${loc[0]}:${loc[1]}` : ` in ${filename}`;
197
+ const phase = args[0]?.eventPhase < Event.BUBBLING_PHASE ? "capture" : "";
198
+ event_handler_invalid(`\`${args[0]?.type + phase}\` handler${location}`, remove_parens ? "remove the trailing `()`" : "add a leading `() =>`");
199
+ if (error) throw error;
200
+ }
201
+ handler?.apply(element, args);
202
+ }
203
+ //#endregion
204
+ export { delegated as a, on as c, delegate as i, replay_events as l, apply as n, event as o, create_event as r, handle_event_propagation as s, all_registered_events as t, root_event_handles as u };
205
+
206
+ //# sourceMappingURL=events-CDC4DKuQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events-CDC4DKuQ.js","names":[],"sources":["../../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/client/dom/elements/events.js"],"sourcesContent":["import { teardown } from '../../reactivity/effects.js';\nimport { define_property } from '../../../shared/utils.js';\nimport { hydrating } from '../hydration.js';\nimport { queue_micro_task } from '../task.js';\nimport { FILENAME } from '../../../../constants.js';\nimport * as w from '../../warnings.js';\nimport {\n\tactive_effect,\n\tactive_reaction,\n\tset_active_effect,\n\tset_active_reaction\n} from '../../runtime.js';\nimport { without_reactive_context } from './bindings/shared.js';\n\n/**\n * Used on elements, as a map of event type -> event handler,\n * and on events themselves to track which element handled an event\n */\nexport const event_symbol = Symbol('events');\n\n/** @type {Set<string>} */\nexport const all_registered_events = new Set();\n\n/** @type {Set<(events: Array<string>) => void>} */\nexport const root_event_handles = new Set();\n\n/**\n * SSR adds onload and onerror attributes to catch those events before the hydration.\n * This function detects those cases, removes the attributes and replays the events.\n * @param {HTMLElement} dom\n */\nexport function replay_events(dom) {\n\tif (!hydrating) return;\n\n\tdom.removeAttribute('onload');\n\tdom.removeAttribute('onerror');\n\t// @ts-expect-error\n\tconst event = dom.__e;\n\tif (event !== undefined) {\n\t\t// @ts-expect-error\n\t\tdom.__e = undefined;\n\t\tqueueMicrotask(() => {\n\t\t\tif (dom.isConnected) {\n\t\t\t\tdom.dispatchEvent(event);\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * @param {string} event_name\n * @param {EventTarget} dom\n * @param {EventListener} [handler]\n * @param {AddEventListenerOptions} [options]\n */\nexport function create_event(event_name, dom, handler, options = {}) {\n\t/**\n\t * @this {EventTarget}\n\t */\n\tfunction target_handler(/** @type {Event} */ event) {\n\t\tif (!options.capture) {\n\t\t\t// Only call in the bubble phase, else delegated events would be called before the capturing events\n\t\t\thandle_event_propagation.call(dom, event);\n\t\t}\n\t\tif (!event.cancelBubble) {\n\t\t\treturn without_reactive_context(() => {\n\t\t\t\treturn handler?.call(this, event);\n\t\t\t});\n\t\t}\n\t}\n\n\t// Chrome has a bug where pointer events don't work when attached to a DOM element that has been cloned\n\t// with cloneNode() and the DOM element is disconnected from the document. To ensure the event works, we\n\t// defer the attachment till after it's been appended to the document. TODO: remove this once Chrome fixes\n\t// this bug. The same applies to wheel events and touch events.\n\tif (\n\t\tevent_name.startsWith('pointer') ||\n\t\tevent_name.startsWith('touch') ||\n\t\tevent_name === 'wheel'\n\t) {\n\t\tqueue_micro_task(() => {\n\t\t\tdom.addEventListener(event_name, target_handler, options);\n\t\t});\n\t} else {\n\t\tdom.addEventListener(event_name, target_handler, options);\n\t}\n\n\treturn target_handler;\n}\n\n/**\n * Attaches an event handler to an element and returns a function that removes the handler. Using this\n * rather than `addEventListener` will preserve the correct order relative to handlers added declaratively\n * (with attributes like `onclick`), which use event delegation for performance reasons\n *\n * @param {EventTarget} element\n * @param {string} type\n * @param {EventListener} handler\n * @param {AddEventListenerOptions} [options]\n */\nexport function on(element, type, handler, options = {}) {\n\tvar target_handler = create_event(type, element, handler, options);\n\n\treturn () => {\n\t\telement.removeEventListener(type, target_handler, options);\n\t};\n}\n\n/**\n * @param {string} event_name\n * @param {Element} dom\n * @param {EventListener} [handler]\n * @param {boolean} [capture]\n * @param {boolean} [passive]\n * @returns {void}\n */\nexport function event(event_name, dom, handler, capture, passive) {\n\tvar options = { capture, passive };\n\tvar target_handler = create_event(event_name, dom, handler, options);\n\n\tif (\n\t\tdom === document.body ||\n\t\t// @ts-ignore\n\t\tdom === window ||\n\t\t// @ts-ignore\n\t\tdom === document ||\n\t\t// Firefox has quirky behavior, it can happen that we still get \"canplay\" events when the element is already removed\n\t\tdom instanceof HTMLMediaElement\n\t) {\n\t\tteardown(() => {\n\t\t\tdom.removeEventListener(event_name, target_handler, options);\n\t\t});\n\t}\n}\n\n/**\n * @param {string} event_name\n * @param {Element} element\n * @param {EventListener} [handler]\n * @returns {void}\n */\nexport function delegated(event_name, element, handler) {\n\t// @ts-expect-error\n\t(element[event_symbol] ??= {})[event_name] = handler;\n}\n\n/**\n * @param {Array<string>} events\n * @returns {void}\n */\nexport function delegate(events) {\n\tfor (var i = 0; i < events.length; i++) {\n\t\tall_registered_events.add(events[i]);\n\t}\n\n\tfor (var fn of root_event_handles) {\n\t\tfn(events);\n\t}\n}\n\n// used to store the reference to the currently propagated event\n// to prevent garbage collection between microtasks in Firefox\n// If the event object is GCed too early, the expando __root property\n// set on the event object is lost, causing the event delegation\n// to process the event twice\nlet last_propagated_event = null;\n\n/**\n * @this {EventTarget}\n * @param {Event} event\n * @returns {void}\n */\nexport function handle_event_propagation(event) {\n\tvar handler_element = this;\n\tvar owner_document = /** @type {Node} */ (handler_element).ownerDocument;\n\tvar event_name = event.type;\n\tvar path = event.composedPath?.() || [];\n\tvar current_target = /** @type {null | Element} */ (path[0] || event.target);\n\n\tlast_propagated_event = event;\n\n\t// composedPath contains list of nodes the event has propagated through.\n\t// We check `event_symbol` to skip all nodes below it in case this is a\n\t// parent of the `event_symbol` node, which indicates that there's nested\n\t// mounted apps. In this case we don't want to trigger events multiple times.\n\tvar path_idx = 0;\n\n\t// the `last_propagated_event === event` check is redundant, but\n\t// without it the variable will be DCE'd and things will\n\t// fail mysteriously in Firefox\n\t// @ts-expect-error is added below\n\tvar handled_at = last_propagated_event === event && event[event_symbol];\n\n\tif (handled_at) {\n\t\tvar at_idx = path.indexOf(handled_at);\n\t\tif (\n\t\t\tat_idx !== -1 &&\n\t\t\t(handler_element === document || handler_element === /** @type {any} */ (window))\n\t\t) {\n\t\t\t// This is the fallback document listener or a window listener, but the event was already handled\n\t\t\t// -> ignore, but set handle_at to document/window so that we're resetting the event\n\t\t\t// chain in case someone manually dispatches the same event object again.\n\t\t\t// @ts-expect-error\n\t\t\tevent[event_symbol] = handler_element;\n\t\t\treturn;\n\t\t}\n\n\t\t// We're deliberately not skipping if the index is higher, because\n\t\t// someone could create an event programmatically and emit it multiple times,\n\t\t// in which case we want to handle the whole propagation chain properly each time.\n\t\t// (this will only be a false negative if the event is dispatched multiple times and\n\t\t// the fallback document listener isn't reached in between, but that's super rare)\n\t\tvar handler_idx = path.indexOf(handler_element);\n\t\tif (handler_idx === -1) {\n\t\t\t// handle_idx can theoretically be -1 (happened in some JSDOM testing scenarios with an event listener on the window object)\n\t\t\t// so guard against that, too, and assume that everything was handled at this point.\n\t\t\treturn;\n\t\t}\n\n\t\tif (at_idx <= handler_idx) {\n\t\t\tpath_idx = at_idx;\n\t\t}\n\t}\n\n\tcurrent_target = /** @type {Element} */ (path[path_idx] || event.target);\n\t// there can only be one delegated event per element, and we either already handled the current target,\n\t// or this is the very first target in the chain which has a non-delegated listener, in which case it's safe\n\t// to handle a possible delegated event on it later (through the root delegation listener for example).\n\tif (current_target === handler_element) return;\n\n\t// Proxy currentTarget to correct target\n\tdefine_property(event, 'currentTarget', {\n\t\tconfigurable: true,\n\t\tget() {\n\t\t\treturn current_target || owner_document;\n\t\t}\n\t});\n\n\t// This started because of Chromium issue https://chromestatus.com/feature/5128696823545856,\n\t// where removal or moving of the DOM can cause sync `blur` events to fire, which can cause logic\n\t// to run inside the current `active_reaction`, which isn't what we want at all. However, on reflection,\n\t// it's probably best that all events handled by Svelte have this behaviour, as we don't really want\n\t// an event handler to run in the context of another reaction or effect.\n\tvar previous_reaction = active_reaction;\n\tvar previous_effect = active_effect;\n\tset_active_reaction(null);\n\tset_active_effect(null);\n\n\ttry {\n\t\t/**\n\t\t * @type {unknown}\n\t\t */\n\t\tvar throw_error;\n\t\t/**\n\t\t * @type {unknown[]}\n\t\t */\n\t\tvar other_errors = [];\n\n\t\twhile (current_target !== null) {\n\t\t\t/** @type {null | Element} */\n\t\t\tvar parent_element =\n\t\t\t\tcurrent_target.assignedSlot ||\n\t\t\t\tcurrent_target.parentNode ||\n\t\t\t\t/** @type {any} */ (current_target).host ||\n\t\t\t\tnull;\n\n\t\t\ttry {\n\t\t\t\t// @ts-expect-error\n\t\t\t\tvar delegated = current_target[event_symbol]?.[event_name];\n\n\t\t\t\tif (\n\t\t\t\t\tdelegated != null &&\n\t\t\t\t\t(!(/** @type {any} */ (current_target).disabled) ||\n\t\t\t\t\t\t// DOM could've been updated already by the time this is reached, so we check this as well\n\t\t\t\t\t\t// -> the target could not have been disabled because it emits the event in the first place\n\t\t\t\t\t\tevent.target === current_target)\n\t\t\t\t) {\n\t\t\t\t\tdelegated.call(current_target, event);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tif (throw_error) {\n\t\t\t\t\tother_errors.push(error);\n\t\t\t\t} else {\n\t\t\t\t\tthrow_error = error;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (event.cancelBubble || parent_element === handler_element || parent_element === null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcurrent_target = parent_element;\n\t\t}\n\n\t\tif (throw_error) {\n\t\t\tfor (let error of other_errors) {\n\t\t\t\t// Throw the rest of the errors, one-by-one on a microtask\n\t\t\t\tqueueMicrotask(() => {\n\t\t\t\t\tthrow error;\n\t\t\t\t});\n\t\t\t}\n\t\t\tthrow throw_error;\n\t\t}\n\t} finally {\n\t\t// @ts-expect-error is used above\n\t\tevent[event_symbol] = handler_element;\n\t\t// @ts-ignore remove proxy on currentTarget\n\t\tdelete event.currentTarget;\n\t\tset_active_reaction(previous_reaction);\n\t\tset_active_effect(previous_effect);\n\t}\n}\n\n/**\n * In dev, warn if an event handler is not a function, as it means the\n * user probably called the handler or forgot to add a `() =>`\n * @param {() => (event: Event, ...args: any) => void} thunk\n * @param {EventTarget} element\n * @param {[Event, ...any]} args\n * @param {any} component\n * @param {[number, number]} [loc]\n * @param {boolean} [remove_parens]\n */\nexport function apply(\n\tthunk,\n\telement,\n\targs,\n\tcomponent,\n\tloc,\n\thas_side_effects = false,\n\tremove_parens = false\n) {\n\tlet handler;\n\tlet error;\n\n\ttry {\n\t\thandler = thunk();\n\t} catch (e) {\n\t\terror = e;\n\t}\n\n\tif (typeof handler !== 'function' && (has_side_effects || handler != null || error)) {\n\t\tconst filename = component?.[FILENAME];\n\t\tconst location = loc ? ` at ${filename}:${loc[0]}:${loc[1]}` : ` in ${filename}`;\n\t\tconst phase = args[0]?.eventPhase < Event.BUBBLING_PHASE ? 'capture' : '';\n\t\tconst event_name = args[0]?.type + phase;\n\t\tconst description = `\\`${event_name}\\` handler${location}`;\n\t\tconst suggestion = remove_parens ? 'remove the trailing `()`' : 'add a leading `() =>`';\n\n\t\tw.event_handler_invalid(description, suggestion);\n\n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,OAAO,mBAAmB,MAAM;;GAE/B,IAAI,iBACH,eAAe,gBACf,eAAe,cACK,eAAgB,QACpC;GAED,IAAI;IAEH,IAAI,YAAY,eAAe,gBAAgB;IAE/C,IACC,aAAa,SACZ,CAAsB,eAAgB,YAGtC,MAAM,WAAW,iBAElB,UAAU,KAAK,gBAAgB,KAAK;GAEtC,SAAS,OAAO;IACf,IAAI,aACH,aAAa,KAAK,KAAK;SAEvB,cAAc;GAEhB;GACA,IAAI,MAAM,gBAAgB,mBAAmB,mBAAmB,mBAAmB,MAClF;GAED,iBAAiB;EAClB;EAEA,IAAI,aAAa;GAChB,KAAK,IAAI,SAAS,cAEjB,qBAAqB;IACpB,MAAM;GACP,CAAC;GAEF,MAAM;EACP;CACD,UAAU;EAET,MAAM,gBAAgB;EAEtB,OAAO,MAAM;EACb,oBAAoB,iBAAiB;EACrC,kBAAkB,eAAe;CAClC;AACD;;;;;;;;;;;AAYA,SAAgB,MACf,OACA,SACA,MACA,WACA,KACA,mBAAmB,OACnB,gBAAgB,OACf;CACD,IAAI;CACJ,IAAI;CAEJ,IAAI;EACH,UAAU,MAAM;CACjB,SAAS,GAAG;EACX,QAAQ;CACT;CAEA,IAAI,OAAO,YAAY,eAAe,oBAAoB,WAAW,QAAQ,QAAQ;EACpF,MAAM,WAAW,YAAY;EAC7B,MAAM,WAAW,MAAM,OAAO,SAAS,GAAG,IAAI,GAAG,GAAG,IAAI,OAAO,OAAO;EACtE,MAAM,QAAQ,KAAK,IAAI,aAAa,MAAM,iBAAiB,YAAY;EAKvE,sBAAwB,KAJL,KAAK,IAAI,OAAO,MACC,YAAY,YAC7B,gBAAgB,6BAA6B,uBAEjB;EAE/C,IAAI,OACH,MAAM;CAER;CACA,SAAS,MAAM,SAAS,IAAI;AAC7B"}
@@ -0,0 +1,20 @@
1
+ //#region ../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/flags/index.js
2
+ /** True if experimental.async=true */
3
+ var async_mode_flag = false;
4
+ /** True if we're not certain that we only have Svelte 5 code in the compilation */
5
+ var legacy_mode_flag = false;
6
+ /** True if $inspect.trace is used */
7
+ var tracing_mode_flag = false;
8
+ function enable_async_mode_flag() {
9
+ async_mode_flag = true;
10
+ }
11
+ function enable_legacy_mode_flag() {
12
+ legacy_mode_flag = true;
13
+ }
14
+ function enable_tracing_mode_flag() {
15
+ tracing_mode_flag = true;
16
+ }
17
+ //#endregion
18
+ export { legacy_mode_flag as a, enable_tracing_mode_flag as i, enable_async_mode_flag as n, tracing_mode_flag as o, enable_legacy_mode_flag as r, async_mode_flag as t };
19
+
20
+ //# sourceMappingURL=flags-BD-lYX7s.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flags-BD-lYX7s.js","names":[],"sources":["../../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/flags/index.js"],"sourcesContent":["/** True if experimental.async=true */\nexport let async_mode_flag = false;\n/** True if we're not certain that we only have Svelte 5 code in the compilation */\nexport let legacy_mode_flag = false;\n/** True if $inspect.trace is used */\nexport let tracing_mode_flag = false;\n\nexport function enable_async_mode_flag() {\n\tasync_mode_flag = true;\n}\n\n/** ONLY USE THIS DURING TESTING */\nexport function disable_async_mode_flag() {\n\tasync_mode_flag = false;\n}\n\nexport function enable_legacy_mode_flag() {\n\tlegacy_mode_flag = true;\n}\n\nexport function enable_tracing_mode_flag() {\n\ttracing_mode_flag = true;\n}\n"],"x_google_ignoreList":[0],"mappings":";;AACA,IAAW,kBAAkB;;AAE7B,IAAW,mBAAmB;;AAE9B,IAAW,oBAAoB;AAE/B,SAAgB,yBAAyB;CACxC,kBAAkB;AACnB;AAOA,SAAgB,0BAA0B;CACzC,mBAAmB;AACpB;AAEA,SAAgB,2BAA2B;CAC1C,oBAAoB;AACrB"}