for-humanity 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/README.md +16 -9
- package/dist/browser.js +16 -16
- package/dist/cli.css +2 -968
- package/dist/cli.js +92 -2318
- package/dist/config.js +1 -0
- package/dist/constant/copy.d.ts +100 -0
- package/dist/constant/site.d.ts +20 -0
- package/dist/constant/status.d.ts +19 -0
- package/dist/copy-C1uzvEnr.js +103 -0
- package/dist/group-path-XAThmzvC.js +10 -0
- package/dist/load-site-CbpLEhwu.js +2379 -0
- package/dist/logger-Dv1i9xSV.js +9 -0
- package/dist/mermaid/THIRD-PARTY-NOTICES.txt +3134 -0
- package/dist/mermaid/chunk--TN-qHgG.js +2 -0
- package/dist/mermaid/chunk-0kM1Lv4D.js +2 -0
- package/dist/mermaid/chunk-3FHei3pH.js +2001 -0
- package/dist/mermaid/chunk-3_2p2GqN.js +2 -0
- package/dist/mermaid/chunk-6HLei9i0.js +84 -0
- package/dist/mermaid/chunk-7Sz3kAwl.js +2214 -0
- package/dist/mermaid/chunk-7Tarqbpa.js +18047 -0
- package/dist/mermaid/chunk-9kkt8lzL.js +10 -0
- package/dist/mermaid/chunk-B--pNBQF.js +884 -0
- package/dist/mermaid/chunk-B4F-pysn.js +4241 -0
- package/dist/mermaid/chunk-B58sEIY_.js +14 -0
- package/dist/mermaid/chunk-B9_UWzSH.js +1517 -0
- package/dist/mermaid/chunk-BB8uZHwY.js +75 -0
- package/dist/mermaid/chunk-BFfk0LEc.js +717 -0
- package/dist/mermaid/chunk-BKri0qr7.js +89 -0
- package/dist/mermaid/chunk-BL404pH5.js +26 -0
- package/dist/mermaid/chunk-BLeiQSWo.js +354 -0
- package/dist/mermaid/chunk-BOmH_UFd.js +2 -0
- package/dist/mermaid/chunk-BSej9Nhy.js +1361 -0
- package/dist/mermaid/chunk-BYzrzvCI.js +12 -0
- package/dist/mermaid/chunk-BariMtWr.js +3020 -0
- package/dist/mermaid/chunk-BcrBoMwH.js +2352 -0
- package/dist/mermaid/chunk-Bok8z-Yo.js +67 -0
- package/dist/mermaid/chunk-BpTHLKQM.js +1970 -0
- package/dist/mermaid/chunk-BqjuxRsC.js +733 -0
- package/dist/mermaid/chunk-BuvPd-s5.js +1073 -0
- package/dist/mermaid/chunk-BvVehae3.js +5069 -0
- package/dist/mermaid/chunk-C-JABYpd.js +3075 -0
- package/dist/mermaid/chunk-C9XlTm4w.js +2 -0
- package/dist/mermaid/chunk-CApNbSU9.js +6 -0
- package/dist/mermaid/chunk-CCM2AH-C.js +9 -0
- package/dist/mermaid/chunk-CD1E0F_N.js +2 -0
- package/dist/mermaid/chunk-CDWvKG7D.js +2 -0
- package/dist/mermaid/chunk-CEVPpC1F.js +34 -0
- package/dist/mermaid/chunk-CLDr12lf.js +47504 -0
- package/dist/mermaid/chunk-CLVYqOBI.js +61 -0
- package/dist/mermaid/chunk-CLeOkFb5.js +15 -0
- package/dist/mermaid/chunk-CLgRAtOz.js +37 -0
- package/dist/mermaid/chunk-CMqFNUBl.js +134 -0
- package/dist/mermaid/chunk-CTPaBJXB.js +2 -0
- package/dist/mermaid/chunk-CVi6IGBL.js +2 -0
- package/dist/mermaid/chunk-CWV_EN-4.js +4745 -0
- package/dist/mermaid/chunk-CZ0dAs3g.js +2 -0
- package/dist/mermaid/chunk-C_YGy4Fn.js +236 -0
- package/dist/mermaid/chunk-CcVH22Yt.js +100 -0
- package/dist/mermaid/chunk-CgG6CD9_.js +7175 -0
- package/dist/mermaid/chunk-CgOP6IDB.js +3397 -0
- package/dist/mermaid/chunk-Cgg2UTSf.js +13 -0
- package/dist/mermaid/chunk-ChJfJJ1A.js +214 -0
- package/dist/mermaid/chunk-Ck5XRA46.js +447 -0
- package/dist/mermaid/chunk-Ckuw16cl.js +203 -0
- package/dist/mermaid/chunk-CpAbRCbF.js +1880 -0
- package/dist/mermaid/chunk-CuYekbSv.js +2 -0
- package/dist/mermaid/chunk-CwS4wZ5a.js +2 -0
- package/dist/mermaid/chunk-D-bcrBO3.js +82 -0
- package/dist/mermaid/chunk-D3IEAkCW.js +76 -0
- package/dist/mermaid/chunk-D8XfBJ_K.js +645 -0
- package/dist/mermaid/chunk-D9Ddd9y4.js +2228 -0
- package/dist/mermaid/chunk-DBh1mIbK.js +12 -0
- package/dist/mermaid/chunk-DD6Df6Ic.js +5 -0
- package/dist/mermaid/chunk-DGVDaXjx.js +8 -0
- package/dist/mermaid/chunk-DK9KqIXj.js +632 -0
- package/dist/mermaid/chunk-DORnIAsy.js +4487 -0
- package/dist/mermaid/chunk-DU69_VcF.js +363 -0
- package/dist/mermaid/chunk-DVNvSFoz.js +2144 -0
- package/dist/mermaid/chunk-DZe-4kde.js +20 -0
- package/dist/mermaid/chunk-D_a06Rz4.js +287 -0
- package/dist/mermaid/chunk-DfyFJJi2.js +972 -0
- package/dist/mermaid/chunk-DhKYPp1Z.js +2 -0
- package/dist/mermaid/chunk-DjFqgNTG.js +94 -0
- package/dist/mermaid/chunk-DmbDDrr-.js +65 -0
- package/dist/mermaid/chunk-DpuxlyL_.js +696 -0
- package/dist/mermaid/chunk-DqGhppWe.js +2 -0
- package/dist/mermaid/chunk-DqPZxHXa.js +5 -0
- package/dist/mermaid/chunk-Dt_1Jyif.js +293 -0
- package/dist/mermaid/chunk-DyQBE_NW.js +1935 -0
- package/dist/mermaid/chunk-JckyC4mW.js +1009 -0
- package/dist/mermaid/chunk-K7Myuj2-.js +1334 -0
- package/dist/mermaid/chunk-KuPYb48V.js +275 -0
- package/dist/mermaid/chunk-MFVRUoO0.js +4020 -0
- package/dist/mermaid/chunk-MbInCS_6.js +28 -0
- package/dist/mermaid/chunk-MexOLyKV.js +355 -0
- package/dist/mermaid/chunk-NnbDtJzg.js +21856 -0
- package/dist/mermaid/chunk-SGpOYZbI.js +2139 -0
- package/dist/mermaid/chunk-TbxLDlcU.js +198 -0
- package/dist/mermaid/chunk-TftHqGLg.js +490 -0
- package/dist/mermaid/chunk-UjQ8vA_Z.js +4138 -0
- package/dist/mermaid/chunk-YgmVTKqc.js +16 -0
- package/dist/mermaid/chunk-_a9EZE1v.js +1798 -0
- package/dist/mermaid/chunk-dTb8jqeP.js +2 -0
- package/dist/mermaid/chunk-fFdMfF8S.js +2240 -0
- package/dist/mermaid/chunk-feYbMzBj.js +1267 -0
- package/dist/mermaid/chunk-g3Pn8DkW.js +46 -0
- package/dist/mermaid/chunk-hM77LvCb.js +19832 -0
- package/dist/mermaid/chunk-hUDb-eAW.js +527 -0
- package/dist/mermaid/chunk-tpABtZ-3.js +4252 -0
- package/dist/mermaid/chunk-xIbz3oFK.js +59 -0
- package/dist/mermaid/chunk-yBz-vst0.js +976 -0
- package/dist/mermaid/mermaid-BhtR3wyB.js +1145 -0
- package/dist/run-site-command-C80YoNOe.js +129 -0
- package/dist/site-config-bllORGpm.js +90 -0
- package/dist/site.js +1 -0
- package/dist/start-dev-server-C4_Lu1nZ.js +176 -0
- package/dist/to-change-queue-DbEnZGNK.js +34 -0
- package/dist/to-error-message-pF6_7wGK.js +16 -0
- package/dist/type/group-path.d.ts +7 -0
- package/dist/type/site-config.d.ts +57 -0
- package/package.json +34 -17
- package/src/component/widget/cursor-face/_constant/cursor-face.ts +0 -14
- package/src/component/widget/cursor-face/wg-cursor-face.css +0 -15
- package/src/component/widget/cursor-face/wg-cursor-face.tsx +0 -153
- package/src/component/widget/navigation/_constant/locale.ts +0 -9
- package/src/component/widget/navigation/_constant/navigation-data-schema.ts +0 -33
- package/src/component/widget/navigation/_constant/navigation.ts +0 -9
- package/src/component/widget/navigation/_constant/reading-line.ts +0 -4
- package/src/component/widget/navigation/_function/restore-navigation-scroll.ts +0 -59
- package/src/component/widget/navigation/_function/to-doc-groups/_to-doc-branches.ts +0 -15
- package/src/component/widget/navigation/_function/to-doc-groups/_to-doc-group-branches.ts +0 -70
- package/src/component/widget/navigation/_function/to-doc-groups/to-doc-groups.ts +0 -15
- package/src/component/widget/navigation/_function/to-navigation-data/_to-navigation-document.ts +0 -13
- package/src/component/widget/navigation/_function/to-navigation-data/_to-navigation-group.ts +0 -13
- package/src/component/widget/navigation/_function/to-navigation-data/to-navigation-data.ts +0 -18
- package/src/component/widget/navigation/_function/to-navigation-json.ts +0 -8
- package/src/component/widget/navigation/_function/to-toc-groups.ts +0 -38
- package/src/component/widget/navigation/_type/doc-branch.ts +0 -11
- package/src/component/widget/navigation/_type/doc-group.ts +0 -24
- package/src/component/widget/navigation/_type/navigation-data.ts +0 -75
- package/src/component/widget/navigation/_type/navigation-focus-snapshot.ts +0 -17
- package/src/component/widget/navigation/_type/toc-group.ts +0 -39
- package/src/component/widget/navigation/_wg-navigation-nav-list.css +0 -48
- package/src/component/widget/navigation/_wg-navigation-nav-list.tsx +0 -61
- package/src/component/widget/navigation/_wg-navigation-nav.css +0 -21
- package/src/component/widget/navigation/_wg-navigation-nav.tsx +0 -33
- package/src/component/widget/navigation/_wg-navigation-scroll.tsx +0 -117
- package/src/component/widget/navigation/_wg-navigation-toc.css +0 -91
- package/src/component/widget/navigation/_wg-navigation-toc.tsx +0 -114
- package/src/component/widget/navigation/wg-navigation.css +0 -282
- package/src/component/widget/navigation/wg-navigation.tsx +0 -420
- package/src/component/widget/prose/_constant/heading-highlight.ts +0 -4
- package/src/component/widget/prose/_constant/section.ts +0 -7
- package/src/component/widget/prose/_constant/status.ts +0 -9
- package/src/component/widget/prose/_function/has-block-content.ts +0 -30
- package/src/component/widget/prose/_function/rehype-head.ts +0 -31
- package/src/component/widget/prose/_function/rehype-sections/_to-section-headings.ts +0 -20
- package/src/component/widget/prose/_function/rehype-sections/rehype-sections.ts +0 -21
- package/src/component/widget/prose/_function/rehype-tables.ts +0 -22
- package/src/component/widget/prose/_function/remark-blocks.ts +0 -112
- package/src/component/widget/prose/_function/remark-flow.ts +0 -26
- package/src/component/widget/prose/_function/remark-links.ts +0 -33
- package/src/component/widget/prose/_function/remark-parts.ts +0 -26
- package/src/component/widget/prose/_function/remark-status.ts +0 -59
- package/src/component/widget/prose/_function/remark-swatch.ts +0 -16
- package/src/component/widget/prose/_function/remark-unknown-directives.ts +0 -25
- package/src/component/widget/prose/wg-prose.css +0 -484
- package/src/component/widget/prose/wg-prose.tsx +0 -43
- package/src/component/widget/shell/wg-shell.css +0 -63
- package/src/component/widget/shell/wg-shell.tsx +0 -88
- package/src/component/widget/shell-controls/wg-shell-controls.css +0 -4
- package/src/component/widget/shell-controls/wg-shell-controls.tsx +0 -170
- package/src/constant/asset.ts +0 -63
- package/src/constant/copy.ts +0 -133
- package/src/constant/doc.ts +0 -13
- package/src/constant/font.ts +0 -34
- package/src/constant/site.ts +0 -24
- package/src/constant/status.ts +0 -15
- package/src/entry/browser/browser.tsx +0 -22
- package/src/entry/cli/_constant/cli.ts +0 -19
- package/src/entry/cli/_constant/crawling.ts +0 -14
- package/src/entry/cli/_constant/snippet.ts +0 -21
- package/src/entry/cli/_function/create-app.tsx +0 -57
- package/src/entry/cli/_function/create-dev-app.ts +0 -87
- package/src/entry/cli/_function/create-processor/_rehype-assets.ts +0 -70
- package/src/entry/cli/_function/create-processor/_rehype-heading-ids.ts +0 -34
- package/src/entry/cli/_function/create-processor/_remark-report.ts +0 -15
- package/src/entry/cli/_function/create-processor/_remark-snippets.ts +0 -117
- package/src/entry/cli/_function/create-processor/_shiki-transformers.ts +0 -91
- package/src/entry/cli/_function/create-processor/create-processor.ts +0 -64
- package/src/entry/cli/_function/read-docs.ts +0 -128
- package/src/entry/cli/_function/read-home.ts +0 -32
- package/src/entry/cli/_function/to-crawling-app.ts +0 -42
- package/src/entry/cli/cli.test.ts +0 -804
- package/src/entry/cli/cli.ts +0 -206
- package/src/env.d.ts +0 -6
- package/src/page/doc/pg-doc.tsx +0 -35
- package/src/page/home/pg-home.tsx +0 -40
- package/src/store/navigation/create-navigation-stores.test.ts +0 -74
- package/src/store/navigation/create-navigation-stores.ts +0 -59
- package/src/store/navigation/navigation-state.ts +0 -36
- package/src/store/navigation/navigation-storage.ts +0 -9
- package/src/store/navigation/to-navigation-scroll-state.ts +0 -42
- package/src/style/base.css +0 -28
- package/src/style/token.css +0 -188
- package/src/type/doc-content.ts +0 -15
- package/src/type/doc-data.ts +0 -38
- package/src/type/doc-file-data.ts +0 -21
- package/src/type/doc-heading.ts +0 -17
- package/src/type/doc-outline.ts +0 -16
- package/src/type/doc-section.ts +0 -9
- package/src/type/doc.ts +0 -20
- package/src/type/group-path.ts +0 -7
- package/src/type/site-assets.ts +0 -25
- package/src/type/site-config.ts +0 -73
- package/src/type/vfile-data.d.ts +0 -10
- package/src/util/async/to-change-queue.test.ts +0 -58
- package/src/util/async/to-change-queue.ts +0 -43
- package/src/util/dom/find-hash-target.ts +0 -18
- package/src/util/dom/reveal-hash-target.ts +0 -15
- package/src/util/error/to-error-message.ts +0 -10
- package/src/util/file/to-asset-path.ts +0 -26
- package/src/util/font/to-font-css.test.ts +0 -41
- package/src/util/font/to-font-css.ts +0 -28
- package/src/util/mermaid/render-flow.js +0 -321
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.13.0 — 2026-10-16
|
|
6
|
+
|
|
7
|
+
**Upgrade:** Node.js 22.12.0 or later is now required; upgrade Node before installing. Existing `dev`, `build`, `preview` commands and `.mjs` configurations remain supported. To use typed configuration, replace the `.mjs` file with `for-humanity.config.ts`; keep only one configuration file per document folder. Development and preview servers bind to localhost.
|
|
8
|
+
|
|
9
|
+
**Known issue:** The Windows browser check for cursor visibility after a reload (`NAV-010`) intermittently fails. The other browser checks and installed-package dev/preview checks pass; further cursor lifecycle investigation is deferred. See [Maintenance](https://for-humanity.fyi/maintenance/#known-windows-check-issue).
|
|
10
|
+
|
|
11
|
+
- Render page titles, metadata and resource tags with a request-local Unhead server instance; deduplicate links, preserve literal metadata text, and keep CSS and font loading in the initial HTML.
|
|
12
|
+
- Use Citty for CLI commands and help/version output, reject unsupported options and extra paths before running, and format build results and document warnings with Consola.
|
|
13
|
+
- Load source development CSS through HTML stylesheet links before the first paint; preserve CSS HMR and refresh the stylesheet list when files are added or removed.
|
|
14
|
+
- Mark the prebuilt Mermaid module URL as an intentional runtime import to avoid Vite development warnings while preserving lazy loading.
|
|
15
|
+
- Serve static previews through Vite with explicit site output paths, document 404s and preserved font cache headers; bind to localhost, reject missing builds and occupied ports, and remove the direct Hono Node server dependency.
|
|
16
|
+
- Share document preparation and Hono routes between static builds and a single Vite development server; replace custom file watching and SSE with Vite updates, preserve the last valid document snapshot, and support source TSX reloads and CSS HMR.
|
|
17
|
+
- Avoid an extra browser reload after the first successful development request; verify recovery from an invalid initial document and shutdown after a pending file change.
|
|
18
|
+
- Pre-optimize browser JSX runtimes to prevent missing development chunks, and retain the last mouse position when reloading after window focus is lost.
|
|
19
|
+
- Remove seven unused color and radius tokens and align the design reference with the active styles.
|
|
20
|
+
|
|
21
|
+
- Replace direct esbuild package and browser fixture builds with Vite 8 and shared typed build configuration; preserve synchronous browser initialization and Mermaid license notices.
|
|
22
|
+
- Raise the package minimum Node.js version to 22.12.0 and include Vite for the development and preview commands.
|
|
23
|
+
|
|
24
|
+
- Support `for-humanity.config.ts` and publish a documented `SiteConfig` input type and generated declarations; retain `.mjs` support and reject duplicate configuration files.
|
|
25
|
+
- Type-check build and maintenance tools, exclude repository tests from packages, and verify configuration types in an installed consumer project.
|
|
26
|
+
- Split CLI and navigation checks into isolated scenarios with Korean GIVEN/WHEN/THEN conventions and Playwright failure reports.
|
|
27
|
+
- Fix relative links from nested documents on Windows and clean up Mermaid load errors when their widget unmounts.
|
|
28
|
+
- Run repository tests with standalone Vitest and split Mermaid browser checks into isolated Playwright scenarios with failure traces.
|
|
29
|
+
|
|
30
|
+
- Replace the custom ASCII grid renderer with locally hosted Mermaid 12, loaded only on pages with diagrams, with official themes, system dark mode and isolated SVG styles.
|
|
31
|
+
- Support Mermaid's built-in diagram types, including Tree View, and add a diagram writing guide with flowchart, sequence, state, ER and tree examples.
|
|
32
|
+
- Keep readable diagram source when JavaScript is disabled or loading/rendering fails. Diagram syntax errors now appear in the browser instead of stopping the build.
|
|
33
|
+
|
|
5
34
|
## 0.12.0 — 2026-10-13
|
|
6
35
|
|
|
7
36
|
- Add a `[file name]` fence meta that draws a title bar with the file name and language above the code block, sharing the `bad`/`good` tone.
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Write Markdown. Keep the context. Share a static site.
|
|
|
12
12
|
|
|
13
13
|
[](https://github.com/minu-ha/for-humanity/blob/main/LICENSE)
|
|
14
14
|
[](https://www.npmjs.com/package/for-humanity)
|
|
15
|
-

|
|
15
|
+

|
|
16
16
|

|
|
17
17
|

|
|
18
18
|
|
|
@@ -24,16 +24,16 @@ Write Markdown. Keep the context. Share a static site.
|
|
|
24
24
|
|
|
25
25
|
- **Find your place.** Pages grouped by purpose, a reading order, a tree of contents and the current reading position.
|
|
26
26
|
- **Keep the detail.** Notes for context, native disclosures for implementation details, and links that open folded sections.
|
|
27
|
-
- **Show the connections.** Tables, highlighted code, Mermaid flowcharts, status badges and color swatches.
|
|
27
|
+
- **Show the connections.** Tables, highlighted code, official Mermaid diagrams including flowcharts, sequences and directory trees, status badges and color swatches.
|
|
28
28
|
- **Share the result.** Static HTML, self-hosted fonts and a small browser script. Browser interactions stay separate from Markdown rendering.
|
|
29
29
|
- **Read your way.** System-matched light and dark themes, keyboard navigation and a layout for narrow screens.
|
|
30
30
|
|
|
31
31
|
## Quick start
|
|
32
32
|
|
|
33
|
-
Node.js 22 or later and pnpm. Install the CLI in your document project:
|
|
33
|
+
Node.js 22.12.0 or later and pnpm. Install the CLI in your document project:
|
|
34
34
|
|
|
35
35
|
```sh
|
|
36
|
-
pnpm add -D --save-exact for-humanity@0.
|
|
36
|
+
pnpm add -D --save-exact for-humanity@0.13.0
|
|
37
37
|
mkdir docs
|
|
38
38
|
```
|
|
39
39
|
|
|
@@ -52,12 +52,14 @@ pnpm exec for-humanity preview docs
|
|
|
52
52
|
|
|
53
53
|
If your Markdown files are in the project root, use `.` instead of `docs`. The root `README.md` becomes the home page; root `AGENTS.md` and `CLAUDE.md` stay out of the site.
|
|
54
54
|
|
|
55
|
-
Version `0.
|
|
55
|
+
Version `0.13.0` supports `dev`, `build` and `preview`. `init` is planned; see the [Roadmap](https://github.com/minu-ha/for-humanity/blob/main/templates/document/roadmap.md) and [Changelog](https://github.com/minu-ha/for-humanity/blob/main/CHANGELOG.md).
|
|
56
56
|
Cloudflare Pages can host the generated site. See [Deployment](https://github.com/minu-ha/for-humanity/blob/main/templates/document/deployment.md) for the build settings.
|
|
57
57
|
Set an optional public root `url` in the site configuration to generate `robots.txt` and `sitemap.xml`; projects without a URL emit neither file. See [Crawling](https://github.com/minu-ha/for-humanity/blob/main/templates/document/crawling.md).
|
|
58
58
|
|
|
59
59
|
### Develop the kit
|
|
60
60
|
|
|
61
|
+
Version 0.13.0 requires Node.js 22.12.0 or later. Repository development uses one Vite server with Hono, source TSX reloads and CSS HMR.
|
|
62
|
+
|
|
61
63
|
To work on the CLI or read this library's guides and examples locally, run the project from source:
|
|
62
64
|
|
|
63
65
|
```sh
|
|
@@ -75,7 +77,7 @@ pnpm preview # Preview the static site
|
|
|
75
77
|
pnpm build:pages # Add Cloudflare Pages headers and a 404 page
|
|
76
78
|
```
|
|
77
79
|
|
|
78
|
-
Changes pushed to `main` update the documentation site. A stable version tag such as `v0.
|
|
80
|
+
Changes pushed to `main` update the documentation site. A stable version tag such as `v0.13.0` runs checks, publishes the package to npm, then creates a GitHub Release with the same package file.
|
|
79
81
|
The npm README updates with each package release. See [Maintenance](https://github.com/minu-ha/for-humanity/blob/main/templates/document/maintenance.md#packaging-and-release) for the release steps.
|
|
80
82
|
|
|
81
83
|
## Make it yours
|
|
@@ -83,16 +85,21 @@ The npm README updates with each package release. See [Maintenance](https://gith
|
|
|
83
85
|
A document folder is enough to get started. Without a site configuration, the sidebar shows **for humanity**. The pixel face appears in the browser tab, and follows the mouse on desktop when the site sets `cursorFace: true`.
|
|
84
86
|
The folder's `README.md` becomes the home page at `/`, with no frontmatter required. Click the site name to return home.
|
|
85
87
|
This repository generates [the documentation home](https://github.com/minu-ha/for-humanity/blob/main/templates/document/README.md) from its root README.md and [the site changelog](https://github.com/minu-ha/for-humanity/blob/main/templates/document/changelog.md) from CHANGELOG.md. Edit those source files, then run `pnpm sync:docs`; `pnpm dev` and `pnpm build` also sync them on startup.
|
|
86
|
-
Set your own name in `for-humanity.config.
|
|
88
|
+
Set your own name in `for-humanity.config.ts`, using the exported `SiteConfig` type for editor completion and static checking:
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
import type {SiteConfig} from "for-humanity";
|
|
87
92
|
|
|
88
|
-
```js
|
|
89
93
|
export default {
|
|
90
94
|
title: "Project notes",
|
|
91
95
|
description: "Decisions, working notes and the details behind them.",
|
|
92
96
|
navigation: ["Getting started", "Guide", "Reference", "Examples"],
|
|
93
|
-
};
|
|
97
|
+
} satisfies SiteConfig;
|
|
94
98
|
```
|
|
95
99
|
|
|
100
|
+
Existing `for-humanity.config.mjs` files remain supported. When migrating to TypeScript, replace the old file with the `.ts` file.
|
|
101
|
+
Use one configuration file per document folder. The CLI validates values at startup; run `tsc --noEmit` in your project for static type checking.
|
|
102
|
+
|
|
96
103
|
See [Commands](https://github.com/minu-ha/for-humanity/blob/main/templates/document/commands.md) for using another document folder, and [Settings](https://github.com/minu-ha/for-humanity/blob/main/templates/document/settings.md) for configuration.
|
|
97
104
|
Each document other than the root README chooses a `group` and optional `order`. Pages stay independent; groups do not need parent documents or nested folders. Document names may share the same first letter.
|
|
98
105
|
Use `group: Guide` for one group or `group: [Projects, Example project, Research]` for nested navigation. Group paths do not change document URLs.
|
package/dist/browser.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
"use strict";(()=>{var U=Symbol("RENDERER"),ee=Symbol("ERROR_HANDLER"),S=Symbol("STASH"),qe=Symbol("INTERNAL"),Xe=Symbol("MEMO"),_e=Symbol("PERMALINK");var wt=e=>(e[qe]=!0,e);var W={Stringify:1,BeforeStream:2,Stream:3},k=(e,t)=>{let n=new String(e);return n.isEscaped=!0,n.callbacks=t,n},zo=/[&<>'"]/,ve=async(e,t)=>{let n="";t||=[];let r=await Promise.all(e);for(let o=r.length-1;n+=r[o],o--,!(o<0);o--){let i=r[o];typeof i=="object"&&t.push(...i.callbacks||[]);let a=i.isEscaped;if(i=await(typeof i=="object"?i.toString():i),typeof i=="object"&&t.push(...i.callbacks||[]),i.isEscaped??a)n+=i;else{let c=[n];G(i,c),n=c[0]}}return k(n,t)},G=(e,t)=>{let n=e.search(zo);if(n===-1){t[0]+=e;return}let r,o,i=0;for(o=n;o<e.length;o++){switch(e.charCodeAt(o)){case 34:r=""";break;case 39:r="'";break;case 38:r="&";break;case 60:r="<";break;case 62:r=">";break;default:continue}t[0]+=e.substring(i,o)+r,i=o+1}t[0]+=e.substring(i,o)},$t=e=>{let t=e.callbacks;if(!t?.length)return e;let n=[e],r={};return t.forEach(o=>o({phase:W.Stringify,buffer:n,context:r})),n[0]},ke=async(e,t,n,r,o)=>{typeof e=="object"&&!(e instanceof String)&&(e instanceof Promise||(e=e.toString()),e instanceof Promise&&(e=await e));let i=e.callbacks;if(!i?.length)return Promise.resolve(e);o?o[0]+=e:o=[e];let a=Promise.all(i.map(c=>c({phase:t,buffer:o,context:r}))).then(c=>Promise.all(c.filter(Boolean).map(f=>ke(f,t,!1,r,o))).then(()=>o[0]));return n?k(await a,i):a};var ye={title:[],script:["src"],style:["data-href"],link:["href"],meta:["name","httpEquiv","charset","itemProp"]},Ee={},Ze="data-precedence",Je=e=>e.rel==="stylesheet"&&"precedence"in e,Ye=(e,t)=>e==="link"?t:ye[e].length>0;var xn=Object.defineProperty,Qe=(e,t)=>{let n={};for(var r in e)xn(n,r,{get:e[r],enumerable:!0});return t||xn(n,Symbol.toStringTag,{value:"Module"}),n};var ue=e=>Array.isArray(e)?e:[e];var et=Qe({button:()=>To,form:()=>Ao,input:()=>Mo,link:()=>Po,meta:()=>Co,script:()=>Eo,style:()=>Zo,title:()=>ko}),bn=new WeakMap,wn=(e,t,n,r)=>({buffer:o,context:i})=>{if(!o)return;let a=bn.get(i)||{};bn.set(i,a);let c=a[e]||=[],f=!1,u=ye[e],p=Ye(e,r!==void 0);if(p){e:for(let[,s]of c)if(!(e==="link"&&!(s.rel==="stylesheet"&&s["data-precedence"]!==void 0))){for(let l of u)if((s?.[l]??null)===n?.[l]){f=!0;break e}}}if(f?o[0]=o[0].replaceAll(t,""):p||e==="link"?c.push([t,n,r]):c.unshift([t,n,r]),o[0].indexOf("</head>")!==-1){let s;if(e==="link"||r!==void 0){let l=[];s=c.map(([d,,m],h)=>{if(m===void 0)return[d,Number.MAX_SAFE_INTEGER,h];let _=l.indexOf(m);return _===-1&&(l.push(m),_=l.length-1),[d,_,h]}).sort((d,m)=>d[1]-m[1]||d[2]-m[2]).map(([d])=>d)}else s=c.map(([l])=>l);s.forEach(l=>{o[0]=o[0].replaceAll(l,"")}),o[0]=o[0].replace(/(?=<\/head>)/,()=>s.join(""))}},Pe=(e,t,n)=>F([new N(e,n,ue(t??[]))]),Ce=(e,t,n,r)=>{if("itemProp"in n)return Pe(e,t,n);let{precedence:o,blocking:i,...a}=n;o=r?o??"":void 0,r&&(a[Ze]=o);let c=new N(e,a,ue(t||[])).toString();return c instanceof Promise?c.then(f=>k(f,[...f.callbacks||[],wn(e,f,a,o)])):k(c,[wn(e,c,a,o)])},ko=({children:e,...t})=>{let n=tt();if(n){let r=M(n);if(r==="svg"||r==="head")return new N("title",t,ue(e??[]))}return Ce("title",e,t,!1)},Eo=({children:e,...t})=>{let n=tt();return["src","async"].some(r=>!t[r])||n&&M(n)==="head"?Pe("script",e,t):Ce("script",e,t,!1)},Zo=({children:e,...t})=>["href","precedence"].every(n=>n in t)?(t["data-href"]=t.href,delete t.href,Ce("style",e,t,!0)):Pe("style",e,t),Po=({children:e,...t})=>["onLoad","onError"].some(n=>n in t)||t.rel==="stylesheet"&&(!("precedence"in t)||"disabled"in t)?Pe("link",e,t):Ce("link",e,t,Je(t)),Co=({children:e,...t})=>{let n=tt();return n&&M(n)==="head"?Pe("meta",e,t):Ce("meta",e,t,!1)},$n=(e,{children:t,...n})=>new N(e,n,ue(t??[])),Ao=e=>(typeof e.action=="function"&&(e.action=_e in e.action?e.action[_e]:void 0),$n("form",e)),Sn=(e,t)=>(typeof t.formAction=="function"&&(t.formAction=_e in t.formAction?t.formAction[_e]:void 0),$n(e,t)),Mo=e=>Sn("input",e),To=e=>Sn("button",e);var No=new Map([["className","class"],["htmlFor","for"],["crossOrigin","crossorigin"],["httpEquiv","http-equiv"],["itemProp","itemprop"],["fetchPriority","fetchpriority"],["noModule","nomodule"],["formAction","formaction"]]),xe=e=>No.get(e)||e,Ro=/[\s"'<>/=`\\\x00-\x1f\x7f-\x9f]/,St=new Set,zn=1024,Oo=/^[!?]|[\s"'<>/=`\\\x00-\x1f\x7f-\x9f]/,kn=new Set,Io=256,Ae=(e,t,n)=>{e.size>=t&&e.clear(),e.add(n)},Zn=e=>kn.has(e)?!0:typeof e!="string"?!1:e.length===0?!0:Oo.test(e)?!1:(Ae(kn,Io,e),!0),kt=e=>{if(St.has(e))return!0;let t=e.length;if(t===0)return!1;for(let n=0;n<t;n++){let r=e.charCodeAt(n);if(!(r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||r===45||r===95||r===46||r===58))return Ro.test(e)?!1:(Ae(St,zn,e),!0)}return Ae(St,zn,e),!0},Lo=/[\s"'():;\\/\[\]{}\x00-\x1f\x7f-\x9f]/,zt=new Set,En=1024,Do=e=>{if(zt.has(e))return!0;let t=e.length;if(t===0)return!1;for(let n=0;n<t;n++){let r=e.charCodeAt(n);if(!(r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||r===45||r===95))return Lo.test(e)?!1:(Ae(zt,En,e),!0)}return Ae(zt,En,e),!0},jo=/[;"'\\/\[\](){}]/,Fo=e=>{if(!jo.test(e))return!1;let t=0,n=[];for(let r=0,o=e.length;r<o;r++){let i=e.charCodeAt(r);if(i===92){if(r===o-1)return!0;r++}else if(t!==0){if(i===10||i===12||i===13)return!0;i===t&&(t=0)}else if(i===47&&e.charCodeAt(r+1)===42){let a=e.indexOf("*/",r+2);if(a===-1)return!0;r=a+1}else if(i===34||i===39)t=i;else if(i===40)n.push(41);else if(i===91)n.push(93);else{if(i===123||i===125)return!0;if(i===41||i===93){if(n[n.length-1]!==i)return!0;n.pop()}else if(i===59&&n.length===0)return!0}}return t!==0||n.length!==0},Me=(e,t)=>{for(let[n,r]of Object.entries(e)){let o=n[0]==="-"||!/[A-Z]/.test(n)?n:n.replace(/[A-Z]/g,a=>`-${a.toLowerCase()}`);if(!Do(o))continue;if(r==null){t(o,null);continue}let i;if(typeof r=="number")i=o.match(/^(?:a|border-im|column(?:-c|s)|flex(?:$|-[^b])|grid-(?!.*gap)(?:ar|[^a])|font-w|li|or|sca|st|ta|wido|z)|ty$/)?`${r}`:`${r}px`;else if(typeof r=="string"){if(Fo(r))continue;i=r}else continue;t(o,i)}};var Te,tt=()=>Te,Bo=e=>/[A-Z]/.test(e)&&e.match(/^(?:al|basel|clip(?:Path|Rule)$|co|do|fill|fl|fo|gl|let|lig|i|marker[EMS]|o|pai|pointe|sh|st[or]|text[^L]|tr|u|ve|w)/)?e.replace(/([A-Z])/g,"-$1").toLowerCase():e,Uo=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ho=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],Pn=(e,t)=>e.then(n=>{if(typeof n!="string"&&!Array.isArray(n)&&!(n instanceof N))return n;let r=Array.isArray(n)?n:[n],o=()=>{let i=[""];return be(r,i),i.length===1?k(i[0],i.callbacks):ve(i,i.callbacks)};return t?t(o):Re(o)}),be=(e,t)=>{for(let n=0,r=e.length;n<r;n++){let o=e[n];if(typeof o=="string")G(o,t);else{if(typeof o=="boolean"||o===null||o===void 0)continue;if(o instanceof N)o.toStringToBuffer(t);else if(typeof o=="number")t[0]+=o;else if(o.isEscaped){t[0]+=o;let i=o.callbacks;i&&(t.callbacks||=[],t.callbacks.push(...i))}else o instanceof Promise?t.unshift("",o):be(o,t)}}},F=e=>Re(()=>{let t=[""];return be(e,t),t.length===1?k(t[0],t.callbacks):ve(t,t.callbacks)}),te=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof N)&&!(e instanceof Promise)&&!e.isEscaped&&typeof e.toString=="function",ne=e=>{let t=e.toString(),n=r=>F([String(r)]);return t instanceof Promise?t.then(n):n(t)},N=class{tag;props;key;children;isEscaped=!0;constructor(e,t,n){if(typeof e!="function"&&!Zn(e))throw new Error(`Invalid JSX tag name: ${e}`);this.tag=e,this.props=t,this.children=n}get type(){return this.tag}get ref(){return this.props.ref||null}toString(){return Re(()=>{let t=[""];return this.toStringToBuffer(t),t.length===1?"callbacks"in t?$t(k(t[0],t.callbacks)).toString():t[0]:ve(t,t.callbacks)})}toStringToBuffer(e){let t=this.tag,n=this.props,{children:r}=this;e[0]+=`<${t}`;let o=t==="svg"||Te&&M(Te)==="svg"?i=>Bo(xe(i)):i=>xe(i);for(let[i,a]of Object.entries(n))if(i=o(i),!!kt(i)&&i!=="children"){if(i==="style"&&typeof a=="object"){let c="";Me(a,(f,u)=>{u!=null&&(c+=`${c?";":""}${f}:${u}`)}),e[0]+=' style="',G(c,e),e[0]+='"'}else if(typeof a=="string")e[0]+=` ${i}="`,G(a,e),e[0]+='"';else if(a!=null)if(typeof a=="number"||a.isEscaped)e[0]+=` ${i}="${a}"`;else if(typeof a=="boolean"&&Ho.includes(i))a&&(e[0]+=` ${i}=""`);else if(i==="dangerouslySetInnerHTML"){if(r.length>0)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");r=[k(a.__html)]}else if(a instanceof Promise)e[0]+=` ${i}="`,e.unshift('"',a);else if(typeof a=="function"){if(!i.startsWith("on")&&i!=="ref")throw new Error(`Invalid prop '${i}' of type 'function' supplied to '${t}'.`)}else e[0]+=` ${i}="`,G(a.toString(),e),e[0]+='"'}if(Uo.includes(t)&&r.length===0){e[0]+="/>";return}e[0]+=">",be(r,e),e[0]+=`</${t}>`}},Et=class extends N{toStringToBuffer(e){let{children:t}=this,n={...this.props};t.length&&(n.children=t.length===1?t[0]:t);let r=this.tag.call(null,n);typeof r=="boolean"||r==null||(r instanceof Promise?H.length===0?e.unshift("",Pn(r)):e.unshift("",Pn(r,le())):r instanceof N?r.toStringToBuffer(e):Array.isArray(r)?be(r,e):typeof r=="number"||r.isEscaped?(e[0]+=r,r.callbacks&&(e.callbacks||=[],e.callbacks.push(...r.callbacks))):G(r,e))}},Zt=class extends N{toStringToBuffer(e){be(this.children,e)}},Pt=(e,t,...n)=>{t??={},n.length&&(t.children=n.length===1?n[0]:n);let r=t.key;delete t.key;let o=Ne(e,t,n);return o.key=r,o},Cn=!1,Ne=(e,t,n)=>{if(!Cn){for(let r in Ee)et[r][U]=Ee[r];Cn=!0}return typeof e=="function"?new Et(e,t,n):et[e]?new Et(et[e],t,n):e==="svg"||e==="head"?(Te||=Oe(""),new N(e,t,[new Et(Te,{value:e},n)])):new N(e,t,n)};var R=({children:e})=>new Zt("",{children:e},Array.isArray(e)?e:e?[e]:[]);var H=[],An=!1,Ct,At,Mt=0,Tt=!1,Mn=()=>{if(An)return Ct;An=!0;let e=globalThis,t;for(let n of[()=>e.process?.getBuiltinModule?.("node:async_hooks")?.AsyncLocalStorage,()=>e.process?.mainModule?.require?.("node:async_hooks")?.AsyncLocalStorage]){try{t=n()}catch{}if(t)break}return t&&(Ct=new t),Ct},Ie=()=>Mn()?.getStore()||At,Tn=()=>{Mt>0&&!Tt&&(Tt=!0,console.warn("hono/jsx: AsyncLocalStorage is unavailable in this runtime, so useContext() after an await in an async component falls back to the context default value during server-side rendering. To get provided values across await boundaries, use a runtime with AsyncLocalStorage (Node.js >= 20.16, Deno, Bun, or Cloudflare Workers with the nodejs_compat flag)."))},Nn=(e,t)=>{if(!e)return Tn(),t.values;let n=e.get(t);return n||(n=[t.values[0]],e.set(t,n)),n},Rn=(e,t)=>{if(!e)return Tn(),t.values.at(-1);let n=e.get(t);return n?.length?n.at(-1):t.values[0]},Vo=e=>(e?H.filter(t=>e.has(t)):H).map(t=>[t,Rn(e,t)]),Ko=(e,t,n)=>Re(()=>{let r=Ie(),o=n.map(([a,c])=>{let f=Nn(r,a);return f.push(c),f}),i=()=>{o.forEach(a=>{a.pop()})};try{let a=e();return a instanceof Promise?a.finally(i):(i(),a)}catch(a){throw i(),a}},t),Re=(e,t)=>{if(Ie())return e();let n=t??new WeakMap,r=Mn();if(r)return r.run(n,e);At=n;let o;try{o=e()}finally{At=void 0}return!Tt&&o instanceof Promise&&(Mt++,o=o.finally(()=>{Mt--})),o},le=()=>{let e=Ie(),t=Vo(e);return n=>Ko(n,e,t)},Oe=e=>{let t=[e],n=(r=>{let o=Nn(Ie(),n);o.push(r.value);let i;try{i=typeof r.children=="string"?F([r.children]):te(r.children)?ne(r.children):r.children?(Array.isArray(r.children)?new Zt("",{},r.children):r.children).toString():k("")}catch(a){throw o.pop(),a}return i instanceof Promise?i.finally(()=>o.pop()).then(a=>k(a,a.callbacks)):(o.pop(),k(i))});return n.values=t,n.Provider=n,n[U]=Nt(t),H.push(n),n},M=e=>Rn(Ie(),e);var Nt=e=>({value:t,children:n})=>{if(!n)return;let r={children:[{tag:wt(()=>{e.push(t)}),props:{}}]};Array.isArray(n)?r.children.push(...n.flat()):r.children.push(n),r.children.push({tag:wt(()=>{e.pop()}),props:{}});let o={tag:"",props:r,type:""};return o[ee]=i=>{throw e.pop(),i},o},Le=e=>{let t=[e],n=Nt(t);return n.values=t,n.Provider=n,H.push(n),n};var Wo=0;var Go=2,qo=3,Xo=4,Rt=new WeakMap,Ot=(e,t)=>!e||!t||e.length!==t.length||t.some((n,r)=>n!==e[r]);var Jo;var On=[];var O=e=>{let t=()=>typeof e=="function"?e():e,n=D.at(-1);if(!n)return[t(),()=>{}];let[,r]=n,o=r[S][1][Wo]||=[],i=r[S][0]++;return o[i]||=[t(),a=>{let c=Jo,f=o[i];if(typeof a=="function"&&(a=a(f[0])),!Object.is(a,f[0]))if(f[0]=a,On.length){let[u,p]=On.at(-1);Promise.all([u===3?r:De([u,!1,c],r),p]).then(([s])=>{if(!s||!(u===2||u===3))return;let l=s.vC;requestAnimationFrame(()=>{setTimeout(()=>{l===s.vC&&De([u===3?1:0,!1,c],s)})})})}else De([0,!1,c],r)}]};var In=(e,t,n)=>{let r=D.at(-1);if(!r)return;let[,o]=r,i=o[S][1][1]||=[],a=o[S][0]++,[c,,f]=i[a]||=[];if(Ot(c,n)){f&&f();let u=()=>{p[e]=void 0,p[2]=t()},p=[n,void 0,void 0,void 0,void 0];p[e]=u,i[a]=p}},nt=(e,t)=>In(3,e,t),I=(e,t)=>In(1,e,t);var fe=(e,t)=>{let n=D.at(-1);if(!n)return e;let[,r]=n,o=r[S][1][Go]||=[],i=r[S][0]++,a=o[i];return Ot(a?.[1],t)?o[i]=[e,t]:e=o[i][0],e};function E(e){let t=D.at(-1);if(!t)return{current:e};let[,n]=t,r=n[S][1][Xo]||=[],o=n[S][0]++;return r[o]||={current:e}}var rt=e=>{let t=Rt.get(e);if(t){if(t.length===2)throw t[1];return t[0]}throw e.then(n=>Rt.set(e,[n]),n=>Rt.set(e,[void 0,n])),e},ot=(e,t)=>{let n=D.at(-1);if(!n)return e();let[,r]=n,o=r[S][1][qo]||=[],i=r[S][0]++,a=o[i];return Ot(a?.[1],t)&&(o[i]=[e(),t]),o[i][0]};var Fe="_hp",Yo={Change:"Input",DoubleClick:"DblClick"},Qo={svg:"2000/svg",math:"1998/Math/MathML"},D=[],je=new WeakMap,we,Hn=()=>we,T=e=>"t"in e,It={onClick:["click",!1]},Ln=e=>{if(!e.startsWith("on"))return;if(It[e])return It[e];let t=e.match(/^on([A-Z][a-zA-Z]+?(?:PointerCapture)?)(Capture)?$/);if(t){let[,n,r]=t;return It[e]=[(Yo[n]||n).toLowerCase(),!!r]}},Dn=(e,t)=>we&&e instanceof SVGElement&&/[A-Z]/.test(t)&&(t in e.style||t.match(/^(?:o|pai|str|u|ve)/))?t.replace(/([A-Z])/g,"-$1").toLowerCase():t,Vn=e=>e==null||e===!1?null:e,ei=(e,t)=>{"value"in t&&(e.value=Vn(t.value),!e.multiple&&e.selectedIndex===-1&&(e.selectedIndex=0))},jn=e=>e instanceof DOMException&&e.name==="InvalidCharacterError",ti=(e,t,n)=>{t||={};for(let r in t){let o=t[r];if(r!=="children"&&(!n||n[r]!==o)){r=xe(r);let i=Ln(r);if(i){if(n?.[r]!==o&&(n&&e.removeEventListener(i[0],n[r],i[1]),o!=null)){if(typeof o!="function")throw new Error(`Event handler for "${r}" is not a function`);e.addEventListener(i[0],o,i[1])}}else if(r==="dangerouslySetInnerHTML"&&o)e.innerHTML=o.__html;else if(r==="ref"){je.get(e)?.();let a;typeof o=="function"?a=o(e)||(()=>o(null)):o&&"current"in o&&(o.current=e,a=()=>o.current=null),je.set(e,a)}else if(r==="style"){let a=e.style;typeof o=="string"?a.cssText=o:(a.cssText="",o!=null&&Me(o,a.setProperty.bind(a)))}else{if(r==="value"){let c=e.nodeName;if(c==="SELECT")continue;if((c==="INPUT"||c==="TEXTAREA")&&(e.value=Vn(o),c==="TEXTAREA")){e.textContent=o;continue}}else(r==="checked"&&e.nodeName==="INPUT"||r==="selected"&&e.nodeName==="OPTION")&&(e[r]=o);let a=Dn(e,r);try{o==null||o===!1?e.removeAttribute(a):o===!0?e.setAttribute(a,""):typeof o=="string"||typeof o=="number"?e.setAttribute(a,o):e.setAttribute(a,o.toString())}catch(c){if(!jn(c))throw c}}}}if(n)for(let r in n){let o=n[r];if(r!=="children"&&!(r in t)){r=xe(r);let i=Ln(r);if(i)e.removeEventListener(i[0],o,i[1]);else if(r==="ref")je.get(e)?.(),je.delete(e);else try{e.removeAttribute(Dn(e,r))}catch(a){if(!jn(a))throw a}}}},ni=(e,t)=>{t[S][0]=0,D.push([e,t]);let n=t.tag[U]||t.tag,r=n.defaultProps?{...n.defaultProps,...t.props}:t.props;try{return[n.call(null,r)]}finally{D.pop()}},Kn=(e,t,n,r,o)=>{e.vR?.length&&(r.push(...e.vR),delete e.vR),typeof e.tag=="function"&&e[S][1][1]?.forEach(i=>o.push(i)),e.vC.forEach(i=>{if(T(i))n.push(i);else if(typeof i.tag=="function"||i.tag===""){i.c=t;let a=n.length;if(Kn(i,t,n,r,o),i.s){for(let c=a;c<n.length;c++)n[c].s=!0;i.s=!1}}else n.push(i),i.vR?.length&&(r.push(...i.vR),delete i.vR)})},ri=e=>{for(;e&&(e.tag===Fe||!e.e);)e=e.tag===Fe||!e.vC?.[0]?e.nN:e.vC[0];return e?.e},Wn=e=>{T(e)||(e[S]?.[1][1]?.forEach(t=>t[2]?.()),je.get(e.e)?.(),e.p===2&&e.vC?.forEach(t=>t.p=2),e.vC?.forEach(Wn)),e.p||(e.e?.remove(),delete e.e),typeof e.tag=="function"&&(pe.delete(e),it.delete(e),delete e[S][3],e.a=!0)},Lt=(e,t,n)=>{e.c=t,Gn(e,t,n)},Fn=(e,t)=>{if(t){for(let n=0,r=e.length;n<r;n++)if(e[n]===t)return n}},Bn=Symbol(),Gn=(e,t,n)=>{let r=[],o=[],i=[];Kn(e,t,r,o,i),o.forEach(Wn);let a=n?void 0:t.childNodes,c,f=null;if(n)c=-1;else if(!a.length)c=0;else{let u=Fn(a,ri(e.nN));u!==void 0?(f=a[u],c=u):c=Fn(a,r.find(p=>p.tag!==Fe&&p.e)?.e)??-1,c===-1&&(n=!0)}for(let u=0,p=r.length;u<p;u++,c++){let s=r[u],l;if(s.s&&s.e)l=s.e,s.s=!1;else{let d=n||!s.e;T(s)?(s.e&&s.d&&(s.e.textContent=s.t),s.d=!1,l=s.e||=document.createTextNode(s.t)):(l=s.e||=s.n?document.createElementNS(s.n,s.tag):document.createElement(s.tag),ti(l,s.props,s.pP),Gn(s,l,d),s.tag==="select"&&ei(l,s.props))}s.tag===Fe?c--:n?l.parentNode||t.appendChild(l):a[c]!==l&&a[c-1]!==l&&(a[c+1]===l?t.appendChild(a[c]):t.insertBefore(l,f||a[c]||null))}if(e.pP&&(e.pP=void 0),i.length){let u=[],p=[];i.forEach(([,s,,l,d])=>{s&&u.push(s),l&&p.push(l),d?.()}),u.forEach(s=>s()),p.length&&requestAnimationFrame(()=>{p.forEach(s=>s())})}},oi=(e,t)=>!!(e&&e.length===t.length&&e.every((n,r)=>n[1]===t[r][1])),ii=e=>{let t=new Map;for(let n of e){let r=n.key;if(t.has(r))return;t.set(r,n)}return t},it=new WeakMap,st=(e,t,n)=>{let r=!n&&t.pC;n&&(t.pC||=t.vC);let o;try{n||=typeof t.tag=="function"?ni(e,t):ue(t.props.children),n[0]?.tag===""&&n[0][ee]&&(o=n[0][ee],e[5].push([e,o,t]));let i=r?[...t.pC]:t.vC?[...t.vC]:void 0,a=[],c,f=(i?.length||0)*2,u;for(let p=0;p<n.length;p++){if(Array.isArray(n[p])){n.splice(p,1,...n[p].flat(1/0)),p--;continue}let s=Dt(n[p]);if(s){typeof s.tag=="function"&&!s.tag[qe]&&(H.length>0&&(s[S][2]=H.map(d=>[d,d.values.at(-1)])),e[5]?.length&&(s[S][3]=e[5].at(-1)));let l;if(u&&s.key===void 0&&!T(s)&&(i=[...u.values()],u=void 0),u){let d=s.key,m=u.get(d);m&&(T(s)?T(m):m.tag===s.tag&&m.key===d)&&(l=m,u.delete(d))}else if(i&&i.length){let d=i[0];if(T(s)?T(d):!T(d)&&(s.key!==void 0?d.key===s.key&&d.tag===s.tag:d.tag===s.tag))l=i.shift();else{let m=i.findIndex(T(s)?h=>T(h):s.key!==void 0?h=>h.key===s.key&&h.tag===s.tag:h=>h.tag===s.tag);f-=m===-1?i.length:m,m!==-1&&(l=i[m],i.splice(m,1)),f<0&&(f=1/0,u=ii(i))}}if(l)if(T(s))l.t!==s.t&&(l.t=s.t,l.d=!0),s=l;else{let d=l.pP=l.props;if(l.props=s.props,l.f||=s.f||t.f,typeof s.tag=="function"){let m=l[S][2];l[S][2]=s[S][2]||[],l[S][3]=s[S][3],!l.f&&((l.o||l)===s.o||l.tag[Xe]?.(d,l.props))&&oi(m,l[S][2])&&(l.s=!0)}s=l}else if(!T(s)&&we){let d=M(we);d&&(s.n=d)}if(!T(s)&&!s.s&&(st(e,s),delete s.f),a.push(s),c&&!c.s&&!s.s)for(let d=c;d&&!T(d);d=d.vC?.at(-1))d.nN=s;c=s}}i=u?[...u.values()]:i,t.vR=r?[...t.vC,...i||[]]:i||[],t.vC=a,r&&delete t.pC}catch(i){if(t.f=!0,i===Bn){if(o)return;throw i}let[a,c,f]=t[S]?.[3]||[];if(c){let u=()=>De([0,!1,e[2]],f),p=it.get(f)||[];p.push(u),it.set(f,p);let s=c(i,()=>{let l=it.get(f);if(l){let d=l.indexOf(u);if(d!==-1)return l.splice(d,1),u()}});if(s){if(e[0]===1)e[1]=!0;else if(st(e,f,[s]),(c.length===1||e!==a)&&f.c){Lt(f,f.c,!1);return}throw Bn}}throw i}finally{o&&e[5].pop()}},Dt=e=>{if(!(e==null||typeof e=="boolean")){if(typeof e=="string"||typeof e=="number")return{t:e.toString(),d:!0};if("vR"in e&&(e={tag:e.tag,props:e.props,key:e.key,f:e.f,type:e.tag,ref:e.props.ref,o:e.o||e}),typeof e.tag=="function")e[S]=[0,[]];else{let t=Qo[e.tag];t&&(we||=Le(""),e.props.children=[{tag:we,props:{value:e.n=`http://www.w3.org/${t}`,children:e.props.children}}])}return e}},qn=(e,t,n)=>{e.c===t&&(e.c=n,e.vC.forEach(r=>qn(r,t,n)))},Un=(e,t)=>{t[S][2]?.forEach(([n,r])=>{n.values.push(r)});try{st(e,t,void 0)}catch{return}if(t.a){delete t.a;return}t[S][2]?.forEach(([n])=>{n.values.pop()}),(e[0]!==1||!e[1])&&Lt(t,t.c,!1)},pe=new WeakMap,ct=[],De=async(e,t)=>{e[5]||=[];let n=pe.get(t);n&&n[0](void 0);let r,o=new Promise(i=>r=i);if(pe.set(t,[r,()=>{e[2]?e[2](e,t,i=>{Un(i,t)}).then(()=>r(t)):(Un(e,t),r(t))}]),ct.length)ct.at(-1).add(t);else{await Promise.resolve();let i=pe.get(t);i&&(pe.delete(t),i[1]())}return o},Xn=(e,t)=>{let n=[];n[5]=[],n[4]=!0,st(n,e,void 0),n[4]=!1;let r=document.createDocumentFragment();Lt(e,r,!0),qn(e,r,t),t.replaceChildren(r)};var at=e=>{let t=new Set;ct.push(t),e(),t.forEach(n=>{let r=pe.get(n);r&&(pe.delete(n),r[1]())}),ct.pop()},jt=(e,t,n)=>({tag:Fe,props:{children:e},key:n,e:t,p:1});var Jn=(e,t={})=>{let n;return Object.keys(t).length>0&&console.warn("createRoot options are not supported yet"),{render(r){if(n===null)throw new Error("Cannot update an unmounted root");n?n(r):Xn(Dt({tag:()=>{let[o,i]=O(r);return n=i,o},props:{}}),e)},unmount(){n?.(null),n=null}}};function Qn(e,t){return typeof t=="bigint"?t.toString():t}var Bt=class{constructor(t){this._getter=t,this._value=void 0}get value(){let t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}};function er(e){return new Bt(e)}function tr(e){return e==null}function nr(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}var Yn=Symbol("evaluating");function rr(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Yn)return r===void 0&&(r=Yn,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function or(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}var Ut="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ir(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ut(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function oe(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function sr(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}function ie(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function cr(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function lt(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Be(e){return typeof e=="string"?e:e?.message}function Ht(e,t,n){var r;for(let o=t;o<e.length;o++)(r=e[o]).schema??(r.schema=n)}function $e(e,t,n){var r;let o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:Be(e.inst?._zod.def?.error?.(e))??Be(i?.(e))??Be(t?.error?.(e))??Be(n.customError?.(e))??Be(n.localeError?.(e))??"Invalid input",c={};for(let f of Object.keys(e))f==="inst"||f==="schema"||f==="continue"||f==="input"||f==="__proto__"||(c[f]=e[f]);return c.path??(c.path=[]),c.message=a,t?.reportInput&&(c.input=e.input),c}var si=/[\uD800-\uDBFF]/;function ar(e){let t=e.length;if(!si.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function ur(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function lr(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):ci(e,n,r.value)}}function de(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Vt(e,t,n){return de(e,t,n,!1)}function ci(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:de(this,t,n.bind(this))},set(r){de(this,t,r)}})}function ai(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Ft,re=!1,ui={configurable:!0,get(){re=!0}};function q(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Ft!==e._zod){Ft=void 0;return}Ft=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,ui);let o=re;re=!1;try{let i=n(this);return re?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),re=re||o,i}catch(i){throw delete this[t],re=re||o,i}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function fr(e,t,n,r){let o=ai(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){let i={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,i),i.value=n(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:i})}})}var pr;var Kt={value:void 0,enumerable:!1},dr="captureStackTrace"in Error?Error:null;function li(e){let t=dr;if(t){let n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return dr=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function C(e,t,n,r){let o={};function i(l){this.def=l,this.constr=s,this.traits=new Set}i.prototype=o;let a=n,c=a&&new WeakSet;function f(l,d){if(l._zod){if(l._zod.traits.has(e))return}else{Kt.value=new i(d);try{Object.defineProperty(l,"_zod",Kt)}finally{Kt.value=void 0}}if(l._zod.traits.add(e),t(l,d),c){let h=Object.getPrototypeOf(l),_=l._zod.constr.prototype,z=h;for(;z&&z!==_;)z=Object.getPrototypeOf(z);let w=z??h;c.has(w)||(c.add(w),lr(w,a))}let m=s.prototype;for(let h in m)Object.prototype.hasOwnProperty.call(m,h)&&(h in l||(l[h]=m[h].bind(l)))}let u=r?.Parent??Object;class p extends u{}Object.defineProperty(p,"name",{value:e});function s(l){let d=r?.Parent?li(p):this;f(d,l);let m=d._zod.deferred;if(m){for(let _ of m)_();d._zod.deferred=void 0}let h=globalThis.__zod_globalConfig?.postProcessor;return h&&h(d),d}return Object.defineProperty(s,"init",{value:f}),Object.defineProperty(s,Symbol.hasInstance,{value:l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var X=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};(pr=globalThis).__zod_globalConfig??(pr.__zod_globalConfig={});var Ue=globalThis.__zod_globalConfig;function Se(e){return e&&Object.assign(Ue,e),Ue}function fi(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Qn,2)),e.message}function pi(e){this._zod.message=e}var di={get:fi,set:pi,enumerable:!0,configurable:!0},Gt={value:void 0,enumerable:!1},mr=new WeakSet([Object.prototype,Error.prototype]),hr=(e,t)=>{e.name="$ZodError",Gt.value=t,Object.defineProperty(e,"issues",Gt),Gt.value=void 0,Object.defineProperty(e,"message",di);let n=Object.getPrototypeOf(e);mr.has(n)||(mr.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},cc=C("$ZodError",hr),He=C("$ZodError",hr,void 0,{Parent:Error});var hi=e=>{let t=(n,r,o,i)=>{let a=o?{...o,async:!1}:{async:!1},c=n._zod.run({value:r,issues:[]},a);if(c instanceof Promise)throw new X;if(c.issues.length){let f=new(i?.Err??e)(c.issues.map(u=>$e(u,a,Se())));throw Ut(f,i?.callee??t),f}return c.value};return t},qt=hi(He),gi=e=>{let t=async(n,r,o,i)=>{let a=o?{...o,async:!0}:{async:!0},c=n._zod.run({value:r,issues:[]},a);if(c instanceof Promise&&(c=await c),c.issues.length){let f=new(i?.Err??e)(c.issues.map(u=>$e(u,a,Se())));throw Ut(f,i?.callee??t),f}return c.value};return t},Xt=gi(He),_i=e=>(t,n,r)=>{let o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new X;return i.issues.length?gr(e,i.issues,o):{success:!0,data:i.value}},Jt=_i(He);function gr(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(o=>$e(o,n,Se()))),t=void 0,n=void 0),r},set error(o){r=o,t=void 0,n=void 0}}}var vi=e=>async(t,n,r)=>{let o=r?{...r,async:!0}:{async:!0},i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?gr(e,i.issues,o):{success:!0,data:i.value}},Yt=vi(He);var _r=/^[\s\S]{0,}$/;var vr=/^-?\d+(?:\.\d+)?$/,yr=/^(?:true|false)$/i;var Qt=C("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])});var xi=e=>{let t=e.value;return!tr(t)&&t.length!==void 0};var br=C("$ZodCheckMinLength",(e,t)=>{var n;Qt.init(e,t),(n=e._zod.def).when??(n.when=xi),e._zod.check=r=>{let o=r.value,i=o.length;if((typeof o=="string"&&i>=t.minimum&&i<t.minimum*2?ar(o):i)>=t.minimum)return;let c=ur(o);r.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}});var wr={major:4,minor:6,patch:5};var J=C("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=wr;let r=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r?.length?[...r]:[];for(let i of o)for(let a of i._zod.onattach)a(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=(c,f,u)=>{if(c.memo)return c;let p=ie(c),s;for(let l of f){if(l._zod.def.when){if(cr(c)||!l._zod.def.when(c))continue}else if(p)continue;let d=c.issues.length,m=l._zod.check(c);if(m instanceof Promise&&u?.async===!1)throw new X;if(s||m instanceof Promise)s=(s??Promise.resolve()).then(async()=>{await m,c.issues.length!==d&&(Ht(c.issues,d,e),p||(p=ie(c,d)))});else{if(c.issues.length===d)continue;Ht(c.issues,d,e),p||(p=ie(c,d))}}return s?s.then(()=>c):c},a=(c,f,u)=>{if(ie(c))return c.aborted=!0,c;let p=i(f,o,u);if(p instanceof Promise){if(u.async===!1)throw new X;return p.then(s=>e._zod.parse(s,u))}return e._zod.parse(p,u)};e._zod.run=(c,f)=>{if(f.skipChecks)return e._zod.parse(c,f);if(f.direction==="backward"){let p=e._zod.parse({value:c.value,issues:[]},{...f,skipChecks:!0});return p instanceof Promise?p.then(s=>a(s,c,f)):a(p,c,f)}let u=e._zod.parse(c,f);if(u instanceof Promise){if(f.async===!1)throw new X;return u.then(p=>i(p,o,f))}return i(u,o,f)}}},{get"~standard"(){return Vt(this,"~standard",Si(this))},set"~standard"(e){de(this,"~standard",e)}}),zr=(e,t)=>e.issues.length?{issues:e.issues.map(n=>$e(n,t,Se()))}:{value:e.value};async function $i(e,t){let n={async:!0};return zr(await e._zod.run({value:t,issues:[]},n),n)}function Si(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return zr(r,n)}catch{}return $i(e,t)},vendor:"zod",version:1}}var kr=C("$ZodString",(e,t)=>{J.init(e,t),e._zod.pattern=t.pattern??_r,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}});var Er=C("$ZodNumber",(e,t)=>{J.init(e,t),e._zod.pattern=vr,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),n}});var Zr=C("$ZodBoolean",(e,t)=>{J.init(e,t),e._zod.pattern=yr,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}});function $r(e,t,n){e.issues.length&&t.issues.push(...lt(n,e.issues)),t.value[n]=e.value}var Pr=C("$ZodArray",(e,t)=>{J.init(e,t);let n=Ue.memoizer;n?.attach(e),e._zod.parse=(r,o)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=n?n.alloc(e,r,Array(i.length),o):Array(i.length);let a=[],c=o?.abortEarly;for(let f=0;f<i.length;f++){let u=i[f],p=t.element._zod.run({value:u,issues:[]},o);if(p instanceof Promise)a.push(p.then(s=>$r(s,r,f)));else if($r(p,r,f),c&&p.issues.length!==0&&ie(p))break}return a.length?Promise.all(a).then(()=>r):r}});function ft(e,t,n,r,o,i){let a=n in r,c=i==="optional";if(!(!a&&c&&o==="optional")){if(e.issues.length){if(o!==void 0&&c&&!a)return;t.issues.push(...lt(n,e.issues))}if(!a&&o===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?(a||o==="defaulted"&&!c)&&(t.value[n]=void 0):t.value[n]=e.value}}var zi=[];function ki(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:zi,o=r.length?[...t,...r]:t;for(let a of o)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(a)}": expected a Zod schema`);let i=sr(e.shape);return{...e,allKeys:o,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(i)}}function Ei(e,t,n,r,o,i,a){let c=[],f=o.keySet,u=o.catchall._zod,p=u.def.type,s=u.optin,l=u.optout,d=0;for(let m in t){if(a&&n.issues.length!==d){if(ie(n,d))break;d=n.issues.length}if(f.has(m))continue;if(m==="__proto__"){p==="never"&&c.push(m);continue}if(p==="never"){c.push(m);continue}let h=u.run({value:t[m],issues:[]},r);h instanceof Promise?e.push(h.then(_=>ft(_,n,m,t,s,l))):ft(h,n,m,t,s,l)}return c.length&&n.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:i,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var Cr=C("$ZodObject",(e,t)=>{J.init(e,t);let n=Object.getOwnPropertyDescriptor(t,"shape"),r=n?.get?n.get.raw:t.shape??{};if(r){let u=()=>{let p={...r};return Object.defineProperty(t,"shape",{value:p}),u.raw=p,p};u.raw=r,Object.defineProperty(t,"shape",{get:u})}let o=er(()=>ki(t));q(e,"propValues",u=>{let p=u.def.shape,s={};for(let l in p){let d=p[l]._zod;if(d.values){Object.prototype.hasOwnProperty.call(s,l)||or(s,l,new Set);for(let m of d.values)s[l].add(m);d.optin!==void 0&&s[l].add(void 0)}}return s});let i=ir,a=t.catchall,c,f=Ue.memoizer;f?.attach(e),e._zod.parse=(u,p)=>{c??(c=o.value);let s=u.value;if(!i(s))return u.issues.push({expected:"object",code:"invalid_type",input:s,inst:e}),u;u.value=f?f.alloc(e,u,{},p):{};let l=[],d=c.shape,m=p?.abortEarly,h=u.issues.length;for(let _ of c.allKeys){if(m&&u.issues.length!==h){if(ie(u,h))break;h=u.issues.length}if(_==="__proto__")continue;let z=d[_],w=z._zod.optin,A=z._zod.optout,v=z._zod.run({value:s[_],issues:[]},p);v instanceof Promise?l.push(v.then($=>ft($,u,_,s,w,A))):ft(v,u,_,s,w,A)}return a?Ei(l,s,u,p,o.value,e,m===!0):l.length?Promise.all(l).then(()=>u):u}});function Sr(e,t){return e.value=t.issues.length?void 0:t.value,e}var Ar=C("$ZodOptional",(e,t)=>{J.init(e,t),q(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",q(e,"values",n=>{let r=n.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),q(e,"pattern",n=>{let r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${nr(r.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(n.value===void 0){if(t.innerType._zod.optin!=="defaulted")return n;let o=t.innerType._zod.run({value:n.value,issues:[]},r);return o instanceof Promise?o.then(i=>Sr(n,i)):Sr(n,o)}return t.innerType._zod.run(n,r)}});var Mr=C("$ZodLazy",(e,t)=>{J.init(e,t),rr(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),q(e,"pattern",n=>n.innerType?._zod?.pattern),q(e,"propValues",n=>n.innerType?._zod?.propValues),q(e,"optin",n=>n.innerType?._zod?.optin??void 0),q(e,"optout",n=>n.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)});function Tr(e){return e.checks&&(e.checks=[...e.checks]),e}function Nr(e,t){return new e(Tr({type:"string",...oe(t)}))}function Rr(e,t){return new e(Tr({type:"number",checks:[],...oe(t)}))}function Or(e,t){return new e({type:"boolean",...oe(t)})}function en(e,t){return new br({check:"min_length",...oe(t),minimum:e})}var he=C("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");J.init(e,t),e.def=t,e.type=t.type},{get with(){return this.check},set with(e){de(this,"with",e)},parse(e,t){return qt(this,e,t,{callee:this.parse})},parseAsync(e,t){return Xt(this,e,t,{callee:this.parseAsync})},safeParse(e,t){return Jt(this,e,t)},safeParseAsync(e,t){return Yt(this,e,t)},check(...e){let t=this.def;return this.clone({...t,checks:[...t.checks??[],...e.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0})},clone(e,t){return ut(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},apply(e,...t){return t.length===0?e(this):e(this,...t)}}),Ci=C("ZodMiniString",(e,t)=>{kr.init(e,t),he.init(e,t)});function B(e){return Nr(Ci,e)}var Ai=C("ZodMiniNumber",(e,t)=>{Er.init(e,t),he.init(e,t)});function Ir(e){return Rr(Ai,e)}var Mi=C("ZodMiniBoolean",(e,t)=>{Zr.init(e,t),he.init(e,t)});function pt(e){return Or(Mi,e)}var Ti=C("ZodMiniArray",(e,t)=>{Pr.init(e,t),he.init(e,t)});function Y(e,t){return new Ti({type:"array",element:e,...oe(t)})}var Ni=C("ZodMiniObject",(e,t)=>{Cr.init(e,t),he.init(e,t),fr(e,"shape",n=>n._zod.def.shape,!1)});function se(e,t){let n={type:"object",shape:e??{},...oe(t)};return new Ni(n)}var Ri=C("ZodMiniOptional",(e,t)=>{Ar.init(e,t),he.init(e,t)});function tn(e){return new Ri({type:"optional",innerType:e})}var Oi=C("ZodMiniLazy",(e,t)=>{Mr.init(e,t),he.init(e,t)});function nn(e){return new Oi({type:"lazy",getter:e})}var Dr=se({id:B(),name:B(),label:B(),active:pt(),children:nn(()=>Y(Dr))}),jr=se({name:B(),path:Y(B()),docs:Y(Dr),groups:nn(()=>Y(jr))}),Lr=se({depth:Ir(),slug:B(),text:B()}),Fr=se({title:B(),groups:Y(jr),outline:Y(se({part:tn(B()),sections:Y(se({heading:Lr,part:tn(B()),subs:Y(se({heading:Lr}))})).check(en(1))})),home:pt(),cursorFace:pt()});function Br(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Br(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Di(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Br(e))&&(r&&(r+=" "),r+=t);return r}var x=Di;var Hr=Le({pending:!1,data:null,method:null,action:null}),Ur=new Set,Vr=e=>{Ur.add(e),e.finally(()=>Ur.delete(e))};var sn=Qe({button:()=>to,clearCache:()=>ji,composeRef:()=>dt,form:()=>Yr,input:()=>eo,link:()=>qr,meta:()=>Xr,script:()=>Wr,style:()=>Gr,title:()=>Kr}),ji=()=>{rn=Object.create(null),on=Object.create(null)},dt=(e,t)=>ot(()=>n=>{let r;e&&(typeof e=="function"?r=e(n)||(()=>{e(null)}):e&&"current"in e&&(e.current=n,r=()=>{e.current=null}));let o=t(n);return()=>{o?.(),r?.()}},[e]),rn=Object.create(null),on=Object.create(null),Ve=(e,t,n,r,o)=>{if(t?.itemProp)return{tag:e,props:t,type:e,ref:t.ref};let i=document.head,{onLoad:a,onError:c,precedence:f,blocking:u,...p}=t,s=null,l=!1,d=ye[e],m=Ye(e,r),h=v=>v.getAttribute("rel")==="stylesheet"&&v.getAttribute("data-precedence")!==null,_;if(m){let v=i.querySelectorAll(e);e:for(let $ of v)if(!(e==="link"&&!h($))){for(let y of d)if($.getAttribute(y)===t[y]){s=$;break e}}if(!s){let $=d.reduce((y,P)=>t[P]===void 0?y:`${y}-${P}-${t[P]}`,e);l=!on[$],s=on[$]||=(()=>{let y=document.createElement(e);for(let P of d)t[P]!==void 0&&y.setAttribute(P,t[P]);return t.rel&&y.setAttribute("rel",t.rel),y})()}}else _=i.querySelectorAll(e);f=r?f??"":void 0,r&&(p[Ze]=f);let z=fe(v=>{if(m){if(e==="link"&&f!==void 0){let y=!1;for(let P of i.querySelectorAll(e)){let L=P.getAttribute(Ze);if(L===null){i.insertBefore(v,P);return}if(y&&L!==f){i.insertBefore(v,P);return}L===f&&(y=!0)}i.appendChild(v);return}let $=!1;for(let y of i.querySelectorAll(e)){if($&&y.getAttribute("data-precedence")!==f){i.insertBefore(v,y);return}y.getAttribute("data-precedence")===f&&($=!0)}i.appendChild(v)}else if(e==="link")i.contains(v)||i.appendChild(v);else if(_){let $=!1;for(let y of _)if(y===v){$=!0;break}$||i.insertBefore(v,i.contains(_[0])?_[0]:i.querySelector(e)),_=void 0}},[m,f,e]),w=dt(t.ref,v=>{let $=d[0];if(n===2&&(v.innerHTML=""),(l||_)&&z(v),!c&&!a||!$)return;let y=rn[v.getAttribute($)]||=new Promise((P,L)=>{v.addEventListener("load",P),v.addEventListener("error",L)});a&&(y=y.then(a)),c&&(y=y.catch(c)),y.catch(()=>{})});if(o&&u==="render"){let v=ye[e][0];if(v&&t[v]){let $=t[v],y=rn[$]||=new Promise((P,L)=>{z(s),s.addEventListener("load",P),s.addEventListener("error",L)});rt(y)}}let A={tag:e,type:e,props:{...p,ref:w},ref:w};return A.p=n,s&&(A.e=s),jt(A,i)},Kr=e=>{let t=Hn();return(t&&M(t))?.endsWith("svg")?{tag:"title",props:e,type:"title",ref:e.ref}:Ve("title",e,void 0,!1,!1)},Wr=e=>!e||["src","async"].some(t=>!e[t])?{tag:"script",props:e,type:"script",ref:e.ref}:Ve("script",e,1,!1,!0),Gr=e=>!e||!["href","precedence"].every(t=>t in e)?{tag:"style",props:e,type:"style",ref:e.ref}:(e["data-href"]=e.href,delete e.href,Ve("style",e,2,!0,!0)),qr=e=>!e||["onLoad","onError"].some(t=>t in e)||e.rel==="stylesheet"&&(!("precedence"in e)||"disabled"in e)?{tag:"link",props:e,type:"link",ref:e.ref}:Ve("link",e,1,Je(e),!0),Xr=e=>Ve("meta",e,void 0,!1,!1),Jr=Symbol(),Yr=e=>{let{action:t,...n}=e;typeof t!="function"&&(n.action=t);let[r,o]=O([null,!1]),i=fe(async u=>{let p=u.isTrusted?t:u.detail[Jr];if(typeof p!="function")return;u.preventDefault();let s=new FormData(u.target);o([s,!0]);let l=p(s);l instanceof Promise&&(Vr(l),await l),o([null,!0])},[]),a=dt(e.ref,u=>(u.addEventListener("submit",i),()=>{u.removeEventListener("submit",i)})),[c,f]=r;return r[1]=!1,{tag:Hr,props:{value:{pending:c!==null,data:c,method:c?"post":null,action:c?t:null},children:{tag:"form",props:{...n,ref:a},type:"form",ref:a}},f}},Qr=(e,{formAction:t,...n})=>{if(typeof t=="function"){let r=fe(o=>{o.preventDefault(),o.currentTarget.form.dispatchEvent(new CustomEvent("submit",{detail:{[Jr]:t}}))},[]);n.ref=dt(n.ref,o=>(o.addEventListener("click",r),()=>{o.removeEventListener("click",r)}))}return{tag:e,props:n,type:e,ref:n.ref}},eo=e=>Qr("input",e),to=e=>Qr("button",e);Object.assign(Ee,{title:Kr,script:Wr,style:Gr,link:qr,meta:Xr,form:Yr,input:eo,button:to});var cn=(e,t,n)=>(typeof e=="string"&&sn[e]&&(e=sn[e]),{tag:e,type:e,props:t,key:n,ref:t.ref}),Ke=e=>cn("",e,void 0);var an=(({children:e,fallback:t,fallbackRender:n,onError:r})=>{let o=Ke({children:e});return o[ee]=i=>{if(i instanceof Promise)throw i;return r?.(i),n?.(i)||t},o}),un=(({children:e,fallback:t})=>{let n=Ke({children:e});return n[ee]=(r,o)=>{if(!(r instanceof Promise))throw r;return r.finally(o),t},n});var Fi=0,mt=async e=>{try{return e.flat().map(no)}catch(t){if(t instanceof Promise){let n=le();return await t,n(()=>mt(e))}else throw t}},no=e=>{if(e==null||typeof e=="boolean")return"";if(typeof e=="string"||Array.isArray(e))return F([e]);if(te(e))return ne(e);{let t=e.toString();return t instanceof Promise?t:k(t)}},ro=async({children:e,fallback:t,fallbackRender:n,onError:r})=>{if(!e)return k("");Array.isArray(e)||(e=[e]);let o=M(ln)?.scriptNonce,i,a=()=>i||=le(),c,f=()=>c||=(async()=>{let s=await t;if(s==null)return;if(typeof s=="string"||Array.isArray(s))return a()(()=>F([s]));if(te(s))return a()(()=>ne(s));let l=await a()(()=>s.toString());return k(l,l.callbacks||s.callbacks)})(),u=async s=>{let l=await f();return a()(async()=>{r?.(s);let d=l!==void 0?l:n&&Pt(R,{},n(s))||"",m=await R({children:d}).toString();return k(m,m.callbacks||d.callbacks)})},p=[];try{p=e.map(no)}catch(s){let l=a();s instanceof Promise?p=[s.then(()=>l(()=>mt(e))).catch(d=>u(d))]:p=[await u(s)]}if(p.some(s=>s instanceof Promise)){a();let s=Fi++,l=RegExp(`(<template id="E:${s}"></template>)(.*?)(<!--E:${s}-->)`,"s"),d=!1,m=async({error:z,buffer:w})=>{if(d)return"";d=!0;let A=await u(z),v=A.callbacks;return w?(w[0]=w[0].replace(l,()=>A),v?.length?k("",v):""):k(`<template data-hono-target="E:${s}">${A}</template><script>
|
|
1
|
+
(function(){var e=Symbol(`RENDERER`),t=Symbol(`ERROR_HANDLER`),n=Symbol(`STASH`),r=Symbol(`INTERNAL`),i=Symbol(`MEMO`),a=Symbol(`PERMALINK`),o=e=>(e[r]=!0,e),s={Stringify:1,BeforeStream:2,Stream:3},c=(e,t)=>{let n=new String(e);return n.isEscaped=!0,n.callbacks=t,n},l=/[&<>'"]/,u=async(e,t)=>{let n=``;t||=[];let r=await Promise.all(e);for(let e=r.length-1;n+=r[e],e--,!(e<0);e--){let i=r[e];typeof i==`object`&&t.push(...i.callbacks||[]);let a=i.isEscaped;if(i=await(typeof i==`object`?i.toString():i),typeof i==`object`&&t.push(...i.callbacks||[]),i.isEscaped??a)n+=i;else{let e=[n];d(i,e),n=e[0]}}return c(n,t)},d=(e,t)=>{let n=e.search(l);if(n===-1){t[0]+=e;return}let r,i,a=0;for(i=n;i<e.length;i++){switch(e.charCodeAt(i)){case 34:r=`"`;break;case 39:r=`'`;break;case 38:r=`&`;break;case 60:r=`<`;break;case 62:r=`>`;break;default:continue}t[0]+=e.substring(a,i)+r,a=i+1}t[0]+=e.substring(a,i)},f=e=>{let t=e.callbacks;if(!t?.length)return e;let n=[e],r={};return t.forEach(e=>e({phase:s.Stringify,buffer:n,context:r})),n[0]},p=async(e,t,n,r,i)=>{typeof e==`object`&&!(e instanceof String)&&(e instanceof Promise||(e=e.toString()),e instanceof Promise&&(e=await e));let a=e.callbacks;if(!a?.length)return Promise.resolve(e);i?i[0]+=e:i=[e];let o=Promise.all(a.map(e=>e({phase:t,buffer:i,context:r}))).then(e=>Promise.all(e.filter(Boolean).map(e=>p(e,t,!1,r,i))).then(()=>i[0]));return n?c(await o,a):o},m={title:[],script:[`src`],style:[`data-href`],link:[`href`],meta:[`name`,`httpEquiv`,`charset`,`itemProp`]},h={},g=`data-precedence`,_=e=>e.rel===`stylesheet`&&`precedence`in e,v=(e,t)=>e===`link`?t:m[e].length>0,y=Object.defineProperty,b=(e,t)=>{let n={};for(var r in e)y(n,r,{get:e[r],enumerable:!0});return t||y(n,Symbol.toStringTag,{value:`Module`}),n},x=e=>Array.isArray(e)?e:[e],S=b({button:()=>ue,form:()=>se,input:()=>le,link:()=>ae,meta:()=>T,script:()=>re,style:()=>ie,title:()=>ne}),ee=new WeakMap,te=(e,t,n,r)=>({buffer:i,context:a})=>{if(!i)return;let o=ee.get(a)||{};ee.set(a,o);let s=o[e]||=[],c=!1,l=m[e],u=v(e,r!==void 0);if(u){LOOP:for(let[,t]of s)if(e!==`link`||t.rel===`stylesheet`&&t[`data-precedence`]!==void 0){for(let e of l)if((t?.[e]??null)===n?.[e]){c=!0;break LOOP}}}if(c?i[0]=i[0].replaceAll(t,``):u||e===`link`?s.push([t,n,r]):s.unshift([t,n,r]),i[0].indexOf(`</head>`)!==-1){let t;if(e===`link`||r!==void 0){let e=[];t=s.map(([t,,n],r)=>{if(n===void 0)return[t,2**53-1,r];let i=e.indexOf(n);return i===-1&&(e.push(n),i=e.length-1),[t,i,r]}).sort((e,t)=>e[1]-t[1]||e[2]-t[2]).map(([e])=>e)}else t=s.map(([e])=>e);t.forEach(e=>{i[0]=i[0].replaceAll(e,``)}),i[0]=i[0].replace(/(?=<\/head>)/,()=>t.join(``))}},C=(e,t,n)=>k([new A(e,n,x(t??[]))]),w=(e,t,n,r)=>{if(`itemProp`in n)return C(e,t,n);let{precedence:i,blocking:a,...o}=n;i=r?i??``:void 0,r&&(o[g]=i);let s=new A(e,o,x(t||[])).toString();return s instanceof Promise?s.then(t=>c(t,[...t.callbacks||[],te(e,t,o,i)])):c(s,[te(e,s,o,i)])},ne=({children:e,...t})=>{let n=Oe();if(n){let r=N(n);if(r===`svg`||r===`head`)return new A(`title`,t,x(e??[]))}return w(`title`,e,t,!1)},re=({children:e,...t})=>{let n=Oe();return[`src`,`async`].some(e=>!t[e])||n&&N(n)===`head`?C(`script`,e,t):w(`script`,e,t,!1)},ie=({children:e,...t})=>[`href`,`precedence`].every(e=>e in t)?(t[`data-href`]=t.href,delete t.href,w(`style`,e,t,!0)):C(`style`,e,t),ae=({children:e,...t})=>[`onLoad`,`onError`].some(e=>e in t)||t.rel===`stylesheet`&&(!(`precedence`in t)||`disabled`in t)?C(`link`,e,t):w(`link`,e,t,_(t)),T=({children:e,...t})=>{let n=Oe();return n&&N(n)===`head`?C(`meta`,e,t):w(`meta`,e,t,!1)},oe=(e,{children:t,...n})=>new A(e,n,x(t??[])),se=e=>(typeof e.action==`function`&&(e.action=a in e.action?e.action[a]:void 0),oe(`form`,e)),ce=(e,t)=>(typeof t.formAction==`function`&&(t.formAction=a in t.formAction?t.formAction[a]:void 0),oe(e,t)),le=e=>ce(`input`,e),ue=e=>ce(`button`,e),de=new Map([[`className`,`class`],[`htmlFor`,`for`],[`crossOrigin`,`crossorigin`],[`httpEquiv`,`http-equiv`],[`itemProp`,`itemprop`],[`fetchPriority`,`fetchpriority`],[`noModule`,`nomodule`],[`formAction`,`formaction`]]),fe=e=>de.get(e)||e,pe=/[\s"'<>/=`\\\x00-\x1f\x7f-\x9f]/,me=new Set,he=1024,ge=/^[!?]|[\s"'<>/=`\\\x00-\x1f\x7f-\x9f]/,_e=new Set,ve=256,E=(e,t,n)=>{e.size>=t&&e.clear(),e.add(n)},ye=e=>_e.has(e)?!0:typeof e==`string`?e.length===0||!ge.test(e)&&(E(_e,ve,e),!0):!1,be=e=>{if(me.has(e))return!0;let t=e.length;if(t===0)return!1;for(let n=0;n<t;n++){let t=e.charCodeAt(n);if(!(t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===45||t===95||t===46||t===58))return!pe.test(e)&&(E(me,he,e),!0)}return E(me,he,e),!0},xe=/[\s"'():;\\/\[\]{}\x00-\x1f\x7f-\x9f]/,Se=new Set,Ce=1024,we=e=>{if(Se.has(e))return!0;let t=e.length;if(t===0)return!1;for(let n=0;n<t;n++){let t=e.charCodeAt(n);if(!(t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===45||t===95))return!xe.test(e)&&(E(Se,Ce,e),!0)}return E(Se,Ce,e),!0},Te=/[;"'\\/\[\](){}]/,Ee=e=>{if(!Te.test(e))return!1;let t=0,n=[];for(let r=0,i=e.length;r<i;r++){let a=e.charCodeAt(r);if(a===92){if(r===i-1)return!0;r++}else if(t!==0){if(a===10||a===12||a===13)return!0;a===t&&(t=0)}else if(a===47&&e.charCodeAt(r+1)===42){let t=e.indexOf(`*/`,r+2);if(t===-1)return!0;r=t+1}else if(a===34||a===39)t=a;else if(a===40)n.push(41);else if(a===91)n.push(93);else if(a===123||a===125)return!0;else if(a===41||a===93){if(n[n.length-1]!==a)return!0;n.pop()}else if(a===59&&n.length===0)return!0}return t!==0||n.length!==0},De=(e,t)=>{for(let[n,r]of Object.entries(e)){let e=n[0]===`-`||!/[A-Z]/.test(n)?n:n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`);if(!we(e))continue;if(r==null){t(e,null);continue}let i;if(typeof r==`number`)i=e.match(/^(?:a|border-im|column(?:-c|s)|flex(?:$|-[^b])|grid-(?!.*gap)(?:ar|[^a])|font-w|li|or|sca|st|ta|wido|z)|ty$/)?`${r}`:`${r}px`;else if(typeof r==`string`){if(Ee(r))continue;i=r}else continue;t(e,i)}},D=void 0,Oe=()=>D,ke=e=>/[A-Z]/.test(e)&&e.match(/^(?:al|basel|clip(?:Path|Rule)$|co|do|fill|fl|fo|gl|let|lig|i|marker[EMS]|o|pai|pointe|sh|st[or]|text[^L]|tr|u|ve|w)/)?e.replace(/([A-Z])/g,`-$1`).toLowerCase():e,Ae=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],je=`allowfullscreen.async.autofocus.autoplay.checked.controls.default.defer.disabled.download.formnovalidate.hidden.inert.ismap.itemscope.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.selected`.split(`.`),Me=(e,t)=>e.then(e=>{if(typeof e!=`string`&&!Array.isArray(e)&&!(e instanceof A))return e;let n=Array.isArray(e)?e:[e],r=()=>{let e=[``];return O(n,e),e.length===1?c(e[0],e.callbacks):u(e,e.callbacks)};return t?t(r):Qe(r)}),O=(e,t)=>{for(let n=0,r=e.length;n<r;n++){let r=e[n];if(typeof r==`string`)d(r,t);else if(typeof r==`boolean`||r==null)continue;else if(r instanceof A)r.toStringToBuffer(t);else if(typeof r==`number`)t[0]+=r;else if(r.isEscaped){t[0]+=r;let e=r.callbacks;e&&(t.callbacks||=[],t.callbacks.push(...e))}else r instanceof Promise?t.unshift(``,r):O(r,t)}},k=e=>Qe(()=>{let t=[``];return O(e,t),t.length===1?c(t[0],t.callbacks):u(t,t.callbacks)}),Ne=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&!(e instanceof A)&&!(e instanceof Promise)&&!e.isEscaped&&typeof e.toString==`function`,Pe=e=>{let t=e.toString(),n=e=>k([String(e)]);return t instanceof Promise?t.then(n):n(t)},A=class{tag;props;key;children;isEscaped=!0;constructor(e,t,n){if(typeof e!=`function`&&!ye(e))throw Error(`Invalid JSX tag name: ${e}`);this.tag=e,this.props=t,this.children=n}get type(){return this.tag}get ref(){return this.props.ref||null}toString(){return Qe(()=>{let e=[``];return this.toStringToBuffer(e),e.length===1?`callbacks`in e?f(c(e[0],e.callbacks)).toString():e[0]:u(e,e.callbacks)})}toStringToBuffer(e){let t=this.tag,n=this.props,{children:r}=this;e[0]+=`<${t}`;let i=t===`svg`||D&&N(D)===`svg`?e=>ke(fe(e)):e=>fe(e);for(let[a,o]of Object.entries(n))if(a=i(a),be(a)&&a!==`children`){if(a===`style`&&typeof o==`object`){let t=``;De(o,(e,n)=>{n!=null&&(t+=`${t?`;`:``}${e}:${n}`)}),e[0]+=` style="`,d(t,e),e[0]+=`"`}else if(typeof o==`string`)e[0]+=` ${a}="`,d(o,e),e[0]+=`"`;else if(o!=null){if(typeof o==`number`||o.isEscaped)e[0]+=` ${a}="${o}"`;else if(typeof o==`boolean`&&je.includes(a))o&&(e[0]+=` ${a}=""`);else if(a===`dangerouslySetInnerHTML`){if(r.length>0)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");r=[c(o.__html)]}else if(o instanceof Promise)e[0]+=` ${a}="`,e.unshift(`"`,o);else if(typeof o==`function`){if(!a.startsWith(`on`)&&a!==`ref`)throw Error(`Invalid prop '${a}' of type 'function' supplied to '${t}'.`)}else e[0]+=` ${a}="`,d(o.toString(),e),e[0]+=`"`}}Ae.includes(t)&&r.length===0?e[0]+=`/>`:(e[0]+=`>`,O(r,e),e[0]+=`</${t}>`)}},Fe=class extends A{toStringToBuffer(e){let{children:t}=this,n={...this.props};t.length&&(n.children=t.length===1?t[0]:t);let r=this.tag.call(null,n);typeof r!=`boolean`&&r!=null&&(r instanceof Promise?M.length===0?e.unshift(``,Me(r)):e.unshift(``,Me(r,$e())):r instanceof A?r.toStringToBuffer(e):Array.isArray(r)?O(r,e):typeof r==`number`||r.isEscaped?(e[0]+=r,r.callbacks&&(e.callbacks||=[],e.callbacks.push(...r.callbacks))):d(r,e))}},Ie=class extends A{toStringToBuffer(e){O(this.children,e)}},Le=(e,t,...n)=>{t??={},n.length&&(t.children=n.length===1?n[0]:n);let r=t.key;delete t.key;let i=ze(e,t,n);return i.key=r,i},Re=!1,ze=(t,n,r)=>{if(!Re){for(let t in h)S[t][e]=h[t];Re=!0}return typeof t==`function`?new Fe(t,n,r):S[t]?new Fe(S[t],n,r):t===`svg`||t===`head`?(D||=et(``),new A(t,n,[new Fe(D,{value:t},r)])):new A(t,n,r)},j=({children:e})=>new Ie(``,{children:e},Array.isArray(e)?e:e?[e]:[]),M=[],Be=!1,Ve,He,Ue=0,We=!1,Ge=()=>{if(Be)return Ve;Be=!0;let e=globalThis,t;for(let n of[()=>e.process?.getBuiltinModule?.(`node:async_hooks`)?.AsyncLocalStorage,()=>e.process?.mainModule?.require?.(`node:async_hooks`)?.AsyncLocalStorage]){try{t=n()}catch{}if(t)break}return t&&(Ve=new t),Ve},Ke=()=>Ge()?.getStore()||He,qe=()=>{Ue>0&&!We&&(We=!0,console.warn(`hono/jsx: AsyncLocalStorage is unavailable in this runtime, so useContext() after an await in an async component falls back to the context default value during server-side rendering. To get provided values across await boundaries, use a runtime with AsyncLocalStorage (Node.js >= 20.16, Deno, Bun, or Cloudflare Workers with the nodejs_compat flag).`))},Je=(e,t)=>{if(!e)return qe(),t.values;let n=e.get(t);return n||(n=[t.values[0]],e.set(t,n)),n},Ye=(e,t)=>{if(!e)return qe(),t.values.at(-1);let n=e.get(t);return n?.length?n.at(-1):t.values[0]},Xe=e=>(e?M.filter(t=>e.has(t)):M).map(t=>[t,Ye(e,t)]),Ze=(e,t,n)=>Qe(()=>{let t=Ke(),r=n.map(([e,n])=>{let r=Je(t,e);return r.push(n),r}),i=()=>{r.forEach(e=>{e.pop()})};try{let t=e();return t instanceof Promise?t.finally(i):(i(),t)}catch(e){throw i(),e}},t),Qe=(e,t)=>{if(Ke())return e();let n=t??new WeakMap,r=Ge();if(r)return r.run(n,e);He=n;let i;try{i=e()}finally{He=void 0}return!We&&i instanceof Promise&&(Ue++,i=i.finally(()=>{Ue--})),i},$e=()=>{let e=Ke(),t=Xe(e);return n=>Ze(n,e,t)},et=t=>{let n=[t],r=(e=>{let t=Je(Ke(),r);t.push(e.value);let n;try{n=typeof e.children==`string`?k([e.children]):Ne(e.children)?Pe(e.children):e.children?(Array.isArray(e.children)?new Ie(``,{},e.children):e.children).toString():c(``)}catch(e){throw t.pop(),e}return n instanceof Promise?n.finally(()=>t.pop()).then(e=>c(e,e.callbacks)):(t.pop(),c(n))});return r.values=n,r.Provider=r,r[e]=tt(n),M.push(r),r},N=e=>Ye(Ke(),e),tt=e=>({value:n,children:r})=>{if(!r)return;let i={children:[{tag:o(()=>{e.push(n)}),props:{}}]};Array.isArray(r)?i.children.push(...r.flat()):i.children.push(r),i.children.push({tag:o(()=>{e.pop()}),props:{}});let a={tag:``,props:i,type:``};return a[t]=t=>{throw e.pop(),t},a},nt=e=>{let t=[e],n=tt(t);return n.values=t,n.Provider=n,M.push(n),n},rt=0,it=2,at=3,ot=4,st=new WeakMap,ct=(e,t)=>!e||!t||e.length!==t.length||t.some((t,n)=>t!==e[n]),lt=void 0,ut=[],P=e=>{let t=()=>typeof e==`function`?e():e,r=L.at(-1);if(!r)return[t(),()=>{}];let[,i]=r,a=i[n][1][rt]||=[],o=i[n][0]++;return a[o]||=[t(),e=>{let t=lt,n=a[o];if(typeof e==`function`&&(e=e(n[0])),!Object.is(e,n[0])){if(n[0]=e,ut.length){let[e,n]=ut.at(-1);Promise.all([e===3?i:Ut([e,!1,t],i),n]).then(([n])=>{if(!n||e!==2&&e!==3)return;let r=n.vC;requestAnimationFrame(()=>{setTimeout(()=>{r===n.vC&&Ut([+(e===3),!1,t],n)})})})}else Ut([0,!1,t],i)}}]},dt=(e,t,r)=>{let i=L.at(-1);if(!i)return;let[,a]=i,o=a[n][1][1]||=[],s=a[n][0]++,[c,,l]=o[s]||=[];if(ct(c,r)){l&&l();let n=()=>{i[e]=void 0,i[2]=t()},i=[r,void 0,void 0,void 0,void 0];i[e]=n,o[s]=i}},ft=(e,t)=>dt(3,e,t),F=(e,t)=>dt(1,e,t),pt=(e,t)=>{let r=L.at(-1);if(!r)return e;let[,i]=r,a=i[n][1][it]||=[],o=i[n][0]++,s=a[o];return ct(s?.[1],t)?a[o]=[e,t]:e=a[o][0],e};function I(e){let t=L.at(-1);if(!t)return{current:e};let[,r]=t,i=r[n][1][ot]||=[],a=r[n][0]++;return i[a]||={current:e}}var mt=e=>{let t=st.get(e);if(t){if(t.length===2)throw t[1];return t[0]}throw e.then(t=>st.set(e,[t]),t=>st.set(e,[void 0,t])),e},ht=(e,t)=>{let r=L.at(-1);if(!r)return e();let[,i]=r,a=i[n][1][at]||=[],o=i[n][0]++,s=a[o];return ct(s?.[1],t)&&(a[o]=[e(),t]),a[o][0]},gt=`_hp`,_t={Change:`Input`,DoubleClick:`DblClick`},vt={svg:`2000/svg`,math:`1998/Math/MathML`},L=[],R=new WeakMap,z=void 0,yt=()=>z,B=e=>`t`in e,bt={onClick:[`click`,!1]},xt=e=>{if(!e.startsWith(`on`))return;if(bt[e])return bt[e];let t=e.match(/^on([A-Z][a-zA-Z]+?(?:PointerCapture)?)(Capture)?$/);if(t){let[,n,r]=t;return bt[e]=[(_t[n]||n).toLowerCase(),!!r]}},St=(e,t)=>z&&e instanceof SVGElement&&/[A-Z]/.test(t)&&(t in e.style||t.match(/^(?:o|pai|str|u|ve)/))?t.replace(/([A-Z])/g,`-$1`).toLowerCase():t,Ct=e=>e==null||e===!1?null:e,wt=(e,t)=>{`value`in t&&(e.value=Ct(t.value),!e.multiple&&e.selectedIndex===-1&&(e.selectedIndex=0))},Tt=e=>e instanceof DOMException&&e.name===`InvalidCharacterError`,Et=(e,t,n)=>{t||={};for(let r in t){let i=t[r];if(r!==`children`&&(!n||n[r]!==i)){r=fe(r);let t=xt(r);if(t){if(n?.[r]!==i&&(n&&e.removeEventListener(t[0],n[r],t[1]),i!=null)){if(typeof i!=`function`)throw Error(`Event handler for "${r}" is not a function`);e.addEventListener(t[0],i,t[1])}}else if(r===`dangerouslySetInnerHTML`&&i)e.innerHTML=i.__html;else if(r===`ref`){R.get(e)?.();let t;typeof i==`function`?t=i(e)||(()=>i(null)):i&&`current`in i&&(i.current=e,t=()=>i.current=null),R.set(e,t)}else if(r===`style`){let t=e.style;typeof i==`string`?t.cssText=i:(t.cssText=``,i!=null&&De(i,t.setProperty.bind(t)))}else{if(r===`value`){let t=e.nodeName;if(t===`SELECT`)continue;if((t===`INPUT`||t===`TEXTAREA`)&&(e.value=Ct(i),t===`TEXTAREA`)){e.textContent=i;continue}}else(r===`checked`&&e.nodeName===`INPUT`||r===`selected`&&e.nodeName===`OPTION`)&&(e[r]=i);let t=St(e,r);try{i==null||i===!1?e.removeAttribute(t):i===!0?e.setAttribute(t,``):typeof i==`string`||typeof i==`number`?e.setAttribute(t,i):e.setAttribute(t,i.toString())}catch(e){if(!Tt(e))throw e}}}}if(n)for(let r in n){let i=n[r];if(r!==`children`&&!(r in t)){r=fe(r);let t=xt(r);if(t)e.removeEventListener(t[0],i,t[1]);else if(r===`ref`)R.get(e)?.(),R.delete(e);else try{e.removeAttribute(St(e,r))}catch(e){if(!Tt(e))throw e}}}},Dt=(t,r)=>{r[n][0]=0,L.push([t,r]);let i=r.tag[e]||r.tag,a=i.defaultProps?{...i.defaultProps,...r.props}:r.props;try{return[i.call(null,a)]}finally{L.pop()}},Ot=(e,t,r,i,a)=>{e.vR?.length&&(i.push(...e.vR),delete e.vR),typeof e.tag==`function`&&e[n][1][1]?.forEach(e=>a.push(e)),e.vC.forEach(e=>{if(B(e))r.push(e);else if(typeof e.tag==`function`||e.tag===``){e.c=t;let n=r.length;if(Ot(e,t,r,i,a),e.s){for(let e=n;e<r.length;e++)r[e].s=!0;e.s=!1}}else r.push(e),e.vR?.length&&(i.push(...e.vR),delete e.vR)})},kt=e=>{for(;e&&(e.tag===gt||!e.e);)e=e.tag===gt||!e.vC?.[0]?e.nN:e.vC[0];return e?.e},At=e=>{B(e)||(e[n]?.[1][1]?.forEach(e=>e[2]?.()),R.get(e.e)?.(),e.p===2&&e.vC?.forEach(e=>e.p=2),e.vC?.forEach(At)),e.p||(e.e?.remove(),delete e.e),typeof e.tag==`function`&&(V.delete(e),Lt.delete(e),delete e[n][3],e.a=!0)},jt=(e,t,n)=>{e.c=t,Pt(e,t,n)},Mt=(e,t)=>{if(t){for(let n=0,r=e.length;n<r;n++)if(e[n]===t)return n}},Nt=Symbol(),Pt=(e,t,n)=>{let r=[],i=[],a=[];Ot(e,t,r,i,a),i.forEach(At);let o=n?void 0:t.childNodes,s,c=null;if(n)s=-1;else if(!o.length)s=0;else{let t=Mt(o,kt(e.nN));t===void 0?s=Mt(o,r.find(e=>e.tag!==gt&&e.e)?.e)??-1:(c=o[t],s=t),s===-1&&(n=!0)}for(let e=0,i=r.length;e<i;e++,s++){let i=r[e],a;if(i.s&&i.e)a=i.e,i.s=!1;else{let e=n||!i.e;B(i)?(i.e&&i.d&&(i.e.textContent=i.t),i.d=!1,a=i.e||=document.createTextNode(i.t)):(a=i.e||=i.n?document.createElementNS(i.n,i.tag):document.createElement(i.tag),Et(a,i.props,i.pP),Pt(i,a,e),i.tag===`select`&&wt(a,i.props))}i.tag===gt?s--:n?a.parentNode||t.appendChild(a):o[s]!==a&&o[s-1]!==a&&(o[s+1]===a?t.appendChild(o[s]):t.insertBefore(a,c||o[s]||null))}if(e.pP&&=void 0,a.length){let e=[],t=[];a.forEach(([,n,,r,i])=>{n&&e.push(n),r&&t.push(r),i?.()}),e.forEach(e=>e()),t.length&&requestAnimationFrame(()=>{t.forEach(e=>e())})}},Ft=(e,t)=>!!(e&&e.length===t.length&&e.every((e,n)=>e[1]===t[n][1])),It=e=>{let t=new Map;for(let n of e){let e=n.key;if(t.has(e))return;t.set(e,n)}return t},Lt=new WeakMap,Rt=(e,a,o)=>{let s=!o&&a.pC;o&&(a.pC||=a.vC);let c;try{o||=typeof a.tag==`function`?Dt(e,a):x(a.props.children),o[0]?.tag===``&&o[0][t]&&(c=o[0][t],e[5].push([e,c,a]));let l=s?[...a.pC]:a.vC?[...a.vC]:void 0,u=[],d,f=(l?.length||0)*2,p;for(let t=0;t<o.length;t++){if(Array.isArray(o[t])){o.splice(t,1,...o[t].flat(1/0)),t--;continue}let s=zt(o[t]);if(s){typeof s.tag==`function`&&!s.tag[r]&&(M.length>0&&(s[n][2]=M.map(e=>[e,e.values.at(-1)])),e[5]?.length&&(s[n][3]=e[5].at(-1)));let t;if(p&&s.key===void 0&&!B(s)&&(l=[...p.values()],p=void 0),p){let e=s.key,n=p.get(e);n&&(B(s)?B(n):n.tag===s.tag&&n.key===e)&&(t=n,p.delete(e))}else if(l&&l.length){let e=l[0];if(B(s)?B(e):!B(e)&&(s.key===void 0||e.key===s.key)&&e.tag===s.tag)t=l.shift();else{let e=l.findIndex(B(s)?e=>B(e):s.key===void 0?e=>e.tag===s.tag:e=>e.key===s.key&&e.tag===s.tag);f-=e===-1?l.length:e,e!==-1&&(t=l[e],l.splice(e,1)),f<0&&(f=1/0,p=It(l))}}if(t){if(B(s))t.t!==s.t&&(t.t=s.t,t.d=!0),s=t;else{let e=t.pP=t.props;if(t.props=s.props,t.f||=s.f||a.f,typeof s.tag==`function`){let r=t[n][2];t[n][2]=s[n][2]||[],t[n][3]=s[n][3],!t.f&&((t.o||t)===s.o||t.tag[i]?.(e,t.props))&&Ft(r,t[n][2])&&(t.s=!0)}s=t}}else if(!B(s)&&z){let e=N(z);e&&(s.n=e)}if(!B(s)&&!s.s&&(Rt(e,s),delete s.f),u.push(s),d&&!d.s&&!s.s)for(let e=d;e&&!B(e);e=e.vC?.at(-1))e.nN=s;d=s}}l=p?[...p.values()]:l,a.vR=s?[...a.vC,...l||[]]:l||[],a.vC=u,s&&delete a.pC}catch(t){if(a.f=!0,t===Nt){if(c)return;throw t}let[r,i,o]=a[n]?.[3]||[];if(i){let n=()=>Ut([0,!1,e[2]],o),a=Lt.get(o)||[];a.push(n),Lt.set(o,a);let s=i(t,()=>{let e=Lt.get(o);if(e){let t=e.indexOf(n);if(t!==-1)return e.splice(t,1),n()}});if(s){if(e[0]===1)e[1]=!0;else if(Rt(e,o,[s]),(i.length===1||e!==r)&&o.c){jt(o,o.c,!1);return}throw Nt}}throw t}finally{c&&e[5].pop()}},zt=e=>{if(e!=null&&typeof e!=`boolean`){if(typeof e==`string`||typeof e==`number`)return{t:e.toString(),d:!0};if(`vR`in e&&(e={tag:e.tag,props:e.props,key:e.key,f:e.f,type:e.tag,ref:e.props.ref,o:e.o||e}),typeof e.tag==`function`)e[n]=[0,[]];else{let t=vt[e.tag];t&&(z||=nt(``),e.props.children=[{tag:z,props:{value:e.n=`http://www.w3.org/${t}`,children:e.props.children}}])}return e}},Bt=(e,t,n)=>{e.c===t&&(e.c=n,e.vC.forEach(e=>Bt(e,t,n)))},Vt=(e,t)=>{t[n][2]?.forEach(([e,t])=>{e.values.push(t)});try{Rt(e,t,void 0)}catch{return}t.a?delete t.a:(t[n][2]?.forEach(([e])=>{e.values.pop()}),(e[0]!==1||!e[1])&&jt(t,t.c,!1))},V=new WeakMap,Ht=[],Ut=async(e,t)=>{e[5]||=[];let n=V.get(t);n&&n[0](void 0);let r,i=new Promise(e=>r=e);if(V.set(t,[r,()=>{e[2]?e[2](e,t,e=>{Vt(e,t)}).then(()=>r(t)):(Vt(e,t),r(t))}]),Ht.length)Ht.at(-1).add(t);else{await Promise.resolve();let e=V.get(t);e&&(V.delete(t),e[1]())}return i},Wt=(e,t)=>{let n=[];n[5]=[],n[4]=!0,Rt(n,e,void 0),n[4]=!1;let r=document.createDocumentFragment();jt(e,r,!0),Bt(e,r,t),t.replaceChildren(r)},Gt=e=>{let t=new Set;Ht.push(t),e(),t.forEach(e=>{let t=V.get(e);t&&(V.delete(e),t[1]())}),Ht.pop()},Kt=(e,t,n)=>({tag:gt,props:{children:e},key:n,e:t,p:1}),qt=(e,t={})=>{let n;return Object.keys(t).length>0&&console.warn(`createRoot options are not supported yet`),{render(t){if(n===null)throw Error(`Cannot update an unmounted root`);n?n(t):Wt(zt({tag:()=>{let[e,r]=P(t);return n=r,e},props:{}}),e)},unmount(){n?.(null),n=null}}};function Jt(e,t){return typeof t==`bigint`?t.toString():t}var Yt=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Xt(e){return new Yt(e)}function Zt(e){return e==null}function Qt(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}var $t=Symbol(`evaluating`);function en(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==$t)return r===void 0&&(r=$t,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function tn(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}var nn=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function rn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function an(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function H(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function on(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function U(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function sn(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function cn(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function ln(e){return typeof e==`string`?e:e?.message}function un(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function dn(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:ln(e.inst?._zod.def?.error?.(e))??ln(a?.(e))??ln(t?.error?.(e))??ln(n.customError?.(e))??ln(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var fn=/[\uD800-\uDBFF]/;function pn(e){let t=e.length;if(!fn.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function mn(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function hn(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):vn(e,n,r.value)}}function gn(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function _n(e,t,n){return gn(e,t,n,!1)}function vn(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:gn(this,t,n.bind(this))},set(e){gn(this,t,e)}})}function yn(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var bn,W=!1,xn={configurable:!0,get(){W=!0}};function G(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&bn!==e._zod?bn=void 0:(bn=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,xn);let e=W;W=!1;try{let r=n(this);return W?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),W||=e,r}catch(n){throw delete this[t],W||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function Sn(e,t,n,r){let i=yn(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var Cn,wn={value:void 0,enumerable:!1},Tn=`captureStackTrace`in Error?Error:null;function En(e){let t=Tn;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Tn=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function K(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){wn.value=new a(r);try{Object.defineProperty(n,"_zod",wn)}finally{wn.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),hn(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?En(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var Dn=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}};(Cn=globalThis).__zod_globalConfig??(Cn.__zod_globalConfig={});var On=globalThis.__zod_globalConfig;function kn(e){return e&&Object.assign(On,e),On}function An(){let e=this._zod;return e.message??=JSON.stringify(e.def,Jt,2),e.message}function jn(e){this._zod.message=e}var Mn={get:An,set:jn,enumerable:!0,configurable:!0},Nn={value:void 0,enumerable:!1},Pn=new WeakSet([Object.prototype,Error.prototype]),Fn=(e,t)=>{e.name=`$ZodError`,Nn.value=t,Object.defineProperty(e,"issues",Nn),Nn.value=void 0,Object.defineProperty(e,"message",Mn);let n=Object.getPrototypeOf(e);Pn.has(n)||(Pn.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))};K(`$ZodError`,Fn);var In=K(`$ZodError`,Fn,void 0,{Parent:Error}),Ln=(e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Dn;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>dn(e,o,kn())));throw nn(n,a?.callee??t),n}return s.value};return t})(In),Rn=(e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>dn(e,o,kn())));throw nn(n,a?.callee??t),n}return s.value};return t})(In),zn=(e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Dn;return a.issues.length?Bn(e,a.issues,i):{success:!0,data:a.value}})(In);function Bn(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>dn(e,n,kn()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Vn=(e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Bn(e,a.issues,i):{success:!0,data:a.value}})(In),Hn=/^[\s\S]{0,}$/,Un=/^-?\d+(?:\.\d+)?$/,Wn=/^(?:true|false)$/i,Gn=K(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Kn=e=>{let t=e.value;return!Zt(t)&&t.length!==void 0},qn=K(`$ZodCheckMinLength`,(e,t)=>{var n;Gn.init(e,t),(n=e._zod.def).when??(n.when=Kn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?pn(r):i)>=t.minimum)return;let a=mn(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Jn={major:4,minor:6,patch:5},q=K(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Jn;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=U(t),a;for(let o of n){if(o._zod.def.when){if(sn(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new Dn;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(un(t.issues,n,e),i||=U(t,n))});else{if(t.issues.length===n)continue;un(t.issues,n,e),i||=U(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(U(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new Dn;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new Dn;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return _n(this,`~standard`,Zn(this))},set"~standard"(e){gn(this,`~standard`,e)}}),Yn=(e,t)=>e.issues.length?{issues:e.issues.map(e=>dn(e,t,kn()))}:{value:e.value};async function Xn(e,t){let n={async:!0};return Yn(await e._zod.run({value:t,issues:[]},n),n)}function Zn(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Yn(r,n)}catch{}return Xn(e,t)},vendor:`zod`,version:1}}var Qn=K(`$ZodString`,(e,t)=>{q.init(e,t),e._zod.pattern=t.pattern??Hn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),$n=K(`$ZodNumber`,(e,t)=>{q.init(e,t),e._zod.pattern=Un,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),er=K(`$ZodBoolean`,(e,t)=>{q.init(e,t),e._zod.pattern=Wn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}});function tr(e,t,n){e.issues.length&&t.issues.push(...cn(n,e.issues)),t.value[n]=e.value}var nr=K(`$ZodArray`,(e,t)=>{q.init(e,t);let n=On.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>tr(t,r,e)));else if(tr(c,r,e),s&&c.issues.length!==0&&U(c))break}return o.length?Promise.all(o).then(()=>r):r}});function rr(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...cn(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var ir=[];function ar(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:ir,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=on(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function or(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(U(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>rr(e,n,i,t,d,f))):rr(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var sr=K(`$ZodObject`,(e,t)=>{q.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=Xt(()=>ar(t));G(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||tn(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=rn,o=t.catchall,s,c=On.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(U(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>rr(n,t,e,r,a,o))):rr(s,t,e,r,a,o)}return o?or(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}});function cr(e,t){return e.value=t.issues.length?void 0:t.value,e}var lr=K(`$ZodOptional`,(e,t)=>{q.init(e,t),G(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,G(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),G(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Qt(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>cr(e,t)):cr(e,r)}return t.innerType._zod.run(e,n)}}),ur=K(`$ZodLazy`,(e,t)=>{q.init(e,t),en(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),G(e,`pattern`,e=>e.innerType?._zod?.pattern),G(e,`propValues`,e=>e.innerType?._zod?.propValues),G(e,`optin`,e=>e.innerType?._zod?.optin??void 0),G(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)});function dr(e){return e.checks&&=[...e.checks],e}function fr(e,t){return new e(dr({type:`string`,...H(t)}))}function pr(e,t){return new e(dr({type:`number`,checks:[],...H(t)}))}function mr(e,t){return new e({type:`boolean`,...H(t)})}function hr(e,t){return new qn({check:`min_length`,...H(t),minimum:e})}var J=K(`ZodMiniType`,(e,t)=>{if(!e._zod)throw Error(`Uninitialized schema in ZodMiniType.`);q.init(e,t),e.def=t,e.type=t.type},{get with(){return this.check},set with(e){gn(this,`with`,e)},parse(e,t){return Ln(this,e,t,{callee:this.parse})},parseAsync(e,t){return Rn(this,e,t,{callee:this.parseAsync})},safeParse(e,t){return zn(this,e,t)},safeParseAsync(e,t){return Vn(this,e,t)},check(...e){let t=this.def;return this.clone({...t,checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]},{parent:!0})},clone(e,t){return an(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},apply(e,...t){return t.length===0?e(this):e(this,...t)}}),gr=K(`ZodMiniString`,(e,t)=>{Qn.init(e,t),J.init(e,t)});function Y(e){return fr(gr,e)}var _r=K(`ZodMiniNumber`,(e,t)=>{$n.init(e,t),J.init(e,t)});function vr(e){return pr(_r,e)}var yr=K(`ZodMiniBoolean`,(e,t)=>{er.init(e,t),J.init(e,t)});function br(e){return mr(yr,e)}var xr=K(`ZodMiniArray`,(e,t)=>{nr.init(e,t),J.init(e,t)});function X(e,t){return new xr({type:`array`,element:e,...H(t)})}var Sr=K(`ZodMiniObject`,(e,t)=>{sr.init(e,t),J.init(e,t),Sn(e,`shape`,e=>e._zod.def.shape,!1)});function Z(e,t){return new Sr({type:`object`,shape:e??{},...H(t)})}var Cr=K(`ZodMiniOptional`,(e,t)=>{lr.init(e,t),J.init(e,t)});function wr(e){return new Cr({type:`optional`,innerType:e})}var Tr=K(`ZodMiniLazy`,(e,t)=>{ur.init(e,t),J.init(e,t)});function Er(e){return new Tr({type:`lazy`,getter:e})}var Dr=Z({id:Y(),name:Y(),label:Y(),active:br(),children:Er(()=>X(Dr))}),Or=Z({name:Y(),path:X(Y()),docs:X(Dr),groups:Er(()=>X(Or))}),kr=Z({depth:vr(),slug:Y(),text:Y()}),Ar=Z({title:Y(),groups:X(Or),outline:X(Z({part:wr(Y()),sections:X(Z({heading:kr,part:wr(Y()),subs:X(Z({heading:kr}))})).check(hr(1))})),home:br(),cursorFace:br()});function jr(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=jr(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Q(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=jr(e))&&(r&&(r+=` `),r+=t);return r}var Mr=nt({pending:!1,data:null,method:null,action:null}),Nr=new Set,Pr=e=>{Nr.add(e),e.finally(()=>Nr.delete(e))},Fr=b({button:()=>Xr,clearCache:()=>Ir,composeRef:()=>Lr,form:()=>qr,input:()=>Yr,link:()=>Wr,meta:()=>Gr,script:()=>Hr,style:()=>Ur,title:()=>Vr}),Ir=()=>{Rr=Object.create(null),zr=Object.create(null)},Lr=(e,t)=>ht(()=>n=>{let r;e&&(typeof e==`function`?r=e(n)||(()=>{e(null)}):e&&`current`in e&&(e.current=n,r=()=>{e.current=null}));let i=t(n);return()=>{i?.(),r?.()}},[e]),Rr=Object.create(null),zr=Object.create(null),Br=(e,t,n,r,i)=>{if(t?.itemProp)return{tag:e,props:t,type:e,ref:t.ref};let a=document.head,{onLoad:o,onError:s,precedence:c,blocking:l,...u}=t,d=null,f=!1,p=m[e],h=v(e,r),_=e=>e.getAttribute(`rel`)===`stylesheet`&&e.getAttribute(`data-precedence`)!==null,y;if(h){let n=a.querySelectorAll(e);LOOP:for(let r of n)if(e!==`link`||_(r)){for(let e of p)if(r.getAttribute(e)===t[e]){d=r;break LOOP}}if(!d){let n=p.reduce((e,n)=>t[n]===void 0?e:`${e}-${n}-${t[n]}`,e);f=!zr[n],d=zr[n]||=(()=>{let n=document.createElement(e);for(let e of p)t[e]!==void 0&&n.setAttribute(e,t[e]);return t.rel&&n.setAttribute(`rel`,t.rel),n})()}}else y=a.querySelectorAll(e);c=r?c??``:void 0,r&&(u[g]=c);let b=pt(t=>{if(h){if(e===`link`&&c!==void 0){let n=!1;for(let r of a.querySelectorAll(e)){let e=r.getAttribute(g);if(e===null||n&&e!==c){a.insertBefore(t,r);return}e===c&&(n=!0)}a.appendChild(t);return}let n=!1;for(let r of a.querySelectorAll(e)){if(n&&r.getAttribute(`data-precedence`)!==c){a.insertBefore(t,r);return}r.getAttribute(`data-precedence`)===c&&(n=!0)}a.appendChild(t)}else if(e===`link`)a.contains(t)||a.appendChild(t);else if(y){let n=!1;for(let e of y)if(e===t){n=!0;break}n||a.insertBefore(t,a.contains(y[0])?y[0]:a.querySelector(e)),y=void 0}},[h,c,e]),x=Lr(t.ref,e=>{let t=p[0];if(n===2&&(e.innerHTML=``),(f||y)&&b(e),!s&&!o||!t)return;let r=Rr[e.getAttribute(t)]||=new Promise((t,n)=>{e.addEventListener(`load`,t),e.addEventListener(`error`,n)});o&&(r=r.then(o)),s&&(r=r.catch(s)),r.catch(()=>{})});if(i&&l===`render`){let n=m[e][0];if(n&&t[n]){let e=t[n];mt(Rr[e]||=new Promise((e,t)=>{b(d),d.addEventListener(`load`,e),d.addEventListener(`error`,t)}))}}let S={tag:e,type:e,props:{...u,ref:x},ref:x};return S.p=n,d&&(S.e=d),Kt(S,a)},Vr=e=>{let t=yt();return(t&&N(t))?.endsWith(`svg`)?{tag:`title`,props:e,type:`title`,ref:e.ref}:Br(`title`,e,void 0,!1,!1)},Hr=e=>!e||[`src`,`async`].some(t=>!e[t])?{tag:`script`,props:e,type:`script`,ref:e.ref}:Br(`script`,e,1,!1,!0),Ur=e=>!e||![`href`,`precedence`].every(t=>t in e)?{tag:`style`,props:e,type:`style`,ref:e.ref}:(e[`data-href`]=e.href,delete e.href,Br(`style`,e,2,!0,!0)),Wr=e=>!e||[`onLoad`,`onError`].some(t=>t in e)||e.rel===`stylesheet`&&(!(`precedence`in e)||`disabled`in e)?{tag:`link`,props:e,type:`link`,ref:e.ref}:Br(`link`,e,1,_(e),!0),Gr=e=>Br(`meta`,e,void 0,!1,!1),Kr=Symbol(),qr=e=>{let{action:t,...n}=e;typeof t!=`function`&&(n.action=t);let[r,i]=P([null,!1]),a=pt(async e=>{let n=e.isTrusted?t:e.detail[Kr];if(typeof n!=`function`)return;e.preventDefault();let r=new FormData(e.target);i([r,!0]);let a=n(r);a instanceof Promise&&(Pr(a),await a),i([null,!0])},[]),o=Lr(e.ref,e=>(e.addEventListener(`submit`,a),()=>{e.removeEventListener(`submit`,a)})),[s,c]=r;return r[1]=!1,{tag:Mr,props:{value:{pending:s!==null,data:s,method:s?`post`:null,action:s?t:null},children:{tag:`form`,props:{...n,ref:o},type:`form`,ref:o}},f:c}},Jr=(e,{formAction:t,...n})=>{if(typeof t==`function`){let e=pt(e=>{e.preventDefault(),e.currentTarget.form.dispatchEvent(new CustomEvent(`submit`,{detail:{[Kr]:t}}))},[]);n.ref=Lr(n.ref,t=>(t.addEventListener(`click`,e),()=>{t.removeEventListener(`click`,e)}))}return{tag:e,props:n,type:e,ref:n.ref}},Yr=e=>Jr(`input`,e),Xr=e=>Jr(`button`,e);Object.assign(h,{title:Vr,script:Hr,style:Ur,link:Wr,meta:Gr,form:qr,input:Yr,button:Xr});var $=(e,t,n)=>(typeof e==`string`&&Fr[e]&&(e=Fr[e]),{tag:e,type:e,props:t,key:n,ref:t.ref}),Zr=e=>$(``,e,void 0),Qr=(({children:e,fallback:n,fallbackRender:r,onError:i})=>{let a=Zr({children:e});return a[t]=e=>{if(e instanceof Promise)throw e;return i?.(e),r?.(e)||n},a}),$r=(({children:e,fallback:n})=>{let r=Zr({children:e});return r[t]=(e,t)=>{if(!(e instanceof Promise))throw e;return e.finally(t),n},r}),ei=0,ti=async e=>{try{return e.flat().map(ni)}catch(t){if(t instanceof Promise){let n=$e();return await t,n(()=>ti(e))}throw t}},ni=e=>{if(e==null||typeof e==`boolean`)return``;if(typeof e==`string`||Array.isArray(e))return k([e]);if(Ne(e))return Pe(e);{let t=e.toString();return t instanceof Promise?t:c(t)}},ri=async({children:e,fallback:t,fallbackRender:n,onError:r})=>{if(!e)return c(``);Array.isArray(e)||(e=[e]);let i=N(ii)?.scriptNonce,a,o=()=>a||=$e(),l,u=()=>l||=(async()=>{let e=await t;if(e==null)return;if(typeof e==`string`||Array.isArray(e))return o()(()=>k([e]));if(Ne(e))return o()(()=>Pe(e));let n=await o()(()=>e.toString());return c(n,n.callbacks||e.callbacks)})(),d=async e=>{let t=await u();return o()(async()=>{r?.(e);let i=t===void 0?n&&Le(j,{},n(e))||``:t,a=await j({children:i}).toString();return c(a,a.callbacks||i.callbacks)})},f=[];try{f=e.map(ni)}catch(t){let n=o();f=t instanceof Promise?[t.then(()=>n(()=>ti(e))).catch(e=>d(e))]:[await d(t)]}if(f.some(e=>e instanceof Promise)){o();let e=ei++,t=RegExp(`(<template id="E:${e}"></template>)(.*?)(<!--E:${e}-->)`,`s`),n=!1,r=async({error:r,buffer:i})=>{if(n)return``;n=!0;let a=await d(r),o=a.callbacks;return i?(i[0]=i[0].replace(t,()=>a),o?.length?c(``,o):``):c(`<template data-hono-target="E:${e}">${a}</template><script>
|
|
2
2
|
((d,c,n) => {
|
|
3
3
|
c=d.currentScript.previousSibling
|
|
4
|
-
d=d.getElementById('E:${
|
|
4
|
+
d=d.getElementById('E:${e}')
|
|
5
5
|
if(!d)return
|
|
6
|
-
do{n=d.nextSibling;n.remove()}while(n.nodeType!=8||n.nodeValue!='E:${
|
|
6
|
+
do{n=d.nextSibling;n.remove()}while(n.nodeType!=8||n.nodeValue!='E:${e}')
|
|
7
7
|
d.replaceWith(c.content)
|
|
8
8
|
})(document)
|
|
9
|
-
<\/script>`,
|
|
9
|
+
<\/script>`,o)},a,l=Promise.all(f).catch(e=>a=e);return c(`<template id="E:${e}"></template><!--E:${e}-->`,[({phase:n,buffer:o,context:u})=>{if(n!==s.BeforeStream)return l.then(async l=>{if(a)throw a;l=l.flat();let d=l.join(``),f=o?``:`<template data-hono-target="E:${e}">${d}</template><script${i?` nonce="${i}"`:``}>
|
|
10
10
|
((d,c) => {
|
|
11
11
|
c=d.currentScript.previousSibling
|
|
12
|
-
d=d.getElementById('E:${
|
|
12
|
+
d=d.getElementById('E:${e}')
|
|
13
13
|
if(!d)return
|
|
14
14
|
d.parentElement.insertBefore(c.content,d.nextSibling)
|
|
15
15
|
})(document)
|
|
16
|
-
<\/script>`;if(
|
|
16
|
+
<\/script>`;if(l.every(e=>!e.callbacks?.length))return o&&(o[0]=o[0].replace(t,()=>d)),f;o&&(o[0]=o[0].replace(t,(e,t,n,r)=>`${t}${d}${r}`));let m=l.map(e=>e.callbacks||[]).flat();n===s.Stream&&(f=await p(f,s.BeforeStream,!0,u));let h=0,g=m.map(n=>(...i)=>n(...i)?.then(n=>(h++,o?(h===m.length&&(o[0]=o[0].replace(t,(e,t,n)=>n)),o[0]+=n,c(``,n.callbacks)):c(n+(h===m.length?`<script>
|
|
17
17
|
((d,c,n) => {
|
|
18
|
-
d=d.getElementById('E:${
|
|
18
|
+
d=d.getElementById('E:${e}')
|
|
19
19
|
if(!d)return
|
|
20
20
|
n=d.nextSibling
|
|
21
|
-
while(n.nodeType!=8||n.nodeValue!='E:${
|
|
21
|
+
while(n.nodeType!=8||n.nodeValue!='E:${e}'){n=n.nextSibling}
|
|
22
22
|
n.remove()
|
|
23
23
|
d.remove()
|
|
24
24
|
})(document)
|
|
25
|
-
<\/script
|
|
25
|
+
<\/script>`:``),n.callbacks))).catch(e=>r({error:e,buffer:o})));return c(f,g)}).catch(e=>r({error:e,buffer:o}))}])}return j({children:f})};ri[e]=Qr;var ii=et(null),ai=0,oi=e=>typeof e==`string`||Array.isArray(e)?k([e]):e==null||typeof e==`boolean`?``:Ne(e)?Pe(e):e.toString(),si=async({children:e,fallback:t})=>{Array.isArray(e)||(e=[e]);let r=N(ii)?.scriptNonce,i=[],a={[n]:[0,[]]},o=()=>{L.pop()};try{a[n][0]=0,L.push([[],a]),i=e.map(oi)}catch(t){if(t instanceof Promise){let r=$e();i=[t.then(()=>r(()=>(a[n][0]=0,L.push([[],a]),ti(e).finally(o))))]}else throw t}finally{o()}if(i.some(e=>e instanceof Promise)){let e=ai++,n=await(typeof t==`string`||Array.isArray(t)?k([t]):Ne(t)?Pe(t):t.toString());return c(`<template id="H:${e}"></template>${n}<!--/$-->`,[...n.callbacks||[],({phase:t,buffer:n,context:a})=>{if(t!==s.BeforeStream)return Promise.all(i).then(async i=>{i=i.flat();let o=i.join(``);n&&(n[0]=n[0].replace(RegExp(`<template id="H:${e}"></template>.*?<!--/\\$-->`,`s`),()=>o));let l=n?``:`<template data-hono-target="H:${e}">${o}</template><script${r?` nonce="${r}"`:``}>
|
|
26
26
|
((d,c,n) => {
|
|
27
27
|
c=d.currentScript.previousSibling
|
|
28
|
-
d=d.getElementById('H:${
|
|
28
|
+
d=d.getElementById('H:${e}')
|
|
29
29
|
if(!d)return
|
|
30
30
|
do{n=d.nextSibling;n.remove()}while(n.nodeType!=8||n.nodeValue!='/$')
|
|
31
31
|
d.replaceWith(c.content)
|
|
32
32
|
})(document)
|
|
33
|
-
<\/script>`,
|
|
34
|
-
${Math.max(0,Math.min(r.current.x+16,document.documentElement.clientWidth-
|
|
35
|
-
${Math.max(0,Math.min(r.current.y+16,document.documentElement.clientHeight-
|
|
33
|
+
<\/script>`,u=i.map(e=>e.callbacks||[]).flat();return u.length?(t===s.Stream&&(l=await p(l,s.BeforeStream,!0,a)),c(l,u)):l})}])}return c(i.join(``))};si[e]=$r,new TextEncoder;var ci=`fh-cursor-face`,li=`/favicon.svg`,ui=e=>{let t=I(null),n=I(null),r=I({x:0,y:0,frame:0,hasPointer:!1}),i=()=>{cancelAnimationFrame(r.current.frame),r.current.frame=0,t.current?.classList.remove(`wg_cursorFace__root--visible`)},a=()=>{n.current?.matches||(r.current.hasPointer=!1,i())},o=()=>{r.current.frame===0&&(r.current.frame=requestAnimationFrame(()=>{r.current.frame=0;let e=t.current;e!==null&&(e.style.transform=`translate3d(
|
|
34
|
+
${Math.max(0,Math.min(r.current.x+16,document.documentElement.clientWidth-e.width-16))}px,
|
|
35
|
+
${Math.max(0,Math.min(r.current.y+16,document.documentElement.clientHeight-e.height-16))}px,
|
|
36
36
|
0
|
|
37
|
-
)`,
|
|
38
|
-
`);if(
|
|
39
|
-
`)},y=()=>{let b=v();if(e.stores===void 0||b===null||u.current===null||z.current||h.current!==w()||h.current==="drawer"&&p.current?.open!==!0)return;let Z=$();if(Z===void 0)return;let j={navigation:Z,pathname:location.pathname,documents:b.scrollTop,outline:u.current.scrollTop};e.stores.scroll.setState(K=>({positions:{...K.positions,[h.current]:j}}))},P=()=>{h.current=w();let b=v(),Z=A();if(e.stores===void 0||b===null||u.current===null||Z===null||h.current==="drawer"&&p.current?.open!==!0)return;let j=$();if(j===void 0)return;let K=e.stores.scroll.getState().positions[h.current];b.scrollTop=0,u.current.scrollTop=0,K===void 0?uo({key:xt,version:1,layout:h.current,toState:bt}):K.navigation===j&&(b.scrollTop=K.documents,K.pathname===location.pathname&&(u.current.scrollTop=K.outline)),Z.dataset.navigationLayout=h.current,z.current=!1,y(),b.dispatchEvent(new Event("scroll")),u.current.dispatchEvent(new Event("scroll"))},L=b=>{p.current?.open!==!0&&(document.body.classList.remove("wg_shell__root--drawerOpen"),o(!1))},ce=()=>{y(),p.current?.close(),document.body.classList.remove("wg_shell__root--drawerOpen"),o(!1)},Q=b=>{w()!=="drawer"||p.current===null||p.current.open||(p.current.showModal(),document.body.classList.add("wg_shell__root--drawerOpen"),o(!0),P())},ze=b=>{ce()},V=b=>{b.preventDefault(),ce()},We=b=>{if(p.current===null||b.target!==p.current)return;let Z=p.current.getBoundingClientRect();(b.clientX<Z.left||b.clientX>Z.right||b.clientY<Z.top||b.clientY>Z.bottom)&&ce()},Ge=b=>{if(y(),p.current?.open!==!0||b.defaultPrevented||b.button!==0||b.metaKey||b.ctrlKey||b.shiftKey||b.altKey||!(b.target instanceof Element))return;let Z=b.target.closest("a[href]");if(!(!(Z instanceof HTMLAnchorElement)||Z.target!==""&&Z.target!=="_self"||Z.hasAttribute("download"))&&(ce(),Z.origin===location.origin&&Z.pathname===location.pathname&&Z.search===location.search&&Z.hash)){let j=ge(Z.hash);j!==null&&(j.tabIndex=-1,j.focus({preventScroll:!0}))}},ae=()=>{let b=w();b!==h.current&&(document.activeElement instanceof HTMLElement&&(_.current={navigation:document.activeElement.closest("[data-navigation]")!==null,drawer:document.activeElement===s.current||document.activeElement.closest("[data-navigation-drawer]")!==null,href:document.activeElement.getAttribute("href")}),b!=="drawer"&&ce(),z.current=!0,h.current=b,at(()=>n(b)))},yn=b=>{!b.persisted||e.stores===void 0||(z.current=!0,at(()=>e.stores?.scroll.persist.rehydrate()),ae(),P())};return I(()=>{if(e.stores!==void 0)return d.current=matchMedia(fn),m.current=matchMedia(pn),d.current.addEventListener("change",ae),m.current.addEventListener("change",ae),addEventListener("pagehide",y),addEventListener("pageshow",yn),()=>{d.current?.removeEventListener("change",ae),m.current?.removeEventListener("change",ae),d.current=null,m.current=null,removeEventListener("pagehide",y),removeEventListener("pageshow",yn),document.body.classList.remove("wg_shell__root--drawerOpen")}},[e.stores]),I(()=>{if(e.stores===void 0)return;let b=!0,Z=()=>{if(!b||(P(),_.current===null))return;let j=A();if(t==="drawer")_.current.navigation&&s.current?.focus({preventScroll:!0});else if(_.current.navigation&&j!==null){let K=_.current.href;[...j.querySelectorAll("a[href]")].find(So=>So.getAttribute("href")===K)?.focus({preventScroll:!0})}else _.current.drawer&&l.current?.focus({preventScroll:!0});_.current=null};return v()?.isConnected?Z():queueMicrotask(Z),()=>{b=!1}},[t,e.stores]),g(R,{children:[g("div",{className:x("wg_navigation__sidebar",e.stores!==void 0&&"wg_navigation__sidebar--navigationReady"),children:[g("div",{className:x("wg_navigation__brandRow"),children:[g("a",{ref:e.stores===void 0?void 0:l,className:x("wg_navigation__brand"),href:"/","aria-current":e.data.home?"page":void 0,children:e.data.title}),g("button",{ref:e.stores===void 0?void 0:s,className:x("wg_navigation__menuToggle",e.stores!==void 0&&t==="drawer"&&"wg_navigation__menuToggle--visible"),type:"button","aria-label":fo,"aria-controls":"fh-navigation-drawer","aria-expanded":String(r),"data-navigation-open":"",onClick:Q,children:g("svg",{className:x("wg_navigation__menuIcon"),viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:g("path",{d:"M4 6h16M4 12h16M4 18h16"})})})]}),t!=="drawer"&&g("div",{ref:e.stores===void 0?void 0:i,className:x("wg_navigation__navigation"),"data-navigation":"",children:g(vt,{portRef:a,kind:"documents",ready:e.stores!==void 0,onScroll:y,onClick:Ge,children:g(mn,{groups:e.data.groups})})})]}),g("aside",{className:x("wg_navigation__tocRail"),"data-navigation-rail":"",children:g("div",{className:x("wg_navigation__outline"),"data-navigation-outline":"",children:g(vt,{portRef:u,kind:"outline",ready:e.stores!==void 0,onScroll:y,onClick:Ge,children:e.data.outline.length>0&&g(ho,{groups:e.data.outline})})})}),g("dialog",{ref:e.stores===void 0?void 0:p,className:x("wg_navigation__drawer"),id:"fh-navigation-drawer","aria-labelledby":"fh-navigation-title","data-navigation-drawer":"",onClose:L,onCancel:V,onClick:We,children:[g("div",{className:x("wg_navigation__drawerHeader"),children:[g("h2",{className:x("wg_navigation__drawerTitle"),id:"fh-navigation-title",children:mo}),g("button",{className:x("wg_navigation__drawerClose"),type:"button","aria-label":po,"data-navigation-close":"",onClick:ze,children:g("svg",{className:x("wg_navigation__menuIcon"),viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:g("path",{d:"m6 6 12 12M18 6 6 18"})})})]}),g("div",{className:x("wg_navigation__drawerContent"),"data-navigation-content":"",children:t==="drawer"&&g("div",{ref:e.stores===void 0?void 0:c,className:x("wg_navigation__navigation"),"data-navigation":"",children:g(vt,{portRef:f,kind:"documents",ready:e.stores!==void 0,onScroll:y,onClick:Ge,children:g(mn,{groups:e.data.groups})})})})]})]})};var vo=e=>{let t=E(null),n=E(0),r=E(null),o=E(null),i=E(null),a=()=>{clearTimeout(n.current),n.current=0,r.current?.abort(),r.current=null,t.current?.classList.remove("wg_prose__headingText--highlighted"),t.current=null},c=m=>{m.target===document&&(clearTimeout(n.current),r.current?.abort(),r.current=null,n.current=window.setTimeout(a,3e3))},f=m=>{a(),t.current=m===null?null:m.querySelector(".wg_prose__headingText"),t.current!==null&&(t.current.classList.add("wg_prose__headingText--highlighted"),n.current=window.setTimeout(a,3e3),r.current=new AbortController,document.addEventListener("scrollend",c,{signal:r.current.signal}))},u=m=>{if(m.defaultPrevented||m.button!==0||m.metaKey||m.ctrlKey||m.shiftKey||m.altKey)return;let h=m.target instanceof Element?m.target.closest("a[href]"):null;if(h instanceof HTMLAnchorElement&&(h.target===""||h.target==="_self")&&!h.hasAttribute("download")&&h.origin===location.origin&&h.pathname===location.pathname&&h.search===location.search&&h.hash){let _=ge(h.hash);h.hash===location.hash&&f(_)}},p=()=>{let m=ge(location.hash);m?.scrollIntoView(),f(m)},s=()=>{i.current?.abort()},l=async()=>{let m=o.current,h=location.hash,_=ge(h);await document.fonts.ready,!(m===null||m.signal.aborted)&&(_!==null&&!i.current?.signal.aborted&&h===location.hash&&(_.scrollIntoView({behavior:"instant"}),f(_)),document.documentElement.style.removeProperty("scroll-behavior"))},d=()=>{ge(location.hash),document.readyState==="complete"&&l()};return I(()=>{let m=new AbortController;o.current=m,i.current=new AbortController,document.documentElement.style.scrollBehavior="auto",document.addEventListener("click",u,{signal:m.signal}),addEventListener("hashchange",p,{signal:m.signal}),addEventListener("load",l,{once:!0,signal:m.signal});for(let h of["wheel","touchmove","keydown","mousedown"])addEventListener(h,s,{once:!0,passive:!0,signal:m.signal});return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",d,{once:!0,signal:m.signal}):d(),()=>{m.abort(),o.current=null,i.current?.abort(),i.current=null,a(),document.documentElement.style.removeProperty("scroll-behavior")}},[]),nt(()=>{if(!e.reload||o.current===null)return;let m=new EventSource(io);return m.onmessage=()=>location.reload(),()=>m.close()},[e.reload]),g(R,{children:[g("div",{className:x("wg_shellControls__navigation"),children:g(go,{data:e.data,stores:e.stores})}),e.data.cursorFace&&g(ao,{ready:e.stores!==void 0})]})};function _n(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var i;let a=f=>f===null?null:JSON.parse(f,t?.reviver),c=(i=n.getItem(o))!=null?i:null;return c instanceof Promise?c.then(a):a(c)},setItem:(o,i)=>n.setItem(o,JSON.stringify(i,t?.replacer)),removeItem:o=>n.removeItem(o)}}var gn=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(r){return gn(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return gn(r)(n)}}}},us=(e,t)=>(n,r,o)=>{let i={storage:_n(()=>window.localStorage),partialize:_=>_,version:0,merge:(_,z)=>({...z,..._}),...t},a=!1,c=0,f=new Set,u=new Set,p=i.storage;if(!p)return e((..._)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(..._)},r,o);let s=()=>{let _=i.partialize({...r()});return p.setItem(i.name,{state:_,version:i.version})},l=o.setState;o.setState=(_,z)=>(l(_,z),s());let d=e((..._)=>(n(..._),s()),r,o);o.getInitialState=()=>d;let m,h=()=>{var _,z;if(!p)return;let w=++c;a=!1,f.forEach(v=>{var $;return v(($=r())!=null?$:d)});let A=((z=i.onRehydrateStorage)==null?void 0:z.call(i,(_=r())!=null?_:d))||void 0;return gn(p.getItem.bind(p))(i.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==i.version){if(i.migrate){let $=i.migrate(v.state,v.version);return $ instanceof Promise?$.then(y=>[!0,y]):[!0,$]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,v.state];return[!1,void 0]}).then(v=>{var $;if(w!==c)return;let[y,P]=v;if(m=i.merge(P,($=r())!=null?$:d),n(m,!0),y)return s()}).then(()=>{w===c&&(A?.(r(),void 0),m=r(),a=!0,u.forEach(v=>v(m)))}).catch(v=>{w===c&&A?.(void 0,v)})};return o.persist={setOptions:_=>{i={...i,..._},_.storage&&(p=_.storage)},clearStorage:()=>{++c,p?.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:_=>(f.add(_),()=>{f.delete(_)}),onFinishHydration:_=>(u.add(_),()=>{u.delete(_)})},i.skipHydration||h(),m||d},yo=us;var xo=e=>{let t,n=new Set,r=(u,p)=>{let s=typeof u=="function"?u(t):u;if(!Object.is(s,t)){let l=t;t=p??(typeof s!="object"||s===null)?s:Object.assign({},t,s),n.forEach(d=>d(t,l))}},o=()=>t,c={setState:r,getState:o,getInitialState:()=>f,subscribe:u=>(n.add(u),()=>n.delete(u))},f=t=e(r,o,c);return c},bo=(e=>e?xo(e):xo);var wo=e=>{let t=n=>({getItem:r=>n().getItem(r),setItem:(r,o)=>{try{return n().setItem(r,o)}catch{}},removeItem:r=>{try{return n().removeItem(r)}catch{}}});return{scroll:bo()(yo(()=>({positions:{}}),{name:xt,version:1,storage:_n(()=>t(e.session)),merge:n=>bt(n),migrate:()=>({positions:{}})}))}};var vn=document.querySelector("[data-shell-browser-root]"),$o=document.getElementById("fh-navigation-data");if(vn!==null&&$o!==null)try{let e=JSON.parse($o.textContent),t=Fr.parse(e),n=wo({session:()=>sessionStorage});Jn(vn).render(g(vo,{data:t,stores:n,reload:vn.hasAttribute("data-shell-reload")}))}catch(e){console.error("for-humanity browser initialization failed",e)}})();
|
|
37
|
+
)`,e.classList.add(`wg_cursorFace__root--visible`))}))},s=e=>{!n.current?.matches||e.pointerType!==`mouse`?(r.current.hasPointer=!1,i()):(r.current.x=e.clientX,r.current.y=e.clientY,r.current.hasPointer=!0,o())},c=()=>{t.current?.classList.contains(`wg_cursorFace__root--visible`)&&o()},l=()=>{if(r.current.hasPointer)try{sessionStorage.setItem(ci,JSON.stringify({x:r.current.x,y:r.current.y}))}catch{}},u=()=>{try{let e=sessionStorage.getItem(ci);if(sessionStorage.removeItem(ci),e===null||!n.current?.matches)return;let t=JSON.parse(e);typeof t==`object`&&t&&`x`in t&&`y`in t&&typeof t.x==`number`&&typeof t.y==`number`&&Number.isFinite(t.x)&&Number.isFinite(t.y)&&(r.current.x=t.x,r.current.y=t.y,r.current.hasPointer=!0,o())}catch{}};return F(()=>{if(!e.ready)return;let t=new AbortController,r=matchMedia(`(hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference)`);return n.current=r,u(),document.addEventListener(`pointermove`,s,{passive:!0,signal:t.signal}),document.addEventListener(`pointerdown`,s,{passive:!0,signal:t.signal}),document.documentElement.addEventListener(`pointerleave`,i,{signal:t.signal}),addEventListener(`blur`,i,{signal:t.signal}),addEventListener(`resize`,c,{signal:t.signal}),addEventListener(`pagehide`,l,{signal:t.signal}),addEventListener(`pageshow`,u,{signal:t.signal}),r.addEventListener(`change`,a,{signal:t.signal}),()=>{t.abort(),n.current=null,i()}},[e.ready]),$(`img`,{ref:e.ready?t:void 0,className:Q(`wg_cursorFace__root`),src:li,width:24,height:24,alt:``,"aria-hidden":`true`,draggable:!1,"data-cursor-face":``})},di=`다이어그램을 불러오지 못했습니다. 원문을 확인해 주세요.`,fi=`다이어그램을 그리지 못했습니다. 원문을 확인해 주세요.`,pi=5e4,mi={startOnLoad:!1,securityLevel:`strict`,suppressErrorRendering:!0,maxTextSize:pi},hi={...mi,theme:`redux-dark-color`,themeVariables:{treeView:{labelColor:`currentColor`,lineColor:`currentColor`}}},gi=e=>{let t={requested:0,completed:0,running:!1};return async()=>{if(t.requested+=1,!t.running){t.running=!0;try{for(;t.completed!==t.requested;){let n=t.requested;try{await e.run()}catch(t){e.onError(t)}finally{t.completed=n}}}finally{t.running=!1}}}},_i=e=>(ft(()=>{let t=new AbortController,n=matchMedia(`(prefers-color-scheme: dark)`),r=new Set,i=new Set,a=new Set,o=e=>{if(e.target instanceof Element&&e.target.closest(`[title]`)!==null)for(let e of a){e.hidden=!1;let t=e.getBoundingClientRect();e.style.left=`${scrollX+Math.max(0,Math.min(t.left,document.documentElement.clientWidth-t.width))}px`}},s=()=>{for(let e of a)e.hidden=!0},c=gi({run:async()=>{let c=[...document.querySelectorAll(`.wg_mermaid__root[data-mermaid]`)],l=c[0]?.dataset.mermaidModule;if(l===void 0||t.signal.aborted)return;let u=n.matches?`dark`:`light`,d=c.filter(e=>e.checkVisibility({visibilityProperty:!0})&&e.dataset.mermaidTheme!==u);if(d.length===0)return;let f=await import(l);if(await document.fonts.ready,!t.signal.aborted){for(let e of d){if(t.signal.aborted||!e.isConnected||n.matches!==(u===`dark`))return;let c=e.querySelector(`.wg_mermaid__source`),l=e.querySelector(`.wg_mermaid__result`),d=e.querySelector(`.wg_mermaid__error`);if(c===null||l===null||d===null)continue;let p=document.createElement(`div`);p.className=`wg_mermaid__measurement`,r.add(p),document.body.append(p);try{if(c.textContent.length>5e4)throw Error(`Mermaid source exceeds ${pi} characters`);f.default.initialize(u===`dark`?hi:mi);let r=await f.default.render(`fh-mermaid-${crypto.getRandomValues(new Uint32Array(4)).join(`-`)}`,c.textContent,p);if(t.signal.aborted||!e.isConnected||n.matches!==(u===`dark`))return;let i=l.shadowRoot??l.attachShadow({mode:`open`}),m=document.createElement(`div`);m.innerHTML=r.svg,i.replaceChildren(m),r.bindFunctions?.(m),m.addEventListener(`mouseover`,o,{signal:t.signal}),m.addEventListener(`mouseout`,s,{signal:t.signal});let h=document.querySelector(`.mermaidTooltip`);h!==null&&(h.classList.add(`wg_mermaid__tooltip`),a.add(h)),l.hidden=!1,c.hidden=!0,d.hidden=!0,e.dataset.mermaidStatus=`rendered`}catch(n){if(t.signal.aborted)return;l.hidden=!0,c.hidden=!1,d.textContent=fi,d.hidden=!1,e.dataset.mermaidStatus=`error`,console.error(`for-humanity Mermaid rendering failed`,n)}finally{p.remove(),r.delete(p)}e.dataset.mermaidTheme=u,i.add(e)}e.onRendered?.()}},onError:e=>{if(!t.signal.aborted){for(let e of document.querySelectorAll(`.wg_mermaid__root[data-mermaid]`)){let t=e.querySelector(`.wg_mermaid__error`);t!==null&&(i.add(e),t.textContent=di,t.hidden=!1)}console.error(`for-humanity Mermaid loading failed`,e)}}}),l=()=>{s(),c()};return n.addEventListener(`change`,l,{signal:t.signal}),addEventListener(`resize`,s,{signal:t.signal}),document.addEventListener(`toggle`,l,{capture:!0,signal:t.signal}),document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,l,{once:!0,signal:t.signal}):l(),()=>{t.abort();for(let e of r)e.remove();r.clear();for(let e of a)e.remove();a.clear();for(let e of i){let t=e.querySelector(`.wg_mermaid__source`),n=e.querySelector(`.wg_mermaid__result`),r=e.querySelector(`.wg_mermaid__error`);n?.shadowRoot?.replaceChildren(),n!==null&&(n.hidden=!0),t!==null&&(t.hidden=!1),r!==null&&(r.hidden=!0),delete e.dataset.mermaidTheme,delete e.dataset.mermaidStatus}i.clear()}},[e.onRendered]),null),vi=`(width < 1024px)`,yi=`(width >= 1360px)`,bi=e=>{let t=document.querySelector(`[data-navigation]`),n=document.querySelector(`[data-navigation-scroll="documents"]`),r=document.querySelector(`[data-navigation-scroll="outline"]`);if(t&&n&&r){t.dataset.navigationLayout=e.layout;try{let i=sessionStorage.getItem(e.key),a=i===null?void 0:JSON.parse(i),o=typeof a==`object`&&a&&`version`in a&&a.version===e.version&&`state`in a?e.toState(a.state):{positions:{}},s=sessionStorage.getItem(`${e.key}:${e.layout===`drawer`?`drawer`:`desktop`}`),c=o.positions[e.layout]===void 0&&s!==null?e.toState({positions:{[e.layout]:JSON.parse(s)}}).positions[e.layout]:void 0,l=o.positions[e.layout]??c,u=[...t.querySelectorAll(`.wg_navigationNav__root a[href]`)].map(e=>`${e.pathname}:${e.textContent}`).join(`
|
|
38
|
+
`);if(l===void 0||l.navigation!==u)return;n.scrollTop=l.documents,l.pathname===location.pathname&&(r.scrollTop=l.outline)}catch{}}},xi=e=>{let t=[...e.group.docs.map(e=>({kind:`document`,key:`doc:${e.id}`,doc:e})),...e.group.groups.map(e=>({kind:`group`,key:`group:${JSON.stringify(e.path)}`,group:e}))];return $(`ul`,{className:Q(`wg_navigationNavList__root`),"aria-label":e.group.name,children:t.map(t=>$(`li`,{className:Q(`wg_navigationNavList__item`),children:[t.kind===`document`&&$(j,{children:[$(`a`,{className:Q(`wg_navigationNavList__link`,{"wg_navigationNavList__link--active":t.doc.active}),href:`/${t.doc.id}/`,title:t.doc.label,"aria-current":t.doc.active?`page`:void 0,children:t.doc.name}),t.doc.children.length>0&&$(xi,{group:{name:t.doc.name,path:e.group.path,docs:t.doc.children,groups:[]}})]}),t.kind===`group`&&$(j,{children:[$(`span`,{className:Q(`wg_navigationNavList__branch`),children:t.group.name}),$(xi,{group:t.group})]})]},t.key))})},Si=`Document navigation`,Ci=`Open navigation`,wi=`Close navigation`,Ti=`Navigation`,Ei=`On this page`,Di=e=>$(`nav`,{className:Q(`wg_navigationNav__root`),"aria-label":Si,children:$(`div`,{className:Q(`wg_navigationNav__docs`),children:e.groups.map(e=>$(`section`,{className:Q(`wg_navigationNav__docGroup`),"aria-label":e.name,children:[$(`div`,{className:Q(`wg_navigationNav__group`),children:e.name}),$(xi,{group:e})]},JSON.stringify(e.path)))})}),Oi=e=>{let[t,n]=P({above:!1,below:!1}),r=I(0),i=()=>{if(r.current=0,e.portRef.current===null)return;let t=e.portRef.current.scrollTop>1,i=e.portRef.current.scrollHeight-e.portRef.current.clientHeight-e.portRef.current.scrollTop>1;n(e=>e.above===t&&e.below===i?e:{above:t,below:i})},a=()=>{r.current===0&&(r.current=requestAnimationFrame(i))};return F(()=>{if(!e.ready||e.portRef.current===null)return;let t=new ResizeObserver(a);t.observe(e.portRef.current),e.portRef.current.firstElementChild!==null&&t.observe(e.portRef.current.firstElementChild);let n=!0;return addEventListener(`pageshow`,a),e.portRef.current.isConnected?i():queueMicrotask(()=>{n&&i()}),()=>{n=!1,t.disconnect(),removeEventListener(`pageshow`,a),cancelAnimationFrame(r.current),r.current=0}},[e.portRef,e.ready]),F(()=>{e.ready&&e.portRef.current?.isConnected&&i()},[e.children,e.ready]),$(`div`,{ref:e.ready?e.portRef:void 0,className:Q(`wg_navigation__scroll`,e.kind===`documents`&&`wg_navigation__documents`,e.kind===`outline`&&`wg_navigation__headings`,e.ready&&`wg_navigation__scroll--ready`,e.ready&&t.above&&`wg_navigation__scroll--above`,e.ready&&t.below&&`wg_navigation__scroll--below`),"data-navigation-scroll":e.kind,onClick:e.onClick,onScroll:t=>{e.onScroll?.(),a()},children:e.children})},ki=e=>{if(!e)return null;try{return document.getElementById(decodeURIComponent(e.slice(1)))}catch(e){if(e instanceof URIError)return null;throw e}},Ai=e=>{let[t,n]=P();return F(()=>{let t=e.groups.flatMap(e=>e.sections).flatMap(e=>[e.heading,...e.subs.map(e=>e.heading)]),r={id:0},i=()=>{r.id=0;let e=t.flatMap(e=>{let t=ki(`#${e.slug}`);return t?.checkVisibility()?[{slug:e.slug,top:t.getBoundingClientRect().top-Number.parseFloat(getComputedStyle(t).scrollMarginTop)}]:[]});n(e.findLast(e=>e.top<=1)?.slug??e[0]?.slug)},a=()=>{r.id===0&&(r.id=requestAnimationFrame(i))};return addEventListener(`scroll`,a,{passive:!0}),addEventListener(`resize`,a),addEventListener(`toggle`,a,!0),addEventListener(`pageshow`,a),document.addEventListener(`DOMContentLoaded`,a),document.readyState!==`loading`&&i(),()=>{cancelAnimationFrame(r.id),removeEventListener(`scroll`,a),removeEventListener(`resize`,a),removeEventListener(`toggle`,a,!0),removeEventListener(`pageshow`,a),document.removeEventListener(`DOMContentLoaded`,a)}},[e.groups]),$(`nav`,{className:Q(`wg_navigationToc__root`),"aria-label":Ei,children:[$(`div`,{className:Q(`wg_navigationToc__label`),children:Ei}),e.groups.map(e=>$(`div`,{className:Q(`wg_navigationToc__groupSection`,{"wg_navigationToc__groupSection--named":e.part!==void 0}),children:[e.part!==void 0&&$(`div`,{className:Q(`wg_navigationToc__group`),children:e.part}),$(`ul`,{className:Q(`wg_navigationToc__list`),children:e.sections.map(e=>$(`li`,{className:Q(`wg_navigationToc__item`),children:[$(`a`,{className:Q(`wg_navigationToc__link`,{"wg_navigationToc__link--active":e.heading.slug===t}),href:`#${e.heading.slug}`,"data-toc-link":``,"aria-current":e.heading.slug===t?`location`:void 0,children:e.heading.text}),e.subs.length>0&&$(`ul`,{className:Q(`wg_navigationToc__sub`),children:e.subs.map(e=>$(`li`,{className:Q(`wg_navigationToc__subItem`),children:$(`a`,{className:Q(`wg_navigationToc__subLink`,{"wg_navigationToc__subLink--active":e.heading.slug===t}),href:`#${e.heading.slug}`,"data-toc-sub-link":``,"aria-current":e.heading.slug===t?`location`:void 0,children:e.heading.text})},e.heading.slug))})]},e.heading.slug))})]},e.sections[0].heading.slug))]})},ji=`for-humanity:navigation-scroll`,Mi=e=>{let t=e=>{if(!(typeof e!=`object`||!e||!(`navigation`in e)||typeof e.navigation!=`string`||!(`pathname`in e)||typeof e.pathname!=`string`||!(`documents`in e)||typeof e.documents!=`number`||!Number.isFinite(e.documents)||e.documents<0||!(`outline`in e)||typeof e.outline!=`number`||!Number.isFinite(e.outline)||e.outline<0))return{navigation:e.navigation,pathname:e.pathname,documents:e.documents,outline:e.outline}};if(typeof e!=`object`||!e||!(`positions`in e)||typeof e.positions!=`object`||e.positions===null)return{positions:{}};let n={wide:t(`wide`in e.positions?e.positions.wide:void 0),desktop:t(`desktop`in e.positions?e.positions.desktop:void 0),drawer:t(`drawer`in e.positions?e.positions.drawer:void 0)};return{positions:Object.fromEntries(Object.entries(n).filter(e=>e[1]!==void 0))}},Ni=e=>{let t=ki(e);for(let e=t?.closest(`details`);e;e=e.parentElement?.closest(`details`))e.open=!0;return t},Pi=e=>{let[t,n]=P(()=>e.stores===void 0?`desktop`:matchMedia(`(width < 1024px)`).matches?`drawer`:matchMedia(`(width >= 1360px)`).matches?`wide`:`desktop`),[r,i]=P(!1),a=I(null),o=I(null),s=I(null),c=I(null),l=I(null),u=I(null),d=I(null),f=I(null),p=I(null),m=I(null),h=I(t),g=I(null),_=I(!0),v=()=>p.current===null||m.current===null?h.current:p.current.matches?`drawer`:m.current.matches?`wide`:`desktop`,y=()=>h.current===`drawer`?s.current:a.current,b=()=>h.current===`drawer`?c.current:o.current,x=()=>{let e=y();if(e!==null)return[...e.querySelectorAll(`.wg_navigationNav__root a[href]`)].map(e=>`${e.pathname}:${e.textContent}`).join(`
|
|
39
|
+
`)},S=()=>{let t=b();if(e.stores===void 0||t===null||l.current===null||_.current||h.current!==v()||h.current===`drawer`&&u.current?.open!==!0)return;let n=x();if(n===void 0)return;let r={navigation:n,pathname:location.pathname,documents:t.scrollTop,outline:l.current.scrollTop};e.stores.scroll.setState(e=>({positions:{...e.positions,[h.current]:r}}))},ee=()=>{h.current=v();let t=b(),n=y();if(e.stores===void 0||t===null||l.current===null||n===null||h.current===`drawer`&&u.current?.open!==!0)return;let r=x();if(r===void 0)return;let i=e.stores.scroll.getState().positions[h.current];t.scrollTop=0,l.current.scrollTop=0,i===void 0?bi({key:ji,version:1,layout:h.current,toState:Mi}):i.navigation===r&&(t.scrollTop=i.documents,i.pathname===location.pathname&&(l.current.scrollTop=i.outline)),n.dataset.navigationLayout=h.current,_.current=!1,S(),t.dispatchEvent(new Event(`scroll`)),l.current.dispatchEvent(new Event(`scroll`))},te=e=>{u.current?.open!==!0&&(document.body.classList.remove(`wg_shell__root--drawerOpen`),i(!1))},C=()=>{S(),u.current?.close(),document.body.classList.remove(`wg_shell__root--drawerOpen`),i(!1)},w=e=>{v()!==`drawer`||u.current===null||u.current.open||(u.current.showModal(),document.body.classList.add(`wg_shell__root--drawerOpen`),i(!0),ee())},ne=e=>{C()},re=e=>{e.preventDefault(),C()},ie=e=>{if(u.current===null||e.target!==u.current)return;let t=u.current.getBoundingClientRect();(e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom)&&C()},ae=e=>{if(S(),u.current?.open!==!0||e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||!(e.target instanceof Element))return;let t=e.target.closest(`a[href]`);if(!(!(t instanceof HTMLAnchorElement)||t.target!==``&&t.target!==`_self`||t.hasAttribute(`download`))&&(C(),t.origin===location.origin&&t.pathname===location.pathname&&t.search===location.search&&t.hash)){let e=Ni(t.hash);e!==null&&(e.tabIndex=-1,e.focus({preventScroll:!0}))}},T=()=>{let e=v();e!==h.current&&(document.activeElement instanceof HTMLElement&&(g.current={navigation:document.activeElement.closest(`[data-navigation]`)!==null,drawer:document.activeElement===d.current||document.activeElement.closest(`[data-navigation-drawer]`)!==null,href:document.activeElement.getAttribute(`href`)}),e!==`drawer`&&C(),_.current=!0,h.current=e,Gt(()=>n(e)))},oe=t=>{t.persisted&&e.stores!==void 0&&(_.current=!0,Gt(()=>e.stores?.scroll.persist.rehydrate()),T(),ee())};return F(()=>{if(e.stores!==void 0)return p.current=matchMedia(vi),m.current=matchMedia(yi),p.current.addEventListener(`change`,T),m.current.addEventListener(`change`,T),addEventListener(`pagehide`,S),addEventListener(`pageshow`,oe),()=>{p.current?.removeEventListener(`change`,T),m.current?.removeEventListener(`change`,T),p.current=null,m.current=null,removeEventListener(`pagehide`,S),removeEventListener(`pageshow`,oe),document.body.classList.remove(`wg_shell__root--drawerOpen`)}},[e.stores]),F(()=>{if(e.stores===void 0)return;let n=!0,r=()=>{if(!n||(ee(),g.current===null))return;let e=y();if(t===`drawer`)g.current.navigation&&d.current?.focus({preventScroll:!0});else if(g.current.navigation&&e!==null){let t=g.current.href;[...e.querySelectorAll(`a[href]`)].find(e=>e.getAttribute(`href`)===t)?.focus({preventScroll:!0})}else g.current.drawer&&f.current?.focus({preventScroll:!0});g.current=null};return b()?.isConnected?r():queueMicrotask(r),()=>{n=!1}},[t,e.stores]),$(j,{children:[$(`div`,{className:Q(`wg_navigation__sidebar`,e.stores!==void 0&&`wg_navigation__sidebar--navigationReady`),children:[$(`div`,{className:Q(`wg_navigation__brandRow`),children:[$(`a`,{ref:e.stores===void 0?void 0:f,className:Q(`wg_navigation__brand`),href:`/`,"aria-current":e.data.home?`page`:void 0,children:e.data.title}),$(`button`,{ref:e.stores===void 0?void 0:d,className:Q(`wg_navigation__menuToggle`,e.stores!==void 0&&t===`drawer`&&`wg_navigation__menuToggle--visible`),type:`button`,"aria-label":Ci,"aria-controls":`fh-navigation-drawer`,"aria-expanded":String(r),"data-navigation-open":``,onClick:w,children:$(`svg`,{className:Q(`wg_navigation__menuIcon`),viewBox:`0 0 24 24`,"aria-hidden":`true`,focusable:`false`,children:$(`path`,{d:`M4 6h16M4 12h16M4 18h16`})})})]}),t!==`drawer`&&$(`div`,{ref:e.stores===void 0?void 0:a,className:Q(`wg_navigation__navigation`),"data-navigation":``,children:$(Oi,{portRef:o,kind:`documents`,ready:e.stores!==void 0,onScroll:S,onClick:ae,children:$(Di,{groups:e.data.groups})})})]}),$(`aside`,{className:Q(`wg_navigation__tocRail`),"data-navigation-rail":``,children:$(`div`,{className:Q(`wg_navigation__outline`),"data-navigation-outline":``,children:$(Oi,{portRef:l,kind:`outline`,ready:e.stores!==void 0,onScroll:S,onClick:ae,children:e.data.outline.length>0&&$(Ai,{groups:e.data.outline})})})}),$(`dialog`,{ref:e.stores===void 0?void 0:u,className:Q(`wg_navigation__drawer`),id:`fh-navigation-drawer`,"aria-labelledby":`fh-navigation-title`,"data-navigation-drawer":``,onClose:te,onCancel:re,onClick:ie,children:[$(`div`,{className:Q(`wg_navigation__drawerHeader`),children:[$(`h2`,{className:Q(`wg_navigation__drawerTitle`),id:`fh-navigation-title`,children:Ti}),$(`button`,{className:Q(`wg_navigation__drawerClose`),type:`button`,"aria-label":wi,"data-navigation-close":``,onClick:ne,children:$(`svg`,{className:Q(`wg_navigation__menuIcon`),viewBox:`0 0 24 24`,"aria-hidden":`true`,focusable:`false`,children:$(`path`,{d:`m6 6 12 12M18 6 6 18`})})})]}),$(`div`,{className:Q(`wg_navigation__drawerContent`),"data-navigation-content":``,children:t===`drawer`&&$(`div`,{ref:e.stores===void 0?void 0:s,className:Q(`wg_navigation__navigation`),"data-navigation":``,children:$(Oi,{portRef:c,kind:`documents`,ready:e.stores!==void 0,onScroll:S,onClick:ae,children:$(Di,{groups:e.data.groups})})})})]})]})},Fi=3e3,Ii=e=>{let t=I(null),n=I(0),r=I(null),i=I(null),a=I(null),o=()=>{clearTimeout(n.current),n.current=0,r.current?.abort(),r.current=null,t.current?.classList.remove(`wg_prose__headingText--highlighted`),t.current=null},s=e=>{e.target===document&&(clearTimeout(n.current),r.current?.abort(),r.current=null,n.current=window.setTimeout(o,Fi))},c=e=>{o(),t.current=e===null?null:e.querySelector(`.wg_prose__headingText`),t.current!==null&&(t.current.classList.add(`wg_prose__headingText--highlighted`),n.current=window.setTimeout(o,Fi),r.current=new AbortController,document.addEventListener(`scrollend`,s,{signal:r.current.signal}))},l=e=>{if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target instanceof Element?e.target.closest(`a[href]`):null;if(t instanceof HTMLAnchorElement&&(t.target===``||t.target===`_self`)&&!t.hasAttribute(`download`)&&t.origin===location.origin&&t.pathname===location.pathname&&t.search===location.search&&t.hash){let e=Ni(t.hash);t.hash===location.hash&&c(e)}},u=()=>{let e=Ni(location.hash);e?.scrollIntoView(),c(e)},d=()=>{a.current?.abort()},f=async()=>{let e=i.current,t=location.hash,n=Ni(t);await document.fonts.ready,!(e===null||e.signal.aborted)&&(n!==null&&!a.current?.signal.aborted&&t===location.hash&&(n.scrollIntoView({behavior:`instant`}),c(n)),document.documentElement.style.removeProperty(`scroll-behavior`))},p=()=>{Ni(location.hash),document.readyState===`complete`&&f()};return F(()=>{let e=new AbortController;i.current=e,a.current=new AbortController,document.documentElement.style.scrollBehavior=`auto`,document.addEventListener(`click`,l,{signal:e.signal}),addEventListener(`hashchange`,u,{signal:e.signal}),addEventListener(`load`,f,{once:!0,signal:e.signal});for(let t of[`wheel`,`touchmove`,`keydown`,`mousedown`])addEventListener(t,d,{once:!0,passive:!0,signal:e.signal});return document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,p,{once:!0,signal:e.signal}):p(),()=>{e.abort(),i.current=null,a.current?.abort(),a.current=null,o(),document.documentElement.style.removeProperty(`scroll-behavior`)}},[]),$(j,{children:[$(`div`,{className:Q(`wg_shellControls__navigation`),children:$(Pi,{data:e.data,stores:e.stores})}),e.data.cursorFace&&$(ui,{ready:e.stores!==void 0}),$(_i,{onRendered:f})]})};function Li(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var Ri=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return Ri(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return Ri(t)(e)}}}},zi=(e,t)=>(n,r,i)=>{let a={storage:Li(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(e,t)=>(f(e,t),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{if(!u)return;let e=++s;o=!1,c.forEach(e=>e(r()??p));let t=a.onRehydrateStorage?.call(a,r()??p)||void 0;return Ri(u.getItem.bind(u))(a.name).then(e=>{if(e){if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state]}return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{e===s&&(t?.(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{++s,u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p},Bi=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},Vi=(e=>e?Bi(e):Bi),Hi=e=>{let t=e=>({getItem:t=>e().getItem(t),setItem:(t,n)=>{try{return e().setItem(t,n)}catch{}},removeItem:t=>{try{return e().removeItem(t)}catch{}}});return{scroll:Vi()(zi(()=>({positions:{}}),{name:ji,version:1,storage:Li(()=>t(e.session)),merge:e=>Mi(e),migrate:()=>({positions:{}})}))}},Ui=document.querySelector(`[data-shell-browser-root]`),Wi=document.getElementById(`fh-navigation-data`);if(Ui!==null&&Wi!==null)try{let e=JSON.parse(Wi.textContent),t=Ar.parse(e),n=Hi({session:()=>sessionStorage});qt(Ui).render($(Ii,{data:t,stores:n}))}catch(e){console.error(`for-humanity browser initialization failed`,e)}})();
|