wiki-viewer 3.0.5 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent/activity/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/events/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/files/[...path]/route.js +3 -3
- package/.next/standalone/.next/server/app/api/agent/files/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/file/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/ls/[[...path]]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/move/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/fs/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/settings/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent/sidecar/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/app-proxy/[...path]/route.js +9 -8
- package/.next/standalone/.next/server/app/api/app-proxy/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/assets/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/pdf/save/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/asset/route.js +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/asset/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/route.js +9 -8
- package/.next/standalone/.next/server/app/api/share/[token]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/share/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/browse/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/reveal/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/branch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/open/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/refresh/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/system/workspaces/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/upload/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/app/route.js +4 -3
- package/.next/standalone/.next/server/app/api/wiki/app/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/backlinks/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/content/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/download/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/folder/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-branches/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-checkout/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-diff/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-file-info/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-history/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/git-pull/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/hosted-apps/[slug]/route.js +5 -4
- package/.next/standalone/.next/server/app/api/wiki/hosted-apps/[slug]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/hosted-apps/route.js +5 -4
- package/.next/standalone/.next/server/app/api/wiki/hosted-apps/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/move/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/new-file/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/outlinks/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/page/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/presence/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/preview-token/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/scratch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/slugs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/wiki/watch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/app/[slug]/[[...rest]]/route.js +5 -4
- package/.next/standalone/.next/server/app/app/[slug]/[[...rest]]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/s/[token]/page/react-loadable-manifest.json +6 -3
- package/.next/standalone/.next/server/app/s/[token]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/s/[token]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/signin/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/0.u4_next_dist_esm_build_templates_app-route_12q-bgc.js +3 -0
- package/.next/standalone/.next/server/chunks/{[externals]__0pbxe4i._.js → [externals]__0k160xp._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0-eaqv1._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0490w4y._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d619fd._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__128augu._.js → [root-of-the-server]__0i9yw0.._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0k2nouu._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0skgiv0._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0z5f4h8._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~-~tiv._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__101dr96._.js +4 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__10gr1bo._.js +20 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__11ltgmp._.js +4 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__12xtht5._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{0~w0_katex_dist_katex_mjs_10cht08._.js → 0~w0_katex_dist_katex_mjs_0q62ivk._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0cvdst3._.js → [root-of-the-server]__01rzr4_._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gvf9ub._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0_j0j3f._.js +187 -0
- package/.next/standalone/.next/server/chunks/ssr/_0x_nhpz._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0ydcz3a._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0dir6h3._.js → node_modules__pnpm_02ffwq1._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0tc8zr6._.js → node_modules__pnpm_050~9nq._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0t6xsn9._.js → node_modules__pnpm_08m7m-a._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0ue8lv5._.js → node_modules__pnpm_0_.yify._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0g.7k_n._.js → node_modules__pnpm_0aqjih7._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_00tpvdu._.js → node_modules__pnpm_0d49_zw._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0a6kqvf._.js → node_modules__pnpm_0dp1x47._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0djcgeo._.js → node_modules__pnpm_0eorjeh._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0gh6xw7._.js → node_modules__pnpm_0gsozg1._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0v~pnm.._.js → node_modules__pnpm_0i4r.y0._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_05jxr.d._.js → node_modules__pnpm_0ibur64._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0qhuwah._.js → node_modules__pnpm_0m241jl._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0h5~9y~._.js → node_modules__pnpm_0mempoh._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0mus7ah._.js → node_modules__pnpm_0ourokm._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_00b2ftc._.js → node_modules__pnpm_0r.tt1v._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_029sanw._.js → node_modules__pnpm_0raxwvs._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0-y2e10._.js → node_modules__pnpm_0t4fzpm._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0t9_wi1._.js → node_modules__pnpm_0tfz13_._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0w.m8_8._.js → node_modules__pnpm_0u3pcuw._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0mwe-i3._.js → node_modules__pnpm_0um58j1._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_05m3zxe._.js → node_modules__pnpm_0uuq018._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0oqzhc1._.js → node_modules__pnpm_0w9yy9l._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0g_0et~._.js → node_modules__pnpm_0whqcle._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_09h4wu8._.js → node_modules__pnpm_0zf4hna._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_01mrx7s._.js → node_modules__pnpm_0~ifp4a._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0hptidd._.js → node_modules__pnpm_10j.ii0._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0~ycrqy._.js → node_modules__pnpm_13xyy7r._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_s_[token]_page_tsx_0_fzrmd._.js +3 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/middleware.js +2 -2
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/0.4z79b01ogty.js +185 -0
- package/.next/standalone/.next/static/chunks/04rw10yyyszwm.js +1 -0
- package/.next/standalone/.next/static/chunks/{136jk6_h2z_jw.js → 0atu_qcd~4ox3.js} +1 -1
- package/.next/standalone/.next/static/chunks/0awx2jmztt7~v.js +1 -0
- package/.next/standalone/.next/static/chunks/0azp.ftsp.56w.js +1 -0
- package/.next/standalone/.next/static/chunks/{0lsw6lsaj7lby.js → 0ebe2favul_io.js} +1 -1
- package/.next/standalone/.next/static/chunks/0f8vcij0xcgfj.css +1 -0
- package/.next/standalone/.next/static/chunks/0gcwvlawxhe9m.js +1 -0
- package/.next/standalone/.next/static/chunks/0geoueeyd9~sr.js +12 -0
- package/.next/standalone/.next/static/chunks/0vf2x0i9qqll7.js +1 -0
- package/.next/standalone/.next/static/chunks/{0ccw-uc_3ao.w.js → 0wk88u86juf-9.js} +1 -1
- package/.next/standalone/.next/static/chunks/{12-umagms5yro.css → 0~~v9pq1icp09.css} +15 -15
- package/.next/standalone/.next/static/chunks/16m10irvo-y13.js +1 -0
- package/.next/standalone/.next/static/chunks/{0_6~i5v43qpgh.js → 1700k0l32z3_f.js} +1 -1
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/server.js +1 -1
- package/package.json +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__02ovz0q._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05h6fe-._.js +0 -20
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__07757zz._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ah~dki._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0pftyle._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qwikxp._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~q~4xc._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_chunk-EIO257PC_0bbzsue.js +0 -24
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_data_image-GAAHSSAO_02qfk03.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_ar-SA-G6X2FPQ2_0bgz3ij.js +0 -12
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_az-AZ-76LH7QW2_0l.fl3a.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_bg-BG-XCXSNQG7_04hl.7k.js +0 -7
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_bn-BD-2XOGV67Q_01xbnnb.js +0 -7
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_ca-ES-6MX7JW3Y_0wojdyn.js +0 -10
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_cs-CZ-2BRQDIVT_033w-8o.js +0 -13
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_da-DK-5WZEPLOC_0p28n6z.js +0 -7
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_de-DE-XR44H4JA_091-v9i.js +0 -10
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_el-GR-BZB4AONW_0e~_nvm.js +0 -12
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_en-B4ZKOASM_0re7gz~.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_es-ES-U4NZUMDT_0.ma57u.js +0 -11
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_eu-ES-A7QVB2H4_0-3jlza.js +0 -13
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_fa-IR-HGAKTJCU_0kyo75j.js +0 -10
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_fi-FI-Z5N7JZ37_03~-wak.js +0 -8
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_fr-FR-RHASNOE6_0vj4.6m.js +0 -11
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_gl-ES-HMX3MZ6V_0ge3k2a.js +0 -12
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_he-IL-6SHJWFNN_02mvq6w.js +0 -12
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_hi-IN-IWLTKZ5I_0ykyas7.js +0 -6
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_hu-HU-A5ZG7DT2_0qes2r3.js +0 -9
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_id-ID-SAP4L64H_10-q2pe.js +0 -12
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_it-IT-JPQ66NNP_0v01xnc.js +0 -13
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_ja-JP-DBVTYXUO_0.eic25.js +0 -10
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_kaa-6HZHGXH3_13id57-.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_kab-KAB-ZGHBKWFO_0jqbq6p.js +0 -10
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_kk-KZ-P5N5QNE5_0y68938.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_km-KH-HSX4SM5Z_0t81hs4.js +0 -13
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_ko-KR-MTYHY66A_00hd9ok.js +0 -11
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_ku-TR-6OUDTVRD_0aj9zjv.js +0 -11
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_lt-LT-XHIRWOB4_01n4nxs.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_lv-LV-5QDEKY6T_09th_og.js +0 -9
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_mr-IN-CRQNXWMA_0f.mmnm.js +0 -15
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_my-MM-5M5IBNSE_0cmji~9.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_nb-NO-T6EIAALU_0ku81lh.js +0 -12
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_nl-NL-IS3SIHDZ_014e40r.js +0 -10
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_nn-NO-6E72VCQL_0__ozrm.js +0 -10
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_oc-FR-POXYY2M6_10wf8hz.js +0 -10
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_pa-IN-N4M65BXN_0_-oitq.js +0 -6
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_percentages-BXMCSKIN_0zq.~3u.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_pl-PL-T2D74RX3_0iycp0l.js +0 -11
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_pt-BR-5N22H2LF_13u2gn5.js +0 -11
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_pt-PT-UZXXM6DQ_06zpa4y.js +0 -11
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_ro-RO-JPDTUUEW_0smzsn~.js +0 -13
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_ru-RU-B4JR7IUQ_0k7tnk..js +0 -11
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_si-LK-N5RQ5JYF_0smiu._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_sk-SK-C5VTKIMK_0mw.bwx.js +0 -8
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_sl-SI-NN7IZMDC_0a~zfj2.js +0 -8
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_sv-SE-XGPEYMSR_13eyd19.js +0 -12
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_ta-IN-2NMHFXQM_0gro~.p.js +0 -11
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_th-TH-HPSO5L25_0g9-jlz.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_tr-TR-DEFEU3FU_0hz_ysn.js +0 -9
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_uk-UA-QMV73CPH_0a-1zm_.js +0 -8
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_vi-VN-M7AON7JQ_064lk16.js +0 -7
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_zh-CN-LNUGB5OW_0tjfdi9.js +0 -12
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_zh-HK-E62DVLB3_02lyow7.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_locales_zh-TW-RAJ6MFWO_0_w~-rv.js +0 -11
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_subset-shared_chunk_0ul_fou.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/0e-l_@excalidraw_excalidraw_dist_prod_subset-worker_chunk_0zcuc2..js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/0ga5_browser-fs-access_dist_directory-open-01563666_07ib74n.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/0ga5_browser-fs-access_dist_directory-open-4ed118d0_0b4y6i6.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/0ga5_browser-fs-access_dist_file-open-002ab408_0ez_z90.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/0ga5_browser-fs-access_dist_file-open-7c801643_0y_pemm.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/0ga5_browser-fs-access_dist_file-save-3189631c_0n_ka1t.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/0ga5_browser-fs-access_dist_file-save-745eba88_0zl-ssm.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/0lk~_image-blob-reduce_dist_image-blob-reduce_esm_mjs_12flbzg._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/0o~2_canvas-roundrect-polyfill_roundRect_0e3y_~n.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/0sd7_pica_dist_pica_05egg_..js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/0~w0_katex_dist_katex_mjs_0gmvgrf._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0d89mrm._.js +0 -14
- package/.next/standalone/.next/server/chunks/ssr/_0d28.zp._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0e1uo~z._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0k6g8yo._.js +0 -187
- package/.next/standalone/.next/server/chunks/ssr/_0sr4wj.._.js +0 -110
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0045hhh._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_02uqova._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_06xoojz._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_085kv-l._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0883ifk._.js +0 -17
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_08wjj_6._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_098q_0q._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0_rahb~._.js +0 -26
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0cxv0mk._.js +0 -17
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0d34dhx._.js +0 -11
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0deg.gs._.js +0 -31
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0fbxocr._.js +0 -17
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0fk6r5-._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0gict7y._.js +0 -17
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0mtv_af._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0orvks9._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0oupw24._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0rqsp1j._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0tnriso._.js +0 -17
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0tz8-2x._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0uap1~z._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0w5u-~w._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0ws7ot~._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0yect_i._.js +0 -45
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0ygdthn._.js +0 -42
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0z7wvui._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_1032cax._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_107~rhn._.js +0 -17
- package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_13icm5c._.js +0 -3
- package/.next/standalone/.next/static/chunks/03d9mze.e_uaz.js +0 -12
- package/.next/standalone/.next/static/chunks/05cs75jhm80il.js +0 -185
- package/.next/standalone/.next/static/chunks/0_7f_-q0ts6hi.js +0 -1
- package/.next/standalone/.next/static/chunks/0dbqnlb6493qs.js +0 -1
- package/.next/standalone/.next/static/chunks/0drn9l.ihdwh-.js +0 -1
- package/.next/standalone/.next/static/chunks/0rows7ykoflq3.js +0 -1
- package/.next/standalone/.next/static/chunks/0ujpqxim7iqme.js +0 -1
- package/.next/standalone/.next/static/chunks/13yj3_o5lzr7c.css +0 -1
- /package/.next/standalone/.next/static/{RC2yGgJpI7BPjsVect9PK → UIhlbM5yWbVS3aIHrh_He}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{RC2yGgJpI7BPjsVect9PK → UIhlbM5yWbVS3aIHrh_He}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{RC2yGgJpI7BPjsVect9PK → UIhlbM5yWbVS3aIHrh_He}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,354502,e=>{"use strict";e.s(["apiUrl",0,function(e){if(!e.startsWith("/"))return e;let t=window.__WIKI_PREFIX??"";return!t||e.startsWith(t+"/")||e===t?e:t+e},"isLite",0,function(){return!0===window.__WIKI_LITE}])},691520,e=>{"use strict";let t=(0,e.i(605993).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,t],691520)},109680,e=>{"use strict";let t=(0,e.i(605993).default)("type",[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]]);e.s(["Type",0,t],109680)},897802,455470,e=>{"use strict";e.s(["ok",0,function(){},"unreachable",0,function(){}],897802);let t=c(/[A-Za-z]/),s=c(/[\dA-Za-z]/),n=c(/[#-'*+\--9=?A-Z^-~]/),r=c(/\d/),a=c(/[\dA-Fa-f]/),i=c(/[!-/:-@[-`{-~]/),l=c(/\p{P}|\p{S}/u),o=c(/\s/);function c(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}e.s(["asciiAlpha",0,t,"asciiAlphanumeric",0,s,"asciiAtext",0,n,"asciiControl",0,function(e){return null!==e&&(e<32||127===e)},"asciiDigit",0,r,"asciiHexDigit",0,a,"asciiPunctuation",0,i,"markdownLineEnding",0,function(e){return null!==e&&e<-2},"markdownLineEndingOrSpace",0,function(e){return null!==e&&(e<0||32===e)},"markdownSpace",0,function(e){return -2===e||-1===e||32===e},"unicodePunctuation",0,l,"unicodeWhitespace",0,o],455470)},106227,e=>{"use strict";e.s(["default",0,function(e){if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}])},402652,173119,e=>{"use strict";let t=function(e){var r,a;if(null==e)return n;if("function"==typeof e)return s(e);if("object"==typeof e){return Array.isArray(e)?function(e){let n=[],r=-1;for(;++r<e.length;)n[r]=t(e[r]);return s(function(...e){let t=-1;for(;++t<n.length;)if(n[t].apply(this,e))return!0;return!1})}(e):(r=e,s(function(e){let t;for(t in r)if(e[t]!==r[t])return!1;return!0}))}if("string"==typeof e){return a=e,s(function(e){return e&&e.type===a})}throw Error("Expected function, string, or object as test")};function s(e){return function(t,s,n){return!!(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof s?s:void 0,n||void 0))}}function n(){return!0}e.s(["convert",0,t],173119);let r=[];e.s(["EXIT",0,!1,"visitParents",0,function(e,s,n,a){let i;"function"==typeof s&&"function"!=typeof n?(a=n,n=s):i=s;let l=t(i),o=a?-1:1;(function e(t,i,c){let d=t&&"object"==typeof t?t:{};if("string"==typeof d.type){let e="string"==typeof d.tagName?d.tagName:"string"==typeof d.name?d.name:void 0;Object.defineProperty(u,"name",{value:"node ("+t.type+(e?"<"+e+">":"")+")"})}return u;function u(){var d;let u,m,h,f=r;if((!s||l(t,i,c[c.length-1]||void 0))&&!1===(f=Array.isArray(d=n(t,c))?d:"number"==typeof d?[!0,d]:null==d?r:[d])[0])return f;if("children"in t&&t.children&&t.children&&"skip"!==f[0])for(m=(a?t.children.length:-1)+o,h=c.concat(t);m>-1&&m<t.children.length;){if(!1===(u=e(t.children[m],m,h)())[0])return u;m="number"==typeof u[1]?u[1]:m+o}return f}})(e,void 0,[])()}],402652)},216920,e=>{"use strict";var t=e.i(402652);e.s(["visit",0,function(e,s,n,r){let a,i,l;"function"==typeof s&&"function"!=typeof n?(i=void 0,l=s,a=n):(i=s,l=n,a=r),(0,t.visitParents)(e,i,function(e,t){let s=t[t.length-1],n=s?s.children.indexOf(e):void 0;return l(e,n,s)},a)}])},470284,e=>{"use strict";e.s(["ccount",0,function(e,t){let s=String(e);if("string"!=typeof t)throw TypeError("Expected character");let n=0,r=s.indexOf(t);for(;-1!==r;)n++,r=s.indexOf(t,r+t.length);return n}])},784484,e=>{"use strict";e.s(["normalizeIdentifier",0,function(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}])},227066,e=>{"use strict";var t=e.i(455470);e.s(["classifyCharacter",0,function(e){return null===e||(0,t.markdownLineEndingOrSpace)(e)||(0,t.unicodeWhitespace)(e)?1:(0,t.unicodePunctuation)(e)?2:void 0}])},12105,e=>{"use strict";let t={};function s(e,t,s){var r;if((r=e)&&"object"==typeof r){if("value"in e)return"html"!==e.type||s?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return n(e.children,t,s)}return Array.isArray(e)?n(e,t,s):""}function n(e,t,n){let r=[],a=-1;for(;++a<e.length;)r[a]=s(e[a],t,n);return r.join("")}e.s(["toString",0,function(e,n){let r=n||t;return s(e,"boolean"!=typeof r.includeImageAlt||r.includeImageAlt,"boolean"!=typeof r.includeHtml||r.includeHtml)}])},144819,559245,e=>{"use strict";function t(e,t,s,n){let r,a=e.length,i=0;if(t=t<0?-t>a?0:a+t:t>a?a:t,s=s>0?s:0,n.length<1e4)(r=Array.from(n)).unshift(t,s),e.splice(...r);else for(s&&e.splice(t,s);i<n.length;)(r=n.slice(i,i+1e4)).unshift(t,0),e.splice(...r),i+=1e4,t+=1e4}e.s(["push",0,function(e,s){return e.length>0?(t(e,e.length,0,s),e):s},"splice",0,t],559245);let s={}.hasOwnProperty;e.s(["combineExtensions",0,function(e){let n={},r=-1;for(;++r<e.length;)!function(e,n){let r;for(r in n){let a,i=(s.call(e,r)?e[r]:void 0)||(e[r]={}),l=n[r];if(l)for(a in l){s.call(i,a)||(i[a]=[]);let e=l[a];!function(e,s){let n=-1,r=[];for(;++n<s.length;)("after"===s[n].add?e:r).push(s[n]);t(e,0,0,r)}(i[a],Array.isArray(e)?e:e?[e]:[])}}}(n,e[r]);return n}],144819)},51256,133220,e=>{"use strict";var t=e.i(455470);function s(e,s,n,r){let a=r?r-1:1/0,i=0;return function(r){return(0,t.markdownSpace)(r)?(e.enter(n),function r(l){return(0,t.markdownSpace)(l)&&i++<a?(e.consume(l),r):(e.exit(n),s(l))}(r)):s(r)}}e.s(["factorySpace",0,s],133220),e.s(["blankLine",0,{partial:!0,tokenize:function(e,n,r){return function(n){return(0,t.markdownSpace)(n)?s(e,a,"linePrefix")(n):a(n)};function a(e){return null===e||(0,t.markdownLineEnding)(e)?n(e):r(e)}}}],51256)},705568,e=>{"use strict";e.s(["resolveAll",0,function(e,t,s){let n=[],r=-1;for(;++r<e.length;){let a=e[r].resolveAll;a&&!n.includes(a)&&(t=a(t,s),n.push(a))}return t}])},670977,e=>{"use strict";var t=e.i(468317),s=e.i(425732),n=e.i(794469),r=e.i(43240),a=e.i(10137),i=e.i(391548),l=e.i(301138),o=e.i(764143),c=e.i(916767),d=e.i(691520),u=e.i(567776),m=e.i(877031),h=e.i(59805),f=e.i(354502),x=e.i(975157),p=e.i(519455),g=e.i(793479),w=e.i(515288),j=e.i(427423),v=e.i(991685),b=e.i(667413),N=e.i(109680),y=e.i(917356),k=e.i(755146),S=e.i(395624),C=e.i(214177),E=e.i(660090);let P={system:"System",light:"Light",dark:"Dark"},T=["system","light","dark"];function L({className:e}){let s=(0,S.useViewWidthStore)(e=>e.width),n=(0,S.useViewWidthStore)(e=>e.setWidth),a=(0,S.useViewWidthStore)(e=>e.align),i=(0,S.useViewWidthStore)(e=>e.setAlign),l=(0,C.useFontStore)(e=>e.bodyScale),o=(0,C.useFontStore)(e=>e.setScale),c=(0,C.useFontStore)(e=>e.applyPreset),d=(0,C.useFontStore)(e=>e.ui),u=(0,C.useFontStore)(e=>e.body),m=(0,C.useFontStore)(e=>e.heading),h=(0,C.useFontStore)(e=>e.code),{theme:f,setTheme:x}=(0,y.useTheme)(),g=Math.max(0,E.FONT_SCALE_STEPS.indexOf(l)),w=(0,E.matchFontPreset)({ui:d,body:u,heading:m,code:h}),j=f??"system";return(0,t.jsxs)(k.DropdownMenu,{children:[(0,t.jsx)(k.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsx)(p.Button,{size:"sm",variant:"ghost",className:`h-7 w-7 p-0 ${e??""}`,title:"Reading options",children:(0,t.jsx)(N.Type,{className:"h-3.5 w-3.5"})})}),(0,t.jsxs)(k.DropdownMenuContent,{align:"end",className:"w-52",children:[(0,t.jsx)(k.DropdownMenuLabel,{className:"text-[11px] text-muted-foreground",children:"Font"}),E.FONT_PRESET_IDS.map(e=>(0,t.jsxs)(k.DropdownMenuItem,{onClick:()=>c(e),className:"flex flex-col items-start gap-0.5 text-xs",children:[(0,t.jsxs)("span",{className:"flex w-full items-center justify-between",children:[E.FONT_PRESETS[e].label,e===w&&(0,t.jsx)(r.Check,{className:"h-3.5 w-3.5"})]}),(0,t.jsx)("span",{className:"w-full truncate text-[10px] text-muted-foreground",children:E.FONT_PRESETS[e].description})]},e)),(0,t.jsx)(k.DropdownMenuSeparator,{}),(0,t.jsxs)(k.DropdownMenuLabel,{className:"text-[11px] text-muted-foreground",children:["Text size — ",Math.round(100*l),"%"]}),(0,t.jsxs)(k.DropdownMenuItem,{disabled:g<=0,onSelect:e=>{e.preventDefault(),o("body",E.FONT_SCALE_STEPS[g-1])},className:"flex items-center justify-between text-xs",children:["Smaller",(0,t.jsx)(v.Minus,{className:"h-3.5 w-3.5"})]}),(0,t.jsxs)(k.DropdownMenuItem,{disabled:g>=E.FONT_SCALE_STEPS.length-1,onSelect:e=>{e.preventDefault(),o("body",E.FONT_SCALE_STEPS[g+1])},className:"flex items-center justify-between text-xs",children:["Larger",(0,t.jsx)(b.Plus,{className:"h-3.5 w-3.5"})]}),(0,t.jsx)(k.DropdownMenuSeparator,{}),(0,t.jsx)(k.DropdownMenuLabel,{className:"text-[11px] text-muted-foreground",children:"Width"}),S.VIEW_WIDTH_ORDER.map(e=>(0,t.jsxs)(k.DropdownMenuItem,{onClick:()=>n(e),className:"flex items-center justify-between text-xs",children:[S.VIEW_WIDTH_LABEL[e],e===s&&(0,t.jsx)(r.Check,{className:"h-3.5 w-3.5"})]},e)),(0,t.jsx)(k.DropdownMenuSeparator,{}),(0,t.jsx)(k.DropdownMenuLabel,{className:"text-[11px] text-muted-foreground",children:"Alignment"}),S.VIEW_ALIGN_ORDER.map(e=>(0,t.jsxs)(k.DropdownMenuItem,{onClick:()=>i(e),className:"flex items-center justify-between text-xs",children:[S.VIEW_ALIGN_LABEL[e],e===a&&(0,t.jsx)(r.Check,{className:"h-3.5 w-3.5"})]},e)),(0,t.jsx)(k.DropdownMenuSeparator,{}),(0,t.jsx)(k.DropdownMenuLabel,{className:"text-[11px] text-muted-foreground",children:"Theme"}),T.map(e=>(0,t.jsxs)(k.DropdownMenuItem,{onClick:()=>x(e),className:"flex items-center justify-between text-xs",children:[P[e],j===e&&(0,t.jsx)(r.Check,{className:"h-3.5 w-3.5"})]},e))]})]})}var A=e.i(905381),I=e.i(406347),D=e.i(727551),_=e.i(496366),F=e.i(797715);let M=(0,A.default)(()=>e.A(768555).then(e=>e.CanvasViewer),{loadableGenerated:{modules:[561021]},ssr:!1});function W(e){let t=e.lastIndexOf(".");return t<0?"":e.slice(t+1).toLowerCase()}function O(e){let t=W(e);return["md","markdown"].includes(t)?"markdown":"excalidraw"===t?"canvas":["csv","tsv"].includes(t)?"csv":["pdf"].includes(t)?"pdf":["html","htm"].includes(t)?"html":["png","jpg","jpeg","gif","webp","svg","avif","ico","bmp"].includes(t)?"image":["mp4","webm","mov","m4v","mp3","wav","ogg","m4a","aac"].includes(t)?"media":["txt","log","ini","env","conf"].includes(t)?"text":["py","js","ts","tsx","jsx","go","rs","java","c","cpp","h","sh","bash","zsh","rb","php","swift","kt","lua","sql","yaml","yml","toml","json","xml","css","scss","mmd","mermaid"].includes(t)?"source":"binary"}function R(e,t){let s=(0,f.apiUrl)(`/api/share/${e}/asset`);return t?`${s}?path=${encodeURIComponent(t)}`:s}function $({content:e,filename:s,filePath:n,token:r,relPath:a,readerClass:i,onNavigate:l}){switch(O(s)){case"markdown":return(0,t.jsx)(z,{content:e,token:r,relPath:a,readerClass:i,onNavigate:l});case"canvas":return(0,t.jsx)(M,{content:e,initialSha:null,path:a??n,title:s,readOnly:!0});case"image":return(0,t.jsx)(B,{filename:s,token:r,relPath:a});case"pdf":return(0,t.jsx)(U,{filename:s,token:r,relPath:a});case"media":return(0,t.jsx)(V,{filename:s,token:r,relPath:a});case"html":return(0,t.jsx)(K,{content:e,filename:s});case"csv":return(0,t.jsx)(G,{content:e,readerClass:i});case"source":case"text":return(0,t.jsx)(H,{content:e,filename:s,readerClass:i});case"binary":return(0,t.jsx)(Z,{filename:s,token:r,relPath:a})}}function z({content:e,token:s,relPath:n,readerClass:r,onNavigate:a}){let[i,l]=(0,h.useState)("");return(0,h.useEffect)(()=>{let t=!1;return(0,F.markdownToHtml)(e,{sanitize:!0,pagePath:n??"",relativeBases:{asset:(0,f.apiUrl)(`/api/share/${s}/asset`),page:(0,f.apiUrl)(`/s/${s}`)}}).then(e=>{t||l(e)}),()=>{t=!0}},[e,s,n]),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:(0,t.jsx)("div",{className:(0,x.cn)("w-full px-4 py-8 prose prose-neutral dark:prose-invert share-prose",r),onClick:e=>{let t;if(!a||e.defaultPrevented||0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let n=e.target.closest("a"),r=n?.getAttribute("href");if(!r)return;let i=(0,f.apiUrl)(`/s/${s}`);if(r.startsWith(`${i}?`)){try{t=new URL(r,window.location.origin).searchParams.get("path")}catch{return}null!==t&&(e.preventDefault(),a(t))}},children:(0,t.jsx)("div",{dangerouslySetInnerHTML:{__html:i}})})})}function B({filename:e,token:s,relPath:n}){let r=R(s,n);return(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center p-8 bg-[repeating-conic-gradient(hsl(var(--muted))_0%_25%,transparent_0%_50%)] bg-[length:20px_20px]",children:(0,t.jsx)("img",{src:r,alt:e,className:"max-w-full max-h-[80vh] object-contain rounded-sm"})})}function U({filename:e,token:s,relPath:n}){let r=R(s,n);return(0,t.jsx)("div",{className:"flex-1 flex flex-col min-h-0",children:(0,t.jsx)("iframe",{src:r,title:e,className:"flex-1 w-full border-0",style:{minHeight:"80vh"}})})}function V({filename:e,token:s,relPath:n}){let r=R(s,n),a=["mp4","webm","mov","m4v"].includes(W(e));return(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center p-8",children:a?(0,t.jsx)("video",{controls:!0,className:"max-w-full max-h-[80vh] rounded-sm",src:r}):(0,t.jsxs)("div",{className:"w-full max-w-md",children:[(0,t.jsx)("audio",{controls:!0,className:"w-full",src:r}),(0,t.jsx)("p",{className:"text-center text-sm text-muted-foreground mt-3",children:e})]})})}function K({content:e,filename:s}){let[n,r]=(0,h.useState)(!1);return(0,t.jsxs)("div",{className:"flex-1 flex flex-col min-h-0",children:[(0,t.jsx)("div",{className:"flex items-center justify-end gap-2 px-4 py-2 border-b bg-muted/30",children:(0,t.jsx)(p.Button,{variant:"ghost",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:()=>r(e=>!e),children:n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(_.Ban,{className:"h-3.5 w-3.5"}),"Disable scripts"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(D.Play,{className:"h-3.5 w-3.5"}),"Enable scripts"]})})}),(0,t.jsx)("iframe",{srcDoc:e,title:s,className:"flex-1 w-full border-0 bg-white",style:{minHeight:"80vh"},sandbox:n?"allow-scripts allow-forms allow-popups allow-top-navigation-by-user-activation":"allow-forms allow-popups allow-top-navigation-by-user-activation"},n?"scripts-on":"scripts-off")]})}function H({content:e,filename:s,readerClass:n}){let r=e.split("\n"),a=r.length,[i,l]=(0,h.useState)(a<=500),o=i?r:r.slice(0,500);return(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:(0,t.jsxs)("div",{className:(0,x.cn)("w-full",n),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-2 border-b bg-muted/30",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:s}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[a.toLocaleString()," lines"]})]}),(0,t.jsx)("pre",{className:"text-[13px] font-mono leading-relaxed",children:(0,t.jsx)("table",{className:"w-full border-collapse",children:(0,t.jsx)("tbody",{children:o.map((e,s)=>(0,t.jsxs)("tr",{className:"hover:bg-muted/50",children:[(0,t.jsx)("td",{className:"select-none text-right pr-4 pl-4 py-0 text-muted-foreground/50 text-xs w-[1%] whitespace-nowrap align-top",children:s+1}),(0,t.jsx)("td",{className:"pr-4 py-0 whitespace-pre-wrap break-all",children:e||" "})]},s))})})}),!i&&a>500&&(0,t.jsx)("div",{className:"flex justify-center py-4 border-t",children:(0,t.jsxs)(p.Button,{size:"sm",variant:"ghost",onClick:()=>l(!0),children:["Show all ",a.toLocaleString()," lines"]})})]})})}function G({content:e,readerClass:s}){let n=(0,h.useMemo)(()=>e.split("\n").filter(Boolean).map(e=>{let t=[],s="",n=!1;for(let r=0;r<e.length;r++){let a=e[r];'"'===a?n=!n:","!==a&&" "!==a||n?s+=a:(t.push(s.trim()),s="")}return t.push(s.trim()),t}),[e]);if(0===n.length)return null;let r=n[0],a=n.slice(1);return(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:(0,t.jsx)("div",{className:(0,x.cn)("w-full p-4",s),children:(0,t.jsxs)("table",{className:"w-full text-sm border-collapse",children:[(0,t.jsx)("thead",{children:(0,t.jsx)("tr",{children:r.map((e,s)=>(0,t.jsx)("th",{className:"text-left px-3 py-2 border-b-2 border-border font-medium bg-muted/50 whitespace-nowrap",children:e},s))})}),(0,t.jsx)("tbody",{children:a.map((e,s)=>(0,t.jsx)("tr",{className:"hover:bg-muted/30",children:e.map((e,s)=>(0,t.jsx)("td",{className:"px-3 py-1.5 border-b border-border/50 whitespace-nowrap",children:e},s))},s))})]})})})}function Z({filename:e,token:s,relPath:n}){let r=R(s,n);return(0,t.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center gap-4 p-8",children:[(0,t.jsx)(o.FileText,{className:"h-12 w-12 text-muted-foreground"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e}),(0,t.jsx)("a",{href:r,download:e,children:(0,t.jsxs)(p.Button,{size:"sm",variant:"outline",className:"gap-1.5",children:[(0,t.jsx)(I.Download,{className:"h-3.5 w-3.5"}),"Download file"]})})]})}function q({token:e,rootName:s,currentPath:n,currentIsDir:r,seed:i,onNavigate:l}){let u=(0,h.useRef)(new Map),m=(0,h.useRef)(new Set),[,p]=(0,h.useState)(0),[g,w]=(0,h.useState)(!1),[j,v]=(0,h.useState)(()=>new Set([""])),[b,N]=(0,h.useState)(new Set);(0,h.useEffect)(()=>{!i||u.current.has(i.path)||(u.current.set(i.path,i.entries),p(e=>e+1))},[i]);let y=(0,h.useCallback)(async t=>{if(!(u.current.has(t)||m.current.has(t))){m.current.add(t),N(e=>new Set(e).add(t));try{let s=t?`?path=${encodeURIComponent(t)}`:"",n=await fetch((0,f.apiUrl)(`/api/share/${e}${s}`));if(401===n.status)return void w(!0);if(!n.ok)return;let r=await n.json();u.current.set(t,Array.isArray(r.entries)?r.entries:[]),p(e=>e+1)}catch{}finally{m.current.delete(t),N(e=>{let s=new Set(e);return s.delete(t),s})}}},[e]),k=(0,h.useMemo)(()=>{let e=[""];if(n){let t=n.split("/").filter(Boolean),s=r?t:t.slice(0,-1);for(let t=0;t<s.length;t++)e.push(s.slice(0,t+1).join("/"))}return e},[n,r]);if((0,h.useEffect)(()=>{if(!g)for(let e of(v(e=>{if(k.every(t=>e.has(t)))return e;let t=new Set(e);for(let e of k)t.add(e);return t}),k))u.current.has(e)||y(e)},[k,g,y]),g)return null;let S=e=>{let s=u.current.get(e)??[];return(0,t.jsxs)("ul",{className:"space-y-0.5",children:[s.map(e=>{let s=j.has(e.path),i=e.isDir?r&&e.path===n:e.path===n;return e.isDir?(0,t.jsxs)("li",{children:[(0,t.jsxs)("button",{type:"button","aria-expanded":s,"aria-current":i?"page":void 0,onClick:()=>{var t,n;return s?(t=e.path,void v(e=>{if(!e.has(t))return e;let s=new Set(e);return s.delete(t),s})):(n=e.path,void(v(e=>new Set(e).add(n)),!u.current.has(n)&&y(n),l(n)))},className:(0,x.cn)("flex w-full items-center gap-1 rounded px-2 py-1 text-left text-sm hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",i&&"bg-accent font-medium"),children:[(0,t.jsx)(a.ChevronRight,{className:(0,x.cn)("h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform",s&&"rotate-90")}),(0,t.jsx)(c.Folder,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",title:e.name,children:e.name}),b.has(e.path)&&(0,t.jsx)(d.Loader2,{className:"h-3 w-3 shrink-0 animate-spin text-muted-foreground"})]}),s&&(0,t.jsx)("div",{className:"ml-3 border-l border-border pl-1",children:S(e.path)})]},e.path):(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button","aria-current":i?"page":void 0,onClick:()=>l(e.path),className:(0,x.cn)("flex w-full items-center gap-1.5 rounded px-2 py-1 text-left text-sm hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",i&&"bg-accent font-medium"),children:[(0,t.jsx)(o.FileText,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",title:e.name,children:e.name})]})},e.path)}),0===s.length&&!b.has(e)&&(0,t.jsx)("li",{className:"px-2 py-1 text-xs text-muted-foreground",children:"Empty folder"})]})};return(0,t.jsxs)("div",{className:"text-sm",children:[(0,t.jsxs)("div",{className:"mb-1 flex items-center gap-1.5 px-2 py-1 text-xs font-medium text-muted-foreground",children:[(0,t.jsx)(c.Folder,{className:"h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 truncate",title:s,children:s})]}),S("")]})}var X=e.i(812273);let J=new Set(["image","pdf","media","binary"]);e.s(["default",0,function({params:e}){let[v,b]=(0,h.useState)(null),[N,y]=(0,h.useState)(""),[k,C]=(0,h.useState)({kind:"loading"}),[E,P]=(0,h.useState)(""),[T,A]=(0,h.useState)(!1),[I,D]=(0,h.useState)(!1),[_,F]=(0,h.useState)(null),[M,W]=(0,h.useState)(null),[R,z]=(0,h.useState)(""),[B,U]=(0,h.useState)(null),V=(0,X.useIsMobile)(),K=(0,S.useViewWidthStore)(e=>e.width),H=(0,S.useViewWidthStore)(e=>e.align),G=["markdown","source","text","csv","html"].includes("file"===k.kind?O(k.filename):"markdown"),Z=(0,x.cn)(S.VIEW_ALIGN_CLASS[H],S.VIEW_WIDTH_CLASS[K]),Q=e=>{F(e),setTimeout(()=>F(null),2e3)},Y=async()=>{if("file"===k.kind)try{await navigator.clipboard.writeText(k.content),Q("raw")}catch{}},ee=(0,h.useCallback)(async e=>{if(v){C({kind:"loading"});try{let t,s=e?`?path=${encodeURIComponent(e)}`:"",n=await fetch((0,f.apiUrl)(`/api/share/${v}${s}`)),r=await n.json(),a=n.ok?(("file"===r.shareKind||"dir"===r.shareKind)&&W(r.shareKind),"string"==typeof r.shareName&&r.shareName&&z(r.shareName),t="number"==typeof r.viewCount?r.viewCount:0,"dir"===r.kind?{kind:"dir",name:String(r.name??""),path:String(r.path??e),entries:Array.isArray(r.entries)?r.entries:[],truncated:!0===r.truncated,viewCount:t}:"string"==typeof r.content?{kind:"file",content:r.content,filename:String(r.filename??"document"),filePath:String(r.filePath??"document"),relPath:String(r.path??e),viewCount:t}:null):null;if(a)return void C(a);let i=e.split("/").pop()??"";if(e&&J.has(O(i)))return void C({kind:"file",content:"",filename:i,filePath:e,relPath:e,viewCount:0});401===n.status&&r.protected?C({kind:"password",message:String(r.message??"")}):410===n.status?C({kind:"error",title:"Link unavailable",message:String(r.message??"This share link is no longer available.")}):404===n.status?C({kind:"error",title:"Not found",message:"This share link does not exist."}):C({kind:"error",title:"Error",message:String(r.message??"Something went wrong. Try again later.")})}catch{C({kind:"error",title:"Connection error",message:"Could not reach the server. Check your connection."})}}},[v]);(0,h.useEffect)(()=>{e.then(e=>{b(e.token),y(new URLSearchParams(window.location.search).get("path")??"")})},[e]),(0,h.useEffect)(()=>{v&&ee(N)},[v,N,ee]);let et=(0,h.useCallback)(e=>{let t=new URL(window.location.href);e?t.searchParams.set("path",e):t.searchParams.delete("path"),window.history.pushState(null,"",t.toString()),y(e)},[]);(0,h.useEffect)(()=>{let e=()=>y(new URLSearchParams(window.location.search).get("path")??"");return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[]);let es=B??!V,en=()=>{let e=!es;U(e);try{window.localStorage.setItem("wiki-share-nav",e?"open":"closed")}catch{}};(0,h.useEffect)(()=>{try{let e=window.localStorage.getItem("wiki-share-nav");("open"===e||"closed"===e)&&U("open"===e)}catch{}},[]);let er=(0,h.useMemo)(()=>"dir"===k.kind?{path:k.path,entries:k.entries}:void 0,[k]),ea=async e=>{if(e.preventDefault(),E.trim()&&v){A(!0),D(!1);try{let e=await fetch((0,f.apiUrl)(`/api/share/${v}`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:E.trim()})});if(e.ok)P(""),await ee(N);else if(403===e.status)D(!0),C({kind:"password",message:"Incorrect password"});else if(429===e.status)C({kind:"password",message:"Too many attempts. Try again later."});else{let t=await e.json();C({kind:"error",title:"Error",message:String(t.message??"Something went wrong.")})}}catch{C({kind:"error",title:"Connection error",message:"Could not reach the server."})}A(!1)}},ei="file"===k.kind||"dir"===k.kind,el="file"===k.kind?k.filename:"dir"===k.kind?k.name||"Shared folder":"",eo="dir"===M,ec=v&&eo?(0,t.jsx)(q,{token:v,rootName:R||"Shared folder",currentPath:"file"===k.kind?k.relPath:"dir"===k.kind?k.path:"",currentIsDir:"dir"===k.kind,seed:er,onNavigate:et}):null;return(0,t.jsx)(j.ThemeProvider,{children:(0,t.jsxs)("div",{className:"flex min-h-screen bg-background text-foreground",children:[ec&&!V&&es&&(0,t.jsx)("nav",{"aria-label":"Shared folder",className:"hidden w-64 shrink-0 border-r border-border bg-muted/20 md:flex md:flex-col",children:(0,t.jsx)("div",{className:"flex-1 overflow-auto p-2",children:ec})}),ec&&V&&es&&(0,t.jsxs)("div",{className:"fixed inset-0 z-40 flex md:hidden",children:[(0,t.jsx)("div",{className:"flex w-72 max-w-[85%] flex-col border-r border-border bg-background",children:(0,t.jsx)("div",{className:"flex-1 overflow-auto p-2",children:ec})}),(0,t.jsx)("button",{type:"button","aria-label":"Close navigation",className:"flex-1 bg-black/40",onClick:en})]}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("header",{className:"border-b border-border bg-muted/50",children:(0,t.jsxs)("div",{className:"flex w-full items-center gap-2 px-4 py-2",children:[eo&&(0,t.jsx)(p.Button,{size:"sm",variant:"ghost",className:"h-7 w-7 shrink-0 p-0",title:es?"Hide navigation":"Show navigation",onClick:en,children:(0,t.jsx)(m.PanelLeft,{className:"h-3.5 w-3.5"})}),ei?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[(0,t.jsx)("span",{className:"h-2 w-2 rounded-full bg-success shrink-0"}),"dir"===k.kind&&(0,t.jsx)(c.Folder,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-sm truncate",title:el,children:el})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(0,t.jsxs)(p.Button,{size:"sm",variant:"ghost",className:"h-7 gap-1.5 px-2 text-xs",onClick:()=>{navigator.clipboard.writeText(window.location.href),Q("link")},title:"Copy share link",children:["link"===_?(0,t.jsx)(r.Check,{className:"h-3.5 w-3.5 text-success"}):(0,t.jsx)(i.Copy,{className:"h-3.5 w-3.5"}),"Link"]}),"file"===k.kind&&G&&(0,t.jsxs)(p.Button,{size:"sm",variant:"ghost",className:"h-7 gap-1.5 px-2 text-xs",onClick:Y,title:"Copy raw content",children:["raw"===_?(0,t.jsx)(r.Check,{className:"h-3.5 w-3.5 text-success"}):(0,t.jsx)(o.FileText,{className:"h-3.5 w-3.5"}),"Raw"]}),(0,t.jsx)(L,{}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground ml-2",children:"file"===k.kind||"dir"===k.kind?`${k.viewCount} view${1!==k.viewCount?"s":""}`:""})]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Eye,{className:"h-4 w-4 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:"Shared document"})]})]})}),"loading"===k.kind&&(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center",children:(0,t.jsx)(d.Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})}),"password"===k.kind&&(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center px-4",children:(0,t.jsx)(w.Card,{className:"max-w-sm w-full p-6",children:(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4 text-center",children:[(0,t.jsx)("div",{className:"rounded-full bg-muted p-3",children:(0,t.jsx)(u.Lock,{className:"h-6 w-6 text-muted-foreground"})}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("h1",{className:"text-base font-medium",children:"Password required"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:k.message||"This document is password-protected."})]}),(0,t.jsxs)("form",{onSubmit:ea,className:"w-full space-y-3",children:[(0,t.jsx)(g.Input,{type:"password",placeholder:"Enter password",value:E,onChange:e=>{P(e.target.value),D(!1)},autoFocus:!0}),I&&(0,t.jsxs)("p",{className:"text-xs text-destructive flex items-center gap-1",children:[(0,t.jsx)(s.AlertCircle,{className:"h-3 w-3"}),"Wrong password. Try again."]}),(0,t.jsx)(p.Button,{type:"submit",className:"w-full",disabled:T||!E.trim(),children:T?(0,t.jsx)(d.Loader2,{className:"h-4 w-4 animate-spin"}):"View document"})]})]})})}),"error"===k.kind&&(0,t.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center gap-4 px-4 text-center",children:[(0,t.jsx)("div",{className:"rounded-full bg-muted p-3",children:(0,t.jsx)(s.AlertCircle,{className:"h-6 w-6 text-muted-foreground"})}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("h1",{className:"text-base font-medium",children:k.title}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:k.message})]})]}),"dir"===k.kind&&(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:(0,t.jsxs)("div",{className:(0,x.cn)("w-full px-4 py-6 share-reader-text",Z),children:[(0,t.jsxs)("nav",{className:"mb-3 flex flex-wrap items-center gap-1 text-xs text-muted-foreground","aria-label":"Breadcrumb",children:[(0,t.jsx)("button",{type:"button",className:"rounded px-1.5 py-0.5 hover:bg-accent hover:text-foreground",onClick:()=>et(""),children:k.name||"Shared folder"}),k.path.split("/").filter(Boolean).map((e,s,n)=>{let r=n.slice(0,s+1).join("/");return(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(a.ChevronRight,{className:"h-3 w-3"}),(0,t.jsx)("button",{type:"button",className:"rounded px-1.5 py-0.5 hover:bg-accent hover:text-foreground",onClick:()=>et(r),children:e})]},r)})]}),(0,t.jsxs)("ul",{className:"divide-y overflow-hidden rounded-md border border-border",children:[""!==k.path&&(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button",className:"flex w-full items-center gap-2 px-3 py-2 text-left hover:bg-accent",onClick:()=>{var e;let t;return et(-1===(t=(e=k.path).lastIndexOf("/"))?"":e.slice(0,t))},children:[(0,t.jsx)(n.ArrowLeft,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"Parent folder"})]})}),k.entries.map(e=>{var s;return(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button",className:"flex w-full items-center gap-2 px-3 py-2 text-left hover:bg-accent",onClick:()=>et(e.path),children:[e.isDir?(0,t.jsx)(c.Folder,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):(0,t.jsx)(o.FileText,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.name}),!e.isDir&&(0,t.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:(s=e.size)<1024?`${s} B`:s<1048576?`${Math.round(s/1024)} KB`:`${(s/1048576).toFixed(1)} MB`})]})},e.path)}),0===k.entries.length&&(0,t.jsx)("li",{className:"px-3 py-8 text-center text-muted-foreground",children:"This folder is empty."})]}),k.truncated&&(0,t.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:"Showing the first 2000 entries."})]})}),"file"===k.kind&&(0,t.jsx)($,{content:k.content,filename:k.filename,filePath:k.filePath,token:v,relPath:k.relPath,readerClass:Z,onNavigate:et}),"file"===k.kind&&(0,t.jsx)("footer",{className:"border-t border-border bg-muted/30",children:(0,t.jsxs)("div",{className:(0,x.cn)("flex w-full items-center gap-2 px-4 py-2",Z),children:[(0,t.jsx)(o.FileText,{className:"h-3 w-3 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:k.filename})]})})]})]})})}],670977)},768555,e=>{e.v(t=>Promise.all(["static/chunks/0geoueeyd9~sr.js","static/chunks/15zvm3og-da_i.js","static/chunks/0ftz-0jz~tk6i.js","static/chunks/08~16i3vwpnbs.css"].map(t=>e.l(t))).then(()=>t(561021)))}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,206500,e=>{"use strict";var t,n,r,o,i,l,a,c=e.i(824627),u=e.i(59805),f="right-scroll-bar-position",s="width-before-scroll-bar";function d(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var h="u">typeof window?u.useLayoutEffect:u.useEffect,p=new WeakMap,m=(void 0===t&&(t={}),(void 0===n&&(n=function(e){return e}),r=[],o=!1,i={read:function(){if(o)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:null},useMedium:function(e){var t=n(e,o);return r.push(t),function(){r=r.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(o=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){o=!0;var t=[];if(r.length){var n=r;r=[],n.forEach(e),t=r}var i=function(){var n=t;t=[],n.forEach(e)},l=function(){return Promise.resolve().then(i)};l(),r={push:function(e){t.push(e),l()},filter:function(e){return t=t.filter(e),r}}}}).options=(0,c.__assign)({async:!0,ssr:!1},t),i),g=function(){},v=u.forwardRef(function(e,t){var n,r,o,i,l=u.useRef(null),a=u.useState({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:g}),f=a[0],s=a[1],v=e.forwardProps,w=e.children,y=e.className,b=e.removeScrollBar,x=e.enabled,E=e.shards,R=e.sideCar,S=e.noRelative,A=e.noIsolation,C=e.inert,L=e.allowPinchZoom,T=e.as,k=e.gapMode,M=(0,c.__rest)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=(n=[l,t],r=function(e){return n.forEach(function(t){return d(t,e)})},(o=(0,u.useState)(function(){return{value:null,callback:r,facade:{get current(){return o.value},set current(value){var e=o.value;e!==value&&(o.value=value,o.callback(value,e))}}}})[0]).callback=r,i=o.facade,h(function(){var e=p.get(i);if(e){var t=new Set(e),r=new Set(n),o=i.current;t.forEach(function(e){r.has(e)||d(e,null)}),r.forEach(function(e){t.has(e)||d(e,o)})}p.set(i,n)},[n]),i),_=(0,c.__assign)((0,c.__assign)({},M),f);return u.createElement(u.Fragment,null,x&&u.createElement(R,{sideCar:m,removeScrollBar:b,shards:E,noRelative:S,noIsolation:A,inert:C,setCallbacks:s,allowPinchZoom:!!L,lockRef:l,gapMode:k}),v?u.cloneElement(u.Children.only(w),(0,c.__assign)((0,c.__assign)({},_),{ref:O})):u.createElement(void 0===T?"div":T,(0,c.__assign)({},_,{className:y,ref:O}),w))});v.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},v.classNames={fullWidth:s,zeroRight:f};var w=function(e){var t=e.sideCar,n=(0,c.__rest)(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return u.createElement(r,(0,c.__assign)({},n))};w.isSideCarExport=!0;var y=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=a||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var r,o;(r=t).styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),o=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(o)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},b=function(){var e=y();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},x=function(){var e=b();return function(t){return e(t.styles,t.dynamic),null}},E={left:0,top:0,right:0,gap:0},R=function(e){return parseInt(e||"",10)||0},S=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[R(n),R(r),R(o)]},A=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return E;var t=S(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},C=x(),L="data-scroll-locked",T=function(e,t,n,r){var o=e.left,i=e.top,l=e.right,a=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(a,"px ").concat(r,";\n }\n body[").concat(L,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(l,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(a,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(f," {\n right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(s," {\n margin-right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(f," .").concat(f," {\n right: 0 ").concat(r,";\n }\n \n .").concat(s," .").concat(s," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(L,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n }\n")},k=function(){var e=parseInt(document.body.getAttribute(L)||"0",10);return isFinite(e)?e:0},M=function(){u.useEffect(function(){return document.body.setAttribute(L,(k()+1).toString()),function(){var e=k()-1;e<=0?document.body.removeAttribute(L):document.body.setAttribute(L,e.toString())}},[])},O=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;M();var i=u.useMemo(function(){return A(o)},[o]);return u.createElement(C,{styles:T(i,!t,o,n?"":"!important")})},_=!1;if("u">typeof window)try{var P=Object.defineProperty({},"passive",{get:function(){return _=!0,!0}});window.addEventListener("test",P,P),window.removeEventListener("test",P,P)}catch(e){_=!1}var W=!!_&&{passive:!1},D=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&(n.overflowY!==n.overflowX||"TEXTAREA"===e.tagName||"visible"!==n[t])},N=function(e,t){var n=t.ownerDocument,r=t;do{if("u">typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),F(e,r)){var o=B(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body)return!1},F=function(e,t){return"v"===e?D(t,"overflowY"):D(t,"overflowX")},B=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},H=function(e,t,n,r,o){var i,l=(i=window.getComputedStyle(t).direction,"h"===e&&"rtl"===i?-1:1),a=l*r,c=n.target,u=t.contains(c),f=!1,s=a>0,d=0,h=0;do{if(!c)break;var p=B(e,c),m=p[0],g=p[1]-p[2]-l*m;(m||g)&&F(e,c)&&(d+=g,h+=m);var v=c.parentNode;c=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!u&&c!==document.body||u&&(t.contains(c)||t===c))return s&&(o&&1>Math.abs(d)||!o&&a>d)?f=!0:!s&&(o&&1>Math.abs(h)||!o&&-a>h)&&(f=!0),f},V=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},j=function(e){return[e.deltaX,e.deltaY]},z=function(e){return e&&"current"in e?e.current:e},I=0,X=[];let Y=(l=function(e){var t=u.useRef([]),n=u.useRef([0,0]),r=u.useRef(),o=u.useState(I++)[0],i=u.useState(x)[0],l=u.useRef(e);u.useEffect(function(){l.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(0,c.__spreadArray)([e.lockRef.current],(e.shards||[]).map(z),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=u.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var o,i=V(e),a=n.current,c="deltaX"in e?e.deltaX:a[0]-i[0],u="deltaY"in e?e.deltaY:a[1]-i[1],f=e.target,s=Math.abs(c)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===s&&"range"===f.type)return!1;var d=window.getSelection(),h=d&&d.anchorNode;if(h&&(h===f||h.contains(f)))return!1;var p=N(s,f);if(!p)return!0;if(p?o=s:(o="v"===s?"h":"v",p=N(s,f)),!p)return!1;if(!r.current&&"changedTouches"in e&&(c||u)&&(r.current=o),!o)return!0;var m=r.current||o;return H(m,t,e,"h"===m?c:u,!0)},[]),f=u.useCallback(function(e){if(X.length&&X[X.length-1]===i){var n="deltaY"in e?j(e):V(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta,r[0]===n[0]&&r[1]===n[1])})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var o=(l.current.shards||[]).map(z).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?a(e,o[0]):!l.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),s=u.useCallback(function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),d=u.useCallback(function(e){n.current=V(e),r.current=void 0},[]),h=u.useCallback(function(t){s(t.type,j(t),t.target,a(t,e.lockRef.current))},[]),p=u.useCallback(function(t){s(t.type,V(t),t.target,a(t,e.lockRef.current))},[]);u.useEffect(function(){return X.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",f,W),document.addEventListener("touchmove",f,W),document.addEventListener("touchstart",d,W),function(){X=X.filter(function(e){return e!==i}),document.removeEventListener("wheel",f,W),document.removeEventListener("touchmove",f,W),document.removeEventListener("touchstart",d,W)}},[]);var m=e.removeScrollBar,g=e.inert;return u.createElement(u.Fragment,null,g?u.createElement(i,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,m?u.createElement(O,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},m.useMedium(l),w);var $=u.forwardRef(function(e,t){return u.createElement(v,(0,c.__assign)({},e,{ref:t,sideCar:Y}))});$.classNames=v.classNames,e.s(["RemoveScroll",0,$],206500)},73772,e=>{"use strict";var t=new WeakMap,n=new WeakMap,r={},o=0,i=function(e){return e&&(e.host||i(e.parentNode))},l=function(e,l,a,c){var u=(Array.isArray(e)?e:[e]).map(function(e){if(l.contains(e))return e;var t=i(e);return t&&l.contains(t)?t:(console.error("aria-hidden",e,"in not contained inside",l,". Doing nothing"),null)}).filter(function(e){return!!e});r[a]||(r[a]=new WeakMap);var f=r[a],s=[],d=new Set,h=new Set(u),p=function(e){!e||d.has(e)||(d.add(e),p(e.parentNode))};u.forEach(p);var m=function(e){!e||h.has(e)||Array.prototype.forEach.call(e.children,function(e){if(d.has(e))m(e);else try{var r=e.getAttribute(c),o=null!==r&&"false"!==r,i=(t.get(e)||0)+1,l=(f.get(e)||0)+1;t.set(e,i),f.set(e,l),s.push(e),1===i&&o&&n.set(e,!0),1===l&&e.setAttribute(a,"true"),o||e.setAttribute(c,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return m(l),d.clear(),o++,function(){s.forEach(function(e){var r=t.get(e)-1,o=f.get(e)-1;t.set(e,r),f.set(e,o),r||(n.has(e)||e.removeAttribute(c),n.delete(e)),o||e.removeAttribute(a)}),--o||(t=new WeakMap,t=new WeakMap,n=new WeakMap,r={})}};e.s(["hideOthers",0,function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||("u"<typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),l(r,o,n,"aria-hidden")):function(){return null}}])},454556,825339,e=>{"use strict";let t,n=["top","right","bottom","left"],r=n.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]),o=Math.min,i=Math.max,l=Math.round,a=Math.floor,c=e=>({x:e,y:e}),u={left:"right",right:"left",bottom:"top",top:"bottom"};function f(e,t){return"function"==typeof e?e(t):e}function s(e){return e.split("-")[0]}function d(e){return e.split("-")[1]}function h(e){return"x"===e?"y":"x"}function p(e){return"y"===e?"height":"width"}function m(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function g(e,t,n){void 0===n&&(n=!1);let r=d(e),o=h(m(e)),i=p(o),l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=E(l)),[l,E(l)]}function v(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let w=["left","right"],y=["right","left"],b=["top","bottom"],x=["bottom","top"];function E(e){let t=s(e);return u[t]+e.slice(t.length)}function R(e){var t,n,r,o;return"number"!=typeof e?{top:null!=(t=e.top)?t:0,right:null!=(n=e.right)?n:0,bottom:null!=(r=e.bottom)?r:0,left:null!=(o=e.left)?o:0}:{top:e,right:e,bottom:e,left:e}}function S(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function A(e,t,n){let r,{reference:o,floating:i}=e,l=m(t),a=h(m(t)),c=p(a),u=s(t),f=o.x+o.width/2-i.width/2,g=o.y+o.height/2-i.height/2,v=o[c]/2-i[c]/2;switch(u){case"top":r={x:f,y:o.y-i.height};break;case"bottom":r={x:f,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:g};break;case"left":r={x:o.x-i.width,y:g};break;default:r={x:o.x,y:o.y}}let w=d(t);return w&&(r[a]+=v*("end"===w?1:-1)*(n&&"y"===l?-1:1)),r}async function C(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:i,rects:l,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:s="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=f(t,e),m=R(p),g=a[h?"floating"===d?"reference":"floating":d],v=S(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:s,strategy:c})),w="floating"===d?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,y=await (null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await (null==i.isElement?void 0:i.isElement(y))&&await (null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},x=S(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:y,strategy:c}):w);return{top:(v.top-x.top+m.top)/b.y,bottom:(x.bottom-v.bottom+m.bottom)/b.y,left:(v.left-x.left+m.left)/b.x,right:(x.right-v.right+m.right)/b.x}}let L=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=l.detectOverflow?l:{...l,detectOverflow:C},c=await (null==l.isRTL?void 0:l.isRTL(t)),u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:s}=A(u,r,c),d=r,h=0,p={};for(let n=0;n<i.length;n++){let m=i[n];if(!m)continue;let{name:g,fn:v}=m,{x:w,y:y,data:b,reset:x}=await v({x:f,y:s,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});f=null!=w?w:f,s=null!=y?y:s,p[g]={...p[g],...b},x&&h<50&&(h++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(u=!0===x.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:f,y:s}=A(u,d,c)),n=-1)}return{x:f,y:s,placement:d,strategy:o,middlewareData:p}};function T(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function k(e){return n.some(t=>e[t]>=0)}function M(e){let t=o(...e.map(e=>e.left)),n=o(...e.map(e=>e.top));return{x:t,y:n,width:i(...e.map(e=>e.right))-t,height:i(...e.map(e=>e.bottom))-n}}let O=new Set(["left","top"]);async function _(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),l=s(n),a=d(n),c="y"===m(n),u=O.has(l)?-1:1,h=i&&c?-1:1,p=f(t,e),{mainAxis:g,crossAxis:v,alignmentAxis:w}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&"number"==typeof w&&(v="end"===a?-1*w:w),c?{x:v*h,y:g*u}:{x:g*u,y:v*h}}function P(){return"u">typeof window}function W(e){return F(e)?(e.nodeName||"").toLowerCase():"#document"}function D(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function N(e){var t;return null==(t=(F(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function F(e){return!!P()&&(e instanceof Node||e instanceof D(e).Node)}function B(e){return!!P()&&(e instanceof Element||e instanceof D(e).Element)}function H(e){return!!P()&&(e instanceof HTMLElement||e instanceof D(e).HTMLElement)}function V(e){return!(!P()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof D(e).ShadowRoot)}function j(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=q(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function z(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let I=/transform|translate|scale|rotate|perspective|filter/,X=/paint|layout|strict|content/,Y=e=>!!e&&"none"!==e;function $(e){let t=B(e)?q(e):e;return Y(t.transform)||Y(t.translate)||Y(t.scale)||Y(t.rotate)||Y(t.perspective)||!U()&&(Y(t.backdropFilter)||Y(t.filter))||I.test(t.willChange||"")||X.test(t.contain||"")}function U(){return null==t&&(t="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),t}function Z(e){return/^(html|body|#document)$/.test(W(e))}function q(e){return D(e).getComputedStyle(e)}function K(e){return B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function G(e){if("html"===W(e))return e;let t=e.assignedSlot||e.parentNode||V(e)&&e.host||N(e);return V(t)?t.host:t}function J(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=G(t);return Z(n)?(t.ownerDocument||t).body:H(n)&&j(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=D(o);if(!i)return t.concat(o,J(o,[],n));{let e=Q(l);return t.concat(l,l.visualViewport||[],j(o)?o:[],e&&n?J(e):[])}}function Q(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ee(e){let t=q(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=H(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,c=l(n)!==i||l(r)!==a;return c&&(n=i,r=a),{width:n,height:r,$:c}}function et(e){return B(e)?e:e.contextElement}function en(e){let t=et(e);if(!H(t))return c(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ee(t),a=(i?l(n.width):n.width)/r,u=(i?l(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),u&&Number.isFinite(u)||(u=1),{x:a,y:u}}let er=c(0);function eo(e){let t=D(e);return U()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:er}function ei(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),l=et(e),a=c(1);t&&(r?B(r)&&(a=en(r)):a=en(e));let u=(void 0===(o=n)&&(o=!1),r&&o&&r===D(l))?eo(l):c(0),f=(i.left+u.x)/a.x,s=(i.top+u.y)/a.y,d=i.width/a.x,h=i.height/a.y;if(l&&r){let e=D(l),t=B(r)?D(r):r,n=e,o=Q(n);for(;o&&t!==n;){let e=en(o),t=o.getBoundingClientRect(),r=q(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;f*=e.x,s*=e.y,d*=e.x,h*=e.y,f+=i,s+=l,o=Q(n=D(o))}}return S({width:d,height:h,x:f,y:s})}function el(e,t){let n=K(e).scrollLeft;return t?t.left+n:ei(N(e)).left+n}function ea(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-el(e,n),y:n.top+t.scrollTop}}function ec(e,t,n){var r;let o;if("viewport"===t||"layoutViewport"===t)o=function(e,t,n){void 0===n&&(n="viewport");let r="layoutViewport"===n,o=D(e),i=N(e),l=o.visualViewport,a=i.clientWidth,c=i.clientHeight,u=0,f=0;if(l){let e=!U()||"fixed"===t;r?e||(u=-l.offsetLeft,f=-l.offsetTop):(a=l.width,c=l.height,e&&(u=l.offsetLeft,f=l.offsetTop))}if(0>=el(i)){let e=i.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(i.clientWidth-t.clientWidth-r),l="stable both-edges"===getComputedStyle(i).scrollbarGutter?o/2:o;l<=25&&(a-=l)}return{width:a,height:c,x:u,y:f}}(e,n,t);else if("document"===t){let t,n,l,a,c,u;t=K(r=N(e)),n=r.ownerDocument.body,l=i(r.scrollWidth,r.clientWidth,n.scrollWidth,n.clientWidth),a=i(r.scrollHeight,r.clientHeight,n.scrollHeight,n.clientHeight),c=-t.scrollLeft+el(r),u=-t.scrollTop,"rtl"===q(n).direction&&(c+=i(r.clientWidth,n.clientWidth)-l),o={width:l,height:a,x:c,y:u}}else if(B(t)){let e,r,i,l,a,c;r=(e=ei(t,!0,"fixed"===n)).top+t.clientTop,i=e.left+t.clientLeft,l=en(t),a=t.clientWidth*l.x,c=t.clientHeight*l.y,o={width:a,height:c,x:i*l.x,y:r*l.y}}else{let n=eo(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return S(o)}function eu(e){return"static"===q(e).position}function ef(e,t){if(!H(e)||"fixed"===q(e).position)return null;if(t)return t(e);let n=e.offsetParent;return N(e)===n&&(n=n.ownerDocument.body),n}function es(e,t){var n;let r=D(e);if(z(e))return r;if(!H(e)){let t=G(e);for(;t&&!Z(t);){if(B(t)&&!eu(t))return t;t=G(t)}return r}let o=ef(e,t);for(;o&&(n=o,/^(table|td|th)$/.test(W(n)))&&eu(o);)o=ef(o,t);return o&&Z(o)&&eu(o)&&!$(o)?r:o||function(e){let t=G(e);for(;H(t)&&!Z(t);){if($(t))return t;if(z(t))break;t=G(t)}return null}(e)||r}let ed=async function(e){let t=this.getOffsetParent||es,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=H(t),o=N(t),i="fixed"===n,l=ei(e,!0,i,t),a={scrollLeft:0,scrollTop:0},u=c(0);if((r||!i)&&(("body"!==W(t)||j(o))&&(a=K(t)),r)){let e=ei(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}!r&&o&&(u.x=el(o));let f=!o||r||i?c(0):ea(o,a);return{x:l.left+a.scrollLeft-u.x-f.x,y:l.top+a.scrollTop-u.y-f.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},eh={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,l=N(r),a=!!t&&z(t.floating);if(r===l||a&&i)return n;let u={scrollLeft:0,scrollTop:0},f=c(1),s=c(0),d=H(r);if((d||!i)&&(("body"!==W(r)||j(l))&&(u=K(r)),d)){let e=ei(r);f=en(r),s.x=e.x+r.clientLeft,s.y=e.y+r.clientTop}let h=!l||d||i?c(0):ea(l,u);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-u.scrollLeft*f.x+s.x+h.x,y:n.y*f.y-u.scrollTop*f.y+s.y+h.y}},getDocumentElement:N,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:l}=e,a=[..."clippingAncestors"===n?z(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=J(e,[],!1).filter(e=>B(e)&&"body"!==W(e)),o=null,i="fixed"===q(e).position,l=i?G(e):e;for(;B(l)&&!Z(l);){let e=q(l),t=$(l),n=o?o.position:i?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?o=e:r=r.filter(e=>e!==l),l=G(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],c=ec(t,a[0],l),u=c.top,f=c.right,s=c.bottom,d=c.left;for(let e=1;e<a.length;e++){let n=ec(t,a[e],l);u=i(n.top,u),f=o(n.right,f),s=o(n.bottom,s),d=i(n.left,d)}return{width:f-d,height:s-u,x:d,y:u}},getOffsetParent:es,getElementRects:ed,getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){let{width:t,height:n}=ee(e);return{width:t,height:n}},getScale:en,isElement:B,isRTL:function(e){return"rtl"===q(e).direction}};function ep(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let em=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:l,middlewareData:a}=t,c=await _(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:l}}}}},eg=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:l,platform:a}=t,{mainAxis:c=!0,crossAxis:u=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...d}=f(e,t),p={x:n,y:r},g=await a.detectOverflow(t,d),v=m(l),w=h(v),y=p[w],b=p[v],x=(e,t)=>i(t+g["y"===e?"top":"left"],o(t,t-g["y"===e?"bottom":"right"]));c&&(y=x(w,y)),u&&(b=x(v,b));let E=s.fn({...t,[w]:y,[v]:b});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[w]:c,[v]:u}}}}}},ev=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,o,i,l;let a,c,u,{placement:h,middlewareData:p,rects:R,initialPlacement:S,platform:A,elements:C}=t,{mainAxis:L=!0,crossAxis:T=!0,fallbackPlacements:k,fallbackStrategy:M="bestFit",fallbackAxisSideDirection:O="none",flipAlignment:_=!0,...P}=f(e,t);if(null!=(n=p.arrow)&&n.alignmentOffset)return{};let W=s(h),D=m(S),N=s(S)===S,F=await (null==A.isRTL?void 0:A.isRTL(C.floating)),B=k||(N||!_?[E(S)]:(a=E(S),[v(S),a,v(a)])),H="none"!==O;!k&&H&&B.push(...(c=d(S),u=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?y:w;return t?w:y;case"left":case"right":return t?b:x;default:return[]}}(s(S),"start"===O,F),c&&(u=u.map(e=>e+"-"+c),_&&(u=u.concat(u.map(v)))),u));let V=[S,...B],j=await A.detectOverflow(t,P),z=[],I=(null==(r=p.flip)?void 0:r.overflows)||[];if(L&&z.push(j[W]),T){let e=g(h,R,F);z.push(j[e[0]],j[e[1]])}if(I=[...I,{placement:h,overflows:z}],!z.every(e=>e<=0)){let e=((null==(o=p.flip)?void 0:o.index)||0)+1,t=V[e];if(t&&("alignment"!==T||D===m(t)||I.every(e=>m(e.placement)!==D||e.overflows[0]>0)))return{data:{index:e,overflows:I},reset:{placement:t}};let n=null==(i=I.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(M){case"bestFit":{let e=null==(l=I.filter(e=>{if(H){let t=m(e.placement);return t===D||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:l[0];e&&(n=e);break}case"initialPlacement":n=S}if(h!==n)return{reset:{placement:n}}}return{}}}},ew=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){let n,r,{placement:l,rects:a,platform:c,elements:u}=t,{apply:h=()=>{},...p}=f(e,t),g=await c.detectOverflow(t,p),v=s(l),w=d(l),y="y"===m(l),{width:b,height:x}=a.floating;"top"===v||"bottom"===v?(n=v,r=w===(await (null==c.isRTL?void 0:c.isRTL(u.floating))?"start":"end")?"left":"right"):(r=v,n="end"===w?"top":"bottom");let E=x-g.top-g.bottom,R=b-g.left-g.right,S=o(x-g[n],E),A=o(b-g[r],R),C=t.middlewareData.shift,L=!C,T=S,k=A;null!=C&&C.enabled.x&&(k=R),null!=C&&C.enabled.y&&(T=E),L&&!w&&(y?k=b-2*i(g.left,g.right):T=x-2*i(g.top,g.bottom)),await h({...t,availableWidth:k,availableHeight:T});let M=await c.getDimensions(u.floating);return b!==M.width||x!==M.height?{reset:{rects:!0}}:{}}}},ey=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=f(e,t);switch(o){case"referenceHidden":{let e=T(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:k(e)}}}case"escaped":{let e=T(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:k(e)}}}default:return{}}}}},eb=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:l,rects:a,platform:c,elements:u,middlewareData:s}=t,{element:g,padding:v=0}=f(e,t)||{};if(null==g)return{};let w=R(v),y={x:n,y:r},b=h(m(l)),x=p(b),E=await c.getDimensions(g),S="y"===b,A=S?"clientHeight":"clientWidth",C=a.reference[x]+a.reference[b]-y[b]-a.floating[x],L=y[b]-a.reference[b],T=await (null==c.getOffsetParent?void 0:c.getOffsetParent(g)),k=T?T[A]:0;k&&await (null==c.isElement?void 0:c.isElement(T))||(k=u.floating[A]||a.floating[x]);let M=k/2-E[x]/2-1,O=o(w[S?"top":"left"],M),_=o(w[S?"bottom":"right"],M),P=k-E[x]-_,W=k/2-E[x]/2+(C/2-L/2),D=i(O,o(W,P)),N=!s.arrow&&null!=d(l)&&W!==D&&a.reference[x]/2-(W<O?O:_)-E[x]/2<0,F=N?W<O?W-O:W-P:0;return{[b]:y[b]+F,data:{[b]:D,centerOffset:W-D-F,...N&&{alignmentOffset:F}},reset:N}}}),ex=function(e){return void 0===e&&(e={}),{options:e,fn(t){var n,r,o,i;let{x:l,y:a,placement:c,rects:u,middlewareData:d}=t,{offset:p=0,mainAxis:g=!0,crossAxis:v=!0}=f(e,t),w={x:l,y:a},y=m(c),b=h(y),x=w[b],E=w[y],R=f(p,t),S="number"==typeof R?{mainAxis:R,crossAxis:0}:{mainAxis:null!=(n=R.mainAxis)?n:0,crossAxis:null!=(r=R.crossAxis)?r:0};if(g){let e="y"===b?"height":"width",t=u.reference[b]-u.floating[e]+S.mainAxis,n=u.reference[b]+u.reference[e]-S.mainAxis;x<t?x=t:x>n&&(x=n)}if(v){let e="y"===b?"width":"height",t=O.has(s(c)),n=u.reference[y]-u.floating[e]+(t&&(null==(o=d.offset)?void 0:o[y])||0)+(t?0:S.crossAxis),r=u.reference[y]+u.reference[e]+(t?0:(null==(i=d.offset)?void 0:i[y])||0)-(t?S.crossAxis:0);E<n?E=n:E>r&&(E=r)}return{[b]:x,[y]:E}}}},eE=(e,t,n)=>{let r=new Map,o=null!=n?n:{},i={...eh,...o.platform,_c:r};return L(e,t,{...o,platform:i})};e.s(["arrow",0,eb,"autoPlacement",0,function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,i,l;let{rects:a,middlewareData:c,placement:u,platform:h,elements:p}=t,{crossAxis:m=!1,alignment:w,allowedPlacements:y=r,autoAlignment:b=!0,...x}=f(e,t),E=void 0!==w||y===r?((l=w||null)?[...y.filter(e=>d(e)===l),...y.filter(e=>d(e)!==l)]:y.filter(e=>s(e)===e)).filter(e=>!l||d(e)===l||!!b&&v(e)!==e):y,R=(null==(n=c.autoPlacement)?void 0:n.index)||0,S=E[R];if(null==S)return{};if(u!==S)return{reset:{placement:E[0]}};let A=await h.detectOverflow(t,x),C=g(S,a,await (null==h.isRTL?void 0:h.isRTL(p.floating))),L=[A[s(S)],A[C[0]],A[C[1]]],T=[...(null==(o=c.autoPlacement)?void 0:o.overflows)||[],{placement:S,overflows:L}],k=E[R+1];if(k)return{data:{index:R+1,overflows:T},reset:{placement:k}};let M=T.map(e=>{let t=d(e.placement);return[e.placement,t&&m?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),O=(null==(i=M.filter(e=>e[2].slice(0,d(e[0])?2:3).every(e=>e<=0))[0])?void 0:i[0])||M[0][0];return O!==u?{data:{index:R+1,overflows:T},reset:{placement:O}}:{}}}},"autoUpdate",0,function(e,t,n,r){let l;void 0===r&&(r={});let{ancestorScroll:c=!0,ancestorResize:u=!0,elementResize:f="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:d=!1}=r,h=et(e),p=c||u?[...h?J(h):[],...t?J(t):[]]:[];p.forEach(e=>{c&&e.addEventListener("scroll",n),u&&e.addEventListener("resize",n)});let m=h&&s?function(e,t,n){let r,l=null,c=N(e);function u(){var e;clearTimeout(r),null==(e=l)||e.disconnect(),l=null}function f(n,s){void 0===n&&(n=!1),void 0===s&&(s=1),u();let d=e.getBoundingClientRect(),{left:h,top:p,width:m,height:g}=d;if(n||t(),!m||!g)return;let v={rootMargin:-a(p)+"px "+-a(c.clientWidth-(h+m))+"px "+-a(c.clientHeight-(p+g))+"px "+-a(h)+"px",threshold:i(0,o(1,s))||1},w=!0;function y(t){let n=t[0].intersectionRatio;if(!ep(d,e.getBoundingClientRect()))return f();if(n!==s){if(!w)return f();n?f(!1,n):r=setTimeout(()=>{f(!1,1e-7)},1e3)}w=!1}try{l=new IntersectionObserver(y,{...v,root:c.ownerDocument})}catch(e){l=new IntersectionObserver(y,v)}l.observe(e)}let s=D(e),d=()=>f(n);return s.addEventListener("resize",d),f(!0),()=>{s.removeEventListener("resize",d),u()}}(h,n,u):null,g=-1,v=null;f&&(v=new ResizeObserver(e=>{let[r]=e;r&&r.target===h&&v&&t&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=v)||e.observe(t)})),n()}),h&&!d&&v.observe(h),t&&v.observe(t));let w=d?ei(e):null;return d&&function t(){let r=ei(e);w&&!ep(w,r)&&n(),w=r,l=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach(e=>{c&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=v)||e.disconnect(),v=null,d&&cancelAnimationFrame(l)}},"computePosition",0,eE,"flip",0,ev,"hide",0,ey,"inline",0,function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){let{placement:n,elements:r,rects:l,platform:a,strategy:c}=t,{padding:u=2,x:d,y:h}=f(e,t),p=Array.from(await (null==a.getClientRects?void 0:a.getClientRects(r.reference))||[]);if(!p.length)return{};let g=function(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let o=t[e];!r||o.y-r.y>r.height/2?n.push([o]):n[n.length-1].push(o),r=o}return n.map(e=>S(M(e)))}(p),v=S(M(p)),w=R(u),y=await a.getElementRects({reference:{getBoundingClientRect:function(){if(2===g.length&&(g[0].left>g[1].right||g[1].left>g[0].right)&&null!=d&&null!=h)return g.find(e=>d>e.left-w.left&&d<e.right+w.right&&h>e.top-w.top&&h<e.bottom+w.bottom)||v;if(g.length>=2){if("y"===m(n)){let e=g[0],t=g[g.length-1],r="top"===s(n),o=e.top,i=t.bottom,l=r?e.left:t.left;return S({x:l,y:o,width:(r?e.right:t.right)-l,height:i-o})}let e="left"===s(n),t=i(...g.map(e=>e.right)),r=o(...g.map(e=>e.left)),l=g.filter(n=>e?n.left===r:n.right===t),a=l[0].top;return S({x:r,y:a,width:t-r,height:l[l.length-1].bottom-a})}return v}},floating:r.floating,strategy:c});return l.reference.x!==y.reference.x||l.reference.y!==y.reference.y||l.reference.width!==y.reference.width||l.reference.height!==y.reference.height?{reset:{rects:y}}:{}}}},"limitShift",0,ex,"offset",0,em,"shift",0,eg,"size",0,ew],825339);var eR=e.i(59805),eS=e.i(788160),eA="u">typeof document?eR.useLayoutEffect:function(){};function eC(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!eC(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!eC(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function eL(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eT(e,t){let n=eL(e);return Math.round(t*n)/n}function ek(e){let t=eR.useRef(e);return eA(()=>{t.current=e}),t}e.s(["arrow",0,(e,t)=>{let n={name:"arrow",options:e,fn(t){let{element:n,padding:r}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?eb({element:n.current,padding:r}).fn(t):{}:n?eb({element:n,padding:r}).fn(t):{}}};return{name:n.name,fn:n.fn,options:[e,t]}},"flip",0,(e,t)=>{let n=ev(e);return{name:n.name,fn:n.fn,options:[e,t]}},"hide",0,(e,t)=>{let n=ey(e);return{name:n.name,fn:n.fn,options:[e,t]}},"limitShift",0,(e,t)=>({fn:ex(e).fn,options:[e,t]}),"offset",0,(e,t)=>{let n=em(e);return{name:n.name,fn:n.fn,options:[e,t]}},"shift",0,(e,t)=>{let n=eg(e);return{name:n.name,fn:n.fn,options:[e,t]}},"size",0,(e,t)=>{let n=ew(e);return{name:n.name,fn:n.fn,options:[e,t]}},"useFloating",0,function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[f,s]=eR.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=eR.useState(r);eC(d,r)||h(r);let[p,m]=eR.useState(null),[g,v]=eR.useState(null),w=eR.useCallback(e=>{e!==E.current&&(E.current=e,m(e))},[]),y=eR.useCallback(e=>{e!==R.current&&(R.current=e,v(e))},[]),b=i||p,x=l||g,E=eR.useRef(null),R=eR.useRef(null),S=eR.useRef(f),A=null!=c,C=ek(c),L=ek(o),T=ek(u),k=eR.useCallback(()=>{if(!E.current||!R.current)return;let e={placement:t,strategy:n,middleware:d};L.current&&(e.platform=L.current),eE(E.current,R.current,e).then(e=>{let t={...e,isPositioned:!1!==T.current};M.current&&!eC(S.current,t)&&(S.current=t,eS.flushSync(()=>{s(t)}))})},[d,t,n,L,T]);eA(()=>{!1===u&&S.current.isPositioned&&(S.current.isPositioned=!1,s(e=>({...e,isPositioned:!1})))},[u]);let M=eR.useRef(!1);eA(()=>(M.current=!0,()=>{M.current=!1}),[]),eA(()=>{if(b&&(E.current=b),x&&(R.current=x),b&&x){if(C.current)return C.current(b,x,k);k()}},[b,x,k,C,A]);let O=eR.useMemo(()=>({reference:E,floating:R,setReference:w,setFloating:y}),[w,y]),_=eR.useMemo(()=>({reference:b,floating:x}),[b,x]),P=eR.useMemo(()=>{let e={position:n,left:0,top:0};if(!_.floating)return e;let t=eT(_.floating,f.x),r=eT(_.floating,f.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...eL(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,a,_.floating,f.x,f.y]);return eR.useMemo(()=>({...f,update:k,refs:O,elements:_,floatingStyles:P}),[f,k,O,_,P])}],454556)},804150,(e,t,n)=>{"use strict";var r=e.r(59805),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,l=r.useEffect,a=r.useLayoutEffect,c=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var f="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,f=r[1];return a(function(){o.value=n,o.getSnapshot=t,u(o)&&f({inst:o})},[e,n,t]),l(function(){return u(o)&&f({inst:o}),e(function(){u(o)&&f({inst:o})})},[e]),c(n),n};n.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:f},3909,(e,t,n)=>{"use strict";t.exports=e.r(804150)},757890,(e,t,n)=>{"use strict";var r=e.r(59805),o=e.r(3909),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},l=o.useSyncExternalStore,a=r.useRef,c=r.useEffect,u=r.useMemo,f=r.useDebugValue;n.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var s=a(null);if(null===s.current){var d={hasValue:!1,value:null};s.current=d}else d=s.current;var h=l(e,(s=u(function(){function e(e){if(!c){if(c=!0,l=e,e=r(e),void 0!==o&&d.hasValue){var t=d.value;if(o(t,e))return a=t}return a=e}if(t=a,i(l,e))return t;var n=r(e);return void 0!==o&&o(t,n)?(l=e,t):(l=e,a=n)}var l,a,c=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,n,r,o]))[0],s[1]);return c(function(){d.hasValue=!0,d.value=h},[h]),f(h),h}},383835,(e,t,n)=>{"use strict";t.exports=e.r(757890)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,206500,e=>{"use strict";var t,n,r,o,i,l,a,c=e.i(824627),u=e.i(59805),f="right-scroll-bar-position",s="width-before-scroll-bar";function d(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var h="u">typeof window?u.useLayoutEffect:u.useEffect,p=new WeakMap,m=(void 0===t&&(t={}),(void 0===n&&(n=function(e){return e}),r=[],o=!1,i={read:function(){if(o)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:null},useMedium:function(e){var t=n(e,o);return r.push(t),function(){r=r.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(o=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){o=!0;var t=[];if(r.length){var n=r;r=[],n.forEach(e),t=r}var i=function(){var n=t;t=[],n.forEach(e)},l=function(){return Promise.resolve().then(i)};l(),r={push:function(e){t.push(e),l()},filter:function(e){return t=t.filter(e),r}}}}).options=(0,c.__assign)({async:!0,ssr:!1},t),i),g=function(){},v=u.forwardRef(function(e,t){var n,r,o,i,l=u.useRef(null),a=u.useState({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:g}),f=a[0],s=a[1],v=e.forwardProps,w=e.children,y=e.className,b=e.removeScrollBar,x=e.enabled,R=e.shards,E=e.sideCar,A=e.noRelative,C=e.noIsolation,S=e.inert,T=e.allowPinchZoom,L=e.as,k=e.gapMode,M=(0,c.__rest)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=(n=[l,t],r=function(e){return n.forEach(function(t){return d(t,e)})},(o=(0,u.useState)(function(){return{value:null,callback:r,facade:{get current(){return o.value},set current(value){var e=o.value;e!==value&&(o.value=value,o.callback(value,e))}}}})[0]).callback=r,i=o.facade,h(function(){var e=p.get(i);if(e){var t=new Set(e),r=new Set(n),o=i.current;t.forEach(function(e){r.has(e)||d(e,null)}),r.forEach(function(e){t.has(e)||d(e,o)})}p.set(i,n)},[n]),i),P=(0,c.__assign)((0,c.__assign)({},M),f);return u.createElement(u.Fragment,null,x&&u.createElement(E,{sideCar:m,removeScrollBar:b,shards:R,noRelative:A,noIsolation:C,inert:S,setCallbacks:s,allowPinchZoom:!!T,lockRef:l,gapMode:k}),v?u.cloneElement(u.Children.only(w),(0,c.__assign)((0,c.__assign)({},P),{ref:_})):u.createElement(void 0===L?"div":L,(0,c.__assign)({},P,{className:y,ref:_}),w))});v.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},v.classNames={fullWidth:s,zeroRight:f};var w=function(e){var t=e.sideCar,n=(0,c.__rest)(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return u.createElement(r,(0,c.__assign)({},n))};w.isSideCarExport=!0;var y=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=a||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var r,o;(r=t).styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),o=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(o)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},b=function(){var e=y();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},x=function(){var e=b();return function(t){return e(t.styles,t.dynamic),null}},R={left:0,top:0,right:0,gap:0},E=function(e){return parseInt(e||"",10)||0},A=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[E(n),E(r),E(o)]},C=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return R;var t=A(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},S=x(),T="data-scroll-locked",L=function(e,t,n,r){var o=e.left,i=e.top,l=e.right,a=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(a,"px ").concat(r,";\n }\n body[").concat(T,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(l,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(a,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(f," {\n right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(s," {\n margin-right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(f," .").concat(f," {\n right: 0 ").concat(r,";\n }\n \n .").concat(s," .").concat(s," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(T,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n }\n")},k=function(){var e=parseInt(document.body.getAttribute(T)||"0",10);return isFinite(e)?e:0},M=function(){u.useEffect(function(){return document.body.setAttribute(T,(k()+1).toString()),function(){var e=k()-1;e<=0?document.body.removeAttribute(T):document.body.setAttribute(T,e.toString())}},[])},_=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;M();var i=u.useMemo(function(){return C(o)},[o]);return u.createElement(S,{styles:L(i,!t,o,n?"":"!important")})},P=!1;if("u">typeof window)try{var O=Object.defineProperty({},"passive",{get:function(){return P=!0,!0}});window.addEventListener("test",O,O),window.removeEventListener("test",O,O)}catch(e){P=!1}var N=!!P&&{passive:!1},W=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&(n.overflowY!==n.overflowX||"TEXTAREA"===e.tagName||"visible"!==n[t])},D=function(e,t){var n=t.ownerDocument,r=t;do{if("u">typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),F(e,r)){var o=B(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body)return!1},F=function(e,t){return"v"===e?W(t,"overflowY"):W(t,"overflowX")},B=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},H=function(e,t,n,r,o){var i,l=(i=window.getComputedStyle(t).direction,"h"===e&&"rtl"===i?-1:1),a=l*r,c=n.target,u=t.contains(c),f=!1,s=a>0,d=0,h=0;do{if(!c)break;var p=B(e,c),m=p[0],g=p[1]-p[2]-l*m;(m||g)&&F(e,c)&&(d+=g,h+=m);var v=c.parentNode;c=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!u&&c!==document.body||u&&(t.contains(c)||t===c))return s&&(o&&1>Math.abs(d)||!o&&a>d)?f=!0:!s&&(o&&1>Math.abs(h)||!o&&-a>h)&&(f=!0),f},V=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},z=function(e){return[e.deltaX,e.deltaY]},I=function(e){return e&&"current"in e?e.current:e},j=0,X=[];let Y=(l=function(e){var t=u.useRef([]),n=u.useRef([0,0]),r=u.useRef(),o=u.useState(j++)[0],i=u.useState(x)[0],l=u.useRef(e);u.useEffect(function(){l.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(0,c.__spreadArray)([e.lockRef.current],(e.shards||[]).map(I),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=u.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var o,i=V(e),a=n.current,c="deltaX"in e?e.deltaX:a[0]-i[0],u="deltaY"in e?e.deltaY:a[1]-i[1],f=e.target,s=Math.abs(c)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===s&&"range"===f.type)return!1;var d=window.getSelection(),h=d&&d.anchorNode;if(h&&(h===f||h.contains(f)))return!1;var p=D(s,f);if(!p)return!0;if(p?o=s:(o="v"===s?"h":"v",p=D(s,f)),!p)return!1;if(!r.current&&"changedTouches"in e&&(c||u)&&(r.current=o),!o)return!0;var m=r.current||o;return H(m,t,e,"h"===m?c:u,!0)},[]),f=u.useCallback(function(e){if(X.length&&X[X.length-1]===i){var n="deltaY"in e?z(e):V(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta,r[0]===n[0]&&r[1]===n[1])})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var o=(l.current.shards||[]).map(I).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?a(e,o[0]):!l.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),s=u.useCallback(function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),d=u.useCallback(function(e){n.current=V(e),r.current=void 0},[]),h=u.useCallback(function(t){s(t.type,z(t),t.target,a(t,e.lockRef.current))},[]),p=u.useCallback(function(t){s(t.type,V(t),t.target,a(t,e.lockRef.current))},[]);u.useEffect(function(){return X.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",f,N),document.addEventListener("touchmove",f,N),document.addEventListener("touchstart",d,N),function(){X=X.filter(function(e){return e!==i}),document.removeEventListener("wheel",f,N),document.removeEventListener("touchmove",f,N),document.removeEventListener("touchstart",d,N)}},[]);var m=e.removeScrollBar,g=e.inert;return u.createElement(u.Fragment,null,g?u.createElement(i,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,m?u.createElement(_,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},m.useMedium(l),w);var $=u.forwardRef(function(e,t){return u.createElement(v,(0,c.__assign)({},e,{ref:t,sideCar:Y}))});$.classNames=v.classNames,e.s(["RemoveScroll",0,$],206500)},73772,e=>{"use strict";var t=new WeakMap,n=new WeakMap,r={},o=0,i=function(e){return e&&(e.host||i(e.parentNode))},l=function(e,l,a,c){var u=(Array.isArray(e)?e:[e]).map(function(e){if(l.contains(e))return e;var t=i(e);return t&&l.contains(t)?t:(console.error("aria-hidden",e,"in not contained inside",l,". Doing nothing"),null)}).filter(function(e){return!!e});r[a]||(r[a]=new WeakMap);var f=r[a],s=[],d=new Set,h=new Set(u),p=function(e){!e||d.has(e)||(d.add(e),p(e.parentNode))};u.forEach(p);var m=function(e){!e||h.has(e)||Array.prototype.forEach.call(e.children,function(e){if(d.has(e))m(e);else try{var r=e.getAttribute(c),o=null!==r&&"false"!==r,i=(t.get(e)||0)+1,l=(f.get(e)||0)+1;t.set(e,i),f.set(e,l),s.push(e),1===i&&o&&n.set(e,!0),1===l&&e.setAttribute(a,"true"),o||e.setAttribute(c,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return m(l),d.clear(),o++,function(){s.forEach(function(e){var r=t.get(e)-1,o=f.get(e)-1;t.set(e,r),f.set(e,o),r||(n.has(e)||e.removeAttribute(c),n.delete(e)),o||e.removeAttribute(a)}),--o||(t=new WeakMap,t=new WeakMap,n=new WeakMap,r={})}};e.s(["hideOthers",0,function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||("u"<typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),l(r,o,n,"aria-hidden")):function(){return null}}])},454556,825339,e=>{"use strict";let t,n=["top","right","bottom","left"],r=n.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]),o=Math.min,i=Math.max,l=Math.round,a=Math.floor,c=e=>({x:e,y:e}),u={left:"right",right:"left",bottom:"top",top:"bottom"};function f(e,t){return"function"==typeof e?e(t):e}function s(e){return e.split("-")[0]}function d(e){return e.split("-")[1]}function h(e){return"x"===e?"y":"x"}function p(e){return"y"===e?"height":"width"}function m(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function g(e,t,n){void 0===n&&(n=!1);let r=d(e),o=h(m(e)),i=p(o),l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=R(l)),[l,R(l)]}function v(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let w=["left","right"],y=["right","left"],b=["top","bottom"],x=["bottom","top"];function R(e){let t=s(e);return u[t]+e.slice(t.length)}function E(e){var t,n,r,o;return"number"!=typeof e?{top:null!=(t=e.top)?t:0,right:null!=(n=e.right)?n:0,bottom:null!=(r=e.bottom)?r:0,left:null!=(o=e.left)?o:0}:{top:e,right:e,bottom:e,left:e}}function A(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function C(e,t,n){let r,{reference:o,floating:i}=e,l=m(t),a=h(m(t)),c=p(a),u=s(t),f=o.x+o.width/2-i.width/2,g=o.y+o.height/2-i.height/2,v=o[c]/2-i[c]/2;switch(u){case"top":r={x:f,y:o.y-i.height};break;case"bottom":r={x:f,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:g};break;case"left":r={x:o.x-i.width,y:g};break;default:r={x:o.x,y:o.y}}let w=d(t);return w&&(r[a]+=v*("end"===w?1:-1)*(n&&"y"===l?-1:1)),r}async function S(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:i,rects:l,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:s="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=f(t,e),m=E(p),g=a[h?"floating"===d?"reference":"floating":d],v=A(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:s,strategy:c})),w="floating"===d?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,y=await (null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await (null==i.isElement?void 0:i.isElement(y))&&await (null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},x=A(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:y,strategy:c}):w);return{top:(v.top-x.top+m.top)/b.y,bottom:(x.bottom-v.bottom+m.bottom)/b.y,left:(v.left-x.left+m.left)/b.x,right:(x.right-v.right+m.right)/b.x}}let T=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=l.detectOverflow?l:{...l,detectOverflow:S},c=await (null==l.isRTL?void 0:l.isRTL(t)),u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:s}=C(u,r,c),d=r,h=0,p={};for(let n=0;n<i.length;n++){let m=i[n];if(!m)continue;let{name:g,fn:v}=m,{x:w,y:y,data:b,reset:x}=await v({x:f,y:s,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});f=null!=w?w:f,s=null!=y?y:s,p[g]={...p[g],...b},x&&h<50&&(h++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(u=!0===x.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:f,y:s}=C(u,d,c)),n=-1)}return{x:f,y:s,placement:d,strategy:o,middlewareData:p}};function L(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function k(e){return n.some(t=>e[t]>=0)}function M(e){let t=o(...e.map(e=>e.left)),n=o(...e.map(e=>e.top));return{x:t,y:n,width:i(...e.map(e=>e.right))-t,height:i(...e.map(e=>e.bottom))-n}}let _=new Set(["left","top"]);async function P(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),l=s(n),a=d(n),c="y"===m(n),u=_.has(l)?-1:1,h=i&&c?-1:1,p=f(t,e),{mainAxis:g,crossAxis:v,alignmentAxis:w}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&"number"==typeof w&&(v="end"===a?-1*w:w),c?{x:v*h,y:g*u}:{x:g*u,y:v*h}}function O(){return"u">typeof window}function N(e){return F(e)?(e.nodeName||"").toLowerCase():"#document"}function W(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function D(e){var t;return null==(t=(F(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function F(e){return!!O()&&(e instanceof Node||e instanceof W(e).Node)}function B(e){return!!O()&&(e instanceof Element||e instanceof W(e).Element)}function H(e){return!!O()&&(e instanceof HTMLElement||e instanceof W(e).HTMLElement)}function V(e){return!(!O()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof W(e).ShadowRoot)}function z(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=q(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function I(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let j=/transform|translate|scale|rotate|perspective|filter/,X=/paint|layout|strict|content/,Y=e=>!!e&&"none"!==e;function $(e){let t=B(e)?q(e):e;return Y(t.transform)||Y(t.translate)||Y(t.scale)||Y(t.rotate)||Y(t.perspective)||!U()&&(Y(t.backdropFilter)||Y(t.filter))||j.test(t.willChange||"")||X.test(t.contain||"")}function U(){return null==t&&(t="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),t}function Z(e){return/^(html|body|#document)$/.test(N(e))}function q(e){return W(e).getComputedStyle(e)}function K(e){return B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function G(e){if("html"===N(e))return e;let t=e.assignedSlot||e.parentNode||V(e)&&e.host||D(e);return V(t)?t.host:t}function J(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=G(t);return Z(n)?(t.ownerDocument||t).body:H(n)&&z(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=W(o);if(!i)return t.concat(o,J(o,[],n));{let e=Q(l);return t.concat(l,l.visualViewport||[],z(o)?o:[],e&&n?J(e):[])}}function Q(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ee(e){let t=q(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=H(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,c=l(n)!==i||l(r)!==a;return c&&(n=i,r=a),{width:n,height:r,$:c}}function et(e){return B(e)?e:e.contextElement}function en(e){let t=et(e);if(!H(t))return c(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ee(t),a=(i?l(n.width):n.width)/r,u=(i?l(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),u&&Number.isFinite(u)||(u=1),{x:a,y:u}}let er=c(0);function eo(e){let t=W(e);return U()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:er}function ei(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),l=et(e),a=c(1);t&&(r?B(r)&&(a=en(r)):a=en(e));let u=(void 0===(o=n)&&(o=!1),r&&o&&r===W(l))?eo(l):c(0),f=(i.left+u.x)/a.x,s=(i.top+u.y)/a.y,d=i.width/a.x,h=i.height/a.y;if(l&&r){let e=W(l),t=B(r)?W(r):r,n=e,o=Q(n);for(;o&&t!==n;){let e=en(o),t=o.getBoundingClientRect(),r=q(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;f*=e.x,s*=e.y,d*=e.x,h*=e.y,f+=i,s+=l,o=Q(n=W(o))}}return A({width:d,height:h,x:f,y:s})}function el(e,t){let n=K(e).scrollLeft;return t?t.left+n:ei(D(e)).left+n}function ea(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-el(e,n),y:n.top+t.scrollTop}}function ec(e,t,n){var r;let o;if("viewport"===t||"layoutViewport"===t)o=function(e,t,n){void 0===n&&(n="viewport");let r="layoutViewport"===n,o=W(e),i=D(e),l=o.visualViewport,a=i.clientWidth,c=i.clientHeight,u=0,f=0;if(l){let e=!U()||"fixed"===t;r?e||(u=-l.offsetLeft,f=-l.offsetTop):(a=l.width,c=l.height,e&&(u=l.offsetLeft,f=l.offsetTop))}if(0>=el(i)){let e=i.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(i.clientWidth-t.clientWidth-r),l="stable both-edges"===getComputedStyle(i).scrollbarGutter?o/2:o;l<=25&&(a-=l)}return{width:a,height:c,x:u,y:f}}(e,n,t);else if("document"===t){let t,n,l,a,c,u;t=K(r=D(e)),n=r.ownerDocument.body,l=i(r.scrollWidth,r.clientWidth,n.scrollWidth,n.clientWidth),a=i(r.scrollHeight,r.clientHeight,n.scrollHeight,n.clientHeight),c=-t.scrollLeft+el(r),u=-t.scrollTop,"rtl"===q(n).direction&&(c+=i(r.clientWidth,n.clientWidth)-l),o={width:l,height:a,x:c,y:u}}else if(B(t)){let e,r,i,l,a,c;r=(e=ei(t,!0,"fixed"===n)).top+t.clientTop,i=e.left+t.clientLeft,l=en(t),a=t.clientWidth*l.x,c=t.clientHeight*l.y,o={width:a,height:c,x:i*l.x,y:r*l.y}}else{let n=eo(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return A(o)}function eu(e){return"static"===q(e).position}function ef(e,t){if(!H(e)||"fixed"===q(e).position)return null;if(t)return t(e);let n=e.offsetParent;return D(e)===n&&(n=n.ownerDocument.body),n}function es(e,t){var n;let r=W(e);if(I(e))return r;if(!H(e)){let t=G(e);for(;t&&!Z(t);){if(B(t)&&!eu(t))return t;t=G(t)}return r}let o=ef(e,t);for(;o&&(n=o,/^(table|td|th)$/.test(N(n)))&&eu(o);)o=ef(o,t);return o&&Z(o)&&eu(o)&&!$(o)?r:o||function(e){let t=G(e);for(;H(t)&&!Z(t);){if($(t))return t;if(I(t))break;t=G(t)}return null}(e)||r}let ed=async function(e){let t=this.getOffsetParent||es,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=H(t),o=D(t),i="fixed"===n,l=ei(e,!0,i,t),a={scrollLeft:0,scrollTop:0},u=c(0);if((r||!i)&&(("body"!==N(t)||z(o))&&(a=K(t)),r)){let e=ei(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}!r&&o&&(u.x=el(o));let f=!o||r||i?c(0):ea(o,a);return{x:l.left+a.scrollLeft-u.x-f.x,y:l.top+a.scrollTop-u.y-f.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},eh={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,l=D(r),a=!!t&&I(t.floating);if(r===l||a&&i)return n;let u={scrollLeft:0,scrollTop:0},f=c(1),s=c(0),d=H(r);if((d||!i)&&(("body"!==N(r)||z(l))&&(u=K(r)),d)){let e=ei(r);f=en(r),s.x=e.x+r.clientLeft,s.y=e.y+r.clientTop}let h=!l||d||i?c(0):ea(l,u);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-u.scrollLeft*f.x+s.x+h.x,y:n.y*f.y-u.scrollTop*f.y+s.y+h.y}},getDocumentElement:D,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:l}=e,a=[..."clippingAncestors"===n?I(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=J(e,[],!1).filter(e=>B(e)&&"body"!==N(e)),o=null,i="fixed"===q(e).position,l=i?G(e):e;for(;B(l)&&!Z(l);){let e=q(l),t=$(l),n=o?o.position:i?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?o=e:r=r.filter(e=>e!==l),l=G(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],c=ec(t,a[0],l),u=c.top,f=c.right,s=c.bottom,d=c.left;for(let e=1;e<a.length;e++){let n=ec(t,a[e],l);u=i(n.top,u),f=o(n.right,f),s=o(n.bottom,s),d=i(n.left,d)}return{width:f-d,height:s-u,x:d,y:u}},getOffsetParent:es,getElementRects:ed,getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){let{width:t,height:n}=ee(e);return{width:t,height:n}},getScale:en,isElement:B,isRTL:function(e){return"rtl"===q(e).direction}};function ep(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let em=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:l,middlewareData:a}=t,c=await P(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:l}}}}},eg=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:l,platform:a}=t,{mainAxis:c=!0,crossAxis:u=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...d}=f(e,t),p={x:n,y:r},g=await a.detectOverflow(t,d),v=m(l),w=h(v),y=p[w],b=p[v],x=(e,t)=>i(t+g["y"===e?"top":"left"],o(t,t-g["y"===e?"bottom":"right"]));c&&(y=x(w,y)),u&&(b=x(v,b));let R=s.fn({...t,[w]:y,[v]:b});return{...R,data:{x:R.x-n,y:R.y-r,enabled:{[w]:c,[v]:u}}}}}},ev=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,o,i,l;let a,c,u,{placement:h,middlewareData:p,rects:E,initialPlacement:A,platform:C,elements:S}=t,{mainAxis:T=!0,crossAxis:L=!0,fallbackPlacements:k,fallbackStrategy:M="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:P=!0,...O}=f(e,t);if(null!=(n=p.arrow)&&n.alignmentOffset)return{};let N=s(h),W=m(A),D=s(A)===A,F=await (null==C.isRTL?void 0:C.isRTL(S.floating)),B=k||(D||!P?[R(A)]:(a=R(A),[v(A),a,v(a)])),H="none"!==_;!k&&H&&B.push(...(c=d(A),u=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?y:w;return t?w:y;case"left":case"right":return t?b:x;default:return[]}}(s(A),"start"===_,F),c&&(u=u.map(e=>e+"-"+c),P&&(u=u.concat(u.map(v)))),u));let V=[A,...B],z=await C.detectOverflow(t,O),I=[],j=(null==(r=p.flip)?void 0:r.overflows)||[];if(T&&I.push(z[N]),L){let e=g(h,E,F);I.push(z[e[0]],z[e[1]])}if(j=[...j,{placement:h,overflows:I}],!I.every(e=>e<=0)){let e=((null==(o=p.flip)?void 0:o.index)||0)+1,t=V[e];if(t&&("alignment"!==L||W===m(t)||j.every(e=>m(e.placement)!==W||e.overflows[0]>0)))return{data:{index:e,overflows:j},reset:{placement:t}};let n=null==(i=j.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(M){case"bestFit":{let e=null==(l=j.filter(e=>{if(H){let t=m(e.placement);return t===W||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:l[0];e&&(n=e);break}case"initialPlacement":n=A}if(h!==n)return{reset:{placement:n}}}return{}}}},ew=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){let n,r,{placement:l,rects:a,platform:c,elements:u}=t,{apply:h=()=>{},...p}=f(e,t),g=await c.detectOverflow(t,p),v=s(l),w=d(l),y="y"===m(l),{width:b,height:x}=a.floating;"top"===v||"bottom"===v?(n=v,r=w===(await (null==c.isRTL?void 0:c.isRTL(u.floating))?"start":"end")?"left":"right"):(r=v,n="end"===w?"top":"bottom");let R=x-g.top-g.bottom,E=b-g.left-g.right,A=o(x-g[n],R),C=o(b-g[r],E),S=t.middlewareData.shift,T=!S,L=A,k=C;null!=S&&S.enabled.x&&(k=E),null!=S&&S.enabled.y&&(L=R),T&&!w&&(y?k=b-2*i(g.left,g.right):L=x-2*i(g.top,g.bottom)),await h({...t,availableWidth:k,availableHeight:L});let M=await c.getDimensions(u.floating);return b!==M.width||x!==M.height?{reset:{rects:!0}}:{}}}},ey=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=f(e,t);switch(o){case"referenceHidden":{let e=L(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:k(e)}}}case"escaped":{let e=L(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:k(e)}}}default:return{}}}}},eb=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:l,rects:a,platform:c,elements:u,middlewareData:s}=t,{element:g,padding:v=0}=f(e,t)||{};if(null==g)return{};let w=E(v),y={x:n,y:r},b=h(m(l)),x=p(b),R=await c.getDimensions(g),A="y"===b,C=A?"clientHeight":"clientWidth",S=a.reference[x]+a.reference[b]-y[b]-a.floating[x],T=y[b]-a.reference[b],L=await (null==c.getOffsetParent?void 0:c.getOffsetParent(g)),k=L?L[C]:0;k&&await (null==c.isElement?void 0:c.isElement(L))||(k=u.floating[C]||a.floating[x]);let M=k/2-R[x]/2-1,_=o(w[A?"top":"left"],M),P=o(w[A?"bottom":"right"],M),O=k-R[x]-P,N=k/2-R[x]/2+(S/2-T/2),W=i(_,o(N,O)),D=!s.arrow&&null!=d(l)&&N!==W&&a.reference[x]/2-(N<_?_:P)-R[x]/2<0,F=D?N<_?N-_:N-O:0;return{[b]:y[b]+F,data:{[b]:W,centerOffset:N-W-F,...D&&{alignmentOffset:F}},reset:D}}}),ex=function(e){return void 0===e&&(e={}),{options:e,fn(t){var n,r,o,i;let{x:l,y:a,placement:c,rects:u,middlewareData:d}=t,{offset:p=0,mainAxis:g=!0,crossAxis:v=!0}=f(e,t),w={x:l,y:a},y=m(c),b=h(y),x=w[b],R=w[y],E=f(p,t),A="number"==typeof E?{mainAxis:E,crossAxis:0}:{mainAxis:null!=(n=E.mainAxis)?n:0,crossAxis:null!=(r=E.crossAxis)?r:0};if(g){let e="y"===b?"height":"width",t=u.reference[b]-u.floating[e]+A.mainAxis,n=u.reference[b]+u.reference[e]-A.mainAxis;x<t?x=t:x>n&&(x=n)}if(v){let e="y"===b?"width":"height",t=_.has(s(c)),n=u.reference[y]-u.floating[e]+(t&&(null==(o=d.offset)?void 0:o[y])||0)+(t?0:A.crossAxis),r=u.reference[y]+u.reference[e]+(t?0:(null==(i=d.offset)?void 0:i[y])||0)-(t?A.crossAxis:0);R<n?R=n:R>r&&(R=r)}return{[b]:x,[y]:R}}}},eR=(e,t,n)=>{let r=new Map,o=null!=n?n:{},i={...eh,...o.platform,_c:r};return T(e,t,{...o,platform:i})};e.s(["arrow",0,eb,"autoPlacement",0,function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,i,l;let{rects:a,middlewareData:c,placement:u,platform:h,elements:p}=t,{crossAxis:m=!1,alignment:w,allowedPlacements:y=r,autoAlignment:b=!0,...x}=f(e,t),R=void 0!==w||y===r?((l=w||null)?[...y.filter(e=>d(e)===l),...y.filter(e=>d(e)!==l)]:y.filter(e=>s(e)===e)).filter(e=>!l||d(e)===l||!!b&&v(e)!==e):y,E=(null==(n=c.autoPlacement)?void 0:n.index)||0,A=R[E];if(null==A)return{};if(u!==A)return{reset:{placement:R[0]}};let C=await h.detectOverflow(t,x),S=g(A,a,await (null==h.isRTL?void 0:h.isRTL(p.floating))),T=[C[s(A)],C[S[0]],C[S[1]]],L=[...(null==(o=c.autoPlacement)?void 0:o.overflows)||[],{placement:A,overflows:T}],k=R[E+1];if(k)return{data:{index:E+1,overflows:L},reset:{placement:k}};let M=L.map(e=>{let t=d(e.placement);return[e.placement,t&&m?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),_=(null==(i=M.filter(e=>e[2].slice(0,d(e[0])?2:3).every(e=>e<=0))[0])?void 0:i[0])||M[0][0];return _!==u?{data:{index:E+1,overflows:L},reset:{placement:_}}:{}}}},"autoUpdate",0,function(e,t,n,r){let l;void 0===r&&(r={});let{ancestorScroll:c=!0,ancestorResize:u=!0,elementResize:f="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:d=!1}=r,h=et(e),p=c||u?[...h?J(h):[],...t?J(t):[]]:[];p.forEach(e=>{c&&e.addEventListener("scroll",n),u&&e.addEventListener("resize",n)});let m=h&&s?function(e,t,n){let r,l=null,c=D(e);function u(){var e;clearTimeout(r),null==(e=l)||e.disconnect(),l=null}function f(n,s){void 0===n&&(n=!1),void 0===s&&(s=1),u();let d=e.getBoundingClientRect(),{left:h,top:p,width:m,height:g}=d;if(n||t(),!m||!g)return;let v={rootMargin:-a(p)+"px "+-a(c.clientWidth-(h+m))+"px "+-a(c.clientHeight-(p+g))+"px "+-a(h)+"px",threshold:i(0,o(1,s))||1},w=!0;function y(t){let n=t[0].intersectionRatio;if(!ep(d,e.getBoundingClientRect()))return f();if(n!==s){if(!w)return f();n?f(!1,n):r=setTimeout(()=>{f(!1,1e-7)},1e3)}w=!1}try{l=new IntersectionObserver(y,{...v,root:c.ownerDocument})}catch(e){l=new IntersectionObserver(y,v)}l.observe(e)}let s=W(e),d=()=>f(n);return s.addEventListener("resize",d),f(!0),()=>{s.removeEventListener("resize",d),u()}}(h,n,u):null,g=-1,v=null;f&&(v=new ResizeObserver(e=>{let[r]=e;r&&r.target===h&&v&&t&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=v)||e.observe(t)})),n()}),h&&!d&&v.observe(h),t&&v.observe(t));let w=d?ei(e):null;return d&&function t(){let r=ei(e);w&&!ep(w,r)&&n(),w=r,l=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach(e=>{c&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=v)||e.disconnect(),v=null,d&&cancelAnimationFrame(l)}},"computePosition",0,eR,"flip",0,ev,"hide",0,ey,"inline",0,function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){let{placement:n,elements:r,rects:l,platform:a,strategy:c}=t,{padding:u=2,x:d,y:h}=f(e,t),p=Array.from(await (null==a.getClientRects?void 0:a.getClientRects(r.reference))||[]);if(!p.length)return{};let g=function(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let o=t[e];!r||o.y-r.y>r.height/2?n.push([o]):n[n.length-1].push(o),r=o}return n.map(e=>A(M(e)))}(p),v=A(M(p)),w=E(u),y=await a.getElementRects({reference:{getBoundingClientRect:function(){if(2===g.length&&(g[0].left>g[1].right||g[1].left>g[0].right)&&null!=d&&null!=h)return g.find(e=>d>e.left-w.left&&d<e.right+w.right&&h>e.top-w.top&&h<e.bottom+w.bottom)||v;if(g.length>=2){if("y"===m(n)){let e=g[0],t=g[g.length-1],r="top"===s(n),o=e.top,i=t.bottom,l=r?e.left:t.left;return A({x:l,y:o,width:(r?e.right:t.right)-l,height:i-o})}let e="left"===s(n),t=i(...g.map(e=>e.right)),r=o(...g.map(e=>e.left)),l=g.filter(n=>e?n.left===r:n.right===t),a=l[0].top;return A({x:r,y:a,width:t-r,height:l[l.length-1].bottom-a})}return v}},floating:r.floating,strategy:c});return l.reference.x!==y.reference.x||l.reference.y!==y.reference.y||l.reference.width!==y.reference.width||l.reference.height!==y.reference.height?{reset:{rects:y}}:{}}}},"limitShift",0,ex,"offset",0,em,"shift",0,eg,"size",0,ew],825339);var eE=e.i(59805),eA=e.i(788160),eC="u">typeof document?eE.useLayoutEffect:function(){};function eS(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!eS(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!eS(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function eT(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eL(e,t){let n=eT(e);return Math.round(t*n)/n}function ek(e){let t=eE.useRef(e);return eC(()=>{t.current=e}),t}e.s(["arrow",0,(e,t)=>{let n={name:"arrow",options:e,fn(t){let{element:n,padding:r}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?eb({element:n.current,padding:r}).fn(t):{}:n?eb({element:n,padding:r}).fn(t):{}}};return{name:n.name,fn:n.fn,options:[e,t]}},"flip",0,(e,t)=>{let n=ev(e);return{name:n.name,fn:n.fn,options:[e,t]}},"hide",0,(e,t)=>{let n=ey(e);return{name:n.name,fn:n.fn,options:[e,t]}},"limitShift",0,(e,t)=>({fn:ex(e).fn,options:[e,t]}),"offset",0,(e,t)=>{let n=em(e);return{name:n.name,fn:n.fn,options:[e,t]}},"shift",0,(e,t)=>{let n=eg(e);return{name:n.name,fn:n.fn,options:[e,t]}},"size",0,(e,t)=>{let n=ew(e);return{name:n.name,fn:n.fn,options:[e,t]}},"useFloating",0,function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[f,s]=eE.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=eE.useState(r);eS(d,r)||h(r);let[p,m]=eE.useState(null),[g,v]=eE.useState(null),w=eE.useCallback(e=>{e!==R.current&&(R.current=e,m(e))},[]),y=eE.useCallback(e=>{e!==E.current&&(E.current=e,v(e))},[]),b=i||p,x=l||g,R=eE.useRef(null),E=eE.useRef(null),A=eE.useRef(f),C=null!=c,S=ek(c),T=ek(o),L=ek(u),k=eE.useCallback(()=>{if(!R.current||!E.current)return;let e={placement:t,strategy:n,middleware:d};T.current&&(e.platform=T.current),eR(R.current,E.current,e).then(e=>{let t={...e,isPositioned:!1!==L.current};M.current&&!eS(A.current,t)&&(A.current=t,eA.flushSync(()=>{s(t)}))})},[d,t,n,T,L]);eC(()=>{!1===u&&A.current.isPositioned&&(A.current.isPositioned=!1,s(e=>({...e,isPositioned:!1})))},[u]);let M=eE.useRef(!1);eC(()=>(M.current=!0,()=>{M.current=!1}),[]),eC(()=>{if(b&&(R.current=b),x&&(E.current=x),b&&x){if(S.current)return S.current(b,x,k);k()}},[b,x,k,S,C]);let _=eE.useMemo(()=>({reference:R,floating:E,setReference:w,setFloating:y}),[w,y]),P=eE.useMemo(()=>({reference:b,floating:x}),[b,x]),O=eE.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=eL(P.floating,f.x),r=eL(P.floating,f.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...eT(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,a,P.floating,f.x,f.y]);return eE.useMemo(()=>({...f,update:k,refs:_,elements:P,floatingStyles:O}),[f,k,_,P,O])}],454556)}]);
|
|
@@ -15,7 +15,7 @@ const currentPort = parseInt(process.env.PORT, 10) || 3000
|
|
|
15
15
|
const hostname = process.env.HOSTNAME || '0.0.0.0'
|
|
16
16
|
|
|
17
17
|
let keepAliveTimeout = parseInt(process.env.KEEP_ALIVE_TIMEOUT, 10)
|
|
18
|
-
const nextConfig = {"env":{"NEXT_PUBLIC_APP_VERSION":"3.
|
|
18
|
+
const nextConfig = {"env":{"NEXT_PUBLIC_APP_VERSION":"3.1.1"},"webpack":null,"typescript":{"ignoreBuildErrors":false},"typedRoutes":false,"distDir":"./.next","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.ts","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"poweredByHeader":true,"compress":true,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":14400,"formats":["image/webp"],"maximumRedirects":3,"maximumResponseBody":50000000,"dangerouslyAllowLocalIP":false,"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"attachment","localPatterns":[{"pathname":"**","search":""}],"remotePatterns":[],"qualities":[75],"unoptimized":true,"customCacheHandler":false},"devIndicators":{"position":"bottom-left"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"excludeDefaultMomentLocales":true,"reactProductionProfiling":false,"reactStrictMode":null,"reactMaxHeadersLength":6000,"httpAgentOptions":{"keepAlive":true},"logging":{"serverFunctions":true,"browserToTerminal":"warn"},"compiler":{},"expireTime":31536000,"staticPageGenerationTimeout":60,"output":"standalone","modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"outputFileTracingRoot":"/home/runner/work/wiki-viewer/wiki-viewer","allowedDevOrigins":["localhost"],"cacheComponents":false,"cacheLife":{"default":{"stale":300,"revalidate":900,"expire":4294967294},"seconds":{"stale":30,"revalidate":1,"expire":60},"minutes":{"stale":300,"revalidate":60,"expire":3600},"hours":{"stale":300,"revalidate":3600,"expire":86400},"days":{"stale":300,"revalidate":86400,"expire":604800},"weeks":{"stale":300,"revalidate":604800,"expire":2592000},"max":{"stale":300,"revalidate":2592000,"expire":31536000}},"cacheHandlers":{},"experimental":{"appNewScrollHandler":false,"useSkewCookie":false,"cssChunking":true,"multiZoneDraftMode":false,"appNavFailHandling":false,"prerenderEarlyExit":true,"serverMinification":true,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"cachedNavigations":false,"partialFallbacks":false,"dynamicOnHover":false,"varyParams":false,"prefetchInlining":false,"preloadEntriesOnStart":true,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","proxyPrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":3,"memoryBasedWorkersCount":false,"imgOptConcurrency":null,"imgOptTimeoutInSeconds":7,"imgOptMaxInputPixels":268402689,"imgOptSequentialRead":null,"imgOptSkipMetadata":null,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"swcTraceProfiling":false,"forceSwcTransforms":false,"largePageDataBytes":128000,"typedEnv":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"authInterrupts":false,"webpackMemoryOptimizations":false,"optimizeServerReact":true,"strictRouteTypes":false,"viewTransition":false,"removeUncaughtErrorAndRejectionListeners":false,"validateRSCRequestHeaders":false,"staleTimes":{"dynamic":0,"static":300},"reactDebugChannel":true,"serverComponentsHmrCache":true,"staticGenerationMaxConcurrency":8,"staticGenerationMinPagesPerWorker":25,"transitionIndicator":false,"gestureTransition":false,"inlineCss":false,"useCache":false,"globalNotFound":false,"browserDebugInfoInTerminal":"warn","lockDistDir":true,"proxyClientMaxBodySize":10485760,"hideLogsAfterAbort":false,"mcpServer":true,"turbopackFileSystemCacheForDev":true,"turbopackFileSystemCacheForBuild":false,"turbopackInferModuleSideEffects":true,"turbopackPluginRuntimeStrategy":"childProcesses","optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","effect","@effect/schema","@effect/platform","@effect/platform-node","@effect/platform-browser","@effect/platform-bun","@effect/sql","@effect/sql-mssql","@effect/sql-mysql2","@effect/sql-pg","@effect/sql-sqlite-node","@effect/sql-sqlite-bun","@effect/sql-sqlite-wasm","@effect/sql-sqlite-react-native","@effect/rpc","@effect/rpc-http","@effect/typeclass","@effect/experimental","@effect/opentelemetry","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"trustHostHeader":false,"isExperimentalCompile":false},"htmlLimitedBots":"[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight","bundlePagesRouterDependencies":false,"configFileName":"next.config.ts","turbopack":{"root":"/home/runner/work/wiki-viewer/wiki-viewer"},"distDirRoot":".next"}
|
|
19
19
|
|
|
20
20
|
process.env.__NEXT_PRIVATE_STANDALONE_CONFIG = JSON.stringify(nextConfig)
|
|
21
21
|
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
module.exports=[402662,e=>{"use strict";var t=e.i(351216);e.s(["checkOrigin",0,function(e){let r=e.method.toUpperCase();if("GET"===r||"HEAD"===r||"OPTIONS"===r)return null;let s=e.headers.get("origin"),n=e.headers.get("referer");if(!s&&!n)return null;let a=function(e){let t=Array.from(new Set(["localhost","127.0.0.1",e.split(":")[0],...(process.env.WIKI_OWNER_HOSTS??"").split(",").map(e=>e.trim()).filter(Boolean)])),r=["",":3000",":3003"];e.includes(":")&&r.push(":"+e.split(":")[1]);let s=new Set;for(let e of t)for(let t of["http","https"])for(let n of r)s.add(`${t}://${e}${n}`);return s}(e.headers.get("host")??"");if(s)return a.has(s)?null:t.NextResponse.json({error:"FORBIDDEN",message:"Bad origin"},{status:403});if(n){try{let{protocol:e,host:t}=new URL(n);if(a.has(`${e}//${t}`))return null}catch{}return t.NextResponse.json({error:"FORBIDDEN",message:"Bad referer"},{status:403})}return null}])},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},224361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},688947,(e,t,r)=>{t.exports=e.x("stream",()=>require("stream"))},427699,(e,t,r)=>{t.exports=e.x("events",()=>require("events"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},761095,(e,t,r)=>{t.exports=e.x("node:net",()=>require("node:net"))},345212,762512,e=>{"use strict";var t=e.i(874533),r=e.i(902157),s=e.i(427597),n=e.i(761095),a=e.i(750227);function i(e,t,r=5){switch(t.type){case"started":return{state:{...e,status:"running",crashCount:0,lastError:void 0},action:"none"};case"manual-restart":return{state:{...e,status:"restarting",crashCount:0,lastError:void 0},action:"restart"};case"file-change":if("error"===e.status)return{state:{...e,fileWatchRestartCount:e.fileWatchRestartCount+1},action:"none"};return{state:{...e,status:"restarting",fileWatchRestartCount:e.fileWatchRestartCount+1},action:"restart"};case"crash":{if("error"===e.status)return{state:e,action:"none"};let t=e.crashCount+1;if(t>r)return{state:{...e,crashCount:t,status:"error",lastError:`Auto-restart gave up after ${t} crash restarts (cap ${r}). Fix the app and restart manually.`},action:"none"};return{state:{...e,crashCount:t,status:"restarting"},action:"restart"}}case"stop":return{state:{...e,status:"stopped"},action:"none"}}}var o=e.i(912714),l=e.i(660526),u=e.i(832852);let p="__hosted_apps__",c=/^[a-z0-9][a-z0-9-]*$/,d=new Set(["api","app","apps","s","signin","signout","_next","assets","upload","owner","share","static","public","favicon.ico"]);function h(){let e=process.env.HOME??l.default.homedir();return a.default.join(e,".wiki-viewer")}function f(){return a.default.join(h(),"hosted-apps.json")}async function g(){try{let e=await (0,o.readFile)(f(),"utf8"),t=JSON.parse(e);return{version:1,apps:Array.isArray(t.apps)?t.apps:[]}}catch{return null}}async function v(e){await (0,o.mkdir)(h(),{recursive:!0});let t=f()+".tmp";await (0,o.writeFile)(t,JSON.stringify(e,null,2),{encoding:"utf8",mode:384});try{await (0,o.chmod)(t,384)}catch{}await (0,o.rename)(t,f())}async function w(){let e=await g();if(e)return e;let t={version:1,apps:[]};return await v(t),t}async function m(){let e=await g();return e?.apps??[]}async function y(e){let t=await g();return t?t.apps.find(t=>t.slug===e)??null:null}async function R(e){var t;let r="string"!=typeof(t=e.slug)||0===t.length?{ok:!1,code:"SLUG_REQUIRED"}:c.test(t)?d.has(t)?{ok:!1,code:"SLUG_RESERVED"}:{ok:!0}:{ok:!1,code:"SLUG_INVALID"};return r.ok?(0,u.withFileMutex)(p,async()=>{let t=await w(),r=t.apps.find(t=>t.slug===e.slug);if(r)return{ok:!1,code:"SLUG_TAKEN",ownerWorkspaceId:r.workspaceId};let s={slug:e.slug,type:e.type,workspaceId:e.workspaceId,relPath:e.relPath,..."node"===e.type&&e.script?{script:e.script}:{},..."node"===e.type&&e.persist?{persist:!0}:{},createdAt:new Date().toISOString()};return t.apps.push(s),await v(t),{ok:!0,app:s}}):{ok:!1,code:r.code}}async function _(e,t){return(0,u.withFileMutex)(p,async()=>{let r=await g();if(!r)return null;let s=r.apps.find(t=>t.slug===e);return s&&"node"===s.type?(t?s.persist=!0:delete s.persist,await v(r),s):null})}async function E(e){return(0,u.withFileMutex)(p,async()=>{let t=await g();if(!t)return!1;let r=t.apps.length;return t.apps=t.apps.filter(t=>t.slug!==e),t.apps.length!==r&&(await v(t),!0)})}e.s(["createHostedApp",0,R,"deleteHostedApp",0,E,"getBySlug",0,y,"listHostedApps",0,m,"setHostedAppPersist",0,_],762512);var x=e.i(359211);let P=new Map,k=new Set,b=new Map;function S(e){return`${e.workspaceId}\0${e.relPath}`}function A(e){let t=e.watcher;e.watcher=null,t&&t.close()}function T(e){let t=e.process;if(e.process=null,!t)return;try{!t.killed&&t.pid&&t.kill("SIGTERM")}catch{}let r=setTimeout(()=>{try{!t.killed&&t.pid&&t.kill("SIGKILL")}catch{}},2e3);t.once("exit",()=>clearTimeout(r))}function N(e,t){return new Promise(r=>{let s=(0,n.createConnection)(e,t);s.setTimeout(800),s.on("connect",()=>{s.destroy(),r(!0)}),s.on("error",()=>{s.destroy(),r(!1)}),s.on("timeout",()=>{s.destroy(),r(!1)})})}async function I(e){let[t,r]=await Promise.all([N(e,"127.0.0.1"),N(e,"::1")]);return t||r}async function j(e,t=3e4){let r=Date.now()+t;for(;Date.now()<r&&!e.abort.signal.aborted;){if(await I(e.port))return e.port;await new Promise(e=>setTimeout(e,400))}return null}function C(e){let t=a.default.join(e,"package.json");if(!(0,r.existsSync)(t))return null;try{return JSON.parse((0,r.readFileSync)(t,"utf-8"))}catch{return null}}function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function U(e,t){return O(t,"start")?"start":O(t,"preview")&&(0,r.existsSync)(a.default.join(e,"dist"))?"preview":O(t,"dev")?"dev":null}function D(){let e=a.default.dirname(process.execPath),t=process.env.PATH??"";return t.split(a.default.delimiter).includes(e)?t:`${e}${a.default.delimiter}${t}`}function q(e,t){e.restartTimer||e.abort.signal.aborted||(b.set(t,e.supervision),e.restartTimer=setTimeout(()=>{e.restartTimer=null,P.get(t)!==e||e.abort.signal.aborted||"error"===e.supervision.status||$(e.workspaceId,e.relPath,e.absPath,e.script,{persist:!0}).catch(()=>{})},250))}function H(e,t){e.persist&&!e.watcher&&(e.watcher=(0,s.watch)(e.absPath,{ignoreInitial:!0,ignored:t=>a.default.relative(e.absPath,t).split(a.default.sep).some(e=>["node_modules",".git",".next"].includes(e)),awaitWriteFinish:{stabilityThreshold:250,pollInterval:100}}),e.watcher.on("all",()=>{if(P.get(t)!==e||e.abort.signal.aborted)return;let r=i(e.supervision,{type:"file-change"});e.supervision=r.state,"restart"===r.action&&(T(e),e.status="restarting",q(e,t))}))}async function $(e,s,o,l,u){var p;let c=S({workspaceId:e,relPath:s}),d=u?.persist===!0,h=P.get(c);if(h&&"stopped"!==h.status&&"error"!==h.status&&"missing"!==h.status&&h.process)return d&&(h.persist=!0),{port:h.port};h&&(h.abort.abort(),h.restartTimer&&clearTimeout(h.restartTimer),A(h),T(h),P.delete(c)),k.delete(c);let f=await new Promise((e,t)=>{let r=(0,n.createServer)();r.listen(0,"127.0.0.1",()=>{let t=r.address(),s="object"==typeof t&&t?t.port:0;r.close(()=>e(s))}),r.on("error",t)}),g=(0,r.existsSync)(a.default.join(o,"pnpm-lock.yaml"))?"pnpm":(0,r.existsSync)(a.default.join(o,"yarn.lock"))?"yarn":(0,r.existsSync)(a.default.join(o,"bun.lockb"))||(0,r.existsSync)(a.default.join(o,"bun.lock"))?"bun":"npm",v=function(e,t,r,s){let n=C(e);if(!n)return null;let a=n.scripts??{},i=Object.keys({...n.dependencies,...n.devDependencies}).some(e=>"vite"===e||e.includes("vite")),o=["--port",String(r)],l=e=>({bin:t,args:"npm"===t?["run",e,"--",...o]:["run",e,...o],isVite:i});if(s)return O(a,s)?l(s):null;let u=U(e,a);return u?l(u):n.main?{bin:"node",args:[n.main,...o],isVite:!1}:null}(o,g,f,l);if(!v)throw Error("No runnable script found in package.json (need start, preview, or dev)");let w=b.get(c);b.delete(c);let m={workspaceId:e,relPath:s,absPath:o,script:l,port:f,process:null,status:"installing",logs:[],generation:1,abort:new AbortController,persist:!1,supervision:w??{crashCount:0,fileWatchRestartCount:0,status:"stopped"},watcher:null,restartTimer:null};P.set(c,m);let y=e=>{m.logs.push(e),m.logs.length>200&&m.logs.shift()};try{(0,r.existsSync)(a.default.join(o,"node_modules"))||(y(`[wiki-viewer] Running ${g} install…`),await (p=m.abort.signal,new Promise((e,r)=>{if(p.aborted)return void r(Error("Install aborted"));let s=[],n=e=>{y(e),s.push(e)},a=(0,t.spawn)(g,["install"],{cwd:o,stdio:"pipe",env:{...process.env,PATH:D()}}),i=()=>{try{a.kill("SIGTERM")}catch{}};p.addEventListener("abort",i,{once:!0});let l=e=>{for(let t of e.toString().split("\n")){let e=t.trim();e&&n(e)}};a.stdout?.on("data",l),a.stderr?.on("data",l),a.on("error",e=>{p.removeEventListener("abort",i),r(e)}),a.on("exit",t=>{if(p.removeEventListener("abort",i),0===t)e();else{let e=s.slice(-20).join("\n");r(Error(`${g} install failed (exit ${t}):
|
|
2
|
-
${e}`))}})}))),m.status="starting",y(`[wiki-viewer] Starting on port ${f}: ${v.bin} ${v.args.join(" ")}`);let e=(0,t.spawn)(v.bin,v.args,{cwd:o,stdio:"pipe",env:{...process.env,PATH:D(),PORT:String(f),VITE_PORT:String(f)}});m.process=e;let s=e=>{for(let t of e.toString().split("\n")){let e=t.trim();e&&y(e)}};return e.stdout?.on("data",s),e.stderr?.on("data",s),e.on("exit",e=>{if(P.get(c)===m&&"stopped"!==m.status&&!m.abort.signal.aborted){if(m.process=null,m.persist&&0!==e&&null!==e){let t=i(m.supervision,{type:"crash",detail:`exit ${e}`});m.supervision=t.state,"restart"===t.action?(m.status="restarting",q(m,c)):(m.status="error",m.error=m.supervision.lastError);return}m.status=0===e||null===e?"stopped":"error",m.error=e?`Process exited with code ${e}`:void 0}}),j(m).then(t=>{if(P.get(c)===m&&!m.abort.signal.aborted)if(t)m.status="running",m.supervision={...m.supervision,status:"running"},H(m,c);else if(m.persist){let t=i(m.supervision,{type:"crash",detail:"readiness timeout"});m.supervision=t.state,"restart"===t.action?(m.status="restarting",q(m,c)):(m.status="error",m.error=m.supervision.lastError);try{e.kill("SIGTERM")}catch{}}else{m.status="error",m.error="Port never became reachable (30 s timeout)";try{e.kill("SIGTERM")}catch{}}}),{port:f}}catch(e){throw P.get(c)===m&&(m.status="error",m.error=e instanceof Error?e.message:String(e)),e}}async function M(e,t,r,s,n=!0){let a=S({workspaceId:e,relPath:t}),o=P.get(a);return o?(o.supervision=i(o.supervision,{type:"manual-restart"}).state,o.persist=n,o.absPath=r,o.script=s,o.restartTimer&&clearTimeout(o.restartTimer),o.restartTimer=null,T(o),o.status="restarting",q(o,a),{port:o.port}):$(e,t,r,s,{persist:n})}async function W(){if("1"===process.env.WIKI_NO_AUTH||"1"===process.env.WIKI_ALLOW_APP_RUNNER)for(let e of(await m()).filter(e=>"node"===e.type&&!0===e.persist)){let t=S({workspaceId:e.workspaceId,relPath:e.relPath}),s=await (0,x.getWorkspace)(e.workspaceId),n=s?(0,x.safeWorkspacePath)(s.rootDir,e.relPath):null;if(!n||!(0,r.existsSync)(n)){k.add(t);continue}try{await $(e.workspaceId,e.relPath,n,e.script,{persist:!0})}catch{}}}("1"===process.env.WIKI_NO_AUTH||"1"===process.env.WIKI_ALLOW_APP_RUNNER)&&W(),e.s(["ROOT_APP_PROXY_SEGMENT",0,"~root","getScripts",0,function(e){let t=C(e);if(!t)return{scripts:[],defaultScript:null};let r=t.scripts??{};return{scripts:Object.keys(r),defaultScript:U(e,r)}},"getStatus",0,function(e,t){let r=P.get(S({workspaceId:e,relPath:t}));return r?{status:r.status,port:r.port||void 0,error:r.error,lastError:r.supervision.lastError??r.error,restartCount:r.supervision.crashCount,fileWatchRestartCount:r.supervision.fileWatchRestartCount,logs:r.logs}:k.has(S({workspaceId:e,relPath:t}))?{status:"missing",error:"Hosted app source directory is missing",logs:[]}:{status:"stopped",logs:[]}},"resolveByPrefix",0,function(e,t){for(let r=t.length;r>0;r--){let s=t.slice(0,r).join("/"),n=P.get(S({workspaceId:e,relPath:s}));if(n&&"running"===n.status&&n.port){let e="/"+t.slice(r).join("/");return{relPath:s,port:n.port,rest:e}}}return null},"resolveRootApp",0,function(e,t){let r=P.get(S({workspaceId:e,relPath:""}));return r&&"running"===r.status&&r.port?{relPath:"",port:r.port,rest:"/"+t.filter(Boolean).join("/")}:null},"restartApp",0,M,"setAppPersistence",0,function(e,t,r,s){let n=S({workspaceId:e,relPath:t}),a=P.get(n);a&&(a.persist=s,a.absPath=r,s?H(a,n):A(a))},"startApp",0,$,"stopApp",0,function(e,t){let r=S({workspaceId:e,relPath:t}),s=P.get(r);s&&(s.abort.abort(),s.restartTimer&&clearTimeout(s.restartTimer),s.restartTimer=null,A(s),s.status="stopped",P.delete(r),T(s))}],345212)},275859,e=>{"use strict";var t=e.i(912714),r=e.i(750227);async function s(e,s){try{let n=r.default.join(e,s,"package.json");return(await (0,t.stat)(n)).isFile()}catch{return!1}}async function n(e,s){try{let n=r.default.join(e,s,"index.html");return(await (0,t.stat)(n)).isFile()}catch{return!1}}e.s(["isAppFolder",0,n,"isNodeApp",0,s])},711376,e=>{"use strict";var t=e.i(985426),r=e.i(257574),s=e.i(507835),n=e.i(457789),a=e.i(119791),i=e.i(141062),o=e.i(957291),l=e.i(535899),u=e.i(610241),p=e.i(62749),c=e.i(624891),d=e.i(725836),h=e.i(532736),f=e.i(257858),g=e.i(487476),v=e.i(193695);e.i(484264);var w=e.i(315709),m=e.i(351216),y=e.i(402662),R=e.i(660038),_=e.i(359211),E=e.i(345212),x=e.i(275859);function P(e){return"1"===process.env.WIKI_NO_AUTH||"1"===process.env.WIKI_ALLOW_APP_RUNNER||e.isAdmin}async function k(e){let t=await (0,R.resolveWorkspaceForUser)(e);if(!t.ok)return m.NextResponse.json({error:t.code},{status:t.status});let{searchParams:r}=new URL(e.url),s=r.get("path")??"",n=(0,E.getStatus)(t.ws.id,s),a=(0,_.safeWorkspacePath)(t.rootDir,s),i=a?(0,E.getScripts)(a):{scripts:[],defaultScript:null},o=await (0,x.isNodeApp)(t.rootDir,s);return m.NextResponse.json({...n,...i,isNodeApp:o})}async function b(e){let t=(0,y.checkOrigin)(e);if(t)return t;let r=await (0,R.resolveWorkspaceForUser)(e,"write");if(!r.ok)return m.NextResponse.json({error:r.code},{status:r.status});let{rootDir:s}=r;if(!P(r))return m.NextResponse.json({error:"ADMIN_REQUIRED"},{status:403});let n=await e.json(),a=n.path;if("string"!=typeof a)return m.NextResponse.json({error:"Missing path"},{status:400});let i=(0,_.safeWorkspacePath)(s,a);if(!i)return m.NextResponse.json({error:"Invalid path"},{status:400});let o="string"==typeof n.script?n.script:void 0;try{let e=await (0,E.startApp)(r.ws.id,a,i,o);return m.NextResponse.json(e)}catch(e){return m.NextResponse.json({error:String(e)},{status:500})}}async function S(e){let t=(0,y.checkOrigin)(e);if(t)return t;let r=await (0,R.resolveWorkspaceForUser)(e,"write");if(!r.ok)return m.NextResponse.json({error:r.code},{status:r.status});if(!P(r))return m.NextResponse.json({error:"ADMIN_REQUIRED"},{status:403});let s=(await e.json()).path;return"string"!=typeof s?m.NextResponse.json({error:"Missing path"},{status:400}):((0,E.stopApp)(r.ws.id,s),m.NextResponse.json({ok:!0}))}e.s(["DELETE",0,S,"GET",0,k,"POST",0,b],41743);var A=e.i(41743);let T=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/wiki/app/route",pathname:"/api/wiki/app",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/wiki/app/route.ts",nextConfigOutput:"standalone",userland:A,...{}}),{workAsyncStorage:N,workUnitAsyncStorage:I,serverHooks:j}=T;async function C(e,t,s){s.requestMeta&&(0,n.setRequestMeta)(e,s.requestMeta),T.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let m="/api/wiki/app/route";m=m.replace(/\/index$/,"")||"/";let y=await T.prepare(e,t,{srcPage:m,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve()),null;let{buildId:R,params:_,nextConfig:E,parsedUrl:x,isDraftMode:P,prerenderManifest:k,routerServerContext:b,isOnDemandRevalidate:S,revalidateOnlyGenerated:A,resolvedPathname:N,clientReferenceManifest:I,serverActionsManifest:j}=y,C=(0,o.normalizeAppPath)(m),O=!!(k.dynamicRoutes[C]||k.routes[N]),U=async()=>((null==b?void 0:b.render404)?await b.render404(e,t,x,!1):t.end("This page could not be found"),null);if(O&&!P){let e=!!k.routes[N],t=k.dynamicRoutes[C];if(t&&!1===t.fallback&&!e){if(E.adapterPath)return await U();throw new v.NoFallbackError}}let D=null;!O||T.isDev||P||(D="/index"===(D=N)?"/":D);let q=!0===T.isDev||!O,H=O&&!q;j&&I&&(0,i.setManifestsSingleton)({page:m,clientReferenceManifest:I,serverActionsManifest:j});let $=e.method||"GET",M=(0,a.getTracer)(),W=M.getActiveScopeSpan(),F=!!(null==b?void 0:b.isWrappedByNextServer),L=!!(0,n.getRequestMeta)(e,"minimalMode"),K=(0,n.getRequestMeta)(e,"incrementalCache")||await T.getIncrementalCache(e,E,k,L);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let B={params:_,previewProps:k.preview,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:q,incrementalCache:K,cacheLifeProfiles:E.cacheLife,waitUntil:s.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,s,n)=>T.onRequestError(e,t,s,n,b)},sharedContext:{buildId:R}},G=new l.NodeNextRequest(e),V=new l.NodeNextResponse(t),z=u.NextRequestAdapter.fromNodeNextRequest(G,(0,u.signalFromNodeResponse)(t));try{let n,i=async e=>T.handle(z,B).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=M.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let s=r.get("next.route");if(s){let t=`${$} ${s}`;e.setAttributes({"next.route":s,"http.route":s,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",s),n.updateName(t))}else e.updateName(`${$} ${m}`)}),o=async n=>{var a,o;let l=async({previousCacheEntry:r})=>{try{if(!L&&S&&A&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await i(n);e.fetchMetrics=B.renderOpts.fetchMetrics;let o=B.renderOpts.pendingWaitUntil;o&&s.waitUntil&&(s.waitUntil(o),o=void 0);let l=B.renderOpts.collectedTags;if(!O)return await (0,d.sendResponse)(G,V,a,B.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(a.headers);l&&(t[g.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,s=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:B.renderOpts.collectedExpire;return{value:{kind:w.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:s}}}}catch(t){throw(null==r?void 0:r.isStale)&&await T.onRequestError(e,t,{routerKind:"App Router",routePath:m,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:S})},!1,b),t}},u=await T.handleResponse({req:e,nextConfig:E,cacheKey:D,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:k,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:A,responseGenerator:l,waitUntil:s.waitUntil,isMinimalMode:L});if(!O)return null;if((null==u||null==(a=u.value)?void 0:a.kind)!==w.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(o=u.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});L||t.setHeader("x-nextjs-cache",S?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),P&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let p=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return L&&O||p.delete(g.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||p.get("Cache-Control")||p.set("Cache-Control",(0,f.getCacheControlHeader)(u.cacheControl)),await (0,d.sendResponse)(G,V,new Response(u.value.body,{headers:p,status:u.value.status||200})),null};F&&W?await o(W):(n=M.getActiveScopeSpan(),await M.withPropagatedContext(e.headers,()=>M.trace(p.BaseServerSpan.handleRequest,{spanName:`${$} ${m}`,kind:a.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},o),void 0,!F))}catch(t){if(t instanceof v.NoFallbackError||await T.onRequestError(e,t,{routerKind:"App Router",routePath:C,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:S})},!1,b),O)throw t;return await (0,d.sendResponse)(G,V,new Response(null,{status:500})),null}}e.s(["handler",0,C,"patchFetch",0,function(){return(0,s.patchFetch)({workAsyncStorage:N,workUnitAsyncStorage:I})},"routeModule",0,T,"serverHooks",0,j,"workAsyncStorage",0,N,"workUnitAsyncStorage",0,I],711376)},168315,e=>{e.v(t=>Promise.all(["server/chunks/0sag_@better-auth_memory-adapter_dist_index_mjs_0pvj6im._.js"].map(t=>e.l(t))).then(()=>t(862112)))},769787,e=>{e.v(t=>Promise.all(["server/chunks/01er_better-auth_dist_adapters_kysely-adapter_index_mjs_0s~-4gu._.js"].map(t=>e.l(t))).then(()=>t(717789)))},580632,e=>{e.v(e=>Promise.resolve().then(()=>e(270406)))},947559,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_bun-sqlite-dialect-DzNwOpKv_mjs_0z1z6m4._.js"].map(t=>e.l(t))).then(()=>t(495181)))},715018,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_node-sqlite-dialect_mjs_0qqlvhl._.js"].map(t=>e.l(t))).then(()=>t(698370)))},146843,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_d1-sqlite-dialect-C2B7YsIT_mjs_0wynrz3._.js"].map(t=>e.l(t))).then(()=>t(143740)))},697743,e=>{e.v(t=>Promise.all(["server/chunks/0.u4_next_05jevxw._.js"].map(t=>e.l(t))).then(()=>t(428325)))},99243,e=>{e.v(e=>Promise.resolve().then(()=>e(313414)))},893412,e=>{e.v(e=>Promise.resolve().then(()=>e(499465)))},687903,e=>{e.v(e=>Promise.resolve().then(()=>e(912714)))}];
|
|
3
|
-
|
|
4
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__02ovz0q._.js.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
module.exports=[536654,e=>{"use strict";var t=e.i(912714),r=e.i(750227);function a(e){return!!(r.default.isAbsolute(e)||".."===e||e.startsWith(".."+r.default.sep)||e.startsWith("../"))}async function s(e,n,i={}){let o;if(!e)return null;let l=function(e){if(e.includes("\0")||r.default.isAbsolute(e))return null;let t=e.replace(/\\/g,"/");return(("."===(t=r.default.posix.normalize(t))||"./"===t)&&(t=""),".."===t||t.startsWith("../")||/^[a-zA-Z]:\//.test(t)||t.startsWith("/"))?null:t}(n);if(null===l)return null;if(i.deniedSegments?.length){for(let e of l.split("/").filter(Boolean))if(i.deniedSegments.includes(e))return null}try{o=await (0,t.realpath)(e)}catch{return null}let u=l?r.default.join(o,l):o;try{let e=await (0,t.realpath)(u),s=r.default.relative(o,e);if(a(s))return null;return{relPath:l,absolutePath:e}}catch{if(!i.allowMissing)return null;let e=u;for(;;){let s=r.default.dirname(e);if(s===e)break;try{let e=await (0,t.realpath)(s),n=r.default.relative(o,e);if(a(n))return null;return{relPath:l,absolutePath:u}}catch{e=s}}return null}}e.s(["resolveWorkspacePath",0,s])},848475,e=>{"use strict";var t=e.i(750227);let r={".md":"text/markdown; charset=utf-8",".markdown":"text/markdown; charset=utf-8",".mdx":"text/markdown; charset=utf-8",".txt":"text/plain; charset=utf-8",".json":"application/json; charset=utf-8",".jsonc":"application/json; charset=utf-8",".ts":"text/typescript; charset=utf-8",".tsx":"text/typescript; charset=utf-8",".mts":"text/typescript; charset=utf-8",".js":"text/javascript; charset=utf-8",".jsx":"text/javascript; charset=utf-8",".mjs":"text/javascript; charset=utf-8",".html":"text/html; charset=utf-8",".htm":"text/html; charset=utf-8",".css":"text/css; charset=utf-8",".yaml":"text/yaml; charset=utf-8",".yml":"text/yaml; charset=utf-8",".toml":"text/toml; charset=utf-8",".xml":"application/xml; charset=utf-8",".svg":"image/svg+xml",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".ico":"image/x-icon",".bmp":"image/bmp",".pdf":"application/pdf",".zip":"application/zip",".tar":"application/x-tar",".gz":"application/gzip",".py":"text/x-python; charset=utf-8",".rs":"text/x-rustsrc; charset=utf-8",".go":"text/x-go; charset=utf-8",".sh":"text/x-shellscript; charset=utf-8",".csv":"text/csv; charset=utf-8",".tsv":"text/tab-separated-values; charset=utf-8",".env":"text/plain; charset=utf-8",".log":"text/plain; charset=utf-8",".ini":"text/plain; charset=utf-8",".conf":"text/plain; charset=utf-8",".mmd":"text/plain; charset=utf-8",".ipynb":"application/json; charset=utf-8",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".doc":"application/msword",".xls":"application/vnd.ms-excel",".ppt":"application/vnd.ms-powerpoint",".mp4":"video/mp4",".webm":"video/webm",".mov":"video/quicktime",".m4v":"video/mp4",".mp3":"audio/mpeg",".wav":"audio/wav",".ogg":"audio/ogg",".m4a":"audio/mp4",".aac":"audio/aac"};e.s(["contentTypeForPath",0,function(e){return r[t.default.extname(e).toLowerCase()]??"application/octet-stream"}])},719126,e=>{"use strict";var t=e.i(666680),r=e.i(912714),a=e.i(750227),s=e.i(716234),n=e.i(536654),i=e.i(848475);async function o(e,t){if(!e)return null;let r=await (0,n.resolveWorkspacePath)(e,t,{allowMissing:!0,deniedSegments:s.DENIED_SEGMENTS});return r?.absolutePath??null}async function l(e,t){let a=420;try{let t=await (0,r.stat)(e);a=511&t.mode}catch{}let s=e+".~"+process.pid+"."+Date.now()+".tmp",n=await (0,r.open)(s,"w",a);try{await n.write(t),await n.datasync()}finally{await n.close()}await (0,r.rename)(s,e)}async function u(e,t){let s=a.default.dirname(e);if(t)return await (0,r.mkdir)(s,{recursive:!0}),!0;try{return await (0,r.stat)(s),!0}catch{return!1}}e.s(["atomicWrite",0,l,"ensureParentDir",0,u,"extractShaHex",0,function(e){return e.replace(/^"/,"").replace(/"$/,"").replace(/^sha256:/,"")},"isDeniedRelPath",0,function(e){let t=e.replace(/\\/g,"/");return s.DENIED_SEGMENTS.some(e=>t===e||t.startsWith(e+"/"))},"isMarkdown",0,function(e){return e.endsWith(".md")||e.endsWith(".markdown")},"looksLikeBinary",0,function(e){return e.slice(0,Math.min(e.length,8192)).includes(0)},"mimeByExt",0,function(e){return(0,i.contentTypeForPath)(e)},"safeAbsPath",0,o,"sha256ofBuf",0,function(e){return"sha256:"+(0,t.createHash)("sha256").update(e).digest("hex")}])},487018,e=>{"use strict";var t=e.x("node:sqlite",()=>require("node:sqlite"),!0);function r(e){return 1===e.length&&Array.isArray(e[0])?e[0]:e}class a{stmt;constructor(e){this.stmt=e}get reader(){return this.stmt.columns().length>0}all(...e){let t=r(e);return this.stmt.all(...t)}get(...e){let t=r(e);return this.stmt.get(...t)}run(...e){let t=r(e),a=this.stmt.run(...t);return{changes:Number(a.changes),lastInsertRowid:Number(a.lastInsertRowid)}}iterate(...e){let t=r(e);return this.stmt.iterate(...t)}}class s{db;constructor(e){this.db=new t.DatabaseSync(e),this.db.exec("PRAGMA busy_timeout = 5000"),this.db.exec("PRAGMA journal_mode = WAL")}prepare(e){return new a(this.db.prepare(e))}exec(e){this.db.exec(e)}close(){this.db.close()}pragma(e){this.db.exec(`PRAGMA ${e}`)}}e.s(["default",()=>s])},97082,e=>{"use strict";var t=e.i(487018),r=e.i(750227),a=e.i(660526),s=e.i(902157),n=e.i(666680);let i=null;function o(){if(i)return i;let e=r.default.join(process.env.HOME??a.default.homedir(),".wiki-viewer");return(0,s.mkdirSync)(e,{recursive:!0}),(i=new t.default(r.default.join(e,"shared.db"))).pragma("journal_mode = WAL"),i.pragma("synchronous = NORMAL"),i.exec(`
|
|
2
|
-
CREATE TABLE IF NOT EXISTS shared_docs (
|
|
3
|
-
id TEXT PRIMARY KEY,
|
|
4
|
-
workspace_id TEXT NOT NULL,
|
|
5
|
-
file_path TEXT NOT NULL,
|
|
6
|
-
token TEXT NOT NULL UNIQUE,
|
|
7
|
-
password_hash TEXT,
|
|
8
|
-
expires_at TEXT,
|
|
9
|
-
created_by TEXT NOT NULL,
|
|
10
|
-
created_at TEXT NOT NULL,
|
|
11
|
-
view_count INTEGER NOT NULL DEFAULT 0,
|
|
12
|
-
is_revoked INTEGER NOT NULL DEFAULT 0
|
|
13
|
-
);
|
|
14
|
-
CREATE INDEX IF NOT EXISTS shared_docs_token_idx ON shared_docs(token);
|
|
15
|
-
CREATE INDEX IF NOT EXISTS shared_docs_file_idx ON shared_docs(workspace_id, file_path);
|
|
16
|
-
`),i}function l(e){return{id:e.id,workspaceId:e.workspace_id,filePath:e.file_path,token:e.token,passwordHash:e.password_hash??null,expiresAt:e.expires_at??null,createdBy:e.created_by,createdAt:e.created_at,viewCount:e.view_count??0,isRevoked:1===e.is_revoked}}e.s(["createShare",0,function(e){var t;let r,a,s=o(),i="shr_"+(0,n.randomBytes)(8).toString("base64url"),l=(0,n.randomBytes)(16).toString("base64url"),u=e.password?(t=e.password,r=(0,n.randomBytes)(16).toString("hex"),a=(0,n.scryptSync)(t,r,64).toString("hex"),`${r}:${a}`):null,c={id:i,workspaceId:e.workspaceId,filePath:e.filePath,token:l,passwordHash:u,expiresAt:e.expiresAt??null,createdBy:e.createdBy,createdAt:new Date().toISOString(),viewCount:0,isRevoked:!1},d={...c,isRevoked:+!!c.isRevoked};return s.prepare(`INSERT INTO shared_docs
|
|
17
|
-
(id, workspace_id, file_path, token, password_hash, expires_at, created_by, created_at, view_count, is_revoked)
|
|
18
|
-
VALUES (@id, @workspaceId, @filePath, @token, @passwordHash, @expiresAt, @createdBy, @createdAt, @viewCount, @isRevoked)`).run(d),c},"getShareByToken",0,function(e){let t=o().prepare("SELECT * FROM shared_docs WHERE token = ?").get(e);return t?l(t):null},"incrementViewCount",0,function(e){o().prepare("UPDATE shared_docs SET view_count = view_count + 1 WHERE token = ?").run(e)},"isExpired",0,function(e){return!!e.expiresAt&&new Date(e.expiresAt)<new Date},"listSharesForFile",0,function(e,t){return o().prepare("SELECT * FROM shared_docs WHERE workspace_id = ? AND file_path = ? AND is_revoked = 0 ORDER BY created_at DESC").all(e,t).map(l)},"revokeShare",0,function(e){o().prepare("UPDATE shared_docs SET is_revoked = 1 WHERE id = ?").run(e)},"verifyPassword",0,function(e,t){let[r,a]=t.split(":"),s=(0,n.scryptSync)(e,r,64),i=Buffer.from(a,"hex");return s.length===i.length&&(0,n.timingSafeEqual)(s,i)}])},794776,e=>{"use strict";let t,r=Number.isFinite(t=parseInt(process.env.AGENT_RATE_LIMIT??"",10))&&t>0?t:60;e.s(["OPS_PER_MINUTE",0,r,"SIDECAR_EVENT_TRIM_SIZE",0,1e3,"SIDECAR_TRIM_EVERY_N_MUTATIONS",0,100])},517387,e=>{"use strict";var t=e.i(794776);let r=new Map;e.s(["checkAndConsume",0,function(e,a=1){let s=Date.now(),n=t.OPS_PER_MINUTE,i=r.get(e);i||(i={tokens:n,lastRefill:s},r.set(e,i));let o=Math.floor((s-i.lastRefill)/1e3);return(o>0&&(i.tokens=Math.min(n,i.tokens+o),i.lastRefill=i.lastRefill+1e3*o),i.tokens<a)?{ok:!1,retryAfterMs:Math.max(1,1e3*(a-i.tokens)-(s-i.lastRefill))}:(i.tokens-=a,{ok:!0})}])},211451,63467,e=>{"use strict";var t=e.i(351216),r=e.i(912714),a=e.i(97082),s=e.i(359211),n=e.i(719126);async function i(e){let i,o=(0,a.getShareByToken)(e);if(!o)return{ok:!1,response:t.NextResponse.json({error:"not_found",message:"Share link not found"},{status:404})};if(o.isRevoked)return{ok:!1,response:t.NextResponse.json({error:"revoked",message:"Share link has been revoked"},{status:410})};if((0,a.isExpired)(o))return{ok:!1,response:t.NextResponse.json({error:"expired",message:"Share link has expired"},{status:410})};let l=await (0,s.getWorkspace)(o.workspaceId);if(!l)return{ok:!1,response:t.NextResponse.json({error:"workspace_gone",message:"Workspace no longer exists"},{status:410})};let u=await (0,n.safeAbsPath)(l.rootDir,o.filePath);if(!u)return{ok:!1,response:t.NextResponse.json({error:"path_invalid",message:"Invalid file path"},{status:400})};try{i=await (0,r.stat)(u)}catch{return{ok:!1,response:t.NextResponse.json({error:"file_gone",message:"File no longer exists"},{status:410})}}if(i.isDirectory())return{ok:!1,response:t.NextResponse.json({error:"path_invalid",message:"Directories cannot be shared"},{status:400})};let c=o.filePath.split("/").pop()??o.filePath;return{ok:!0,target:{share:o,absPath:u,filename:c}}}e.s(["resolveShareTarget",0,i],211451);var o=e.i(666680);function l(e){let t=(0,o.createHash)("sha256").update(e).digest("hex").slice(0,24);return`wv_share_${t}`}function u(e,t){let r=`${e.e}|${e.t}`;return(0,o.createHmac)("sha256",t).update(r).digest("hex")}e.s(["inlineContentDisposition",0,function(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"").replace(/\\/g,"\\\\").replace(/"/g,'\\"');return`inline; filename="${t}"`},"isUnlocked",0,function(e,t,r){let a=function(e,t){let r=e.headers.get("cookie")??"",a=l(t);for(let e of r.split(";")){let t=e.indexOf("=");if(!(t<=0)&&e.slice(0,t).trim()===a)return e.slice(t+1).trim()}}(e,t);return!!a&&function(e,t,r){let a,s=t.indexOf(".");if(-1===s)return!1;let n=t.slice(0,s),i=t.slice(s+1);try{a=JSON.parse(Buffer.from(n,"base64url").toString("utf8"))}catch{return!1}if(a.t!==e||"number"!=typeof a.e||a.e<=Date.now())return!1;let l=u(a,r),c=Buffer.from(l,"hex"),d=Buffer.from(i,"hex");return c.length===d.length&&(0,o.timingSafeEqual)(c,d)}(t,a,r)},"serializeUnlockCookie",0,function(e,t,r){let a,s,n,{name:i,value:o}=(s=u(a={t:t,e:Date.now()+9e5},r),n=`${Buffer.from(JSON.stringify(a)).toString("base64url")}.${s}`,{name:l(t),value:n}),c=new URL(e.url),d=[`${i}=${o}`,"HttpOnly","SameSite=Strict",`Path=${c.pathname}`,"Max-Age=900"];return"https:"===c.protocol&&d.push("Secure"),d.join("; ")}],63467)},585809,e=>{"use strict";var t=e.i(985426),r=e.i(257574),a=e.i(507835),s=e.i(457789),n=e.i(119791),i=e.i(141062),o=e.i(957291),l=e.i(535899),u=e.i(610241),c=e.i(62749),d=e.i(624891),p=e.i(725836),h=e.i(532736),f=e.i(257858),m=e.i(487476),x=e.i(193695);e.i(484264);var g=e.i(315709),v=e.i(351216),w=e.i(912714),E=e.i(517387),R=e.i(719126),k=e.i(211451),_=e.i(63467),y=e.i(97082);async function T(e,{params:t}){let r,{token:a}=await t,s=(0,E.checkAndConsume)(`share-asset:${a}`,1);if(!s.ok)return v.NextResponse.json({error:"rate_limited"},{status:429,headers:{"Retry-After":String(Math.ceil(s.retryAfterMs/1e3))}});let n=await (0,k.resolveShareTarget)(a);if(!n.ok)return n.response;let{share:i,absPath:o,filename:l}=n.target;if(i.passwordHash&&!(0,_.isUnlocked)(e,a,i.passwordHash))return v.NextResponse.json({error:"unauthorized",message:"Unlock required"},{status:401,headers:{"Cache-Control":"private, no-store"}});try{r=await (0,w.stat)(o)}catch{return v.NextResponse.json({error:"file_gone"},{status:410,headers:{"Cache-Control":"private, no-store"}})}if(r.size>0xa00000)return v.NextResponse.json({error:"too_large"},{status:413,headers:{"Cache-Control":"private, no-store"}});let u=await (0,w.readFile)(o),c=(0,R.mimeByExt)(o);(0,y.incrementViewCount)(a);let d=!!i.passwordHash;return new v.NextResponse(u,{headers:{"Content-Type":c,"Content-Disposition":(0,_.inlineContentDisposition)(l),"Cache-Control":d?"private, no-store":"public, max-age=300"}})}e.s(["GET",0,T],484926);var N=e.i(484926);let S=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/share/[token]/asset/route",pathname:"/api/share/[token]/asset",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/share/[token]/asset/route.ts",nextConfigOutput:"standalone",userland:N,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:C,serverHooks:b}=S;async function P(e,t,a){a.requestMeta&&(0,s.setRequestMeta)(e,a.requestMeta),S.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/share/[token]/asset/route";v=v.replace(/\/index$/,"")||"/";let w=await S.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:E,params:R,nextConfig:k,parsedUrl:_,isDraftMode:y,prerenderManifest:T,routerServerContext:N,isOnDemandRevalidate:A,revalidateOnlyGenerated:C,resolvedPathname:b,clientReferenceManifest:P,serverActionsManifest:I}=w,O=(0,o.normalizeAppPath)(v),D=!!(T.dynamicRoutes[O]||T.routes[b]),M=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,_,!1):t.end("This page could not be found"),null);if(D&&!y){let e=!!T.routes[b],t=T.dynamicRoutes[O];if(t&&!1===t.fallback&&!e){if(k.adapterPath)return await M();throw new x.NoFallbackError}}let j=null;!D||S.isDev||y||(j="/index"===(j=b)?"/":j);let U=!0===S.isDev||!D,H=D&&!U;I&&P&&(0,i.setManifestsSingleton)({page:v,clientReferenceManifest:P,serverActionsManifest:I});let L=e.method||"GET",B=(0,n.getTracer)(),q=B.getActiveScopeSpan(),$=!!(null==N?void 0:N.isWrappedByNextServer),F=!!(0,s.getRequestMeta)(e,"minimalMode"),W=(0,s.getRequestMeta)(e,"incrementalCache")||await S.getIncrementalCache(e,k,T,F);null==W||W.resetRequestCache(),globalThis.__incrementalCache=W;let X={params:R,previewProps:T.preview,renderOpts:{experimental:{authInterrupts:!!k.experimental.authInterrupts},cacheComponents:!!k.cacheComponents,supportsDynamicResponse:U,incrementalCache:W,cacheLifeProfiles:k.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,s)=>S.onRequestError(e,t,a,s,N)},sharedContext:{buildId:E}},G=new l.NodeNextRequest(e),z=new l.NodeNextResponse(t),K=u.NextRequestAdapter.fromNodeNextRequest(G,(0,u.signalFromNodeResponse)(t));try{let s,i=async e=>S.handle(K,X).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=B.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==c.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${L} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),s&&s!==e&&(s.setAttribute("http.route",a),s.updateName(t))}else e.updateName(`${L} ${v}`)}),o=async s=>{var n,o;let l=async({previousCacheEntry:r})=>{try{if(!F&&A&&C&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await i(s);e.fetchMetrics=X.renderOpts.fetchMetrics;let o=X.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=X.renderOpts.collectedTags;if(!D)return await (0,p.sendResponse)(G,z,n,X.renderOpts.pendingWaitUntil),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,a=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:X.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await S.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:A})},!1,N),t}},u=await S.handleResponse({req:e,nextConfig:k,cacheKey:j,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:C,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:F});if(!D)return null;if((null==u||null==(n=u.value)?void 0:n.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(o=u.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});F||t.setHeader("x-nextjs-cache",A?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),y&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let c=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return F&&D||c.delete(m.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||c.get("Cache-Control")||c.set("Cache-Control",(0,f.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(G,z,new Response(u.value.body,{headers:c,status:u.value.status||200})),null};$&&q?await o(q):(s=B.getActiveScopeSpan(),await B.withPropagatedContext(e.headers,()=>B.trace(c.BaseServerSpan.handleRequest,{spanName:`${L} ${v}`,kind:n.SpanKind.SERVER,attributes:{"http.method":L,"http.target":e.url}},o),void 0,!$))}catch(t){if(t instanceof x.NoFallbackError||await S.onRequestError(e,t,{routerKind:"App Router",routePath:O,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:A})},!1,N),D)throw t;return await (0,p.sendResponse)(G,z,new Response(null,{status:500})),null}}e.s(["handler",0,P,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:C})},"routeModule",0,S,"serverHooks",0,b,"workAsyncStorage",0,A,"workUnitAsyncStorage",0,C],585809)},687903,e=>{e.v(e=>Promise.resolve().then(()=>e(912714)))}];
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__05h6fe-._.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
module.exports=[583627,e=>{"use strict";var t=e.i(798003),r=e.i(254226);function s(){return(process.env.WIKI_ADMIN_EMAILS??"").split(",").map(e=>e.trim().toLowerCase()).filter(Boolean)}async function a(e,r){if(r){let e=s();if(e.length>0&&e.includes(r.toLowerCase()))return!0}return((await (0,t.readConfig)()).adminUserIds??[]).includes(e)}async function n(){return(await (0,t.readConfig)()).adminUserIds??[]}async function i(e){await (0,t.updateConfig)(t=>{let r=t.adminUserIds??[];return r.includes(e)?t:{...t,adminUserIds:[...r,e]}})}async function o(e){let r=s().length>0,a=!1;if(await (0,t.updateConfig)(t=>{let s=(t.adminUserIds??[]).filter(t=>t!==e);return 0!==s.length||r?{...t,adminUserIds:s}:(a=!0,t)}),a)throw Error("LAST_ADMIN: cannot remove the last admin with no WIKI_ADMIN_EMAILS configured")}async function l(e){if(s().length>0||r.SYNTHETIC_USER_IDS.has(e)||((await (0,t.readConfig)()).adminUserIds??[]).length>0)return;let a=!1;await (0,t.updateConfig)(t=>(t.adminUserIds??[]).length>0?t:(a=!0,{...t,adminUserIds:[e]})),a&&console.log(`[wiki-viewer] Bootstrap: first user ${e} promoted to admin`)}async function u(e){if("1"===process.env.WIKI_NO_AUTH)return{ok:!0,user:{id:"local",email:"local@localhost",name:"local"}};let t=await (0,r.requireUser)(e);return t.ok?await a(t.user.id,t.user.email)?{ok:!0,user:t.user}:{ok:!1,status:403,code:"ADMIN_REQUIRED"}:{ok:!1,status:401,code:"UNAUTHORIZED"}}e.s(["addAdmin",0,i,"ensureBootstrapAdmin",0,l,"isAdmin",0,a,"listAdmins",0,n,"removeAdmin",0,o,"requireAdmin",0,u])},812057,(e,t,r)=>{t.exports=e.x("node:util",()=>require("node:util"))},874533,(e,t,r)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},256294,296555,e=>{"use strict";let t;var r=e.i(874533),s=e.i(812057),a=e.i(912714),n=e.i(750227),i=e.i(660526);e.i(902157);let o=RegExp("[;|&$`<>(){}\\n\\r\\0]");function l(e){let{target:t,mountpoint:r,port:s}=e,a=t.user?`${t.user}@`:"",n=[`${a}${t.host}:${t.remotePath}`,r];s&&Number.isInteger(Number(s))&&Number(s)>0&&65536>Number(s)&&n.push("-p",String(s));let i=e.authMethod??"agent";!e.authMethod&&(null!=e.password?i="password":e.keyPath&&(i="keyfile"));let o=["reconnect","ServerAliveInterval=15","ServerAliveCountMax=3","compression=yes","cache=yes","kernel_cache","StrictHostKeyChecking=accept-new","BatchMode=yes"];if(e.readOnly&&o.push("ro"),"keyfile"===i&&e.keyPath&&(o.push(`IdentityFile=${e.keyPath}`),o.push("IdentitiesOnly=yes")),"password"===i){let e=o.indexOf("BatchMode=yes");e>=0&&o.splice(e,1),o.push("password_stdin"),o.push("PreferredAuthentications=password,keyboard-interactive"),o.push("PubkeyAuthentication=no"),o.push("NumberOfPasswordPrompts=1")}return e.extraOptions&&o.push(...e.extraOptions),n.push("-o",o.join(",")),n}e.s(["buildSshfsArgs",0,l,"isValidKeyPath",0,function(e){return!(!e||o.test(e)||e.includes(".."))&&(e.startsWith("/")||e.startsWith("~/"))},"parseSshTarget",0,function(e){let t;if(!e||o.test(e))return null;let r=e.trim(),s=r.indexOf(":");if(s<=0)return null;let a=r.slice(0,s),n=r.slice(s+1);if(!n.startsWith("/")||n.includes(".."))return null;let i=a,l=a.indexOf("@");return l>=0&&(t=a.slice(0,l),i=a.slice(l+1),!t)?null:i&&/^[a-zA-Z0-9.\-]+$/.test(i)&&(!t||/^[a-zA-Z0-9._\-]+$/.test(t))?{user:t,host:i,remotePath:n}:null}],296555);let u=(0,s.promisify)(r.execFile);function c(){return n.default.join(i.default.homedir(),".wiki-viewer","mounts")}async function p(){if(!0!==t)try{await u("sshfs",["--version"]),t=!0}catch{throw Error("sshfs binary not found. Install sshfs + FUSE (e.g. `apt install sshfs`, `brew install macfuse sshfs`) and ensure it is on PATH.")}}async function d(t){var r;let s=n.default.resolve(t),i=!1;try{i=(await (0,a.readFile)("/proc/mounts","utf8")).split("\n").some(e=>{let t=e.split(" ");return t[1]===s&&/fuse/.test(t[2]??"")})}catch{i=!1}return!!i&&(r=s,new Promise(t=>{let s=!1,a=setTimeout(()=>{s||(s=!0,t(!1))},4e3);e.A(687903).then(({readdir:e})=>e(r)).then(()=>{s||(s=!0,clearTimeout(a),t(!0))}).catch(()=>{s||(s=!0,clearTimeout(a),t(!1))})}))}async function h(e){await p(),await (0,a.mkdir)(e.mountpoint,{recursive:!0});let t=l(e);if(await new Promise((s,a)=>{let n=(0,r.spawn)("sshfs",t,{stdio:["pipe","ignore","pipe"]}),i="",o=setTimeout(()=>{n.kill("SIGKILL"),a(Error("sshfs mount timed out after 25s."))},25e3);n.stderr?.on("data",e=>{i+=e.toString()}),n.on("error",e=>{clearTimeout(o),a(e.message.includes("ENOENT")?Error("sshfs binary not found on PATH."):e)}),n.on("close",e=>{clearTimeout(o),0===e?s():a(Error(`sshfs exited ${e}: ${i.trim()||"mount failed"}`))}),"password"===e.authMethod&&n.stdin?.write((e.password??"")+"\n"),n.stdin?.end()}),!await d(e.mountpoint))throw Error("sshfs reported success but the mount is not live.")}async function f(e){let t=n.default.resolve(e);for(let[e,r]of[["fusermount",["-u","-z",t]],["umount",[t]]])try{await u(e,r);break}catch{}try{await (0,a.rmdir)(t)}catch{}}e.s(["assertSshfsAvailable",0,p,"isMounted",0,d,"mountSshfs",0,h,"mountpointFor",0,function(e){return n.default.join(c(),e)},"mountsDir",0,c,"unmountSshfs",0,f],256294)},536654,e=>{"use strict";var t=e.i(912714),r=e.i(750227);function s(e){return!!(r.default.isAbsolute(e)||".."===e||e.startsWith(".."+r.default.sep)||e.startsWith("../"))}async function a(e,n,i={}){let o;if(!e)return null;let l=function(e){if(e.includes("\0")||r.default.isAbsolute(e))return null;let t=e.replace(/\\/g,"/");return(("."===(t=r.default.posix.normalize(t))||"./"===t)&&(t=""),".."===t||t.startsWith("../")||/^[a-zA-Z]:\//.test(t)||t.startsWith("/"))?null:t}(n);if(null===l)return null;if(i.deniedSegments?.length){for(let e of l.split("/").filter(Boolean))if(i.deniedSegments.includes(e))return null}try{o=await (0,t.realpath)(e)}catch{return null}let u=l?r.default.join(o,l):o;try{let e=await (0,t.realpath)(u),a=r.default.relative(o,e);if(s(a))return null;return{relPath:l,absolutePath:e}}catch{if(!i.allowMissing)return null;let e=u;for(;;){let a=r.default.dirname(e);if(a===e)break;try{let e=await (0,t.realpath)(a),n=r.default.relative(o,e);if(s(n))return null;return{relPath:l,absolutePath:u}}catch{e=a}}return null}}e.s(["resolveWorkspacePath",0,a])},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},224361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},688947,(e,t,r)=>{t.exports=e.x("stream",()=>require("stream"))},427699,(e,t,r)=>{t.exports=e.x("events",()=>require("events"))},857764,(e,t,r)=>{t.exports=e.x("node:url",()=>require("node:url"))},848475,e=>{"use strict";var t=e.i(750227);let r={".md":"text/markdown; charset=utf-8",".markdown":"text/markdown; charset=utf-8",".mdx":"text/markdown; charset=utf-8",".txt":"text/plain; charset=utf-8",".json":"application/json; charset=utf-8",".jsonc":"application/json; charset=utf-8",".ts":"text/typescript; charset=utf-8",".tsx":"text/typescript; charset=utf-8",".mts":"text/typescript; charset=utf-8",".js":"text/javascript; charset=utf-8",".jsx":"text/javascript; charset=utf-8",".mjs":"text/javascript; charset=utf-8",".html":"text/html; charset=utf-8",".htm":"text/html; charset=utf-8",".css":"text/css; charset=utf-8",".yaml":"text/yaml; charset=utf-8",".yml":"text/yaml; charset=utf-8",".toml":"text/toml; charset=utf-8",".xml":"application/xml; charset=utf-8",".svg":"image/svg+xml",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".ico":"image/x-icon",".bmp":"image/bmp",".pdf":"application/pdf",".zip":"application/zip",".tar":"application/x-tar",".gz":"application/gzip",".py":"text/x-python; charset=utf-8",".rs":"text/x-rustsrc; charset=utf-8",".go":"text/x-go; charset=utf-8",".sh":"text/x-shellscript; charset=utf-8",".csv":"text/csv; charset=utf-8",".tsv":"text/tab-separated-values; charset=utf-8",".env":"text/plain; charset=utf-8",".log":"text/plain; charset=utf-8",".ini":"text/plain; charset=utf-8",".conf":"text/plain; charset=utf-8",".mmd":"text/plain; charset=utf-8",".ipynb":"application/json; charset=utf-8",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".doc":"application/msword",".xls":"application/vnd.ms-excel",".ppt":"application/vnd.ms-powerpoint",".mp4":"video/mp4",".webm":"video/webm",".mov":"video/quicktime",".m4v":"video/mp4",".mp3":"audio/mpeg",".wav":"audio/wav",".ogg":"audio/ogg",".m4a":"audio/mp4",".aac":"audio/aac"};e.s(["contentTypeForPath",0,function(e){return r[t.default.extname(e).toLowerCase()]??"application/octet-stream"}])},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},761095,(e,t,r)=>{t.exports=e.x("node:net",()=>require("node:net"))},345212,762512,e=>{"use strict";var t=e.i(874533),r=e.i(902157),s=e.i(427597),a=e.i(761095),n=e.i(750227);function i(e,t,r=5){switch(t.type){case"started":return{state:{...e,status:"running",crashCount:0,lastError:void 0},action:"none"};case"manual-restart":return{state:{...e,status:"restarting",crashCount:0,lastError:void 0},action:"restart"};case"file-change":if("error"===e.status)return{state:{...e,fileWatchRestartCount:e.fileWatchRestartCount+1},action:"none"};return{state:{...e,status:"restarting",fileWatchRestartCount:e.fileWatchRestartCount+1},action:"restart"};case"crash":{if("error"===e.status)return{state:e,action:"none"};let t=e.crashCount+1;if(t>r)return{state:{...e,crashCount:t,status:"error",lastError:`Auto-restart gave up after ${t} crash restarts (cap ${r}). Fix the app and restart manually.`},action:"none"};return{state:{...e,crashCount:t,status:"restarting"},action:"restart"}}case"stop":return{state:{...e,status:"stopped"},action:"none"}}}var o=e.i(912714),l=e.i(660526),u=e.i(832852);let c="__hosted_apps__",p=/^[a-z0-9][a-z0-9-]*$/,d=new Set(["api","app","apps","s","signin","signout","_next","assets","upload","owner","share","static","public","favicon.ico"]);function h(){let e=process.env.HOME??l.default.homedir();return n.default.join(e,".wiki-viewer")}function f(){return n.default.join(h(),"hosted-apps.json")}async function m(){try{let e=await (0,o.readFile)(f(),"utf8"),t=JSON.parse(e);return{version:1,apps:Array.isArray(t.apps)?t.apps:[]}}catch{return null}}async function g(e){await (0,o.mkdir)(h(),{recursive:!0});let t=f()+".tmp";await (0,o.writeFile)(t,JSON.stringify(e,null,2),{encoding:"utf8",mode:384});try{await (0,o.chmod)(t,384)}catch{}await (0,o.rename)(t,f())}async function v(){let e=await m();if(e)return e;let t={version:1,apps:[]};return await g(t),t}async function w(){let e=await m();return e?.apps??[]}async function y(e){let t=await m();return t?t.apps.find(t=>t.slug===e)??null:null}async function x(e){var t;let r="string"!=typeof(t=e.slug)||0===t.length?{ok:!1,code:"SLUG_REQUIRED"}:p.test(t)?d.has(t)?{ok:!1,code:"SLUG_RESERVED"}:{ok:!0}:{ok:!1,code:"SLUG_INVALID"};return r.ok?(0,u.withFileMutex)(c,async()=>{let t=await v(),r=t.apps.find(t=>t.slug===e.slug);if(r)return{ok:!1,code:"SLUG_TAKEN",ownerWorkspaceId:r.workspaceId};let s={slug:e.slug,type:e.type,workspaceId:e.workspaceId,relPath:e.relPath,..."node"===e.type&&e.script?{script:e.script}:{},..."node"===e.type&&e.persist?{persist:!0}:{},createdAt:new Date().toISOString()};return t.apps.push(s),await g(t),{ok:!0,app:s}}):{ok:!1,code:r.code}}async function _(e,t){return(0,u.withFileMutex)(c,async()=>{let r=await m();if(!r)return null;let s=r.apps.find(t=>t.slug===e);return s&&"node"===s.type?(t?s.persist=!0:delete s.persist,await g(r),s):null})}async function P(e){return(0,u.withFileMutex)(c,async()=>{let t=await m();if(!t)return!1;let r=t.apps.length;return t.apps=t.apps.filter(t=>t.slug!==e),t.apps.length!==r&&(await g(t),!0)})}e.s(["createHostedApp",0,x,"deleteHostedApp",0,P,"getBySlug",0,y,"listHostedApps",0,w,"setHostedAppPersist",0,_],762512);var b=e.i(359211);let E=new Map,R=new Set,k=new Map;function S(e){return`${e.workspaceId}\0${e.relPath}`}function A(e){let t=e.watcher;e.watcher=null,t&&t.close()}function I(e){let t=e.process;if(e.process=null,!t)return;try{!t.killed&&t.pid&&t.kill("SIGTERM")}catch{}let r=setTimeout(()=>{try{!t.killed&&t.pid&&t.kill("SIGKILL")}catch{}},2e3);t.once("exit",()=>clearTimeout(r))}function T(e,t){return new Promise(r=>{let s=(0,a.createConnection)(e,t);s.setTimeout(800),s.on("connect",()=>{s.destroy(),r(!0)}),s.on("error",()=>{s.destroy(),r(!1)}),s.on("timeout",()=>{s.destroy(),r(!1)})})}async function N(e){let[t,r]=await Promise.all([T(e,"127.0.0.1"),T(e,"::1")]);return t||r}async function C(e,t=3e4){let r=Date.now()+t;for(;Date.now()<r&&!e.abort.signal.aborted;){if(await N(e.port))return e.port;await new Promise(e=>setTimeout(e,400))}return null}function j(e){let t=n.default.join(e,"package.json");if(!(0,r.existsSync)(t))return null;try{return JSON.parse((0,r.readFileSync)(t,"utf-8"))}catch{return null}}function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function U(e,t){return O(t,"start")?"start":O(t,"preview")&&(0,r.existsSync)(n.default.join(e,"dist"))?"preview":O(t,"dev")?"dev":null}function D(){let e=n.default.dirname(process.execPath),t=process.env.PATH??"";return t.split(n.default.delimiter).includes(e)?t:`${e}${n.default.delimiter}${t}`}function M(e,t){e.restartTimer||e.abort.signal.aborted||(k.set(t,e.supervision),e.restartTimer=setTimeout(()=>{e.restartTimer=null,E.get(t)!==e||e.abort.signal.aborted||"error"===e.supervision.status||q(e.workspaceId,e.relPath,e.absPath,e.script,{persist:!0}).catch(()=>{})},250))}function $(e,t){e.persist&&!e.watcher&&(e.watcher=(0,s.watch)(e.absPath,{ignoreInitial:!0,ignored:t=>n.default.relative(e.absPath,t).split(n.default.sep).some(e=>["node_modules",".git",".next"].includes(e)),awaitWriteFinish:{stabilityThreshold:250,pollInterval:100}}),e.watcher.on("all",()=>{if(E.get(t)!==e||e.abort.signal.aborted)return;let r=i(e.supervision,{type:"file-change"});e.supervision=r.state,"restart"===r.action&&(I(e),e.status="restarting",M(e,t))}))}async function q(e,s,o,l,u){var c;let p=S({workspaceId:e,relPath:s}),d=u?.persist===!0,h=E.get(p);if(h&&"stopped"!==h.status&&"error"!==h.status&&"missing"!==h.status&&h.process)return d&&(h.persist=!0),{port:h.port};h&&(h.abort.abort(),h.restartTimer&&clearTimeout(h.restartTimer),A(h),I(h),E.delete(p)),R.delete(p);let f=await new Promise((e,t)=>{let r=(0,a.createServer)();r.listen(0,"127.0.0.1",()=>{let t=r.address(),s="object"==typeof t&&t?t.port:0;r.close(()=>e(s))}),r.on("error",t)}),m=(0,r.existsSync)(n.default.join(o,"pnpm-lock.yaml"))?"pnpm":(0,r.existsSync)(n.default.join(o,"yarn.lock"))?"yarn":(0,r.existsSync)(n.default.join(o,"bun.lockb"))||(0,r.existsSync)(n.default.join(o,"bun.lock"))?"bun":"npm",g=function(e,t,r,s){let a=j(e);if(!a)return null;let n=a.scripts??{},i=Object.keys({...a.dependencies,...a.devDependencies}).some(e=>"vite"===e||e.includes("vite")),o=["--port",String(r)],l=e=>({bin:t,args:"npm"===t?["run",e,"--",...o]:["run",e,...o],isVite:i});if(s)return O(n,s)?l(s):null;let u=U(e,n);return u?l(u):a.main?{bin:"node",args:[a.main,...o],isVite:!1}:null}(o,m,f,l);if(!g)throw Error("No runnable script found in package.json (need start, preview, or dev)");let v=k.get(p);k.delete(p);let w={workspaceId:e,relPath:s,absPath:o,script:l,port:f,process:null,status:"installing",logs:[],generation:1,abort:new AbortController,persist:!1,supervision:v??{crashCount:0,fileWatchRestartCount:0,status:"stopped"},watcher:null,restartTimer:null};E.set(p,w);let y=e=>{w.logs.push(e),w.logs.length>200&&w.logs.shift()};try{(0,r.existsSync)(n.default.join(o,"node_modules"))||(y(`[wiki-viewer] Running ${m} install…`),await (c=w.abort.signal,new Promise((e,r)=>{if(c.aborted)return void r(Error("Install aborted"));let s=[],a=e=>{y(e),s.push(e)},n=(0,t.spawn)(m,["install"],{cwd:o,stdio:"pipe",env:{...process.env,PATH:D()}}),i=()=>{try{n.kill("SIGTERM")}catch{}};c.addEventListener("abort",i,{once:!0});let l=e=>{for(let t of e.toString().split("\n")){let e=t.trim();e&&a(e)}};n.stdout?.on("data",l),n.stderr?.on("data",l),n.on("error",e=>{c.removeEventListener("abort",i),r(e)}),n.on("exit",t=>{if(c.removeEventListener("abort",i),0===t)e();else{let e=s.slice(-20).join("\n");r(Error(`${m} install failed (exit ${t}):
|
|
2
|
-
${e}`))}})}))),w.status="starting",y(`[wiki-viewer] Starting on port ${f}: ${g.bin} ${g.args.join(" ")}`);let e=(0,t.spawn)(g.bin,g.args,{cwd:o,stdio:"pipe",env:{...process.env,PATH:D(),PORT:String(f),VITE_PORT:String(f)}});w.process=e;let s=e=>{for(let t of e.toString().split("\n")){let e=t.trim();e&&y(e)}};return e.stdout?.on("data",s),e.stderr?.on("data",s),e.on("exit",e=>{if(E.get(p)===w&&"stopped"!==w.status&&!w.abort.signal.aborted){if(w.process=null,w.persist&&0!==e&&null!==e){let t=i(w.supervision,{type:"crash",detail:`exit ${e}`});w.supervision=t.state,"restart"===t.action?(w.status="restarting",M(w,p)):(w.status="error",w.error=w.supervision.lastError);return}w.status=0===e||null===e?"stopped":"error",w.error=e?`Process exited with code ${e}`:void 0}}),C(w).then(t=>{if(E.get(p)===w&&!w.abort.signal.aborted)if(t)w.status="running",w.supervision={...w.supervision,status:"running"},$(w,p);else if(w.persist){let t=i(w.supervision,{type:"crash",detail:"readiness timeout"});w.supervision=t.state,"restart"===t.action?(w.status="restarting",M(w,p)):(w.status="error",w.error=w.supervision.lastError);try{e.kill("SIGTERM")}catch{}}else{w.status="error",w.error="Port never became reachable (30 s timeout)";try{e.kill("SIGTERM")}catch{}}}),{port:f}}catch(e){throw E.get(p)===w&&(w.status="error",w.error=e instanceof Error?e.message:String(e)),e}}async function W(e,t,r,s,a=!0){let n=S({workspaceId:e,relPath:t}),o=E.get(n);return o?(o.supervision=i(o.supervision,{type:"manual-restart"}).state,o.persist=a,o.absPath=r,o.script=s,o.restartTimer&&clearTimeout(o.restartTimer),o.restartTimer=null,I(o),o.status="restarting",M(o,n),{port:o.port}):q(e,t,r,s,{persist:a})}async function H(){if("1"===process.env.WIKI_NO_AUTH||"1"===process.env.WIKI_ALLOW_APP_RUNNER)for(let e of(await w()).filter(e=>"node"===e.type&&!0===e.persist)){let t=S({workspaceId:e.workspaceId,relPath:e.relPath}),s=await (0,b.getWorkspace)(e.workspaceId),a=s?(0,b.safeWorkspacePath)(s.rootDir,e.relPath):null;if(!a||!(0,r.existsSync)(a)){R.add(t);continue}try{await q(e.workspaceId,e.relPath,a,e.script,{persist:!0})}catch{}}}("1"===process.env.WIKI_NO_AUTH||"1"===process.env.WIKI_ALLOW_APP_RUNNER)&&H(),e.s(["ROOT_APP_PROXY_SEGMENT",0,"~root","getScripts",0,function(e){let t=j(e);if(!t)return{scripts:[],defaultScript:null};let r=t.scripts??{};return{scripts:Object.keys(r),defaultScript:U(e,r)}},"getStatus",0,function(e,t){let r=E.get(S({workspaceId:e,relPath:t}));return r?{status:r.status,port:r.port||void 0,error:r.error,lastError:r.supervision.lastError??r.error,restartCount:r.supervision.crashCount,fileWatchRestartCount:r.supervision.fileWatchRestartCount,logs:r.logs}:R.has(S({workspaceId:e,relPath:t}))?{status:"missing",error:"Hosted app source directory is missing",logs:[]}:{status:"stopped",logs:[]}},"resolveByPrefix",0,function(e,t){for(let r=t.length;r>0;r--){let s=t.slice(0,r).join("/"),a=E.get(S({workspaceId:e,relPath:s}));if(a&&"running"===a.status&&a.port){let e="/"+t.slice(r).join("/");return{relPath:s,port:a.port,rest:e}}}return null},"resolveRootApp",0,function(e,t){let r=E.get(S({workspaceId:e,relPath:""}));return r&&"running"===r.status&&r.port?{relPath:"",port:r.port,rest:"/"+t.filter(Boolean).join("/")}:null},"restartApp",0,W,"setAppPersistence",0,function(e,t,r,s){let a=S({workspaceId:e,relPath:t}),n=E.get(a);n&&(n.persist=s,n.absPath=r,s?$(n,a):A(n))},"startApp",0,q,"stopApp",0,function(e,t){let r=S({workspaceId:e,relPath:t}),s=E.get(r);s&&(s.abort.abort(),s.restartTimer&&clearTimeout(s.restartTimer),s.restartTimer=null,A(s),s.status="stopped",E.delete(r),I(s))}],345212)},727028,(e,t,r)=>{t.exports=e.x("node:zlib",()=>require("node:zlib"))},526798,e=>{"use strict";var t=e.i(985426),r=e.i(257574),s=e.i(507835),a=e.i(457789),n=e.i(119791),i=e.i(141062),o=e.i(957291),l=e.i(535899),u=e.i(610241),c=e.i(62749),p=e.i(624891),d=e.i(725836),h=e.i(532736),f=e.i(257858),m=e.i(487476),g=e.i(193695);e.i(484264);var v=e.i(315709),w=e.i(912714),y=e.i(351216),x=e.i(723012),_=e.i(345212),P=e.i(762512);async function b(e){let t=await (0,P.getBySlug)(e);if(!t)return null;if("html"===t.type)return{kind:"html",entry:t,workspaceId:t.workspaceId,relPath:t.relPath};let r=(0,_.getStatus)(t.workspaceId,t.relPath);return{kind:"node",entry:t,workspaceId:t.workspaceId,relPath:t.relPath,port:r.port,status:r.status}}var E=e.i(536654),R=e.i(716234),k=e.i(848475),S=e.i(583627),A=e.i(254226),I=e.i(359211);async function T(e,t){let r=await (0,I.getWorkspace)(t);if(!r)return y.NextResponse.json({error:"WORKSPACE_NOT_FOUND"},{status:404});if("1"===process.env.WIKI_NO_AUTH)return null;let s=await (0,A.requireUser)(e);if(!s.ok)return y.NextResponse.json({error:"UNAUTHORIZED"},{status:401});let a=await (0,S.isAdmin)(s.user.id,s.user.email);return(0,I.userCanAccess)(r,s.user.id,a)?null:y.NextResponse.json({error:"WORKSPACE_FORBIDDEN"},{status:403})}async function N(e,t,r){let s=r.filter(Boolean).join("/"),a=await (0,E.resolveWorkspacePath)(e,t,{deniedSegments:R.DENIED_SEGMENTS});if(!a)return y.NextResponse.json({error:"Invalid path"},{status:400});let n=!1;try{n=(await (0,w.stat)(a.absolutePath)).isFile()}catch{return y.NextResponse.json({error:"File not found"},{status:404})}let i=n?t.split("/").slice(0,-1).join("/"):t,o=n?t:`${t}/index.html`.replace(/\/+/g,"/").replace(/^\//,""),l=""===s?o:[i,s].filter(Boolean).join("/"),u=await (0,E.resolveWorkspacePath)(e,l,{deniedSegments:R.DENIED_SEGMENTS});if(!u)return y.NextResponse.json({error:"Invalid path"},{status:400});try{if((await (0,w.stat)(u.absolutePath)).isDirectory()){let t=await (0,E.resolveWorkspacePath)(e,`${l}/index.html`,{deniedSegments:R.DENIED_SEGMENTS});if(!t)return y.NextResponse.json({error:"Not found"},{status:404});let r=await (0,w.readFile)(t.absolutePath);return new Response(new Uint8Array(r),{headers:{"Content-Type":"text/html; charset=utf-8","Cache-Control":"no-store"}})}let t=await (0,w.readFile)(u.absolutePath);return new Response(new Uint8Array(t),{headers:{"Content-Type":(0,k.contentTypeForPath)(u.absolutePath),"Cache-Control":"private, max-age=60"}})}catch{return y.NextResponse.json({error:"File not found"},{status:404})}}async function C(e,{params:t}){let{slug:r,rest:s}=await t,a=await b(r);if(!a)return y.NextResponse.json({error:"SLUG_NOT_FOUND"},{status:404});let n=await T(e,a.workspaceId);if(n)return n;let i=await (0,I.getWorkspace)(a.workspaceId);if(!i)return y.NextResponse.json({error:"WORKSPACE_NOT_FOUND"},{status:404});if("html"===a.kind)return N(i.rootDir,a.relPath,s??[]);if(!a.port||"running"!==a.status)return new Response(`<!doctype html><meta charset="utf-8"><title>App stopped</title><body style="font:14px system-ui;padding:2rem;color:#444"><h1 style="font-size:1.1rem">This app is not running</h1><p>The hosted app <code>${r}</code> is stopped. Start it from the Hosted Apps section in the sidebar, then reload.</p></body>`,{status:503,headers:{"content-type":"text/html; charset=utf-8","cache-control":"no-store"}});let o="/"+(s??[]).filter(Boolean).join("/");return(0,x.forwardToChild)(e,{port:a.port,rest:o,proxyBase:`/app/${r}`})}e.s(["DELETE",0,C,"GET",0,C,"HEAD",0,C,"OPTIONS",0,C,"PATCH",0,C,"POST",0,C,"PUT",0,C,"dynamic",0,"force-dynamic"],512415);var j=e.i(512415);let O=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/app/[slug]/[[...rest]]/route",pathname:"/app/[slug]/[[...rest]]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/app/[slug]/[[...rest]]/route.ts",nextConfigOutput:"standalone",userland:j,...{}}),{workAsyncStorage:U,workUnitAsyncStorage:D,serverHooks:M}=O;async function $(e,t,s){s.requestMeta&&(0,a.setRequestMeta)(e,s.requestMeta),O.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/app/[slug]/[[...rest]]/route";w=w.replace(/\/index$/,"")||"/";let y=await O.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve()),null;let{buildId:x,params:_,nextConfig:P,parsedUrl:b,isDraftMode:E,prerenderManifest:R,routerServerContext:k,isOnDemandRevalidate:S,revalidateOnlyGenerated:A,resolvedPathname:I,clientReferenceManifest:T,serverActionsManifest:N}=y,C=(0,o.normalizeAppPath)(w),j=!!(R.dynamicRoutes[C]||R.routes[I]),U=async()=>((null==k?void 0:k.render404)?await k.render404(e,t,b,!1):t.end("This page could not be found"),null);if(j&&!E){let e=!!R.routes[I],t=R.dynamicRoutes[C];if(t&&!1===t.fallback&&!e){if(P.adapterPath)return await U();throw new g.NoFallbackError}}let D=null;!j||O.isDev||E||(D="/index"===(D=I)?"/":D);let M=!0===O.isDev||!j,$=j&&!M;N&&T&&(0,i.setManifestsSingleton)({page:w,clientReferenceManifest:T,serverActionsManifest:N});let q=e.method||"GET",W=(0,n.getTracer)(),H=W.getActiveScopeSpan(),F=!!(null==k?void 0:k.isWrappedByNextServer),L=!!(0,a.getRequestMeta)(e,"minimalMode"),K=(0,a.getRequestMeta)(e,"incrementalCache")||await O.getIncrementalCache(e,P,R,L);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let B={params:_,previewProps:R.preview,renderOpts:{experimental:{authInterrupts:!!P.experimental.authInterrupts},cacheComponents:!!P.cacheComponents,supportsDynamicResponse:M,incrementalCache:K,cacheLifeProfiles:P.cacheLife,waitUntil:s.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,s,a)=>O.onRequestError(e,t,s,a,k)},sharedContext:{buildId:x}},z=new l.NodeNextRequest(e),G=new l.NodeNextResponse(t),V=u.NextRequestAdapter.fromNodeNextRequest(z,(0,u.signalFromNodeResponse)(t));try{let a,i=async e=>O.handle(V,B).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=W.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==c.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let s=r.get("next.route");if(s){let t=`${q} ${s}`;e.setAttributes({"next.route":s,"http.route":s,"next.span_name":t}),e.updateName(t),a&&a!==e&&(a.setAttribute("http.route",s),a.updateName(t))}else e.updateName(`${q} ${w}`)}),o=async a=>{var n,o;let l=async({previousCacheEntry:r})=>{try{if(!L&&S&&A&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await i(a);e.fetchMetrics=B.renderOpts.fetchMetrics;let o=B.renderOpts.pendingWaitUntil;o&&s.waitUntil&&(s.waitUntil(o),o=void 0);let l=B.renderOpts.collectedTags;if(!j)return await (0,d.sendResponse)(z,G,n,B.renderOpts.pendingWaitUntil),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==B.renderOpts.collectedRevalidate&&!(B.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&B.renderOpts.collectedRevalidate,s=void 0===B.renderOpts.collectedExpire||B.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:B.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:s}}}}catch(t){throw(null==r?void 0:r.isStale)&&await O.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:S})},!1,k),t}},u=await O.handleResponse({req:e,nextConfig:P,cacheKey:D,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:R,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:A,responseGenerator:l,waitUntil:s.waitUntil,isMinimalMode:L});if(!j)return null;if((null==u||null==(n=u.value)?void 0:n.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(o=u.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});L||t.setHeader("x-nextjs-cache",S?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),E&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let c=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return L&&j||c.delete(m.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||c.get("Cache-Control")||c.set("Cache-Control",(0,f.getCacheControlHeader)(u.cacheControl)),await (0,d.sendResponse)(z,G,new Response(u.value.body,{headers:c,status:u.value.status||200})),null};F&&H?await o(H):(a=W.getActiveScopeSpan(),await W.withPropagatedContext(e.headers,()=>W.trace(c.BaseServerSpan.handleRequest,{spanName:`${q} ${w}`,kind:n.SpanKind.SERVER,attributes:{"http.method":q,"http.target":e.url}},o),void 0,!F))}catch(t){if(t instanceof g.NoFallbackError||await O.onRequestError(e,t,{routerKind:"App Router",routePath:C,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:S})},!1,k),j)throw t;return await (0,d.sendResponse)(z,G,new Response(null,{status:500})),null}}e.s(["handler",0,$,"patchFetch",0,function(){return(0,s.patchFetch)({workAsyncStorage:U,workUnitAsyncStorage:D})},"routeModule",0,O,"serverHooks",0,M,"workAsyncStorage",0,U,"workUnitAsyncStorage",0,D],526798)},282139,e=>{e.v(e=>Promise.resolve().then(()=>e(351216)))},687903,e=>{e.v(e=>Promise.resolve().then(()=>e(912714)))},168315,e=>{e.v(t=>Promise.all(["server/chunks/0sag_@better-auth_memory-adapter_dist_index_mjs_0pvj6im._.js"].map(t=>e.l(t))).then(()=>t(862112)))},769787,e=>{e.v(t=>Promise.all(["server/chunks/01er_better-auth_dist_adapters_kysely-adapter_index_mjs_0s~-4gu._.js"].map(t=>e.l(t))).then(()=>t(717789)))},580632,e=>{e.v(e=>Promise.resolve().then(()=>e(270406)))},947559,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_bun-sqlite-dialect-DzNwOpKv_mjs_0z1z6m4._.js"].map(t=>e.l(t))).then(()=>t(495181)))},715018,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_node-sqlite-dialect_mjs_0qqlvhl._.js"].map(t=>e.l(t))).then(()=>t(698370)))},146843,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_d1-sqlite-dialect-C2B7YsIT_mjs_0wynrz3._.js"].map(t=>e.l(t))).then(()=>t(143740)))},697743,e=>{e.v(t=>Promise.all(["server/chunks/0.u4_next_05jevxw._.js"].map(t=>e.l(t))).then(()=>t(428325)))},99243,e=>{e.v(e=>Promise.resolve().then(()=>e(313414)))},893412,e=>{e.v(t=>Promise.all(["server/chunks/src_lib_auth_api-key_ts_0t_ma-t._.js"].map(t=>e.l(t))).then(()=>t(499465)))}];
|
|
3
|
-
|
|
4
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__07757zz._.js.map
|