nolune 0.1.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 (616) hide show
  1. package/DESIGN.md +1622 -0
  2. package/LICENSE +21 -0
  3. package/README.md +226 -0
  4. package/build/client/_app/immutable/assets/0.CO3c3JBa.css +2 -0
  5. package/build/client/_app/immutable/assets/0.CO3c3JBa.css.br +0 -0
  6. package/build/client/_app/immutable/assets/0.CO3c3JBa.css.gz +0 -0
  7. package/build/client/_app/immutable/assets/10.DiHYpJ-g.css +1 -0
  8. package/build/client/_app/immutable/assets/10.DiHYpJ-g.css.br +0 -0
  9. package/build/client/_app/immutable/assets/10.DiHYpJ-g.css.gz +0 -0
  10. package/build/client/_app/immutable/assets/14.D8mCg27h.css +1 -0
  11. package/build/client/_app/immutable/assets/14.D8mCg27h.css.br +0 -0
  12. package/build/client/_app/immutable/assets/14.D8mCg27h.css.gz +0 -0
  13. package/build/client/_app/immutable/assets/AssistantAvatar.BH1P1JPA.css +1 -0
  14. package/build/client/_app/immutable/assets/AssistantAvatar.BH1P1JPA.css.br +0 -0
  15. package/build/client/_app/immutable/assets/AssistantAvatar.BH1P1JPA.css.gz +0 -0
  16. package/build/client/_app/immutable/assets/AvatarPicker.BWZNEVEv.css +1 -0
  17. package/build/client/_app/immutable/assets/AvatarPicker.BWZNEVEv.css.br +0 -0
  18. package/build/client/_app/immutable/assets/AvatarPicker.BWZNEVEv.css.gz +0 -0
  19. package/build/client/_app/immutable/assets/DotGrid.uBe8QJ6R.css +1 -0
  20. package/build/client/_app/immutable/assets/DotGrid.uBe8QJ6R.css.br +0 -0
  21. package/build/client/_app/immutable/assets/DotGrid.uBe8QJ6R.css.gz +0 -0
  22. package/build/client/_app/immutable/assets/ModelMenu.CfwWh95X.css +1 -0
  23. package/build/client/_app/immutable/assets/ModelMenu.CfwWh95X.css.br +0 -0
  24. package/build/client/_app/immutable/assets/ModelMenu.CfwWh95X.css.gz +0 -0
  25. package/build/client/_app/immutable/assets/confirm.BpBhXN_i.mp3 +0 -0
  26. package/build/client/_app/immutable/assets/data.9aNBaxbh.json +1 -0
  27. package/build/client/_app/immutable/assets/data.9aNBaxbh.json.br +0 -0
  28. package/build/client/_app/immutable/assets/data.9aNBaxbh.json.gz +0 -0
  29. package/build/client/_app/immutable/assets/data.BF1r6TM-.json +1 -0
  30. package/build/client/_app/immutable/assets/data.BF1r6TM-.json.br +0 -0
  31. package/build/client/_app/immutable/assets/data.BF1r6TM-.json.gz +0 -0
  32. package/build/client/_app/immutable/assets/data.BnNTV_b6.json +1 -0
  33. package/build/client/_app/immutable/assets/data.BnNTV_b6.json.br +0 -0
  34. package/build/client/_app/immutable/assets/data.BnNTV_b6.json.gz +0 -0
  35. package/build/client/_app/immutable/assets/data.CreAftJo.json +1 -0
  36. package/build/client/_app/immutable/assets/data.CreAftJo.json.br +0 -0
  37. package/build/client/_app/immutable/assets/data.CreAftJo.json.gz +0 -0
  38. package/build/client/_app/immutable/assets/data.DKp8PYJD.json +1 -0
  39. package/build/client/_app/immutable/assets/data.DKp8PYJD.json.br +0 -0
  40. package/build/client/_app/immutable/assets/data.DKp8PYJD.json.gz +0 -0
  41. package/build/client/_app/immutable/assets/figtree-latin-ext-wght-italic.Q0qr0lrZ.woff2 +0 -0
  42. package/build/client/_app/immutable/assets/figtree-latin-ext-wght-normal.DCwSJGxG.woff2 +0 -0
  43. package/build/client/_app/immutable/assets/figtree-latin-wght-italic.BEAWuiTz.woff2 +0 -0
  44. package/build/client/_app/immutable/assets/figtree-latin-wght-normal.D_ZTVpCC.woff2 +0 -0
  45. package/build/client/_app/immutable/assets/fira-mono-cyrillic-400-normal.BJkDdjbt.woff2 +0 -0
  46. package/build/client/_app/immutable/assets/fira-mono-cyrillic-400-normal.DUd3efVn.woff +0 -0
  47. package/build/client/_app/immutable/assets/fira-mono-cyrillic-500-normal.CAy0Dwk2.woff2 +0 -0
  48. package/build/client/_app/immutable/assets/fira-mono-cyrillic-500-normal.CFTSF0cD.woff +0 -0
  49. package/build/client/_app/immutable/assets/fira-mono-cyrillic-ext-400-normal.Co4MVjrD.woff +0 -0
  50. package/build/client/_app/immutable/assets/fira-mono-cyrillic-ext-400-normal.FAIU8e3o.woff2 +0 -0
  51. package/build/client/_app/immutable/assets/fira-mono-cyrillic-ext-500-normal.BDCQVX4y.woff +0 -0
  52. package/build/client/_app/immutable/assets/fira-mono-cyrillic-ext-500-normal.BGV2-mDE.woff2 +0 -0
  53. package/build/client/_app/immutable/assets/fira-mono-greek-400-normal.B_0AmgK7.woff +0 -0
  54. package/build/client/_app/immutable/assets/fira-mono-greek-400-normal.ftNhKy_S.woff2 +0 -0
  55. package/build/client/_app/immutable/assets/fira-mono-greek-500-normal.DNFqaoqB.woff +0 -0
  56. package/build/client/_app/immutable/assets/fira-mono-greek-500-normal.kj_VgxTv.woff2 +0 -0
  57. package/build/client/_app/immutable/assets/fira-mono-greek-ext-400-normal.BQ5yw6bY.woff +0 -0
  58. package/build/client/_app/immutable/assets/fira-mono-greek-ext-400-normal.Be4g_LSk.woff2 +0 -0
  59. package/build/client/_app/immutable/assets/fira-mono-greek-ext-500-normal.CGPEfoom.woff2 +0 -0
  60. package/build/client/_app/immutable/assets/fira-mono-greek-ext-500-normal.g6G8W_LY.woff +0 -0
  61. package/build/client/_app/immutable/assets/fira-mono-latin-400-normal.C3FQ26ho.woff +0 -0
  62. package/build/client/_app/immutable/assets/fira-mono-latin-400-normal.DVTTRLHv.woff2 +0 -0
  63. package/build/client/_app/immutable/assets/fira-mono-latin-500-normal.DknboRIW.woff +0 -0
  64. package/build/client/_app/immutable/assets/fira-mono-latin-500-normal.Du17Nws8.woff2 +0 -0
  65. package/build/client/_app/immutable/assets/fira-mono-latin-ext-400-normal.B2gPvaNr.woff2 +0 -0
  66. package/build/client/_app/immutable/assets/fira-mono-latin-ext-400-normal.CbD3vWRE.woff +0 -0
  67. package/build/client/_app/immutable/assets/fira-mono-latin-ext-500-normal.-0AGvlKU.woff +0 -0
  68. package/build/client/_app/immutable/assets/fira-mono-latin-ext-500-normal.DPED3Y3R.woff2 +0 -0
  69. package/build/client/_app/immutable/assets/fira-mono-symbols2-400-normal.C6JptOil.woff2 +0 -0
  70. package/build/client/_app/immutable/assets/fira-mono-symbols2-400-normal.CpeG9ob9.woff +0 -0
  71. package/build/client/_app/immutable/assets/fira-mono-symbols2-500-normal.0PpNbZw_.woff2 +0 -0
  72. package/build/client/_app/immutable/assets/fira-mono-symbols2-500-normal.fxu0Prpo.woff +0 -0
  73. package/build/client/_app/immutable/assets/music.z3ymEIJM.mp3 +0 -0
  74. package/build/client/_app/immutable/assets/select.CV-KWLNP.css +1 -0
  75. package/build/client/_app/immutable/assets/select.CV-KWLNP.css.br +1 -0
  76. package/build/client/_app/immutable/assets/select.CV-KWLNP.css.gz +0 -0
  77. package/build/client/_app/immutable/assets/wash.BnjShmr3.mp3 +0 -0
  78. package/build/client/_app/immutable/assets/yap.SNl9LSqC.mp3 +0 -0
  79. package/build/client/_app/immutable/chunks/-FJ70HB3.js +1 -0
  80. package/build/client/_app/immutable/chunks/-FJ70HB3.js.br +0 -0
  81. package/build/client/_app/immutable/chunks/-FJ70HB3.js.gz +0 -0
  82. package/build/client/_app/immutable/chunks/9J99lH1E.js +4 -0
  83. package/build/client/_app/immutable/chunks/9J99lH1E.js.br +0 -0
  84. package/build/client/_app/immutable/chunks/9J99lH1E.js.gz +0 -0
  85. package/build/client/_app/immutable/chunks/B4AK16CS.js +1 -0
  86. package/build/client/_app/immutable/chunks/B4AK16CS.js.br +0 -0
  87. package/build/client/_app/immutable/chunks/B4AK16CS.js.gz +0 -0
  88. package/build/client/_app/immutable/chunks/B5IRm2KW.js +1 -0
  89. package/build/client/_app/immutable/chunks/B5IRm2KW.js.br +0 -0
  90. package/build/client/_app/immutable/chunks/B5IRm2KW.js.gz +0 -0
  91. package/build/client/_app/immutable/chunks/BAJE4yH_.js +9 -0
  92. package/build/client/_app/immutable/chunks/BAJE4yH_.js.br +0 -0
  93. package/build/client/_app/immutable/chunks/BAJE4yH_.js.gz +0 -0
  94. package/build/client/_app/immutable/chunks/BDCREBKE.js +1 -0
  95. package/build/client/_app/immutable/chunks/BDCREBKE.js.br +0 -0
  96. package/build/client/_app/immutable/chunks/BDCREBKE.js.gz +0 -0
  97. package/build/client/_app/immutable/chunks/BOf4cn4q.js +16 -0
  98. package/build/client/_app/immutable/chunks/BOf4cn4q.js.br +0 -0
  99. package/build/client/_app/immutable/chunks/BOf4cn4q.js.gz +0 -0
  100. package/build/client/_app/immutable/chunks/BOixjj3c.js +1 -0
  101. package/build/client/_app/immutable/chunks/BOixjj3c.js.br +1 -0
  102. package/build/client/_app/immutable/chunks/BOixjj3c.js.gz +0 -0
  103. package/build/client/_app/immutable/chunks/BQb4WE-8.js +1 -0
  104. package/build/client/_app/immutable/chunks/BQb4WE-8.js.br +0 -0
  105. package/build/client/_app/immutable/chunks/BQb4WE-8.js.gz +0 -0
  106. package/build/client/_app/immutable/chunks/BTeK4a_a.js +1 -0
  107. package/build/client/_app/immutable/chunks/BTeK4a_a.js.br +0 -0
  108. package/build/client/_app/immutable/chunks/BTeK4a_a.js.gz +0 -0
  109. package/build/client/_app/immutable/chunks/BYNjkfU_.js +1 -0
  110. package/build/client/_app/immutable/chunks/BYNjkfU_.js.br +0 -0
  111. package/build/client/_app/immutable/chunks/BYNjkfU_.js.gz +0 -0
  112. package/build/client/_app/immutable/chunks/BeDhKqx_.js +1 -0
  113. package/build/client/_app/immutable/chunks/BeDhKqx_.js.br +3 -0
  114. package/build/client/_app/immutable/chunks/BeDhKqx_.js.gz +0 -0
  115. package/build/client/_app/immutable/chunks/Bjy-W4x2.js +81 -0
  116. package/build/client/_app/immutable/chunks/Bjy-W4x2.js.br +0 -0
  117. package/build/client/_app/immutable/chunks/Bjy-W4x2.js.gz +0 -0
  118. package/build/client/_app/immutable/chunks/Bmf5cCYM.js +1 -0
  119. package/build/client/_app/immutable/chunks/Bmf5cCYM.js.br +0 -0
  120. package/build/client/_app/immutable/chunks/Bmf5cCYM.js.gz +0 -0
  121. package/build/client/_app/immutable/chunks/Bo7a0aly.js +1 -0
  122. package/build/client/_app/immutable/chunks/Bo7a0aly.js.br +0 -0
  123. package/build/client/_app/immutable/chunks/Bo7a0aly.js.gz +0 -0
  124. package/build/client/_app/immutable/chunks/BvAz--0N.js +1 -0
  125. package/build/client/_app/immutable/chunks/BvAz--0N.js.br +0 -0
  126. package/build/client/_app/immutable/chunks/BvAz--0N.js.gz +0 -0
  127. package/build/client/_app/immutable/chunks/C-5HEoLn.js +1 -0
  128. package/build/client/_app/immutable/chunks/C-5HEoLn.js.br +0 -0
  129. package/build/client/_app/immutable/chunks/C-5HEoLn.js.gz +0 -0
  130. package/build/client/_app/immutable/chunks/C7dZK71a.js +1 -0
  131. package/build/client/_app/immutable/chunks/C7dZK71a.js.br +0 -0
  132. package/build/client/_app/immutable/chunks/C7dZK71a.js.gz +0 -0
  133. package/build/client/_app/immutable/chunks/C98TgtTN.js +1 -0
  134. package/build/client/_app/immutable/chunks/C98TgtTN.js.br +0 -0
  135. package/build/client/_app/immutable/chunks/C98TgtTN.js.gz +0 -0
  136. package/build/client/_app/immutable/chunks/C9u9ikCJ.js +1 -0
  137. package/build/client/_app/immutable/chunks/C9u9ikCJ.js.br +0 -0
  138. package/build/client/_app/immutable/chunks/C9u9ikCJ.js.gz +0 -0
  139. package/build/client/_app/immutable/chunks/CBy5xNAu.js +1 -0
  140. package/build/client/_app/immutable/chunks/CBy5xNAu.js.br +0 -0
  141. package/build/client/_app/immutable/chunks/CBy5xNAu.js.gz +0 -0
  142. package/build/client/_app/immutable/chunks/CCDGpt2Z.js +1 -0
  143. package/build/client/_app/immutable/chunks/CCDGpt2Z.js.br +0 -0
  144. package/build/client/_app/immutable/chunks/CCDGpt2Z.js.gz +0 -0
  145. package/build/client/_app/immutable/chunks/CNU7dyxe.js +1 -0
  146. package/build/client/_app/immutable/chunks/CNU7dyxe.js.br +3 -0
  147. package/build/client/_app/immutable/chunks/CNU7dyxe.js.gz +0 -0
  148. package/build/client/_app/immutable/chunks/CNij7yXO.js +1 -0
  149. package/build/client/_app/immutable/chunks/CNij7yXO.js.br +0 -0
  150. package/build/client/_app/immutable/chunks/CNij7yXO.js.gz +0 -0
  151. package/build/client/_app/immutable/chunks/CPbGz0nD.js +1 -0
  152. package/build/client/_app/immutable/chunks/CPbGz0nD.js.br +0 -0
  153. package/build/client/_app/immutable/chunks/CPbGz0nD.js.gz +0 -0
  154. package/build/client/_app/immutable/chunks/Ce5rxuHE.js +1 -0
  155. package/build/client/_app/immutable/chunks/Ce5rxuHE.js.br +0 -0
  156. package/build/client/_app/immutable/chunks/Ce5rxuHE.js.gz +0 -0
  157. package/build/client/_app/immutable/chunks/CgJaNa38.js +1 -0
  158. package/build/client/_app/immutable/chunks/CgJaNa38.js.br +0 -0
  159. package/build/client/_app/immutable/chunks/CgJaNa38.js.gz +0 -0
  160. package/build/client/_app/immutable/chunks/CgoZLTv2.js +1 -0
  161. package/build/client/_app/immutable/chunks/CgoZLTv2.js.br +0 -0
  162. package/build/client/_app/immutable/chunks/CgoZLTv2.js.gz +0 -0
  163. package/build/client/_app/immutable/chunks/Ch-tX5Y1.js +1 -0
  164. package/build/client/_app/immutable/chunks/Ch-tX5Y1.js.br +0 -0
  165. package/build/client/_app/immutable/chunks/Ch-tX5Y1.js.gz +0 -0
  166. package/build/client/_app/immutable/chunks/CkALdgl6.js +1 -0
  167. package/build/client/_app/immutable/chunks/CkALdgl6.js.br +0 -0
  168. package/build/client/_app/immutable/chunks/CkALdgl6.js.gz +0 -0
  169. package/build/client/_app/immutable/chunks/Cn31HPZM.js +1 -0
  170. package/build/client/_app/immutable/chunks/Cn31HPZM.js.br +0 -0
  171. package/build/client/_app/immutable/chunks/Cn31HPZM.js.gz +0 -0
  172. package/build/client/_app/immutable/chunks/CoVud_S-.js +1 -0
  173. package/build/client/_app/immutable/chunks/CoVud_S-.js.br +0 -0
  174. package/build/client/_app/immutable/chunks/CoVud_S-.js.gz +0 -0
  175. package/build/client/_app/immutable/chunks/CraKVm2C.js +1 -0
  176. package/build/client/_app/immutable/chunks/CraKVm2C.js.br +0 -0
  177. package/build/client/_app/immutable/chunks/CraKVm2C.js.gz +0 -0
  178. package/build/client/_app/immutable/chunks/D2KG5w4u.js +1 -0
  179. package/build/client/_app/immutable/chunks/D2KG5w4u.js.br +0 -0
  180. package/build/client/_app/immutable/chunks/D2KG5w4u.js.gz +0 -0
  181. package/build/client/_app/immutable/chunks/DD7ObTOV.js +1 -0
  182. package/build/client/_app/immutable/chunks/DD7ObTOV.js.br +0 -0
  183. package/build/client/_app/immutable/chunks/DD7ObTOV.js.gz +0 -0
  184. package/build/client/_app/immutable/chunks/DD9f1wuL.js +1 -0
  185. package/build/client/_app/immutable/chunks/DD9f1wuL.js.br +0 -0
  186. package/build/client/_app/immutable/chunks/DD9f1wuL.js.gz +0 -0
  187. package/build/client/_app/immutable/chunks/DFMQ7Wtb.js +1 -0
  188. package/build/client/_app/immutable/chunks/DFMQ7Wtb.js.br +0 -0
  189. package/build/client/_app/immutable/chunks/DFMQ7Wtb.js.gz +0 -0
  190. package/build/client/_app/immutable/chunks/DFO_JKVL.js +1 -0
  191. package/build/client/_app/immutable/chunks/DFO_JKVL.js.br +0 -0
  192. package/build/client/_app/immutable/chunks/DFO_JKVL.js.gz +0 -0
  193. package/build/client/_app/immutable/chunks/DGyl1a-y.js +2 -0
  194. package/build/client/_app/immutable/chunks/DGyl1a-y.js.br +0 -0
  195. package/build/client/_app/immutable/chunks/DGyl1a-y.js.gz +0 -0
  196. package/build/client/_app/immutable/chunks/DM7BiLiI.js +1 -0
  197. package/build/client/_app/immutable/chunks/DM7BiLiI.js.br +0 -0
  198. package/build/client/_app/immutable/chunks/DM7BiLiI.js.gz +0 -0
  199. package/build/client/_app/immutable/chunks/DRu3YDxz.js +1 -0
  200. package/build/client/_app/immutable/chunks/DRu3YDxz.js.br +2 -0
  201. package/build/client/_app/immutable/chunks/DRu3YDxz.js.gz +0 -0
  202. package/build/client/_app/immutable/chunks/DTmdu5jU.js +1 -0
  203. package/build/client/_app/immutable/chunks/DTmdu5jU.js.br +0 -0
  204. package/build/client/_app/immutable/chunks/DTmdu5jU.js.gz +0 -0
  205. package/build/client/_app/immutable/chunks/DW6oei0W.js +1 -0
  206. package/build/client/_app/immutable/chunks/DW6oei0W.js.br +0 -0
  207. package/build/client/_app/immutable/chunks/DW6oei0W.js.gz +0 -0
  208. package/build/client/_app/immutable/chunks/DZ_NkRbw.js +1 -0
  209. package/build/client/_app/immutable/chunks/DZ_NkRbw.js.br +0 -0
  210. package/build/client/_app/immutable/chunks/DZ_NkRbw.js.gz +0 -0
  211. package/build/client/_app/immutable/chunks/DfNBP7nd.js +1 -0
  212. package/build/client/_app/immutable/chunks/DfNBP7nd.js.br +0 -0
  213. package/build/client/_app/immutable/chunks/DfNBP7nd.js.gz +0 -0
  214. package/build/client/_app/immutable/chunks/DkhXP75k.js +1 -0
  215. package/build/client/_app/immutable/chunks/DkhXP75k.js.br +0 -0
  216. package/build/client/_app/immutable/chunks/DkhXP75k.js.gz +0 -0
  217. package/build/client/_app/immutable/chunks/DpugZNaj.js +1 -0
  218. package/build/client/_app/immutable/chunks/DpugZNaj.js.br +0 -0
  219. package/build/client/_app/immutable/chunks/DpugZNaj.js.gz +0 -0
  220. package/build/client/_app/immutable/chunks/DuEN1GTI.js +5 -0
  221. package/build/client/_app/immutable/chunks/DuEN1GTI.js.br +0 -0
  222. package/build/client/_app/immutable/chunks/DuEN1GTI.js.gz +0 -0
  223. package/build/client/_app/immutable/chunks/DubTk1R0.js +1 -0
  224. package/build/client/_app/immutable/chunks/DubTk1R0.js.br +0 -0
  225. package/build/client/_app/immutable/chunks/DubTk1R0.js.gz +0 -0
  226. package/build/client/_app/immutable/chunks/Dyxd9rrM.js +5 -0
  227. package/build/client/_app/immutable/chunks/Dyxd9rrM.js.br +0 -0
  228. package/build/client/_app/immutable/chunks/Dyxd9rrM.js.gz +0 -0
  229. package/build/client/_app/immutable/chunks/F14uK0sn.js +1 -0
  230. package/build/client/_app/immutable/chunks/F14uK0sn.js.br +1 -0
  231. package/build/client/_app/immutable/chunks/F14uK0sn.js.gz +0 -0
  232. package/build/client/_app/immutable/chunks/GbStyEBD.js +1 -0
  233. package/build/client/_app/immutable/chunks/GbStyEBD.js.br +0 -0
  234. package/build/client/_app/immutable/chunks/GbStyEBD.js.gz +0 -0
  235. package/build/client/_app/immutable/chunks/IV6C0355.js +1 -0
  236. package/build/client/_app/immutable/chunks/IV6C0355.js.br +0 -0
  237. package/build/client/_app/immutable/chunks/IV6C0355.js.gz +0 -0
  238. package/build/client/_app/immutable/chunks/KSWUKh8r.js +1 -0
  239. package/build/client/_app/immutable/chunks/KSWUKh8r.js.br +0 -0
  240. package/build/client/_app/immutable/chunks/KSWUKh8r.js.gz +0 -0
  241. package/build/client/_app/immutable/chunks/Nhc5CiNi.js +1 -0
  242. package/build/client/_app/immutable/chunks/Nhc5CiNi.js.br +0 -0
  243. package/build/client/_app/immutable/chunks/Nhc5CiNi.js.gz +0 -0
  244. package/build/client/_app/immutable/chunks/OrbH09aZ.js +318 -0
  245. package/build/client/_app/immutable/chunks/OrbH09aZ.js.br +0 -0
  246. package/build/client/_app/immutable/chunks/OrbH09aZ.js.gz +0 -0
  247. package/build/client/_app/immutable/chunks/PnjGAuWf.js +1 -0
  248. package/build/client/_app/immutable/chunks/PnjGAuWf.js.br +0 -0
  249. package/build/client/_app/immutable/chunks/PnjGAuWf.js.gz +0 -0
  250. package/build/client/_app/immutable/chunks/ZoO6eRK-.js +1 -0
  251. package/build/client/_app/immutable/chunks/ZoO6eRK-.js.br +0 -0
  252. package/build/client/_app/immutable/chunks/ZoO6eRK-.js.gz +0 -0
  253. package/build/client/_app/immutable/chunks/eHlSYfzc.js +67 -0
  254. package/build/client/_app/immutable/chunks/eHlSYfzc.js.br +0 -0
  255. package/build/client/_app/immutable/chunks/eHlSYfzc.js.gz +0 -0
  256. package/build/client/_app/immutable/chunks/kUgLbqVN.js +1 -0
  257. package/build/client/_app/immutable/chunks/kUgLbqVN.js.br +0 -0
  258. package/build/client/_app/immutable/chunks/kUgLbqVN.js.gz +0 -0
  259. package/build/client/_app/immutable/chunks/kW5akbMY.js +1 -0
  260. package/build/client/_app/immutable/chunks/kW5akbMY.js.br +0 -0
  261. package/build/client/_app/immutable/chunks/kW5akbMY.js.gz +0 -0
  262. package/build/client/_app/immutable/chunks/lOC7RXgz.js +1 -0
  263. package/build/client/_app/immutable/chunks/lOC7RXgz.js.br +0 -0
  264. package/build/client/_app/immutable/chunks/lOC7RXgz.js.gz +0 -0
  265. package/build/client/_app/immutable/chunks/mxa1wXkp.js +3 -0
  266. package/build/client/_app/immutable/chunks/mxa1wXkp.js.br +0 -0
  267. package/build/client/_app/immutable/chunks/mxa1wXkp.js.gz +0 -0
  268. package/build/client/_app/immutable/chunks/q0g666o4.js +6 -0
  269. package/build/client/_app/immutable/chunks/q0g666o4.js.br +0 -0
  270. package/build/client/_app/immutable/chunks/q0g666o4.js.gz +0 -0
  271. package/build/client/_app/immutable/chunks/rTK8FScS.js +1 -0
  272. package/build/client/_app/immutable/chunks/rTK8FScS.js.br +0 -0
  273. package/build/client/_app/immutable/chunks/rTK8FScS.js.gz +0 -0
  274. package/build/client/_app/immutable/chunks/uBIymjUX.js +1 -0
  275. package/build/client/_app/immutable/chunks/uBIymjUX.js.br +0 -0
  276. package/build/client/_app/immutable/chunks/uBIymjUX.js.gz +0 -0
  277. package/build/client/_app/immutable/chunks/vt9Yl3tP.js +1 -0
  278. package/build/client/_app/immutable/chunks/vt9Yl3tP.js.br +0 -0
  279. package/build/client/_app/immutable/chunks/vt9Yl3tP.js.gz +0 -0
  280. package/build/client/_app/immutable/chunks/xihTtKlq.js +1 -0
  281. package/build/client/_app/immutable/chunks/xihTtKlq.js.br +1 -0
  282. package/build/client/_app/immutable/chunks/xihTtKlq.js.gz +0 -0
  283. package/build/client/_app/immutable/entry/app.BBB0nTuC.js +2 -0
  284. package/build/client/_app/immutable/entry/app.BBB0nTuC.js.br +0 -0
  285. package/build/client/_app/immutable/entry/app.BBB0nTuC.js.gz +0 -0
  286. package/build/client/_app/immutable/entry/start.CmBINDhZ.js +1 -0
  287. package/build/client/_app/immutable/entry/start.CmBINDhZ.js.br +1 -0
  288. package/build/client/_app/immutable/entry/start.CmBINDhZ.js.gz +0 -0
  289. package/build/client/_app/immutable/nodes/0.But357jM.js +1 -0
  290. package/build/client/_app/immutable/nodes/0.But357jM.js.br +0 -0
  291. package/build/client/_app/immutable/nodes/0.But357jM.js.gz +0 -0
  292. package/build/client/_app/immutable/nodes/1.DT8uBymP.js +1 -0
  293. package/build/client/_app/immutable/nodes/1.DT8uBymP.js.br +4 -0
  294. package/build/client/_app/immutable/nodes/1.DT8uBymP.js.gz +0 -0
  295. package/build/client/_app/immutable/nodes/10.BacbVQXe.js +1 -0
  296. package/build/client/_app/immutable/nodes/10.BacbVQXe.js.br +0 -0
  297. package/build/client/_app/immutable/nodes/10.BacbVQXe.js.gz +0 -0
  298. package/build/client/_app/immutable/nodes/11.CF-CErr7.js +2 -0
  299. package/build/client/_app/immutable/nodes/11.CF-CErr7.js.br +0 -0
  300. package/build/client/_app/immutable/nodes/11.CF-CErr7.js.gz +0 -0
  301. package/build/client/_app/immutable/nodes/12.CAPJJBGQ.js +1 -0
  302. package/build/client/_app/immutable/nodes/12.CAPJJBGQ.js.br +0 -0
  303. package/build/client/_app/immutable/nodes/12.CAPJJBGQ.js.gz +0 -0
  304. package/build/client/_app/immutable/nodes/13.DFyrYJal.js +1 -0
  305. package/build/client/_app/immutable/nodes/13.DFyrYJal.js.br +0 -0
  306. package/build/client/_app/immutable/nodes/13.DFyrYJal.js.gz +0 -0
  307. package/build/client/_app/immutable/nodes/14.D35Ot9wm.js +46 -0
  308. package/build/client/_app/immutable/nodes/14.D35Ot9wm.js.br +0 -0
  309. package/build/client/_app/immutable/nodes/14.D35Ot9wm.js.gz +0 -0
  310. package/build/client/_app/immutable/nodes/15.Cp0A6oCa.js +1 -0
  311. package/build/client/_app/immutable/nodes/15.Cp0A6oCa.js.br +0 -0
  312. package/build/client/_app/immutable/nodes/15.Cp0A6oCa.js.gz +0 -0
  313. package/build/client/_app/immutable/nodes/2.DFKUnwHk.js +1 -0
  314. package/build/client/_app/immutable/nodes/2.DFKUnwHk.js.br +0 -0
  315. package/build/client/_app/immutable/nodes/2.DFKUnwHk.js.gz +0 -0
  316. package/build/client/_app/immutable/nodes/3.DtSCxjUL.js +1 -0
  317. package/build/client/_app/immutable/nodes/3.DtSCxjUL.js.br +0 -0
  318. package/build/client/_app/immutable/nodes/3.DtSCxjUL.js.gz +0 -0
  319. package/build/client/_app/immutable/nodes/4.BY04Tg68.js +2 -0
  320. package/build/client/_app/immutable/nodes/4.BY04Tg68.js.br +0 -0
  321. package/build/client/_app/immutable/nodes/4.BY04Tg68.js.gz +0 -0
  322. package/build/client/_app/immutable/nodes/5.CXq_oj0Q.js +1 -0
  323. package/build/client/_app/immutable/nodes/5.CXq_oj0Q.js.br +0 -0
  324. package/build/client/_app/immutable/nodes/5.CXq_oj0Q.js.gz +0 -0
  325. package/build/client/_app/immutable/nodes/6.BVjg5uYT.js +1 -0
  326. package/build/client/_app/immutable/nodes/6.BVjg5uYT.js.br +0 -0
  327. package/build/client/_app/immutable/nodes/6.BVjg5uYT.js.gz +0 -0
  328. package/build/client/_app/immutable/nodes/7.BX0HQjn_.js +1 -0
  329. package/build/client/_app/immutable/nodes/7.BX0HQjn_.js.br +0 -0
  330. package/build/client/_app/immutable/nodes/7.BX0HQjn_.js.gz +0 -0
  331. package/build/client/_app/immutable/nodes/8.De0kNeyT.js +4 -0
  332. package/build/client/_app/immutable/nodes/8.De0kNeyT.js.br +0 -0
  333. package/build/client/_app/immutable/nodes/8.De0kNeyT.js.gz +0 -0
  334. package/build/client/_app/immutable/nodes/9.CjcFLNkE.js +1 -0
  335. package/build/client/_app/immutable/nodes/9.CjcFLNkE.js.br +0 -0
  336. package/build/client/_app/immutable/nodes/9.CjcFLNkE.js.gz +0 -0
  337. package/build/client/_app/version.json +1 -0
  338. package/build/client/_app/version.json.br +0 -0
  339. package/build/client/_app/version.json.gz +0 -0
  340. package/build/client/apple-touch-icon.png +0 -0
  341. package/build/client/favicon.ico +0 -0
  342. package/build/client/robots.txt +3 -0
  343. package/build/client/robots.txt.br +0 -0
  344. package/build/client/robots.txt.gz +0 -0
  345. package/build/env.js +70 -0
  346. package/build/handler.js +26 -0
  347. package/build/index.js +149 -0
  348. package/build/server/chunks/chunks/AssistantAvatar.js-CR1xF68O.js +294 -0
  349. package/build/server/chunks/chunks/AvatarPicker.js-DZPhpy7w.js +136 -0
  350. package/build/server/chunks/chunks/Composer.js-mKR_nJD9.js +332 -0
  351. package/build/server/chunks/chunks/ComposerDock.js-CCH7a93l.js +58 -0
  352. package/build/server/chunks/chunks/CopyButton.js-BztgBjPI.js +81 -0
  353. package/build/server/chunks/chunks/DotGrid.js-CftrAYTh.js +107 -0
  354. package/build/server/chunks/chunks/LucideIcon.js-B_cwdnXZ.js +19 -0
  355. package/build/server/chunks/chunks/MemoryChangeItem.js-BBDjCjIq.js +2557 -0
  356. package/build/server/chunks/chunks/ModelMenu.js-DHccPOZS.js +510 -0
  357. package/build/server/chunks/chunks/MoveToFolderMenu.js-DI6yuRr_.js +288 -0
  358. package/build/server/chunks/chunks/NewChatForm.js-BesIRgmI.js +296 -0
  359. package/build/server/chunks/chunks/NewFolderDialog.js-BTTYnEvA.js +192 -0
  360. package/build/server/chunks/chunks/Notifications.js-BUIjQEFf.js +762 -0
  361. package/build/server/chunks/chunks/PageHeader.js-CBhoVn_r.js +59 -0
  362. package/build/server/chunks/chunks/RenameFolderDialog.js-DRXA1rE1.js +258 -0
  363. package/build/server/chunks/chunks/Rich.js-DEvHcohw.js +31 -0
  364. package/build/server/chunks/chunks/StepIcon.js-DbIHgd-j.js +38 -0
  365. package/build/server/chunks/chunks/TopBar.js-DL3V5e8_.js +34 -0
  366. package/build/server/chunks/chunks/TypedText.js-CBSV0Eww.js +62 -0
  367. package/build/server/chunks/chunks/UserAvatar.js-zDozVLYj.js +17 -0
  368. package/build/server/chunks/chunks/UserMenu.js-CD42Fp5q.js +960 -0
  369. package/build/server/chunks/chunks/access.js-0oJZgR4f.js +40 -0
  370. package/build/server/chunks/chunks/after-sleep.js-BBvqb2L4.js +10 -0
  371. package/build/server/chunks/chunks/alert-dialog.js-DFswoRFb.js +505 -0
  372. package/build/server/chunks/chunks/articles.js-DmiBPIor.js +16 -0
  373. package/build/server/chunks/chunks/auth.js-avakWenI.js +20044 -0
  374. package/build/server/chunks/chunks/avatars.js-CZXD-JBu.js +496 -0
  375. package/build/server/chunks/chunks/badge.js-CBKfxi1n.js +38 -0
  376. package/build/server/chunks/chunks/check.js-DlXI7kOF.js +15 -0
  377. package/build/server/chunks/chunks/chevron-right.js-D2YPHtEd.js +15 -0
  378. package/build/server/chunks/chunks/chevrons-up-down.js-kIInlPpp.js +15 -0
  379. package/build/server/chunks/chunks/client.js-DXLagFo3.js +120 -0
  380. package/build/server/chunks/chunks/clock.js-DLKiHbA7.js +19 -0
  381. package/build/server/chunks/chunks/collapsible.js-TEhMCaES.js +410 -0
  382. package/build/server/chunks/chunks/command.js-DYF1chyA.js +2231 -0
  383. package/build/server/chunks/chunks/core.js-fgH-0YTF.js +6 -0
  384. package/build/server/chunks/chunks/dialog.js-CSahHfdK.js +544 -0
  385. package/build/server/chunks/chunks/dist.js-Dgve-3EB.js +600 -0
  386. package/build/server/chunks/chunks/dist2.js-DzuN_1ds.js +347 -0
  387. package/build/server/chunks/chunks/dropdown-menu.js-CnOm2iRl.js +2396 -0
  388. package/build/server/chunks/chunks/env.js-l0sNRNKZ.js +2 -0
  389. package/build/server/chunks/chunks/eraser.js-CwqAwzLd.js +15 -0
  390. package/build/server/chunks/chunks/exports.js-DPPmkIPk.js +236 -0
  391. package/build/server/chunks/chunks/factory.js-B2lDZWU5.js +2344 -0
  392. package/build/server/chunks/chunks/files.js-BTCcxPsy.js +33 -0
  393. package/build/server/chunks/chunks/folder-input.js-bTjsbAVr.js +19 -0
  394. package/build/server/chunks/chunks/format.js-D-G-GNZJ.js +57 -0
  395. package/build/server/chunks/chunks/forms.js-TIFaBiDZ.js +4052 -0
  396. package/build/server/chunks/chunks/hidden-input.js-3jXOp67_.js +47 -0
  397. package/build/server/chunks/chunks/http.js-B-SIUg23.js +19 -0
  398. package/build/server/chunks/chunks/i18n.js-gmnYop5e.js +5049 -0
  399. package/build/server/chunks/chunks/icons.js-DqrSaQen.js +32087 -0
  400. package/build/server/chunks/chunks/index-server.js-BgjjN9Dl.js +146 -0
  401. package/build/server/chunks/chunks/internal.js-CPnM6pod.js +28 -0
  402. package/build/server/chunks/chunks/internal2.js-BJdu5v6t.js +1135 -0
  403. package/build/server/chunks/chunks/key-round.js-ALDn8H2Z.js +20 -0
  404. package/build/server/chunks/chunks/last-profile.js-CGCyMPCt.js +6 -0
  405. package/build/server/chunks/chunks/media-refs.js-CTbNjDi5.js +129 -0
  406. package/build/server/chunks/chunks/memory-categories.js-BMxcWbJ1.js +141 -0
  407. package/build/server/chunks/chunks/memory-export.js-B-0sQxo9.js +126 -0
  408. package/build/server/chunks/chunks/memory.js-BmjM2yTP.js +25 -0
  409. package/build/server/chunks/chunks/message-circle.js-Boy7xak8.js +15 -0
  410. package/build/server/chunks/chunks/motion.js-e6Xy0FvI.js +224 -0
  411. package/build/server/chunks/chunks/node.js-B1BYsTq2.js +9 -0
  412. package/build/server/chunks/chunks/node2.js-BoQ3pSBK.js +7 -0
  413. package/build/server/chunks/chunks/node3.js-DUajZgS1.js +2420 -0
  414. package/build/server/chunks/chunks/openai.js-usndTuuG.js +20473 -0
  415. package/build/server/chunks/chunks/paths.js-Dv5_wc5b.js +19 -0
  416. package/build/server/chunks/chunks/pencil.js-BBTMEZ3O.js +15 -0
  417. package/build/server/chunks/chunks/plus.js-BEkOQr9Q.js +15 -0
  418. package/build/server/chunks/chunks/preferences.svelte.js-CzoLtrIH.js +93 -0
  419. package/build/server/chunks/chunks/remote.js-DRgAwsBW.js +3 -0
  420. package/build/server/chunks/chunks/rolldown-runtime.js-n5G0F_TW.js +37 -0
  421. package/build/server/chunks/chunks/routing.js-CQ7vk27s.js +265 -0
  422. package/build/server/chunks/chunks/schedule.js-22hng-Kw.js +296 -0
  423. package/build/server/chunks/chunks/sdk.js-CRLWYx_O.js +42918 -0
  424. package/build/server/chunks/chunks/sdk2.js-Dp6IbCdi.js +13701 -0
  425. package/build/server/chunks/chunks/sdk3.js-DEwIpbCP.js +4 -0
  426. package/build/server/chunks/chunks/select.js-DGOA1VL9.js +1965 -0
  427. package/build/server/chunks/chunks/server.js-XxNf6kVC.js +3907 -0
  428. package/build/server/chunks/chunks/shared.js-1FwmeXhQ.js +789 -0
  429. package/build/server/chunks/chunks/sidebar.js-B-PyxBE9.js +1498 -0
  430. package/build/server/chunks/chunks/square-pen.js-B7nqpNVl.js +20 -0
  431. package/build/server/chunks/chunks/src.js-Cb-pJk2c.js +25288 -0
  432. package/build/server/chunks/chunks/state.js-CrwNc-tR.js +67 -0
  433. package/build/server/chunks/chunks/suggestions.js-DxdV1W1D.js +15 -0
  434. package/build/server/chunks/chunks/switch.js-CDuy0MzW.js +283 -0
  435. package/build/server/chunks/chunks/terminal.js-BEi5NMPR.js +15 -0
  436. package/build/server/chunks/chunks/textarea.js-DnOcXQXd.js +25 -0
  437. package/build/server/chunks/chunks/tint.js-D75gRPbz.js +165 -0
  438. package/build/server/chunks/chunks/tooltip.js-0flEKjnb.js +5863 -0
  439. package/build/server/chunks/chunks/uneval.js-C7SIrMEV.js +536 -0
  440. package/build/server/chunks/chunks/usage.js-BzKKyzUN.js +27 -0
  441. package/build/server/chunks/chunks/utils.js-rQQrRQUR.js +1020 -0
  442. package/build/server/chunks/chunks/utils2.js-BgS8NcJx.js +1167 -0
  443. package/build/server/chunks/chunks/zod.js-DkbjBCP6.js +18824 -0
  444. package/build/server/chunks/chunks/zod2.js-FNRC10wS.js +4 -0
  445. package/build/server/chunks/entries/endpoints/api/c/_id_/continue/_server.ts.js-DPkjAoli.js +45 -0
  446. package/build/server/chunks/entries/endpoints/api/c/_id_/effort/_server.ts.js-B8su8yn5.js +46 -0
  447. package/build/server/chunks/entries/endpoints/api/c/_id_/events/_server.ts.js-CLDxKKTx.js +73 -0
  448. package/build/server/chunks/entries/endpoints/api/c/_id_/folder/_server.ts.js-DT3NoKYe.js +54 -0
  449. package/build/server/chunks/entries/endpoints/api/c/_id_/media/_mediaId_/_server.ts.js-bvxQlwcS.js +52 -0
  450. package/build/server/chunks/entries/endpoints/api/c/_id_/messages/_server.ts.js-ClMX8O_R.js +57 -0
  451. package/build/server/chunks/entries/endpoints/api/c/_id_/preset/_server.ts.js-DQ8N5-g_.js +50 -0
  452. package/build/server/chunks/entries/endpoints/api/c/_id_/stop/_server.ts.js-4v8WbwCB.js +43 -0
  453. package/build/server/chunks/entries/endpoints/api/events/_server.ts.js-lUrCowKV.js +78 -0
  454. package/build/server/chunks/entries/endpoints/api/hooks/_token_/_server.ts.js-CoqUCiud.js +49 -0
  455. package/build/server/chunks/entries/endpoints/api/icons/_name_/_server.ts.js-k_TzYggq.js +18 -0
  456. package/build/server/chunks/entries/endpoints/api/models/_server.ts.js-BnE6M4aY.js +56 -0
  457. package/build/server/chunks/entries/endpoints/api/notifications/_id_/continue/_server.ts.js-7cVqAe1A.js +50 -0
  458. package/build/server/chunks/entries/endpoints/api/notifications/_id_/dismiss/_server.ts.js-nebszEA8.js +42 -0
  459. package/build/server/chunks/entries/endpoints/api/notifications/clear/_server.ts.js-8UNQWqlv.js +43 -0
  460. package/build/server/chunks/entries/endpoints/api/notifications/seen/_server.ts.js-BigNQ41d.js +43 -0
  461. package/build/server/chunks/entries/endpoints/api/p/_slug_/folders/_folder_/files/_file_/_server.ts.js-CVZofPL8.js +56 -0
  462. package/build/server/chunks/entries/endpoints/api/p/_slug_/folders/_server.ts.js--huBNcxm.js +57 -0
  463. package/build/server/chunks/entries/endpoints/api/p/_slug_/memory/_id_/undo/_server.ts.js-DILraLKg.js +57 -0
  464. package/build/server/chunks/entries/endpoints/api/p/_slug_/running/_server.ts.js-DysLWyt1.js +79 -0
  465. package/build/server/chunks/entries/endpoints/api/p/_slug_/suggestions/_server.ts.js-B8HQNn05.js +53 -0
  466. package/build/server/chunks/entries/endpoints/api/p/_slug_/templates/_id_/cover/_server.ts.js-DCJqd-KE.js +59 -0
  467. package/build/server/chunks/entries/endpoints/api/p/_slug_/uploads/_id_/_server.ts.js-DJh0dkU7.js +44 -0
  468. package/build/server/chunks/entries/endpoints/api/p/_slug_/uploads/_server.ts.js-CQi0je7g.js +72 -0
  469. package/build/server/chunks/entries/endpoints/logout/_server.ts.js-iwUOTHUJ.js +46 -0
  470. package/build/server/chunks/entries/fallbacks/error.svelte.js-BjT9T-qE.js +22 -0
  471. package/build/server/chunks/entries/hooks.server.js-CA451orY.js +1956 -0
  472. package/build/server/chunks/entries/pages/_layout.server.ts.js-DeA1Se1v.js +34 -0
  473. package/build/server/chunks/entries/pages/_layout.svelte.js-Cc0HS5vE.js +77 -0
  474. package/build/server/chunks/entries/pages/_page.server.ts.js-BP9VmKmv.js +20 -0
  475. package/build/server/chunks/entries/pages/_page.svelte.js-BP2EdQl3.js +5 -0
  476. package/build/server/chunks/entries/pages/admin/_page.server.ts.js-BGy54zg7.js +310 -0
  477. package/build/server/chunks/entries/pages/admin/_page.svelte.js-DC0lzbwL.js +2092 -0
  478. package/build/server/chunks/entries/pages/login/_page.server.ts.js-to8Vy4NV.js +42 -0
  479. package/build/server/chunks/entries/pages/login/_page.svelte.js-CRFRcLqG.js +74 -0
  480. package/build/server/chunks/entries/pages/p/_slug_/_layout.server.ts.js-BATtKhxU.js +50 -0
  481. package/build/server/chunks/entries/pages/p/_slug_/_layout.svelte.js-B4A4RVlj.js +1897 -0
  482. package/build/server/chunks/entries/pages/p/_slug_/_page.server.ts.js-CwhG-rBA.js +71 -0
  483. package/build/server/chunks/entries/pages/p/_slug_/_page.svelte.js-v85HZSJv.js +132 -0
  484. package/build/server/chunks/entries/pages/p/_slug_/automations/_page.server.ts.js-BYjEh_94.js +269 -0
  485. package/build/server/chunks/entries/pages/p/_slug_/automations/_page.svelte.js-C9MxplNZ.js +423 -0
  486. package/build/server/chunks/entries/pages/p/_slug_/c/_id_/_page.server.ts.js-DqYn7Ov8.js +68 -0
  487. package/build/server/chunks/entries/pages/p/_slug_/c/_id_/_page.svelte.js-DO1qyELK.js +2072 -0
  488. package/build/server/chunks/entries/pages/p/_slug_/f/_folder_/_page.server.ts.js-DK68gPIS.js +101 -0
  489. package/build/server/chunks/entries/pages/p/_slug_/f/_folder_/_page.svelte.js-a31Wj0H5.js +321 -0
  490. package/build/server/chunks/entries/pages/p/_slug_/images/_page.server.ts.js-DYwxYJjv.js +145 -0
  491. package/build/server/chunks/entries/pages/p/_slug_/images/_page.svelte.js-H3zU7YA6.js +526 -0
  492. package/build/server/chunks/entries/pages/p/_slug_/memory/_page.server.ts.js-C6jVrFqG.js +99 -0
  493. package/build/server/chunks/entries/pages/p/_slug_/memory/_page.svelte.js-D54hFXGF.js +902 -0
  494. package/build/server/chunks/entries/pages/p/_slug_/settings/_page.server.ts.js-BvhbrusJ.js +106 -0
  495. package/build/server/chunks/entries/pages/p/_slug_/settings/_page.svelte.js-K9Rx0fue.js +581 -0
  496. package/build/server/chunks/entries/pages/p/_slug_/skills/_page.server.ts.js-X_toxkHr.js +45 -0
  497. package/build/server/chunks/entries/pages/p/_slug_/skills/_page.svelte.js-9BpNF-xF.js +132 -0
  498. package/build/server/chunks/entries/pages/p/_slug_/welcome/_page.server.ts.js-1d4vkOo-.js +129 -0
  499. package/build/server/chunks/entries/pages/p/_slug_/welcome/_page@.svelte.js-32N16gxF.js +223 -0
  500. package/build/server/chunks/entries/pages/profiles/_page.server.ts.js-CYu6Uj8H.js +32 -0
  501. package/build/server/chunks/entries/pages/profiles/_page.svelte.js-Bhw4E_wV.js +89 -0
  502. package/build/server/chunks/handler-CsXFmZYe.js +1735 -0
  503. package/build/server/chunks/index.js-kWlRiTFB.js +3700 -0
  504. package/build/server/chunks/manifest.js-BU_jyr1-.js +314 -0
  505. package/build/server/chunks/nodes/0.js-D4qm-LVJ.js +42 -0
  506. package/build/server/chunks/nodes/1.js-Fjtm11_Q.js +9 -0
  507. package/build/server/chunks/nodes/10.js-C0jWz6L_.js +45 -0
  508. package/build/server/chunks/nodes/11.js-CvxSawBf.js +45 -0
  509. package/build/server/chunks/nodes/12.js-CFwkqqPw.js +45 -0
  510. package/build/server/chunks/nodes/13.js-8e3_MY_4.js +45 -0
  511. package/build/server/chunks/nodes/14.js-dFhmLvor.js +45 -0
  512. package/build/server/chunks/nodes/15.js-alFwV-ia.js +45 -0
  513. package/build/server/chunks/nodes/2.js-DlqVofm5.js +46 -0
  514. package/build/server/chunks/nodes/3.js-B11kFzfi.js +45 -0
  515. package/build/server/chunks/nodes/4.js-CJOa-BdF.js +46 -0
  516. package/build/server/chunks/nodes/5.js-BiasAa82.js +50 -0
  517. package/build/server/chunks/nodes/6.js-vEMr5YOn.js +47 -0
  518. package/build/server/chunks/nodes/7.js-BwwcgtyP.js +45 -0
  519. package/build/server/chunks/nodes/8.js-Mqkjlq-6.js +45 -0
  520. package/build/server/chunks/nodes/9.js-DtRpQ_En.js +45 -0
  521. package/build/shims.js +33 -0
  522. package/dist/chunks/chunk-45BRG6A7.js +85 -0
  523. package/dist/chunks/chunk-CL6JQXXZ.js +38 -0
  524. package/dist/chunks/chunk-KZL3QNDA.js +14397 -0
  525. package/dist/chunks/chunk-N4H4AYCQ.js +20 -0
  526. package/dist/chunks/chunk-W4U7L4LF.js +47 -0
  527. package/dist/chunks/io-DMGTB3B7.js +12 -0
  528. package/dist/chunks/node-4RSVEEU6.js +2233 -0
  529. package/dist/chunks/node-BBTNNFRQ.js +20 -0
  530. package/dist/chunks/openai-LNQCFHTY.js +21690 -0
  531. package/dist/chunks/run-6LM42GJD.js +22287 -0
  532. package/dist/chunks/sdk-UNMKBESV.js +53 -0
  533. package/dist/chunks/sdk-Z2WD4F5K.js +30854 -0
  534. package/dist/chunks/zod-H7KMPIPH.js +19934 -0
  535. package/dist/cli.js +130 -0
  536. package/package.json +102 -0
  537. package/packages/core/drizzle/0000_init.sql +123 -0
  538. package/packages/core/drizzle/0001_triggers.sql +82 -0
  539. package/packages/core/drizzle/0002_default_preset.sql +1 -0
  540. package/packages/core/drizzle/0003_trigger_summary.sql +2 -0
  541. package/packages/core/drizzle/0004_skill_toggles.sql +1 -0
  542. package/packages/core/drizzle/0005_media.sql +21 -0
  543. package/packages/core/drizzle/0006_attachments.sql +25 -0
  544. package/packages/core/drizzle/0007_folders.sql +35 -0
  545. package/packages/core/drizzle/0008_avatars.sql +26 -0
  546. package/packages/core/drizzle/0009_subagents.sql +28 -0
  547. package/packages/core/drizzle/0010_soul.sql +1 -0
  548. package/packages/core/drizzle/0011_claude_plan.sql +1 -0
  549. package/packages/core/drizzle/0012_model_switch.sql +4 -0
  550. package/packages/core/drizzle/0013_nolune_format.sql +1 -0
  551. package/packages/core/drizzle/0014_nolune_rename.sql +3 -0
  552. package/packages/core/drizzle/0015_learn_from_chats.sql +2 -0
  553. package/packages/core/drizzle/0016_memory_changes.sql +19 -0
  554. package/packages/core/drizzle/0017_member_person_note.sql +1 -0
  555. package/packages/core/drizzle/meta/0000_snapshot.json +809 -0
  556. package/packages/core/drizzle/meta/0001_snapshot.json +1354 -0
  557. package/packages/core/drizzle/meta/0002_snapshot.json +1362 -0
  558. package/packages/core/drizzle/meta/0003_snapshot.json +1376 -0
  559. package/packages/core/drizzle/meta/0004_snapshot.json +1384 -0
  560. package/packages/core/drizzle/meta/0005_snapshot.json +1523 -0
  561. package/packages/core/drizzle/meta/0006_snapshot.json +1679 -0
  562. package/packages/core/drizzle/meta/0007_snapshot.json +1921 -0
  563. package/packages/core/drizzle/meta/0008_snapshot.json +1929 -0
  564. package/packages/core/drizzle/meta/0009_snapshot.json +2109 -0
  565. package/packages/core/drizzle/meta/0010_snapshot.json +2117 -0
  566. package/packages/core/drizzle/meta/0011_snapshot.json +2124 -0
  567. package/packages/core/drizzle/meta/0012_snapshot.json +2138 -0
  568. package/packages/core/drizzle/meta/0013_snapshot.json +2145 -0
  569. package/packages/core/drizzle/meta/0014_snapshot.json +2145 -0
  570. package/packages/core/drizzle/meta/0015_snapshot.json +2160 -0
  571. package/packages/core/drizzle/meta/0016_snapshot.json +2286 -0
  572. package/packages/core/drizzle/meta/0017_snapshot.json +2293 -0
  573. package/packages/core/drizzle/meta/_journal.json +132 -0
  574. package/packages/core/image-templates/app-icon/TEMPLATE.md +37 -0
  575. package/packages/core/image-templates/app-icon/cover.webp +0 -0
  576. package/packages/core/image-templates/coloring-page/TEMPLATE.md +14 -0
  577. package/packages/core/image-templates/coloring-page/cover.webp +0 -0
  578. package/packages/core/image-templates/concept-art/TEMPLATE.md +46 -0
  579. package/packages/core/image-templates/concept-art/cover.webp +0 -0
  580. package/packages/core/image-templates/couple-portrait/TEMPLATE.md +35 -0
  581. package/packages/core/image-templates/couple-portrait/cover.webp +0 -0
  582. package/packages/core/image-templates/dream-bouquet/TEMPLATE.md +36 -0
  583. package/packages/core/image-templates/dream-bouquet/cover.webp +0 -0
  584. package/packages/core/image-templates/family-crest/TEMPLATE.md +38 -0
  585. package/packages/core/image-templates/family-crest/cover.webp +0 -0
  586. package/packages/core/image-templates/nail-art/TEMPLATE.md +32 -0
  587. package/packages/core/image-templates/nail-art/cover.webp +0 -0
  588. package/packages/core/image-templates/outfit-board/TEMPLATE.md +46 -0
  589. package/packages/core/image-templates/outfit-board/cover.webp +0 -0
  590. package/packages/core/image-templates/party-invitation/TEMPLATE.md +49 -0
  591. package/packages/core/image-templates/party-invitation/cover.webp +0 -0
  592. package/packages/core/image-templates/photo-booth/TEMPLATE.md +33 -0
  593. package/packages/core/image-templates/photo-booth/cover.webp +0 -0
  594. package/packages/core/image-templates/scribble/TEMPLATE.md +29 -0
  595. package/packages/core/image-templates/scribble/cover.webp +0 -0
  596. package/packages/core/image-templates/sprite-sheet/TEMPLATE.md +45 -0
  597. package/packages/core/image-templates/sprite-sheet/cover.webp +0 -0
  598. package/packages/core/image-templates/sticker-pack/TEMPLATE.md +37 -0
  599. package/packages/core/image-templates/sticker-pack/cover.webp +0 -0
  600. package/packages/core/image-templates/storybook-page/TEMPLATE.md +34 -0
  601. package/packages/core/image-templates/storybook-page/cover.webp +0 -0
  602. package/packages/core/image-templates/tattoo/TEMPLATE.md +44 -0
  603. package/packages/core/image-templates/tattoo/cover.webp +0 -0
  604. package/packages/core/image-templates/tileable-texture/TEMPLATE.md +34 -0
  605. package/packages/core/image-templates/tileable-texture/cover.webp +0 -0
  606. package/packages/core/image-templates/tiny-world/TEMPLATE.md +15 -0
  607. package/packages/core/image-templates/tiny-world/cover.webp +0 -0
  608. package/packages/core/image-templates/trip-postcard/TEMPLATE.md +21 -0
  609. package/packages/core/image-templates/trip-postcard/cover.webp +0 -0
  610. package/packages/core/image-templates/wanted-poster/TEMPLATE.md +27 -0
  611. package/packages/core/image-templates/wanted-poster/cover.webp +0 -0
  612. package/packages/core/skills/automations/SKILL.md +91 -0
  613. package/packages/core/skills/generate-images/SKILL.md +115 -0
  614. package/packages/core/skills/nolune/SKILL.md +281 -0
  615. package/packages/core/skills/subagents/SKILL.md +91 -0
  616. package/packages/core/skills/view-images/SKILL.md +88 -0
