mongoku 2.6.0 → 2.7.0-compat

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 (453) hide show
  1. package/Dockerfile +1 -0
  2. package/README.md +25 -0
  3. package/build/client/_app/immutable/assets/0.CdYhspVa.css +1 -0
  4. package/build/client/_app/immutable/assets/0.CdYhspVa.css.br +0 -0
  5. package/build/client/_app/immutable/assets/0.CdYhspVa.css.gz +0 -0
  6. package/build/client/_app/immutable/chunks/{DdLT9cdj.js → B59nRjE7.js} +1 -1
  7. package/build/client/_app/immutable/chunks/B59nRjE7.js.br +2 -0
  8. package/build/client/_app/immutable/chunks/B59nRjE7.js.gz +0 -0
  9. package/build/client/_app/immutable/chunks/BBqIHhSl.js +1 -0
  10. package/build/client/_app/immutable/chunks/BBqIHhSl.js.br +0 -0
  11. package/build/client/_app/immutable/chunks/BBqIHhSl.js.gz +0 -0
  12. package/build/client/_app/immutable/chunks/{BEi7QatZ.js → BIUJX0Ps.js} +6 -6
  13. package/build/client/_app/immutable/chunks/BIUJX0Ps.js.br +0 -0
  14. package/build/client/_app/immutable/chunks/BIUJX0Ps.js.gz +0 -0
  15. package/build/client/_app/immutable/chunks/C6nv_pni.js +1 -0
  16. package/build/client/_app/immutable/chunks/C6nv_pni.js.br +0 -0
  17. package/build/client/_app/immutable/chunks/C6nv_pni.js.gz +0 -0
  18. package/build/client/_app/immutable/chunks/{Bh2n5Bfy.js → CETiZ6GF.js} +1 -1
  19. package/build/client/_app/immutable/chunks/CETiZ6GF.js.br +0 -0
  20. package/build/client/_app/immutable/chunks/CETiZ6GF.js.gz +0 -0
  21. package/build/client/_app/immutable/chunks/CX0xC2bt.js +1 -0
  22. package/build/client/_app/immutable/chunks/CX0xC2bt.js.br +0 -0
  23. package/build/client/_app/immutable/chunks/CX0xC2bt.js.gz +0 -0
  24. package/build/client/_app/immutable/chunks/CeXlKXQN.js +1 -0
  25. package/build/client/_app/immutable/chunks/CeXlKXQN.js.br +0 -0
  26. package/build/client/_app/immutable/chunks/CeXlKXQN.js.gz +0 -0
  27. package/build/client/_app/immutable/chunks/ChTiw7nk.js +4 -0
  28. package/build/client/_app/immutable/chunks/ChTiw7nk.js.br +0 -0
  29. package/build/client/_app/immutable/chunks/ChTiw7nk.js.gz +0 -0
  30. package/build/client/_app/immutable/chunks/Czyt1_Wc.js +1 -0
  31. package/build/client/_app/immutable/chunks/Czyt1_Wc.js.br +0 -0
  32. package/build/client/_app/immutable/chunks/Czyt1_Wc.js.gz +0 -0
  33. package/build/client/_app/immutable/chunks/{B5NTIIm5.js → DJHYr09v.js} +1 -1
  34. package/build/client/_app/immutable/chunks/DJHYr09v.js.br +0 -0
  35. package/build/client/_app/immutable/chunks/DJHYr09v.js.gz +0 -0
  36. package/build/client/_app/immutable/chunks/{C2amz0TU.js → DZxZehvI.js} +1 -1
  37. package/build/client/_app/immutable/chunks/DZxZehvI.js.br +0 -0
  38. package/build/client/_app/immutable/chunks/DZxZehvI.js.gz +0 -0
  39. package/build/client/_app/immutable/chunks/DaNl6Y92.js +2 -0
  40. package/build/client/_app/immutable/chunks/DaNl6Y92.js.br +0 -0
  41. package/build/client/_app/immutable/chunks/DaNl6Y92.js.gz +0 -0
  42. package/build/client/_app/immutable/chunks/Dbu5gl04.js +1 -0
  43. package/build/client/_app/immutable/chunks/Dbu5gl04.js.br +0 -0
  44. package/build/client/_app/immutable/chunks/Dbu5gl04.js.gz +0 -0
  45. package/build/client/_app/immutable/chunks/DczwA5Ds.js +1 -0
  46. package/build/client/_app/immutable/chunks/DczwA5Ds.js.br +0 -0
  47. package/build/client/_app/immutable/chunks/DczwA5Ds.js.gz +0 -0
  48. package/build/client/_app/immutable/chunks/DjlV9yev.js +1 -0
  49. package/build/client/_app/immutable/chunks/DjlV9yev.js.br +0 -0
  50. package/build/client/_app/immutable/chunks/DjlV9yev.js.gz +0 -0
  51. package/build/client/_app/immutable/chunks/DkIdyQoH.js +1 -0
  52. package/build/client/_app/immutable/chunks/DkIdyQoH.js.br +0 -0
  53. package/build/client/_app/immutable/chunks/DkIdyQoH.js.gz +0 -0
  54. package/build/client/_app/immutable/chunks/DskkUG-R.js +41 -0
  55. package/build/client/_app/immutable/chunks/DskkUG-R.js.br +0 -0
  56. package/build/client/_app/immutable/chunks/DskkUG-R.js.gz +0 -0
  57. package/build/client/_app/immutable/chunks/DtqR9xj2.js +16 -0
  58. package/build/client/_app/immutable/chunks/DtqR9xj2.js.br +0 -0
  59. package/build/client/_app/immutable/chunks/DtqR9xj2.js.gz +0 -0
  60. package/build/client/_app/immutable/chunks/{c-rWvg5T.js → Dv9wDVNU.js} +1 -1
  61. package/build/client/_app/immutable/chunks/Dv9wDVNU.js.br +0 -0
  62. package/build/client/_app/immutable/chunks/Dv9wDVNU.js.gz +0 -0
  63. package/build/client/_app/immutable/chunks/{Bl8s7Z6r.js → DwvJoC1a.js} +1 -1
  64. package/build/client/_app/immutable/chunks/DwvJoC1a.js.br +0 -0
  65. package/build/client/_app/immutable/chunks/DwvJoC1a.js.gz +0 -0
  66. package/build/client/_app/immutable/chunks/ULh2o3ji.js +1 -0
  67. package/build/client/_app/immutable/chunks/ULh2o3ji.js.br +0 -0
  68. package/build/client/_app/immutable/chunks/ULh2o3ji.js.gz +0 -0
  69. package/build/client/_app/immutable/chunks/V1mdyEl2.js +1 -0
  70. package/build/client/_app/immutable/chunks/V1mdyEl2.js.br +0 -0
  71. package/build/client/_app/immutable/chunks/V1mdyEl2.js.gz +0 -0
  72. package/build/client/_app/immutable/chunks/{DUw-I2kh.js → gjWX2x82.js} +1 -1
  73. package/build/client/_app/immutable/chunks/gjWX2x82.js.br +0 -0
  74. package/build/client/_app/immutable/chunks/gjWX2x82.js.gz +0 -0
  75. package/build/client/_app/immutable/chunks/{CxcplU4Q.js → y5L2Na-S.js} +1 -1
  76. package/build/client/_app/immutable/chunks/y5L2Na-S.js.br +0 -0
  77. package/build/client/_app/immutable/chunks/y5L2Na-S.js.gz +0 -0
  78. package/build/client/_app/immutable/entry/app.DSC3O-oq.js +2 -0
  79. package/build/client/_app/immutable/entry/app.DSC3O-oq.js.br +0 -0
  80. package/build/client/_app/immutable/entry/app.DSC3O-oq.js.gz +0 -0
  81. package/build/client/_app/immutable/entry/start.DXWFdQeQ.js +1 -0
  82. package/build/client/_app/immutable/entry/start.DXWFdQeQ.js.br +0 -0
  83. package/build/client/_app/immutable/entry/start.DXWFdQeQ.js.gz +0 -0
  84. package/build/client/_app/immutable/nodes/0.CMAlzqMw.js +1 -0
  85. package/build/client/_app/immutable/nodes/0.CMAlzqMw.js.br +0 -0
  86. package/build/client/_app/immutable/nodes/0.CMAlzqMw.js.gz +0 -0
  87. package/build/client/_app/immutable/nodes/1.B6Npt7WS.js +1 -0
  88. package/build/client/_app/immutable/nodes/1.B6Npt7WS.js.br +4 -0
  89. package/build/client/_app/immutable/nodes/1.B6Npt7WS.js.gz +0 -0
  90. package/build/client/_app/immutable/nodes/10.UKtNnnWx.js +2 -0
  91. package/build/client/_app/immutable/nodes/10.UKtNnnWx.js.br +0 -0
  92. package/build/client/_app/immutable/nodes/10.UKtNnnWx.js.gz +0 -0
  93. package/build/client/_app/immutable/nodes/11.DZQrIhD6.js +6 -0
  94. package/build/client/_app/immutable/nodes/11.DZQrIhD6.js.br +0 -0
  95. package/build/client/_app/immutable/nodes/11.DZQrIhD6.js.gz +0 -0
  96. package/build/client/_app/immutable/nodes/12.Bb2XzJJ4.js +1 -0
  97. package/build/client/_app/immutable/nodes/12.Bb2XzJJ4.js.br +0 -0
  98. package/build/client/_app/immutable/nodes/12.Bb2XzJJ4.js.gz +0 -0
  99. package/build/client/_app/immutable/nodes/13.B_EllgAJ.js +1 -0
  100. package/build/client/_app/immutable/nodes/13.B_EllgAJ.js.br +0 -0
  101. package/build/client/_app/immutable/nodes/13.B_EllgAJ.js.gz +0 -0
  102. package/build/client/_app/immutable/nodes/14.Ds1Cbw86.js +65 -0
  103. package/build/client/_app/immutable/nodes/14.Ds1Cbw86.js.br +0 -0
  104. package/build/client/_app/immutable/nodes/14.Ds1Cbw86.js.gz +0 -0
  105. package/build/client/_app/immutable/nodes/{2.AM8fesja.js → 2.C6NzDBVE.js} +1 -1
  106. package/build/client/_app/immutable/nodes/2.C6NzDBVE.js.br +2 -0
  107. package/build/client/_app/immutable/nodes/2.C6NzDBVE.js.gz +0 -0
  108. package/build/client/_app/immutable/nodes/{3.BShuoOz5.js → 3.CZJqJ4La.js} +1 -1
  109. package/build/client/_app/immutable/nodes/3.CZJqJ4La.js.br +0 -0
  110. package/build/client/_app/immutable/nodes/3.CZJqJ4La.js.gz +0 -0
  111. package/build/client/_app/immutable/nodes/{4.BD6QbApY.js → 4.CNe3XPNo.js} +1 -1
  112. package/build/client/_app/immutable/nodes/4.CNe3XPNo.js.br +0 -0
  113. package/build/client/_app/immutable/nodes/4.CNe3XPNo.js.gz +0 -0
  114. package/build/client/_app/immutable/nodes/{5.JM_dwz0R.js → 5.BWhhv567.js} +1 -1
  115. package/build/client/_app/immutable/nodes/5.BWhhv567.js.br +0 -0
  116. package/build/client/_app/immutable/nodes/5.BWhhv567.js.gz +0 -0
  117. package/build/client/_app/immutable/nodes/7.DrDdJlUZ.js +1 -0
  118. package/build/client/_app/immutable/nodes/7.DrDdJlUZ.js.br +0 -0
  119. package/build/client/_app/immutable/nodes/7.DrDdJlUZ.js.gz +0 -0
  120. package/build/client/_app/immutable/nodes/8.DY5fyf2p.js +2 -0
  121. package/build/client/_app/immutable/nodes/8.DY5fyf2p.js.br +0 -0
  122. package/build/client/_app/immutable/nodes/8.DY5fyf2p.js.gz +0 -0
  123. package/build/client/_app/immutable/nodes/9.DSZg3ucy.js +1 -0
  124. package/build/client/_app/immutable/nodes/9.DSZg3ucy.js.br +0 -0
  125. package/build/client/_app/immutable/nodes/9.DSZg3ucy.js.gz +0 -0
  126. package/build/client/_app/version.json +1 -1
  127. package/build/client/_app/version.json.br +0 -0
  128. package/build/client/_app/version.json.gz +0 -0
  129. package/build/client/robots.txt.br +0 -0
  130. package/build/client/robots.txt.gz +0 -0
  131. package/build/handler.js +290 -228
  132. package/build/server/chunks/0-94hvO2vX.js +31 -0
  133. package/build/server/chunks/0-94hvO2vX.js.map +1 -0
  134. package/build/server/chunks/1-DU2n-wa5.js +9 -0
  135. package/build/server/chunks/1-DU2n-wa5.js.map +1 -0
  136. package/build/server/chunks/{9-DrDIAOIh.js → 10-CA3VfgE7.js} +7 -6
  137. package/build/server/chunks/10-CA3VfgE7.js.map +1 -0
  138. package/build/server/chunks/{10-WRjYTwFT.js → 11-xh-tBR25.js} +8 -7
  139. package/build/server/chunks/11-xh-tBR25.js.map +1 -0
  140. package/build/server/chunks/{11-Cq79IAWK.js → 12-CHoThn5d.js} +8 -7
  141. package/build/server/chunks/12-CHoThn5d.js.map +1 -0
  142. package/build/server/chunks/{12-DnRkeAVv.js → 13-s3o-iKja.js} +8 -7
  143. package/build/server/chunks/13-s3o-iKja.js.map +1 -0
  144. package/build/server/chunks/{13-DKqDuEdB.js → 14-Ch_I9f3x.js} +7 -6
  145. package/build/server/chunks/14-Ch_I9f3x.js.map +1 -0
  146. package/build/server/chunks/{2-DaZMexAs.js → 2-BNTmkYSf.js} +2 -2
  147. package/build/server/chunks/{2-DaZMexAs.js.map → 2-BNTmkYSf.js.map} +1 -1
  148. package/build/server/chunks/{3-Dr4vFhF1.js → 3-ClKd4dXQ.js} +2 -2
  149. package/build/server/chunks/{3-Dr4vFhF1.js.map → 3-ClKd4dXQ.js.map} +1 -1
  150. package/build/server/chunks/{4-K2WnEwm7.js → 4-BSPVNKkN.js} +2 -2
  151. package/build/server/chunks/{4-K2WnEwm7.js.map → 4-BSPVNKkN.js.map} +1 -1
  152. package/build/server/chunks/{5-Be-Du8oZ.js → 5-BzxZlQk0.js} +2 -2
  153. package/build/server/chunks/{5-Be-Du8oZ.js.map → 5-BzxZlQk0.js.map} +1 -1
  154. package/build/server/chunks/{6-DsYzHmsZ.js → 6-Bw8JUxiD.js} +3 -2
  155. package/build/server/chunks/6-Bw8JUxiD.js.map +1 -0
  156. package/build/server/chunks/7-B_ur3ckj.js +9 -0
  157. package/build/server/chunks/7-B_ur3ckj.js.map +1 -0
  158. package/build/server/chunks/{7-eAzN1saI.js → 8-BEcdRamT.js} +8 -7
  159. package/build/server/chunks/8-BEcdRamT.js.map +1 -0
  160. package/build/server/chunks/{8-Dtaxi2J_.js → 9-CeMYWy9o.js} +7 -6
  161. package/build/server/chunks/9-CeMYWy9o.js.map +1 -0
  162. package/build/server/chunks/JsonValue-CTg4aH_w.js +320 -0
  163. package/build/server/chunks/JsonValue-CTg4aH_w.js.map +1 -0
  164. package/build/server/chunks/{Modal-fWUUqg69.js → Modal-yO0qzufQ.js} +2 -3
  165. package/build/server/chunks/Modal-yO0qzufQ.js.map +1 -0
  166. package/build/server/chunks/{Panel-BXokpC3w.js → Panel-D9GzVDDt.js} +7 -12
  167. package/build/server/chunks/Panel-D9GzVDDt.js.map +1 -0
  168. package/build/server/chunks/{PrettyJson-CV4qF02W.js → PrettyJson-CzzntSVh.js} +15 -10
  169. package/build/server/chunks/PrettyJson-CzzntSVh.js.map +1 -0
  170. package/build/server/chunks/{Tooltip-1tZ4BUxU.js → Tooltip-D2BX7dwq.js} +2 -2
  171. package/build/server/chunks/Tooltip-D2BX7dwq.js.map +1 -0
  172. package/build/server/chunks/{TooltipTable-B2QGp4YW.js → TooltipTable-91W9LxGR.js} +3 -4
  173. package/build/server/chunks/TooltipTable-91W9LxGR.js.map +1 -0
  174. package/build/server/chunks/{_layout.svelte-DAGMbkJX.js → _layout.svelte-BFxKanne.js} +28 -24
  175. package/build/server/chunks/_layout.svelte-BFxKanne.js.map +1 -0
  176. package/build/server/chunks/{_page.svelte-DgQxD9T8.js → _page.svelte-CQzzieEo.js} +16 -18
  177. package/build/server/chunks/_page.svelte-CQzzieEo.js.map +1 -0
  178. package/build/server/chunks/_page.svelte-CSuE9bVi.js +14 -0
  179. package/build/server/chunks/_page.svelte-CSuE9bVi.js.map +1 -0
  180. package/build/server/chunks/{_page.svelte-DfZ2COw_.js → _page.svelte-CnboYQ1K.js} +11 -73
  181. package/build/server/chunks/_page.svelte-CnboYQ1K.js.map +1 -0
  182. package/build/server/chunks/{_page.svelte-ClakOyno.js → _page.svelte-D41VQj4U.js} +17 -19
  183. package/build/server/chunks/_page.svelte-D41VQj4U.js.map +1 -0
  184. package/build/server/chunks/{_page.svelte-CB9ZXhBt.js → _page.svelte-Dg71nX8A.js} +117 -97
  185. package/build/server/chunks/_page.svelte-Dg71nX8A.js.map +1 -0
  186. package/build/server/chunks/{_page.svelte-BUqI0nM9.js → _page.svelte-DxlZXLVf.js} +17 -19
  187. package/build/server/chunks/_page.svelte-DxlZXLVf.js.map +1 -0
  188. package/build/server/chunks/{_page.svelte-Ccc0KJ66.js → _page.svelte-SZxwc25D.js} +45 -39
  189. package/build/server/chunks/_page.svelte-SZxwc25D.js.map +1 -0
  190. package/build/server/chunks/{_page.svelte-wmgrrvR7.js → _page.svelte-THKAhY4k.js} +48 -51
  191. package/build/server/chunks/_page.svelte-THKAhY4k.js.map +1 -0
  192. package/build/server/chunks/_server.ts-B3lXxheE.js +15 -0
  193. package/build/server/chunks/_server.ts-B3lXxheE.js.map +1 -0
  194. package/build/server/chunks/_server.ts-Bs5HC7Wf.js +46 -0
  195. package/build/server/chunks/_server.ts-Bs5HC7Wf.js.map +1 -0
  196. package/build/server/chunks/_server.ts-DRL9sDg4.js +34 -0
  197. package/build/server/chunks/_server.ts-DRL9sDg4.js.map +1 -0
  198. package/build/server/chunks/_server.ts-DqL5edUL.js +24 -0
  199. package/build/server/chunks/_server.ts-DqL5edUL.js.map +1 -0
  200. package/build/server/chunks/client-C7bEwskR.js +7 -0
  201. package/build/server/chunks/{client-BCfAqu0g.js.map → client-C7bEwskR.js.map} +1 -1
  202. package/build/server/chunks/{client2-B-hc4vU8.js → client2-DcCKOWWC.js} +6 -6
  203. package/build/server/chunks/client2-DcCKOWWC.js.map +1 -0
  204. package/build/server/chunks/error.svelte-Bk-0XnBt.js +18 -0
  205. package/build/server/chunks/error.svelte-Bk-0XnBt.js.map +1 -0
  206. package/build/server/chunks/exports-B5ORJhfK.js +65 -0
  207. package/build/server/chunks/exports-B5ORJhfK.js.map +1 -0
  208. package/build/server/chunks/{filters-CbFjTNFI.js → filters-B3U8Nh9P.js} +16 -6
  209. package/build/server/chunks/filters-B3U8Nh9P.js.map +1 -0
  210. package/build/server/chunks/hooks.server-Cq7ufuFU.js +79 -0
  211. package/build/server/chunks/hooks.server-Cq7ufuFU.js.map +1 -0
  212. package/build/server/chunks/{index2-CJE0QJlP.js → index-CC9WtE-y.js} +3 -13
  213. package/build/server/chunks/index-CC9WtE-y.js.map +1 -0
  214. package/build/server/chunks/index-wpIsICWW.js.map +1 -1
  215. package/build/server/chunks/{index3-CQyDuV4f.js → index2-DMabdSHV.js} +3 -3
  216. package/build/server/chunks/index2-DMabdSHV.js.map +1 -0
  217. package/build/server/chunks/{logger-KF6KpVP6.js → logger-PfH_grbh.js} +4 -3
  218. package/build/server/chunks/logger-PfH_grbh.js.map +1 -0
  219. package/build/server/chunks/{mongo-CpQtfvt6.js → mongo-B92d7zNj.js} +25 -24
  220. package/build/server/chunks/mongo-B92d7zNj.js.map +1 -0
  221. package/build/server/chunks/oauth-BfIECOev.js +178 -0
  222. package/build/server/chunks/oauth-BfIECOev.js.map +1 -0
  223. package/build/server/chunks/remote-xxtqbu-D0yn6nhQ.js +22 -0
  224. package/build/server/chunks/remote-xxtqbu-D0yn6nhQ.js.map +1 -0
  225. package/build/server/chunks/{routing-BdGCua8Q.js → routing-CYknP78v.js} +23 -4
  226. package/build/server/chunks/routing-CYknP78v.js.map +1 -0
  227. package/build/server/chunks/{server2-CkPmd3Rb.js → server2-uigtM6st.js} +3 -3
  228. package/build/server/chunks/server2-uigtM6st.js.map +1 -0
  229. package/build/server/chunks/{servers.remote-OwAA4KJJ.js → servers.remote-BhpVo4Zs.js} +67 -42
  230. package/build/server/chunks/servers.remote-BhpVo4Zs.js.map +1 -0
  231. package/build/server/chunks/shared-BqTYMAzZ.js +1027 -0
  232. package/build/server/chunks/shared-BqTYMAzZ.js.map +1 -0
  233. package/build/server/chunks/shared-server-BmU87nph.js +11 -0
  234. package/build/server/chunks/shared-server-BmU87nph.js.map +1 -0
  235. package/build/server/chunks/{state.svelte-BfzDwKMC.js → state.svelte-Dzb7Lf2r.js} +2 -3
  236. package/build/server/chunks/state.svelte-Dzb7Lf2r.js.map +1 -0
  237. package/build/server/chunks/url-hmE1zcJ6.js +4721 -0
  238. package/build/server/chunks/url-hmE1zcJ6.js.map +1 -0
  239. package/build/server/chunks/{utils-kjxf7BZO.js → utils2-kjxf7BZO.js} +1 -1
  240. package/build/server/chunks/utils2-kjxf7BZO.js.map +1 -0
  241. package/build/server/index.js +381 -3466
  242. package/build/server/index.js.map +1 -1
  243. package/build/server/manifest.js +52 -23
  244. package/build/server/manifest.js.map +1 -1
  245. package/cli.ts +4 -0
  246. package/dist/cli.js +3 -0
  247. package/ecosystem.config.js +3 -0
  248. package/package.json +2 -2
  249. package/src/api/servers.remote.ts +20 -8
  250. package/src/app.d.ts +5 -0
  251. package/src/hooks.server.ts +38 -17
  252. package/src/lib/actions/jsonTextarea.ts +24 -8
  253. package/src/lib/actions/portal.ts +12 -5
  254. package/src/lib/components/ExplainPanel.svelte +42 -14
  255. package/src/lib/components/JsonValue.svelte +12 -4
  256. package/src/lib/components/PrettyJson.svelte +12 -4
  257. package/src/lib/components/ReplicaSetSelector.svelte +3 -1
  258. package/src/lib/components/SearchBox.svelte +12 -4
  259. package/src/lib/components/Tooltip.svelte +1 -1
  260. package/src/lib/server/HostsManager.ts +8 -17
  261. package/src/lib/server/logger.ts +4 -4
  262. package/src/lib/server/mongo.ts +17 -12
  263. package/src/lib/server/oauth.ts +276 -0
  264. package/src/lib/utils/filters.ts +15 -5
  265. package/src/lib/utils/formatSignificantDigits.ts +3 -1
  266. package/src/lib/utils/formatTimeAgo.ts +3 -1
  267. package/src/lib/utils/hostnames.ts +15 -5
  268. package/src/lib/utils/jsonParser.ts +21 -7
  269. package/src/lib/utils/longestCommonSuffix.ts +3 -1
  270. package/src/routes/+layout.server.ts +5 -1
  271. package/src/routes/+layout.svelte +16 -1
  272. package/src/routes/.well-known/cimd.json/+server.ts +34 -0
  273. package/src/routes/auth/callback/+server.ts +57 -0
  274. package/src/routes/auth/login/+server.ts +29 -0
  275. package/src/routes/auth/logout/+page.svelte +9 -0
  276. package/src/routes/auth/logout/+server.ts +9 -0
  277. package/src/routes/servers/+page.svelte +9 -4
  278. package/src/routes/servers/[server]/databases/+page.svelte +3 -1
  279. package/src/routes/servers/[server]/databases/[database]/collections/+page.svelte +3 -1
  280. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/documents/+page.svelte +3 -1
  281. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/documents/[document]/+page.svelte +9 -6
  282. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/indexes/+page.svelte +18 -6
  283. package/src/routes/servers/[server]/databases/[database]/collections/[collection]/mappings/+page.svelte +3 -1
  284. package/build/client/_app/immutable/assets/0.Bg-3Xsxo.css +0 -1
  285. package/build/client/_app/immutable/assets/0.Bg-3Xsxo.css.br +0 -0
  286. package/build/client/_app/immutable/assets/0.Bg-3Xsxo.css.gz +0 -0
  287. package/build/client/_app/immutable/chunks/2G5jukcB.js +0 -1
  288. package/build/client/_app/immutable/chunks/2G5jukcB.js.br +0 -0
  289. package/build/client/_app/immutable/chunks/2G5jukcB.js.gz +0 -0
  290. package/build/client/_app/immutable/chunks/B5NTIIm5.js.br +0 -0
  291. package/build/client/_app/immutable/chunks/B5NTIIm5.js.gz +0 -0
  292. package/build/client/_app/immutable/chunks/BEi7QatZ.js.br +0 -0
  293. package/build/client/_app/immutable/chunks/BEi7QatZ.js.gz +0 -0
  294. package/build/client/_app/immutable/chunks/BOZBLPYr.js +0 -1
  295. package/build/client/_app/immutable/chunks/BOZBLPYr.js.br +0 -0
  296. package/build/client/_app/immutable/chunks/BOZBLPYr.js.gz +0 -0
  297. package/build/client/_app/immutable/chunks/BUr91kOw.js +0 -1
  298. package/build/client/_app/immutable/chunks/BUr91kOw.js.br +0 -0
  299. package/build/client/_app/immutable/chunks/BUr91kOw.js.gz +0 -0
  300. package/build/client/_app/immutable/chunks/BYPjaq07.js +0 -1
  301. package/build/client/_app/immutable/chunks/BYPjaq07.js.br +0 -0
  302. package/build/client/_app/immutable/chunks/BYPjaq07.js.gz +0 -0
  303. package/build/client/_app/immutable/chunks/BZagxdqB.js +0 -16
  304. package/build/client/_app/immutable/chunks/BZagxdqB.js.br +0 -0
  305. package/build/client/_app/immutable/chunks/BZagxdqB.js.gz +0 -0
  306. package/build/client/_app/immutable/chunks/Bh2n5Bfy.js.br +0 -0
  307. package/build/client/_app/immutable/chunks/Bh2n5Bfy.js.gz +0 -0
  308. package/build/client/_app/immutable/chunks/Bl8s7Z6r.js.br +0 -1
  309. package/build/client/_app/immutable/chunks/Bl8s7Z6r.js.gz +0 -0
  310. package/build/client/_app/immutable/chunks/BnpHJF5-.js +0 -2
  311. package/build/client/_app/immutable/chunks/BnpHJF5-.js.br +0 -0
  312. package/build/client/_app/immutable/chunks/BnpHJF5-.js.gz +0 -0
  313. package/build/client/_app/immutable/chunks/C2amz0TU.js.br +0 -0
  314. package/build/client/_app/immutable/chunks/C2amz0TU.js.gz +0 -0
  315. package/build/client/_app/immutable/chunks/C93uPVVn.js +0 -1
  316. package/build/client/_app/immutable/chunks/C93uPVVn.js.br +0 -0
  317. package/build/client/_app/immutable/chunks/C93uPVVn.js.gz +0 -0
  318. package/build/client/_app/immutable/chunks/CXNtxrhs.js +0 -1
  319. package/build/client/_app/immutable/chunks/CXNtxrhs.js.br +0 -0
  320. package/build/client/_app/immutable/chunks/CXNtxrhs.js.gz +0 -0
  321. package/build/client/_app/immutable/chunks/Cc583CkD.js +0 -1
  322. package/build/client/_app/immutable/chunks/Cc583CkD.js.br +0 -0
  323. package/build/client/_app/immutable/chunks/Cc583CkD.js.gz +0 -0
  324. package/build/client/_app/immutable/chunks/CxcplU4Q.js.br +0 -0
  325. package/build/client/_app/immutable/chunks/CxcplU4Q.js.gz +0 -0
  326. package/build/client/_app/immutable/chunks/DDy-Kuac.js +0 -1
  327. package/build/client/_app/immutable/chunks/DDy-Kuac.js.br +0 -0
  328. package/build/client/_app/immutable/chunks/DDy-Kuac.js.gz +0 -0
  329. package/build/client/_app/immutable/chunks/DIDOrPa8.js +0 -41
  330. package/build/client/_app/immutable/chunks/DIDOrPa8.js.br +0 -0
  331. package/build/client/_app/immutable/chunks/DIDOrPa8.js.gz +0 -0
  332. package/build/client/_app/immutable/chunks/DJ7MgPmk.js +0 -4
  333. package/build/client/_app/immutable/chunks/DJ7MgPmk.js.br +0 -0
  334. package/build/client/_app/immutable/chunks/DJ7MgPmk.js.gz +0 -0
  335. package/build/client/_app/immutable/chunks/DUw-I2kh.js.br +0 -0
  336. package/build/client/_app/immutable/chunks/DUw-I2kh.js.gz +0 -0
  337. package/build/client/_app/immutable/chunks/DdLT9cdj.js.br +0 -0
  338. package/build/client/_app/immutable/chunks/DdLT9cdj.js.gz +0 -0
  339. package/build/client/_app/immutable/chunks/c-rWvg5T.js.br +0 -0
  340. package/build/client/_app/immutable/chunks/c-rWvg5T.js.gz +0 -0
  341. package/build/client/_app/immutable/chunks/hbftB6pI.js +0 -1
  342. package/build/client/_app/immutable/chunks/hbftB6pI.js.br +0 -0
  343. package/build/client/_app/immutable/chunks/hbftB6pI.js.gz +0 -0
  344. package/build/client/_app/immutable/entry/app.BvdA5xZX.js +0 -2
  345. package/build/client/_app/immutable/entry/app.BvdA5xZX.js.br +0 -0
  346. package/build/client/_app/immutable/entry/app.BvdA5xZX.js.gz +0 -0
  347. package/build/client/_app/immutable/entry/start.B47HTlUj.js +0 -1
  348. package/build/client/_app/immutable/entry/start.B47HTlUj.js.br +0 -2
  349. package/build/client/_app/immutable/entry/start.B47HTlUj.js.gz +0 -0
  350. package/build/client/_app/immutable/nodes/0.C-Qb2qV-.js +0 -1
  351. package/build/client/_app/immutable/nodes/0.C-Qb2qV-.js.br +0 -0
  352. package/build/client/_app/immutable/nodes/0.C-Qb2qV-.js.gz +0 -0
  353. package/build/client/_app/immutable/nodes/1.CbwunOOA.js +0 -1
  354. package/build/client/_app/immutable/nodes/1.CbwunOOA.js.br +0 -4
  355. package/build/client/_app/immutable/nodes/1.CbwunOOA.js.gz +0 -0
  356. package/build/client/_app/immutable/nodes/10.BONTXBU2.js +0 -6
  357. package/build/client/_app/immutable/nodes/10.BONTXBU2.js.br +0 -0
  358. package/build/client/_app/immutable/nodes/10.BONTXBU2.js.gz +0 -0
  359. package/build/client/_app/immutable/nodes/11.Bt-WKNEi.js +0 -1
  360. package/build/client/_app/immutable/nodes/11.Bt-WKNEi.js.br +0 -0
  361. package/build/client/_app/immutable/nodes/11.Bt-WKNEi.js.gz +0 -0
  362. package/build/client/_app/immutable/nodes/12.DtpUwyyZ.js +0 -1
  363. package/build/client/_app/immutable/nodes/12.DtpUwyyZ.js.br +0 -0
  364. package/build/client/_app/immutable/nodes/12.DtpUwyyZ.js.gz +0 -0
  365. package/build/client/_app/immutable/nodes/13.Ce307l0A.js +0 -65
  366. package/build/client/_app/immutable/nodes/13.Ce307l0A.js.br +0 -0
  367. package/build/client/_app/immutable/nodes/13.Ce307l0A.js.gz +0 -0
  368. package/build/client/_app/immutable/nodes/2.AM8fesja.js.br +0 -0
  369. package/build/client/_app/immutable/nodes/2.AM8fesja.js.gz +0 -0
  370. package/build/client/_app/immutable/nodes/3.BShuoOz5.js.br +0 -0
  371. package/build/client/_app/immutable/nodes/3.BShuoOz5.js.gz +0 -0
  372. package/build/client/_app/immutable/nodes/4.BD6QbApY.js.br +0 -0
  373. package/build/client/_app/immutable/nodes/4.BD6QbApY.js.gz +0 -0
  374. package/build/client/_app/immutable/nodes/5.JM_dwz0R.js.br +0 -0
  375. package/build/client/_app/immutable/nodes/5.JM_dwz0R.js.gz +0 -0
  376. package/build/client/_app/immutable/nodes/7.lTuFbCm_.js +0 -1
  377. package/build/client/_app/immutable/nodes/7.lTuFbCm_.js.br +0 -0
  378. package/build/client/_app/immutable/nodes/7.lTuFbCm_.js.gz +0 -0
  379. package/build/client/_app/immutable/nodes/8.DIWHKPrG.js +0 -1
  380. package/build/client/_app/immutable/nodes/8.DIWHKPrG.js.br +0 -0
  381. package/build/client/_app/immutable/nodes/8.DIWHKPrG.js.gz +0 -0
  382. package/build/client/_app/immutable/nodes/9.D6Tw6uKW.js +0 -2
  383. package/build/client/_app/immutable/nodes/9.D6Tw6uKW.js.br +0 -0
  384. package/build/client/_app/immutable/nodes/9.D6Tw6uKW.js.gz +0 -0
  385. package/build/server/chunks/0-BdG9Cl9W.js +0 -22
  386. package/build/server/chunks/0-BdG9Cl9W.js.map +0 -1
  387. package/build/server/chunks/1-BcZWKLgB.js +0 -9
  388. package/build/server/chunks/1-BcZWKLgB.js.map +0 -1
  389. package/build/server/chunks/10-WRjYTwFT.js.map +0 -1
  390. package/build/server/chunks/11-Cq79IAWK.js.map +0 -1
  391. package/build/server/chunks/12-DnRkeAVv.js.map +0 -1
  392. package/build/server/chunks/13-DKqDuEdB.js.map +0 -1
  393. package/build/server/chunks/6-DsYzHmsZ.js.map +0 -1
  394. package/build/server/chunks/7-eAzN1saI.js.map +0 -1
  395. package/build/server/chunks/8-Dtaxi2J_.js.map +0 -1
  396. package/build/server/chunks/9-DrDIAOIh.js.map +0 -1
  397. package/build/server/chunks/JsonValue-Dj3vYG5T.js +0 -366
  398. package/build/server/chunks/JsonValue-Dj3vYG5T.js.map +0 -1
  399. package/build/server/chunks/Modal-fWUUqg69.js.map +0 -1
  400. package/build/server/chunks/Panel-BXokpC3w.js.map +0 -1
  401. package/build/server/chunks/PrettyJson-CV4qF02W.js.map +0 -1
  402. package/build/server/chunks/Tooltip-1tZ4BUxU.js.map +0 -1
  403. package/build/server/chunks/TooltipTable-B2QGp4YW.js.map +0 -1
  404. package/build/server/chunks/_layout.svelte-DAGMbkJX.js.map +0 -1
  405. package/build/server/chunks/_page.svelte-BUqI0nM9.js.map +0 -1
  406. package/build/server/chunks/_page.svelte-CB9ZXhBt.js.map +0 -1
  407. package/build/server/chunks/_page.svelte-Ccc0KJ66.js.map +0 -1
  408. package/build/server/chunks/_page.svelte-ClakOyno.js.map +0 -1
  409. package/build/server/chunks/_page.svelte-DfZ2COw_.js.map +0 -1
  410. package/build/server/chunks/_page.svelte-DgQxD9T8.js.map +0 -1
  411. package/build/server/chunks/_page.svelte-wmgrrvR7.js.map +0 -1
  412. package/build/server/chunks/client-BCfAqu0g.js +0 -7
  413. package/build/server/chunks/client2-B-hc4vU8.js.map +0 -1
  414. package/build/server/chunks/context-8UI9xWgq.js +0 -92
  415. package/build/server/chunks/context-8UI9xWgq.js.map +0 -1
  416. package/build/server/chunks/error.svelte-hj6GNaOv.js +0 -19
  417. package/build/server/chunks/error.svelte-hj6GNaOv.js.map +0 -1
  418. package/build/server/chunks/event-DVH-6ISX.js +0 -64
  419. package/build/server/chunks/event-DVH-6ISX.js.map +0 -1
  420. package/build/server/chunks/exports-CtTNDGe5.js +0 -161
  421. package/build/server/chunks/exports-CtTNDGe5.js.map +0 -1
  422. package/build/server/chunks/filters-CbFjTNFI.js.map +0 -1
  423. package/build/server/chunks/hooks.server-DRPXFQlL.js +0 -53
  424. package/build/server/chunks/hooks.server-DRPXFQlL.js.map +0 -1
  425. package/build/server/chunks/index-DOCFW0vv.js +0 -1355
  426. package/build/server/chunks/index-DOCFW0vv.js.map +0 -1
  427. package/build/server/chunks/index2-CJE0QJlP.js.map +0 -1
  428. package/build/server/chunks/index3-CQyDuV4f.js.map +0 -1
  429. package/build/server/chunks/logger-KF6KpVP6.js.map +0 -1
  430. package/build/server/chunks/mongo-CpQtfvt6.js.map +0 -1
  431. package/build/server/chunks/remote-xxtqbu-CbTWQ3bq.js +0 -21
  432. package/build/server/chunks/remote-xxtqbu-CbTWQ3bq.js.map +0 -1
  433. package/build/server/chunks/routing-BdGCua8Q.js.map +0 -1
  434. package/build/server/chunks/server2-CkPmd3Rb.js.map +0 -1
  435. package/build/server/chunks/servers.remote-OwAA4KJJ.js.map +0 -1
  436. package/build/server/chunks/shared-w5gO1Cte.js +0 -446
  437. package/build/server/chunks/shared-w5gO1Cte.js.map +0 -1
  438. package/build/server/chunks/state.svelte-BfzDwKMC.js.map +0 -1
  439. package/build/server/chunks/utils-kjxf7BZO.js.map +0 -1
  440. package/build/server/chunks/utils2-DrnJY_bz.js +0 -91
  441. package/build/server/chunks/utils2-DrnJY_bz.js.map +0 -1
  442. /package/build/client/_app/immutable/assets/{10.Wc4MTSzM.css → 11.Wc4MTSzM.css} +0 -0
  443. /package/build/client/_app/immutable/assets/{10.Wc4MTSzM.css.br → 11.Wc4MTSzM.css.br} +0 -0
  444. /package/build/client/_app/immutable/assets/{10.Wc4MTSzM.css.gz → 11.Wc4MTSzM.css.gz} +0 -0
  445. /package/build/client/_app/immutable/assets/{11.CEtFGlZU.css → 12.CEtFGlZU.css} +0 -0
  446. /package/build/client/_app/immutable/assets/{11.CEtFGlZU.css.br → 12.CEtFGlZU.css.br} +0 -0
  447. /package/build/client/_app/immutable/assets/{11.CEtFGlZU.css.gz → 12.CEtFGlZU.css.gz} +0 -0
  448. /package/build/client/_app/immutable/assets/{12.I1sSDJ6i.css → 13.I1sSDJ6i.css} +0 -0
  449. /package/build/client/_app/immutable/assets/{12.I1sSDJ6i.css.br → 13.I1sSDJ6i.css.br} +0 -0
  450. /package/build/client/_app/immutable/assets/{12.I1sSDJ6i.css.gz → 13.I1sSDJ6i.css.gz} +0 -0
  451. /package/build/client/_app/immutable/assets/{7.CRKE8WvY.css → 8.CRKE8WvY.css} +0 -0
  452. /package/build/client/_app/immutable/assets/{7.CRKE8WvY.css.br → 8.CRKE8WvY.css.br} +0 -0
  453. /package/build/client/_app/immutable/assets/{7.CRKE8WvY.css.gz → 8.CRKE8WvY.css.gz} +0 -0
@@ -0,0 +1,46 @@
1
+ import { b as base } from './server-Crjo4w1q.js';
2
+ import './url-hmE1zcJ6.js';
3
+ import { g as getOAuthConfig, c as cookieOptions, e as exchangeCode, a as getCallbackUrl, b as extractUserFromIdToken, d as createSessionCookie } from './oauth-BfIECOev.js';
4
+ import { r as redirect, e as error } from './index-wpIsICWW.js';
5
+ import './async-lVJA8xJZ.js';
6
+ import './shared-server-BmU87nph.js';
7
+ import 'node:crypto';
8
+
9
+ const GET = async ({ url, cookies }) => {
10
+ const config = await getOAuthConfig();
11
+ if (!config) {
12
+ redirect(302, `${base}/`);
13
+ }
14
+ const oauthError = url.searchParams.get("error");
15
+ if (oauthError) {
16
+ error(403, url.searchParams.get("error_description") || oauthError);
17
+ }
18
+ const code = url.searchParams.get("code");
19
+ const state = url.searchParams.get("state");
20
+ if (!code || !state) {
21
+ error(400, "Missing code or state parameter");
22
+ }
23
+ const storedState = cookies.get("mongoku_pkce_state");
24
+ const storedVerifier = cookies.get("mongoku_pkce_verifier");
25
+ if (!storedState || !storedVerifier) {
26
+ error(400, "Missing OAuth cookies — please try logging in again");
27
+ }
28
+ if (state !== storedState) {
29
+ error(403, "Invalid OAuth state");
30
+ }
31
+ cookies.delete("mongoku_pkce_state", cookieOptions(url));
32
+ cookies.delete("mongoku_pkce_verifier", cookieOptions(url));
33
+ const tokens = await exchangeCode(config, url.origin, code, storedVerifier, getCallbackUrl(url.origin));
34
+ let user = {};
35
+ if (tokens.id_token) {
36
+ user = extractUserFromIdToken(tokens.id_token);
37
+ }
38
+ if (config.allowedSubs && (!user.sub || !config.allowedSubs.has(user.sub))) {
39
+ error(403, "Your account is not authorized to access this application");
40
+ }
41
+ cookies.set("mongoku_session", createSessionCookie(config, user), cookieOptions(url, config.sessionDuration));
42
+ redirect(302, `${base}/`);
43
+ };
44
+
45
+ export { GET };
46
+ //# sourceMappingURL=_server.ts-Bs5HC7Wf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_server.ts-Bs5HC7Wf.js","sources":["../../../.svelte-kit/adapter-node/entries/endpoints/auth/callback/_server.ts.js"],"sourcesContent":["import { b as base } from \"../../../../chunks/server.js\";\nimport \"../../../../chunks/url.js\";\nimport \"@sveltejs/kit/internal/server\";\nimport \"../../../../chunks/root.js\";\nimport { g as getOAuthConfig, c as cookieOptions, e as exchangeCode, a as getCallbackUrl, b as extractUserFromIdToken, d as createSessionCookie } from \"../../../../chunks/oauth.js\";\nimport { redirect, error } from \"@sveltejs/kit\";\nconst GET = async ({ url, cookies }) => {\n const config = await getOAuthConfig();\n if (!config) {\n redirect(302, `${base}/`);\n }\n const oauthError = url.searchParams.get(\"error\");\n if (oauthError) {\n error(403, url.searchParams.get(\"error_description\") || oauthError);\n }\n const code = url.searchParams.get(\"code\");\n const state = url.searchParams.get(\"state\");\n if (!code || !state) {\n error(400, \"Missing code or state parameter\");\n }\n const storedState = cookies.get(\"mongoku_pkce_state\");\n const storedVerifier = cookies.get(\"mongoku_pkce_verifier\");\n if (!storedState || !storedVerifier) {\n error(400, \"Missing OAuth cookies — please try logging in again\");\n }\n if (state !== storedState) {\n error(403, \"Invalid OAuth state\");\n }\n cookies.delete(\"mongoku_pkce_state\", cookieOptions(url));\n cookies.delete(\"mongoku_pkce_verifier\", cookieOptions(url));\n const tokens = await exchangeCode(config, url.origin, code, storedVerifier, getCallbackUrl(url.origin));\n let user = {};\n if (tokens.id_token) {\n user = extractUserFromIdToken(tokens.id_token);\n }\n if (config.allowedSubs && (!user.sub || !config.allowedSubs.has(user.sub))) {\n error(403, \"Your account is not authorized to access this application\");\n }\n cookies.set(\"mongoku_session\", createSessionCookie(config, user), cookieOptions(url, config.sessionDuration));\n redirect(302, `${base}/`);\n};\nexport {\n GET\n};\n"],"names":[],"mappings":";;;;;;;;AAMK,MAAC,GAAG,GAAG,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK;AACxC,EAAE,MAAM,MAAM,GAAG,MAAM,cAAc,EAAE;AACvC,EAAE,IAAI,CAAC,MAAM,EAAE;AACf,IAAI,QAAQ,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,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AAG,EAAE;AACf,EAAE,IAAI,MAAM,CAAC,QAAQ,EAAE;AACvB,IAAI,IAAI,GAAG,sBAAsB,CAAC,MAAM,CAAC,QAAQ,CAAC;AAClD,EAAE;AACF,EAAE,IAAI,MAAM,CAAC,WAAW,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE;AAC9E,IAAI,KAAK,CAAC,GAAG,EAAE,2DAA2D,CAAC;AAC3E,EAAE;AACF,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC,eAAe,CAAC,CAAC;AAC/G,EAAE,QAAQ,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC3B;;;;"}
@@ -0,0 +1,34 @@
1
+ import { b as base } from './server-Crjo4w1q.js';
2
+ import './url-hmE1zcJ6.js';
3
+ import { g as getOAuthConfig, O as OAUTH_CIMD_CLIENT_ID, a as getCallbackUrl } from './oauth-BfIECOev.js';
4
+ import './async-lVJA8xJZ.js';
5
+ import './shared-server-BmU87nph.js';
6
+ import 'node:crypto';
7
+
8
+ const GET = async ({ url }) => {
9
+ const config = await getOAuthConfig();
10
+ if (!config) {
11
+ return new Response("OAuth is not configured", { status: 404 });
12
+ }
13
+ if (config.clientId !== OAUTH_CIMD_CLIENT_ID) {
14
+ return new Response("CIMD is disabled", { status: 404 });
15
+ }
16
+ return new Response(
17
+ JSON.stringify({
18
+ client_id: new URL(url.pathname, url.origin).toString(),
19
+ client_name: "Mongoku",
20
+ client_uri: `${url.origin}${base}`,
21
+ redirect_uris: [getCallbackUrl(url.origin)],
22
+ token_endpoint_auth_method: "none",
23
+ scope: config.scopes
24
+ }),
25
+ {
26
+ headers: {
27
+ "Content-Type": "application/json"
28
+ }
29
+ }
30
+ );
31
+ };
32
+
33
+ export { GET };
34
+ //# sourceMappingURL=_server.ts-DRL9sDg4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_server.ts-DRL9sDg4.js","sources":["../../../.svelte-kit/adapter-node/entries/endpoints/.well-known/cimd.json/_server.ts.js"],"sourcesContent":["import { b as base } from \"../../../../chunks/server.js\";\nimport \"../../../../chunks/url.js\";\nimport \"@sveltejs/kit/internal/server\";\nimport \"../../../../chunks/root.js\";\nimport { g as getOAuthConfig, O as OAUTH_CIMD_CLIENT_ID, a as getCallbackUrl } from \"../../../../chunks/oauth.js\";\nconst GET = async ({ url }) => {\n const config = await getOAuthConfig();\n if (!config) {\n return new Response(\"OAuth is not configured\", { status: 404 });\n }\n if (config.clientId !== OAUTH_CIMD_CLIENT_ID) {\n return new Response(\"CIMD is disabled\", { status: 404 });\n }\n return new Response(\n JSON.stringify({\n client_id: new URL(url.pathname, url.origin).toString(),\n client_name: \"Mongoku\",\n client_uri: `${url.origin}${base}`,\n redirect_uris: [getCallbackUrl(url.origin)],\n token_endpoint_auth_method: \"none\",\n scope: config.scopes\n }),\n {\n headers: {\n \"Content-Type\": \"application/json\"\n }\n }\n );\n};\nexport {\n GET\n};\n"],"names":[],"mappings":";;;;;;;AAKK,MAAC,GAAG,GAAG,OAAO,EAAE,GAAG,EAAE,KAAK;AAC/B,EAAE,MAAM,MAAM,GAAG,MAAM,cAAc,EAAE;AACvC,EAAE,IAAI,CAAC,MAAM,EAAE;AACf,IAAI,OAAO,IAAI,QAAQ,CAAC,yBAAyB,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AACnE,EAAE;AACF,EAAE,IAAI,MAAM,CAAC,QAAQ,KAAK,oBAAoB,EAAE;AAChD,IAAI,OAAO,IAAI,QAAQ,CAAC,kBAAkB,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AAC5D,EAAE;AACF,EAAE,OAAO,IAAI,QAAQ;AACrB,IAAI,IAAI,CAAC,SAAS,CAAC;AACnB,MAAM,SAAS,EAAE,IAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;AAC7D,MAAM,WAAW,EAAE,SAAS;AAC5B,MAAM,UAAU,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC;AACxC,MAAM,aAAa,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACjD,MAAM,0BAA0B,EAAE,MAAM;AACxC,MAAM,KAAK,EAAE,MAAM,CAAC;AACpB,KAAK,CAAC;AACN,IAAI;AACJ,MAAM,OAAO,EAAE;AACf,QAAQ,cAAc,EAAE;AACxB;AACA;AACA,GAAG;AACH;;;;"}
@@ -0,0 +1,24 @@
1
+ import { b as base } from './server-Crjo4w1q.js';
2
+ import './url-hmE1zcJ6.js';
3
+ import { g as getOAuthConfig, f as generateCodeVerifier, h as generateCodeChallenge, i as generateState, a as getCallbackUrl, c as cookieOptions, j as buildAuthorizationUrl } from './oauth-BfIECOev.js';
4
+ import { r as redirect } from './index-wpIsICWW.js';
5
+ import './async-lVJA8xJZ.js';
6
+ import './shared-server-BmU87nph.js';
7
+ import 'node:crypto';
8
+
9
+ const GET = async ({ url, cookies }) => {
10
+ const config = await getOAuthConfig();
11
+ if (!config) {
12
+ redirect(302, `${base}/`);
13
+ }
14
+ const codeVerifier = generateCodeVerifier();
15
+ const codeChallenge = generateCodeChallenge(codeVerifier);
16
+ const state = generateState();
17
+ const callbackUrl = getCallbackUrl(url.origin);
18
+ cookies.set("mongoku_pkce_verifier", codeVerifier, cookieOptions(url, 300));
19
+ cookies.set("mongoku_pkce_state", state, cookieOptions(url, 300));
20
+ redirect(302, buildAuthorizationUrl(config, url.origin, callbackUrl, codeChallenge, state));
21
+ };
22
+
23
+ export { GET };
24
+ //# sourceMappingURL=_server.ts-DqL5edUL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_server.ts-DqL5edUL.js","sources":["../../../.svelte-kit/adapter-node/entries/endpoints/auth/login/_server.ts.js"],"sourcesContent":["import { b as base } from \"../../../../chunks/server.js\";\nimport \"../../../../chunks/url.js\";\nimport \"@sveltejs/kit/internal/server\";\nimport \"../../../../chunks/root.js\";\nimport { g as getOAuthConfig, f as generateCodeVerifier, h as generateCodeChallenge, i as generateState, a as getCallbackUrl, c as cookieOptions, j as buildAuthorizationUrl } from \"../../../../chunks/oauth.js\";\nimport { redirect } from \"@sveltejs/kit\";\nconst GET = async ({ url, cookies }) => {\n const config = await getOAuthConfig();\n if (!config) {\n redirect(302, `${base}/`);\n }\n const codeVerifier = generateCodeVerifier();\n const codeChallenge = generateCodeChallenge(codeVerifier);\n const state = generateState();\n const callbackUrl = getCallbackUrl(url.origin);\n cookies.set(\"mongoku_pkce_verifier\", codeVerifier, cookieOptions(url, 300));\n cookies.set(\"mongoku_pkce_state\", state, cookieOptions(url, 300));\n redirect(302, buildAuthorizationUrl(config, url.origin, callbackUrl, codeChallenge, state));\n};\nexport {\n GET\n};\n"],"names":[],"mappings":";;;;;;;;AAMK,MAAC,GAAG,GAAG,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK;AACxC,EAAE,MAAM,MAAM,GAAG,MAAM,cAAc,EAAE;AACvC,EAAE,IAAI,CAAC,MAAM,EAAE;AACf,IAAI,QAAQ,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC7B,EAAE;AACF,EAAE,MAAM,YAAY,GAAG,oBAAoB,EAAE;AAC7C,EAAE,MAAM,aAAa,GAAG,qBAAqB,CAAC,YAAY,CAAC;AAC3D,EAAE,MAAM,KAAK,GAAG,aAAa,EAAE;AAC/B,EAAE,MAAM,WAAW,GAAG,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC;AAChD,EAAE,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,YAAY,EAAE,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAC7E,EAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,KAAK,EAAE,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AACnE,EAAE,QAAQ,CAAC,GAAG,EAAE,qBAAqB,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC;AAC7F;;;;"}
@@ -0,0 +1,7 @@
1
+ import './state.svelte-Dzb7Lf2r.js';
2
+ import { s as stores } from './client2-DcCKOWWC.js';
3
+
4
+ ({
5
+ check: stores.updated.check
6
+ });
7
+ //# sourceMappingURL=client-C7bEwskR.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-BCfAqu0g.js","sources":["../../../.svelte-kit/adapter-node/chunks/client.js"],"sourcesContent":["import \"./state.svelte.js\";\nimport { s as stores } from \"./client2.js\";\n({\n check: stores.updated.check\n});\n"],"names":[],"mappings":";;;AAEA,CAAC;AACD,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC;AACxB,CAAC"}
1
+ {"version":3,"file":"client-C7bEwskR.js","sources":["../../../.svelte-kit/adapter-node/chunks/client.js"],"sourcesContent":["import \"./state.svelte.js\";\nimport { s as stores } from \"./client2.js\";\n({\n check: stores.updated.check\n});\n"],"names":[],"mappings":";;;AAEA,CAAC;AACD,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC;AACxB,CAAC"}
@@ -1,8 +1,8 @@
1
- import './exports-CtTNDGe5.js';
2
- import './utils-kjxf7BZO.js';
3
- import { w as writable } from './index2-CJE0QJlP.js';
4
- import './event-DVH-6ISX.js';
5
- import './state.svelte-BfzDwKMC.js';
1
+ import './url-hmE1zcJ6.js';
2
+ import './utils2-kjxf7BZO.js';
3
+ import { w as writable } from './index-CC9WtE-y.js';
4
+ import './exports-B5ORJhfK.js';
5
+ import './state.svelte-Dzb7Lf2r.js';
6
6
 