@@ -0,0 +1,3700 @@
1
+ import { a as __commonJSMin } from './chunks/rolldown-runtime.js-n5G0F_TW.js';
2
+ import { n as noop, T as TRAILING_SLASH_PARAM, I as INVALIDATED_PARAM, R as Redirect, b as get_relative_path, S as SvelteKitError, g as get_status, t as text_encoder, o as once, H as HttpError, d as normalize_error, e as create_remote_key, f as parse_remote_arg, s as stringify, h as stringify$1, A as ActionFailure, i as split_remote_key, j as base64_encode } from './chunks/shared.js-1FwmeXhQ.js';
3
+ import { b as base, o as override, a as assets, r as reset, c as app_dir } from './chunks/internal.js-CPnM6pod.js';
4
+ import { f as format_server_error, j as json, i as is_form_content_type, t as text, h as has_prerendered_path, a as handle_fatal_error, r as redirect_response, g as get_set_cookies, n as negotiate, w as with_request_store, p as parseString, m as merge_tracing, b as method_not_allowed, s as static_error_page, c as handle_error_and_jsonify, d as get_global_name, e as create_replacer, k as serialize_uses, l as clarify_devalue_error, E as ENDPOINT_METHODS, P as PAGE_METHODS, o as get_node_type, q as isRedirect, u as escape_html, v as error, x as deserialize_binary_form } from './chunks/utils.js-rQQrRQUR.js';
5
+ import { u as uneval } from './chunks/uneval.js-C7SIrMEV.js';
6
+ import { o as options, s as set_private_env, a as set_public_env, g as get_hooks, p as public_env, r as read_implementation, b as set_read_implementation } from './chunks/internal2.js-BJdu5v6t.js';
7
+ import { v as validate_layout_server_exports, a as validate_layout_exports, b as validate_page_server_exports, c as validate_page_exports, n as noop_span, h as hash, d as compact, w as writable, r as readable } from './chunks/exports.js-DPPmkIPk.js';
8
+ import { h as has_resolution_suffix, a as has_data_suffix, s as strip_resolution_suffix, b as strip_data_suffix, d as decode_pathname, c as add_data_suffix, e as add_resolution_suffix, f as find_route, n as normalize_path, g as disable_search, r as resolve, m as make_trackable } from './chunks/routing.js-CQ7vk27s.js';
9
+
10
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/utils/promise.js
11
+ /** @see https://github.com/microsoft/TypeScript/blob/904e7dd97dc8da1352c8e05d70829dff17c73214/src/lib/es2024.promise.d.ts */
12
+ /**
13
+ * @template T
14
+ * @typedef {{
15
+ * promise: Promise<T>;
16
+ * resolve: (value: T | PromiseLike<T>) => void;
17
+ * reject: (reason?: any) => void;
18
+ * }} PromiseWithResolvers<T>
19
+ */
20
+ /**
21
+ * TODO: Whenever Node >21 is minimum supported version, we can use `Promise.withResolvers` to avoid this ceremony
22
+ *
23
+ * @template T
24
+ * @returns {PromiseWithResolvers<T>}
25
+ */
26
+ function with_resolvers() {
27
+ let resolve;
28
+ let reject;
29
+ return {
30
+ promise: new Promise((res, rej) => {
31
+ resolve = res;
32
+ reject = rej;
33
+ }),
34
+ resolve,
35
+ reject
36
+ };
37
+ }
38
+ //#endregion
39
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/runtime/server/constants.js
40
+ var NULL_BODY_STATUS = [
41
+ 101,
42
+ 103,
43
+ 204,
44
+ 205,
45
+ 304
46
+ ];
47
+ var IN_WEBCONTAINER = !!globalThis.process?.versions?.webcontainer;
48
+ //#endregion
49
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/utils/misc.js
50
+ var s = JSON.stringify;
51
+ //#endregion
52
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/runtime/server/endpoint.js
53
+ /**
54
+ * @param {import('@sveltejs/kit').RequestEvent} event
55
+ * @param {import('types').RequestState} event_state
56
+ * @param {import('types').SSREndpoint} mod
57
+ * @param {import('types').SSRState} state
58
+ * @returns {Promise<Response>}
59
+ */
60
+ async function render_endpoint(event, event_state, mod, state) {
61
+ const method = event.request.method;
62
+ let handler = mod[method] || mod.fallback;
63
+ if (method === "HEAD" && !mod.HEAD && mod.GET) handler = mod.GET;
64
+ if (!handler) return method_not_allowed(mod, method);
65
+ const prerender = mod.prerender ?? state.prerender_default;
66
+ if (prerender && (mod.POST || mod.PATCH || mod.PUT || mod.DELETE)) throw new Error("Cannot prerender endpoints that have mutative methods");
67
+ if (state.prerendering && !state.prerendering.inside_reroute && !prerender) {
68
+ if (state.depth > 0) throw new Error(`${event.route.id} is not prerenderable`);
69
+ else return new Response(void 0, { status: 204 });
70
+ }
71
+ try {
72
+ const response = await with_request_store({
73
+ event,
74
+ state: event_state
75
+ }, () => handler(event));
76
+ if (!(response instanceof Response)) throw new Error(`Invalid response from route ${event.url.pathname}: handler should return a Response object`);
77
+ if (state.prerendering && (!state.prerendering.inside_reroute || prerender)) {
78
+ const cloned = new Response(response.clone().body, {
79
+ status: response.status,
80
+ statusText: response.statusText,
81
+ headers: new Headers(response.headers)
82
+ });
83
+ cloned.headers.set("x-sveltekit-prerender", String(prerender));
84
+ if (state.prerendering.inside_reroute && prerender) {
85
+ cloned.headers.set("x-sveltekit-routeid", encodeURI(event.route.id));
86
+ state.prerendering.dependencies.set(event.url.pathname, {
87
+ response: cloned,
88
+ body: null
89
+ });
90
+ } else return cloned;
91
+ }
92
+ return response;
93
+ } catch (e) {
94
+ if (e instanceof Redirect) return new Response(void 0, {
95
+ status: e.status,
96
+ headers: { location: e.location }
97
+ });
98
+ throw e;
99
+ }
100
+ }
101
+ /**
102
+ * @param {import('@sveltejs/kit').RequestEvent} event
103
+ */
104
+ function is_endpoint_request(event) {
105
+ const { method, headers } = event.request;
106
+ if (ENDPOINT_METHODS.includes(method) && !PAGE_METHODS.includes(method)) return true;
107
+ if (method === "POST" && headers.get("x-sveltekit-action") === "true") return false;
108
+ const accept = event.request.headers.get("accept") ?? "*/*";
109
+ return negotiate(accept, ["*", "text/html"]) !== "text/html";
110
+ }
111
+ //#endregion
112
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/runtime/telemetry/record_span.js
113
+ /** @import { RecordSpan } from 'types' */
114
+ /** @type {RecordSpan} */
115
+ async function record_span({ name, attributes, fn }) {
116
+ return fn(noop_span);
117
+ }
118
+ //#endregion
119
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/runtime/server/page/actions.js
120
+ /** @import { RequestEvent, ActionResult, Actions } from '@sveltejs/kit' */
121
+ /** @import { SSROptions, SSRNode, ServerNode, ServerHooks } from 'types' */
122
+ /** @param {RequestEvent} event */
123
+ function is_action_json_request(event) {
124
+ return negotiate(event.request.headers.get("accept") ?? "*/*", ["application/json", "text/html"]) === "application/json" && event.request.method === "POST";
125
+ }
126
+ /**
127
+ * @param {RequestEvent} event
128
+ * @param {import('types').RequestState} event_state
129
+ * @param {SSROptions} options
130
+ * @param {SSRNode['server'] | undefined} server
131
+ */
132
+ async function handle_action_json_request(event, event_state, options, server) {
133
+ const actions = server?.actions;
134
+ if (!actions) {
135
+ const no_actions_error = new SvelteKitError(405, "Method Not Allowed", `POST method not allowed. No form actions exist for this page`);
136
+ return action_json({
137
+ type: "error",
138
+ error: await handle_error_and_jsonify(event, event_state, options, no_actions_error)
139
+ }, {
140
+ status: no_actions_error.status,
141
+ headers: { allow: "GET" }
142
+ });
143
+ }
144
+ check_named_default_separate(actions);
145
+ try {
146
+ const data = await call_action(event, event_state, actions);
147
+ if (data instanceof ActionFailure) return action_json({
148
+ type: "failure",
149
+ status: data.status,
150
+ data: stringify_action_response(data.data, event.route.id, options.hooks.transport)
151
+ });
152
+ else return action_json({
153
+ type: "success",
154
+ status: data ? 200 : 204,
155
+ data: stringify_action_response(data, event.route.id, options.hooks.transport)
156
+ });
157
+ } catch (e) {
158
+ const err = normalize_error(e);
159
+ if (err instanceof Redirect) return action_json_redirect(err);
160
+ return action_json({
161
+ type: "error",
162
+ error: await handle_error_and_jsonify(event, event_state, options, check_incorrect_fail_use(err))
163
+ }, { status: get_status(err) });
164
+ }
165
+ }
166
+ /**
167
+ * @param {HttpError | Error} error
168
+ */
169
+ function check_incorrect_fail_use(error) {
170
+ return error instanceof ActionFailure ? /* @__PURE__ */ new Error("Cannot \"throw fail()\". Use \"return fail()\"") : error;
171
+ }
172
+ /**
173
+ * @param {Redirect} redirect
174
+ */
175
+ function action_json_redirect(redirect) {
176
+ return action_json({
177
+ type: "redirect",
178
+ status: redirect.status,
179
+ location: redirect.location
180
+ });
181
+ }
182
+ /**
183
+ * @param {ActionResult} data
184
+ * @param {ResponseInit} [init]
185
+ */
186
+ function action_json(data, init) {
187
+ return json(data, init);
188
+ }
189
+ /**
190
+ * @param {RequestEvent} event
191
+ */
192
+ function is_action_request(event) {
193
+ return event.request.method === "POST";
194
+ }
195
+ /**
196
+ * @param {RequestEvent} event
197
+ * @param {import('types').RequestState} event_state
198
+ * @param {SSRNode['server'] | undefined} server
199
+ * @returns {Promise<ActionResult>}
200
+ */
201
+ async function handle_action_request(event, event_state, server) {
202
+ const actions = server?.actions;
203
+ if (!actions) {
204
+ event.setHeaders({ allow: "GET" });
205
+ return {
206
+ type: "error",
207
+ error: new SvelteKitError(405, "Method Not Allowed", `POST method not allowed. No form actions exist for this page`)
208
+ };
209
+ }
210
+ check_named_default_separate(actions);
211
+ try {
212
+ const data = await call_action(event, event_state, actions);
213
+ if (data instanceof ActionFailure) return {
214
+ type: "failure",
215
+ status: data.status,
216
+ data: data.data
217
+ };
218
+ else return {
219
+ type: "success",
220
+ status: 200,
221
+ data
222
+ };
223
+ } catch (e) {
224
+ const err = normalize_error(e);
225
+ if (err instanceof Redirect) return {
226
+ type: "redirect",
227
+ status: err.status,
228
+ location: err.location
229
+ };
230
+ return {
231
+ type: "error",
232
+ error: check_incorrect_fail_use(err)
233
+ };
234
+ }
235
+ }
236
+ /**
237
+ * @param {Actions} actions
238
+ */
239
+ function check_named_default_separate(actions) {
240
+ if (actions.default && Object.keys(actions).length > 1) throw new Error("When using named actions, the default action cannot be used. See the docs for more info: https://svelte.dev/docs/kit/form-actions#named-actions");
241
+ }
242
+ /**
243
+ * @param {RequestEvent} event
244
+ * @param {import('types').RequestState} event_state
245
+ * @param {NonNullable<ServerNode['actions']>} actions
246
+ * @throws {Redirect | HttpError | SvelteKitError | Error}
247
+ */
248
+ async function call_action(event, event_state, actions) {
249
+ const url = new URL(event.request.url);
250
+ let name = "default";
251
+ for (const param of url.searchParams) if (param[0].startsWith("/")) {
252
+ name = param[0].slice(1);
253
+ if (name === "default") throw new Error("Cannot use reserved action name \"default\"");
254
+ break;
255
+ }
256
+ const action = actions[name];
257
+ if (!action) throw new SvelteKitError(404, "Not Found", `No action with name '${name}' found`);
258
+ if (!is_form_content_type(event.request)) throw new SvelteKitError(415, "Unsupported Media Type", `Form actions expect form-encoded data — received ${event.request.headers.get("content-type")}`);
259
+ return record_span({
260
+ name: "sveltekit.form_action",
261
+ attributes: {
262
+ "http.route": event.route.id || "unknown"
263
+ },
264
+ fn: async (current) => {
265
+ const traced_event = merge_tracing(event, current);
266
+ const result = await with_request_store({
267
+ event: traced_event,
268
+ state: event_state
269
+ }, () => action(traced_event));
270
+ if (result instanceof ActionFailure) current.setAttributes({
271
+ "sveltekit.form_action.result.type": "failure",
272
+ "sveltekit.form_action.result.status": result.status
273
+ });
274
+ return result;
275
+ }
276
+ });
277
+ }
278
+ /**
279
+ * Try to `devalue.uneval` the data object, and if it fails, return a proper Error with context
280
+ * @param {any} data
281
+ * @param {string} route_id
282
+ * @param {ServerHooks['transport']} transport
283
+ */
284
+ function uneval_action_response(data, route_id, transport) {
285
+ const replacer = create_replacer(transport);
286
+ return try_serialize(data, (value) => uneval(value, replacer), route_id);
287
+ }
288
+ /**
289
+ * Try to `devalue.stringify` the data object, and if it fails, return a proper Error with context
290
+ * @param {any} data
291
+ * @param {string} route_id
292
+ * @param {ServerHooks['transport']} transport
293
+ */
294
+ function stringify_action_response(data, route_id, transport) {
295
+ const encoders = Object.fromEntries(Object.entries(transport).map(([key, value]) => [key, value.encode]));
296
+ return try_serialize(data, (value) => stringify$1(value, encoders), route_id);
297
+ }
298
+ /**
299
+ * @param {any} data
300
+ * @param {(data: any) => string} fn
301
+ * @param {string} route_id
302
+ */
303
+ function try_serialize(data, fn, route_id) {
304
+ try {
305
+ return fn(data);
306
+ } catch (e) {
307
+ const error = e;
308
+ if (data instanceof Response) throw new Error(`Data returned from action inside ${route_id} is not serializable. Form actions need to return plain objects or fail(). E.g. return { success: true } or return fail(400, { message: "invalid" });`, { cause: e });
309
+ if ("path" in error) {
310
+ let message = `Data returned from action inside ${route_id} is not serializable: ${error.message}`;
311
+ if (error.path !== "") message += ` (data.${error.path})`;
312
+ throw new Error(message, { cause: e });
313
+ }
314
+ throw error;
315
+ }
316
+ }
317
+ //#endregion
318
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/utils/streaming.js
319
+ /**
320
+ * Create an async iterator and a function to push values into it
321
+ * @template T
322
+ * @returns {{
323
+ * iterate: (transform?: (input: T) => T) => AsyncIterable<T>;
324
+ * add: (promise: Promise<T>) => void;
325
+ * }}
326
+ */
327
+ function create_async_iterator() {
328
+ let resolved = -1;
329
+ let returned = -1;
330
+ /** @type {import('./promise.js').PromiseWithResolvers<T>[]} */
331
+ const deferred = [];
332
+ return {
333
+ iterate: (transform = (x) => x) => {
334
+ return { [Symbol.asyncIterator]() {
335
+ return { next: async () => {
336
+ const next = deferred[++returned];
337
+ if (!next) return {
338
+ value: null,
339
+ done: true
340
+ };
341
+ return {
342
+ value: transform(await next.promise),
343
+ done: false
344
+ };
345
+ } };
346
+ } };
347
+ },
348
+ add: (promise) => {
349
+ /** @type {import('./promise.js').PromiseWithResolvers<T>} */
350
+ const next = with_resolvers();
351
+ next.promise.catch(noop);
352
+ deferred.push(next);
353
+ promise.then((value) => {
354
+ deferred[++resolved].resolve(value);
355
+ }, (error) => {
356
+ deferred[++resolved].reject(error);
357
+ });
358
+ }
359
+ };
360
+ }
361
+ //#endregion
362
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/runtime/server/page/data_serializer.js
363
+ /**
364
+ * If the serialized data contains promises, `chunks` will be an
365
+ * async iterable containing their resolutions
366
+ * @param {import('@sveltejs/kit').RequestEvent} event
367
+ * @param {import('types').RequestState} event_state
368
+ * @param {import('types').SSROptions} options
369
+ * @returns {import('./types.js').ServerDataSerializer}
370
+ */
371
+ function server_data_serializer(event, event_state, options) {
372
+ let promise_id = 1;
373
+ let max_nodes = -1;
374
+ const iterator = create_async_iterator();
375
+ const global = get_global_name(options);
376
+ /** @param {number} index */
377
+ function get_replacer(index) {
378
+ /** @param {any} thing */
379
+ return function replacer(thing) {
380
+ if (typeof thing?.then === "function") {
381
+ const id = promise_id++;
382
+ const promise = thing.then(
383
+ /** @param {any} data */
384
+ (data) => ({ data })
385
+ ).catch(
386
+ /** @param {any} error */
387
+ async (error) => ({ error: await handle_error_and_jsonify(event, event_state, options, error) })
388
+ ).then(
389
+ /**
390
+ * @param {{data: any; error: any}} result
391
+ */
392
+ async ({ data, error }) => {
393
+ let str;
394
+ try {
395
+ str = uneval(error ? [, error] : [data], replacer);
396
+ } catch {
397
+ error = await handle_error_and_jsonify(event, event_state, options, /* @__PURE__ */ new Error(`Failed to serialize promise while rendering ${event.route.id}`));
398
+ str = uneval([, error], replacer);
399
+ }
400
+ return {
401
+ index,
402
+ str: `${global}.resolve(${id}, ${str.includes("app.decode") ? `(app) => ${str}` : `() => ${str}`})`
403
+ };
404
+ }
405
+ );
406
+ iterator.add(promise);
407
+ return `${global}.defer(${id})`;
408
+ } else for (const key in options.hooks.transport) {
409
+ const encoded = options.hooks.transport[key].encode(thing);
410
+ if (encoded) return `app.decode('${key}', ${uneval(encoded, replacer)})`;
411
+ }
412
+ };
413
+ }
414
+ const strings = [];
415
+ return {
416
+ set_max_nodes(i) {
417
+ max_nodes = i;
418
+ },
419
+ add_node(i, node) {
420
+ try {
421
+ if (!node) {
422
+ strings[i] = "null";
423
+ return;
424
+ }
425
+ /** @type {any} */
426
+ const payload = {
427
+ type: "data",
428
+ data: node.data,
429
+ uses: serialize_uses(node)
430
+ };
431
+ if (node.slash) payload.slash = node.slash;
432
+ strings[i] = uneval(payload, get_replacer(i));
433
+ } catch (e) {
434
+ e.path = e.path.slice(1);
435
+ throw new Error(clarify_devalue_error(event, e), { cause: e });
436
+ }
437
+ },
438
+ get_data(csp) {
439
+ const open = `<script${csp.script_needs_nonce ? ` nonce="${csp.nonce}"` : ""}>`;
440
+ const close = `<\/script>\n`;
441
+ return {
442
+ data: `[${compact(max_nodes > -1 ? strings.slice(0, max_nodes) : strings).join(",")}]`,
443
+ chunks: promise_id > 1 ? iterator.iterate(({ index, str }) => {
444
+ if (max_nodes > -1 && index >= max_nodes) return "";
445
+ return open + str + close;
446
+ }) : null
447
+ };
448
+ }
449
+ };
450
+ }
451
+ /**
452
+ * If the serialized data contains promises, `chunks` will be an
453
+ * async iterable containing their resolutions
454
+ * @param {import('@sveltejs/kit').RequestEvent} event
455
+ * @param {import('types').RequestState} event_state
456
+ * @param {import('types').SSROptions} options
457
+ * @returns {import('./types.js').ServerDataSerializerJson}
458
+ */
459
+ function server_data_serializer_json(event, event_state, options) {
460
+ let promise_id = 1;
461
+ const iterator = create_async_iterator();
462
+ const reducers = {
463
+ ...Object.fromEntries(Object.entries(options.hooks.transport).map(([key, value]) => [key, value.encode])),
464
+ /** @param {any} thing */
465
+ Promise: (thing) => {
466
+ if (typeof thing?.then !== "function") return;
467
+ const id = promise_id++;
468
+ /** @type {'data' | 'error'} */
469
+ let key = "data";
470
+ const promise = thing.catch(
471
+ /** @param {any} e */
472
+ async (e) => {
473
+ key = "error";
474
+ return handle_error_and_jsonify(event, event_state, options, e);
475
+ }
476
+ ).then(
477
+ /** @param {any} value */
478
+ async (value) => {
479
+ let str;
480
+ try {
481
+ str = stringify$1(value, reducers);
482
+ } catch {
483
+ const error = await handle_error_and_jsonify(event, event_state, options, /* @__PURE__ */ new Error(`Failed to serialize promise while rendering ${event.route.id}`));
484
+ key = "error";
485
+ str = stringify$1(error, reducers);
486
+ }
487
+ return `{"type":"chunk","id":${id},"${key}":${str}}\n`;
488
+ }
489
+ );
490
+ iterator.add(promise);
491
+ return id;
492
+ }
493
+ };
494
+ const strings = [];
495
+ return {
496
+ add_node(i, node) {
497
+ try {
498
+ if (!node) {
499
+ strings[i] = "null";
500
+ return;
501
+ }
502
+ if (node.type === "error" || node.type === "skip") {
503
+ strings[i] = JSON.stringify(node);
504
+ return;
505
+ }
506
+ strings[i] = `{"type":"data","data":${stringify$1(node.data, reducers)},"uses":${JSON.stringify(serialize_uses(node))}${node.slash ? `,"slash":${JSON.stringify(node.slash)}` : ""}}`;
507
+ } catch (e) {
508
+ e.path = "data" + e.path;
509
+ throw new Error(clarify_devalue_error(event, e), { cause: e });
510
+ }
511
+ },
512
+ get_data() {
513
+ return {
514
+ data: `{"type":"data","nodes":[${strings.join(",")}]}\n`,
515
+ chunks: promise_id > 1 ? iterator.iterate() : null
516
+ };
517
+ }
518
+ };
519
+ }
520
+ //#endregion
521
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/runtime/server/page/load_data.js
522
+ /**
523
+ * Calls the user's server `load` function.
524
+ * @param {{
525
+ * event: import('@sveltejs/kit').RequestEvent;
526
+ * event_state: import('types').RequestState;
527
+ * state: import('types').SSRState;
528
+ * node: import('types').SSRNode | undefined;
529
+ * parent: () => Promise<Record<string, any>>;
530
+ * }} opts
531
+ * @returns {Promise<import('types').ServerDataNode | null>}
532
+ */
533
+ async function load_server_data({ event, event_state, state, node, parent }) {
534
+ if (!node?.server) return null;
535
+ let is_tracking = true;
536
+ const uses = {
537
+ dependencies: /* @__PURE__ */ new Set(),
538
+ params: /* @__PURE__ */ new Set(),
539
+ parent: false,
540
+ route: false,
541
+ url: false,
542
+ search_params: /* @__PURE__ */ new Set()
543
+ };
544
+ const load = node.server.load;
545
+ const slash = node.server.trailingSlash;
546
+ if (!load) return {
547
+ type: "data",
548
+ data: null,
549
+ uses,
550
+ slash
551
+ };
552
+ const url = make_trackable(event.url, () => {
553
+ if (is_tracking) uses.url = true;
554
+ }, (param) => {
555
+ if (is_tracking) uses.search_params.add(param);
556
+ });
557
+ if (state.prerendering) disable_search(url);
558
+ return {
559
+ type: "data",
560
+ data: await record_span({
561
+ name: "sveltekit.load",
562
+ attributes: {
563
+ "sveltekit.load.node_id": node.server_id || "unknown",
564
+ "sveltekit.load.node_type": get_node_type(node.server_id),
565
+ "http.route": event.route.id || "unknown"
566
+ },
567
+ fn: async (current) => {
568
+ const traced_event = merge_tracing(event, current);
569
+ return await with_request_store({
570
+ event: traced_event,
571
+ state: event_state
572
+ }, () => load.call(null, {
573
+ ...traced_event,
574
+ fetch: (info, init) => {
575
+ new URL(info instanceof Request ? info.url : info, event.url);
576
+ return event.fetch(info, init);
577
+ },
578
+ /** @param {string[]} deps */
579
+ depends: (...deps) => {
580
+ for (const dep of deps) {
581
+ const { href } = new URL(dep, event.url);
582
+ uses.dependencies.add(href);
583
+ }
584
+ },
585
+ params: new Proxy(event.params, { get: (target, key) => {
586
+ if (is_tracking) uses.params.add(key);
587
+ return target[key];
588
+ } }),
589
+ parent: async () => {
590
+ if (is_tracking) uses.parent = true;
591
+ return parent();
592
+ },
593
+ route: new Proxy(event.route, { get: (target, key) => {
594
+ if (is_tracking) uses.route = true;
595
+ return target[key];
596
+ } }),
597
+ url,
598
+ untrack(fn) {
599
+ is_tracking = false;
600
+ try {
601
+ return fn();
602
+ } finally {
603
+ is_tracking = true;
604
+ }
605
+ }
606
+ }));
607
+ }
608
+ }) ?? null,
609
+ uses,
610
+ slash
611
+ };
612
+ }
613
+ /**
614
+ * Calls the user's `load` function.
615
+ * @param {{
616
+ * event: import('@sveltejs/kit').RequestEvent;
617
+ * event_state: import('types').RequestState;
618
+ * fetched: import('./types.js').Fetched[];
619
+ * node: import('types').SSRNode | undefined;
620
+ * parent: () => Promise<Record<string, any>>;
621
+ * resolve_opts: import('types').RequiredResolveOptions;
622
+ * server_data_promise: Promise<import('types').ServerDataNode | null>;
623
+ * state: import('types').SSRState;
624
+ * csr: boolean;
625
+ * }} opts
626
+ * @returns {Promise<Record<string, any | Promise<any>> | null>}
627
+ */
628
+ async function load_data({ event, event_state, fetched, node, parent, server_data_promise, state, resolve_opts, csr }) {
629
+ const server_data_node = await server_data_promise;
630
+ const load = node?.universal?.load;
631
+ if (!load) return server_data_node?.data ?? null;
632
+ return await record_span({
633
+ name: "sveltekit.load",
634
+ attributes: {
635
+ "sveltekit.load.node_id": node.universal_id || "unknown",
636
+ "sveltekit.load.node_type": get_node_type(node.universal_id),
637
+ "http.route": event.route.id || "unknown"
638
+ },
639
+ fn: async (current) => {
640
+ const traced_event = merge_tracing(event, current);
641
+ const child_state = {
642
+ ...event_state,
643
+ is_in_universal_load: true
644
+ };
645
+ return await with_request_store({
646
+ event: traced_event,
647
+ state: child_state
648
+ }, () => load.call(null, {
649
+ url: event.url,
650
+ params: event.params,
651
+ data: server_data_node?.data ?? null,
652
+ route: event.route,
653
+ fetch: create_universal_fetch(event, state, fetched, csr, resolve_opts),
654
+ setHeaders: event.setHeaders,
655
+ depends: noop,
656
+ parent,
657
+ untrack: (fn) => fn(),
658
+ tracing: traced_event.tracing
659
+ }));
660
+ }
661
+ }) ?? null;
662
+ }
663
+ /**
664
+ * @param {Pick<import('@sveltejs/kit').RequestEvent, 'fetch' | 'url' | 'request' | 'route'>} event
665
+ * @param {import('types').SSRState} state
666
+ * @param {import('./types.js').Fetched[]} fetched
667
+ * @param {boolean} csr
668
+ * @param {Pick<Required<import('@sveltejs/kit').ResolveOptions>, 'filterSerializedResponseHeaders'>} resolve_opts
669
+ * @returns {typeof fetch}
670
+ */
671
+ function create_universal_fetch(event, state, fetched, csr, resolve_opts) {
672
+ /**
673
+ * @param {URL | RequestInfo} input
674
+ * @param {RequestInit} [init]
675
+ */
676
+ const universal_fetch = async (input, init) => {
677
+ const cloned_body = input instanceof Request && input.body ? input.clone().body : null;
678
+ const cloned_headers = input instanceof Request && [...input.headers].length ? new Headers(input.headers) : init?.headers;
679
+ let response = await event.fetch(input, init);
680
+ const url = new URL(input instanceof Request ? input.url : input, event.url);
681
+ const same_origin = url.origin === event.url.origin;
682
+ /** @type {import('types').PrerenderDependency} */
683
+ let dependency;
684
+ if (same_origin) {
685
+ if (state.prerendering) {
686
+ dependency = {
687
+ response,
688
+ body: null
689
+ };
690
+ state.prerendering.dependencies.set(url.pathname, dependency);
691
+ }
692
+ } else if (url.protocol === "https:" || url.protocol === "http:") {
693
+ if ((input instanceof Request ? input.mode : init?.mode ?? "cors") === "no-cors") response = new Response("", {
694
+ status: response.status,
695
+ statusText: response.statusText,
696
+ headers: response.headers
697
+ });
698
+ else {
699
+ const acao = response.headers.get("access-control-allow-origin");
700
+ if (!acao || acao !== event.url.origin && acao !== "*") throw new Error(`CORS error: ${acao ? "Incorrect" : "No"} 'Access-Control-Allow-Origin' header is present on the requested resource`);
701
+ }
702
+ }
703
+ /** @type {ReadableStream<Uint8Array>} */
704
+ let teed_body;
705
+ const proxy = new Proxy(response, { get(response, key, receiver) {
706
+ /**
707
+ * @param {string | undefined} body
708
+ * @param {boolean} is_b64
709
+ */
710
+ async function push_fetched(body, is_b64) {
711
+ const status_number = Number(response.status);
712
+ if (isNaN(status_number)) throw new Error(`response.status is not a number. value: "${response.status}" type: ${typeof response.status}`);
713
+ fetched.push({
714
+ url: same_origin ? url.href.slice(event.url.origin.length) : url.href,
715
+ method: event.request.method,
716
+ request_body: input instanceof Request && cloned_body ? await stream_to_string(cloned_body) : init?.body,
717
+ request_headers: cloned_headers,
718
+ response_body: body,
719
+ response,
720
+ is_b64
721
+ });
722
+ }
723
+ if (key === "body") {
724
+ if (response.body === null) return null;
725
+ if (teed_body) return teed_body;
726
+ const [a, b] = response.body.tee();
727
+ (async () => {
728
+ let result = /* @__PURE__ */ new Uint8Array();
729
+ for await (const chunk of a) {
730
+ const combined = new Uint8Array(result.length + chunk.length);
731
+ combined.set(result, 0);
732
+ combined.set(chunk, result.length);
733
+ result = combined;
734
+ }
735
+ if (dependency) dependency.body = new Uint8Array(result);
736
+ push_fetched(base64_encode(result), true);
737
+ })().catch(noop);
738
+ return teed_body = b;
739
+ }
740
+ if (key === "arrayBuffer") return async () => {
741
+ const buffer = await response.arrayBuffer();
742
+ const bytes = new Uint8Array(buffer);
743
+ if (dependency) dependency.body = bytes;
744
+ if (buffer instanceof ArrayBuffer) await push_fetched(base64_encode(bytes), true);
745
+ return buffer;
746
+ };
747
+ async function text() {
748
+ const body = await response.text();
749
+ if (body === "" && NULL_BODY_STATUS.includes(response.status)) {
750
+ await push_fetched(void 0, false);
751
+ return;
752
+ }
753
+ if (!body || typeof body === "string") await push_fetched(body, false);
754
+ if (dependency) dependency.body = body;
755
+ return body;
756
+ }
757
+ if (key === "text") return text;
758
+ if (key === "json") return async () => {
759
+ const body = await text();
760
+ return body ? JSON.parse(body) : void 0;
761
+ };
762
+ const value = Reflect.get(response, key, response);
763
+ if (value instanceof Function) return Object.defineProperties(
764
+ /**
765
+ * @this {any}
766
+ */
767
+ function() {
768
+ return Reflect.apply(value, this === receiver ? response : this, arguments);
769
+ },
770
+ {
771
+ name: { value: value.name },
772
+ length: { value: value.length }
773
+ }
774
+ );
775
+ return value;
776
+ } });
777
+ if (csr) {
778
+ const get = response.headers.get;
779
+ response.headers.get = (key) => {
780
+ const lower = key.toLowerCase();
781
+ const value = get.call(response.headers, lower);
782
+ if (value && !lower.startsWith("x-sveltekit-")) {
783
+ if (!resolve_opts.filterSerializedResponseHeaders(lower, value)) throw new Error(`Failed to get response header "${lower}" — it must be included by the \`filterSerializedResponseHeaders\` option: https://svelte.dev/docs/kit/hooks#handle (at ${event.route.id})`);
784
+ }
785
+ return value;
786
+ };
787
+ }
788
+ return proxy;
789
+ };
790
+ return (input, init) => {
791
+ const response = universal_fetch(input, init);
792
+ response.catch(noop);
793
+ return response;
794
+ };
795
+ }
796
+ /**
797
+ * @param {ReadableStream<Uint8Array>} stream
798
+ */
799
+ async function stream_to_string(stream) {
800
+ let result = "";
801
+ const reader = stream.getReader();
802
+ const decoder = new TextDecoder();
803
+ while (true) {
804
+ const { done, value } = await reader.read();
805
+ if (done) {
806
+ result += decoder.decode();
807
+ break;
808
+ }
809
+ result += decoder.decode(value, { stream: true });
810
+ }
811
+ return result;
812
+ }
813
+ //#endregion
814
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/runtime/server/page/serialize_data.js
815
+ /**
816
+ * Inside a script element, only `<\/script` and `<!--` hold special meaning to the HTML parser.
817
+ *
818
+ * The first closes the script element, so everything after is treated as raw HTML.
819
+ * The second disables further parsing until `-->`, so the script element might be unexpectedly
820
+ * kept open up until an unrelated HTML comment in the page.
821
+ *
822
+ * U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR are escaped for the sake of pre-2018
823
+ * browsers.
824
+ *
825
+ * @see tests for unsafe parsing examples.
826
+ * @see https://html.spec.whatwg.org/multipage/scripting.html#restrictions-for-contents-of-script-elements
827
+ * @see https://html.spec.whatwg.org/multipage/syntax.html#cdata-rcdata-restrictions
828
+ * @see https://html.spec.whatwg.org/multipage/parsing.html#script-data-state
829
+ * @see https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escaped-state
830
+ * @see https://github.com/tc39/proposal-json-superset
831
+ * @type {Record<string, string>}
832
+ */
833
+ var replacements = {
834
+ "<": "\\u003C",
835
+ "\u2028": "\\u2028",
836
+ "\u2029": "\\u2029"
837
+ };
838
+ var pattern = new RegExp(`[${Object.keys(replacements).join("")}]`, "g");
839
+ /**
840
+ * Generates a raw HTML string containing a safe script element carrying data and associated attributes.
841
+ *
842
+ * It escapes all the special characters needed to guarantee the element is unbroken, but care must
843
+ * be taken to ensure it is inserted in the document at an acceptable position for a script element,
844
+ * and that the resulting string isn't further modified.
845
+ *
846
+ * @param {import('./types.js').Fetched} fetched
847
+ * @param {(name: string, value: string) => boolean} filter
848
+ * @param {boolean} [prerendering]
849
+ * @returns {string} The raw HTML of a script element carrying the JSON payload.
850
+ * @example const html = serialize_data('/data.json', null, { foo: 'bar' });
851
+ */
852
+ function serialize_data(fetched, filter, prerendering = false) {
853
+ /** @type {Record<string, string>} */
854
+ const headers = {};
855
+ let cache_control = null;
856
+ let age = null;
857
+ let varyAny = false;
858
+ for (const [key, value] of fetched.response.headers) {
859
+ if (filter(key, value)) headers[key] = value;
860
+ if (key === "cache-control") cache_control = value;
861
+ else if (key === "age") age = value;
862
+ else if (key === "vary" && value.trim() === "*") varyAny = true;
863
+ }
864
+ const payload = {
865
+ status: fetched.response.status,
866
+ statusText: fetched.response.statusText,
867
+ headers,
868
+ body: fetched.response_body
869
+ };
870
+ const safe_payload = JSON.stringify(payload).replace(pattern, (match) => replacements[match]);
871
+ const attrs = [
872
+ "type=\"application/json\"",
873
+ "data-sveltekit-fetched",
874
+ `data-url="${escape_html(fetched.url, true)}"`
875
+ ];
876
+ if (fetched.is_b64) attrs.push("data-b64");
877
+ if (fetched.request_headers || fetched.request_body) {
878
+ /** @type {import('types').StrictBody[]} */
879
+ const values = [];
880
+ if (fetched.request_headers) values.push([...new Headers(fetched.request_headers)].join(","));
881
+ if (fetched.request_body) values.push(fetched.request_body);
882
+ attrs.push(`data-hash="${hash(...values)}"`);
883
+ }
884
+ if (!prerendering && fetched.method === "GET" && cache_control && !varyAny) {
885
+ const match = /s-maxage=(\d+)/g.exec(cache_control) ?? /max-age=(\d+)/g.exec(cache_control);
886
+ if (match) {
887
+ const ttl = +match[1] - +(age ?? "0");
888
+ attrs.push(`data-ttl="${ttl}"`);
889
+ }
890
+ }
891
+ return `<script ${attrs.join(" ")}>${safe_payload}<\/script>`;
892
+ }
893
+ //#endregion
894
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/runtime/server/page/crypto.js
895
+ /**
896
+ * SHA-256 hashing function adapted from https://bitwiseshiftleft.github.io/sjcl
897
+ * modified and redistributed under BSD license
898
+ * @param {string} data
899
+ */
900
+ function sha256(data) {
901
+ if (!key[0]) precompute();
902
+ const out = init.slice(0);
903
+ const array = encode(data);
904
+ for (let i = 0; i < array.length; i += 16) {
905
+ const w = array.subarray(i, i + 16);
906
+ let tmp;
907
+ let a;
908
+ let b;
909
+ let out0 = out[0];
910
+ let out1 = out[1];
911
+ let out2 = out[2];
912
+ let out3 = out[3];
913
+ let out4 = out[4];
914
+ let out5 = out[5];
915
+ let out6 = out[6];
916
+ let out7 = out[7];
917
+ for (let i = 0; i < 64; i++) {
918
+ if (i < 16) tmp = w[i];
919
+ else {
920
+ a = w[i + 1 & 15];
921
+ b = w[i + 14 & 15];
922
+ tmp = w[i & 15] = (a >>> 7 ^ a >>> 18 ^ a >>> 3 ^ a << 25 ^ a << 14) + (b >>> 17 ^ b >>> 19 ^ b >>> 10 ^ b << 15 ^ b << 13) + w[i & 15] + w[i + 9 & 15] | 0;
923
+ }
924
+ tmp = tmp + out7 + (out4 >>> 6 ^ out4 >>> 11 ^ out4 >>> 25 ^ out4 << 26 ^ out4 << 21 ^ out4 << 7) + (out6 ^ out4 & (out5 ^ out6)) + key[i];
925
+ out7 = out6;
926
+ out6 = out5;
927
+ out5 = out4;
928
+ out4 = out3 + tmp | 0;
929
+ out3 = out2;
930
+ out2 = out1;
931
+ out1 = out0;
932
+ out0 = tmp + (out1 & out2 ^ out3 & (out1 ^ out2)) + (out1 >>> 2 ^ out1 >>> 13 ^ out1 >>> 22 ^ out1 << 30 ^ out1 << 19 ^ out1 << 10) | 0;
933
+ }
934
+ out[0] = out[0] + out0 | 0;
935
+ out[1] = out[1] + out1 | 0;
936
+ out[2] = out[2] + out2 | 0;
937
+ out[3] = out[3] + out3 | 0;
938
+ out[4] = out[4] + out4 | 0;
939
+ out[5] = out[5] + out5 | 0;
940
+ out[6] = out[6] + out6 | 0;
941
+ out[7] = out[7] + out7 | 0;
942
+ }
943
+ const bytes = new Uint8Array(out.buffer);
944
+ reverse_endianness(bytes);
945
+ return btoa(String.fromCharCode(...bytes));
946
+ }
947
+ /** The SHA-256 initialization vector */
948
+ var init = /* @__PURE__ */ new Uint32Array(8);
949
+ /** The SHA-256 hash key */
950
+ var key = /* @__PURE__ */ new Uint32Array(64);
951
+ /** Function to precompute init and key. */
952
+ function precompute() {
953
+ /** @param {number} x */
954
+ function frac(x) {
955
+ return (x - Math.floor(x)) * 4294967296;
956
+ }
957
+ let prime = 2;
958
+ for (let i = 0; i < 64; prime++) {
959
+ let is_prime = true;
960
+ for (let factor = 2; factor * factor <= prime; factor++) if (prime % factor === 0) {
961
+ is_prime = false;
962
+ break;
963
+ }
964
+ if (is_prime) {
965
+ if (i < 8) init[i] = frac(prime ** (1 / 2));
966
+ key[i] = frac(prime ** (1 / 3));
967
+ i++;
968
+ }
969
+ }
970
+ }
971
+ /** @param {Uint8Array} bytes */
972
+ function reverse_endianness(bytes) {
973
+ for (let i = 0; i < bytes.length; i += 4) {
974
+ const a = bytes[i + 0];
975
+ const b = bytes[i + 1];
976
+ const c = bytes[i + 2];
977
+ const d = bytes[i + 3];
978
+ bytes[i + 0] = d;
979
+ bytes[i + 1] = c;
980
+ bytes[i + 2] = b;
981
+ bytes[i + 3] = a;
982
+ }
983
+ }
984
+ /** @param {string} str */
985
+ function encode(str) {
986
+ const encoded = text_encoder.encode(str);
987
+ const length = encoded.length * 8;
988
+ const size = 512 * Math.ceil((length + 65) / 512);
989
+ const bytes = new Uint8Array(size / 8);
990
+ bytes.set(encoded);
991
+ bytes[encoded.length] = 128;
992
+ reverse_endianness(bytes);
993
+ const words = new Uint32Array(bytes.buffer);
994
+ words[words.length - 2] = Math.floor(length / 4294967296);
995
+ words[words.length - 1] = length;
996
+ return words;
997
+ }
998
+ //#endregion
999
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/runtime/server/page/csp.js
1000
+ var array = /* @__PURE__ */ new Uint8Array(16);
1001
+ function generate_nonce() {
1002
+ crypto.getRandomValues(array);
1003
+ return btoa(String.fromCharCode(...array));
1004
+ }
1005
+ var quoted = /* @__PURE__ */ new Set([
1006
+ "self",
1007
+ "unsafe-eval",
1008
+ "unsafe-hashes",
1009
+ "unsafe-inline",
1010
+ "none",
1011
+ "strict-dynamic",
1012
+ "report-sample",
1013
+ "wasm-unsafe-eval",
1014
+ "script"
1015
+ ]);
1016
+ var crypto_pattern = /^(nonce|sha\d\d\d)-/;
1017
+ var BaseProvider = class {
1018
+ /** @type {boolean} */
1019
+ #use_hashes;
1020
+ /** @type {boolean} */
1021
+ #script_needs_csp;
1022
+ /** @type {boolean} */
1023
+ #script_src_needs_csp;
1024
+ /** @type {boolean} */
1025
+ #script_src_elem_needs_csp;
1026
+ /** @type {boolean} */
1027
+ #style_needs_csp;
1028
+ /** @type {boolean} */
1029
+ #style_src_needs_csp;
1030
+ /** @type {boolean} */
1031
+ #style_src_attr_needs_csp;
1032
+ /** @type {boolean} */
1033
+ #style_src_elem_needs_csp;
1034
+ /** @type {import('types').CspDirectives} */
1035
+ #directives;
1036
+ /** @type {Set<import('types').Csp.Source>} */
1037
+ #script_src;
1038
+ /** @type {Set<import('types').Csp.Source>} */
1039
+ #script_src_elem;
1040
+ /** @type {Set<import('types').Csp.Source>} */
1041
+ #style_src;
1042
+ /** @type {Set<import('types').Csp.Source>} */
1043
+ #style_src_attr;
1044
+ /** @type {Set<import('types').Csp.Source>} */
1045
+ #style_src_elem;
1046
+ /** @type {boolean} */
1047
+ script_needs_nonce;
1048
+ /** @type {boolean} */
1049
+ style_needs_nonce;
1050
+ /** @type {boolean} */
1051
+ script_needs_hash;
1052
+ /** @type {string} */
1053
+ #nonce;
1054
+ /**
1055
+ * @param {boolean} use_hashes
1056
+ * @param {import('types').CspDirectives} directives
1057
+ * @param {string} nonce
1058
+ */
1059
+ constructor(use_hashes, directives, nonce) {
1060
+ this.#use_hashes = use_hashes;
1061
+ this.#directives = directives;
1062
+ const d = this.#directives;
1063
+ this.#script_src = /* @__PURE__ */ new Set();
1064
+ this.#script_src_elem = /* @__PURE__ */ new Set();
1065
+ this.#style_src = /* @__PURE__ */ new Set();
1066
+ this.#style_src_attr = /* @__PURE__ */ new Set();
1067
+ this.#style_src_elem = /* @__PURE__ */ new Set();
1068
+ const effective_script_src = d["script-src"] || d["default-src"];
1069
+ const script_src_elem = d["script-src-elem"];
1070
+ const effective_style_src = d["style-src"] || d["default-src"];
1071
+ const style_src_attr = d["style-src-attr"];
1072
+ const style_src_elem = d["style-src-elem"];
1073
+ /** @param {(import('types').Csp.Source | import('types').Csp.ActionSource)[] | undefined} directive */
1074
+ const style_needs_csp = (directive) => !!directive && !directive.some((value) => value === "unsafe-inline");
1075
+ /** @param {(import('types').Csp.Source | import('types').Csp.ActionSource)[] | undefined} directive */
1076
+ const script_needs_csp = (directive) => !!directive && (!directive.some((value) => value === "unsafe-inline") || directive.some((value) => value === "strict-dynamic"));
1077
+ this.#script_src_needs_csp = script_needs_csp(effective_script_src);
1078
+ this.#script_src_elem_needs_csp = script_needs_csp(script_src_elem);
1079
+ this.#style_src_needs_csp = style_needs_csp(effective_style_src);
1080
+ this.#style_src_attr_needs_csp = style_needs_csp(style_src_attr);
1081
+ this.#style_src_elem_needs_csp = style_needs_csp(style_src_elem);
1082
+ this.#script_needs_csp = this.#script_src_needs_csp || this.#script_src_elem_needs_csp;
1083
+ this.#style_needs_csp = this.#style_src_needs_csp || this.#style_src_attr_needs_csp || this.#style_src_elem_needs_csp;
1084
+ this.script_needs_nonce = this.#script_needs_csp && !this.#use_hashes;
1085
+ this.style_needs_nonce = this.#style_needs_csp && !this.#use_hashes;
1086
+ this.script_needs_hash = this.#script_needs_csp && this.#use_hashes;
1087
+ this.#nonce = nonce;
1088
+ }
1089
+ /** @param {string} content */
1090
+ add_script(content) {
1091
+ if (!this.#script_needs_csp) return;
1092
+ /** @type {`nonce-${string}` | `sha256-${string}`} */
1093
+ const source = this.#use_hashes ? `sha256-${sha256(content)}` : `nonce-${this.#nonce}`;
1094
+ if (this.#script_src_needs_csp) this.#script_src.add(source);
1095
+ if (this.#script_src_elem_needs_csp) this.#script_src_elem.add(source);
1096
+ }
1097
+ /** @param {`sha256-${string}`[]} hashes */
1098
+ add_script_hashes(hashes) {
1099
+ for (const hash of hashes) {
1100
+ if (this.#script_src_needs_csp) this.#script_src.add(hash);
1101
+ if (this.#script_src_elem_needs_csp) this.#script_src_elem.add(hash);
1102
+ }
1103
+ }
1104
+ /** @param {string} content */
1105
+ add_style(content) {
1106
+ if (!this.#style_needs_csp) return;
1107
+ /** @type {`nonce-${string}` | `sha256-${string}`} */
1108
+ const source = this.#use_hashes ? `sha256-${sha256(content)}` : `nonce-${this.#nonce}`;
1109
+ if (this.#style_src_needs_csp) this.#style_src.add(source);
1110
+ if (this.#style_src_attr_needs_csp) this.#style_src_attr.add(source);
1111
+ if (this.#style_src_elem_needs_csp) {
1112
+ const sha256_empty_comment_hash = "sha256-9OlNO0DNEeaVzHL4RZwCLsBHA8WBQ8toBp/4F5XV2nc=";
1113
+ const d = this.#directives;
1114
+ if (d["style-src-elem"] && !d["style-src-elem"].includes(sha256_empty_comment_hash) && !this.#style_src_elem.has(sha256_empty_comment_hash)) this.#style_src_elem.add(sha256_empty_comment_hash);
1115
+ if (source !== sha256_empty_comment_hash) this.#style_src_elem.add(source);
1116
+ }
1117
+ }
1118
+ /**
1119
+ * @param {boolean} [is_meta]
1120
+ */
1121
+ get_header(is_meta = false) {
1122
+ const header = [];
1123
+ const directives = { ...this.#directives };
1124
+ if (this.#style_src.size > 0) directives["style-src"] = [...directives["style-src"] || directives["default-src"] || [], ...this.#style_src];
1125
+ if (this.#style_src_attr.size > 0) directives["style-src-attr"] = [...directives["style-src-attr"] || [], ...this.#style_src_attr];
1126
+ if (this.#style_src_elem.size > 0) directives["style-src-elem"] = [...directives["style-src-elem"] || [], ...this.#style_src_elem];
1127
+ if (this.#script_src.size > 0) directives["script-src"] = [...directives["script-src"] || directives["default-src"] || [], ...this.#script_src];
1128
+ if (this.#script_src_elem.size > 0) directives["script-src-elem"] = [...directives["script-src-elem"] || [], ...this.#script_src_elem];
1129
+ for (const key in directives) {
1130
+ if (is_meta && (key === "frame-ancestors" || key === "report-uri" || key === "sandbox")) continue;
1131
+ const value = directives[key];
1132
+ if (!value) continue;
1133
+ const directive = [key];
1134
+ if (Array.isArray(value)) value.forEach((value) => {
1135
+ if (quoted.has(value) || crypto_pattern.test(value)) directive.push(`'${value}'`);
1136
+ else directive.push(value);
1137
+ });
1138
+ header.push(directive.join(" "));
1139
+ }
1140
+ return header.join("; ");
1141
+ }
1142
+ };
1143
+ var CspProvider = class extends BaseProvider {
1144
+ get_meta() {
1145
+ const content = this.get_header(true);
1146
+ if (!content) return;
1147
+ return `<meta http-equiv="content-security-policy" content="${escape_html(content, true)}">`;
1148
+ }
1149
+ };
1150
+ var CspReportOnlyProvider = class extends BaseProvider {
1151
+ /**
1152
+ * @param {boolean} use_hashes
1153
+ * @param {import('types').CspDirectives} directives
1154
+ * @param {string} nonce
1155
+ */
1156
+ constructor(use_hashes, directives, nonce) {
1157
+ super(use_hashes, directives, nonce);
1158
+ if (Object.values(directives).filter((v) => !!v).length > 0) {
1159
+ const has_report_to = directives["report-to"]?.length ?? false;
1160
+ const has_report_uri = directives["report-uri"]?.length ?? false;
1161
+ if (!has_report_to && !has_report_uri) throw Error("`content-security-policy-report-only` must be specified with either the `report-to` or `report-uri` directives, or both");
1162
+ }
1163
+ }
1164
+ };
1165
+ var Csp = class {
1166
+ /** @readonly */
1167
+ nonce = generate_nonce();
1168
+ /** @type {CspProvider} */
1169
+ csp_provider;
1170
+ /** @type {CspReportOnlyProvider} */
1171
+ report_only_provider;
1172
+ /**
1173
+ * @param {import('./types.js').CspConfig} config
1174
+ * @param {import('./types.js').CspOpts} opts
1175
+ */
1176
+ constructor({ mode, directives, reportOnly }, { prerender }) {
1177
+ const use_hashes = mode === "hash" || mode === "auto" && prerender;
1178
+ this.csp_provider = new CspProvider(use_hashes, directives, this.nonce);
1179
+ this.report_only_provider = new CspReportOnlyProvider(use_hashes, reportOnly, this.nonce);
1180
+ }
1181
+ get script_needs_hash() {
1182
+ return this.csp_provider.script_needs_hash || this.report_only_provider.script_needs_hash;
1183
+ }
1184
+ get script_needs_nonce() {
1185
+ return this.csp_provider.script_needs_nonce || this.report_only_provider.script_needs_nonce;
1186
+ }
1187
+ get style_needs_nonce() {
1188
+ return this.csp_provider.style_needs_nonce || this.report_only_provider.style_needs_nonce;
1189
+ }
1190
+ /** @param {string} content */
1191
+ add_script(content) {
1192
+ this.csp_provider.add_script(content);
1193
+ this.report_only_provider.add_script(content);
1194
+ }
1195
+ /** @param {`sha256-${string}`[]} hashes */
1196
+ add_script_hashes(hashes) {
1197
+ this.csp_provider.add_script_hashes(hashes);
1198
+ this.report_only_provider.add_script_hashes(hashes);
1199
+ }
1200
+ /** @param {string} content */
1201
+ add_style(content) {
1202
+ this.csp_provider.add_style(content);
1203
+ this.report_only_provider.add_style(content);
1204
+ }
1205
+ };
1206
+ //#endregion
1207
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/runtime/server/page/server_routing.js
1208
+ /** @import { SSRManifest } from '@sveltejs/kit' */
1209
+ /**
1210
+ * @param {import('types').SSRClientRoute} route
1211
+ * @param {URL} url
1212
+ * @param {NonNullable<SSRManifest['_']['client']>} client
1213
+ * @returns {string}
1214
+ */
1215
+ function generate_route_object(route, url, client) {
1216
+ const { errors, layouts, leaf } = route;
1217
+ const nodes = [
1218
+ ...errors,
1219
+ ...layouts.map((l) => l?.[1]),
1220
+ leaf[1]
1221
+ ].filter((n) => typeof n === "number").map((n) => `'${n}': () => ${create_client_import(client.nodes?.[n], url)}`).join(",\n ");
1222
+ /** @type {import('types').CSRRouteServer} */
1223
+ return [
1224
+ `{\n\tid: ${s(route.id)}`,
1225
+ `errors: ${s(route.errors)}`,
1226
+ `layouts: ${s(route.layouts)}`,
1227
+ `leaf: ${s(route.leaf)}`,
1228
+ `nodes: {\n\t\t${nodes}\n\t}\n}`
1229
+ ].join(",\n ");
1230
+ }
1231
+ /**
1232
+ * @param {string | undefined} import_path
1233
+ * @param {URL} url
1234
+ */
1235
+ function create_client_import(import_path, url) {
1236
+ if (!import_path) return "Promise.resolve({})";
1237
+ if (import_path[0] === "/") return `import('${import_path}')`;
1238
+ if (assets !== "") return `import('${assets}/${import_path}')`;
1239
+ let path = get_relative_path(url.pathname, `${base}/${import_path}`);
1240
+ if (path[0] !== ".") path = `./${path}`;
1241
+ return `import('${path}')`;
1242
+ }
1243
+ /**
1244
+ * @param {string} resolved_path
1245
+ * @param {URL} url
1246
+ * @param {SSRManifest} manifest
1247
+ * @returns {Promise<Response>}
1248
+ */
1249
+ async function resolve_route(resolved_path, url, manifest) {
1250
+ if (!manifest._.client?.routes) return text("Server-side route resolution disabled", { status: 400 });
1251
+ const matchers = await manifest._.matchers();
1252
+ const result = find_route(resolved_path, manifest._.client.routes, matchers);
1253
+ return create_server_routing_response(result?.route ?? null, result?.params ?? {}, url, manifest._.client).response;
1254
+ }
1255
+ /**
1256
+ * @param {import('types').SSRClientRoute | null} route
1257
+ * @param {Partial<Record<string, string>>} params
1258
+ * @param {URL} url
1259
+ * @param {NonNullable<SSRManifest['_']['client']>} client
1260
+ * @returns {{response: Response, body: string}}
1261
+ */
1262
+ function create_server_routing_response(route, params, url, client) {
1263
+ const headers = new Headers({ "content-type": "application/javascript; charset=utf-8" });
1264
+ if (route) {
1265
+ const csr_route = generate_route_object(route, url, client);
1266
+ const body = `${create_css_import(route, url, client)}\nexport const route = ${csr_route}; export const params = ${JSON.stringify(params)};`;
1267
+ return {
1268
+ response: text(body, { headers }),
1269
+ body
1270
+ };
1271
+ } else return {
1272
+ response: text("", { headers }),
1273
+ body: ""
1274
+ };
1275
+ }
1276
+ /**
1277
+ * This function generates the client-side import for the CSS files that are
1278
+ * associated with the current route. Vite takes care of that when using
1279
+ * client-side route resolution, but for server-side resolution it does
1280
+ * not know about the CSS files automatically.
1281
+ *
1282
+ * @param {import('types').SSRClientRoute} route
1283
+ * @param {URL} url
1284
+ * @param {NonNullable<SSRManifest['_']['client']>} client
1285
+ * @returns {string}
1286
+ */
1287
+ function create_css_import(route, url, client) {
1288
+ const { errors, layouts, leaf } = route;
1289
+ let css = "";
1290
+ for (const node of [
1291
+ ...errors,
1292
+ ...layouts.map((l) => l?.[1]),
1293
+ leaf[1]
1294
+ ]) {
1295
+ if (typeof node !== "number") continue;
1296
+ const node_css = client.css?.[node];
1297
+ for (const css_path of node_css ?? []) css += `'${assets || base}/${css_path}',`;
1298
+ }
1299
+ if (!css) return "";
1300
+ return `${create_client_import(client.start, url)}.then(x => x.load_css([${css}]));`;
1301
+ }
1302
+ //#endregion
1303
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/runtime/server/remote.js
1304
+ /** @import { ActionResult, RemoteForm, RequestEvent, SSRManifest } from '@sveltejs/kit' */
1305
+ /** @import { RemoteFormInternals, RemoteFunctionData, RemoteFunctionResponse, RemoteInternals, RequestState, SSROptions } from 'types' */
1306
+ /** @type {typeof handle_remote_call_internal} */
1307
+ async function handle_remote_call(event, state, options, manifest, id) {
1308
+ return record_span({
1309
+ name: "sveltekit.remote.call",
1310
+ attributes: { },
1311
+ fn: (current) => {
1312
+ const traced_event = merge_tracing(event, current);
1313
+ return with_request_store({
1314
+ event: traced_event,
1315
+ state
1316
+ }, () => handle_remote_call_internal(traced_event, state, options, manifest, id));
1317
+ }
1318
+ });
1319
+ }
1320
+ /**
1321
+ * @param {RequestEvent} event
1322
+ * @param {RequestState} state
1323
+ * @param {SSROptions} options
1324
+ * @param {SSRManifest} manifest
1325
+ * @param {string} id
1326
+ */
1327
+ async function handle_remote_call_internal(event, state, options, manifest, id) {
1328
+ const [hash, name, additional_args] = id.split("/");
1329
+ const remotes = manifest._.remotes;
1330
+ if (!remotes[hash]) error(404);
1331
+ const fn = (await remotes[hash]()).default[name];
1332
+ if (!fn) error(404);
1333
+ /** @type {RemoteInternals} */
1334
+ const internals = fn.__;
1335
+ const transport = options.hooks.transport;
1336
+ event.tracing.current.setAttributes({
1337
+ "sveltekit.remote.call.type": internals.type,
1338
+ "sveltekit.remote.call.name": internals.name
1339
+ });
1340
+ /** @type {HeadersInit | undefined} */
1341
+ const headers = state.prerendering ? void 0 : { "cache-control": "private, no-store" };
1342
+ try {
1343
+ /** @type {RemoteFunctionData} */
1344
+ const data = {};
1345
+ switch (internals.type) {
1346
+ case "query_live": {
1347
+ if (event.request.method !== "GET") throw new SvelteKitError(405, "Method Not Allowed", `\`query.live\` functions must be invoked via GET request, not ${event.request.method}`);
1348
+ const payload = new URL(event.request.url).searchParams.get("payload");
1349
+ const generator = internals.run(event, state, parse_remote_arg(payload, transport));
1350
+ const encoder = new TextEncoder();
1351
+ /**
1352
+ * @param {ReadableStreamDefaultController} controller
1353
+ * @param {any} payload
1354
+ */
1355
+ function send(controller, payload) {
1356
+ controller.enqueue(encoder.encode("data: " + JSON.stringify(payload) + "\n\n"));
1357
+ }
1358
+ let closed = false;
1359
+ /** @type {string | undefined} */
1360
+ let result = void 0;
1361
+ async function cancel() {
1362
+ if (closed) return;
1363
+ closed = true;
1364
+ await generator.return(void 0);
1365
+ }
1366
+ event.request.signal.addEventListener("abort", cancel, { once: true });
1367
+ return new Response(new ReadableStream({
1368
+ async pull(controller) {
1369
+ if (event.request.signal.aborted) {
1370
+ await cancel();
1371
+ controller.close();
1372
+ return;
1373
+ }
1374
+ try {
1375
+ while (true) {
1376
+ const { value, done } = await generator.next();
1377
+ if (done) {
1378
+ await cancel();
1379
+ controller.close();
1380
+ return;
1381
+ }
1382
+ if (result !== (result = stringify(value, transport))) {
1383
+ send(controller, {
1384
+ type: "result",
1385
+ result
1386
+ });
1387
+ return;
1388
+ }
1389
+ }
1390
+ } catch (error) {
1391
+ if (!event.request.signal.aborted) {
1392
+ if (error instanceof Redirect) send(controller, {
1393
+ type: "redirect",
1394
+ location: error.location
1395
+ });
1396
+ else {
1397
+ const status = error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500;
1398
+ send(controller, {
1399
+ type: "error",
1400
+ error: await handle_error_and_jsonify(event, state, options, error),
1401
+ status
1402
+ });
1403
+ }
1404
+ }
1405
+ await cancel();
1406
+ controller.close();
1407
+ }
1408
+ },
1409
+ cancel
1410
+ }), { headers: {
1411
+ "cache-control": "private, no-store",
1412
+ "content-type": "text/event-stream"
1413
+ } });
1414
+ }
1415
+ case "query_batch": {
1416
+ if (event.request.method !== "POST") throw new SvelteKitError(405, "Method Not Allowed", `\`query.batch\` functions must be invoked via POST request, not ${event.request.method}`);
1417
+ /** @type {{ payloads: string[] }} */
1418
+ const { payloads } = await event.request.json();
1419
+ const args = await Promise.all(payloads.map((payload) => parse_remote_arg(payload, transport)));
1420
+ data._ = await with_request_store({
1421
+ event,
1422
+ state
1423
+ }, () => internals.run(args, options));
1424
+ break;
1425
+ }
1426
+ case "form": {
1427
+ if (event.request.method !== "POST") throw new SvelteKitError(405, "Method Not Allowed", `\`form\` functions must be invoked via POST request, not ${event.request.method}`);
1428
+ if (!is_form_content_type(event.request)) throw new SvelteKitError(415, "Unsupported Media Type", `\`form\` functions expect form-encoded data — received ${event.request.headers.get("content-type")}`);
1429
+ const { data: input, meta, form_data } = await deserialize_binary_form(event.request);
1430
+ state.remote.requested = create_requested_map(meta.remote_refreshes);
1431
+ if (additional_args && !("id" in input)) input.id = JSON.parse(decodeURIComponent(additional_args));
1432
+ const fn = internals.fn;
1433
+ data._ = await with_request_store({
1434
+ event,
1435
+ state: {
1436
+ ...state,
1437
+ is_in_remote_form_or_command: true
1438
+ }
1439
+ }, () => fn(input, meta, form_data));
1440
+ if (data._.issues) return json({
1441
+ type: "result",
1442
+ data: stringify(data, transport)
1443
+ }, { headers });
1444
+ break;
1445
+ }
1446
+ case "command": {
1447
+ /** @type {{ payload: string, refreshes?: string[] }} */
1448
+ const { payload, refreshes } = await event.request.json();
1449
+ state.remote.requested = create_requested_map(refreshes);
1450
+ const arg = parse_remote_arg(payload, transport);
1451
+ data._ = await with_request_store({
1452
+ event,
1453
+ state: {
1454
+ ...state,
1455
+ is_in_remote_form_or_command: true
1456
+ }
1457
+ }, () => fn(arg));
1458
+ break;
1459
+ }
1460
+ case "prerender":
1461
+ data._ = await with_request_store({
1462
+ event,
1463
+ state
1464
+ }, () => fn(parse_remote_arg(additional_args, transport)));
1465
+ break;
1466
+ case "query": {
1467
+ const payload = new URL(event.request.url).searchParams.get("payload");
1468
+ data._ = await with_request_store({
1469
+ event,
1470
+ state
1471
+ }, () => fn(parse_remote_arg(payload, transport)));
1472
+ break;
1473
+ }
1474
+ }
1475
+ await collect_remote_data(data, event, state, options);
1476
+ return json({
1477
+ type: "result",
1478
+ data: stringify(data, transport)
1479
+ }, { headers });
1480
+ } catch (error) {
1481
+ if (error instanceof Redirect) {
1482
+ const data = await collect_remote_data({ redirect: error.location }, event, state, options);
1483
+ return json({
1484
+ type: "result",
1485
+ data: stringify(data, transport)
1486
+ }, { headers });
1487
+ }
1488
+ const status = error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500;
1489
+ return json({
1490
+ type: "error",
1491
+ error: await handle_error_and_jsonify(event, state, options, error),
1492
+ status
1493
+ }, {
1494
+ status: state.prerendering ? status : void 0,
1495
+ headers: { "cache-control": "private, no-store" }
1496
+ });
1497
+ }
1498
+ }
1499
+ /**
1500
+ * Collects all the query/prerender data that was retrieved
1501
+ * during the request and adds it to `data`
1502
+ * @param {RemoteFunctionData} data
1503
+ * @param {RequestEvent} event
1504
+ * @param {RequestState} state
1505
+ * @param {SSROptions} options
1506
+ */
1507
+ async function collect_remote_data(data, event, state, options) {
1508
+ /**
1509
+ *
1510
+ * @param {unknown} error
1511
+ * @returns {Promise<[status: number, error: App.Error]>}
1512
+ */
1513
+ async function convert_error(error) {
1514
+ return [error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500, await handle_error_and_jsonify(event, state, options, error)];
1515
+ }
1516
+ /** @type {Promise<any>[]} */
1517
+ const promises = [];
1518
+ if (state.remote.explicit) for (const [remote_key, { internals, promise }] of state.remote.explicit) {
1519
+ data.r = true;
1520
+ const type = internals.type === "query_live" ? "l" : internals.type[0];
1521
+ await promise.then((v) => {
1522
+ ((data[type] ??= {})[remote_key] ??= {}).v = v;
1523
+ }, async (e) => {
1524
+ if (e instanceof Redirect) return;
1525
+ ((data[type] ??= {})[remote_key] ??= {}).e = await convert_error(e);
1526
+ });
1527
+ }
1528
+ await Promise.all(promises);
1529
+ if (state.remote.implicit) for (const [internals, record] of state.remote.implicit) {
1530
+ if (!internals.id) continue;
1531
+ for (const key in record) {
1532
+ const remote_key = internals.type === "form" ? key : create_remote_key(internals.id, key);
1533
+ const type = internals.type === "query_live" ? "l" : internals.type[0];
1534
+ const promise = state.remote.data?.get(internals)?.[key] ?? record[key]();
1535
+ let resolved = true;
1536
+ await Promise.race([Promise.resolve(promise).then((v) => {
1537
+ if (resolved) ((data[type] ??= {})[remote_key] ??= {}).v = v;
1538
+ }, (e) => {
1539
+ if (e instanceof Redirect) return;
1540
+ if (resolved) promises.push(convert_error(e).then((e) => {
1541
+ ((data[type] ??= {})[remote_key] ??= {}).e = e;
1542
+ }));
1543
+ }), Promise.resolve().then(() => resolved = false)]);
1544
+ }
1545
+ }
1546
+ await Promise.all(promises);
1547
+ return data;
1548
+ }
1549
+ /**
1550
+ * @param {string[] | undefined} refreshes
1551
+ */
1552
+ function create_requested_map(refreshes) {
1553
+ /** @type {Map<string, string[]>} */
1554
+ const requested = /* @__PURE__ */ new Map();
1555
+ for (const key of refreshes ?? []) {
1556
+ const parts = split_remote_key(key);
1557
+ const existing = requested.get(parts.id);
1558
+ if (existing) existing.push(parts.payload);
1559
+ else requested.set(parts.id, [parts.payload]);
1560
+ }
1561
+ return requested;
1562
+ }
1563
+ /** @type {typeof handle_remote_form_post_internal} */
1564
+ async function handle_remote_form_post(event, state, manifest, id) {
1565
+ return record_span({
1566
+ name: "sveltekit.remote.form.post",
1567
+ attributes: { },
1568
+ fn: (current) => {
1569
+ const traced_event = merge_tracing(event, current);
1570
+ return with_request_store({
1571
+ event: traced_event,
1572
+ state
1573
+ }, () => handle_remote_form_post_internal(traced_event, state, manifest, id));
1574
+ }
1575
+ });
1576
+ }
1577
+ /**
1578
+ * @param {RequestEvent} event
1579
+ * @param {RequestState} state
1580
+ * @param {SSRManifest} manifest
1581
+ * @param {string} id
1582
+ * @returns {Promise<ActionResult>}
1583
+ */
1584
+ async function handle_remote_form_post_internal(event, state, manifest, id) {
1585
+ const [hash, name, ...rest] = id.split("/");
1586
+ const action_id = rest.join("/");
1587
+ let form = (await manifest._.remotes[hash]?.())?.default[name];
1588
+ if (!form) {
1589
+ event.setHeaders({ allow: "GET" });
1590
+ return {
1591
+ type: "error",
1592
+ error: new SvelteKitError(405, "Method Not Allowed", `POST method not allowed. No form actions exist for this page`)
1593
+ };
1594
+ }
1595
+ if (action_id) form = with_request_store({
1596
+ event,
1597
+ state
1598
+ }, () => form.for(JSON.parse(action_id)));
1599
+ try {
1600
+ const fn = form.__.fn;
1601
+ const { data, meta, form_data } = await deserialize_binary_form(event.request);
1602
+ if (action_id && !("id" in data)) data.id = JSON.parse(decodeURIComponent(action_id));
1603
+ await with_request_store({
1604
+ event,
1605
+ state: {
1606
+ ...state,
1607
+ is_in_remote_form_or_command: true
1608
+ }
1609
+ }, () => fn(data, meta, form_data));
1610
+ return {
1611
+ type: "success",
1612
+ status: 200
1613
+ };
1614
+ } catch (e) {
1615
+ const err = normalize_error(e);
1616
+ if (err instanceof Redirect) return {
1617
+ type: "redirect",
1618
+ status: err.status,
1619
+ location: err.location
1620
+ };
1621
+ return {
1622
+ type: "error",
1623
+ error: check_incorrect_fail_use(err)
1624
+ };
1625
+ }
1626
+ }
1627
+ /**
1628
+ * @param {URL} url
1629
+ */
1630
+ function get_remote_id(url) {
1631
+ return url.pathname.startsWith(`${base}/_app/remote/`) && url.pathname.replace(`${base}/_app/remote/`, "");
1632
+ }
1633
+ /**
1634
+ * @param {URL} url
1635
+ */
1636
+ function get_remote_action(url) {
1637
+ return url.searchParams.get("/remote");
1638
+ }
1639
+ //#endregion
1640
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/runtime/server/page/render.js
1641
+ var updated = {
1642
+ ...readable(false),
1643
+ check: () => false
1644
+ };
1645
+ /**
1646
+ * Creates the HTML response.
1647
+ * @param {{
1648
+ * branch: Array<import('./types.js').Loaded>;
1649
+ * fetched: Array<import('./types.js').Fetched>;
1650
+ * options: import('types').SSROptions;
1651
+ * manifest: import('@sveltejs/kit').SSRManifest;
1652
+ * state: import('types').SSRState;
1653
+ * page_config: { ssr: boolean; csr: boolean };
1654
+ * status: number;
1655
+ * error: App.Error | null;
1656
+ * event: import('@sveltejs/kit').RequestEvent;
1657
+ * event_state: import('types').RequestState;
1658
+ * resolve_opts: import('types').RequiredResolveOptions;
1659
+ * action_result?: import('@sveltejs/kit').ActionResult;
1660
+ * data_serializer: import('./types.js').ServerDataSerializer;
1661
+ * error_components?: Array<import('types').SSRComponent | undefined>
1662
+ * }} opts
1663
+ */
1664
+ async function render_response({ branch, fetched, options, manifest, state, page_config, status, error = null, event, event_state, resolve_opts, action_result, data_serializer, error_components }) {
1665
+ if (state.prerendering) {
1666
+ if (options.csp.mode === "nonce") throw new Error("Cannot use prerendering if config.kit.csp.mode === \"nonce\"");
1667
+ if (options.app_template_contains_nonce) throw new Error("Cannot use prerendering if page template contains %sveltekit.nonce%");
1668
+ }
1669
+ const { client } = manifest._;
1670
+ const modulepreloads = new Set(client?.imports);
1671
+ const stylesheets = new Set(client?.stylesheets);
1672
+ const fonts = new Set(client?.fonts);
1673
+ /**
1674
+ * The value of the Link header that is added to the response when not prerendering
1675
+ * @type {Set<string>}
1676
+ */
1677
+ const link_headers = /* @__PURE__ */ new Set();
1678
+ /** @type {Map<string, string>} */
1679
+ const inline_styles = /* @__PURE__ */ new Map();
1680
+ /** @type {ReturnType<typeof options.root.render>} */
1681
+ let rendered;
1682
+ const form_value = action_result?.type === "success" || action_result?.type === "failure" ? action_result.data ?? null : null;
1683
+ /** @type {string} */
1684
+ let base$1 = base;
1685
+ /** @type {string} */
1686
+ let assets$1 = assets;
1687
+ /**
1688
+ * An expression that will evaluate in the client to determine the resolved base path.
1689
+ * We use a relative path when possible to support IPFS, the internet archive, etc.
1690
+ */
1691
+ let base_expression = s(base);
1692
+ const csp = new Csp(options.csp, { prerender: !!state.prerendering });
1693
+ if (!state.prerendering?.fallback) {
1694
+ base$1 = (event.isDataRequest ? add_data_suffix(event.url.pathname) : event.url.pathname).slice(base.length).split("/").slice(2).map(() => "..").join("/") || ".";
1695
+ base_expression = `new URL(${s(base$1)}, location).pathname.slice(0, -1)`;
1696
+ if (!assets || assets[0] === "/" && assets !== "/_svelte_kit_assets") assets$1 = base$1;
1697
+ } else if (options.hash_routing) base_expression = "new URL('.', location).pathname.slice(0, -1)";
1698
+ if (page_config.ssr) {
1699
+ /** @type {Record<string, any>} */
1700
+ const props = {
1701
+ stores: {
1702
+ page: writable(null),
1703
+ navigating: writable(null),
1704
+ updated
1705
+ },
1706
+ constructors: await Promise.all(branch.map(({ node }) => {
1707
+ if (!node.component) throw new Error(`Missing +page.svelte component for route ${event.route.id}`);
1708
+ return node.component();
1709
+ })),
1710
+ form: form_value
1711
+ };
1712
+ if (error_components) {
1713
+ if (error) props.error = error;
1714
+ props.errors = error_components;
1715
+ }
1716
+ let data = {};
1717
+ for (let i = 0; i < branch.length; i += 1) {
1718
+ data = {
1719
+ ...data,
1720
+ ...branch[i].data
1721
+ };
1722
+ props[`data_${i}`] = data;
1723
+ }
1724
+ props.page = {
1725
+ error,
1726
+ params: event.params,
1727
+ route: event.route,
1728
+ status,
1729
+ url: event.url,
1730
+ data,
1731
+ form: form_value,
1732
+ state: {}
1733
+ };
1734
+ const render_opts = {
1735
+ context: /* @__PURE__ */ new Map([["__request__", { page: props.page }]]),
1736
+ csp: csp.script_needs_nonce ? { nonce: csp.nonce } : { hash: csp.script_needs_hash },
1737
+ transformError: error_components ? async (e) => {
1738
+ if (isRedirect(e)) throw e;
1739
+ const transformed = await handle_error_and_jsonify(event, event_state, options, e);
1740
+ props.page.error = props.error = error = transformed;
1741
+ props.page.status = status = get_status(e);
1742
+ return transformed;
1743
+ } : void 0
1744
+ };
1745
+ try {
1746
+ const state = {
1747
+ ...event_state,
1748
+ is_in_render: true
1749
+ };
1750
+ rendered = await with_request_store({
1751
+ event,
1752
+ state
1753
+ }, async () => {
1754
+ override({
1755
+ base: base$1,
1756
+ assets: assets$1
1757
+ });
1758
+ const maybe_promise = options.root.render(props, render_opts);
1759
+ const rendered = options.async && "then" in maybe_promise ? maybe_promise.then((r) => r) : maybe_promise;
1760
+ if (options.async) reset();
1761
+ const { head, html, css, hashes } = options.async ? await rendered : rendered;
1762
+ if (hashes) csp.add_script_hashes(hashes.script);
1763
+ return {
1764
+ head,
1765
+ html,
1766
+ css,
1767
+ hashes
1768
+ };
1769
+ });
1770
+ } finally {
1771
+ reset();
1772
+ }
1773
+ } else rendered = {
1774
+ head: "",
1775
+ html: "",
1776
+ css: {
1777
+ code: "",
1778
+ map: null
1779
+ },
1780
+ hashes: { script: [] }
1781
+ };
1782
+ for (const { node } of branch) {
1783
+ for (const url of node.imports) modulepreloads.add(url);
1784
+ for (const url of node.stylesheets) stylesheets.add(url);
1785
+ for (const url of node.fonts) fonts.add(url);
1786
+ if (node.inline_styles && !client?.inline) Object.entries(await node.inline_styles()).forEach(([filename, css]) => {
1787
+ if (typeof css === "string") {
1788
+ inline_styles.set(filename, css);
1789
+ return;
1790
+ }
1791
+ inline_styles.set(filename, css(`${assets$1}/${app_dir}/immutable/assets`, assets$1));
1792
+ });
1793
+ }
1794
+ const head = new Head(rendered.head, !!state.prerendering);
1795
+ let body = rendered.html;
1796
+ /** @param {string} path */
1797
+ const prefixed = (path) => {
1798
+ if (path.startsWith("/")) return base + path;
1799
+ return `${assets$1}/${path}`;
1800
+ };
1801
+ const style = client?.inline ? client.inline?.style : Array.from(inline_styles.values()).join("\n");
1802
+ if (style) {
1803
+ const attributes = [];
1804
+ if (csp.style_needs_nonce) attributes.push(`nonce="${csp.nonce}"`);
1805
+ csp.add_style(style);
1806
+ head.add_style(style, attributes);
1807
+ }
1808
+ for (const dep of stylesheets) {
1809
+ const path = prefixed(dep);
1810
+ const attributes = ["rel=\"stylesheet\""];
1811
+ if (inline_styles.has(dep)) attributes.push("disabled", "media=\"(max-width: 0)\"");
1812
+ else if (resolve_opts.preload({
1813
+ type: "css",
1814
+ path
1815
+ })) link_headers.add(`<${encodeURI(path)}>; rel="preload"; as="style"; nopush`);
1816
+ head.add_stylesheet(path, attributes);
1817
+ }
1818
+ for (const dep of fonts) {
1819
+ const path = prefixed(dep);
1820
+ if (resolve_opts.preload({
1821
+ type: "font",
1822
+ path
1823
+ })) {
1824
+ const ext = dep.slice(dep.lastIndexOf(".") + 1);
1825
+ head.add_link_tag(path, [
1826
+ "rel=\"preload\"",
1827
+ "as=\"font\"",
1828
+ `type="font/${ext}"`,
1829
+ "crossorigin"
1830
+ ]);
1831
+ link_headers.add(`<${encodeURI(path)}>; rel="preload"; as="font"; type="font/${ext}"; crossorigin; nopush`);
1832
+ }
1833
+ }
1834
+ const global = get_global_name(options);
1835
+ const { data, chunks } = data_serializer.get_data(csp);
1836
+ if (page_config.ssr && page_config.csr) body += `\n\t\t\t${fetched.map((item) => serialize_data(item, resolve_opts.filterSerializedResponseHeaders, !!state.prerendering)).join("\n ")}`;
1837
+ if (page_config.csr && client) {
1838
+ const route = client.routes?.find((r) => r.id === event.route.id) ?? null;
1839
+ const load_env_eagerly = client.uses_env_dynamic_public && !!state.prerendering;
1840
+ if (load_env_eagerly) modulepreloads.add(`${app_dir}/env.js`);
1841
+ if (!client.inline) {
1842
+ const included_modulepreloads = Array.from(modulepreloads, (dep) => prefixed(dep)).filter((path) => resolve_opts.preload({
1843
+ type: "js",
1844
+ path
1845
+ }));
1846
+ for (const path of included_modulepreloads) {
1847
+ link_headers.add(`<${encodeURI(path)}>; rel="modulepreload"; nopush`);
1848
+ if (options.preload_strategy !== "modulepreload") head.add_script_preload(path);
1849
+ else head.add_link_tag(path, ["rel=\"modulepreload\""]);
1850
+ }
1851
+ }
1852
+ if (client.routes && state.prerendering && !state.prerendering.fallback) {
1853
+ const pathname = add_resolution_suffix(event.url.pathname);
1854
+ state.prerendering.dependencies.set(pathname, create_server_routing_response(route, event.params, new URL(pathname, event.url), client));
1855
+ }
1856
+ const blocks = [];
1857
+ const properties = [`base: ${base_expression}`];
1858
+ if (assets) properties.push(`assets: ${s(assets)}`);
1859
+ if (client.uses_env_dynamic_public) properties.push(`env: ${load_env_eagerly ? "null" : s(public_env)}`);
1860
+ if (chunks) {
1861
+ blocks.push("const deferred = new Map();");
1862
+ properties.push(`defer: (id) => new Promise((fulfil, reject) => {
1863
+ deferred.set(id, { fulfil, reject });
1864
+ })`);
1865
+ let app_declaration = "";
1866
+ if (Object.keys(options.hooks.transport).length > 0) {
1867
+ if (client.inline) app_declaration = `const app = ${global}.app.app;`;
1868
+ else if (client.app) app_declaration = `const app = await import(${s(prefixed(client.app))});`;
1869
+ else app_declaration = `const { app } = await import(${s(prefixed(client.start))});`;
1870
+ }
1871
+ const prelude = app_declaration ? `${app_declaration}
1872
+ const [data, error] = fn(app);` : `const [data, error] = fn();`;
1873
+ properties.push(`resolve: async (id, fn) => {
1874
+ ${prelude}
1875
+
1876
+ const try_to_resolve = () => {
1877
+ if (!deferred.has(id)) {
1878
+ setTimeout(try_to_resolve, 0);
1879
+ return;
1880
+ }
1881
+ const { fulfil, reject } = deferred.get(id);
1882
+ deferred.delete(id);
1883
+ if (error) reject(error);
1884
+ else fulfil(data);
1885
+ }
1886
+ try_to_resolve();
1887
+ }`);
1888
+ }
1889
+ blocks.push(`${global} = {
1890
+ ${properties.join(",\n ")}
1891
+ };`);
1892
+ const args = ["element"];
1893
+ blocks.push("const element = document.currentScript.parentElement;");
1894
+ if (page_config.ssr) {
1895
+ const serialized = {
1896
+ form: "null",
1897
+ error: "null"
1898
+ };
1899
+ if (form_value) serialized.form = uneval_action_response(form_value, event.route.id, options.hooks.transport);
1900
+ if (error) serialized.error = uneval(error);
1901
+ const hydrate = [
1902
+ `node_ids: [${branch.map(({ node }) => node.index).join(", ")}]`,
1903
+ `data: ${data}`,
1904
+ `form: ${serialized.form}`,
1905
+ `error: ${serialized.error}`
1906
+ ];
1907
+ if (status !== 200) hydrate.push(`status: ${status}`);
1908
+ if (client.routes) {
1909
+ if (route) {
1910
+ const stringified = generate_route_object(route, event.url, client).replaceAll("\n", "\n ");
1911
+ hydrate.push(`params: ${uneval(event.params)}`, `server_route: ${stringified}`);
1912
+ }
1913
+ } else if (options.embedded) hydrate.push(`params: ${uneval(event.params)}`, `route: ${s(event.route)}`);
1914
+ const indent = " ".repeat(load_env_eagerly ? 7 : 6);
1915
+ args.push(`{\n${indent}\t${hydrate.join(`,\n${indent}\t`)}\n${indent}}`);
1916
+ }
1917
+ const remote_data = await collect_remote_data({}, event, event_state, options);
1918
+ const serialized_data = Object.keys(remote_data).length > 0 ? `${global}.data = ${uneval(remote_data, create_replacer(options.hooks.transport))};\n\n\t\t\t\t\t\t` : "";
1919
+ const boot = client.inline ? `${client.inline.script}
1920
+
1921
+ ${serialized_data}${global}.app.start(${args.join(", ")});` : client.app ? `Promise.all([
1922
+ import(${s(prefixed(client.start))}),
1923
+ import(${s(prefixed(client.app))})
1924
+ ]).then(([kit, app]) => {
1925
+ ${serialized_data}kit.start(app, ${args.join(", ")});
1926
+ });` : `import(${s(prefixed(client.start))}).then((app) => {
1927
+ ${serialized_data}app.start(${args.join(", ")})
1928
+ });`;
1929
+ if (load_env_eagerly) blocks.push(`import(${s(`${base$1}/${app_dir}/env.js`)}).then(({ env }) => {
1930
+ ${global}.env = env;
1931
+
1932
+ ${boot.replace(/\n/g, "\n ")}
1933
+ });`);
1934
+ else blocks.push(boot);
1935
+ if (options.service_worker) {
1936
+ let opts = "";
1937
+ if (options.service_worker_options != null) opts = `, ${s({ ...options.service_worker_options })}`;
1938
+ blocks.push(`if ('serviceWorker' in navigator) {
1939
+ const script_url = '${prefixed("service-worker.js")}';
1940
+ const policy = globalThis?.window?.trustedTypes?.createPolicy(
1941
+ 'sveltekit-trusted-url',
1942
+ { createScriptURL(url) { return url; } }
1943
+ );
1944
+ const sanitised = policy?.createScriptURL(script_url) ?? script_url;
1945
+ addEventListener('load', function () {
1946
+ navigator.serviceWorker.register(sanitised${opts});
1947
+ });
1948
+ }`);
1949
+ }
1950
+ const init_app = `
1951
+ {
1952
+ ${blocks.join("\n\n ")}
1953
+ }
1954
+ `;
1955
+ csp.add_script(init_app);
1956
+ body += `\n\t\t\t<script${csp.script_needs_nonce ? ` nonce="${csp.nonce}"` : ""}>${init_app}<\/script>\n\t\t`;
1957
+ }
1958
+ const headers = new Headers({
1959
+ "x-sveltekit-page": "true",
1960
+ "content-type": "text/html"
1961
+ });
1962
+ if (state.prerendering) {
1963
+ const csp_headers = csp.csp_provider.get_meta();
1964
+ if (csp_headers) head.add_http_equiv(csp_headers);
1965
+ if (state.prerendering.cache) head.add_http_equiv(`<meta http-equiv="cache-control" content="${state.prerendering.cache}">`);
1966
+ } else {
1967
+ const csp_header = csp.csp_provider.get_header();
1968
+ if (csp_header) headers.set("content-security-policy", csp_header);
1969
+ const report_only_header = csp.report_only_provider.get_header();
1970
+ if (report_only_header) headers.set("content-security-policy-report-only", report_only_header);
1971
+ if (link_headers.size) headers.set("link", Array.from(link_headers).join(", "));
1972
+ }
1973
+ const html = options.templates.app({
1974
+ head: head.build(),
1975
+ body,
1976
+ assets: assets$1,
1977
+ nonce: csp.nonce,
1978
+ env: public_env
1979
+ });
1980
+ const transformed = await resolve_opts.transformPageChunk({
1981
+ html,
1982
+ done: true
1983
+ }) || "";
1984
+ if (!chunks) headers.set("etag", `"${hash(transformed)}"`);
1985
+ return !chunks ? text(transformed, {
1986
+ status,
1987
+ headers
1988
+ }) : new Response(new ReadableStream({
1989
+ async start(controller) {
1990
+ controller.enqueue(text_encoder.encode(transformed + "\n"));
1991
+ for await (const chunk of chunks) if (chunk.length) controller.enqueue(text_encoder.encode(chunk));
1992
+ controller.close();
1993
+ },
1994
+ type: "bytes"
1995
+ }), { headers });
1996
+ }
1997
+ var Head = class {
1998
+ #rendered;
1999
+ #prerendering;
2000
+ /** @type {string[]} */
2001
+ #http_equiv = [];
2002
+ /** @type {string[]} */
2003
+ #link_tags = [];
2004
+ /** @type {string[]} */
2005
+ #script_preloads = [];
2006
+ /** @type {string[]} */
2007
+ #style_tags = [];
2008
+ /** @type {string[]} */
2009
+ #stylesheet_links = [];
2010
+ /**
2011
+ * @param {string} rendered
2012
+ * @param {boolean} prerendering
2013
+ */
2014
+ constructor(rendered, prerendering) {
2015
+ this.#rendered = rendered;
2016
+ this.#prerendering = prerendering;
2017
+ }
2018
+ build() {
2019
+ return [
2020
+ ...this.#http_equiv,
2021
+ ...this.#link_tags,
2022
+ ...this.#script_preloads,
2023
+ this.#rendered,
2024
+ ...this.#style_tags,
2025
+ ...this.#stylesheet_links
2026
+ ].join("\n ");
2027
+ }
2028
+ /**
2029
+ * @param {string} style
2030
+ * @param {string[]} attributes
2031
+ */
2032
+ add_style(style, attributes) {
2033
+ this.#style_tags.push(`<style${attributes.length ? " " + attributes.join(" ") : ""}>${style}</style>`);
2034
+ }
2035
+ /**
2036
+ * @param {string} href
2037
+ * @param {string[]} attributes
2038
+ */
2039
+ add_stylesheet(href, attributes) {
2040
+ this.#stylesheet_links.push(`<link href="${href}" ${attributes.join(" ")}>`);
2041
+ }
2042
+ /** @param {string} href */
2043
+ add_script_preload(href) {
2044
+ this.#script_preloads.push(`<link rel="preload" as="script" crossorigin="anonymous" href="${href}">`);
2045
+ }
2046
+ /**
2047
+ * @param {string} href
2048
+ * @param {string[]} attributes
2049
+ */
2050
+ add_link_tag(href, attributes) {
2051
+ if (!this.#prerendering) return;
2052
+ this.#link_tags.push(`<link href="${href}" ${attributes.join(" ")}>`);
2053
+ }
2054
+ /** @param {string} tag */
2055
+ add_http_equiv(tag) {
2056
+ if (!this.#prerendering) return;
2057
+ this.#http_equiv.push(tag);
2058
+ }
2059
+ };
2060
+ //#endregion
2061
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/utils/page_nodes.js
2062
+ var PageNodes = class {
2063
+ /** All layout nodes and the page node, if any */
2064
+ data;
2065
+ /**
2066
+ * @param {Array<import('types').SSRNode | undefined>} nodes
2067
+ */
2068
+ constructor(nodes) {
2069
+ this.data = nodes;
2070
+ }
2071
+ layouts() {
2072
+ return this.data.slice(0, -1);
2073
+ }
2074
+ page() {
2075
+ return this.data.at(-1);
2076
+ }
2077
+ validate() {
2078
+ for (const layout of this.layouts()) if (layout) {
2079
+ validate_layout_server_exports(layout.server, layout.server_id);
2080
+ validate_layout_exports(layout.universal, layout.universal_id);
2081
+ }
2082
+ const page = this.page();
2083
+ if (page) {
2084
+ validate_page_server_exports(page.server, page.server_id);
2085
+ validate_page_exports(page.universal, page.universal_id);
2086
+ }
2087
+ }
2088
+ /**
2089
+ * @template {'prerender' | 'ssr' | 'csr' | 'trailingSlash'} Option
2090
+ * @param {Option} option
2091
+ * @returns {Value | undefined}
2092
+ */
2093
+ #get_option(option) {
2094
+ /** @typedef {(import('types').UniversalNode | import('types').ServerNode)[Option]} Value */
2095
+ return this.data.reduce((value, node) => {
2096
+ return node?.universal?.[option] ?? node?.server?.[option] ?? value;
2097
+ }, void 0);
2098
+ }
2099
+ csr() {
2100
+ return this.#get_option("csr") ?? true;
2101
+ }
2102
+ ssr() {
2103
+ return this.#get_option("ssr") ?? true;
2104
+ }
2105
+ prerender() {
2106
+ return this.#get_option("prerender") ?? false;
2107
+ }
2108
+ trailing_slash() {
2109
+ return this.#get_option("trailingSlash") ?? "never";
2110
+ }
2111
+ get_config() {
2112
+ /** @type {any} */
2113
+ let current = {};
2114
+ for (const node of this.data) {
2115
+ if (!node?.universal?.config && !node?.server?.config) continue;
2116
+ current = {
2117
+ ...current,
2118
+ ...node?.universal?.config,
2119
+ ...node?.server?.config
2120
+ };
2121
+ }
2122
+ return Object.keys(current).length ? current : void 0;
2123
+ }
2124
+ should_prerender_data() {
2125
+ return this.data.some((node) => node?.server?.load || node?.server?.trailingSlash !== void 0);
2126
+ }
2127
+ };
2128
+ //#endregion
2129
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/runtime/server/page/respond_with_error.js
2130
+ /**
2131
+ * @typedef {import('./types.js').Loaded} Loaded
2132
+ */
2133
+ /**
2134
+ * @param {{
2135
+ * event: import('@sveltejs/kit').RequestEvent;
2136
+ * event_state: import('types').RequestState;
2137
+ * options: import('types').SSROptions;
2138
+ * manifest: import('@sveltejs/kit').SSRManifest;
2139
+ * state: import('types').SSRState;
2140
+ * status: number;
2141
+ * error: unknown;
2142
+ * resolve_opts: import('types').RequiredResolveOptions;
2143
+ * }} opts
2144
+ */
2145
+ async function respond_with_error({ event, event_state, options, manifest, state, status, error, resolve_opts }) {
2146
+ if (event.request.headers.get("x-sveltekit-error")) return static_error_page(
2147
+ options,
2148
+ status,
2149
+ /** @type {Error} */
2150
+ error.message
2151
+ );
2152
+ /** @type {import('./types.js').Fetched[]} */
2153
+ const fetched = [];
2154
+ try {
2155
+ const branch = [];
2156
+ const default_layout = await manifest._.nodes[0]();
2157
+ const nodes = new PageNodes([default_layout]);
2158
+ const ssr = nodes.ssr();
2159
+ const csr = nodes.csr();
2160
+ const data_serializer = server_data_serializer(event, event_state, options);
2161
+ if (ssr) {
2162
+ state.error = true;
2163
+ const server_data_promise = load_server_data({
2164
+ event,
2165
+ event_state,
2166
+ state,
2167
+ node: default_layout,
2168
+ parent: async () => ({})
2169
+ });
2170
+ const server_data = await server_data_promise;
2171
+ data_serializer.add_node(0, server_data);
2172
+ const data = await load_data({
2173
+ event,
2174
+ event_state,
2175
+ fetched,
2176
+ node: default_layout,
2177
+ parent: async () => ({}),
2178
+ resolve_opts,
2179
+ server_data_promise,
2180
+ state,
2181
+ csr
2182
+ });
2183
+ branch.push({
2184
+ node: default_layout,
2185
+ server_data,
2186
+ data
2187
+ }, {
2188
+ node: await manifest._.nodes[1](),
2189
+ data: null,
2190
+ server_data: null
2191
+ });
2192
+ }
2193
+ return await render_response({
2194
+ options,
2195
+ manifest,
2196
+ state,
2197
+ page_config: {
2198
+ ssr,
2199
+ csr
2200
+ },
2201
+ status,
2202
+ error: await handle_error_and_jsonify(event, event_state, options, error),
2203
+ branch,
2204
+ error_components: [],
2205
+ fetched,
2206
+ event,
2207
+ event_state,
2208
+ resolve_opts,
2209
+ data_serializer
2210
+ });
2211
+ } catch (e) {
2212
+ if (e instanceof Redirect) return redirect_response(e.status, e.location);
2213
+ return static_error_page(options, get_status(e), (await handle_error_and_jsonify(event, event_state, options, e)).message);
2214
+ }
2215
+ }
2216
+ //#endregion
2217
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/runtime/server/page/index.js
2218
+ /** @import { ActionResult, RequestEvent, SSRManifest } from '@sveltejs/kit' */
2219
+ /** @import { PageNodeIndexes, RequestState, RequiredResolveOptions, ServerDataNode, SSRComponent, SSRNode, SSROptions, SSRState } from 'types' */
2220
+ /**
2221
+ * The maximum request depth permitted before assuming we're stuck in an infinite loop
2222
+ */
2223
+ var MAX_DEPTH = 10;
2224
+ /**
2225
+ * @param {RequestEvent} event
2226
+ * @param {RequestState} event_state
2227
+ * @param {PageNodeIndexes} page
2228
+ * @param {SSROptions} options
2229
+ * @param {SSRManifest} manifest
2230
+ * @param {SSRState} state
2231
+ * @param {import('../../../utils/page_nodes.js').PageNodes} nodes
2232
+ * @param {RequiredResolveOptions} resolve_opts
2233
+ * @returns {Promise<Response>}
2234
+ */
2235
+ async function render_page(event, event_state, page, options, manifest, state, nodes, resolve_opts) {
2236
+ if (state.depth > MAX_DEPTH) return text(`Not found: ${event.url.pathname}`, { status: 404 });
2237
+ if (is_action_json_request(event)) return handle_action_json_request(event, event_state, options, (await manifest._.nodes[page.leaf]())?.server);
2238
+ try {
2239
+ const leaf_node = nodes.page();
2240
+ let status = 200;
2241
+ /** @type {ActionResult | undefined} */
2242
+ let action_result = void 0;
2243
+ if (is_action_request(event)) {
2244
+ const remote_id = get_remote_action(event.url);
2245
+ if (remote_id) action_result = await handle_remote_form_post(event, event_state, manifest, remote_id);
2246
+ else action_result = await handle_action_request(event, event_state, leaf_node.server);
2247
+ if (action_result?.type === "redirect") return redirect_response(action_result.status, action_result.location);
2248
+ if (action_result?.type === "error") status = get_status(action_result.error);
2249
+ if (action_result?.type === "failure") status = action_result.status;
2250
+ }
2251
+ const should_prerender = nodes.prerender();
2252
+ if (should_prerender) {
2253
+ if (leaf_node.server?.actions) throw new Error("Cannot prerender pages with actions");
2254
+ } else if (state.prerendering) return new Response(void 0, { status: 204 });
2255
+ state.prerender_default = should_prerender;
2256
+ const should_prerender_data = nodes.should_prerender_data();
2257
+ const data_pathname = add_data_suffix(event.url.pathname);
2258
+ /** @type {import('./types.js').Fetched[]} */
2259
+ const fetched = [];
2260
+ const ssr = nodes.ssr();
2261
+ const csr = nodes.csr();
2262
+ if (ssr === false && !(state.prerendering && should_prerender_data)) return await render_response({
2263
+ branch: compact(nodes.data).map((node) => {
2264
+ return {
2265
+ node,
2266
+ data: null,
2267
+ server_data: null
2268
+ };
2269
+ }),
2270
+ fetched,
2271
+ page_config: {
2272
+ ssr: false,
2273
+ csr
2274
+ },
2275
+ status,
2276
+ error: null,
2277
+ event,
2278
+ event_state,
2279
+ options,
2280
+ manifest,
2281
+ state,
2282
+ resolve_opts,
2283
+ data_serializer: server_data_serializer(event, event_state, options)
2284
+ });
2285
+ /** @type {Array<import('./types.js').Loaded | null>} */
2286
+ const branch = [];
2287
+ /** @type {Error | null} */
2288
+ let load_error = null;
2289
+ const data_serializer = server_data_serializer(event, event_state, options);
2290
+ const data_serializer_json = state.prerendering && should_prerender_data ? server_data_serializer_json(event, event_state, options) : null;
2291
+ /** @type {Array<Promise<ServerDataNode | null>>} */
2292
+ const server_promises = nodes.data.map((node, i) => {
2293
+ if (load_error) throw load_error;
2294
+ return Promise.resolve().then(async () => {
2295
+ try {
2296
+ if (node === leaf_node && action_result?.type === "error") throw action_result.error;
2297
+ const server_data = await load_server_data({
2298
+ event,
2299
+ event_state,
2300
+ state,
2301
+ node,
2302
+ parent: async () => {
2303
+ /** @type {Record<string, any>} */
2304
+ const data = {};
2305
+ for (let j = 0; j < i; j += 1) {
2306
+ const parent = await server_promises[j];
2307
+ if (parent) Object.assign(data, parent.data);
2308
+ }
2309
+ return data;
2310
+ }
2311
+ });
2312
+ if (node) data_serializer.add_node(i, server_data);
2313
+ data_serializer_json?.add_node(i, server_data);
2314
+ return server_data;
2315
+ } catch (e) {
2316
+ load_error = e;
2317
+ throw load_error;
2318
+ }
2319
+ });
2320
+ });
2321
+ /** @type {Array<Promise<Record<string, any> | null>>} */
2322
+ const load_promises = nodes.data.map((node, i) => {
2323
+ if (load_error) throw load_error;
2324
+ return Promise.resolve().then(async () => {
2325
+ try {
2326
+ return await load_data({
2327
+ event,
2328
+ event_state,
2329
+ fetched,
2330
+ node,
2331
+ parent: async () => {
2332
+ const data = {};
2333
+ for (let j = 0; j < i; j += 1) Object.assign(data, await load_promises[j]);
2334
+ return data;
2335
+ },
2336
+ resolve_opts,
2337
+ server_data_promise: server_promises[i],
2338
+ state,
2339
+ csr
2340
+ });
2341
+ } catch (e) {
2342
+ load_error = e;
2343
+ throw load_error;
2344
+ }
2345
+ });
2346
+ });
2347
+ for (const p of server_promises) p.catch(noop);
2348
+ for (const p of load_promises) p.catch(noop);
2349
+ for (let i = 0; i < nodes.data.length; i += 1) {
2350
+ const node = nodes.data[i];
2351
+ if (node) try {
2352
+ const server_data = await server_promises[i];
2353
+ const data = await load_promises[i];
2354
+ branch.push({
2355
+ node,
2356
+ server_data,
2357
+ data
2358
+ });
2359
+ } catch (e) {
2360
+ const err = normalize_error(e);
2361
+ if (err instanceof Redirect) {
2362
+ if (state.prerendering && should_prerender_data) {
2363
+ const body = JSON.stringify({
2364
+ type: "redirect",
2365
+ location: err.location
2366
+ });
2367
+ state.prerendering.dependencies.set(data_pathname, {
2368
+ response: text(body),
2369
+ body
2370
+ });
2371
+ }
2372
+ return redirect_response(err.status, err.location);
2373
+ }
2374
+ const status = get_status(err);
2375
+ const error = await handle_error_and_jsonify(event, event_state, options, err);
2376
+ while (i--) if (page.errors[i]) {
2377
+ const index = page.errors[i];
2378
+ const node = await manifest._.nodes[index]();
2379
+ let j = i;
2380
+ while (!branch[j]) j -= 1;
2381
+ data_serializer.set_max_nodes(j + 1);
2382
+ const layouts = compact(branch.slice(0, j + 1));
2383
+ const nodes = new PageNodes(layouts.map((layout) => layout.node));
2384
+ const error_branch = layouts.concat({
2385
+ node,
2386
+ data: null,
2387
+ server_data: null
2388
+ });
2389
+ return await render_response({
2390
+ event,
2391
+ event_state,
2392
+ options,
2393
+ manifest,
2394
+ state,
2395
+ resolve_opts,
2396
+ page_config: {
2397
+ ssr: nodes.ssr(),
2398
+ csr: nodes.csr()
2399
+ },
2400
+ status,
2401
+ error,
2402
+ error_components: await load_error_components(options, ssr, error_branch, page, manifest),
2403
+ branch: error_branch,
2404
+ fetched,
2405
+ data_serializer
2406
+ });
2407
+ }
2408
+ return static_error_page(options, status, error.message);
2409
+ }
2410
+ else branch.push(null);
2411
+ }
2412
+ if (state.prerendering && data_serializer_json) {
2413
+ let { data, chunks } = data_serializer_json.get_data();
2414
+ if (chunks) for await (const chunk of chunks) data += chunk;
2415
+ state.prerendering.dependencies.set(data_pathname, {
2416
+ response: text(data),
2417
+ body: data
2418
+ });
2419
+ }
2420
+ return await render_response({
2421
+ event,
2422
+ event_state,
2423
+ options,
2424
+ manifest,
2425
+ state,
2426
+ resolve_opts,
2427
+ page_config: {
2428
+ csr,
2429
+ ssr
2430
+ },
2431
+ status,
2432
+ error: null,
2433
+ branch: compact(branch),
2434
+ action_result,
2435
+ fetched,
2436
+ data_serializer: !ssr ? server_data_serializer(event, event_state, options) : data_serializer,
2437
+ error_components: await load_error_components(options, ssr, branch, page, manifest)
2438
+ });
2439
+ } catch (e) {
2440
+ if (e instanceof Redirect) return redirect_response(e.status, e.location);
2441
+ return await respond_with_error({
2442
+ event,
2443
+ event_state,
2444
+ options,
2445
+ manifest,
2446
+ state,
2447
+ status: e instanceof HttpError ? e.status : 500,
2448
+ error: e,
2449
+ resolve_opts
2450
+ });
2451
+ }
2452
+ }
2453
+ /**
2454
+ *
2455
+ * @param {SSROptions} options
2456
+ * @param {boolean} ssr
2457
+ * @param {Array<import('./types.js').Loaded | null>} branch
2458
+ * @param {PageNodeIndexes} page
2459
+ * @param {SSRManifest} manifest
2460
+ */
2461
+ async function load_error_components(options, ssr, branch, page, manifest) {
2462
+ /** @type {Array<SSRComponent | undefined> | undefined} */
2463
+ let error_components;
2464
+ if (options.server_error_boundaries && ssr) {
2465
+ let last_idx = -1;
2466
+ error_components = await Promise.all(branch.map((b, i) => {
2467
+ if (i === 0) return void 0;
2468
+ if (!b) return null;
2469
+ i--;
2470
+ while (i > last_idx + 1 && page.errors[i] === void 0) i -= 1;
2471
+ last_idx = i;
2472
+ const idx = page.errors[i];
2473
+ if (idx == null) return void 0;
2474
+ return manifest._.nodes[idx]?.().then((e) => e.component?.()).catch(() => void 0);
2475
+ }).filter((e) => e !== null));
2476
+ }
2477
+ return error_components;
2478
+ }
2479
+ //#endregion
2480
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/runtime/server/data/index.js
2481
+ /**
2482
+ * @param {import('@sveltejs/kit').RequestEvent} event
2483
+ * @param {import('types').RequestState} event_state
2484
+ * @param {import('types').SSRRoute} route
2485
+ * @param {import('types').SSROptions} options
2486
+ * @param {import('@sveltejs/kit').SSRManifest} manifest
2487
+ * @param {import('types').SSRState} state
2488
+ * @param {boolean[] | undefined} invalidated_data_nodes
2489
+ * @param {import('types').TrailingSlash} trailing_slash
2490
+ * @returns {Promise<Response>}
2491
+ */
2492
+ async function render_data(event, event_state, route, options, manifest, state, invalidated_data_nodes, trailing_slash) {
2493
+ if (!route.page) return new Response(void 0, { status: 404 });
2494
+ try {
2495
+ const node_ids = [...route.page.layouts, route.page.leaf];
2496
+ const invalidated = invalidated_data_nodes ?? node_ids.map(() => true);
2497
+ let aborted = false;
2498
+ const url = new URL(event.url);
2499
+ url.pathname = normalize_path(url.pathname, trailing_slash);
2500
+ const new_event = {
2501
+ ...event,
2502
+ url
2503
+ };
2504
+ const functions = node_ids.map((n, i) => {
2505
+ return once(async () => {
2506
+ try {
2507
+ if (aborted) return { type: "skip" };
2508
+ const node = n == void 0 ? n : await manifest._.nodes[n]();
2509
+ return load_server_data({
2510
+ event: new_event,
2511
+ event_state,
2512
+ state,
2513
+ node,
2514
+ parent: async () => {
2515
+ /** @type {Record<string, any>} */
2516
+ const data = {};
2517
+ for (let j = 0; j < i; j += 1) {
2518
+ const parent = await functions[j]();
2519
+ if (parent) Object.assign(data, parent.data);
2520
+ }
2521
+ return data;
2522
+ }
2523
+ });
2524
+ } catch (e) {
2525
+ aborted = true;
2526
+ throw e;
2527
+ }
2528
+ });
2529
+ });
2530
+ const promises = functions.map(async (fn, i) => {
2531
+ if (!invalidated[i]) return { type: "skip" };
2532
+ return fn();
2533
+ });
2534
+ let length = promises.length;
2535
+ const nodes = await Promise.all(promises.map((p, i) => p.catch(async (error) => {
2536
+ if (error instanceof Redirect) throw error;
2537
+ length = Math.min(length, i + 1);
2538
+ return {
2539
+ type: "error",
2540
+ error: await handle_error_and_jsonify(event, event_state, options, error),
2541
+ status: error instanceof HttpError || error instanceof SvelteKitError ? error.status : void 0
2542
+ };
2543
+ })));
2544
+ const data_serializer = server_data_serializer_json(event, event_state, options);
2545
+ for (let i = 0; i < nodes.length; i++) data_serializer.add_node(i, nodes[i]);
2546
+ const { data, chunks } = data_serializer.get_data();
2547
+ if (!chunks) return json_response(data);
2548
+ return new Response(new ReadableStream({
2549
+ async start(controller) {
2550
+ controller.enqueue(text_encoder.encode(data));
2551
+ for await (const chunk of chunks) controller.enqueue(text_encoder.encode(chunk));
2552
+ controller.close();
2553
+ },
2554
+ type: "bytes"
2555
+ }), { headers: {
2556
+ "content-type": "text/sveltekit-data",
2557
+ "cache-control": "private, no-store"
2558
+ } });
2559
+ } catch (e) {
2560
+ const error = normalize_error(e);
2561
+ if (error instanceof Redirect) return redirect_json_response(error);
2562
+ else return json_response(await handle_error_and_jsonify(event, event_state, options, error), 500);
2563
+ }
2564
+ }
2565
+ /**
2566
+ * @param {Record<string, any> | string} json
2567
+ * @param {number} [status]
2568
+ */
2569
+ function json_response(json, status = 200) {
2570
+ return text(typeof json === "string" ? json : JSON.stringify(json), {
2571
+ status,
2572
+ headers: {
2573
+ "content-type": "application/json",
2574
+ "cache-control": "private, no-store"
2575
+ }
2576
+ });
2577
+ }
2578
+ /**
2579
+ * @param {Redirect} redirect
2580
+ */
2581
+ function redirect_json_response(redirect) {
2582
+ return json_response({
2583
+ type: "redirect",
2584
+ location: redirect.location
2585
+ });
2586
+ }
2587
+ /*!
2588
+ * cookie
2589
+ * Copyright(c) 2012-2014 Roman Shtylman
2590
+ * Copyright(c) 2015 Douglas Christopher Wilson
2591
+ * MIT Licensed
2592
+ */
2593
+ //#endregion
2594
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/runtime/server/cookie.js
2595
+ var import_cookie = (/* @__PURE__ */ __commonJSMin(((exports) => {
2596
+ /**
2597
+ * Module exports.
2598
+ * @public
2599
+ */
2600
+ exports.parse = parse;
2601
+ exports.serialize = serialize;
2602
+ /**
2603
+ * Module variables.
2604
+ * @private
2605
+ */
2606
+ var __toString = Object.prototype.toString;
2607
+ /**
2608
+ * RegExp to match field-content in RFC 7230 sec 3.2
2609
+ *
2610
+ * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
2611
+ * field-vchar = VCHAR / obs-text
2612
+ * obs-text = %x80-FF
2613
+ */
2614
+ var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
2615
+ /**
2616
+ * Parse a cookie header.
2617
+ *
2618
+ * Parse the given cookie header string into an object
2619
+ * The object has the various cookies as keys(names) => values
2620
+ *
2621
+ * @param {string} str
2622
+ * @param {object} [options]
2623
+ * @return {object}
2624
+ * @public
2625
+ */
2626
+ function parse(str, options) {
2627
+ if (typeof str !== "string") throw new TypeError("argument str must be a string");
2628
+ var obj = {};
2629
+ var dec = (options || {}).decode || decode;
2630
+ var index = 0;
2631
+ while (index < str.length) {
2632
+ var eqIdx = str.indexOf("=", index);
2633
+ if (eqIdx === -1) break;
2634
+ var endIdx = str.indexOf(";", index);
2635
+ if (endIdx === -1) endIdx = str.length;
2636
+ else if (endIdx < eqIdx) {
2637
+ index = str.lastIndexOf(";", eqIdx - 1) + 1;
2638
+ continue;
2639
+ }
2640
+ var key = str.slice(index, eqIdx).trim();
2641
+ if (void 0 === obj[key]) {
2642
+ var val = str.slice(eqIdx + 1, endIdx).trim();
2643
+ if (val.charCodeAt(0) === 34) val = val.slice(1, -1);
2644
+ obj[key] = tryDecode(val, dec);
2645
+ }
2646
+ index = endIdx + 1;
2647
+ }
2648
+ return obj;
2649
+ }
2650
+ /**
2651
+ * Serialize data into a cookie header.
2652
+ *
2653
+ * Serialize the a name value pair into a cookie string suitable for
2654
+ * http headers. An optional options object specified cookie parameters.
2655
+ *
2656
+ * serialize('foo', 'bar', { httpOnly: true })
2657
+ * => "foo=bar; httpOnly"
2658
+ *
2659
+ * @param {string} name
2660
+ * @param {string} val
2661
+ * @param {object} [options]
2662
+ * @return {string}
2663
+ * @public
2664
+ */
2665
+ function serialize(name, val, options) {
2666
+ var opt = options || {};
2667
+ var enc = opt.encode || encode;
2668
+ if (typeof enc !== "function") throw new TypeError("option encode is invalid");
2669
+ if (!fieldContentRegExp.test(name)) throw new TypeError("argument name is invalid");
2670
+ var value = enc(val);
2671
+ if (value && !fieldContentRegExp.test(value)) throw new TypeError("argument val is invalid");
2672
+ var str = name + "=" + value;
2673
+ if (null != opt.maxAge) {
2674
+ var maxAge = opt.maxAge - 0;
2675
+ if (isNaN(maxAge) || !isFinite(maxAge)) throw new TypeError("option maxAge is invalid");
2676
+ str += "; Max-Age=" + Math.floor(maxAge);
2677
+ }
2678
+ if (opt.domain) {
2679
+ if (!fieldContentRegExp.test(opt.domain)) throw new TypeError("option domain is invalid");
2680
+ str += "; Domain=" + opt.domain;
2681
+ }
2682
+ if (opt.path) {
2683
+ if (!fieldContentRegExp.test(opt.path)) throw new TypeError("option path is invalid");
2684
+ str += "; Path=" + opt.path;
2685
+ }
2686
+ if (opt.expires) {
2687
+ var expires = opt.expires;
2688
+ if (!isDate(expires) || isNaN(expires.valueOf())) throw new TypeError("option expires is invalid");
2689
+ str += "; Expires=" + expires.toUTCString();
2690
+ }
2691
+ if (opt.httpOnly) str += "; HttpOnly";
2692
+ if (opt.secure) str += "; Secure";
2693
+ if (opt.partitioned) str += "; Partitioned";
2694
+ if (opt.priority) switch (typeof opt.priority === "string" ? opt.priority.toLowerCase() : opt.priority) {
2695
+ case "low":
2696
+ str += "; Priority=Low";
2697
+ break;
2698
+ case "medium":
2699
+ str += "; Priority=Medium";
2700
+ break;
2701
+ case "high":
2702
+ str += "; Priority=High";
2703
+ break;
2704
+ default: throw new TypeError("option priority is invalid");
2705
+ }
2706
+ if (opt.sameSite) switch (typeof opt.sameSite === "string" ? opt.sameSite.toLowerCase() : opt.sameSite) {
2707
+ case true:
2708
+ str += "; SameSite=Strict";
2709
+ break;
2710
+ case "lax":
2711
+ str += "; SameSite=Lax";
2712
+ break;
2713
+ case "strict":
2714
+ str += "; SameSite=Strict";
2715
+ break;
2716
+ case "none":
2717
+ str += "; SameSite=None";
2718
+ break;
2719
+ default: throw new TypeError("option sameSite is invalid");
2720
+ }
2721
+ return str;
2722
+ }
2723
+ /**
2724
+ * URL-decode string value. Optimized to skip native call when no %.
2725
+ *
2726
+ * @param {string} str
2727
+ * @returns {string}
2728
+ */
2729
+ function decode(str) {
2730
+ return str.indexOf("%") !== -1 ? decodeURIComponent(str) : str;
2731
+ }
2732
+ /**
2733
+ * URL-encode value.
2734
+ *
2735
+ * @param {string} val
2736
+ * @returns {string}
2737
+ */
2738
+ function encode(val) {
2739
+ return encodeURIComponent(val);
2740
+ }
2741
+ /**
2742
+ * Determine if value is a Date.
2743
+ *
2744
+ * @param {*} val
2745
+ * @private
2746
+ */
2747
+ function isDate(val) {
2748
+ return __toString.call(val) === "[object Date]" || val instanceof Date;
2749
+ }
2750
+ /**
2751
+ * Try decoding a string using a decoding function.
2752
+ *
2753
+ * @param {string} str
2754
+ * @param {function} decode
2755
+ * @private
2756
+ */
2757
+ function tryDecode(str, decode) {
2758
+ try {
2759
+ return decode(str);
2760
+ } catch (e) {
2761
+ return str;
2762
+ }
2763
+ }
2764
+ })))();
2765
+ var INVALID_COOKIE_CHARACTER_REGEX = /[\x00-\x1F\x7F()<>@,;:"/[\]?={} \t]/;
2766
+ /** @param {import('./page/types.js').Cookie['options']} options */
2767
+ function validate_options(options) {
2768
+ if (options?.path === void 0) throw new Error("You must specify a `path` when setting, deleting or serializing cookies");
2769
+ }
2770
+ /**
2771
+ * Generates a unique key for a cookie based on its domain, path, and name in
2772
+ * the format: `<domain>/<path>?<name>`.
2773
+ * If domain is undefined, it will be omitted.
2774
+ * For example: `/?name`, `example.com/foo?name`.
2775
+ *
2776
+ * @param {string | undefined} domain
2777
+ * @param {string} path
2778
+ * @param {string} name
2779
+ * @returns {string}
2780
+ */
2781
+ function generate_cookie_key(domain, path, name) {
2782
+ return `${domain || ""}${path}?${encodeURIComponent(name)}`;
2783
+ }
2784
+ /**
2785
+ * @param {Request} request
2786
+ * @param {URL} url
2787
+ */
2788
+ function get_cookies(request, url) {
2789
+ const header = request.headers.get("cookie") ?? "";
2790
+ const initial_cookies = (0, import_cookie.parse)(header, { decode: (value) => value });
2791
+ /** @type {string | undefined} */
2792
+ let normalized_url;
2793
+ /** @type {Map<string, import('./page/types.js').Cookie>} */
2794
+ const new_cookies = /* @__PURE__ */ new Map();
2795
+ /** @type {import('cookie').CookieSerializeOptions} */
2796
+ const defaults = {
2797
+ httpOnly: true,
2798
+ sameSite: "lax",
2799
+ secure: url.hostname === "localhost" && url.protocol === "http:" ? false : true
2800
+ };
2801
+ /** @type {import('@sveltejs/kit').Cookies} */
2802
+ const cookies = {
2803
+ /**
2804
+ * @param {string} name
2805
+ * @param {import('cookie').CookieParseOptions} [opts]
2806
+ */
2807
+ get(name, opts) {
2808
+ const best_match = Array.from(new_cookies.values()).filter((c) => {
2809
+ return c.name === name && domain_matches(url.hostname, c.options.domain) && path_matches(url.pathname, c.options.path);
2810
+ }).sort((a, b) => b.options.path.length - a.options.path.length)[0];
2811
+ if (best_match) return best_match.options.maxAge === 0 ? void 0 : best_match.value;
2812
+ return (0, import_cookie.parse)(header, { decode: opts?.decode })[name];
2813
+ },
2814
+ /**
2815
+ * @param {import('cookie').CookieParseOptions} [opts]
2816
+ */
2817
+ getAll(opts) {
2818
+ const cookies = (0, import_cookie.parse)(header, { decode: opts?.decode });
2819
+ const lookup = /* @__PURE__ */ new Map();
2820
+ for (const c of new_cookies.values()) if (domain_matches(url.hostname, c.options.domain) && path_matches(url.pathname, c.options.path)) {
2821
+ const existing = lookup.get(c.name);
2822
+ if (!existing || c.options.path.length > existing.options.path.length) lookup.set(c.name, c);
2823
+ }
2824
+ for (const c of lookup.values()) cookies[c.name] = c.value;
2825
+ return Object.entries(cookies).map(([name, value]) => ({
2826
+ name,
2827
+ value
2828
+ }));
2829
+ },
2830
+ /**
2831
+ * @param {string} name
2832
+ * @param {string} value
2833
+ * @param {import('./page/types.js').Cookie['options']} options
2834
+ */
2835
+ set(name, value, options) {
2836
+ const illegal_characters = name.match(INVALID_COOKIE_CHARACTER_REGEX);
2837
+ if (illegal_characters) console.warn(`The cookie name "${name}" will be invalid in SvelteKit 3.0 as it contains ${illegal_characters.join(" and ")}. See RFC 2616 for more details https://datatracker.ietf.org/doc/html/rfc2616#section-2.2`);
2838
+ validate_options(options);
2839
+ set_internal(name, value, {
2840
+ ...defaults,
2841
+ ...options
2842
+ });
2843
+ },
2844
+ /**
2845
+ * @param {string} name
2846
+ * @param {import('./page/types.js').Cookie['options']} options
2847
+ */
2848
+ delete(name, options) {
2849
+ validate_options(options);
2850
+ cookies.set(name, "", {
2851
+ ...options,
2852
+ maxAge: 0
2853
+ });
2854
+ },
2855
+ /**
2856
+ * @param {string} name
2857
+ * @param {string} value
2858
+ * @param {import('./page/types.js').Cookie['options']} options
2859
+ */
2860
+ serialize(name, value, options) {
2861
+ validate_options(options);
2862
+ let path = options.path;
2863
+ if (!options.domain || options.domain === url.hostname) {
2864
+ if (!normalized_url) throw new Error("Cannot serialize cookies until after the route is determined");
2865
+ path = resolve(normalized_url, path);
2866
+ }
2867
+ return (0, import_cookie.serialize)(name, value, {
2868
+ ...defaults,
2869
+ ...options,
2870
+ path
2871
+ });
2872
+ }
2873
+ };
2874
+ /**
2875
+ * @param {URL} destination
2876
+ * @param {string | null} header
2877
+ */
2878
+ function get_cookie_header(destination, header) {
2879
+ /** @type {Record<string, string>} */
2880
+ const combined_cookies = { ...initial_cookies };
2881
+ for (const cookie of new_cookies.values()) {
2882
+ if (!domain_matches(destination.hostname, cookie.options.domain)) continue;
2883
+ if (!path_matches(destination.pathname, cookie.options.path)) continue;
2884
+ const encoder = cookie.options.encode || encodeURIComponent;
2885
+ combined_cookies[cookie.name] = encoder(cookie.value);
2886
+ }
2887
+ if (header) {
2888
+ const parsed = (0, import_cookie.parse)(header, { decode: (value) => value });
2889
+ for (const name in parsed) combined_cookies[name] = parsed[name];
2890
+ }
2891
+ return Object.entries(combined_cookies).map(([name, value]) => `${name}=${value}`).join("; ");
2892
+ }
2893
+ /** @type {Array<() => void>} */
2894
+ const internal_queue = [];
2895
+ /**
2896
+ * @param {string} name
2897
+ * @param {string} value
2898
+ * @param {import('./page/types.js').Cookie['options']} options
2899
+ */
2900
+ function set_internal(name, value, options) {
2901
+ if (!normalized_url) {
2902
+ internal_queue.push(() => set_internal(name, value, options));
2903
+ return;
2904
+ }
2905
+ let path = options.path;
2906
+ if (!options.domain || options.domain === url.hostname) path = resolve(normalized_url, path);
2907
+ const cookie_key = generate_cookie_key(options.domain, path, name);
2908
+ const cookie = {
2909
+ name,
2910
+ value,
2911
+ options: {
2912
+ ...options,
2913
+ path
2914
+ }
2915
+ };
2916
+ new_cookies.set(cookie_key, cookie);
2917
+ }
2918
+ /**
2919
+ * @param {import('types').TrailingSlash} trailing_slash
2920
+ */
2921
+ function set_trailing_slash(trailing_slash) {
2922
+ normalized_url = normalize_path(url.pathname, trailing_slash);
2923
+ internal_queue.forEach((fn) => fn());
2924
+ }
2925
+ return {
2926
+ cookies,
2927
+ new_cookies,
2928
+ get_cookie_header,
2929
+ set_internal,
2930
+ set_trailing_slash
2931
+ };
2932
+ }
2933
+ /**
2934
+ * @param {string} hostname
2935
+ * @param {string} [constraint]
2936
+ */
2937
+ function domain_matches(hostname, constraint) {
2938
+ if (!constraint) return true;
2939
+ const normalized = constraint[0] === "." ? constraint.slice(1) : constraint;
2940
+ if (hostname === normalized) return true;
2941
+ return hostname.endsWith("." + normalized);
2942
+ }
2943
+ /**
2944
+ * @param {string} path
2945
+ * @param {string} [constraint]
2946
+ */
2947
+ function path_matches(path, constraint) {
2948
+ if (!constraint) return true;
2949
+ const normalized = constraint.endsWith("/") ? constraint.slice(0, -1) : constraint;
2950
+ if (path === normalized) return true;
2951
+ return path.startsWith(normalized + "/");
2952
+ }
2953
+ /**
2954
+ * @param {Headers} headers
2955
+ * @param {MapIterator<import('./page/types.js').Cookie>} cookies
2956
+ */
2957
+ function add_cookies_to_headers(headers, cookies) {
2958
+ for (const new_cookie of cookies) {
2959
+ const { name, value, options } = new_cookie;
2960
+ headers.append("set-cookie", (0, import_cookie.serialize)(name, value, options));
2961
+ if (options.path.endsWith(".html")) {
2962
+ const path = add_data_suffix(options.path);
2963
+ headers.append("set-cookie", (0, import_cookie.serialize)(name, value, {
2964
+ ...options,
2965
+ path
2966
+ }));
2967
+ }
2968
+ }
2969
+ }
2970
+ //#endregion
2971
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/runtime/server/fetch.js
2972
+ /**
2973
+ * @param {{
2974
+ * event: import('@sveltejs/kit').RequestEvent;
2975
+ * options: import('types').SSROptions;
2976
+ * manifest: import('@sveltejs/kit').SSRManifest;
2977
+ * state: import('types').SSRState;
2978
+ * get_cookie_header: (url: URL, header: string | null) => string;
2979
+ * set_internal: (name: string, value: string, opts: import('./page/types.js').Cookie['options']) => void;
2980
+ * }} opts
2981
+ * @returns {typeof fetch}
2982
+ */
2983
+ function create_fetch({ event, options, manifest, state, get_cookie_header, set_internal }) {
2984
+ /**
2985
+ * @type {typeof fetch}
2986
+ */
2987
+ const server_fetch = async (info, init) => {
2988
+ const original_request = normalize_fetch_input(info, init, event.url);
2989
+ let mode = (info instanceof Request ? info.mode : init?.mode) ?? "cors";
2990
+ let credentials = (info instanceof Request ? info.credentials : init?.credentials) ?? "same-origin";
2991
+ return options.hooks.handleFetch({
2992
+ event,
2993
+ request: original_request,
2994
+ fetch: async (info, init) => {
2995
+ const request = normalize_fetch_input(info, init, event.url);
2996
+ const url = new URL(request.url);
2997
+ if (!request.headers.has("origin")) request.headers.set("origin", event.url.origin);
2998
+ if (info !== original_request) {
2999
+ mode = (info instanceof Request ? info.mode : init?.mode) ?? "cors";
3000
+ credentials = (info instanceof Request ? info.credentials : init?.credentials) ?? "same-origin";
3001
+ }
3002
+ if ((request.method === "GET" || request.method === "HEAD") && (mode === "no-cors" && url.origin !== event.url.origin || url.origin === event.url.origin)) request.headers.delete("origin");
3003
+ const decoded = decodeURIComponent(url.pathname);
3004
+ if (url.origin !== event.url.origin || base && decoded !== base && !decoded.startsWith(`${base}/`)) {
3005
+ if (`.${url.hostname}`.endsWith(`.${event.url.hostname}`) && credentials !== "omit") {
3006
+ const cookie = get_cookie_header(url, request.headers.get("cookie"));
3007
+ if (cookie) request.headers.set("cookie", cookie);
3008
+ }
3009
+ return fetch(request);
3010
+ }
3011
+ const prefix = assets || base;
3012
+ const filename = (decoded.startsWith(prefix) ? decoded.slice(prefix.length) : decoded).slice(1);
3013
+ const filename_html = `${filename}/index.html`;
3014
+ const is_asset = manifest.assets.has(filename) || filename in manifest._.server_assets;
3015
+ const is_asset_html = manifest.assets.has(filename_html) || filename_html in manifest._.server_assets;
3016
+ if (is_asset || is_asset_html) {
3017
+ const file = is_asset ? filename : filename_html;
3018
+ if (state.read) {
3019
+ const type = is_asset ? manifest.mimeTypes[filename.slice(filename.lastIndexOf("."))] : "text/html";
3020
+ return new Response(state.read(file), { headers: type ? { "content-type": type } : {} });
3021
+ } else if (read_implementation && file in manifest._.server_assets) {
3022
+ const length = manifest._.server_assets[file];
3023
+ const type = manifest.mimeTypes[file.slice(file.lastIndexOf("."))];
3024
+ return new Response(read_implementation(file), { headers: {
3025
+ "Content-Length": "" + length,
3026
+ "Content-Type": type
3027
+ } });
3028
+ }
3029
+ return await fetch(request);
3030
+ }
3031
+ if (has_prerendered_path(manifest, base + decoded)) return await fetch(request);
3032
+ if (credentials !== "omit") {
3033
+ const cookie = get_cookie_header(url, request.headers.get("cookie"));
3034
+ if (cookie) request.headers.set("cookie", cookie);
3035
+ const authorization = event.request.headers.get("authorization");
3036
+ if (authorization && !request.headers.has("authorization")) request.headers.set("authorization", authorization);
3037
+ }
3038
+ if (!request.headers.has("accept")) request.headers.set("accept", "*/*");
3039
+ if (!request.headers.has("accept-language")) request.headers.set("accept-language", event.request.headers.get("accept-language"));
3040
+ const response = await internal_fetch(request, options, manifest, state);
3041
+ for (const str of get_set_cookies(response.headers)) {
3042
+ const { name, value, ...options } = parseString(str, { decodeValues: false });
3043
+ set_internal(name, value, {
3044
+ path: options.path ?? (url.pathname.split("/").slice(0, -1).join("/") || "/"),
3045
+ encode: (value) => value,
3046
+ ...options
3047
+ });
3048
+ }
3049
+ return response;
3050
+ }
3051
+ });
3052
+ };
3053
+ return (input, init) => {
3054
+ const response = server_fetch(input, init);
3055
+ response.catch(noop);
3056
+ return response;
3057
+ };
3058
+ }
3059
+ /**
3060
+ * @param {RequestInfo | URL} info
3061
+ * @param {RequestInit | undefined} init
3062
+ * @param {URL} url
3063
+ */
3064
+ function normalize_fetch_input(info, init, url) {
3065
+ if (info instanceof Request) return info;
3066
+ return new Request(typeof info === "string" ? new URL(info, url) : info, init);
3067
+ }
3068
+ /**
3069
+ * @param {Request} request
3070
+ * @param {import('types').SSROptions} options
3071
+ * @param {import('@sveltejs/kit').SSRManifest} manifest
3072
+ * @param {import('types').SSRState} state
3073
+ * @returns {Promise<Response>}
3074
+ */
3075
+ async function internal_fetch(request, options, manifest, state) {
3076
+ if (request.signal) {
3077
+ if (request.signal.aborted) throw new DOMException("The operation was aborted.", "AbortError");
3078
+ let remove_abort_listener = noop;
3079
+ /** @type {Promise<never>} */
3080
+ const abort_promise = new Promise((_, reject) => {
3081
+ const on_abort = () => {
3082
+ reject(new DOMException("The operation was aborted.", "AbortError"));
3083
+ };
3084
+ request.signal.addEventListener("abort", on_abort, { once: true });
3085
+ remove_abort_listener = () => request.signal.removeEventListener("abort", on_abort);
3086
+ });
3087
+ const result = await Promise.race([respond(request, options, manifest, {
3088
+ ...state,
3089
+ depth: state.depth + 1
3090
+ }), abort_promise]);
3091
+ remove_abort_listener();
3092
+ return result;
3093
+ } else return await respond(request, options, manifest, {
3094
+ ...state,
3095
+ depth: state.depth + 1
3096
+ });
3097
+ }
3098
+ //#endregion
3099
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/runtime/server/env_module.js
3100
+ /** @type {string} */
3101
+ var payload;
3102
+ /** @type {string} */
3103
+ var etag;
3104
+ /** @type {Headers} */
3105
+ var headers;
3106
+ /**
3107
+ * @param {Request} request
3108
+ * @returns {Response}
3109
+ */
3110
+ function get_public_env(request) {
3111
+ const script = request.url.endsWith(".script.js");
3112
+ payload ??= uneval(public_env);
3113
+ etag ??= `W/${Date.now()}`;
3114
+ headers ??= new Headers({
3115
+ "content-type": "application/javascript; charset=utf-8",
3116
+ etag
3117
+ });
3118
+ if (request.headers.get("if-none-match") === etag) return new Response(void 0, {
3119
+ status: 304,
3120
+ headers
3121
+ });
3122
+ if (script) return new Response(`globalThis.__sveltekit_sw={env:${payload}}`, { headers });
3123
+ return new Response(`export const env=${payload}`, { headers });
3124
+ }
3125
+ //#endregion
3126
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/runtime/server/respond.js
3127
+ /** @import { RequestState, SSRNode } from 'types' */
3128
+ /** @type {import('types').RequiredResolveOptions['transformPageChunk']} */
3129
+ var default_transform = ({ html }) => html;
3130
+ /** @type {import('types').RequiredResolveOptions['filterSerializedResponseHeaders']} */
3131
+ var default_filter = () => false;
3132
+ /** @type {import('types').RequiredResolveOptions['preload']} */
3133
+ var default_preload = ({ type }) => type === "js" || type === "css";
3134
+ var page_methods = /* @__PURE__ */ new Set([
3135
+ "GET",
3136
+ "HEAD",
3137
+ "POST"
3138
+ ]);
3139
+ var allowed_page_methods = /* @__PURE__ */ new Set([
3140
+ "GET",
3141
+ "HEAD",
3142
+ "OPTIONS"
3143
+ ]);
3144
+ var respond = propagate_context(internal_respond);
3145
+ /**
3146
+ * @param {Request} request
3147
+ * @param {import('types').SSROptions} options
3148
+ * @param {import('@sveltejs/kit').SSRManifest} manifest
3149
+ * @param {import('types').SSRState} state
3150
+ * @returns {Promise<Response>}
3151
+ */
3152
+ async function internal_respond(request, options, manifest, state) {
3153
+ /** URL but stripped from the potential `/__data.json` suffix and its search param */
3154
+ const url = new URL(request.url);
3155
+ const is_route_resolution_request = has_resolution_suffix(url.pathname);
3156
+ const is_data_request = has_data_suffix(url.pathname);
3157
+ const remote_id = get_remote_id(url);
3158
+ {
3159
+ const request_origin = request.headers.get("origin");
3160
+ if (remote_id) {
3161
+ if (request.method !== "GET" && request_origin !== url.origin) return json({ message: "Cross-site remote requests are forbidden" }, { status: 403 });
3162
+ } else if (options.csrf_check_origin) {
3163
+ if (is_form_content_type(request) && (request.method === "POST" || request.method === "PUT" || request.method === "PATCH" || request.method === "DELETE") && request_origin !== url.origin && (!request_origin || !options.csrf_trusted_origins.includes(request_origin))) {
3164
+ const message = `Cross-site ${request.method} form submissions are forbidden`;
3165
+ const opts = { status: 403 };
3166
+ if (request.headers.get("accept") === "application/json") return json({ message }, opts);
3167
+ return text(message, opts);
3168
+ }
3169
+ }
3170
+ }
3171
+ if (options.hash_routing && url.pathname !== base + "/" && url.pathname !== "/[fallback]") return text("Not found", { status: 404 });
3172
+ /** @type {boolean[] | undefined} */
3173
+ let invalidated_data_nodes;
3174
+ if (is_route_resolution_request)
3175
+ /**
3176
+ * If the request is for a route resolution, first modify the URL, then continue as normal
3177
+ * for path resolution, then return the route object as a JS file.
3178
+ */
3179
+ url.pathname = strip_resolution_suffix(url.pathname);
3180
+ else if (is_data_request) {
3181
+ url.pathname = strip_data_suffix(url.pathname) + (url.searchParams.get("x-sveltekit-trailing-slash") === "1" ? "/" : "") || "/";
3182
+ url.searchParams.delete(TRAILING_SLASH_PARAM);
3183
+ invalidated_data_nodes = url.searchParams.get(INVALIDATED_PARAM)?.split("").map((node) => node === "1");
3184
+ url.searchParams.delete(INVALIDATED_PARAM);
3185
+ } else if (remote_id) {
3186
+ url.pathname = request.headers.get("x-sveltekit-pathname") ?? base;
3187
+ url.search = request.headers.get("x-sveltekit-search") ?? "";
3188
+ }
3189
+ /** @type {Record<string, string>} */
3190
+ const headers = {};
3191
+ const { cookies, new_cookies, get_cookie_header, set_internal, set_trailing_slash } = get_cookies(request, url);
3192
+ /** @type {RequestState} */
3193
+ const event_state = {
3194
+ prerendering: state.prerendering,
3195
+ transport: options.hooks.transport,
3196
+ handleValidationError: options.hooks.handleValidationError,
3197
+ tracing: { record_span },
3198
+ remote: {
3199
+ data: null,
3200
+ explicit: null,
3201
+ implicit: null,
3202
+ forms: null,
3203
+ requested: null,
3204
+ batches: null,
3205
+ live_iterators: null
3206
+ },
3207
+ is_in_remote_function: false,
3208
+ is_in_remote_form_or_command: false,
3209
+ is_in_remote_query: false,
3210
+ is_in_render: false,
3211
+ is_in_universal_load: false
3212
+ };
3213
+ /** @type {import('@sveltejs/kit').RequestEvent} */
3214
+ const event = {
3215
+ cookies,
3216
+ fetch: null,
3217
+ getClientAddress: state.getClientAddress || (() => {
3218
+ throw new Error(`@sveltejs/adapter-node does not specify getClientAddress. Please raise an issue`);
3219
+ }),
3220
+ locals: {},
3221
+ params: {},
3222
+ platform: state.platform,
3223
+ request,
3224
+ route: { id: null },
3225
+ setHeaders: (new_headers) => {
3226
+ for (const key in new_headers) {
3227
+ const lower = key.toLowerCase();
3228
+ const value = new_headers[key];
3229
+ if (lower === "set-cookie") throw new Error("Use `event.cookies.set(name, value, options)` instead of `event.setHeaders` to set cookies");
3230
+ else if (lower in headers) {
3231
+ if (lower === "server-timing") headers[lower] += ", " + value;
3232
+ else throw new Error(`"${key}" header is already set`);
3233
+ } else {
3234
+ headers[lower] = value;
3235
+ if (state.prerendering && lower === "cache-control") state.prerendering.cache = value;
3236
+ }
3237
+ }
3238
+ },
3239
+ url,
3240
+ isDataRequest: is_data_request,
3241
+ isSubRequest: state.depth > 0,
3242
+ isRemoteRequest: !!remote_id
3243
+ };
3244
+ event.fetch = create_fetch({
3245
+ event,
3246
+ options,
3247
+ manifest,
3248
+ state,
3249
+ get_cookie_header,
3250
+ set_internal
3251
+ });
3252
+ if (state.emulator?.platform) event.platform = await state.emulator.platform({
3253
+ config: {},
3254
+ prerender: !!state.prerendering?.fallback
3255
+ });
3256
+ /** @type {string | null} */
3257
+ let resolved_path = url.pathname;
3258
+ if (!remote_id) {
3259
+ const prerendering_reroute_state = state.prerendering?.inside_reroute;
3260
+ try {
3261
+ if (state.prerendering) state.prerendering.inside_reroute = true;
3262
+ resolved_path = await options.hooks.reroute({
3263
+ url: new URL(url),
3264
+ fetch: event.fetch
3265
+ }) ?? url.pathname;
3266
+ } catch {
3267
+ return text("Internal Server Error", { status: 500 });
3268
+ } finally {
3269
+ if (state.prerendering) state.prerendering.inside_reroute = prerendering_reroute_state;
3270
+ }
3271
+ }
3272
+ /** @type {import('types').RequiredResolveOptions} */
3273
+ let resolve_opts = {
3274
+ transformPageChunk: default_transform,
3275
+ filterSerializedResponseHeaders: default_filter,
3276
+ preload: default_preload
3277
+ };
3278
+ /** @type {import('types').TrailingSlash} */
3279
+ let trailing_slash = "never";
3280
+ /** @type {PageNodes | undefined} */
3281
+ let page_nodes;
3282
+ try {
3283
+ resolved_path = decode_pathname(resolved_path);
3284
+ } catch {
3285
+ resolved_path = null;
3286
+ return await handle();
3287
+ }
3288
+ if (resolved_path !== decode_pathname(url.pathname) && !state.prerendering?.fallback && has_prerendered_path(manifest, resolved_path)) {
3289
+ const url = new URL(request.url);
3290
+ url.pathname = is_data_request ? add_data_suffix(resolved_path) : is_route_resolution_request ? add_resolution_suffix(resolved_path) : resolved_path;
3291
+ try {
3292
+ const response = await fetch(url, request);
3293
+ const headers = new Headers(response.headers);
3294
+ if (headers.has("content-encoding")) {
3295
+ headers.delete("content-encoding");
3296
+ headers.delete("content-length");
3297
+ }
3298
+ return new Response(response.body, {
3299
+ headers,
3300
+ status: response.status,
3301
+ statusText: response.statusText
3302
+ });
3303
+ } catch (error) {
3304
+ return await handle_fatal_error(event, event_state, options, error);
3305
+ }
3306
+ }
3307
+ /** @type {import('types').SSRRoute | null} */
3308
+ let route = null;
3309
+ if (base && !state.prerendering?.fallback) {
3310
+ if (!resolved_path.startsWith(base)) return text("Not found", { status: 404 });
3311
+ resolved_path = resolved_path.slice(base.length) || "/";
3312
+ }
3313
+ if (is_route_resolution_request) return resolve_route(resolved_path, new URL(request.url), manifest);
3314
+ if (resolved_path === `/_app/env.js` || resolved_path === `/_app/env.script.js`) return get_public_env(request);
3315
+ if (!remote_id && resolved_path.startsWith(`/_app`)) {
3316
+ const headers = new Headers();
3317
+ headers.set("cache-control", "public, max-age=0, must-revalidate");
3318
+ return text("Not found", {
3319
+ status: 404,
3320
+ headers
3321
+ });
3322
+ }
3323
+ if (!state.prerendering?.fallback) {
3324
+ const matchers = await manifest._.matchers();
3325
+ const result = find_route(resolved_path, manifest._.routes, matchers);
3326
+ if (result) {
3327
+ route = result.route;
3328
+ event.route = { id: route.id };
3329
+ event.params = result.params;
3330
+ }
3331
+ }
3332
+ try {
3333
+ page_nodes = route?.page ? new PageNodes(await load_page_nodes(route.page, manifest)) : void 0;
3334
+ if (route && !remote_id) {
3335
+ if (url.pathname === base || url.pathname === base + "/") trailing_slash = "always";
3336
+ else if (page_nodes) trailing_slash = page_nodes.trailing_slash();
3337
+ else if (route.endpoint) trailing_slash = (await route.endpoint()).trailingSlash ?? "never";
3338
+ if (!is_data_request) {
3339
+ const normalized = normalize_path(url.pathname, trailing_slash);
3340
+ if (normalized !== url.pathname && !state.prerendering?.fallback) return new Response(void 0, {
3341
+ status: 308,
3342
+ headers: {
3343
+ "x-sveltekit-normalize": "1",
3344
+ location: (normalized.startsWith("//") ? url.origin + normalized : normalized) + (url.search === "?" ? "" : url.search)
3345
+ }
3346
+ });
3347
+ }
3348
+ if (state.before_handle || state.emulator?.platform) {
3349
+ let config = {};
3350
+ /** @type {import('types').PrerenderOption} */
3351
+ let prerender = false;
3352
+ if (route.endpoint) {
3353
+ const node = await route.endpoint();
3354
+ config = node.config ?? config;
3355
+ prerender = node.prerender ?? prerender;
3356
+ } else if (page_nodes) {
3357
+ config = page_nodes.get_config() ?? config;
3358
+ prerender = page_nodes.prerender();
3359
+ }
3360
+ if (state.emulator?.platform) event.platform = await state.emulator.platform({
3361
+ config,
3362
+ prerender
3363
+ });
3364
+ if (state.before_handle) return await state.before_handle(event, config, prerender, handle);
3365
+ }
3366
+ }
3367
+ return await handle();
3368
+ } catch (e) {
3369
+ if (e instanceof Redirect) try {
3370
+ const response = is_data_request || remote_id ? redirect_json_response(e) : route?.page && is_action_json_request(event) ? action_json_redirect(e) : redirect_response(e.status, e.location);
3371
+ add_cookies_to_headers(response.headers, new_cookies.values());
3372
+ return response;
3373
+ } catch (err) {
3374
+ return await handle_fatal_error(event, event_state, options, err);
3375
+ }
3376
+ return await handle_fatal_error(event, event_state, options, e);
3377
+ }
3378
+ async function handle() {
3379
+ set_trailing_slash(trailing_slash);
3380
+ if (state.prerendering && !state.prerendering.fallback && !state.prerendering.inside_reroute) disable_search(url);
3381
+ const response = await record_span({
3382
+ name: "sveltekit.handle.root",
3383
+ attributes: {
3384
+ "http.route": event.route.id || "unknown",
3385
+ "http.method": event.request.method,
3386
+ "http.url": event.url.href,
3387
+ "sveltekit.is_sub_request": event.isSubRequest
3388
+ },
3389
+ fn: async (root_span) => {
3390
+ const traced_event = {
3391
+ ...event,
3392
+ tracing: {
3393
+ enabled: false,
3394
+ root: root_span,
3395
+ current: root_span
3396
+ }
3397
+ };
3398
+ return await with_request_store({
3399
+ event: traced_event,
3400
+ state: event_state
3401
+ }, () => options.hooks.handle({
3402
+ event: traced_event,
3403
+ resolve: (event, opts) => {
3404
+ return record_span({
3405
+ name: "sveltekit.resolve",
3406
+ attributes: { "http.route": event.route.id || "unknown" },
3407
+ fn: (resolve_span) => {
3408
+ return with_request_store(null, () => resolve(merge_tracing(event, resolve_span), page_nodes, opts).then((response) => {
3409
+ for (const key in headers) {
3410
+ const value = headers[key];
3411
+ response.headers.set(key, value);
3412
+ }
3413
+ add_cookies_to_headers(response.headers, new_cookies.values());
3414
+ if (state.prerendering && event.route.id !== null) response.headers.set("x-sveltekit-routeid", encodeURI(event.route.id));
3415
+ resolve_span.setAttributes({
3416
+ "http.response.status_code": response.status,
3417
+ "http.response.body.size": response.headers.get("content-length") || "unknown"
3418
+ });
3419
+ return response;
3420
+ }));
3421
+ }
3422
+ });
3423
+ }
3424
+ }));
3425
+ }
3426
+ });
3427
+ if (response.status === 200 && response.headers.has("etag")) {
3428
+ let if_none_match_value = request.headers.get("if-none-match");
3429
+ if (if_none_match_value?.startsWith("W/\"")) if_none_match_value = if_none_match_value.substring(2);
3430
+ const etag = response.headers.get("etag");
3431
+ if (if_none_match_value === etag) {
3432
+ const headers = new Headers({ etag });
3433
+ for (const key of [
3434
+ "cache-control",
3435
+ "content-location",
3436
+ "date",
3437
+ "expires",
3438
+ "vary"
3439
+ ]) {
3440
+ const value = response.headers.get(key);
3441
+ if (value) headers.set(key, value);
3442
+ }
3443
+ for (const cookie of get_set_cookies(response.headers)) headers.append("set-cookie", cookie);
3444
+ return new Response(void 0, {
3445
+ status: 304,
3446
+ headers
3447
+ });
3448
+ }
3449
+ }
3450
+ if (is_data_request && response.status >= 300 && response.status <= 308) {
3451
+ const location = response.headers.get("location");
3452
+ if (location) return redirect_json_response(new Redirect(response.status, location));
3453
+ }
3454
+ return response;
3455
+ }
3456
+ /**
3457
+ * @param {import('@sveltejs/kit').RequestEvent} event
3458
+ * @param {PageNodes | undefined} page_nodes
3459
+ * @param {import('@sveltejs/kit').ResolveOptions} [opts]
3460
+ */
3461
+ async function resolve(event, page_nodes, opts) {
3462
+ try {
3463
+ if (opts) resolve_opts = {
3464
+ transformPageChunk: opts.transformPageChunk || default_transform,
3465
+ filterSerializedResponseHeaders: opts.filterSerializedResponseHeaders || default_filter,
3466
+ preload: opts.preload || default_preload
3467
+ };
3468
+ if (resolved_path === null) return await respond_with_error({
3469
+ event,
3470
+ event_state,
3471
+ options,
3472
+ manifest,
3473
+ state,
3474
+ status: 400,
3475
+ error: new SvelteKitError(400, "Malformed URI", `Failed to decode URI: ${event.url.pathname}`),
3476
+ resolve_opts
3477
+ });
3478
+ if (options.hash_routing || state.prerendering?.fallback) return await render_response({
3479
+ event,
3480
+ event_state,
3481
+ options,
3482
+ manifest,
3483
+ state,
3484
+ page_config: {
3485
+ ssr: false,
3486
+ csr: true
3487
+ },
3488
+ status: 200,
3489
+ error: null,
3490
+ branch: [{
3491
+ node: await manifest._.nodes[0](),
3492
+ data: null,
3493
+ server_data: null
3494
+ }],
3495
+ fetched: [],
3496
+ resolve_opts,
3497
+ data_serializer: server_data_serializer(event, event_state, options)
3498
+ });
3499
+ if (remote_id) return await handle_remote_call(event, event_state, options, manifest, remote_id);
3500
+ if (route) {
3501
+ const method = event.request.method;
3502
+ /** @type {Response} */
3503
+ let response;
3504
+ if (is_data_request) response = await render_data(event, event_state, route, options, manifest, state, invalidated_data_nodes, trailing_slash);
3505
+ else if (route.endpoint && (!route.page || !state.prerendering && is_endpoint_request(event))) response = await render_endpoint(event, event_state, await route.endpoint(), state);
3506
+ else if (route.page) {
3507
+ if (!page_nodes) throw new Error("page_nodes not found. This should never happen");
3508
+ else if (page_methods.has(method)) response = await render_page(event, event_state, route.page, options, manifest, state, page_nodes, resolve_opts);
3509
+ else {
3510
+ const allowed_methods = new Set(allowed_page_methods);
3511
+ if ((await manifest._.nodes[route.page.leaf]())?.server?.actions) allowed_methods.add("POST");
3512
+ if (method === "OPTIONS") response = new Response(null, {
3513
+ status: 204,
3514
+ headers: { allow: Array.from(allowed_methods.values()).join(", ") }
3515
+ });
3516
+ else {
3517
+ const mod = [...allowed_methods].reduce((acc, curr) => {
3518
+ acc[curr] = true;
3519
+ return acc;
3520
+ }, {});
3521
+ response = method_not_allowed(mod, method);
3522
+ }
3523
+ }
3524
+ } else throw new Error("Route is neither page nor endpoint. This should never happen");
3525
+ if (request.method === "GET" && route.page && route.endpoint) {
3526
+ const vary = response.headers.get("vary")?.split(",")?.map((v) => v.trim().toLowerCase());
3527
+ if (!(vary?.includes("accept") || vary?.includes("*"))) {
3528
+ response = new Response(response.body, {
3529
+ status: response.status,
3530
+ statusText: response.statusText,
3531
+ headers: new Headers(response.headers)
3532
+ });
3533
+ response.headers.append("Vary", "Accept");
3534
+ }
3535
+ }
3536
+ return response;
3537
+ }
3538
+ if (state.error && event.isSubRequest) {
3539
+ const headers = new Headers(request.headers);
3540
+ headers.set("x-sveltekit-error", "true");
3541
+ return await fetch(request, { headers });
3542
+ }
3543
+ if (state.error) return text("Internal Server Error", { status: 500 });
3544
+ if (state.depth === 0) return await respond_with_error({
3545
+ event,
3546
+ event_state,
3547
+ options,
3548
+ manifest,
3549
+ state,
3550
+ status: 404,
3551
+ error: new SvelteKitError(404, "Not Found", `Not found: ${event.url.pathname}`),
3552
+ resolve_opts
3553
+ });
3554
+ if (state.prerendering) return text("not found", { status: 404 });
3555
+ const response = await fetch(request);
3556
+ return new Response(response.body, response);
3557
+ } catch (e) {
3558
+ return await handle_fatal_error(event, event_state, options, e);
3559
+ } finally {
3560
+ event.cookies.set = () => {
3561
+ throw new Error("Cannot use `cookies.set(...)` after the response has been generated");
3562
+ };
3563
+ event.setHeaders = () => {
3564
+ throw new Error("Cannot use `setHeaders(...)` after the response has been generated");
3565
+ };
3566
+ }
3567
+ }
3568
+ }
3569
+ /**
3570
+ * @param {import('types').PageNodeIndexes} page
3571
+ * @param {import('@sveltejs/kit').SSRManifest} manifest
3572
+ */
3573
+ function load_page_nodes(page, manifest) {
3574
+ return Promise.all([...page.layouts.map((n) => n == void 0 ? n : manifest._.nodes[n]()), manifest._.nodes[page.leaf]()]);
3575
+ }
3576
+ /**
3577
+ * It's likely that, in a distributed system, there are spans starting outside the SvelteKit server -- eg.
3578
+ * started on the frontend client, or in a service that calls the SvelteKit server. There are standardized
3579
+ * ways to represent this context in HTTP headers, so we can extract that context and run our tracing inside of it
3580
+ * so that when our traces are exported, they are associated with the correct parent context.
3581
+ * @param {typeof internal_respond} fn
3582
+ * @returns {typeof internal_respond}
3583
+ */
3584
+ function propagate_context(fn) {
3585
+ return async (req, ...rest) => {
3586
+ return fn(req, ...rest);
3587
+ };
3588
+ }
3589
+ //#endregion
3590
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/utils/env.js
3591
+ /**
3592
+ * @param {Record<string, string>} env
3593
+ * @param {string} allowed
3594
+ * @param {string} disallowed
3595
+ * @returns {Record<string, string>}
3596
+ */
3597
+ function filter_env(env, allowed, disallowed) {
3598
+ return Object.fromEntries(Object.entries(env).filter(([k]) => k.startsWith(allowed) && (disallowed === "" || !k.startsWith(disallowed))));
3599
+ }
3600
+ //#endregion
3601
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.1_@typescript-eslin_966400cae69c6a1acd67dc361e1b9dab/node_modules/@sveltejs/kit/src/runtime/server/index.js
3602
+ /** @import { PromiseWithResolvers } from '../../utils/promise.js' */
3603
+ /** @type {Promise<any>} */
3604
+ var init_promise;
3605
+ /** @type {Promise<void> | null} */
3606
+ var current = null;
3607
+ var Server = class {
3608
+ /** @type {import('types').SSROptions} */
3609
+ #options;
3610
+ /** @type {import('@sveltejs/kit').SSRManifest} */
3611
+ #manifest;
3612
+ /** @param {import('@sveltejs/kit').SSRManifest} manifest */
3613
+ constructor(manifest) {
3614
+ /** @type {import('types').SSROptions} */
3615
+ this.#options = options;
3616
+ this.#manifest = manifest;
3617
+ if (IN_WEBCONTAINER) {
3618
+ const respond = this.respond.bind(this);
3619
+ /** @type {typeof respond} */
3620
+ this.respond = async (...args) => {
3621
+ const { promise, resolve } = with_resolvers();
3622
+ const previous = current;
3623
+ current = promise;
3624
+ await previous;
3625
+ return respond(...args).finally(resolve);
3626
+ };
3627
+ }
3628
+ }
3629
+ /**
3630
+ * @param {import('@sveltejs/kit').ServerInitOptions} opts
3631
+ */
3632
+ async init({ env, read }) {
3633
+ const { env_public_prefix, env_private_prefix } = this.#options;
3634
+ set_private_env(filter_env(env, env_private_prefix, env_public_prefix));
3635
+ set_public_env(filter_env(env, env_public_prefix, env_private_prefix));
3636
+ if (read) {
3637
+ /** @param {string} file */
3638
+ const wrapped_read = (file) => {
3639
+ const result = read(file);
3640
+ if (result instanceof ReadableStream) return result;
3641
+ else return new ReadableStream({ async start(controller) {
3642
+ try {
3643
+ const stream = await Promise.resolve(result);
3644
+ if (!stream) {
3645
+ controller.close();
3646
+ return;
3647
+ }
3648
+ const reader = stream.getReader();
3649
+ while (true) {
3650
+ const { done, value } = await reader.read();
3651
+ if (done) break;
3652
+ controller.enqueue(value);
3653
+ }
3654
+ controller.close();
3655
+ } catch (error) {
3656
+ controller.error(error);
3657
+ }
3658
+ } });
3659
+ };
3660
+ set_read_implementation(wrapped_read);
3661
+ }
3662
+ await (init_promise ??= (async () => {
3663
+ try {
3664
+ const module = await get_hooks();
3665
+ this.#options.hooks = {
3666
+ handle: module.handle || (({ event, resolve }) => resolve(event)),
3667
+ handleError: module.handleError || (({ status, error, event }) => {
3668
+ const error_message = format_server_error(status, error, event);
3669
+ console.error(error_message);
3670
+ }),
3671
+ handleFetch: module.handleFetch || (({ request, fetch }) => fetch(request)),
3672
+ handleValidationError: module.handleValidationError || (({ issues }) => {
3673
+ console.error("Remote function schema validation failed:", issues);
3674
+ return { message: "Bad Request" };
3675
+ }),
3676
+ reroute: module.reroute || noop,
3677
+ transport: module.transport || {}
3678
+ };
3679
+ module.transport && Object.fromEntries(Object.entries(module.transport).map(([k, v]) => [k, v.decode]));
3680
+ if (module.init) await module.init();
3681
+ } catch (e) {
3682
+ throw e;
3683
+ }
3684
+ })());
3685
+ }
3686
+ /**
3687
+ * @param {Request} request
3688
+ * @param {import('types').RequestOptions} options
3689
+ */
3690
+ async respond(request, options) {
3691
+ return respond(request, this.#options, this.#manifest, {
3692
+ ...options,
3693
+ error: false,
3694
+ depth: 0
3695
+ });
3696
+ }
3697
+ };
3698
+
3699
+ export { Server as S };
3700
+ //# sourceMappingURL=index.js-kWlRiTFB.js.map