7
7
  function create_updated_store() {
8
8
  const { set, subscribe } = writable(false);
@@ -24,4 +24,4 @@ function goto(url, opts = {}) {
24
24
  }
25
25
 
26
26
  export { goto as g, stores as s };
27
- //# sourceMappingURL=client2-B-hc4vU8.js.map
27
+ //# sourceMappingURL=client2-DcCKOWWC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client2-DcCKOWWC.js","sources":["../../../.svelte-kit/adapter-node/chunks/client2.js"],"sourcesContent":["import \"@sveltejs/kit/internal\";\nimport \"./url.js\";\nimport \"./utils2.js\";\nimport { w as writable } from \"./index.js\";\nimport \"@sveltejs/kit/internal/server\";\nimport \"./root.js\";\nimport \"./exports.js\";\nimport \"./state.svelte.js\";\nfunction create_updated_store() {\n const { set, subscribe } = writable(false);\n {\n return {\n subscribe,\n // eslint-disable-next-line @typescript-eslint/require-await\n check: async () => false\n };\n }\n}\nconst stores = {\n updated: /* @__PURE__ */ create_updated_store()\n};\nfunction goto(url, opts = {}) {\n {\n throw new Error(\"Cannot call goto(...) on the server\");\n }\n}\nexport {\n goto as g,\n stores as s\n};\n"],"names":[],"mappings":";;;;;;AAQA,SAAS,oBAAoB,GAAG;AAChC,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC;AAC5C,EAAE;AACF,IAAI,OAAO;AACX,MAAM,SAAS;AACf;AACA,MAAM,KAAK,EAAE,YAAY;AACzB,KAAK;AACL,EAAE;AACF;AACK,MAAC,MAAM,GAAG;AACf,EAAE,OAAO,kBAAkB,oBAAoB;AAC/C;AACA,SAAS,IAAI,CAAC,GAAG,EAAE,IAAI,GAAG,EAAE,EAAE;AAC9B,EAAE;AACF,IAAI,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC;AAC1D,EAAE;AACF;;;;"}
@@ -0,0 +1,18 @@
1
+ import './async-lVJA8xJZ.js';
2
+ import { e as escape_html } from './url-hmE1zcJ6.js';
3
+ import { p as page } from './index2-DMabdSHV.js';
4
+ import './client-C7bEwskR.js';
5
+ import './state.svelte-Dzb7Lf2r.js';
6
+ import './client2-DcCKOWWC.js';
7
+ import './utils2-kjxf7BZO.js';
8
+ import './index-CC9WtE-y.js';
9
+ import './exports-B5ORJhfK.js';
10
+
11
+ function Error($$renderer, $$props) {
12
+ $$renderer.component(($$renderer2) => {
13
+ $$renderer2.push(`<h1>${escape_html(page.status)}</h1> <p>${escape_html(page.error?.message)}</p>`);
14
+ });
15
+ }
16
+
17
+ export { Error as default };
18
+ //# sourceMappingURL=error.svelte-Bk-0XnBt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.svelte-Bk-0XnBt.js","sources":["../../../.svelte-kit/adapter-node/entries/fallbacks/error.svelte.js"],"sourcesContent":["import \"../../chunks/async.js\";\nimport { b as escape_html } from \"../../chunks/root.js\";\nimport { p as page } from \"../../chunks/index2.js\";\nfunction Error($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n $$renderer2.push(`<h1>${escape_html(page.status)}</h1> <p>${escape_html(page.error?.message)}</p>`);\n });\n}\nexport {\n Error as default\n};\n"],"names":[],"mappings":";;;;;;;;;;AAGA,SAAS,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE;AACpC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,WAAW,KAAK;AACxC,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;AACvG,EAAE,CAAC,CAAC;AACJ;;;;"}
@@ -0,0 +1,65 @@
1
+ function validator(expected) {
2
+ function validate(module, file) {
3
+ if (!module) return;
4
+ for (const key in module) {
5
+ if (key[0] === "_" || expected.has(key)) continue;
6
+ const values = [...expected.values()];
7
+ const hint = hint_for_supported_files(key, file?.slice(file.lastIndexOf("."))) ?? `valid exports are ${values.join(", ")}, or anything with a '_' prefix`;
8
+ throw new Error(`Invalid export '${key}'${file ? ` in ${file}` : ""} (${hint})`);
9
+ }
10
+ }
11
+ return validate;
12
+ }
13
+ function hint_for_supported_files(key, ext = ".js") {
14
+ const supported_files = [];
15
+ if (valid_layout_exports.has(key)) {
16
+ supported_files.push(`+layout${ext}`);
17
+ }
18
+ if (valid_page_exports.has(key)) {
19
+ supported_files.push(`+page${ext}`);
20
+ }
21
+ if (valid_layout_server_exports.has(key)) {
22
+ supported_files.push(`+layout.server${ext}`);
23
+ }
24
+ if (valid_page_server_exports.has(key)) {
25
+ supported_files.push(`+page.server${ext}`);
26
+ }
27
+ if (valid_server_exports.has(key)) {
28
+ supported_files.push(`+server${ext}`);
29
+ }
30
+ if (supported_files.length > 0) {
31
+ return `'${key}' is a valid export in ${supported_files.slice(0, -1).join(", ")}${supported_files.length > 1 ? " or " : ""}${supported_files.at(-1)}`;
32
+ }
33
+ }
34
+ const valid_layout_exports = /* @__PURE__ */ new Set([
35
+ "load",
36
+ "prerender",
37
+ "csr",
38
+ "ssr",
39
+ "trailingSlash",
40
+ "config"
41
+ ]);
42
+ const valid_page_exports = /* @__PURE__ */ new Set([...valid_layout_exports, "entries"]);
43
+ const valid_layout_server_exports = /* @__PURE__ */ new Set([...valid_layout_exports]);
44
+ const valid_page_server_exports = /* @__PURE__ */ new Set([...valid_layout_server_exports, "actions", "entries"]);
45
+ const valid_server_exports = /* @__PURE__ */ new Set([
46
+ "GET",
47
+ "POST",
48
+ "PATCH",
49
+ "PUT",
50
+ "DELETE",
51
+ "OPTIONS",
52
+ "HEAD",
53
+ "fallback",
54
+ "prerender",
55
+ "trailingSlash",
56
+ "config",
57
+ "entries"
58
+ ]);
59
+ const validate_layout_exports = validator(valid_layout_exports);
60
+ const validate_page_exports = validator(valid_page_exports);
61
+ const validate_layout_server_exports = validator(valid_layout_server_exports);
62
+ const validate_page_server_exports = validator(valid_page_server_exports);
63
+
64
+ export { validate_layout_exports as a, validate_page_server_exports as b, validate_page_exports as c, validate_layout_server_exports as v };
65
+ //# sourceMappingURL=exports-B5ORJhfK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exports-B5ORJhfK.js","sources":["../../../.svelte-kit/adapter-node/chunks/exports.js"],"sourcesContent":["function validator(expected) {\n function validate(module, file) {\n if (!module) return;\n for (const key in module) {\n if (key[0] === \"_\" || expected.has(key)) continue;\n const values = [...expected.values()];\n const hint = hint_for_supported_files(key, file?.slice(file.lastIndexOf(\".\"))) ?? `valid exports are ${values.join(\", \")}, or anything with a '_' prefix`;\n throw new Error(`Invalid export '${key}'${file ? ` in ${file}` : \"\"} (${hint})`);\n }\n }\n return validate;\n}\nfunction hint_for_supported_files(key, ext = \".js\") {\n const supported_files = [];\n if (valid_layout_exports.has(key)) {\n supported_files.push(`+layout${ext}`);\n }\n if (valid_page_exports.has(key)) {\n supported_files.push(`+page${ext}`);\n }\n if (valid_layout_server_exports.has(key)) {\n supported_files.push(`+layout.server${ext}`);\n }\n if (valid_page_server_exports.has(key)) {\n supported_files.push(`+page.server${ext}`);\n }\n if (valid_server_exports.has(key)) {\n supported_files.push(`+server${ext}`);\n }\n if (supported_files.length > 0) {\n return `'${key}' is a valid export in ${supported_files.slice(0, -1).join(\", \")}${supported_files.length > 1 ? \" or \" : \"\"}${supported_files.at(-1)}`;\n }\n}\nconst valid_layout_exports = /* @__PURE__ */ new Set([\n \"load\",\n \"prerender\",\n \"csr\",\n \"ssr\",\n \"trailingSlash\",\n \"config\"\n]);\nconst valid_page_exports = /* @__PURE__ */ new Set([...valid_layout_exports, \"entries\"]);\nconst valid_layout_server_exports = /* @__PURE__ */ new Set([...valid_layout_exports]);\nconst valid_page_server_exports = /* @__PURE__ */ new Set([...valid_layout_server_exports, \"actions\", \"entries\"]);\nconst valid_server_exports = /* @__PURE__ */ new Set([\n \"GET\",\n \"POST\",\n \"PATCH\",\n \"PUT\",\n \"DELETE\",\n \"OPTIONS\",\n \"HEAD\",\n \"fallback\",\n \"prerender\",\n \"trailingSlash\",\n \"config\",\n \"entries\"\n]);\nconst validate_layout_exports = validator(valid_layout_exports);\nconst validate_page_exports = validator(valid_page_exports);\nconst validate_layout_server_exports = validator(valid_layout_server_exports);\nconst validate_page_server_exports = validator(valid_page_server_exports);\nconst validate_server_exports = validator(valid_server_exports);\nexport {\n validate_layout_exports as a,\n validate_page_server_exports as b,\n validate_page_exports as c,\n validate_server_exports as d,\n validate_layout_server_exports as v\n};\n"],"names":[],"mappings":"AAAA,SAAS,SAAS,CAAC,QAAQ,EAAE;AAC7B,EAAE,SAAS,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE;AAClC,IAAI,IAAI,CAAC,MAAM,EAAE;AACjB,IAAI,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;AAC9B,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;AAC/C,MAAM,MAAM,MAAM,GAAG,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;AAC3C,MAAM,MAAM,IAAI,GAAG,wBAAwB,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,+BAA+B,CAAC;AAC/J,MAAM,MAAM,IAAI,KAAK,CAAC,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AACtF,IAAI;AACJ,EAAE;AACF,EAAE,OAAO,QAAQ;AACjB;AACA,SAAS,wBAAwB,CAAC,GAAG,EAAE,GAAG,GAAG,KAAK,EAAE;AACpD,EAAE,MAAM,eAAe,GAAG,EAAE;AAC5B,EAAE,IAAI,oBAAoB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;AAC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AG,CAAC,CAAC,GAAG,oBAAoB,EAAE,SAAS,CAAC,CAAC;AACxF,MAAM,2BAA2B,mBAAmB,IAAI,GAAG,CAAC,CAAC,GAAG,oBAAoB,CAAC,CAAC;AACtF,MAAM,yBAAyB,mBAAmB,IAAI,GAAG,CAAC,CAAC,GAAG,2BAA2B,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AACjH,MAAM,oBAAoB,mBAAmB,IAAI,GAAG,CAAC;AACrD,EAAE,KAAK;AACP,EAAE,MAAM;AACR,EAAE,OAAO;AACT,EAAE,KAAK;AACP,EAAE,QAAQ;AACV,EAAE,SAAS;AACX,EAAE,MAAM;AACR,EAAE,UAAU;AACZ,EAAE,WAAW;AACb,EAAE,eAAe;AACjB,EAAE,QAAQ;AACV,EAAE;AACF,CAAC,CAAC;AACG,MAAC,uBAAuB,GAAG,SAAS,CAAC,oBAAoB;AACzD,MAAC,qBAAqB,GAAG,SAAS,CAAC,kBAAkB;AACrD,MAAC,8BAA8B,GAAG,SAAS,CAAC,2BAA2B;AACvE,MAAC,4BAA4B,GAAG,SAAS,CAAC,yBAAyB;;;;"}
@@ -1,9 +1,19 @@
1
1
  function formatBytes(bytes) {
2
- if (bytes === 0) return "0 B";
3
- if (bytes < 1e3) return bytes + " B";
4
- if (bytes < 1e6) return (bytes / 1e3).toFixed(2) + " kB";
5
- if (bytes < 1e9) return (bytes / 1e6).toFixed(2) + " MB";
6
- if (bytes < 1e12) return (bytes / 1e9).toFixed(2) + " GB";
2
+ if (bytes === 0) {
3
+ return "0 B";
4
+ }
5
+ if (bytes < 1e3) {
6
+ return bytes + " B";
7
+ }
8
+ if (bytes < 1e6) {
9
+ return (bytes / 1e3).toFixed(2) + " kB";
10
+ }
11
+ if (bytes < 1e9) {
12
+ return (bytes / 1e6).toFixed(2) + " MB";
13
+ }
14
+ if (bytes < 1e12) {
15
+ return (bytes / 1e9).toFixed(2) + " GB";
16
+ }
7
17
  return (bytes / 1e12).toFixed(2) + " TB";
8
18
  }
9
19
  function formatNumber(num) {
@@ -22,4 +32,4 @@ function serverName(name) {
22
32
  }
23
33
 
24
34
  export { formatNumber as a, formatBytes as f, serverName as s };
25
- //# sourceMappingURL=filters-CbFjTNFI.js.map
35
+ //# sourceMappingURL=filters-B3U8Nh9P.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filters-B3U8Nh9P.js","sources":["../../../.svelte-kit/adapter-node/chunks/filters.js"],"sourcesContent":["function formatBytes(bytes) {\n if (bytes === 0) {\n return \"0 B\";\n }\n if (bytes < 1e3) {\n return bytes + \" B\";\n }\n if (bytes < 1e6) {\n return (bytes / 1e3).toFixed(2) + \" kB\";\n }\n if (bytes < 1e9) {\n return (bytes / 1e6).toFixed(2) + \" MB\";\n }\n if (bytes < 1e12) {\n return (bytes / 1e9).toFixed(2) + \" GB\";\n }\n return (bytes / 1e12).toFixed(2) + \" TB\";\n}\nfunction formatNumber(num) {\n return num.toLocaleString();\n}\nfunction serverName(name) {\n if (name.startsWith(\"mongodb://\") || name.startsWith(\"mongodb+srv://\")) {\n try {\n const url = new URL(name);\n return url.hostname;\n } catch {\n return name;\n }\n }\n return name;\n}\nexport {\n formatNumber as a,\n formatBytes as f,\n serverName as s\n};\n"],"names":[],"mappings":"AAAA,SAAS,WAAW,CAAC,KAAK,EAAE;AAC5B,EAAE,IAAI,KAAK,KAAK,CAAC,EAAE;AACnB,IAAI,OAAO,KAAK;AAChB,EAAE;AACF,EAAE,IAAI,KAAK,GAAG,GAAG,EAAE;AACnB,IAAI,OAAO,KAAK,GAAG,IAAI;AACvB,EAAE;AACF,EAAE,IAAI,KAAK,GAAG,GAAG,EAAE;AACnB,IAAI,OAAO,CAAC,KAAK,GAAG,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK;AAC3C,EAAE;AACF,EAAE,IAAI,KAAK,GAAG,GAAG,EAAE;AACnB,IAAI,OAAO,CAAC,KAAK,GAAG,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK;AAC3C,EAAE;AACF,EAAE,IAAI,KAAK,GAAG,IAAI,EAAE;AACpB,IAAI,OAAO,CAAC,KAAK,GAAG,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK;AAC3C,EAAE;AACF,EAAE,OAAO,CAAC,KAAK,GAAG,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK;AAC1C;AACA,SAAS,YAAY,CAAC,GAAG,EAAE;AAC3B,EAAE,OAAO,GAAG,CAAC,cAAc,EAAE;AAC7B;AACA,SAAS,UAAU,CAAC,IAAI,EAAE;AAC1B,EAAE,IAAI,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE;AAC1E,IAAI,IAAI;AACR,MAAM,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC;AAC/B,MAAM,OAAO,GAAG,CAAC,QAAQ;AACzB,IAAI,CAAC,CAAC,MAAM;AACZ,MAAM,OAAO,IAAI;AACjB,IAAI;AACJ,EAAE;AACF,EAAE,OAAO,IAAI;AACb;;;;"}
@@ -0,0 +1,79 @@
1
+ import { b as base } from './server-Crjo4w1q.js';
2
+ import './url-hmE1zcJ6.js';
3
+ import { p as private_env } from './shared-server-BmU87nph.js';
4
+ import { c as contextStore, l as logger } from './logger-PfH_grbh.js';
5
+ import { g as getOAuthConfig, v as verifySession } from './oauth-BfIECOev.js';
6
+ import { MongoError } from 'mongodb';
7
+ import './async-lVJA8xJZ.js';
8
+ import 'async_hooks';
9
+ import 'node:util';
10
+ import 'node:crypto';
11
+
12
+ Error.stackTraceLimit = 100;
13
+ const handle = async ({ event, resolve }) => {
14
+ const oauthConfig = await getOAuthConfig();
15
+ const authBasic = private_env.MONGOKU_AUTH_BASIC;
16
+ event.locals.requestId = event.request.headers.get("X-Request-ID") || crypto.randomUUID();
17
+ event.setHeaders({
18
+ "X-Request-ID": event.locals.requestId
19
+ });
20
+ return contextStore.run(event, async () => {
21
+ const startTime = performance.now();
22
+ if (oauthConfig) {
23
+ const isAuthRoute = event.url.pathname.startsWith(`${base}/auth/`);
24
+ const isCimdRoute = event.url.pathname === `${base}/.well-known/cimd.json`;
25
+ if (!isAuthRoute && !isCimdRoute) {
26
+ const sessionCookie = event.cookies.get("mongoku_session");
27
+ const session = sessionCookie ? verifySession(oauthConfig, sessionCookie) : null;
28
+ if (!session) {
29
+ const acceptsHtml = event.request.headers.get("accept")?.includes("text/html");
30
+ logger.logRequest(acceptsHtml ? 302 : 401, performance.now() - startTime);
31
+ if (acceptsHtml) {
32
+ return new Response(null, {
33
+ status: 302,
34
+ headers: { Location: `${base}/auth/login` }
35
+ });
36
+ }
37
+ return new Response(JSON.stringify({ message: "Session expired" }), {
38
+ status: 401,
39
+ headers: { "Content-Type": "application/json" }
40
+ });
41
+ }
42
+ event.locals.user = { sub: session.sub, name: session.name, email: session.email };
43
+ }
44
+ } else if (authBasic) {
45
+ const [username, password] = authBasic.split(":");
46
+ const basicAuth = event.request.headers.get("Authorization");
47
+ if (!basicAuth?.toLowerCase().startsWith("basic ") || basicAuth.slice("basic ".length) !== Buffer.from(`${username}:${password}`).toString("base64")) {
48
+ logger.logRequest(401, performance.now() - startTime);
49
+ return new Response("Unauthorized", {
50
+ status: 401,
51
+ headers: { "WWW-Authenticate": "Basic" }
52
+ });
53
+ }
54
+ }
55
+ const response = await resolve(event);
56
+ logger.logRequest(response.status, performance.now() - startTime);
57
+ return response;
58
+ });
59
+ };
60
+ const handleError = ({ error }) => {
61
+ logger.error(error);
62
+ if (error instanceof MongoError) {
63
+ return {
64
+ message: error.message,
65
+ code: error.code
66
+ };
67
+ }
68
+ if (error instanceof Error) {
69
+ return {
70
+ message: error.message
71
+ };
72
+ }
73
+ return {
74
+ message: "An unexpected error occurred"
75
+ };
76
+ };
77
+
78
+ export { handle, handleError };
79
+ //# sourceMappingURL=hooks.server-Cq7ufuFU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.server-Cq7ufuFU.js","sources":["../../../.svelte-kit/adapter-node/entries/hooks.server.js"],"sourcesContent":["import { b as base } from \"../chunks/server.js\";\nimport \"../chunks/url.js\";\nimport \"@sveltejs/kit/internal/server\";\nimport \"../chunks/root.js\";\nimport { b as private_env } from \"../chunks/shared-server.js\";\nimport { c as contextStore, l as logger } from \"../chunks/logger.js\";\nimport { g as getOAuthConfig, v as verifySession } from \"../chunks/oauth.js\";\nimport { MongoError } from \"mongodb\";\nError.stackTraceLimit = 100;\nconst handle = async ({ event, resolve }) => {\n const oauthConfig = await getOAuthConfig();\n const authBasic = private_env.MONGOKU_AUTH_BASIC;\n event.locals.requestId = event.request.headers.get(\"X-Request-ID\") || crypto.randomUUID();\n event.setHeaders({\n \"X-Request-ID\": event.locals.requestId\n });\n return contextStore.run(event, async () => {\n const startTime = performance.now();\n if (oauthConfig) {\n const isAuthRoute = event.url.pathname.startsWith(`${base}/auth/`);\n const isCimdRoute = event.url.pathname === `${base}/.well-known/cimd.json`;\n if (!isAuthRoute && !isCimdRoute) {\n const sessionCookie = event.cookies.get(\"mongoku_session\");\n const session = sessionCookie ? verifySession(oauthConfig, sessionCookie) : null;\n if (!session) {\n const acceptsHtml = event.request.headers.get(\"accept\")?.includes(\"text/html\");\n logger.logRequest(acceptsHtml ? 302 : 401, performance.now() - startTime);\n if (acceptsHtml) {\n return new Response(null, {\n status: 302,\n headers: { Location: `${base}/auth/login` }\n });\n }\n return new Response(JSON.stringify({ message: \"Session expired\" }), {\n status: 401,\n headers: { \"Content-Type\": \"application/json\" }\n });\n }\n event.locals.user = { sub: session.sub, name: session.name, email: session.email };\n }\n } else if (authBasic) {\n const [username, password] = authBasic.split(\":\");\n const basicAuth = event.request.headers.get(\"Authorization\");\n if (!basicAuth?.toLowerCase().startsWith(\"basic \") || basicAuth.slice(\"basic \".length) !== Buffer.from(`${username}:${password}`).toString(\"base64\")) {\n logger.logRequest(401, performance.now() - startTime);\n return new Response(\"Unauthorized\", {\n status: 401,\n headers: { \"WWW-Authenticate\": \"Basic\" }\n });\n }\n }\n const response = await resolve(event);\n logger.logRequest(response.status, performance.now() - startTime);\n return response;\n });\n};\nconst handleError = ({ error }) => {\n logger.error(error);\n if (error instanceof MongoError) {\n return {\n message: error.message,\n code: error.code\n };\n }\n if (error instanceof Error) {\n return {\n message: error.message\n };\n }\n return {\n message: \"An unexpected error occurred\"\n };\n};\nexport {\n handle,\n handleError\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAQA,KAAK,CAAC,eAAe,GAAG,GAAG;AACtB,MAAC,MAAM,GAAG,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK;AAC7C,EAAE,MAAM,WAAW,GAAG,MAAM,cAAc,EAAE;AAC5C,EAAE,MAAM,SAAS,GAAG,WAAW,CAAC,kBAAkB;AAClD,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,MAAM,CAAC,UAAU,EAAE;AAC3F,EAAE,KAAK,CAAC,UAAU,CAAC;AACnB,IAAI,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC;AACjC,GAAG,CAAC;AACJ,EAAE,OAAO,YAAY,CAAC,GAAG,CAAC,KAAK,EAAE,YAAY;AAC7C,IAAI,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE;AACvC,IAAI,IAAI,WAAW,EAAE;AACrB,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;AACxE,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,KAAK,CAAC,EAAE,IAAI,CAAC,sBAAsB,CAAC;AAChF,MAAM,IAAI,CAAC,WAAW,IAAI,CAAC,WAAW,EAAE;AACxC,QAAQ,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,G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xWgq.js';
2
-
3
- function equals(value) {
4
- return value === this.v;
5
- }
6
- function safe_not_equal(a, b) {
7
- return a != a ? b == b : a !== b || a !== null && typeof a === "object" || typeof a === "function";
8
- }
9
- function safe_equals(value) {
10
- return !safe_not_equal(value, this.v);
11
- }
1
+ import { r as noop, t as safe_not_equal } from './url-hmE1zcJ6.js';
12
2
 
13
3
  const subscriber_queue = [];
14
4
  function readable(value, start) {
@@ -64,5 +54,5 @@ function writable(value, start = noop) {
64
54
  return { set, update, subscribe };
65
55
  }
66
56
 
67
- export { equals as e, readable as r, safe_equals as s, writable as w };
68
- //# sourceMappingURL=index2-CJE0QJlP.js.map
57
+ export { readable as r, writable as w };
58
+ //# sourceMappingURL=index-CC9WtE-y.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-CC9WtE-y.js","sources":["../../../.svelte-kit/adapter-node/chunks/index.js"],"sourcesContent":["import { n as noop, l as safe_not_equal } from \"./root.js\";\nconst subscriber_queue = [];\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe\n };\n}\nfunction writable(value, start = noop) {\n let stop = null;\n const subscribers = /* @__PURE__ */ new Set();\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) {\n const run_queue = !subscriber_queue.length;\n for (const subscriber of subscribers) {\n subscriber[1]();\n subscriber_queue.push(subscriber, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(\n /** @type {T} */\n value\n ));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.add(subscriber);\n if (subscribers.size === 1) {\n stop = start(set, update) || noop;\n }\n run(\n /** @type {T} */\n value\n );\n return () => {\n subscribers.delete(subscriber);\n if (subscribers.size === 0 && stop) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nexport {\n readable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,SAAS,SAAS,CAAC,GAAG,EAAE,UAAU,GAAG,IAAI,EAAE;AAC7C,IAAI,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC;AACxC,IAAI,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC;AAC/B,IAAI,IAAI,WAAW,CAAC,IAAI,KAAK,CAAC,EAAE;AAChC,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,IAAI;AACvC,IAAI;AACJ,IAAI,GAAG;AACP;AACA,MAAM;AACN,KAAK;AACL,IAAI,OAAO,MAAM;AACjB,MAAM,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC;AACpC,MAAM,IAAI,WAAW,CAAC,IAAI,KAAK,CAAC,IAAI,IAAI,EAAE;AAC1C,QAAQ,IAAI,EAAE;AACd,QAAQ,IAAI,GAAG,IAAI;AACnB,MAAM;AACN,IAAI,CAAC;AACL,EAAE;AACF,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE;AACnC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index-wpIsICWW.js","sources":["../../../node_modules/.pnpm/@sveltejs+kit@2.49.5_@sveltejs+vite-plugin-svelte@6.2.4_svelte@5.46.4_vite@7.3.1_@types_2a277e06ffb13d4e50e753d68c66b00d/node_modules/@sveltejs/kit/src/exports/internal/index.js","../../../node_modules/.pnpm/@sveltejs+kit@2.49.5_@sveltejs+vite-plugin-svelte@6.2.4_svelte@5.46.4_vite@7.3.1_@types_2a277e06ffb13d4e50e753d68c66b00d/node_modules/@sveltejs/kit/src/runtime/utils.js","../../../node_modules/.pnpm/@sveltejs+kit@2.49.5_@sveltejs+vite-plugin-svelte@6.2.4_svelte@5.46.4_vite@7.3.1_@types_2a277e06ffb13d4e50e753d68c66b00d/node_modules/@sveltejs/kit/src/exports/index.js"],"sourcesContent":["/** @import { StandardSchemaV1 } from '@standard-schema/spec' */\n\nexport class HttpError {\n\t/**\n\t * @param {number} status\n\t * @param {{message: string} extends App.Error ? (App.Error | string | undefined) : App.Error} body\n\t */\n\tconstructor(status, body) {\n\t\tthis.status = status;\n\t\tif (typeof body === 'string') {\n\t\t\tthis.body = { message: body };\n\t\t} else if (body) {\n\t\t\tthis.body = body;\n\t\t} else {\n\t\t\tthis.body = { message: `Error: ${status}` };\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this.body);\n\t}\n}\n\nexport class Redirect {\n\t/**\n\t * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308} status\n\t * @param {string} location\n\t */\n\tconstructor(status, location) {\n\t\tthis.status = status;\n\t\tthis.location = location;\n\t}\n}\n\n/**\n * An error that was thrown from within the SvelteKit runtime that is not fatal and doesn't result in a 500, such as a 404.\n * `SvelteKitError` goes through `handleError`.\n * @extends Error\n */\nexport class SvelteKitError extends Error {\n\t/**\n\t * @param {number} status\n\t * @param {string} text\n\t * @param {string} message\n\t */\n\tconstructor(status, text, message) {\n\t\tsuper(message);\n\t\tthis.status = status;\n\t\tthis.text = text;\n\t}\n}\n\n/**\n * @template [T=undefined]\n */\nexport class ActionFailure {\n\t/**\n\t * @param {number} status\n\t * @param {T} data\n\t */\n\tconstructor(status, data) {\n\t\tthis.status = status;\n\t\tthis.data = data;\n\t}\n}\n\n/**\n * Error thrown when form validation fails imperatively\n */\nexport class ValidationError extends Error {\n\t/**\n\t * @param {StandardSchemaV1.Issue[]} issues\n\t */\n\tconstructor(issues) {\n\t\tsuper('Validation failed');\n\t\tthis.name = 'ValidationError';\n\t\tthis.issues = issues;\n\t}\n}\n\nexport { init_remote_functions } from './remote-functions.js';\n","import { BROWSER } from 'esm-env';\n\nexport const text_encoder = new TextEncoder();\nexport const text_decoder = new TextDecoder();\n\n/**\n * Like node's path.relative, but without using node\n * @param {string} from\n * @param {string} to\n */\nexport function get_relative_path(from, to) {\n\tconst from_parts = from.split(/[/\\\\]/);\n\tconst to_parts = to.split(/[/\\\\]/);\n\tfrom_parts.pop(); // get dirname\n\n\twhile (from_parts[0] === to_parts[0]) {\n\t\tfrom_parts.shift();\n\t\tto_parts.shift();\n\t}\n\n\tlet i = from_parts.length;\n\twhile (i--) from_parts[i] = '..';\n\n\treturn from_parts.concat(to_parts).join('/');\n}\n\n/**\n * @param {Uint8Array} bytes\n * @returns {string}\n */\nexport function base64_encode(bytes) {\n\t// Using `Buffer` is faster than iterating\n\tif (!BROWSER && globalThis.Buffer) {\n\t\treturn globalThis.Buffer.from(bytes).toString('base64');\n\t}\n\n\tlet binary = '';\n\n\tfor (let i = 0; i < bytes.length; i++) {\n\t\tbinary += String.fromCharCode(bytes[i]);\n\t}\n\n\treturn btoa(binary);\n}\n\n/**\n * @param {string} encoded\n * @returns {Uint8Array}\n */\nexport function base64_decode(encoded) {\n\t// Using `Buffer` is faster than iterating\n\tif (!BROWSER && globalThis.Buffer) {\n\t\tconst buffer = globalThis.Buffer.from(encoded, 'base64');\n\t\treturn new Uint8Array(buffer);\n\t}\n\n\tconst binary = atob(encoded);\n\tconst bytes = new Uint8Array(binary.length);\n\n\tfor (let i = 0; i < binary.length; i++) {\n\t\tbytes[i] = binary.charCodeAt(i);\n\t}\n\n\treturn bytes;\n}\n","/** @import { StandardSchemaV1 } from '@standard-schema/spec' */\n\nimport { HttpError, Redirect, ActionFailure, ValidationError } from './internal/index.js';\nimport { BROWSER, DEV } from 'esm-env';\nimport {\n\tadd_data_suffix,\n\tadd_resolution_suffix,\n\thas_data_suffix,\n\thas_resolution_suffix,\n\tstrip_data_suffix,\n\tstrip_resolution_suffix\n} from '../runtime/pathname.js';\nimport { text_encoder } from '../runtime/utils.js';\n\nexport { VERSION } from '../version.js';\n\n// TODO 3.0: remove these types as they are not used anymore (we can't remove them yet because that would be a breaking change)\n/**\n * @template {number} TNumber\n * @template {any[]} [TArray=[]]\n * @typedef {TNumber extends TArray['length'] ? TArray[number] : LessThan<TNumber, [...TArray, TArray['length']]>} LessThan\n */\n\n/**\n * @template {number} TStart\n * @template {number} TEnd\n * @typedef {Exclude<TEnd | LessThan<TEnd>, LessThan<TStart>>} NumericRange\n */\n\n// Keep the status codes as `number` because restricting to certain numbers makes it unnecessarily hard to use compared to the benefits\n// (we have runtime errors already to check for invalid codes). Also see https://github.com/sveltejs/kit/issues/11780\n\n// we have to repeat the JSDoc because the display for function overloads is broken\n// see https://github.com/microsoft/TypeScript/issues/55056\n\n/**\n * Throws an error with a HTTP status code and an optional message.\n * When called during request handling, this will cause SvelteKit to\n * return an error response without invoking `handleError`.\n * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {App.Error} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.\n * @overload\n * @param {number} status\n * @param {App.Error} body\n * @return {never}\n * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.\n * @throws {Error} If the provided status is invalid (not between 400 and 599).\n */\n/**\n * Throws an error with a HTTP status code and an optional message.\n * When called during request handling, this will cause SvelteKit to\n * return an error response without invoking `handleError`.\n * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body] An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.\n * @overload\n * @param {number} status\n * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body]\n * @return {never}\n * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.\n * @throws {Error} If the provided status is invalid (not between 400 and 599).\n */\n/**\n * Throws an error with a HTTP status code and an optional message.\n * When called during request handling, this will cause SvelteKit to\n * return an error response without invoking `handleError`.\n * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.\n * @return {never}\n * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.\n * @throws {Error} If the provided status is invalid (not between 400 and 599).\n */\nexport function error(status, body) {\n\tif ((!BROWSER || DEV) && (isNaN(status) || status < 400 || status > 599)) {\n\t\tthrow new Error(`HTTP error status codes must be between 400 and 599 — ${status} is invalid`);\n\t}\n\n\tthrow new HttpError(status, body);\n}\n\n/**\n * Checks whether this is an error thrown by {@link error}.\n * @template {number} T\n * @param {unknown} e\n * @param {T} [status] The status to filter for.\n * @return {e is (HttpError & { status: T extends undefined ? never : T })}\n */\nexport function isHttpError(e, status) {\n\tif (!(e instanceof HttpError)) return false;\n\treturn !status || e.status === status;\n}\n\n/**\n * Redirect a request. When called during request handling, SvelteKit will return a redirect response.\n * Make sure you're not catching the thrown redirect, which would prevent SvelteKit from handling it.\n *\n * Most common status codes:\n * * `303 See Other`: redirect as a GET request (often used after a form POST request)\n * * `307 Temporary Redirect`: redirect will keep the request method\n * * `308 Permanent Redirect`: redirect will keep the request method, SEO will be transferred to the new page\n *\n * [See all redirect status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages)\n *\n * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | ({} & number)} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages). Must be in the range 300-308.\n * @param {string | URL} location The location to redirect to.\n * @throws {Redirect} This error instructs SvelteKit to redirect to the specified location.\n * @throws {Error} If the provided status is invalid.\n * @return {never}\n */\nexport function redirect(status, location) {\n\tif ((!BROWSER || DEV) && (isNaN(status) || status < 300 || status > 308)) {\n\t\tthrow new Error('Invalid status code');\n\t}\n\n\tthrow new Redirect(\n\t\t// @ts-ignore\n\t\tstatus,\n\t\tlocation.toString()\n\t);\n}\n\n/**\n * Checks whether this is a redirect thrown by {@link redirect}.\n * @param {unknown} e The object to check.\n * @return {e is Redirect}\n */\nexport function isRedirect(e) {\n\treturn e instanceof Redirect;\n}\n\n/**\n * Create a JSON `Response` object from the supplied data.\n * @param {any} data The value that will be serialized as JSON.\n * @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. `Content-Type: application/json` and `Content-Length` headers will be added automatically.\n */\nexport function json(data, init) {\n\t// TODO deprecate this in favour of `Response.json` when it's\n\t// more widely supported\n\tconst body = JSON.stringify(data);\n\n\t// we can't just do `text(JSON.stringify(data), init)` because\n\t// it will set a default `content-type` header. duplicated code\n\t// means less duplicated work\n\tconst headers = new Headers(init?.headers);\n\tif (!headers.has('content-length')) {\n\t\theaders.set('content-length', text_encoder.encode(body).byteLength.toString());\n\t}\n\n\tif (!headers.has('content-type')) {\n\t\theaders.set('content-type', 'application/json');\n\t}\n\n\treturn new Response(body, {\n\t\t...init,\n\t\theaders\n\t});\n}\n\n/**\n * Create a `Response` object from the supplied body.\n * @param {string} body The value that will be used as-is.\n * @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. A `Content-Length` header will be added automatically.\n */\nexport function text(body, init) {\n\tconst headers = new Headers(init?.headers);\n\tif (!headers.has('content-length')) {\n\t\tconst encoded = text_encoder.encode(body);\n\t\theaders.set('content-length', encoded.byteLength.toString());\n\t\treturn new Response(encoded, {\n\t\t\t...init,\n\t\t\theaders\n\t\t});\n\t}\n\n\treturn new Response(body, {\n\t\t...init,\n\t\theaders\n\t});\n}\n\n/**\n * Create an `ActionFailure` object. Call when form submission fails.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @overload\n * @param {number} status\n * @returns {import('./public.js').ActionFailure<undefined>}\n */\n/**\n * Create an `ActionFailure` object. Call when form submission fails.\n * @template [T=undefined]\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {T} data Data associated with the failure (e.g. validation errors)\n * @overload\n * @param {number} status\n * @param {T} data\n * @returns {import('./public.js').ActionFailure<T>}\n */\n/**\n * Create an `ActionFailure` object. Call when form submission fails.\n * @param {number} status\n * @param {any} [data]\n * @returns {import('./public.js').ActionFailure<any>}\n */\nexport function fail(status, data) {\n\t// @ts-expect-error unique symbol missing\n\treturn new ActionFailure(status, data);\n}\n\n/**\n * Checks whether this is an action failure thrown by {@link fail}.\n * @param {unknown} e The object to check.\n * @return {e is import('./public.js').ActionFailure}\n */\nexport function isActionFailure(e) {\n\treturn e instanceof ActionFailure;\n}\n\n/**\n * Use this to throw a validation error to imperatively fail form validation.\n * Can be used in combination with `issue` passed to form actions to create field-specific issues.\n *\n * @example\n * ```ts\n * import { invalid } from '@sveltejs/kit';\n * import { form } from '$app/server';\n * import { tryLogin } from '$lib/server/auth';\n * import * as v from 'valibot';\n *\n * export const login = form(\n * v.object({ name: v.string(), _password: v.string() }),\n * async ({ name, _password }) => {\n * const success = tryLogin(name, _password);\n * if (!success) {\n * invalid('Incorrect username or password');\n * }\n *\n * // ...\n * }\n * );\n * ```\n * @param {...(StandardSchemaV1.Issue | string)} issues\n * @returns {never}\n * @since 2.47.3\n */\nexport function invalid(...issues) {\n\tthrow new ValidationError(\n\t\tissues.map((issue) => (typeof issue === 'string' ? { message: issue } : issue))\n\t);\n}\n\n/**\n * Checks whether this is an validation error thrown by {@link invalid}.\n * @param {unknown} e The object to check.\n * @return {e is import('./public.js').ActionFailure}\n * @since 2.47.3\n */\nexport function isValidationError(e) {\n\treturn e instanceof ValidationError;\n}\n\n/**\n * Strips possible SvelteKit-internal suffixes and trailing slashes from the URL pathname.\n * Returns the normalized URL as well as a method for adding the potential suffix back\n * based on a new pathname (possibly including search) or URL.\n * ```js\n * import { normalizeUrl } from '@sveltejs/kit';\n *\n * const { url, denormalize } = normalizeUrl('/blog/post/__data.json');\n * console.log(url.pathname); // /blog/post\n * console.log(denormalize('/blog/post/a')); // /blog/post/a/__data.json\n * ```\n * @param {URL | string} url\n * @returns {{ url: URL, wasNormalized: boolean, denormalize: (url?: string | URL) => URL }}\n * @since 2.18.0\n */\nexport function normalizeUrl(url) {\n\turl = new URL(url, 'http://internal');\n\n\tconst is_route_resolution = has_resolution_suffix(url.pathname);\n\tconst is_data_request = has_data_suffix(url.pathname);\n\tconst has_trailing_slash = url.pathname !== '/' && url.pathname.endsWith('/');\n\n\tif (is_route_resolution) {\n\t\turl.pathname = strip_resolution_suffix(url.pathname);\n\t} else if (is_data_request) {\n\t\turl.pathname = strip_data_suffix(url.pathname);\n\t} else if (has_trailing_slash) {\n\t\turl.pathname = url.pathname.slice(0, -1);\n\t}\n\n\treturn {\n\t\turl,\n\t\twasNormalized: is_data_request || is_route_resolution || has_trailing_slash,\n\t\tdenormalize: (new_url = url) => {\n\t\t\tnew_url = new URL(new_url, url);\n\t\t\tif (is_route_resolution) {\n\t\t\t\tnew_url.pathname = add_resolution_suffix(new_url.pathname);\n\t\t\t} else if (is_data_request) {\n\t\t\t\tnew_url.pathname = add_data_suffix(new_url.pathname);\n\t\t\t} else if (has_trailing_slash && !new_url.pathname.endsWith('/')) {\n\t\t\t\tnew_url.pathname += '/';\n\t\t\t}\n\t\t\treturn new_url;\n\t\t}\n\t};\n}\n"],"names":[],"mappings":"AAAA;;AAEO,MAAM,SAAS,CAAC;AACvB;AACA;AACA;AACA;AACA,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE;AAC3B,EAAE,IAAI,CAAC,MAAM,GAAG,MAAM;AACtB,EAAE,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;AAChC,GAAG,IAAI,CAAC,IAAI,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE;AAChC,EAAE,CAAC,MAAM,IAAI,IAAI,EAAE;AACnB,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI;AACnB,EAAE,CAAC,MAAM;AACT,GAAG,IAAI,CAAC,IAAI,GAAG,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,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cAAc,EAAE,kBAAkB,CAAC;AACjD,CAAC;;AAED,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE;AAC3B,EAAE,GAAG,IAAI;AACT,EAAE;AACF,EAAE,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACO,SAAS,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE;AACjC,CAAC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;AAC3C,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE;AACrC,EAAE,MAAM,OAAO,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC;AAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;AAC9D,EAAE,OAAO,IAAI,QAAQ,CAAC,OAAO,EAAE;AAC/B,GAAG,GAAG,IAAI;AACV,GAAG;AACH,GAAG,CAAC;AACJ,CAAC;;AAED,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE;AAC3B,EAAE,GAAG,IAAI;AACT,EAAE;AACF,EAAE,CAAC;AACH;;;;","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"index-wpIsICWW.js","sources":["../../../node_modules/.pnpm/@sveltejs+kit@2.53.4_@sveltejs+vite-plugin-svelte@6.2.4_svelte@5.53.5_vite@7.3.1_@types_4bacf823346149867b06564a7028ff4e/node_modules/@sveltejs/kit/src/exports/internal/index.js","../../../node_modules/.pnpm/@sveltejs+kit@2.53.4_@sveltejs+vite-plugin-svelte@6.2.4_svelte@5.53.5_vite@7.3.1_@types_4bacf823346149867b06564a7028ff4e/node_modules/@sveltejs/kit/src/runtime/utils.js","../../../node_modules/.pnpm/@sveltejs+kit@2.53.4_@sveltejs+vite-plugin-svelte@6.2.4_svelte@5.53.5_vite@7.3.1_@types_4bacf823346149867b06564a7028ff4e/node_modules/@sveltejs/kit/src/exports/index.js"],"sourcesContent":["/** @import { StandardSchemaV1 } from '@standard-schema/spec' */\n\nexport class HttpError {\n\t/**\n\t * @param {number} status\n\t * @param {{message: string} extends App.Error ? (App.Error | string | undefined) : App.Error} body\n\t */\n\tconstructor(status, body) {\n\t\tthis.status = status;\n\t\tif (typeof body === 'string') {\n\t\t\tthis.body = { message: body };\n\t\t} else if (body) {\n\t\t\tthis.body = body;\n\t\t} else {\n\t\t\tthis.body = { message: `Error: ${status}` };\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this.body);\n\t}\n}\n\nexport class Redirect {\n\t/**\n\t * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308} status\n\t * @param {string} location\n\t */\n\tconstructor(status, location) {\n\t\tthis.status = status;\n\t\tthis.location = location;\n\t}\n}\n\n/**\n * An error that was thrown from within the SvelteKit runtime that is not fatal and doesn't result in a 500, such as a 404.\n * `SvelteKitError` goes through `handleError`.\n * @extends Error\n */\nexport class SvelteKitError extends Error {\n\t/**\n\t * @param {number} status\n\t * @param {string} text\n\t * @param {string} message\n\t */\n\tconstructor(status, text, message) {\n\t\tsuper(message);\n\t\tthis.status = status;\n\t\tthis.text = text;\n\t}\n}\n\n/**\n * @template [T=undefined]\n */\nexport class ActionFailure {\n\t/**\n\t * @param {number} status\n\t * @param {T} data\n\t */\n\tconstructor(status, data) {\n\t\tthis.status = status;\n\t\tthis.data = data;\n\t}\n}\n\n/**\n * Error thrown when form validation fails imperatively\n */\nexport class ValidationError extends Error {\n\t/**\n\t * @param {StandardSchemaV1.Issue[]} issues\n\t */\n\tconstructor(issues) {\n\t\tsuper('Validation failed');\n\t\tthis.name = 'ValidationError';\n\t\tthis.issues = issues;\n\t}\n}\n\nexport { init_remote_functions } from './remote-functions.js';\n","import { BROWSER } from 'esm-env';\n\nexport const text_encoder = new TextEncoder();\nexport const text_decoder = new TextDecoder();\n\n/**\n * Like node's path.relative, but without using node\n * @param {string} from\n * @param {string} to\n */\nexport function get_relative_path(from, to) {\n\tconst from_parts = from.split(/[/\\\\]/);\n\tconst to_parts = to.split(/[/\\\\]/);\n\tfrom_parts.pop(); // get dirname\n\n\twhile (from_parts[0] === to_parts[0]) {\n\t\tfrom_parts.shift();\n\t\tto_parts.shift();\n\t}\n\n\tlet i = from_parts.length;\n\twhile (i--) from_parts[i] = '..';\n\n\treturn from_parts.concat(to_parts).join('/');\n}\n\n/**\n * @param {Uint8Array} bytes\n * @returns {string}\n */\nexport function base64_encode(bytes) {\n\t// Using `Buffer` is faster than iterating\n\tif (!BROWSER && globalThis.Buffer) {\n\t\treturn globalThis.Buffer.from(bytes).toString('base64');\n\t}\n\n\tlet binary = '';\n\n\tfor (let i = 0; i < bytes.length; i++) {\n\t\tbinary += String.fromCharCode(bytes[i]);\n\t}\n\n\treturn btoa(binary);\n}\n\n/**\n * @param {string} encoded\n * @returns {Uint8Array}\n */\nexport function base64_decode(encoded) {\n\t// Using `Buffer` is faster than iterating\n\tif (!BROWSER && globalThis.Buffer) {\n\t\tconst buffer = globalThis.Buffer.from(encoded, 'base64');\n\t\treturn new Uint8Array(buffer);\n\t}\n\n\tconst binary = atob(encoded);\n\tconst bytes = new Uint8Array(binary.length);\n\n\tfor (let i = 0; i < binary.length; i++) {\n\t\tbytes[i] = binary.charCodeAt(i);\n\t}\n\n\treturn bytes;\n}\n","/** @import { StandardSchemaV1 } from '@standard-schema/spec' */\n\nimport { HttpError, Redirect, ActionFailure, ValidationError } from './internal/index.js';\nimport { BROWSER, DEV } from 'esm-env';\nimport {\n\tadd_data_suffix,\n\tadd_resolution_suffix,\n\thas_data_suffix,\n\thas_resolution_suffix,\n\tstrip_data_suffix,\n\tstrip_resolution_suffix\n} from '../runtime/pathname.js';\nimport { text_encoder } from '../runtime/utils.js';\n\nexport { VERSION } from '../version.js';\n\n// TODO 3.0: remove these types as they are not used anymore (we can't remove them yet because that would be a breaking change)\n/**\n * @template {number} TNumber\n * @template {any[]} [TArray=[]]\n * @typedef {TNumber extends TArray['length'] ? TArray[number] : LessThan<TNumber, [...TArray, TArray['length']]>} LessThan\n */\n\n/**\n * @template {number} TStart\n * @template {number} TEnd\n * @typedef {Exclude<TEnd | LessThan<TEnd>, LessThan<TStart>>} NumericRange\n */\n\n// Keep the status codes as `number` because restricting to certain numbers makes it unnecessarily hard to use compared to the benefits\n// (we have runtime errors already to check for invalid codes). Also see https://github.com/sveltejs/kit/issues/11780\n\n// we have to repeat the JSDoc because the display for function overloads is broken\n// see https://github.com/microsoft/TypeScript/issues/55056\n\n/**\n * Throws an error with a HTTP status code and an optional message.\n * When called during request handling, this will cause SvelteKit to\n * return an error response without invoking `handleError`.\n * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {App.Error} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.\n * @overload\n * @param {number} status\n * @param {App.Error} body\n * @return {never}\n * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.\n * @throws {Error} If the provided status is invalid (not between 400 and 599).\n */\n/**\n * Throws an error with a HTTP status code and an optional message.\n * When called during request handling, this will cause SvelteKit to\n * return an error response without invoking `handleError`.\n * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body] An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.\n * @overload\n * @param {number} status\n * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body]\n * @return {never}\n * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.\n * @throws {Error} If the provided status is invalid (not between 400 and 599).\n */\n/**\n * Throws an error with a HTTP status code and an optional message.\n * When called during request handling, this will cause SvelteKit to\n * return an error response without invoking `handleError`.\n * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.\n * @return {never}\n * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.\n * @throws {Error} If the provided status is invalid (not between 400 and 599).\n */\nexport function error(status, body) {\n\tif ((!BROWSER || DEV) && (isNaN(status) || status < 400 || status > 599)) {\n\t\tthrow new Error(`HTTP error status codes must be between 400 and 599 — ${status} is invalid`);\n\t}\n\n\tthrow new HttpError(status, body);\n}\n\n/**\n * Checks whether this is an error thrown by {@link error}.\n * @template {number} T\n * @param {unknown} e\n * @param {T} [status] The status to filter for.\n * @return {e is (HttpError & { status: T extends undefined ? never : T })}\n */\nexport function isHttpError(e, status) {\n\tif (!(e instanceof HttpError)) return false;\n\treturn !status || e.status === status;\n}\n\n/**\n * Redirect a request. When called during request handling, SvelteKit will return a redirect response.\n * Make sure you're not catching the thrown redirect, which would prevent SvelteKit from handling it.\n *\n * Most common status codes:\n * * `303 See Other`: redirect as a GET request (often used after a form POST request)\n * * `307 Temporary Redirect`: redirect will keep the request method\n * * `308 Permanent Redirect`: redirect will keep the request method, SEO will be transferred to the new page\n *\n * [See all redirect status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages)\n *\n * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | ({} & number)} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages). Must be in the range 300-308.\n * @param {string | URL} location The location to redirect to.\n * @throws {Redirect} This error instructs SvelteKit to redirect to the specified location.\n * @throws {Error} If the provided status is invalid.\n * @return {never}\n */\nexport function redirect(status, location) {\n\tif ((!BROWSER || DEV) && (isNaN(status) || status < 300 || status > 308)) {\n\t\tthrow new Error('Invalid status code');\n\t}\n\n\tthrow new Redirect(\n\t\t// @ts-ignore\n\t\tstatus,\n\t\tlocation.toString()\n\t);\n}\n\n/**\n * Checks whether this is a redirect thrown by {@link redirect}.\n * @param {unknown} e The object to check.\n * @return {e is Redirect}\n */\nexport function isRedirect(e) {\n\treturn e instanceof Redirect;\n}\n\n/**\n * Create a JSON `Response` object from the supplied data.\n * @param {any} data The value that will be serialized as JSON.\n * @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. `Content-Type: application/json` and `Content-Length` headers will be added automatically.\n */\nexport function json(data, init) {\n\t// TODO deprecate this in favour of `Response.json` when it's\n\t// more widely supported\n\tconst body = JSON.stringify(data);\n\n\t// we can't just do `text(JSON.stringify(data), init)` because\n\t// it will set a default `content-type` header. duplicated code\n\t// means less duplicated work\n\tconst headers = new Headers(init?.headers);\n\tif (!headers.has('content-length')) {\n\t\theaders.set('content-length', text_encoder.encode(body).byteLength.toString());\n\t}\n\n\tif (!headers.has('content-type')) {\n\t\theaders.set('content-type', 'application/json');\n\t}\n\n\treturn new Response(body, {\n\t\t...init,\n\t\theaders\n\t});\n}\n\n/**\n * Create a `Response` object from the supplied body.\n * @param {string} body The value that will be used as-is.\n * @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. A `Content-Length` header will be added automatically.\n */\nexport function text(body, init) {\n\tconst headers = new Headers(init?.headers);\n\tif (!headers.has('content-length')) {\n\t\tconst encoded = text_encoder.encode(body);\n\t\theaders.set('content-length', encoded.byteLength.toString());\n\t\treturn new Response(encoded, {\n\t\t\t...init,\n\t\t\theaders\n\t\t});\n\t}\n\n\treturn new Response(body, {\n\t\t...init,\n\t\theaders\n\t});\n}\n\n/**\n * Create an `ActionFailure` object. Call when form submission fails.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @overload\n * @param {number} status\n * @returns {import('./public.js').ActionFailure<undefined>}\n */\n/**\n * Create an `ActionFailure` object. Call when form submission fails.\n * @template [T=undefined]\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {T} data Data associated with the failure (e.g. validation errors)\n * @overload\n * @param {number} status\n * @param {T} data\n * @returns {import('./public.js').ActionFailure<T>}\n */\n/**\n * Create an `ActionFailure` object. Call when form submission fails.\n * @param {number} status\n * @param {any} [data]\n * @returns {import('./public.js').ActionFailure<any>}\n */\nexport function fail(status, data) {\n\t// @ts-expect-error unique symbol missing\n\treturn new ActionFailure(status, data);\n}\n\n/**\n * Checks whether this is an action failure thrown by {@link fail}.\n * @param {unknown} e The object to check.\n * @return {e is import('./public.js').ActionFailure}\n */\nexport function isActionFailure(e) {\n\treturn e instanceof ActionFailure;\n}\n\n/**\n * Use this to throw a validation error to imperatively fail form validation.\n * Can be used in combination with `issue` passed to form actions to create field-specific issues.\n *\n * @example\n * ```ts\n * import { invalid } from '@sveltejs/kit';\n * import { form } from '$app/server';\n * import { tryLogin } from '$lib/server/auth';\n * import * as v from 'valibot';\n *\n * export const login = form(\n * v.object({ name: v.string(), _password: v.string() }),\n * async ({ name, _password }) => {\n * const success = tryLogin(name, _password);\n * if (!success) {\n * invalid('Incorrect username or password');\n * }\n *\n * // ...\n * }\n * );\n * ```\n * @param {...(StandardSchemaV1.Issue | string)} issues\n * @returns {never}\n * @since 2.47.3\n */\nexport function invalid(...issues) {\n\tthrow new ValidationError(\n\t\tissues.map((issue) => (typeof issue === 'string' ? { message: issue } : issue))\n\t);\n}\n\n/**\n * Checks whether this is an validation error thrown by {@link invalid}.\n * @param {unknown} e The object to check.\n * @return {e is import('./public.js').ActionFailure}\n * @since 2.47.3\n */\nexport function isValidationError(e) {\n\treturn e instanceof ValidationError;\n}\n\n/**\n * Strips possible SvelteKit-internal suffixes and trailing slashes from the URL pathname.\n * Returns the normalized URL as well as a method for adding the potential suffix back\n * based on a new pathname (possibly including search) or URL.\n * ```js\n * import { normalizeUrl } from '@sveltejs/kit';\n *\n * const { url, denormalize } = normalizeUrl('/blog/post/__data.json');\n * console.log(url.pathname); // /blog/post\n * console.log(denormalize('/blog/post/a')); // /blog/post/a/__data.json\n * ```\n * @param {URL | string} url\n * @returns {{ url: URL, wasNormalized: boolean, denormalize: (url?: string | URL) => URL }}\n * @since 2.18.0\n */\nexport function normalizeUrl(url) {\n\turl = new URL(url, 'http://internal');\n\n\tconst is_route_resolution = has_resolution_suffix(url.pathname);\n\tconst is_data_request = has_data_suffix(url.pathname);\n\tconst has_trailing_slash = url.pathname !== '/' && url.pathname.endsWith('/');\n\n\tif (is_route_resolution) {\n\t\turl.pathname = strip_resolution_suffix(url.pathname);\n\t} else if (is_data_request) {\n\t\turl.pathname = strip_data_suffix(url.pathname);\n\t} else if (has_trailing_slash) {\n\t\turl.pathname = url.pathname.slice(0, -1);\n\t}\n\n\treturn {\n\t\turl,\n\t\twasNormalized: is_data_request || is_route_resolution || has_trailing_slash,\n\t\tdenormalize: (new_url = url) => {\n\t\t\tnew_url = new URL(new_url, url);\n\t\t\tif (is_route_resolution) {\n\t\t\t\tnew_url.pathname = add_resolution_suffix(new_url.pathname);\n\t\t\t} else if (is_data_request) {\n\t\t\t\tnew_url.pathname = add_data_suffix(new_url.pathname);\n\t\t\t} else if (has_trailing_slash && !new_url.pathname.endsWith('/')) {\n\t\t\t\tnew_url.pathname += '/';\n\t\t\t}\n\t\t\treturn new_url;\n\t\t}\n\t};\n}\n"],"names":[],"mappings":"AAAA;;AAEO,MAAM,SAAS,CAAC;AACvB;AACA;AACA;AACA;AACA,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE;AAC3B,EAAE,IAAI,CAAC,MAAM,GAAG,MAAM;AACtB,EAAE,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;AAChC,GAAG,IAAI,CAAC,IAAI,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE;AAChC,EAAE,CAAC,MAAM,IAAI,IAAI,EAAE;AACnB,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI;AACnB,EAAE,CAAC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IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE;AACnC,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC;AACjD,CAAC;;AAED,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE;AAC3B,EAAE,GAAG,IAAI;AACT,EAAE;AACF,EAAE,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACO,SAAS,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE;AACjC,CAAC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;AAC3C,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE;AACrC,EAAE,MAAM,OAAO,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC;AAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;AAC9D,EAAE,OAAO,IAAI,QAAQ,CAAC,OAAO,EAAE;AAC/B,GAAG,GAAG,IAAI;AACV,GAAG;AACH,GAAG,CAAC;AACJ,CAAC;;AAED,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE;AAC3B,EAAE,GAAG,IAAI;AACT,EAAE;AACF,EAAE,CAAC;AACH;;;;","x_google_ignoreList":[0,1,2]}
@@ -1,5 +1,5 @@
1
- import './client-BCfAqu0g.js';
2
- import { g as getContext } from './context-8UI9xWgq.js';
1
+ import './client-C7bEwskR.js';
2
+ import { g as getContext } from './url-hmE1zcJ6.js';
3
3
 
4
4
  function context() {
5
5
  return getContext("__request__");
@@ -21,4 +21,4 @@ const page$1 = {
21
21
  const page = page$1;
22
22
 
23
23
  export { page as p };
24
- //# sourceMappingURL=index3-CQyDuV4f.js.map
24
+ //# sourceMappingURL=index2-DMabdSHV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index2-DMabdSHV.js","sources":["../../../.svelte-kit/adapter-node/chunks/index2.js"],"sourcesContent":["import \"./client.js\";\nimport { g as getContext } from \"./root.js\";\nfunction context() {\n return getContext(\"__request__\");\n}\nconst page$1 = {\n get data() {\n return context().page.data;\n },\n get error() {\n return context().page.error;\n },\n get status() {\n return context().page.status;\n },\n get url() {\n return context().page.url;\n }\n};\nconst page = page$1;\nexport {\n page as p\n};\n"],"names":[],"mappings":";;;AAEA,SAAS,OAAO,GAAG;AACnB,EAAE,OAAO,UAAU,CAAC,aAAa,CAAC;AAClC;AACA,MAAM,MAAM,GAAG;AACf,EAAE,IAAI,IAAI,GAAG;AACb,IAAI,OAAO,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI;AAC9B,EAAE,CAAC;AACH,EAAE,IAAI,KAAK,GAAG;AACd,IAAI,OAAO,OAAO,EAAE,CAAC,IAAI,CAAC,KAAK;AAC/B,EAAE,CAAC;AACH,EAAE,IAAI,MAAM,GAAG;AACf,IAAI,OAAO,OAAO,EAAE,CAAC,IAAI,CAAC,MAAM;AAChC,EAAE,CAAC;AACH,EAAE,IAAI,GAAG,GAAG;AACZ,IAAI,OAAO,OAAO,EAAE,CAAC,IAAI,CAAC,GAAG;AAC7B,EAAE;AACF,CAAC;AACI,MAAC,IAAI,GAAG;;;;"}
@@ -1,3 +1,4 @@
1
+ import { p as private_env } from './shared-server-BmU87nph.js';
1
2
  import { AsyncLocalStorage } from 'async_hooks';
2
3
  import { inspect } from 'node:util';
3
4
 
@@ -6,8 +7,8 @@ class Logger {
6
7
  structuredLogging;
7
8
  logHeaders;
8
9
  constructor() {
9
- this.structuredLogging = process.env.MONGOKU_STRUCTURED_LOG === "true";
10
- this.logHeaders = process.env.MONGOKU_LOG_HEADERS ? process.env.MONGOKU_LOG_HEADERS.split(",").map((h) => h.trim().toLowerCase()).filter(Boolean) : [];
10
+ this.structuredLogging = private_env.MONGOKU_STRUCTURED_LOG === "true";
11
+ this.logHeaders = private_env.MONGOKU_LOG_HEADERS ? private_env.MONGOKU_LOG_HEADERS.split(",").map((h) => h.trim().toLowerCase()).filter(Boolean) : [];
11
12
  }
12
13
  /**
13
14
  * Get request context information from the current request
@@ -147,4 +148,4 @@ cause: ${arg.cause.stack ?? `${arg.cause.name}: ${arg.cause.message}`}` : "");
147
148
  const logger = new Logger();
148
149
 
149
150
  export { contextStore as c, logger as l };
150
- //# sourceMappingURL=logger-KF6KpVP6.js.map
151
+ //# sourceMappingURL=logger-PfH_grbh.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger-PfH_grbh.js","sources":["../../../.svelte-kit/adapter-node/chunks/logger.js"],"sourcesContent":["import { b as private_env } from \"./shared-server.js\";\nimport { AsyncLocalStorage } from \"async_hooks\";\nimport { inspect } from \"node:util\";\nconst contextStore = new AsyncLocalStorage();\nclass Logger {\n structuredLogging;\n logHeaders;\n constructor() {\n this.structuredLogging = private_env.MONGOKU_STRUCTURED_LOG === \"true\";\n this.logHeaders = private_env.MONGOKU_LOG_HEADERS ? private_env.MONGOKU_LOG_HEADERS.split(\",\").map((h) => h.trim().toLowerCase()).filter(Boolean) : [];\n }\n /**\n * Get request context information from the current request\n */\n getRequestContext() {\n const event = contextStore.getStore();\n if (!event) {\n return void 0;\n }\n const url = new URL(event.request.url);\n const context = {\n requestId: event.locals.requestId,\n method: event.request.method,\n url: url.pathname + url.search,\n ip: event.getClientAddress(),\n userAgent: event.request.headers.get(\"user-agent\") || void 0\n };\n if (this.logHeaders.length > 0) {\n const headers = {};\n for (const headerName of this.logHeaders) {\n const value = event.request.headers.get(headerName);\n if (value) {\n headers[headerName] = value;\n }\n }\n if (Object.keys(headers).length > 0) {\n context.headers = headers;\n }\n }\n return context;\n }\n /**\n * Format arguments for logging\n */\n formatArgs(args) {\n return args.map((arg) => {\n if (arg instanceof Error) {\n return (arg.stack ?? `${arg.name}: ${arg.message}`) + (arg.cause instanceof Error ? `\ncause: ${arg.cause.stack ?? `${arg.cause.name}: ${arg.cause.message}`}` : \"\");\n } else if (typeof arg === \"string\") {\n return arg;\n } else {\n return inspect(arg, { depth: 20, colors: !this.structuredLogging });\n }\n }).join(\" \");\n }\n /**\n * Internal log method that handles both structured and unstructured logging\n */\n _log(level, args) {\n const message = this.formatArgs(args);\n if (this.structuredLogging) {\n const logEntry = {\n level,\n time: (/* @__PURE__ */ new Date()).toISOString(),\n message,\n ...this.getRequestContext()\n };\n console.log(JSON.stringify(logEntry));\n } else {\n switch (level) {\n case \"error\":\n console.error(message);\n break;\n case \"warn\":\n console.warn(message);\n break;\n case \"debug\":\n console.debug(message);\n break;\n default:\n console.log(message);\n }\n }\n }\n /**\n * Log an informational message\n */\n log(...args) {\n this._log(\"info\", args);\n }\n /**\n * Log an informational message (alias for log)\n */\n info(...args) {\n this._log(\"info\", args);\n }\n /**\n * Log an error message\n */\n error(...args) {\n this._log(\"error\", args);\n }\n /**\n * Log a warning message\n */\n warn(...args) {\n this._log(\"warn\", args);\n }\n /**\n * Log a debug message\n */\n debug(...args) {\n this._log(\"debug\", args);\n }\n /**\n * Log an HTTP request\n */\n logRequest(statusCode, durationMs) {\n const duration = Math.round(durationMs * 100) / 100;\n if (this.structuredLogging) {\n const logEntry = {\n level: \"info\",\n time: (/* @__PURE__ */ new Date()).toISOString(),\n type: \"request\",\n statusCode,\n duration,\n ...this.getRequestContext()\n };\n console.log(JSON.stringify(logEntry));\n } else {\n const event = contextStore.getStore();\n if (event) {\n const url = new URL(event.request.url);\n const urlPath = url.pathname + url.search;\n const method = event.request.method;\n const message = `${statusCode} ${method} ${urlPath} ${duration}ms`;\n if (statusCode >= 400) {\n console.error(message);\n } else {\n console.log(message);\n }\n }\n }\n }\n}\nconst logger = new Logger();\nexport {\n contextStore as c,\n logger as l\n};\n"],"names":[],"mappings":";;;;AAGK,MAAC,YAAY,GAAG,IAAI,iBAAiB;AAC1C,MAAM,MAAM,CAAC;AACb,EAAE,iBAAiB;AACnB,EAAE,UAAU;AACZ,EAAE,WAAW,GAAG;AAChB,IAAI,IAAI,CAAC,iBAAiB,GAAG,W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