@heycys/gallery 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (465) hide show
  1. package/THIRD-PARTY-NOTICES.md +51 -1
  2. package/browser/editor/components/callout/index.mjs +40 -15
  3. package/browser/editor/components/columns/page.mjs +45 -32
  4. package/browser/editor/components/details/index.mjs +2 -1
  5. package/browser/editor/components/dialog/index.mjs +2 -1
  6. package/browser/editor/components/dialog/page.mjs +0 -18
  7. package/browser/editor/components/divider/index.mjs +1 -1
  8. package/browser/editor/components/embed/index.mjs +2 -2
  9. package/browser/editor/components/figure/page.mjs +10 -1
  10. package/browser/editor/components/file/page.mjs +2 -2
  11. package/browser/editor/components/flowchart/add.mjs +7 -6
  12. package/browser/editor/components/flowchart/page.mjs +1 -1
  13. package/browser/editor/components/heading/index.mjs +2 -0
  14. package/browser/editor/components/heading/page.mjs +6 -0
  15. package/browser/editor/components/highlight/index.mjs +4 -20
  16. package/browser/editor/components/icons.mjs +13 -2
  17. package/browser/editor/components/image/crop.mjs +6 -9
  18. package/browser/editor/components/image/page.mjs +2 -2
  19. package/browser/editor/components/installed/index.mjs +82 -29
  20. package/browser/editor/components/installed/page.mjs +146 -34
  21. package/browser/editor/components/installed/served.mjs +6 -5
  22. package/browser/editor/components/instances.mjs +18 -0
  23. package/browser/editor/components/kit.mjs +3 -0
  24. package/browser/editor/components/list/page.mjs +3 -6
  25. package/browser/editor/components/media/page.mjs +44 -14
  26. package/browser/editor/components/pages.mjs +2 -2
  27. package/browser/editor/components/registry.mjs +68 -33
  28. package/browser/editor/components/section/index.mjs +2 -1
  29. package/browser/editor/components/set-apart.mjs +24 -0
  30. package/browser/editor/components/table/index.mjs +64 -5
  31. package/browser/editor/components/table/page.mjs +30 -19
  32. package/browser/editor/page/annotate/anchors.mjs +4 -3
  33. package/browser/editor/page/annotate/card.mjs +3 -6
  34. package/browser/editor/page/annotate/index.mjs +61 -34
  35. package/browser/editor/page/autosave.mjs +357 -38
  36. package/browser/editor/page/beside.mjs +5 -5
  37. package/browser/editor/page/block-menu/colors.mjs +3 -1
  38. package/browser/editor/page/block-menu/index.mjs +8 -6
  39. package/browser/editor/page/blocks.mjs +16 -7
  40. package/browser/editor/page/board/client.mjs +57 -0
  41. package/browser/editor/page/board/hint.mjs +145 -0
  42. package/browser/editor/page/board/history.mjs +119 -0
  43. package/browser/editor/page/board/index.mjs +970 -0
  44. package/browser/editor/page/board/settings.mjs +209 -0
  45. package/browser/editor/page/caret.mjs +5 -2
  46. package/browser/editor/page/changes/bar.mjs +94 -0
  47. package/browser/editor/page/changes/ghost.mjs +206 -0
  48. package/browser/editor/page/changes/gone-words.mjs +94 -0
  49. package/browser/editor/page/changes/index.mjs +447 -0
  50. package/browser/editor/page/changes/words.mjs +27 -0
  51. package/browser/editor/page/clipboard/import/colors.mjs +3 -3
  52. package/browser/editor/page/clipboard/import/html.mjs +29 -6
  53. package/browser/editor/page/clipboard/import/inline.mjs +32 -0
  54. package/browser/editor/page/clipboard/import/markdown.mjs +58 -13
  55. package/browser/editor/page/clipboard/import/read.mjs +6 -1
  56. package/browser/editor/page/clipboard/import/to-blocks.mjs +44 -12
  57. package/browser/editor/page/clipboard/import/yuque.mjs +622 -0
  58. package/browser/editor/page/clipboard/index.mjs +156 -26
  59. package/browser/editor/page/clipboard/own/blocks.mjs +25 -16
  60. package/browser/editor/page/clipboard/own/chart-keys.mjs +41 -28
  61. package/browser/editor/page/clipboard/own/describe.mjs +16 -7
  62. package/browser/editor/page/clipboard/own/export.mjs +6 -6
  63. package/browser/editor/page/clipboard/own/selection.mjs +3 -3
  64. package/browser/editor/page/clipboard/own/writers.mjs +0 -11
  65. package/browser/editor/page/columns/index.mjs +48 -46
  66. package/browser/editor/page/commit.mjs +98 -25
  67. package/browser/editor/page/conflicts.mjs +13 -33
  68. package/browser/editor/page/convert.mjs +8 -7
  69. package/browser/editor/page/core.mjs +81 -27
  70. package/browser/editor/page/custom-page.mjs +106 -0
  71. package/browser/editor/page/drag/index.mjs +40 -24
  72. package/browser/editor/page/drag/preview.mjs +9 -4
  73. package/browser/editor/page/editor.mjs +120 -28
  74. package/browser/editor/page/emoji-picker/emoji-tab.mjs +22 -13
  75. package/browser/editor/page/emoji-picker/grid.mjs +7 -5
  76. package/browser/editor/page/emoji-picker/icon-tab.mjs +4 -4
  77. package/browser/editor/page/emoji-picker/icons.mjs +0 -1
  78. package/browser/editor/page/emoji-picker/index.mjs +11 -9
  79. package/browser/editor/page/emoji-picker/styles.mjs +156 -2
  80. package/browser/editor/page/emoji-picker/support.mjs +6 -4
  81. package/browser/editor/page/emoji-picker/upload.mjs +14 -13
  82. package/browser/editor/page/fills.mjs +5 -3
  83. package/browser/editor/page/fold/index.mjs +348 -0
  84. package/browser/editor/page/fold/rule.mjs +125 -0
  85. package/browser/editor/page/folded.mjs +23 -0
  86. package/browser/editor/page/format-bar/bar.mjs +2 -1
  87. package/browser/editor/page/format-bar/index.mjs +1 -1
  88. package/browser/editor/page/geometry.mjs +8 -6
  89. package/browser/editor/page/handle/index.mjs +22 -14
  90. package/browser/editor/page/hints/index.mjs +1 -1
  91. package/browser/editor/page/history.mjs +24 -4
  92. package/browser/editor/page/insert/index.mjs +30 -17
  93. package/browser/editor/page/links/index.mjs +5 -3
  94. package/browser/editor/page/links/pages.mjs +27 -9
  95. package/browser/editor/page/long-runs.mjs +75 -0
  96. package/browser/editor/page/look.mjs +69 -6
  97. package/browser/editor/page/margin.mjs +63 -27
  98. package/browser/editor/page/media-menu/index.mjs +6 -7
  99. package/browser/editor/page/menu.mjs +86 -31
  100. package/browser/editor/page/merge.mjs +24 -0
  101. package/browser/editor/page/notices.mjs +3 -3
  102. package/browser/editor/page/offered.mjs +1 -1
  103. package/browser/editor/page/outline/folds.mjs +11 -10
  104. package/browser/editor/page/outline/index.mjs +131 -45
  105. package/browser/editor/page/outline/list.mjs +23 -11
  106. package/browser/editor/page/outline/read.mjs +1 -1
  107. package/browser/editor/page/outline/strip.mjs +7 -1
  108. package/browser/editor/page/page-objects.mjs +13 -2
  109. package/browser/editor/page/panel.mjs +9 -13
  110. package/browser/editor/page/present-links.mjs +11 -2
  111. package/browser/editor/page/resize/index.mjs +42 -29
  112. package/browser/editor/page/selection/delete.mjs +8 -6
  113. package/browser/editor/page/selection/index.mjs +10 -3
  114. package/browser/editor/page/served.mjs +14 -0
  115. package/browser/editor/page/session.mjs +101 -6
  116. package/browser/editor/page/slash-menu/index.mjs +3 -3
  117. package/browser/editor/page/table/cell-bar.mjs +4 -1
  118. package/browser/editor/page/table/cells.mjs +103 -47
  119. package/browser/editor/page/table/icons.mjs +3 -1
  120. package/browser/editor/page/table/index.mjs +40 -16
  121. package/browser/editor/page/table/pictures.mjs +299 -0
  122. package/browser/editor/page/table/views.mjs +150 -0
  123. package/browser/editor/page/table/widths.mjs +9 -4
  124. package/browser/editor/page/text-select/index.mjs +43 -14
  125. package/browser/editor/page/todo-writes.mjs +75 -0
  126. package/browser/editor/page/tooltip.mjs +1 -1
  127. package/browser/editor/page/type-grid.mjs +4 -3
  128. package/browser/editor/page/typing/code-edges.mjs +63 -17
  129. package/browser/editor/page/typing/index.mjs +65 -9
  130. package/browser/editor/page/typing/leave.mjs +1 -1
  131. package/browser/editor/page/ui.mjs +13 -0
  132. package/browser/shared/annotations.mjs +8 -10
  133. package/browser/shared/block-packs.mjs +404 -0
  134. package/browser/shared/board-places.mjs +224 -0
  135. package/browser/shared/card-size.mjs +59 -0
  136. package/browser/shared/code-folds.mjs +5 -1
  137. package/browser/shared/colors.mjs +17 -14
  138. package/browser/shared/component-catalog.mjs +345 -54
  139. package/browser/shared/component-source.mjs +37 -0
  140. package/browser/shared/components/callout.mjs +4 -2
  141. package/browser/shared/components/index.mjs +72 -9
  142. package/browser/shared/components/installed.mjs +110 -8
  143. package/browser/shared/components/page.mjs +22 -3
  144. package/browser/shared/components/state.mjs +5 -1
  145. package/browser/shared/components/table.mjs +1 -1
  146. package/browser/shared/components/text.mjs +2 -2
  147. package/browser/shared/document-look.mjs +183 -0
  148. package/browser/shared/drafts.mjs +432 -0
  149. package/browser/shared/emoji/data/LICENSE-lucide.txt +43 -0
  150. package/browser/shared/emoji/data/README.md +4 -2
  151. package/browser/shared/emoji/data/categories.json +1 -1
  152. package/browser/shared/emoji/data/keywords-en.json +1 -1
  153. package/browser/shared/emoji/data/keywords-zh.json +1 -1
  154. package/browser/shared/emoji/data/names.json +1 -1
  155. package/browser/shared/emoji/data/positions.json +1 -1
  156. package/browser/shared/emoji/data/twemoji-index.json +1 -1
  157. package/browser/shared/emoji/data/twemoji-svg.bin +0 -0
  158. package/browser/shared/emoji/data.mjs +10 -12
  159. package/browser/shared/emoji/emoji.mjs +8 -7
  160. package/browser/shared/emoji/icon-value.mjs +4 -3
  161. package/browser/shared/extension-sidebar.mjs +126 -0
  162. package/browser/shared/extensions.mjs +79 -0
  163. package/browser/shared/file-table.mjs +101 -0
  164. package/browser/shared/html-tree.mjs +11 -5
  165. package/browser/shared/i18n/en.mjs +374 -35
  166. package/browser/shared/json-layout.mjs +47 -0
  167. package/browser/shared/long-runs.mjs +39 -0
  168. package/browser/shared/net-cache.mjs +133 -0
  169. package/browser/shared/net-keys.mjs +32 -0
  170. package/browser/shared/net-policy.mjs +177 -0
  171. package/browser/shared/new-names.mjs +5 -2
  172. package/browser/shared/outline-shape.mjs +128 -0
  173. package/browser/shared/outline.mjs +458 -0
  174. package/browser/shared/pack-manifest.mjs +77 -0
  175. package/browser/shared/page-address.mjs +6 -3
  176. package/browser/shared/page-cards.mjs +308 -0
  177. package/browser/shared/page-links.mjs +69 -6
  178. package/browser/shared/pages.mjs +388 -0
  179. package/browser/shared/paths.mjs +6 -0
  180. package/browser/shared/preferences.mjs +10 -4
  181. package/browser/shared/preview-server.mjs +3 -7
  182. package/browser/shared/session.mjs +13 -5
  183. package/browser/shared/shipped-blocks.mjs +299 -0
  184. package/browser/shared/table-chart.mjs +33 -1
  185. package/browser/shared/todos.mjs +83 -0
  186. package/browser/shared/user-directory.mjs +24 -0
  187. package/browser/shared/versions.mjs +14 -0
  188. package/browser/shared/web-links.mjs +134 -0
  189. package/browser/shared/workspace-columns.mjs +120 -0
  190. package/browser/shared/workspace-look.mjs +91 -0
  191. package/browser/shared/workspace-name.mjs +154 -0
  192. package/browser/shared/workspace-query.mjs +125 -0
  193. package/browser/shared/workspace-registry.mjs +272 -0
  194. package/browser/shared/workspace.mjs +171 -20
  195. package/browser/shared/zoom.mjs +5 -5
  196. package/dist/chunk-2NRBY6AJ.mjs +2 -0
  197. package/dist/chunk-32ZUEFZ7.mjs +2 -0
  198. package/dist/chunk-35NQ4PLQ.mjs +2 -0
  199. package/dist/chunk-3KJHLHUO.mjs +2 -0
  200. package/dist/chunk-3NJACR4W.mjs +2 -0
  201. package/dist/chunk-4AV456RQ.mjs +2 -0
  202. package/dist/chunk-4OZWXZE5.mjs +5 -0
  203. package/dist/chunk-5XYHDBJ5.mjs +2 -0
  204. package/dist/chunk-5ZJA7CXT.mjs +2 -0
  205. package/dist/chunk-6A53MZYZ.mjs +2 -0
  206. package/dist/chunk-6EXH3ORZ.mjs +166 -0
  207. package/dist/chunk-6EZ7FNIK.mjs +3 -0
  208. package/dist/{chunk-UXUK4PMC.mjs → chunk-6QBHU4DF.mjs} +1 -1
  209. package/dist/{chunk-6U2SLSDN.mjs → chunk-6VTU6KEO.mjs} +1 -1
  210. package/dist/chunk-B4P2CM2J.mjs +3 -0
  211. package/dist/chunk-BPL64HGA.mjs +4 -0
  212. package/dist/chunk-BVEFGE4B.mjs +2 -0
  213. package/dist/chunk-BZ5RAF7L.mjs +2 -0
  214. package/dist/chunk-CRJEG7MT.mjs +2 -0
  215. package/dist/{chunk-B3VTYBYR.mjs → chunk-D4CKRD3V.mjs} +91 -91
  216. package/dist/chunk-D4EURAX4.mjs +4 -0
  217. package/dist/chunk-DQCE7TJY.mjs +5 -0
  218. package/dist/chunk-DR73Y2UJ.mjs +3 -0
  219. package/dist/{chunk-TMYZB6AV.mjs → chunk-EKNHM3P4.mjs} +1 -1
  220. package/dist/{chunk-DB4WKGYF.mjs → chunk-ERLAIBOA.mjs} +2 -2
  221. package/dist/chunk-EURLTOTZ.mjs +4 -0
  222. package/dist/chunk-FJYN7RTH.mjs +4 -0
  223. package/dist/chunk-FWNRPMCJ.mjs +12 -0
  224. package/dist/chunk-FWW4CSAZ.mjs +2 -0
  225. package/dist/{chunk-2B5E4CDJ.mjs → chunk-GPIWQ4X4.mjs} +1 -1
  226. package/dist/chunk-GY3FAUVM.mjs +2 -0
  227. package/dist/chunk-HLYV7RIH.mjs +2 -0
  228. package/dist/chunk-HMYTM3GT.mjs +15 -0
  229. package/dist/chunk-IA4PSIMD.mjs +2 -0
  230. package/dist/chunk-JEUK3ZO7.mjs +2 -0
  231. package/dist/chunk-JVHHHGEA.mjs +3 -0
  232. package/dist/chunk-KTKHRC6H.mjs +2 -0
  233. package/dist/chunk-L7UP52JO.mjs +2 -0
  234. package/dist/chunk-MHW7ZKOU.mjs +2 -0
  235. package/dist/chunk-N76HWBA3.mjs +10 -0
  236. package/dist/chunk-N7AZZLGT.mjs +548 -0
  237. package/dist/chunk-NAMN3RAF.mjs +2 -0
  238. package/dist/{chunk-YXAUQPVK.mjs → chunk-NFMCP2HI.mjs} +3 -3
  239. package/dist/chunk-NG375ILQ.mjs +2 -0
  240. package/dist/chunk-NVRNLK25.mjs +6 -0
  241. package/dist/chunk-NWFBE2YA.mjs +2 -0
  242. package/dist/chunk-NWR2LT5B.mjs +2 -0
  243. package/dist/chunk-OJKMINIU.mjs +20 -0
  244. package/dist/chunk-OUUP3WKT.mjs +2 -0
  245. package/dist/chunk-OW5NWPOJ.mjs +10 -0
  246. package/dist/chunk-PAREWQGB.mjs +4 -0
  247. package/dist/chunk-POQSE4C2.mjs +2 -0
  248. package/dist/chunk-PUOQ65NC.mjs +2 -0
  249. package/dist/{chunk-Z52HTUW7.mjs → chunk-PVER7LSC.mjs} +2 -2
  250. package/dist/chunk-PZDLJJTJ.mjs +3 -0
  251. package/dist/chunk-Q47PLKIJ.mjs +15 -0
  252. package/dist/chunk-Q4UEPUWF.mjs +2 -0
  253. package/dist/chunk-QKXMPUXC.mjs +2 -0
  254. package/dist/chunk-QOUEFUCH.mjs +16 -0
  255. package/dist/chunk-RFDZXFJF.mjs +13 -0
  256. package/dist/chunk-RKPWLGZ3.mjs +4 -0
  257. package/dist/chunk-RMECZA2K.mjs +2 -0
  258. package/dist/{chunk-EUX7IC5J.mjs → chunk-SQ6Y2ZMA.mjs} +2 -2
  259. package/dist/chunk-SX4LJYT6.mjs +8 -0
  260. package/dist/chunk-SXHBYZST.mjs +16 -0
  261. package/dist/chunk-TANZRINB.mjs +2 -0
  262. package/dist/chunk-TEZAWDSQ.mjs +2 -0
  263. package/dist/chunk-UBBRTJ2R.mjs +24 -0
  264. package/dist/chunk-UFNYFFKO.mjs +20 -0
  265. package/dist/chunk-UGWYKHBL.mjs +170 -0
  266. package/dist/chunk-UKSHDZZ6.mjs +2 -0
  267. package/dist/chunk-UMHUSOPJ.mjs +2 -0
  268. package/dist/chunk-UNOYVIYR.mjs +2 -0
  269. package/dist/chunk-V6RIYQZZ.mjs +4 -0
  270. package/dist/chunk-VJPFVNNW.mjs +15 -0
  271. package/dist/chunk-VS3ZMVGX.mjs +5 -0
  272. package/dist/chunk-VTKNEYT3.mjs +6 -0
  273. package/dist/chunk-VXACTLO3.mjs +3 -0
  274. package/dist/chunk-W3BGBJQW.mjs +2 -0
  275. package/dist/chunk-YI43RG4P.mjs +2 -0
  276. package/dist/chunk-YQGT4AB2.mjs +6 -0
  277. package/dist/chunk-ZB4H7ZN4.mjs +2 -0
  278. package/dist/{chunk-ACOPDCNB.mjs → chunk-ZHEHPMBK.mjs} +1 -1
  279. package/dist/chunk-ZTHICSSF.mjs +2 -0
  280. package/dist/chunk-ZUNVAXLH.mjs +2 -0
  281. package/dist/chunk-ZWPMCK7P.mjs +2 -0
  282. package/dist/cli.mjs +1 -1
  283. package/dist/server.mjs +1 -1
  284. package/dist/{chunk-EVJ3BX3M.mjs → update-fetch.mjs} +1 -1
  285. package/dist/worker.mjs +1 -1
  286. package/kit/board.css +95 -0
  287. package/kit/board.js +250 -0
  288. package/kit/charts.js +5 -71
  289. package/kit/code.js +14 -14
  290. package/kit/math.js +18 -2
  291. package/kit/report.css +500 -151
  292. package/kit/runtime.js +1720 -170
  293. package/kit/state.js +10 -1
  294. package/kit/tables.js +172 -37
  295. package/kit/ui.js +166 -27
  296. package/package.json +2 -1
  297. package/packs/gallery/card/component.json +14 -0
  298. package/packs/gallery/card/example.html +10 -0
  299. package/packs/gallery/card/preview.svg +1 -0
  300. package/packs/gallery/card/style.css +6 -0
  301. package/packs/gallery/card/template.html +6 -0
  302. package/packs/gallery/card/writing.md +14 -0
  303. package/packs/gallery/chart-card/component.json +15 -0
  304. package/packs/gallery/chart-card/example.html +14 -0
  305. package/packs/gallery/chart-card/kit.js +130 -0
  306. package/packs/gallery/chart-card/preview.svg +1 -0
  307. package/packs/gallery/chart-card/style.css +42 -0
  308. package/packs/gallery/chart-card/template.html +13 -0
  309. package/packs/gallery/chart-card/writing.md +20 -0
  310. package/packs/gallery/chart-view/component.json +20 -0
  311. package/packs/gallery/chart-view/example.html +13 -0
  312. package/packs/gallery/chart-view/kit.js +355 -0
  313. package/packs/gallery/chart-view/preview.svg +1 -0
  314. package/packs/gallery/chart-view/style.css +94 -0
  315. package/packs/gallery/chart-view/template.html +3 -0
  316. package/packs/gallery/chart-view/writing.md +22 -0
  317. package/packs/gallery/countdown/component.json +18 -0
  318. package/packs/gallery/countdown/example.html +3 -0
  319. package/packs/gallery/countdown/kit.js +156 -0
  320. package/packs/gallery/countdown/preview.svg +1 -0
  321. package/packs/gallery/countdown/style.css +130 -0
  322. package/packs/gallery/countdown/template.html +3 -0
  323. package/packs/gallery/countdown/writing.md +22 -0
  324. package/packs/gallery/habit/component.json +14 -0
  325. package/packs/gallery/habit/example.html +3 -0
  326. package/packs/gallery/habit/kit.js +295 -0
  327. package/packs/gallery/habit/preview.svg +1 -0
  328. package/packs/gallery/habit/style.css +246 -0
  329. package/packs/gallery/habit/template.html +3 -0
  330. package/packs/gallery/habit/writing.md +21 -0
  331. package/packs/gallery/heatmap/component.json +18 -0
  332. package/packs/gallery/heatmap/example.html +3 -0
  333. package/packs/gallery/heatmap/kit.js +351 -0
  334. package/packs/gallery/heatmap/preview.svg +1 -0
  335. package/packs/gallery/heatmap/style.css +201 -0
  336. package/packs/gallery/heatmap/template.html +3 -0
  337. package/packs/gallery/heatmap/writing.md +21 -0
  338. package/packs/gallery/kanban/component.json +18 -0
  339. package/packs/gallery/kanban/example.html +12 -0
  340. package/packs/gallery/kanban/kit.js +540 -0
  341. package/packs/gallery/kanban/preview.svg +1 -0
  342. package/packs/gallery/kanban/style.css +212 -0
  343. package/packs/gallery/kanban/template.html +3 -0
  344. package/packs/gallery/kanban/writing.md +20 -0
  345. package/packs/gallery/metric/component.json +22 -0
  346. package/packs/gallery/metric/example.html +15 -0
  347. package/packs/gallery/metric/kit.js +248 -0
  348. package/packs/gallery/metric/preview.svg +1 -0
  349. package/packs/gallery/metric/style.css +92 -0
  350. package/packs/gallery/metric/template.html +3 -0
  351. package/packs/gallery/metric/writing.md +23 -0
  352. package/packs/gallery/note/component.json +14 -0
  353. package/packs/gallery/note/example.html +3 -0
  354. package/packs/gallery/note/kit.js +102 -0
  355. package/packs/gallery/note/preview.svg +1 -0
  356. package/packs/gallery/note/style.css +76 -0
  357. package/packs/gallery/note/template.html +3 -0
  358. package/packs/gallery/note/writing.md +18 -0
  359. package/packs/gallery/pack.json +8 -0
  360. package/packs/gallery/recent/component.json +13 -0
  361. package/packs/gallery/recent/example.html +1 -0
  362. package/packs/gallery/recent/kit.js +238 -0
  363. package/packs/gallery/recent/preview.svg +1 -0
  364. package/packs/gallery/recent/style.css +158 -0
  365. package/packs/gallery/recent/template.html +1 -0
  366. package/packs/gallery/recent/writing.md +15 -0
  367. package/packs/gallery/static/component.json +13 -0
  368. package/packs/gallery/static/example.html +11 -0
  369. package/packs/gallery/static/preview.svg +1 -0
  370. package/packs/gallery/static/style.css +138 -0
  371. package/packs/gallery/static/template.html +1 -0
  372. package/packs/gallery/static/writing.md +18 -0
  373. package/packs/gallery/stats/component.json +13 -0
  374. package/packs/gallery/stats/example.html +1 -0
  375. package/packs/gallery/stats/kit.js +166 -0
  376. package/packs/gallery/stats/preview.svg +1 -0
  377. package/packs/gallery/stats/style.css +151 -0
  378. package/packs/gallery/stats/template.html +1 -0
  379. package/packs/gallery/stats/writing.md +11 -0
  380. package/packs/gallery/today/component.json +12 -0
  381. package/packs/gallery/today/example.html +1 -0
  382. package/packs/gallery/today/kit.js +185 -0
  383. package/packs/gallery/today/preview.svg +1 -0
  384. package/packs/gallery/today/style.css +120 -0
  385. package/packs/gallery/today/template.html +1 -0
  386. package/packs/gallery/today/writing.md +14 -0
  387. package/packs/gallery/todos/component.json +19 -0
  388. package/packs/gallery/todos/example.html +3 -0
  389. package/packs/gallery/todos/kit.js +342 -0
  390. package/packs/gallery/todos/preview.svg +1 -0
  391. package/packs/gallery/todos/style.css +267 -0
  392. package/packs/gallery/todos/template.html +3 -0
  393. package/packs/gallery/todos/writing.md +30 -0
  394. package/packs/gallery/weather/component.json +19 -0
  395. package/packs/gallery/weather/example.html +3 -0
  396. package/packs/gallery/weather/kit.js +312 -0
  397. package/packs/gallery/weather/preview.svg +1 -0
  398. package/packs/gallery/weather/style.css +258 -0
  399. package/packs/gallery/weather/template.html +3 -0
  400. package/packs/gallery/weather/writing.md +26 -0
  401. package/packs/gallery-soft/pack.json +8 -0
  402. package/release.json +13 -11
  403. package/sdk/doc-kit.d.ts +404 -7
  404. package/sdk/doc-state.d.ts +2 -0
  405. package/skill/SKILL.md +71 -26
  406. package/skill/references/block-script.md +140 -0
  407. package/skill/references/building-blocks.md +257 -0
  408. package/skill/references/example-report.html +1 -1
  409. package/skill/references/extensions.md +59 -0
  410. package/skill/references/pages-and-data.md +221 -0
  411. package/skill/references/writing-html.md +9 -7
  412. package/skill/sdk/doc-kit.d.ts +404 -7
  413. package/skill/sdk/doc-state.d.ts +2 -0
  414. package/web/assets/index-BK2e_07w.js +13 -0
  415. package/web/assets/index-CWFI83mF.css +1 -0
  416. package/web/index.html +2 -2
  417. package/browser/editor/components/callout/page.mjs +0 -13
  418. package/dist/chunk-2PBALTR3.mjs +0 -57
  419. package/dist/chunk-3LA3EMDE.mjs +0 -15
  420. package/dist/chunk-5FRMCDPY.mjs +0 -16
  421. package/dist/chunk-5LEK2CBS.mjs +0 -2
  422. package/dist/chunk-5OFN5AHC.mjs +0 -2
  423. package/dist/chunk-5SIYS5HN.mjs +0 -2
  424. package/dist/chunk-5TEK3RAD.mjs +0 -2
  425. package/dist/chunk-6CYG3Z4V.mjs +0 -2
  426. package/dist/chunk-7GHT2UCA.mjs +0 -15
  427. package/dist/chunk-7QQBR7PB.mjs +0 -2
  428. package/dist/chunk-ATCJYAR4.mjs +0 -2
  429. package/dist/chunk-C7HWOBIF.mjs +0 -2
  430. package/dist/chunk-E7VYDG2X.mjs +0 -2
  431. package/dist/chunk-EZY3WC6Z.mjs +0 -15
  432. package/dist/chunk-FQGQH4KM.mjs +0 -2
  433. package/dist/chunk-G7TOXONE.mjs +0 -6
  434. package/dist/chunk-GPF4YWWB.mjs +0 -9
  435. package/dist/chunk-GYQV7Y4J.mjs +0 -120
  436. package/dist/chunk-HMHK3EQ6.mjs +0 -2
  437. package/dist/chunk-HQQMJCQJ.mjs +0 -10
  438. package/dist/chunk-IERUOGC3.mjs +0 -6
  439. package/dist/chunk-ITNLYXXV.mjs +0 -3
  440. package/dist/chunk-L4DVONOG.mjs +0 -2
  441. package/dist/chunk-LAE5NQ4B.mjs +0 -2
  442. package/dist/chunk-LC7YNQFG.mjs +0 -2
  443. package/dist/chunk-LHTFLRB6.mjs +0 -4
  444. package/dist/chunk-NFIBI4IP.mjs +0 -26
  445. package/dist/chunk-NSKUTQ5J.mjs +0 -5
  446. package/dist/chunk-O52JMOCZ.mjs +0 -2
  447. package/dist/chunk-P2CAZPDP.mjs +0 -3
  448. package/dist/chunk-QMQUXTU4.mjs +0 -12
  449. package/dist/chunk-QVWVFC5K.mjs +0 -6
  450. package/dist/chunk-QYKCJ7FG.mjs +0 -8
  451. package/dist/chunk-QZY6Q64C.mjs +0 -2
  452. package/dist/chunk-TDQP3DKQ.mjs +0 -10
  453. package/dist/chunk-TX6JH7TR.mjs +0 -2
  454. package/dist/chunk-UNUEWH4S.mjs +0 -2
  455. package/dist/chunk-V4CPWKMZ.mjs +0 -2
  456. package/dist/chunk-VACRB2NE.mjs +0 -3
  457. package/dist/chunk-W63L7367.mjs +0 -7
  458. package/dist/chunk-W7CXPCRV.mjs +0 -6
  459. package/dist/chunk-XINNG4F2.mjs +0 -4
  460. package/dist/chunk-YL2DPWVS.mjs +0 -4
  461. package/dist/chunk-YZ5Z6H4W.mjs +0 -4
  462. package/dist/chunk-ZBIM6ARY.mjs +0 -216
  463. package/skill/references/building-components.md +0 -327
  464. package/web/assets/index-B6Ai3wsa.js +0 -13
  465. package/web/assets/index-SYPC3EZy.css +0 -1
@@ -0,0 +1,13 @@
1
+ var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var t=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return D(e.type,t,e.props)}function te(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var re=/\/+/g;function ie(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function ae(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function oe(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,oe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ie(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(re,`$&/`)+`/`),oe(o,r,i,``,function(e){return e})):o!=null&&(te(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(re,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ie(a,u),c+=oe(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ie(a,u++),c+=oe(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return oe(ae(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function se(e,t,n){if(e==null)return e;var r=[],i=0;return oe(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ce(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var le=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function ue(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,le)}catch(e){le(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function O(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else ue(O.bind(null,e))}var de={map:se,forEach:function(e,t,n){se(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return se(e,function(){t++}),t},toArray:function(e){return se(e,function(e){return e})||[]},only:function(e){if(!te(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=de,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=O,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=te,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ce}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ue,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),n=e(((e,n)=>{n.exports=t()})),r=e((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,ee());else{var t=n(l);t!==null&&re(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&re(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ee():S=!1}}}var ee;if(typeof y==`function`)ee=function(){y(D)};else if(typeof MessageChannel<`u`){var te=new MessageChannel,ne=te.port2;te.port1.onmessage=D,ee=function(){ne.postMessage(null)}}else ee=function(){_(D,0)};function re(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,re(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,ee()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),i=e(((e,t)=>{t.exports=r()})),a=e((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`),s=Symbol.for(`react.recoverable`),c=Symbol.for(`react.optimistic_key`);function l(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:r===c?c:``+r,children:e,containerInfo:t,implementation:n}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.browser=function(e){return{$$typeof:s,_reason:e}},e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return l(e,t,null,n)},e.flushSync=function(e){var t=u.T,n=a.p;try{if(u.T=null,a.p=2,e)return e()}finally{u.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version=`19.3.0`})),o=e(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=a()})),s=e((e=>{var t=i(),r=n(),a=o();function s(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(s(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(s(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return f(i),e;if(a===r)return f(i),t;a=a.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,c=i.child;c;){if(c===n){o=!0,n=i,r=a;break}if(c===r){o=!0,r=i,n=a;break}c=c.sibling}if(!o){for(c=a.child;c;){if(c===n){o=!0,n=a,r=i;break}if(c===r){o=!0,r=a,n=i;break}c=c.sibling}if(!o)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(n.tag!==3)throw Error(s(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}function h(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&h(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(s(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,ee=Symbol.for(`react.element`),te=Symbol.for(`react.transitional.element`),ne=Symbol.for(`react.portal`),re=Symbol.for(`react.fragment`),ie=Symbol.for(`react.strict_mode`),ae=Symbol.for(`react.profiler`),oe=Symbol.for(`react.consumer`),se=Symbol.for(`react.context`),ce=Symbol.for(`react.forward_ref`),le=Symbol.for(`react.suspense`),ue=Symbol.for(`react.suspense_list`),O=Symbol.for(`react.memo`),de=Symbol.for(`react.lazy`),fe=Symbol.for(`react.activity`),pe=Symbol.for(`react.legacy_hidden`),me=Symbol.for(`react.memo_cache_sentinel`),he=Symbol.for(`react.view_transition`),ge=Symbol.for(`react.recoverable`),_e=Symbol.iterator;function ve(e){return typeof e!=`object`||!e?null:(e=_e&&e[_e]||e[`@@iterator`],typeof e==`function`?e:null)}var ye=Symbol.for(`react.client.reference`);function be(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ye?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case re:return`Fragment`;case ae:return`Profiler`;case ie:return`StrictMode`;case le:return`Suspense`;case ue:return`SuspenseList`;case fe:return`Activity`;case he:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case ne:return`Portal`;case se:return e.displayName||`Context`;case oe:return(e._context.displayName||`Context`)+`.Consumer`;case ce:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case O:return t=e.displayName||null,t===null?be(e.type)||`Memo`:t;case de:t=e._payload,e=e._init;try{return be(e(t))}catch{}}return null}var xe=Array.isArray,k=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Se={pending:!1,data:null,method:null,action:null},Ce=[],we=-1;function Te(e){return{current:e}}function j(e){0>we||(e.current=Ce[we],Ce[we]=null,we--)}function M(e,t){we++,Ce[we]=e.current,e.current=t}var Ee=Te(null),De=Te(null),Oe=Te(null),ke=Te(null);function Ae(e,t){switch(M(Oe,t),M(De,e),M(Ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}j(Ee),M(Ee,e)}function je(){j(Ee),j(De),j(Oe)}function Me(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,M(ke,e)),t=Ee.current;var n=dp(t,e.type);t!==n&&(M(De,e),M(Ee,n))}function Ne(e){De.current===e&&(j(Ee),j(De)),ke.current===e&&(j(ke),sh._currentValue=Se)}var Pe,Fe;function Ie(e){if(Pe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Pe=t&&t[1]||``,Fe=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+Pe+e+Fe}var Le=!1;function Re(e,t){if(!e||Le)return``;Le=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
+ `),l=s.split(`
5
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Le=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ie(n):``}function ze(e,t){switch(e.tag){case 26:case 27:case 5:return Ie(e.type);case 16:return Ie(`Lazy`);case 13:return e.child!==t&&t!==null?Ie(`Suspense Fallback`):Ie(`Suspense`);case 19:return Ie(`SuspenseList`);case 0:case 15:return Re(e.type,!1);case 11:return Re(e.type.render,!1);case 1:return Re(e.type,!0);case 31:return Ie(`Activity`);case 30:return Ie(`ViewTransition`);default:return``}}function Be(e){try{var t=``,n=null;do t+=ze(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var Ve=Object.prototype.hasOwnProperty,He=t.unstable_scheduleCallback,Ue=t.unstable_cancelCallback,We=t.unstable_shouldYield,Ge=t.unstable_requestPaint,Ke=t.unstable_now,qe=t.unstable_getCurrentPriorityLevel,Je=t.unstable_ImmediatePriority,Ye=t.unstable_UserBlockingPriority,Xe=t.unstable_NormalPriority,Ze=t.unstable_LowPriority,Qe=t.unstable_IdlePriority,N=t.log,$e=t.unstable_setDisableYieldValue,et=null,tt=null;function nt(e){if(typeof N==`function`&&$e(e),tt&&typeof tt.setStrictMode==`function`)try{tt.setStrictMode(et,e)}catch{}}var rt=Math.clz32?Math.clz32:ot,it=Math.log,at=Math.LN2;function ot(e){return e>>>=0,e===0?32:31-(it(e)/at|0)|0}var st=256,ct=262144,lt=4194304;function ut(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function dt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=ut(n))):i=ut(o):i=ut(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=ut(n))):i=ut(o)):i=ut(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ft(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function pt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-rt(n),i=1<<r;t|=e[r],n&=~i}return t}function mt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ht(){var e=lt;return lt<<=1,!(lt&62914560)&&(lt=4194304),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function _t(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function vt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-rt(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&yt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function yt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-rt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function bt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-rt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function xt(e,t){var n=t&-t;return n=n&42?1:St(n),(n&(e.suspendedLanes|t))===0?n:0}function St(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ct(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function wt(){var e=A.p;return e===0?(e=window.event,e===void 0?32:Ch(e.type)):e}function Tt(e,t){var n=A.p;try{return A.p=e,t()}finally{A.p=n}}var Et=Math.random().toString(36).slice(2),Dt=`__reactFiber$`+Et,Ot=`__reactProps$`+Et,kt=`__reactContainer$`+Et,At=`__reactEvents$`+Et,jt=`__reactListeners$`+Et,Mt=`__reactHandles$`+Et,P=`__reactResources$`+Et,Nt=`__reactMarker$`+Et,Pt=`__reactLoad$`+Et;function Ft(e){delete e[Dt],delete e[Ot],delete e[jt],delete e[Mt]}function It(e){var t;if(t=e[Dt])return t;for(var n=e.parentNode;n;){if(t=n[kt]||n[Dt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fm(e);e!==null;){if(n=e[Dt])return n;e=fm(e)}return t}e=n,n=e.parentNode}return null}function Lt(e){if(e=e[Dt]||e[kt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Rt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function zt(e){var t=e[P];return t||=e[P]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Bt(e){e[Nt]=!0}function Vt(e){e[Pt]=void 0}var Ht=new Set,F={};function Ut(e,t){Wt(e,t),Wt(e+`Capture`,t)}function Wt(e,t){for(F[e]=t,e=0;e<t.length;e++)Ht.add(t[e])}var Gt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Kt={},qt={};function Jt(e){return Ve.call(qt,e)?!0:Ve.call(Kt,e)?!1:Gt.test(e)?qt[e]=!0:(Kt[e]=!0,!1)}var I=!1;function Yt(){var e=I;return I=!1,e}function Xt(e,t,n){if(Jt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Zt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function Qt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function $t(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function en(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function tn(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nn(e){if(!e._valueTracker){var t=en(e)?`checked`:`value`;e._valueTracker=tn(e,t,``+e[t])}}function rn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=en(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var an=/[\n"\\]/g;function on(e){return e.replace(an,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function sn(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+$t(t)):e.value!==``+$t(t)&&(e.value=``+$t(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):ln(e,$t(n)):o===`number`&&e.value==t?ln(e,$t(e.value)):ln(e,$t(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+$t(s):e.removeAttribute(`name`)}function cn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){nn(e);return}n=n==null?``:``+$t(n),t=t==null?n:``+$t(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),nn(e)}function ln(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function un(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+$t(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function dn(e,t,n){if(t!=null&&(t=``+$t(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+$t(n)}function fn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(s(92));if(xe(r)){if(1<r.length)throw Error(s(93));r=r[0]}n=r}n??=``,t=n}n=$t(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),nn(e)}function pn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var mn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function hn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||mn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function gn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(s(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,I=!0);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&(hn(e,i,r),I=!0)}else for(var a in t)t.hasOwnProperty(a)&&hn(e,a,t[a])}function _n(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var vn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),yn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function bn(e){return yn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function xn(){}var Sn=null;function Cn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wn=null,Tn=null;function En(e){var t=Lt(e);if(t&&(e=t.stateNode)){var n=e[Ot]||null;a:switch(e=t.stateNode,t.type){case`input`:if(sn(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+on(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[Ot]||null;if(!i)throw Error(s(90));sn(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&rn(r)}break a;case`textarea`:dn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&un(e,!!n.multiple,t,!1)}}}var Dn=!1;function On(e,t,n){if(Dn)return e(t,n);Dn=!0;try{return e(t)}finally{if(Dn=!1,(wn!==null||Tn!==null)&&(zd(),wn&&(t=wn,e=Tn,Tn=wn=null,En(t),e)))for(t=0;t<e.length;t++)En(e[t])}}function kn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Ot]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(s(231,t,typeof n));return n}var An=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),jn=!1;if(An)try{var Mn={};Object.defineProperty(Mn,"passive",{get:function(){jn=!0}}),window.addEventListener(`test`,Mn,Mn),window.removeEventListener(`test`,Mn,Mn)}catch{jn=!1}var Nn=null,Pn=null,Fn=null;function In(){if(Fn)return Fn;var e,t=Pn,n=t.length,r,i=`value`in Nn?Nn.value:Nn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Fn=i.slice(e,1<r?1-r:void 0)}function Ln(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Rn(){return!0}function zn(){return!1}function Bn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Rn:zn,this.isPropagationStopped=zn,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Rn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Rn)},persist:function(){},isPersistent:Rn}),t}var Vn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hn=Bn(Vn),Un=D({},Vn,{view:0,detail:0}),Wn=Bn(Un),Gn,Kn,qn,Jn=D({},Un,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ar,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==qn&&(qn&&e.type===`mousemove`?(Gn=e.screenX-qn.screenX,Kn=e.screenY-qn.screenY):Kn=Gn=0,qn=e),Gn)},movementY:function(e){return`movementY`in e?e.movementY:Kn}}),Yn=Bn(Jn),Xn=Bn(D({},Jn,{dataTransfer:0})),Zn=Bn(D({},Un,{relatedTarget:0})),Qn=Bn(D({},Vn,{animationName:0,elapsedTime:0,pseudoElement:0})),$n=Bn(D({},Vn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),er=Bn(D({},Vn,{data:0})),tr={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},nr={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},rr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function ir(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=rr[e])?!!t[e]:!1}function ar(){return ir}var or=Bn(D({},Un,{key:function(e){if(e.key){var t=tr[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Ln(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?nr[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ar,charCode:function(e){return e.type===`keypress`?Ln(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Ln(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),sr=Bn(D({},Jn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),cr=Bn(D({},Vn,{submitter:0})),lr=Bn(D({},Un,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ar})),ur=Bn(D({},Vn,{propertyName:0,elapsedTime:0,pseudoElement:0})),dr=Bn(D({},Jn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),fr=Bn(D({},Vn,{newState:0,oldState:0,source:0})),pr=[9,13,27,32],mr=An&&`CompositionEvent`in window,hr=null;An&&`documentMode`in document&&(hr=document.documentMode);var gr=An&&`TextEvent`in window&&!hr,_r=An&&(!mr||hr&&8<hr&&11>=hr),vr=` `,yr=!1;function L(e,t){switch(e){case`keyup`:return pr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function br(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var xr=!1;function Sr(e,t){switch(e){case`compositionend`:return br(t);case`keypress`:return t.which===32?(yr=!0,vr):null;case`textInput`:return e=t.data,e===vr&&yr?null:e;default:return null}}function Cr(e,t){if(xr)return e===`compositionend`||!mr&&L(e,t)?(e=In(),Fn=Pn=Nn=null,xr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return _r&&t.locale!==`ko`?null:t.data;default:return null}}var wr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!wr[e.type]:t===`textarea`}function Er(e,t,n,r){wn?Tn?Tn.push(r):Tn=[r]:wn=r,t=Jf(t,`onChange`),0<t.length&&(n=new Hn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Dr=null,Or=null;function kr(e){Vf(e,0)}function Ar(e){if(rn(Rt(e)))return e}function jr(e,t){if(e===`change`)return t}var Mr=!1;if(An){var Nr;if(An){var Pr=`oninput`in document;if(!Pr){var Fr=document.createElement(`div`);Fr.setAttribute(`oninput`,`return;`),Pr=typeof Fr.oninput==`function`}Nr=Pr}else Nr=!1;Mr=Nr&&(!document.documentMode||9<document.documentMode)}function Ir(){Dr&&(Dr.detachEvent(`onpropertychange`,Lr),Or=Dr=null)}function Lr(e){if(e.propertyName===`value`&&Ar(Or)){var t=[];Er(t,Or,e,Cn(e)),On(kr,t)}}function Rr(e,t,n){e===`focusin`?(Ir(),Dr=t,Or=n,Dr.attachEvent(`onpropertychange`,Lr)):e===`focusout`&&Ir()}function zr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Ar(Or)}function Br(e,t){if(e===`click`)return Ar(t)}function Vr(e,t){if(e===`input`||e===`change`)return Ar(t)}function Hr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Ur=typeof Object.is==`function`?Object.is:Hr;function Wr(e,t){if(Ur(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ve.call(t,i)||!Ur(e[i],t[i]))return!1}return!0}function Gr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Kr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qr(e,t){var n=Kr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Kr(n)}}function Jr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Jr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Gr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Gr(e.document)}return t}function Xr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Zr=An&&`documentMode`in document&&11>=document.documentMode,Qr=null,$r=null,ei=null,ti=!1;function R(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ti||Qr==null||Qr!==Gr(r)||(r=Qr,`selectionStart`in r&&Xr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ei&&Wr(ei,r)||(ei=r,r=Jf($r,`onSelect`),0<r.length&&(t=new Hn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Qr)))}function ni(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ri={animationend:ni(`Animation`,`AnimationEnd`),animationiteration:ni(`Animation`,`AnimationIteration`),animationstart:ni(`Animation`,`AnimationStart`),transitionrun:ni(`Transition`,`TransitionRun`),transitionstart:ni(`Transition`,`TransitionStart`),transitioncancel:ni(`Transition`,`TransitionCancel`),transitionend:ni(`Transition`,`TransitionEnd`)},ii={},z={};An&&(z=document.createElement(`div`).style,`AnimationEvent`in window||(delete ri.animationend.animation,delete ri.animationiteration.animation,delete ri.animationstart.animation),`TransitionEvent`in window||delete ri.transitionend.transition);function ai(e){if(ii[e])return ii[e];if(!ri[e])return e;var t=ri[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in z)return ii[e]=t[n];return e}var oi=ai(`animationend`),si=ai(`animationiteration`),ci=ai(`animationstart`),li=ai(`transitionrun`),ui=ai(`transitionstart`),di=ai(`transitioncancel`),fi=ai(`transitionend`),pi=new Map,mi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);mi.push(`scrollEnd`);function hi(e,t){pi.set(e,t),Ut(t,[e])}var gi=0;function _i(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=bd.identifierPrefix;var n=gi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function vi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Od;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function yi(e,t){return e=vi(e),t=vi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var bi=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},xi=[],Si=0,Ci=0;function wi(){for(var e=Si,t=Ci=Si=0;t<e;){var n=xi[t];xi[t++]=null;var r=xi[t];xi[t++]=null;var i=xi[t];xi[t++]=null;var a=xi[t];if(xi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Oi(n,i,a)}}function Ti(e,t,n,r){xi[Si++]=e,xi[Si++]=t,xi[Si++]=n,xi[Si++]=r,Ci|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Ei(e,t,n,r){return Ti(e,t,n,r),ki(e)}function Di(e,t){return Ti(e,null,null,t),ki(e)}function Oi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-rt(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ki(e){if(50<kd)throw kd=0,Ad=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ai={};function ji(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mi(e,t,n,r){return new ji(e,t,n,r)}function Ni(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Pi(e,t){var n=e.alternate;return n===null?(n=Mi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Fi(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ii(e,t,n,r,i,a){var o=0;if(r=e,typeof r==`function`)Ni(r)&&(o=1);else if(typeof r==`string`)o=qm(e,n,Ee.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case fe:return e=Mi(31,n,t,i),e.elementType=fe,e.lanes=a,e;case re:return Li(n.children,i,a,t);case ie:o=8,i|=24;break;case ae:return e=Mi(12,n,t,i|2),e.elementType=ae,e.lanes=a,e;case le:return e=Mi(13,n,t,i),e.elementType=le,e.lanes=a,e;case ue:return e=Mi(19,n,t,i),e.elementType=ue,e.lanes=a,e;case pe:case he:return e=i|32,e=Mi(30,n,t,e),e.elementType=he,e.lanes=a,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case se:o=10;break a;case oe:o=9;break a;case ce:o=11;break a;case O:o=14;break a;case de:o=16,r=null;break a}o=29,n=Error(s(130,e===null?`null`:typeof e,``)),r=null}return t=Mi(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function Li(e,t,n,r){return e=Mi(7,e,r,t),e.lanes=n,e}function Ri(e,t,n){return e=Mi(6,e,null,t),e.lanes=n,e}function zi(e){var t=Mi(18,null,null,0);return t.stateNode=e,t}function Bi(e,t,n){return t=Mi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Vi=new WeakMap;function Hi(e,t){if(typeof e==`object`&&e){var n=Vi.get(e);return n===void 0?(t={value:e,source:t,stack:Be(t)},Vi.set(e,t),t):n}return{value:e,source:t,stack:Be(t)}}var Ui=[],Wi=0,Gi=null,Ki=0,qi=[],Ji=0,Yi=null,Xi=1,Zi=``;function Qi(e,t){Ui[Wi++]=Ki,Ui[Wi++]=Gi,Gi=e,Ki=t}function $i(e,t,n){qi[Ji++]=Xi,qi[Ji++]=Zi,qi[Ji++]=Yi,Yi=e;var r=Xi;e=Zi;var i=32-rt(r)-1;r&=~(1<<i),n+=1;var a=32-rt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Xi=1<<32-rt(t)+i|n<<i|r,Zi=a+e}else Xi=1<<a|n<<i|r,Zi=e}function ea(e){e.return!==null&&(Qi(e,1),$i(e,1,0))}function ta(e){for(;e===Gi;)Gi=Ui[--Wi],Ui[Wi]=null,Ki=Ui[--Wi],Ui[Wi]=null;for(;e===Yi;)Yi=qi[--Ji],qi[Ji]=null,Zi=qi[--Ji],qi[Ji]=null,Xi=qi[--Ji],qi[Ji]=null}function na(e,t){qi[Ji++]=Xi,qi[Ji++]=Zi,qi[Ji++]=Yi,Xi=t.id,Zi=t.overflow,Yi=e}var ra=null,B=null,V=!1,ia=null,aa=!1,oa=Error(s(519));function sa(e){throw pa(Hi(Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),oa}function ca(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Dt]=e,t[Ot]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<zf.length;n++)Q(zf[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),cn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),fn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||ep(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=xn),t=!0):t=!1,t||sa(e,!0)}function la(e){for(ra=e.return;ra;)switch(ra.tag){case 5:case 31:case 13:aa=!1;return;case 27:case 3:aa=!0;return;default:ra=ra.return}}function ua(e){if(e!==ra)return!1;if(!V)return la(e),V=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||pp(e.type,e.memoizedProps)),n=!n),n&&B&&sa(e),la(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(317));B=dm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(317));B=dm(e)}else t===27?(t=B,Sp(e.type)?(e=um,um=null,B=e):B=t):B=ra?lm(e.stateNode.nextSibling):null;return!0}function da(){B=ra=null,V=!1}function fa(){var e=ia;return e!==null&&(fd===null?fd=e:fd.push.apply(fd,e),ia=null),e}function pa(e){ia===null?ia=[e]:ia.push(e)}var ma=Te(null),ha=null,ga=null;function _a(e,t,n){M(ma,t._currentValue),t._currentValue=n}function va(e){e._currentValue=ma.current,j(ma)}function ya(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ba(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var o=i.child;a=a.firstContext;a:for(;a!==null;){var c=a;a=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),ya(a.return,n,e),r||(o=null);break a}a=c.next}}else if(i.tag===18){if(o=i.return,o===null)throw Error(s(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),ya(o,n,e),o=null}else i.tag===13&&i.memoizedState!==null&&i.memoizedState.dehydrated===null?(i.lanes|=n,o=i.alternate,o!==null&&(o.lanes|=n),ya(i.return,n,e),o=i.child,o=o===null?null:o.sibling):o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}}function xa(e,t,n,r){e=null;for(var i=t,a=!1;i!==null;){if(!a){if(i.flags&524288)a=!0;else if(i.flags&262144)break}if(i.tag===10){var o=i.alternate;if(o===null)throw Error(s(387));if(o=o.memoizedProps,o!==null){var c=i.type;Ur(i.pendingProps.value,o.value)||(e===null?e=[c]:e.push(c))}}else if(i===ke.current){if(o=i.alternate,o===null)throw Error(s(387));o.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[sh]:e.push(sh))}i=i.return}return e!==null&&ba(t,e,n,r),t.flags|=262144,e!==null}function Sa(e){for(e=e.firstContext;e!==null;){if(!Ur(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ca(e){ha=e,ga=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function wa(e){return Ea(ha,e)}function Ta(e,t){return ha===null&&Ca(e),Ea(e,t)}function Ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ga===null){if(e===null)throw Error(s(308));ga=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ga=ga.next=t;return n}var Da=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Oa=t.unstable_scheduleCallback,ka=t.unstable_NormalPriority,Aa={$$typeof:se,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ja(){return{controller:new Da,data:new Map,refCount:0}}function Ma(e){e.refCount--,e.refCount===0&&Oa(ka,function(){e.controller.abort()})}function Na(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Pa=null;function Fa(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ia=null,La=0,Ra=0,za=null;function Ba(e,t){if(Ia===null){var n=Ia=[];La=0,Ra=Pf(),za={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return La++,t.then(Va,Va),t}function Va(){if(--La===0&&(Pa=null,Ia!==null)){za!==null&&(za.status=`fulfilled`);var e=Ia;Ia=null,Ra=0,za=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ha(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ua=k.S;k.S=function(e,t){if(hd=Ke(),typeof t==`object`&&t&&typeof t.then==`function`&&Ba(e,t),Pa!==null)for(var n=bf;n!==null;)Na(n,Pa),n=n.next;if(n=e.types,n!==null){for(var r=bf;r!==null;)Na(r,n),r=r.next;if(Ra!==0){r=Pa,r===null&&(r=Pa=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ua!==null&&Ua(e,t)};var Wa=Te(null);function Ga(){var e=Wa.current;return e===null?q.pooledCache:e}function Ka(e,t){t===null?M(Wa,Wa.current):M(Wa,t.pool)}function qa(){var e=Ga();return e===null?null:{parent:Aa._currentValue,pool:e}}var Ja=Error(s(460)),Ya=Error(s(474)),Xa=Error(s(542)),Za={then:function(){}};function Qa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function $a(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(xn,xn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ro(e),e===void 0&&!(`reason`in t)?Error(s(600)):e;default:if(typeof t.status==`string`)t.then(xn,xn);else{if(e=q,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ro(e),e}throw to=t,Ja}}function eo(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(to=e,Ja):e}}var to=null;function no(){if(to===null)throw Error(s(459));var e=to;return to=null,e}function ro(e){if(e===Ja||e===Xa)throw Error(s(483))}var io=null,ao=0;function oo(e){var t=ao;return ao+=1,io===null&&(io=[]),$a(io,e,t)}function so(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function co(e,t){throw t.$$typeof===ee?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function lo(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=Pi(e,t),e.index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function o(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Ri(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===re?(e=d(e,t,n.props.children,r,n.key),so(e,n),e):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===de&&eo(a)===t.type)?(t=i(t,n.props),so(t,n),t.return=e,t):(t=Ii(n.type,n.key,n.props,null,e.mode,r),so(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Bi(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=Li(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Ri(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case te:return n=Ii(t.type,t.key,t.props,null,e.mode,n),so(n,t),n.return=e,n;case ne:return t=Bi(t,e.mode,n),t.return=e,t;case de:return t=eo(t),f(e,t,n)}if(xe(t)||ve(t))return t=Li(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,oo(t),n);if(t.$$typeof===se)return f(e,Ta(e,t),n);co(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case te:return n.key===i?l(e,t,n,r):null;case ne:return n.key===i?u(e,t,n,r):null;case de:return n=eo(n),p(e,t,n,r)}if(xe(n)||ve(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,oo(n),r);if(n.$$typeof===se)return p(e,t,Ta(e,n),r);co(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case te:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case ne:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case de:return r=eo(r),m(e,t,n,r,i)}if(xe(r)||ve(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,oo(r),i);if(r.$$typeof===se)return m(e,t,n,Ta(t,r),i);co(t,r)}return null}function h(i,o,s,c){for(var l=null,u=null,d=o,h=o=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),V&&Qi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(o=a(d,o,h),u===null?l=d:u.sibling=d,u=d);return V&&Qi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),o=a(g,o,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),V&&Qi(i,h),l}function g(i,o,c,l){if(c==null)throw Error(s(151));for(var u=null,d=null,h=o,g=o=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),o=a(y,o,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),V&&Qi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return V&&Qi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),V&&Qi(i,g),u}function _(e,r,a,c){if(typeof a==`object`&&a&&a.type===re&&a.key===null&&a.props.ref===void 0&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case te:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===re){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),so(c,a),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===de&&eo(l)===r.type){n(e,r.sibling),c=i(r,a.props),so(c,a),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}a.type===re?(c=Li(a.props.children,e.mode,c,a.key),so(c,a),c.return=e,e=c):(c=Ii(a.type,a.key,a.props,null,e.mode,c),so(c,a),c.return=e,e=c)}return o(e);case ne:a:{for(l=a.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Bi(a,e.mode,c),c.return=e,e=c}return o(e);case de:return a=eo(a),_(e,r,a,c)}if(xe(a))return h(e,r,a,c);if(ve(a)){if(l=ve(a),typeof l!=`function`)throw Error(s(150));return a=l.call(a),g(e,r,a,c)}if(typeof a.then==`function`)return _(e,r,oo(a),c);if(a.$$typeof===se)return _(e,r,Ta(e,a),c);co(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=Ri(a,e.mode,c),c.return=e,e=c),o(e)):n(e,r)}return function(e,t,n,r){try{ao=0;var i=_(e,t,n,r);return io=null,i}catch(t){if(t===Ja||t===Xa)throw t;var a=Mi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var uo=lo(!0),fo=lo(!1),po=!1;function mo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ho(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function go(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _o(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ki(e),Oi(e,null,n),t}return Ti(e,r,t,n),ki(e)}function vo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bt(e,n)}}function yo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var bo=!1;function xo(){if(bo){var e=za;if(e!==null)throw e}}function So(e,t,n,r){bo=!1;var i=e.updateQueue;po=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===Ra&&(bo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:po=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),od|=o,e.lanes=o,e.memoizedState=d}}function Co(e,t){if(typeof e!=`function`)throw Error(s(191,e));e.call(t)}function wo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Co(n[e],t)}var To=Te(null),Eo=Te(0);function Do(e,t){e=id,M(Eo,e),M(To,t),id=e|t.baseLanes}function Oo(){M(Eo,id),M(To,To.current)}function ko(){id=Eo.current,j(To),j(Eo)}var Ao=Te(null),jo=null;function Mo(e){var t=e.alternate;M(Lo,Lo.current&1),M(Ao,e),jo===null&&(t===null||To.current!==null||t.memoizedState!==null)&&(jo=e)}function No(e){M(Lo,Lo.current),M(Ao,e),jo===null&&(jo=e)}function Po(e){e.tag===22?(M(Lo,Lo.current),M(Ao,e),jo===null&&(jo=e)):Fo()}function Fo(){M(Lo,Lo.current),M(Ao,Ao.current)}function Io(e){j(Ao),jo===e&&(jo=null),j(Lo)}var Lo=Te(0);function Ro(e,t){M(Ao,Ao.current),M(Lo,t)}function zo(e){j(Lo),j(Ao),jo===e&&(jo=null)}function Bo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||om(n)||sm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Vo=0,H=null,U=null,Ho=null,Uo=!1,Wo=!1,Go=!1,Ko=0,qo=0,Jo=null,Yo=0;function Xo(){throw Error(s(321))}function Zo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ur(e[n],t[n]))return!1;return!0}function Qo(e,t,n,r,i,a){return Vo=a,H=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?hc:gc,Go=!1,a=n(r,i),Go=!1,Wo&&(a=es(t,n,r,i)),$o(e),a}function $o(e){k.H=mc;var t=U!==null&&U.next!==null;if(Vo=0,Ho=U=H=null,Uo=!1,qo=0,Jo=null,t)throw Error(s(300));e===null||Nc||(e=e.dependencies,e!==null&&Sa(e)&&(Nc=!0))}function es(e,t,n,r){H=e;var i=0;do{if(Wo&&(Jo=null),qo=0,Wo=!1,25<=i)throw Error(s(301));if(i+=1,Ho=U=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}k.H=_c,a=t(n,r)}while(Wo);return a}function ts(){var e=k.H,t=e.useState()[0];return t=typeof t.then==`function`?cs(t):t,e=e.useState()[0],(U===null?null:U.memoizedState)!==e&&(H.flags|=1024),t}function ns(){var e=Ko!==0;return Ko=0,e}function rs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function is(e){if(Uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Uo=!1}Vo=0,Ho=U=H=null,Wo=!1,qo=Ko=0,Jo=null}function as(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ho===null?H.memoizedState=Ho=e:Ho=Ho.next=e,Ho}function os(){if(U===null){var e=H.alternate;e=e===null?null:e.memoizedState}else e=U.next;var t=Ho===null?H.memoizedState:Ho.next;if(t!==null)Ho=t,U=e;else{if(e===null)throw H.alternate===null?Error(s(467)):Error(s(310));U=e,e={memoizedState:U.memoizedState,baseState:U.baseState,baseQueue:U.baseQueue,queue:U.queue,next:null},Ho===null?H.memoizedState=Ho=e:Ho=Ho.next=e}return Ho}function ss(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cs(e){var t=qo;return qo+=1,Jo===null&&(Jo=[]),e=$a(Jo,e,t),t=H,(Ho===null?t.memoizedState:Ho.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?hc:gc),e}function ls(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return cs(e);if(e.$$typeof===ge)return;if(e.$$typeof===se)return wa(e)}throw Error(s(438,String(e)))}function us(e){var t=null,n=H.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=H.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ss(),H.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=me;return t.index++,n}function ds(e,t){return typeof t==`function`?t(e):t}function fs(e){return ps(os(),U,e)}function ps(e,t,n){var r=e.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}t.baseQueue=i=a,r.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var c=o=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Vo&f)===f:(Y&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ra&&(d=!0);else if((Vo&p)===p){u=u.next,p===Ra&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,o=a):l=l.next=f,H.lanes|=p,od|=p;f=u.action,Go&&n(a,f),a=u.hasEagerState?u.eagerState:n(a,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,o=a):l=l.next=p,H.lanes|=f,od|=f;u=u.next}while(u!==null&&u!==t);if(l===null?o=a:l.next=c,!Ur(a,e.memoizedState)&&(Nc=!0,d&&(n=za,n!==null)))throw n;e.memoizedState=a,e.baseState=o,e.baseQueue=l,r.lastRenderedState=a}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ms(e){var t=os(),n=t.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);Ur(a,t.memoizedState)||(Nc=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function hs(e,t,n){var r=H,i=os(),a=V;if(a){if(n===void 0)throw Error(s(407));n=n()}else n=t();var o=!Ur((U||i).memoizedState,n);if(o&&(i.memoizedState=n,Nc=!0),i=i.queue,Bs(vs.bind(null,r,i,e),[e]),e=i.getSnapshot!==t||o||Ho!==null&&!!(Ho.memoizedState.tag&1),Fs(e?9:8,{destroy:void 0},_s.bind(null,r,i,n,t),null),e){if(r.flags|=2048,q===null)throw Error(s(349));a||Vo&127||gs(r,t,n)}return n}function gs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=H.updateQueue,t===null?(t=ss(),H.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function _s(e,t,n,r){t.value=n,t.getSnapshot=r,ys(t)&&bs(e)}function vs(e,t,n){return n(function(){ys(t)&&bs(e)})}function ys(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ur(e,n)}catch{return!0}}function bs(e){var t=Di(e,2);t!==null&&Pd(t,e,2)}function xs(e){var t=as();if(typeof e==`function`){var n=e;if(e=n(),Go){nt(!0);try{n()}finally{nt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:e},t}function Ss(e,t,n,r){return e.baseState=n,ps(e,U,typeof r==`function`?r:ds)}function Cs(e,t,n,r,i){if(dc(e))throw Error(s(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};k.T===null?a.isTransition=!1:n(!0),r(a),n=t.pending,n===null?(a.next=t.pending=a,ws(t,a)):(a.next=n.next,t.pending=n.next=a)}}function ws(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=k.T,o={};o.types=a===null?null:a.types,k.T=o;try{var s=n(i,r),c=k.S;c!==null&&c(o,s),Ts(e,t,s)}catch(n){Ds(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),k.T=a}}else try{a=n(i,r),Ts(e,t,a)}catch(n){Ds(e,t,n)}}function Ts(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Es(e,t,n)},function(n){return Ds(e,t,n)}):Es(e,t,n)}function Es(e,t,n){t.status=`fulfilled`,t.value=n,Os(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ws(e,n)))}function Ds(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Os(t),t=t.next;while(t!==r)}e.action=null}function Os(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ks(e,t){return t}function As(e,t){if(V){var n=q.formState;if(n!==null){a:{var r=H;if(V){if(B){b:{for(var i=B,a=aa;i.nodeType!==8;){if(!a){i=null;break b}if(i=lm(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){B=lm(i.nextSibling),r=i.data===`F!`;break a}}sa(r)}r=!1}r&&(t=n[0])}}return n=as(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ks,lastRenderedState:t},n.queue=r,n=cc.bind(null,H,r),r.dispatch=n,r=xs(!1),a=uc.bind(null,H,!1,r.queue),r=as(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Cs.bind(null,H,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function js(e){return Ms(os(),U,e)}function Ms(e,t,n){if(t=ps(e,t,ks)[0],e=fs(ds)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=cs(t)}catch(e){throw e===Ja?Xa:e}else r=t;t=os();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(H.flags|=2048,Fs(9,{destroy:void 0},Ns.bind(null,i,n),null)),[r,a,e]}function Ns(e,t){e.action=t}function Ps(e){var t=os(),n=U;if(n!==null)return Ms(t,n,e);os(),t=t.memoizedState,n=os();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Fs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=H.updateQueue,t===null&&(t=ss(),H.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Is(){return os().memoizedState}function Ls(e,t,n,r){var i=as();H.flags|=e,i.memoizedState=Fs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Rs(e,t,n,r){var i=os();r=r===void 0?null:r;var a=i.memoizedState.inst;U!==null&&r!==null&&Zo(r,U.memoizedState.deps)?i.memoizedState=Fs(t,a,n,r):(H.flags|=e,i.memoizedState=Fs(1|t,a,n,r))}function zs(e,t){Ls(8390656,8,e,t)}function Bs(e,t){Rs(2048,8,e,t)}function Vs(e){H.flags|=4;var t=H.updateQueue;if(t===null)t=ss(),H.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Hs(e){var t=os().memoizedState;return Vs({ref:t,nextImpl:e}),function(){if(K&2)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Us(e,t){return Rs(4,2,e,t)}function Ws(e,t){return Rs(4,4,e,t)}function Gs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ks(e,t,n){n=n==null?null:n.concat([e]),Rs(4,4,Gs.bind(null,t,e),n)}function qs(){}function Js(e,t){var n=os();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Zo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ys(e,t){var n=os();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Zo(t,r[1]))return r[0];if(r=e(),Go){nt(!0);try{e()}finally{nt(!1)}}return n.memoizedState=[r,t],r}function Xs(e,t,n){return n===void 0||Vo&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=Md(),H.lanes|=e,od|=e,n)}function Zs(e,t,n,r){return Ur(n,t)?n:To.current===null?!(Vo&106)||Vo&1073741824&&!(Y&261930)?(Nc=!0,e.memoizedState=n):(e=Md(),H.lanes|=e,od|=e,t):(e=Xs(e,n,r),Ur(e,t)||(Nc=!0),e)}function Qs(e,t,n,r,i){var a=A.p;A.p=a!==0&&8>a?a:8;var o=k.T,s={};s.types=o===null?null:o.types,k.T=s,uc(e,!1,t,n);try{var c=i(),l=k.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?lc(e,t,Ha(c,r),jd(e)):lc(e,t,r,jd(e))}catch(n){lc(e,t,{then:function(){},status:`rejected`,reason:n},jd())}finally{A.p=a,o!==null&&s.types!==null&&(o.types=s.types),k.T=o}}function $s(){}function ec(e,t,n,r){if(e.tag!==5)throw Error(s(476));var i=tc(e).queue;Qs(e,i,t,Se,n===null?$s:function(){return nc(e),n(r)})}function tc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Se,baseState:Se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:Se},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function nc(e){var t=tc(e);t.next===null&&(t=e.alternate.memoizedState),lc(e,t.next.queue,{},jd())}function rc(){return wa(sh)}function ic(){return os().memoizedState}function ac(){return os().memoizedState}function oc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=jd();e=go(n);var r=_o(t,e,n);r!==null&&(Pd(r,t,n),vo(r,t,n)),t={cache:ja()},e.payload=t;return}t=t.return}}function sc(e,t,n){var r=jd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},dc(e)?fc(t,n):(n=Ei(e,t,n,r),n!==null&&(Pd(n,e,r),pc(n,t,r)))}function cc(e,t,n){lc(e,t,n,jd())}function lc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(dc(e))fc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Ur(s,o))return Ti(e,t,i,0),q===null&&wi(),!1}catch{}if(n=Ei(e,t,i,r),n!==null)return Pd(n,e,r),pc(n,t,r),!0}return!1}function uc(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},dc(e)){if(t)throw Error(s(479))}else t=Ei(e,n,r,2),t!==null&&Pd(t,e,2)}function dc(e){var t=e.alternate;return e===H||t!==null&&t===H}function fc(e,t){Wo=Uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function pc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bt(e,n)}}var mc={readContext:wa,use:ls,useCallback:Xo,useContext:Xo,useEffect:Xo,useImperativeHandle:Xo,useLayoutEffect:Xo,useInsertionEffect:Xo,useMemo:Xo,useReducer:Xo,useRef:Xo,useState:Xo,useDebugValue:Xo,useDeferredValue:Xo,useTransition:Xo,useSyncExternalStore:Xo,useId:Xo,useHostTransitionStatus:Xo,useFormState:Xo,useActionState:Xo,useOptimistic:Xo,useMemoCache:Xo,useCacheRefresh:Xo,useEffectEvent:Xo},hc={readContext:wa,use:ls,useCallback:function(e,t){return as().memoizedState=[e,t===void 0?null:t],e},useContext:wa,useEffect:zs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ls(4194308,4,Gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ls(4194308,4,e,t)},useInsertionEffect:function(e,t){Ls(4,2,e,t)},useMemo:function(e,t){var n=as();t=t===void 0?null:t;var r=e();if(Go){nt(!0);try{e()}finally{nt(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=as();if(n!==void 0){var i=n(t);if(Go){nt(!0);try{n(t)}finally{nt(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=sc.bind(null,H,e),[r.memoizedState,e]},useRef:function(e){var t=as();return e={current:e},t.memoizedState=e},useState:function(e){e=xs(e);var t=e.queue,n=cc.bind(null,H,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:qs,useDeferredValue:function(e,t){return Xs(as(),e,t)},useTransition:function(){var e=xs(!1);return e=Qs.bind(null,H,e.queue,!0,!1),as().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=H,i=as();if(V){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),q===null)throw Error(s(349));Y&127||gs(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,zs(vs.bind(null,r,a,e),[e]),r.flags|=2048,Fs(9,{destroy:void 0},_s.bind(null,r,a,n,t),null),n},useId:function(){var e=as(),t=q.identifierPrefix;if(V){var n=Zi,r=Xi;n=(r&~(1<<32-rt(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Ko++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Yo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:rc,useFormState:As,useActionState:As,useOptimistic:function(e){var t=as();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=uc.bind(null,H,!0,n),n.dispatch=t,[e,t]},useMemoCache:us,useCacheRefresh:function(){return as().memoizedState=oc.bind(null,H)},useEffectEvent:function(e){var t=as(),n={impl:e};return t.memoizedState=n,function(){if(K&2)throw Error(s(440));return n.impl.apply(void 0,arguments)}}},gc={readContext:wa,use:ls,useCallback:Js,useContext:wa,useEffect:Bs,useImperativeHandle:Ks,useInsertionEffect:Us,useLayoutEffect:Ws,useMemo:Ys,useReducer:fs,useRef:Is,useState:function(){return fs(ds)},useDebugValue:qs,useDeferredValue:function(e,t){return Zs(os(),U.memoizedState,e,t)},useTransition:function(){var e=fs(ds)[0],t=os().memoizedState;return[typeof e==`boolean`?e:cs(e),t]},useSyncExternalStore:hs,useId:ic,useHostTransitionStatus:rc,useFormState:js,useActionState:js,useOptimistic:function(e,t){return Ss(os(),U,e,t)},useMemoCache:us,useCacheRefresh:ac,useEffectEvent:Hs},_c={readContext:wa,use:ls,useCallback:Js,useContext:wa,useEffect:Bs,useImperativeHandle:Ks,useInsertionEffect:Us,useLayoutEffect:Ws,useMemo:Ys,useReducer:ms,useRef:Is,useState:function(){return ms(ds)},useDebugValue:qs,useDeferredValue:function(e,t){var n=os();return U===null?Xs(n,e,t):Zs(n,U.memoizedState,e,t)},useTransition:function(){var e=ms(ds)[0],t=os().memoizedState;return[typeof e==`boolean`?e:cs(e),t]},useSyncExternalStore:hs,useId:ic,useHostTransitionStatus:rc,useFormState:Ps,useActionState:Ps,useOptimistic:function(e,t){var n=os();return U===null?(n.baseState=e,[e,n.queue.dispatch]):Ss(n,U,e,t)},useMemoCache:us,useCacheRefresh:ac,useEffectEvent:Hs};function vc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var yc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=jd(),i=go(r);i.payload=t,n!=null&&(i.callback=n),t=_o(e,i,r),t!==null&&(Pd(t,e,r),vo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=jd(),i=go(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=_o(e,i,r),t!==null&&(Pd(t,e,r),vo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=jd(),r=go(n);r.tag=2,t!=null&&(r.callback=t),t=_o(e,r,n),t!==null&&(Pd(t,e,n),vo(t,e,n))}};function bc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Wr(n,r)||!Wr(i,a):!0}function xc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yc.enqueueReplaceState(t,t.state,null)}function Sc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Cc(e){bi(e)}function wc(e){console.error(e)}function Tc(e){bi(e)}function Ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Dc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Oc(e,t,n){return n=go(n),n.tag=3,n.payload={element:null},n.callback=function(){Ec(e,t)},n}function kc(e){return e=go(e),e.tag=3,e}function Ac(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Dc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Dc(t,n,r),typeof i!=`function`&&(vd===null?vd=new Set([this]):vd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function jc(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&xa(t,n,i,!0),n=Ao.current,n!==null){switch(n.tag){case 31:case 13:case 19:return jo===null?Kd():n.alternate===null&&ad===0&&(ad=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Za?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),mf(e,r,i)),!1;case 22:return n.flags|=65536,r===Za?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),mf(e,r,i)),!1}throw Error(s(435,n.tag))}return mf(e,r,i),Kd(),!1}if(V)return t=Ao.current,t===null?(r!==oa&&(t=Error(s(423),{cause:r}),pa(Hi(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=Hi(r,n),i=Oc(e.stateNode,r,i),yo(e,i),ad!==4&&(ad=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==oa&&(e=Error(s(422),{cause:r}),pa(Hi(e,n)))),!1;var a=Error(s(520),{cause:r});if(a=Hi(a,n),dd===null?dd=[a]:dd.push(a),ad!==4&&(ad=2),t===null)return!0;r=Hi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Oc(n.stateNode,r,e),yo(n,e),!1;case 1:if(t=n.type,a=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||a!==null&&typeof a.componentDidCatch==`function`&&(vd===null||!vd.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=kc(i),Ac(i,e,n,r),yo(n,i),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Mc=Error(s(461)),Nc=!1;function Pc(e,t,n,r){t.child=e===null?fo(t,null,n,r):uo(t,e.child,n,r)}function Fc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Ca(t),r=Qo(e,t,n,o,a,i),s=ns(),e!==null&&!Nc?(rs(e,t,i),ll(e,t,i)):(V&&s&&ea(t),t.flags|=1,Pc(e,t,r,i),t.child)}function Ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Ni(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Lc(e,t,a,r,i)):(e=Ii(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ul(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Wr:n,n(o,r)&&e.ref===t.ref)return ll(e,t,i)}return t.flags|=1,e=Pi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Wr(a,r)&&e.ref===t.ref){if(Nc=!1,t.pendingProps=r=a,ul(e,i))e.flags&131072&&(Nc=!0);else return t.lanes=e.lanes,ll(e,t,i)}}return Gc(e,t,n,r,i)}function Rc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Bc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ka(t,a===null?null:a.cachePool),a===null?Oo():Do(t,a),Po(t);else return r=t.lanes=536870912,Bc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ka(t,null),Oo(),Fo()):(Ka(t,a.cachePool),Do(t,a),Fo(),t.memoizedState=null);return Pc(e,t,i,n),t.child}function zc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Bc(e,t,n,r,i){var a=Ga();return a=a===null?null:{parent:Aa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ka(t,null),Oo(),Po(t),e!==null&&xa(e,t,r,!0),t.childLanes=i,null}function Vc(e,t){return t=el({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Hc(e,t,n){return uo(t,e.child,null,n),e=Vc(t,t.pendingProps),e.flags|=2,Io(t),t.memoizedState=null,e}function Uc(e,t,n){var r=t.pendingProps,i=!!(t.flags&128);if(t.flags&=-129,e===null){if(V){if(r.mode===`hidden`)return e=Vc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},zc(null,e);if(No(t),(e=B)?(e=am(e,aa),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Yi===null?null:{id:Xi,overflow:Zi},retryLane:536870912,hydrationErrors:null},n=zi(e),n.return=t,t.child=n,ra=t,B=null)):e=null,e===null)throw sa(t);return t.lanes=536870912,null}return Vc(t,r)}var a=e.memoizedState;if(a!==null){var o=a.dehydrated;if(No(t),i){if(t.flags&256)t.flags&=-257,t=Hc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558))}else if(Nc||xa(e,t,n,!1),i=(n&e.childLanes)!==0,Nc||i){if(To.current===null){if(r=q,r!==null&&(o=xt(r,n),o!==0&&o!==a.retryLane))throw a.retryLane=o,Di(e,o),Pd(r,e,o),Mc;Kd()}t=Hc(e,t,n)}else e=a.treeContext,B=lm(o.nextSibling),ra=t,V=!0,ia=null,aa=!1,e!==null&&na(t,e),t=Vc(t,r),t.flags|=134221824;return t}return e=Pi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Wc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(s(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Gc(e,t,n,r,i){return Ca(t),n=Qo(e,t,n,r,void 0,i),r=ns(),e!==null&&!Nc?(rs(e,t,i),ll(e,t,i)):(V&&r&&ea(t),t.flags|=1,Pc(e,t,n,i),t.child)}function Kc(e,t,n,r,i,a){return Ca(t),t.updateQueue=null,n=es(t,r,n,i),$o(e),r=ns(),e!==null&&!Nc?(rs(e,t,a),ll(e,t,a)):(V&&r&&ea(t),t.flags|=1,Pc(e,t,n,a),t.child)}function qc(e,t,n,r,i){if(Ca(t),t.stateNode===null){var a=Ai,o=n.contextType;typeof o==`object`&&o&&(a=wa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=yc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},mo(t),o=n.contextType,a.context=typeof o==`object`&&o?wa(o):Ai,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(vc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&yc.enqueueReplaceState(a,a.state,null),So(t,r,a,i),xo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Sc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Ai,typeof u==`object`&&u&&(o=wa(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&xc(t,a,r,o),po=!1;var f=t.memoizedState;a.state=f,So(t,r,a,i),xo(),l=t.memoizedState,s||f!==l||po?(typeof d==`function`&&(vc(t,n,d,r),l=t.memoizedState),(c=po||bc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,ho(e,t),o=t.memoizedProps,u=Sc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Ai,typeof l==`object`&&l&&(c=wa(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&xc(t,a,r,c),po=!1,f=t.memoizedState,a.state=f,So(t,r,a,i),xo();var p=t.memoizedState;o!==d||f!==p||po||e!==null&&e.dependencies!==null&&Sa(e.dependencies)?(typeof s==`function`&&(vc(t,n,s,r),p=t.memoizedState),(u=po||bc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Sa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Wc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=uo(t,e.child,null,i),t.child=uo(t,null,n,i)):Pc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=ll(e,t,i),e}function Jc(e,t,n,r){return da(),t.flags|=256,Pc(e,t,n,r),t.child}var Yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xc(e){return{baseLanes:e,cachePool:qa()}}function Zc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ld),e}function Qc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Lo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(V){if(i?Mo(t):Fo(),(e=B)?(e=am(e,aa),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Yi===null?null:{id:Xi,overflow:Zi},retryLane:536870912,hydrationErrors:null},n=zi(e),n.return=t,t.child=n,ra=t,B=null)):e=null,e===null)throw sa(t);return t.lanes=sm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Fo(),i=t.mode,a=el({mode:`hidden`,children:a},i),r=Li(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Xc(n),r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(null,r)):(Mo(t),$c(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return nl(e,t,a,o,r,c,s,n)}return i?(Fo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Pi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Li(i,a,n,null),i.flags|=2):i=Pi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,zc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Xc(n):(a=i.cachePool,a===null?a=qa():(s=Aa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(e.child,r)):(Mo(t),n=e.child,e=n.sibling,n=Pi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function $c(e,t){return t=el({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function el(e,t){return e=Mi(22,e,null,t),e.lanes=0,e}function tl(e,t,n){return uo(t,e.child,null,n),e=$c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nl(e,t,n,r,i,a,o,c){if(n)return t.flags&256?(Mo(t),t.flags&=-257,tl(e,t,c)):t.memoizedState===null?(Fo(),a=i.fallback,o=t.mode,i=el({mode:`visible`,children:i.children},o),a=Li(a,o,c,null),a.flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,uo(t,e.child,null,c),i=t.child,i.memoizedState=Xc(c),i.childLanes=Zc(e,r,c),t.memoizedState=Yc,zc(null,i)):(Fo(),t.child=e.child,t.flags|=128,null);if(Mo(t),sm(a)){if(r=a.nextSibling&&a.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(i=Error(s(419)),i.stack=``,i.digest=r,pa({value:i,source:null,stack:null})),tl(e,t,c)}if(Nc||xa(e,t,c,!1),r=(c&e.childLanes)!==0,Nc||r){if(To.current!==null)return tl(e,t,c);if(r=q,r!==null&&(i=xt(r,c),i!==0&&i!==o.retryLane))throw o.retryLane=i,Di(e,i),Pd(r,e,i),Mc;return om(a)||Kd(),tl(e,t,c)}return om(a)?(t.flags|=192,t.child=e.child,null):(e=o.treeContext,B=lm(a.nextSibling),ra=t,V=!0,ia=null,aa=!1,e!==null&&na(t,e),t=$c(t,i.children),t.flags|=134221824,t)}function rl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ya(e.return,t,n)}function il(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Bo(n)===null&&(t=e),e=e.sibling}return t}function al(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function ol(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function sl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Lo.current;if(t.flags&128)return Ro(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Ro(t,o),i===`backwards`&&e!==null?(ol(e),Pc(e,t,r,n),ol(e)):Pc(e,t,r,n),r=V?Ki:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rl(e,n,t);else if(e.tag===19)rl(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,ol(t)),al(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Bo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}al(t,!0,n,null,a,r);break;case`together`:al(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),al(t,!1,i,n,a,r)}return t.child}function cl(e,t,n){var r=t.pendingProps;return _a(t,t.type,r.value),Pc(e,t,r.children,n),t.child}function ll(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),od|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(xa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,n=Pi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Pi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ul(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Sa(e)))}function dl(e,t,n){switch(t.tag){case 3:Ae(t,t.stateNode.containerInfo),_a(t,Aa,e.memoizedState.cache),da();break;case 27:case 5:Me(t);break;case 4:Ae(t,t.stateNode.containerInfo);break;case 10:_a(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,No(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Mo(t),t.flags|=128,null;r=xa(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Qc(e,t,n):(Mo(t),e=ll(e,t,n),e===null?null:e.sibling)}Mo(t);break;case 19:if(t.flags&128)return sl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(xa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return sl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ro(t,Lo.current),r)break;return null;case 22:return t.lanes=0,Rc(e,t,n,t.pendingProps);case 24:_a(t,Aa,e.memoizedState.cache)}return ll(e,t,n)}function fl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Nc=!0;else{if(!ul(e,n)&&!(t.flags&128))return Nc=!1,dl(e,t,n);Nc=!!(e.flags&131072)}}else Nc=!1,V&&t.flags&1048576&&$i(t,Ki,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=eo(t.elementType),t.type=e,typeof e==`function`)Ni(e)?(r=Sc(e,r),t.tag=1,t=qc(null,t,e,r,n)):(t.tag=0,t=Gc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===ce){t.tag=11,t=Fc(null,t,e,r,n);break a}if(i===O){t.tag=14,t=Ic(null,t,e,r,n);break a}if(i===se){t.tag=10,t.type=e,t=cl(null,t,n);break a}}throw t=be(e)||e,Error(s(306,t,``))}}return t;case 0:return Gc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Sc(r,t.pendingProps),qc(e,t,r,i,n);case 3:a:{if(Ae(t,t.stateNode.containerInfo),e===null)throw Error(s(387));r=t.pendingProps;var a=t.memoizedState;i=a.element,ho(e,t),So(t,r,null,n);var o=t.memoizedState;if(r=o.cache,_a(t,Aa,r),r!==a.cache&&ba(t,[Aa],n,!0),xo(),r=o.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=Jc(e,t,r,n);break a}if(r!==i){i=Hi(Error(s(424)),t),pa(i),t=Jc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(B=lm(e.firstChild),ra=t,V=!0,ia=null,aa=!0,n=fo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(da(),r===i){t=ll(e,t,n);break a}Pc(e,t,r,n)}t=t.child}return t;case 26:return Wc(e,t),e===null?(n=Nm(t.type,null,t.pendingProps,null))?t.memoizedState=n:V||(t.stateNode=fp(t.type,t.pendingProps,Oe.current,t)):t.memoizedState=Nm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Me(t),e===null&&V&&(r=t.stateNode=hm(t.type,t.pendingProps,Oe.current),ra=t,aa=!0,i=B,Sp(t.type)?(um=i,B=lm(r.firstChild)):B=i),Pc(e,t,t.pendingProps.children,n),Wc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&V&&((i=r=B)&&(r=rm(r,t.type,t.pendingProps,aa),r===null?i=!1:(t.stateNode=r,ra=t,B=lm(r.firstChild),aa=!1,i=!0)),i||sa(t)),Me(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,r=a.children,pp(i,a)?r=null:o!==null&&pp(i,o)&&(t.flags|=32),t.memoizedState!==null&&(i=Qo(e,t,ts,null,null,n),sh._currentValue=i),Wc(e,t),Pc(e,t,r,n),t.child;case 6:return e===null&&V&&((e=n=B)&&(n=im(n,t.pendingProps,aa),n===null?e=!1:(t.stateNode=n,ra=t,B=null,e=!0)),e||sa(t)),null;case 13:return Qc(e,t,n);case 4:return Ae(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=uo(t,null,r,n):Pc(e,t,r,n),t.child;case 11:return Fc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Wc(e,t),Pc(e,t,r,n),t.child;case 8:return Pc(e,t,t.pendingProps.children,n),t.child;case 12:return Pc(e,t,t.pendingProps.children,n),t.child;case 10:return cl(e,t,n);case 9:return i=t.type._context,r=t.pendingProps.children,Ca(t),i=wa(i),r=r(i),t.flags|=1,Pc(e,t,r,n),t.child;case 14:return Ic(e,t,t.type,t.pendingProps,n);case 15:return Lc(e,t,t.type,t.pendingProps,n);case 19:return sl(e,t,n);case 31:return Uc(e,t,n);case 22:return Rc(e,t,n,t.pendingProps);case 24:return Ca(t),r=wa(Aa),e===null?(i=Ga(),i===null&&(i=q,a=ja(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},mo(t),_a(t,Aa,i)):((e.lanes&n)!==0&&(ho(e,t),So(t,null,null,n),xo()),i=e.memoizedState,a=t.memoizedState,i.parent===r?(r=a.cache,_a(t,Aa,r),r!==i.cache&&ba(t,[Aa],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),_a(t,Aa,r))),Pc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:V&&ea(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Wc(e,t),Pc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function pl(e){e.flags|=4}function ml(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Jm(t,r):Jm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Ud())e.flags|=8192;else throw to=Za,Ya}}else e.flags&=-16777217}function hl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Ym(t)){if(Ud())e.flags|=8192;else throw to=Za,Ya}}function gl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ht(),e.lanes|=t,ud|=t)}function _l(e,t){if(!V)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function W(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function vl(e,t,n){var r=t.pendingProps;switch(ta(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return W(t),null;case 1:return W(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),va(Aa),je(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ua(t)?pl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,fa())),W(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(pl(t),a===null?(W(t),ml(t,i,null,r,n)):(W(t),hl(t,a))):a?a===e.memoizedState?(W(t),t.flags&=-16777217):(pl(t),W(t),hl(t,a)):(e=e.memoizedProps,e!==r&&pl(t),W(t),ml(t,i,e,r,n)),null;case 27:if(Ne(t),n=Oe.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return W(t),t.subtreeFlags&=-33554433,null}e=Ee.current,ua(t)?ca(t,e):(e=hm(i,r,n),t.stateNode=e,pl(t))}return W(t),t.subtreeFlags&=-33554433,null;case 5:if(Ne(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return W(t),t.subtreeFlags&=-33554433,null}if(a=Ee.current,ua(t))ca(t,a);else{var o=lp(Oe.current);switch(a){case 1:a=o.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:a=o.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:a=o.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:a=o.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:a=o.createElement(`div`),a.innerHTML=`<script><\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?o.createElement(`select`,{is:r.is}):o.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?o.createElement(i,{is:r.is}):o.createElement(i)}}a[Dt]=t,a[Ot]=r;a:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)a.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break a;for(;o.sibling===null;){if(o.return===null||o.return===t)break a;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=a;a:switch(np(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&pl(t)}}return W(t),t.subtreeFlags&=-33554433,ml(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(s(166));if(e=Oe.current,ua(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=ra,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Dt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ep(e.nodeValue,n)),e||sa(t,!0)}else e=lp(e).createTextNode(r),e[Dt]=t,t.stateNode=e}return W(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ua(t),n!==null){if(e===null){if(!r)throw Error(s(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(557));e[Dt]=t}else da(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),e=!1}else n=fa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Io(t),t):(Io(t),null);if(t.flags&128)throw Error(s(558))}return W(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=ua(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(s(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(s(317));i[Dt]=t}else da(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),i=!1}else i=fa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Io(t),t):(Io(t),null)}return Io(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),gl(t,t.updateQueue),W(t),null);case 4:return je(),e===null&&Wf(t.stateNode.containerInfo),t.flags|=67108864,W(t),null;case 10:return va(t.type),W(t),null;case 19:if(zo(t),r=t.memoizedState,r===null)return W(t),null;if(i=!!(t.flags&128),a=r.rendering,a===null){if(i)_l(r,!1);else{if(ad!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Bo(e),a!==null){for(t.flags|=128,_l(r,!1),e=a.updateQueue,t.updateQueue=e,gl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Fi(n,e),n=n.sibling;return Ro(t,Lo.current&1|2),V&&Qi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ke()>gd&&(t.flags|=128,i=!0,_l(r,!1),t.lanes=4194304)}}else{if(!i){if(e=Bo(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,gl(t,e),_l(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!a.alternate&&!V)return W(t),null}else 2*Ke()-r.renderingStartTime>gd&&n!==536870912&&(t.flags|=128,i=!0,_l(r,!1),t.lanes=4194304)}r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ke(),e.sibling=null,a=Lo.current,a=i?a&1|2:a&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||V?Ro(t,a):(n=a,M(Ao,t),M(Lo,n),jo===null&&(jo=t)),V&&Qi(t,r.treeForkCount),e}return W(t),null;case 22:case 23:return Io(t),ko(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(W(t),t.subtreeFlags&6&&(t.flags|=8192)):W(t),n=t.updateQueue,n!==null&&gl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&j(Wa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),va(Aa),W(t),null;case 25:return null;case 30:return t.flags|=33554432,W(t),null}throw Error(s(156,t.tag))}function yl(e,t){switch(ta(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return va(Aa),je(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ne(t),null;case 31:if(t.memoizedState!==null){if(Io(t),t.alternate===null)throw Error(s(340));da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Io(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return zo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return je(),null;case 10:return va(t.type),null;case 22:case 23:return Io(t),ko(),e!==null&&j(Wa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return va(Aa),null;case 25:return null;default:return null}}function bl(e,t){switch(ta(t),t.tag){case 3:va(Aa),je();break;case 26:case 27:case 5:Ne(t);break;case 4:je();break;case 31:t.memoizedState!==null&&Io(t);break;case 13:Io(t);break;case 19:zo(t);break;case 10:va(t.type);break;case 22:case 23:Io(t),ko(),e!==null&&j(Wa);break;case 24:va(Aa)}}function xl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Sl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Cl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{wo(t,n)}catch(t){Z(e,e.return,t)}}}function wl(e,t,n){n.props=Sc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Tl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=_i(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Pp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Fp(e);h(e.child,!1,Qp,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function El(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}}function Dl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)em(e.stateNode,t[n])}function Ol(e){for(var t=e.return;t!==null&&(jl(t)&&em(e.stateNode,t.stateNode),!Al(t));)t=t.return}function kl(e){for(var t=e.return;t!==null&&(jl(t)&&tm(e.stateNode,t.stateNode),!Al(t));)t=t.return}function Al(e){return e.tag===5||e.tag===3||e.tag===27}function jl(e){return e&&e.tag===7&&e.stateNode!==null}function Ml(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Nl(e,t,n){try{var r=e.stateNode;ip(r,e.type,n,t),r[Ot]=t}catch(t){Z(e,e.return,t)}}function Pl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Sp(e.type)||e.tag===4}function Fl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Pl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Sp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Il(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=xn)),Dl(e,r),I=!0;else if(i!==4&&(i===27&&(Dl(e,r),r=null,Sp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Il(e,t,n,r),e=e.sibling;e!==null;)Il(e,t,n,r),e=e.sibling}function Ll(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Dl(e,r),I=!0;else if(i!==4&&(i===27&&(Dl(e,r),r=null,Sp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Ll(e,t,n,r),e=e.sibling;e!==null;)Ll(e,t,n,r),e=e.sibling}function Rl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);np(t,r,n),t[Dt]=e,t[Ot]=n}catch(t){Z(e,e.return,t)}}var zl=!1,Bl=null;function Vl(e){(e.tag===30||e.subtreeFlags&33554432)&&(zl=!0)}var Hl=null;function Ul(){var e=Hl;return Hl=null,e}var Wl=0;function Gl(e,t,n,r,i){return Wl=0,Kl(e.child,t,n,r,i)}function Kl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Op(o);r.push(s),s.view&&(a=!0)}else a||Op(o).view&&(a=!0);zl=!0,Tp(o,Wl===0?t:t+`_`+Wl,n),Wl++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Kl(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function ql(e,t){for(;e!==null;)e.tag===5?Ep(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||ql(e.child,t)),e=e.sibling}function Jl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Jl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(s(544));var n=t.name;t=yi(t.default,t.share),t!==`none`&&(Gl(e,n,t,null,!1)||ql(e.child,!1))}e=e.sibling}}function Yl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=_i(r,n),a=yi(r.default,n.paired?r.share:r.enter);a===`none`?Jl(e):Gl(e,i,a,null,!1)?(Jl(e),n.paired||t||Nd(e,r.onEnter)):ql(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Yl(e,t),e=e.sibling;else Jl(e)}function Xl(e){if(Bl!==null&&Bl.size!==0){var t=Bl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=yi(n.default,n.share);if(a!==`none`&&(Gl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Nd(e,n.onShare)):ql(e.child,!1)),t.delete(r),t.size===0)break}}}Xl(e)}e=e.sibling}}}function Zl(e){if(e.tag===30){var t=e.memoizedProps,n=_i(t,e.stateNode),r=Bl===null?void 0:Bl.get(n),i=yi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Gl(e,n,i,null,!1)?r===void 0?Nd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Bl.delete(n),Nd(e,t.onShare)):ql(e.child,!1)),Bl!==null&&Xl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Zl(e),e=e.sibling;else Bl!==null&&Xl(e)}function Ql(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=_i(t,e.stateNode);t=yi(t.default,t.update),e.flags&=-5,t!==`none`&&Gl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Ql(e);e=e.sibling}}function $l(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,ql(e.child,!1))}$l(e)}e=e.sibling}}function eu(e){if(e.tag===30)e.stateNode.paired=null,ql(e.child,!1),$l(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)eu(e),e=e.sibling;else $l(e)}function tu(e){for(e=e.child;e!==null;)e.tag===30?ql(e.child,!1):e.subtreeFlags&33554432&&tu(e),e=e.sibling}function nu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Wl<a.length){var l=a[Wl],u=Op(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Tp(c,Wl===0?n:n+`_`+Wl,i),s&&e.flags&4||(Hl===null&&(Hl=[]),Hl.push(c,Wl===0?r:r+`_`+Wl,t.memoizedProps)),Wl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:nu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function ru(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=_i(n,r),a=yi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(kp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Wl=0,i=nu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Nd(e,n.onUpdate))}else e.subtreeFlags&33554432&&ru(e,t);e=e.sibling}}var iu=!1,G=!1,au=!1,ou=!1,su=typeof WeakSet==`function`?WeakSet:Set,cu=null,lu=!1,uu=!1,du=!1,fu=!1;function pu(e,t,n){if(e=e.containerInfo,sp=gh,e=Yr(e),Xr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(cp={focusedElem:e,selectionRange:r},gh=!1,n=(n&335544064)===n,cu=t,t=n?9270:1024;cu!==null;){if(e=cu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Zl(r[a]);if(e.alternate===null&&e.flags&2)n&&Vl(e),mu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Zl(r),mu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Vl(e),mu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,cu=r):(n&&Ql(e),mu(n))}}Bl=null}function mu(e){for(;cu!==null;){var t=cu,n=e,r=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(i&1024&&r!==null){n=void 0,i=r.memoizedProps,r=r.memoizedState;var a=t.stateNode;try{var o=Sc(t.type,i);n=a.getSnapshotBeforeUpdate(o,r),a.__reactInternalSnapshotBeforeUpdate=n}catch(e){Z(t,t.return,e)}}break;case 3:if(i&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)nm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:nm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=_i(r.memoizedProps,r.stateNode),i=t.memoizedProps,i=yi(i.default,i.update),i!==`none`&&Gl(r,n,i,r.memoizedState=[],!0));break;default:if(i&1024)throw Error(s(163))}if(r=t.sibling,r!==null){r.return=t.return,cu=r;break}cu=t.return}}function hu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Fu(e,n),r&4&&xl(5,n);break;case 1:if(Fu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Sc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}}r&64&&Cl(n),r&512&&Tl(n,n.return);break;case 3:if(Fu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{wo(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&Rl(n);case 26:case 5:Fu(e,n),t===null&&r&4&&Ml(n),r&512&&Tl(n,n.return);break;case 12:Fu(e,n);break;case 31:Fu(e,n),r&4&&wu(e,n);break;case 13:Fu(e,n),r&4&&Tu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=_f.bind(null,n),cm(e,n))));break;case 22:if(r=n.memoizedState!==null||iu,!r){var a=t!==null&&t.memoizedState!==null||G;t=iu,i=G,iu=r,(G=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Lu(e,n,r)):Fu(e,n),iu=t,G=i}break;case 30:Fu(e,n),r&512&&Tl(n,n.return);break;case 7:r&512&&Tl(n,n.return);default:Fu(e,n)}}function gu(e,t){for(e=e.child;e!==null;)_u(e,t),e=e.sibling}function _u(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){Z(e,e.return,t)}vu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,I=!0}catch(t){Z(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?wp(s,!0):wp(e.stateNode,!1)}catch(t){Z(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&gu(e,t);break;default:gu(e,t)}}function vu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:_u(n,r);break a;case 22:n.memoizedState===null&&vu(n,r);break a;default:vu(n,r)}}e=e.sibling}}function yu(e){var t=e.alternate;t!==null&&(e.alternate=null,yu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ft(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var bu=null,xu=!1;function Su(e,t,n){for(n=n.child;n!==null;)Cu(e,t,n),n=n.sibling}function Cu(e,t,n){if(tt&&typeof tt.onCommitFiberUnmount==`function`)try{tt.onCommitFiberUnmount(et,n)}catch{}switch(n.tag){case 26:G||El(n,t),Su(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!G&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:G||El(n,t),kl(n);var r=bu,i=xu;Sp(n.type)&&(bu=n.stateNode,xu=!1),Su(e,t,n),gm(n.stateNode,n.type,n.memoizedProps),bu=r,xu=i;break;case 5:G||El(n,t),kl(n);case 6:if(n.tag===6&&kl(n),r=bu,i=xu,bu=null,Su(e,t,n),bu=r,xu=i,bu!==null){if(xu)try{(bu.nodeType===9?bu.body:bu.nodeName===`HTML`?bu.ownerDocument.body:bu).removeChild(n.stateNode),I=!0}catch(e){Z(n,t,e)}else try{bu.removeChild(n.stateNode),I=!0}catch(e){Z(n,t,e)}}break;case 18:bu!==null&&(xu?(e=bu,Cp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hh(e)):Cp(bu,n.stateNode));break;case 4:r=bu,i=xu,bu=n.stateNode.containerInfo,xu=!0,Su(e,t,n),bu=r,xu=i;break;case 0:case 11:case 14:case 15:Sl(2,n,t),G||Sl(4,n,t),Su(e,t,n);break;case 1:G||(El(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&wl(n,t,r)),Su(e,t,n);break;case 21:Su(e,t,n);break;case 22:G=(r=G)||n.memoizedState!==null,Su(e,t,n),G=r;break;case 30:El(n,t),Su(e,t,n);break;case 7:G||El(n,t),Su(e,t,n);break;default:Su(e,t,n)}}function wu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hh(e)}catch(e){Z(t,t.return,e)}}}function Tu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hh(e)}catch(e){Z(t,t.return,e)}}function Eu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new su),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new su),t;default:throw Error(s(435,e.tag))}}function Du(e,t){var n=Eu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=vf.bind(null,e,t);t.then(r,r)}})}function Ou(e,t,n){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var a=r[i],o=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Sp(l.type)){bu=l.stateNode,xu=!1;break a}break;case 5:bu=l.stateNode,xu=!1;break a;case 3:case 4:bu=l.stateNode.containerInfo,xu=!0;break a}l=l.return}if(bu===null)throw Error(s(160));Cu(o,c,a),bu=null,xu=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Au(t,e,n),t=t.sibling}var ku=null;function Au(e,t,n){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(i&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var a=0;a<r.length;a++){var o=r[a];o.ref.impl=o.nextImpl}Ou(t,e,n),ju(e),i&4&&(Sl(3,e,e.return),xl(3,e),Sl(5,e,e.return));break;case 1:Ou(t,e,n),ju(e),i&512&&(G||r===null||El(r,r.return)),i&64&&iu&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(a=ku,Ou(t,e,n),ju(e),i&512&&(G||r===null||El(r,r.return)),i&4){if(i=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(iu)e.stateNode=fp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,i=a.ownerDocument||a;b:switch(t){case`title`:r=i.getElementsByTagName(`title`)[0],(!r||r[Nt]||r[Dt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=i.createElement(t),i.head.insertBefore(r,i.querySelector(`head > title`))),np(r,t,n),r[Dt]=e,Bt(r),t=r;break a;case`link`:if(a=Gm(`link`,`href`,i).get(t+(n.href||``))){for(o=0;o<a.length;o++)if(r=a[o],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){a.splice(o,1);break b}}r=i.createElement(t),np(r,t,n),i.head.appendChild(r);break;case`meta`:if(a=Gm(`meta`,`content`,i).get(t+(n.content||``))){for(o=0;o<a.length;o++)if(r=a[o],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){a.splice(o,1);break b}}r=i.createElement(t),np(r,t,n),i.head.appendChild(r);break;default:throw Error(s(468,t))}r[Dt]=e,Bt(r),t=r}e.stateNode=t}}else iu||Km(a,e.type,e.stateNode)}else e.stateNode=Bm(a,n,e.memoizedProps)}else i===n?n===null&&e.stateNode!==null&&Nl(e,e.memoizedProps,r.memoizedProps):(i===null?(t=r.stateNode,t===null||G||t.parentNode.removeChild(t)):i.count--,n===null?iu||Km(a,e.type,e.stateNode):Bm(a,n,e.memoizedProps))}break;case 27:Ou(t,e,n),ju(e),i&512&&(G||r===null||El(r,r.return)),r!==null&&i&4&&Nl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(a=au,au=!1,Ou(t,e,n),au=a,ju(e),i&512&&(G||r===null||El(r,r.return)),e.flags&32){t=e.stateNode;try{pn(t,``),I=!0}catch(t){Z(e,e.return,t)}}i&4&&e.stateNode!=null&&(t=e.memoizedProps,Nl(e,t,r===null?t:r.memoizedProps)),i&1024&&(ou=!0);break;case 6:if(Ou(t,e,n),ju(e),i&4){if(e.stateNode===null)throw Error(s(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,I=!0}catch(t){Z(e,e.return,t)}}break;case 3:if(I=!1,Wm=null,a=ku,ku=bm(t.containerInfo),Ou(t,e,n),ku=a,ju(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{Hh(t.containerInfo)}catch(t){Z(e,e.return,t)}ou&&(ou=!1,Mu(e)),I=!1;break;case 4:i=au,au=iu,r=Yt(),a=ku,ku=bm(e.stateNode.containerInfo),Ou(t,e,n),ju(e),ku=a,I&&uu&&(du=!0),I=r,au=i;break;case 12:Ou(t,e,n),ju(e);break;case 31:Ou(t,e,n),ju(e),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 13:Ou(t,e,n),ju(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(md=Ke()),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 22:a=e.memoizedState!==null,o=r!==null&&r.memoizedState!==null;var c=iu,l=G,u=au;iu=c||a,au=u||a,G=l||o,Ou(t,e,n),G=l,au=u,iu=c,ju(e),i&8192&&(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,!a||r===null||o||iu||G||(t=o||G,n=iu,r=G,iu=a||iu,G=t,Iu(e,2),iu=n,G=r),!a&&au||gu(e,a)),i&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Du(e,n))));break;case 19:Ou(t,e,n),ju(e),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 30:i&512&&(G||r===null||El(r,r.return)),i=Yt(),a=uu,o=(n&335544064)===n,c=e.memoizedProps,uu=o&&yi(c.default,c.update)!==`none`,Ou(t,e,n),ju(e),o&&r!==null&&I&&(e.flags|=4),uu=a,I=i;break;case 21:break;case 7:i&512&&(G||r===null||El(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Ou(t,e,n),ju(e)}}function ju(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Pl(r)){n=r;break}r=r.return}r=null;for(var i=e.return;i!==null;){if(jl(i)){var a=i.stateNode;r===null?r=[a]:r.push(a)}if(Al(i))break;i=i.return}var o=r;if(n==null)throw Error(s(160));switch(n.tag){case 27:var c=n.stateNode;Ll(e,Fl(e),c,o);break;case 5:var l=n.stateNode;n.flags&32&&(pn(l,``),n.flags&=-33),Ll(e,Fl(e),l,o);break;case 3:case 4:var u=n.stateNode.containerInfo;Il(e,Fl(e),u,o);break;default:throw Error(s(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,gh=!0,t.reset(),gh=!1),e=e.sibling}}function Nu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Pu(t,e),t=t.sibling;else ru(t,!1)}function Pu(e,t){var n=e.alternate;if(n===null)Yl(e,!1);else switch(e.tag){case 3:if(fu=lu=!1,Ul(),Nu(t,e),!lu&&!du){if(e=Hl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Ep(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),fu=!0}Hl=null;break;case 5:Nu(t,e);break;case 4:r=lu,lu=!1,Nu(t,e),lu&&(du=!0),lu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Nu(t,e):Yl(e,!1));break;case 30:r=lu,i=Ul(),lu=!1,Nu(t,e),lu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=_i(a,o),o=_i(n.memoizedProps,o);var s=yi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Wl=0,t=nu(e,n,t,o,s,a,!0),Wl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Nd(e,e.memoizedProps.onUpdate),Hl=i):i!==null&&(i.push.apply(i,Hl),Hl=i),lu=e.flags&32?!0:r;break;default:Nu(t,e)}}function Fu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hu(e,t.alternate,t),t=t.sibling}function Iu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Sl(4,n,n.return),Iu(n,r);break;case 1:El(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&wl(n,n.return,i),Iu(n,r);break;case 27:r&2&&gm(n.stateNode,n.type,n.memoizedProps);case 5:El(n,n.return),n.tag!==5&&n.tag!==27||kl(n),Iu(n,r);break;case 6:kl(n);break;case 26:El(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||G||i.parentNode.removeChild(i),Iu(n,r);break;case 22:n.memoizedState===null&&Iu(n,r);break;case 30:El(n,n.return),Iu(n,r);break;case 7:El(n,n.return);default:Iu(n,r)}e=e.sibling}}function Lu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Lu(i,a,n),xl(4,a);break;case 1:if(Lu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)Co(l[i],c)}catch(e){Z(r,r.return,e)}}s&&o&64&&Cl(a),Tl(a,a.return);break;case 27:n&2&&Rl(a);case 5:a.tag!==5&&a.tag!==27||Ol(a),Lu(i,a,n),s&&r===null&&o&4&&Ml(a),Tl(a,a.return);break;case 6:Ol(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||iu||Km(bm(c.ownerDocument),a.type,c),Lu(i,a,n),s&&r===null&&o&4&&Ml(a),Tl(a,a.return);break;case 12:Lu(i,a,n);break;case 31:Lu(i,a,n),s&&o&4&&wu(i,a);break;case 13:Lu(i,a,n),s&&o&4&&Tu(i,a);break;case 22:a.memoizedState===null&&Lu(i,a,n),Tl(a,a.return);break;case 30:Lu(i,a,n),Tl(a,a.return);break;case 7:Tl(a,a.return);default:Lu(i,a,n)}t=t.sibling}}function Ru(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ma(n))}function zu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ma(e))}function Bu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Vu(e,t,n,r),t=t.sibling;else i&&tu(t)}function Vu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&eu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Bu(e,t,n,r),a&2048&&xl(9,t);break;case 1:Bu(e,t,n,r);break;case 3:Bu(e,t,n,r),i&&fu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Ma(a)));break;case 12:if(a&2048){Bu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){Z(t,t.return,e)}}else Bu(e,t,n,r);break;case 31:Bu(e,t,n,r);break;case 13:Bu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&eu(t),o._visibility&2?Bu(e,t,n,r):(o._visibility|=2,Hu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&eu(s),o._visibility&2?Bu(e,t,n,r):Uu(e,t)),a&2048&&Ru(s,t);break;case 24:Bu(e,t,n,r),a&2048&&zu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(ql(a.child,!0),ql(t.child,!0))),Bu(e,t,n,r);break;default:Bu(e,t,n,r)}}function Hu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Hu(a,o,s,c,i),xl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Hu(a,o,s,c,i)):u._visibility&2?Hu(a,o,s,c,i):Uu(a,o),i&&l&2048&&Ru(o.alternate,o);break;case 24:Hu(a,o,s,c,i),i&&l&2048&&zu(o.alternate,o);break;default:Hu(a,o,s,c,i)}t=t.sibling}}function Uu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Uu(n,r),i&2048&&Ru(r.alternate,r);break;case 24:Uu(n,r),i&2048&&zu(r.alternate,r);break;default:Uu(n,r)}t=t.sibling}}var Wu=8192;function Gu(e,t,n){if(e.subtreeFlags&Wu)for(e=e.child;e!==null;)Ku(e,t,n),e=e.sibling}function Ku(e,t,n){switch(e.tag){case 26:Gu(e,t,n),e.flags&Wu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Zm(n,e)):Qm(n,ku,e.memoizedState,e.memoizedProps));break;case 5:Gu(e,t,n),e.flags&Wu&&(e=e.stateNode,(t&335544128)===t&&Zm(n,e));break;case 3:case 4:var r=ku;ku=bm(e.stateNode.containerInfo),Gu(e,t,n),ku=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Wu,Wu=16777216,Gu(e,t,n),Wu=r):Gu(e,t,n));break;case 30:if((e.flags&Wu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Bl===null&&(Bl=new Map),Bl.set(r,i)}Gu(e,t,n);break;default:Gu(e,t,n)}}function qu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ju(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cu=r,Zu(r,e)}qu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Yu(e),e=e.sibling}function Yu(e){switch(e.tag){case 0:case 11:case 15:Ju(e),e.flags&2048&&Sl(9,e,e.return);break;case 3:Ju(e);break;case 12:Ju(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Xu(e)):Ju(e);break;default:Ju(e)}}function Xu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cu=r,Zu(r,e)}qu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Sl(8,t,t.return),Xu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Xu(t));break;default:Xu(t)}e=e.sibling}}function Zu(e,t){for(;cu!==null;){var n=cu;switch(n.tag){case 0:case 11:case 15:Sl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Ma(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,cu=r;else a:for(n=e;cu!==null;){r=cu;var i=r.sibling,a=r.return;if(yu(r),r===n){cu=null;break a}if(i!==null){i.return=a,cu=i;break a}cu=a}}}var Qu={getCacheForType:function(e){var t=wa(Aa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return wa(Aa).controller.signal}},$u=typeof WeakMap==`function`?WeakMap:Map,K=0,q=null,J=null,Y=0,X=0,ed=null,td=!1,nd=!1,rd=!1,id=0,ad=0,od=0,sd=0,cd=0,ld=0,ud=0,dd=null,fd=null,pd=!1,md=0,hd=0,gd=1/0,_d=null,vd=null,yd=0,bd=null,xd=null,Sd=0,Cd=0,wd=null,Td=null,Ed=null,Dd=null,Od=null,kd=0,Ad=null;function jd(){return K&2&&Y!==0?Y&-Y:k.T===null?wt():Pf()}function Md(){if(ld===0){if(!(Y&536870912)||V){var e=ct;ct<<=1,!(ct&3932160)&&(ct=262144),ld=e}else ld=536870912}return e=Ao.current,e!==null&&(e.flags|=32),ld}function Nd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Pp(_i(e.memoizedProps,n))),Dd===null&&(Dd=[]),Dd.push(t.bind(null,r))}}function Pd(e,t,n){(e===q&&(X===2||X===9)||e.cancelPendingCommit!==null)&&(Vd(e,0),Rd(e,Y,ld,!1)),_t(e,n),(!(K&2)||e!==q)&&(e===q&&(!(K&2)&&(sd|=n),ad===4&&Rd(e,Y,ld,!1)),Ef(e))}function Fd(e,t,n){if(K&6)throw Error(s(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ft(e,t),i=r?Yd(e,t):qd(e,t,!0),a=r;do{if(i===0){nd&&!r&&Rd(e,t,0,!1);break}if(n=e.current.alternate,a&&!Ld(n)){i=qd(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var o=0;else o=e.pendingLanes&-536870913,o=o===0?o&536870912?536870912:0:o;if(o!==0){t=o;a:{var c=e;i=dd;var l=c.current.memoizedState.isDehydrated;if(l&&(Vd(c,o).flags|=256),o=qd(c,o,!1),o!==2&&o!==6){if(rd&&!l){c.errorRecoveryDisabledLanes|=a,sd|=a,i=4;break a}a=fd,fd=i,a!==null&&(fd===null?fd=a:fd.push.apply(fd,a))}i=o}if(a=!1,i!==2)continue}}if(i===1){Vd(e,0),Rd(e,t,0,!0);break}a:{switch(r=e,a=i,a){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Rd(r,t,ld,!td);break a;case 2:fd=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(i=md+300-Ke(),10<i)){if(Rd(r,t,ld,!td),dt(r,0,!0)!==0)break a;Sd=t,r.timeoutHandle=gp(Id.bind(null,r,n,fd,_d,pd,t,ld,sd,ud,td,a,`Throttled`,-0,0),i);break a}Id(r,n,fd,_d,pd,t,ld,sd,ud,td,a,null,-0,0)}break}while(1);Ef(e)}function Id(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;if(d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xn},Bl=null,Ku(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=nh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?md-Ke():(a&4194048)===a?hd-Ke():0,m=eh(d,m),m!==null)){Sd=a,e.cancelPendingCommit=m(nf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Rd(e,a,o,!l);return}nf(e,t,a,n,r,i,o,s,c,l,u,d)}function Ld(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ur(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Rd(e,t,n,r){t=pt(e,t),t&=~cd,t&=~sd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-rt(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&yt(e,n,t)}function zd(){return K&6?!0:(Df(0,!1),!1)}function Bd(){if(J!==null){if(X===0)var e=J.return;else e=J,ga=ha=null,is(e),io=null,ao=0,e=J;for(;e!==null;)bl(e.alternate,e),e=e.return;J=null}}function Vd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,_p(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Sd=0,Bd(),q=e,J=n=Pi(e.current,null),Y=t,X=0,ed=null,td=!1,nd=ft(e,t),rd=!1,ud=ld=cd=sd=od=ad=0,fd=dd=null,pd=!1,id=pt(e,t),wi(),n}function Hd(e,t){H=null,k.H=mc,t===Ja||t===Xa?(t=no(),X=3):t===Ya?(t=no(),X=4):X=t===Mc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ed=t,J===null&&(ad=1,Ec(e,Hi(t,e.current)))}function Ud(){var e=Ao.current;return e===null?!0:(Y&4194048)===Y?jo===null:(Y&62914560)===Y||Y&536870912?e===jo:!1}function Wd(){var e=k.H;return k.H=mc,e===null?mc:e}function Gd(){var e=k.A;return k.A=Qu,e}function Kd(){ad=4,td||(Y&4194048)!==Y&&Ao.current!==null||(nd=!0),!(od&134217727)&&!(sd&134217727)||q===null||Rd(q,Y,ld,!1)}function qd(e,t,n){var r=K;K|=2;var i=Wd(),a=Gd();(q!==e||Y!==t)&&(_d=null,Vd(e,t)),t=!1;var o=ad;a:do try{if(X!==0&&J!==null){var s=J,c=ed;switch(X){case 8:Bd(),o=6;break a;case 3:case 2:case 9:case 6:Ao.current===null&&(t=!0);var l=X;if(X=0,ed=null,$d(e,s,c,l),n&&nd){o=0;break a}break;default:l=X,X=0,ed=null,$d(e,s,c,l)}}Jd(),o=ad;break}catch(t){Hd(e,t)}while(1);return t&&e.shellSuspendCounter++,ga=ha=null,K=r,k.H=i,k.A=a,J===null&&(q=null,Y=0,wi()),o}function Jd(){for(;J!==null;)Zd(J)}function Yd(e,t){var n=K;K|=2;var r=Wd(),i=Gd();q!==e||Y!==t?(_d=null,gd=Ke()+500,Vd(e,t)):nd=ft(e,t);a:do try{if(X!==0&&J!==null){t=J;var a=ed;b:switch(X){case 1:X=0,ed=null,$d(e,t,a,1);break;case 2:case 9:if(Qa(a)){X=0,ed=null,Qd(t);break}t=function(){X!==2&&X!==9||q!==e||(X=7),Ef(e)},a.then(t,t);break a;case 3:X=7;break a;case 4:X=5;break a;case 7:Qa(a)?(X=0,ed=null,Qd(t)):(X=0,ed=null,$d(e,t,a,7));break;case 5:var o=null;switch(J.tag){case 26:o=J.memoizedState;case 5:case 27:var c=J;if(o?Ym(o):c.stateNode.complete){X=0,ed=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,ef(u))}break b}}X=0,ed=null,$d(e,t,a,5);break;case 6:X=0,ed=null,$d(e,t,a,6);break;case 8:Bd(),ad=6;break a;default:throw Error(s(462))}}Xd();break}catch(t){Hd(e,t)}while(1);return ga=ha=null,k.H=r,k.A=i,K=n,J===null?(q=null,Y=0,wi(),ad):0}function Xd(){for(;J!==null&&!We();)Zd(J)}function Zd(e){var t=fl(e.alternate,e,id);e.memoizedProps=e.pendingProps,t===null?ef(e):J=t}function Qd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Kc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=Kc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:is(t);var r=t;r===ra&&(V?(la(r),r.tag===5&&r.stateNode!=null&&(B=r.stateNode)):(la(r),V=!0));default:bl(n,t),t=J=Fi(t,id),t=fl(n,t,id)}e.memoizedProps=e.pendingProps,t===null?ef(e):J=t}function $d(e,t,n,r){ga=ha=null,is(t),io=null,ao=0;var i=t.return;try{if(jc(e,i,t,n,Y)){ad=1,Ec(e,Hi(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;ad=1,Ec(e,Hi(n,e.current)),J=null;return}t.flags&32768?(V||r===1?e=!0:nd||Y&536870912?e=!1:(td=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ao.current,r!==null&&r.tag===13&&(r.flags|=16384))),tf(t,e)):ef(t)}function ef(e){var t=e;do{if(t.flags&32768){tf(t,td);return}e=t.return;var n=vl(t.alternate,t,id);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);ad===0&&(ad=5)}function tf(e,t){do{var n=yl(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);ad=6,J=null}function nf(e,t,n,r,i,a,o,c,l,u,d,f){e.cancelPendingCommit=null;do df();while(yd!==0);if(K&6)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));e===q&&(J=q=null,Y=0),xd=t,bd=e,Sd=n,wd=i,Td=r,rf(e,t,n,o,c,l,f)}}function rf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Cd=s,s|=Ci,vt(e,n,s,r,i,a),Dd=null,(n&335544064)===n?(Od=Fa(e),r=10262):(Od=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,yf(Xe,function(){return ff(),null})):(e.callbackNode=null,e.callbackPriority=0),zl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=k.T,k.T=null,i=A.p,A.p=2,a=K,K|=4;try{pu(e,t,n)}finally{K=a,A.p=i,k.T=r}}yd=1,zl?Ed=Mp(o,e.containerInfo,Od,sf,cf,of,lf,ff,af,null,null):(sf(),cf(),lf())}function af(e){if(yd!==0){var t=bd.onRecoverableError;t(e,{componentStack:null})}}function of(){yd===3&&(yd=0,Pu(xd,bd),yd=4)}function sf(){if(yd===1){yd=0;var e=bd,t=xd,n=Sd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=k.T,k.T=null;var i=A.p;A.p=2;var a=K;K|=4;try{uu=du=!1,Au(t,e,n),n=cp;var o=Yr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Jr(s.ownerDocument.documentElement,s)){if(c!==null&&Xr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=qr(s,h),v=qr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}gh=!!sp,cp=sp=null}finally{K=a,A.p=i,k.T=r}}e.current=t,yd=2}}function cf(){if(yd===2){yd=0;var e=bd,t=xd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=k.T,k.T=null;var r=A.p;A.p=2;var i=K;K|=4;try{hu(e,t.alternate,t)}finally{K=i,A.p=r,k.T=n}}yd=3}}function lf(){if(yd===4||yd===3){yd=0;var e=Ed;Ed=null,Ge();var t=bd,n=xd,r=Sd,i=Td,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?yd=5:(yd=0,xd=bd=null,uf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(vd=null),Ct(r),n=n.stateNode,tt&&typeof tt.onCommitFiberRoot==`function`)try{tt.onCommitFiberRoot(et,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=k.T,a=A.p,A.p=2,k.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{k.T=n,A.p=a}}if(i=Dd,o=Od,Od=null,i!==null&&(Dd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Sd&3&&df(),Ef(t),a=t.pendingLanes,r&261930&&a&42?t===Ad?kd++:(kd=0,Ad=t):(kd=0,Ad=null),Df(0,!1)}}function uf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ma(t)))}function df(){return Ed!==null&&(Ed.skipTransition(),Ed=null),sf(),cf(),lf(),ff()}function ff(){if(yd!==5)return!1;var e=bd,t=Cd;Cd=0;var n=Ct(Sd),r=k.T,i=A.p;try{A.p=32>n?32:n,k.T=null,n=wd,wd=null;var a=bd,o=Sd;if(yd=0,xd=bd=null,Sd=0,K&6)throw Error(s(331));var c=K;if(K|=4,Yu(a.current),Vu(a,a.current,o,n),K=c,Df(0,!1),tt&&typeof tt.onPostCommitFiberRoot==`function`)try{tt.onPostCommitFiberRoot(et,a)}catch{}return!0}finally{A.p=i,k.T=r,uf(e,t)}}function pf(e,t,n){t=Hi(n,t),t=Oc(e.stateNode,t,2),e=_o(e,t,2),e!==null&&(_t(e,2),Ef(e))}function Z(e,t,n){if(e.tag===3)pf(e,e,n);else for(;t!==null;){if(t.tag===3){pf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(vd===null||!vd.has(r))){e=Hi(n,e),n=kc(2),r=_o(t,n,2),r!==null&&(Ac(n,r,t,e),_t(r,2),Ef(r));break}}t=t.return}}function mf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $u;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(rd=!0,i.add(n),e=hf.bind(null,e,t,n),t.then(e,e))}function hf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(ad===4||ad===3&&(Y&62914560)===Y&&300>Ke()-md?K&2?cd|=n:Vd(e,0):cd|=n,ud===Y&&(ud=0)),Ef(e)}function gf(e,t){t===0&&(t=ht()),e=Di(e,t),e!==null&&(_t(e,t),Ef(e))}function _f(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gf(e,n)}function vf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(t),gf(e,n)}function yf(e,t){return He(e,t)}var bf=null,xf=null,Sf=!1,Cf=!1,wf=!1,Tf=0;function Ef(e){e!==xf&&e.next===null&&(xf===null?bf=xf=e:xf=xf.next=e),Cf=!0,Sf||(Sf=!0,Nf())}function Df(e,t){if(!wf&&Cf){wf=!0;do for(var n=!1,r=bf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-rt(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Mf(r,a))}else a=Y,a=dt(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ft(r,a)||(n=!0,Mf(r,a))}r=r.next}while(n);wf=!1}}function Of(){kf()}function kf(){Cf=Sf=!1;var e=0;Tf!==0&&hp()&&(e=Tf);for(var t=Ke(),n=null,r=bf;r!==null;){var i=r.next,a=Af(r,t);a===0?(r.next=null,n===null?bf=i:n.next=i,i===null&&(xf=n)):(n=r,(e!==0||a&3)&&(Cf=!0)),r=i}yd!==0&&yd!==5||Df(e,!1),Tf!==0&&(Tf=0)}function Af(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-rt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=mt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=q,n=Y,n=dt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(X===2||X===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ue(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ft(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ue(r),Ct(n)){case 2:case 8:n=Ye;break;case 32:n=Xe;break;case 268435456:n=Qe;break;default:n=Xe}return r=jf.bind(null,e),n=He(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ue(r),e.callbackPriority=2,e.callbackNode=null,2}function jf(e,t){if(yd!==0&&yd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(df()&&e.callbackNode!==n)return null;var r=Y;return r=dt(e,e===q?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Fd(e,r,t),Af(e,Ke()),e.callbackNode!=null&&e.callbackNode===n?jf.bind(null,e):null)}function Mf(e,t){if(df())return null;Fd(e,t,!0)}function Nf(){bp(function(){K&6?He(Je,Of):kf()})}function Pf(){if(Tf===0){var e=Ra;e===0&&(e=st,st<<=1,!(st&261888)&&(st=256)),Tf=e}return Tf}function Ff(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:bn(e)}function If(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Ff((i[Ot]||null).action),o=r.submitter;o&&(t=(t=o[Ot]||null)?Ff(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Hn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Tf!==0){var e=new FormData(i,o);ec(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),ec(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Lf=0;Lf<mi.length;Lf++){var Rf=mi[Lf];hi(Rf.toLowerCase(),`on`+(Rf[0].toUpperCase()+Rf.slice(1)))}hi(oi,`onAnimationEnd`),hi(si,`onAnimationIteration`),hi(ci,`onAnimationStart`),hi(`dblclick`,`onDoubleClick`),hi(`focusin`,`onFocus`),hi(`focusout`,`onBlur`),hi(li,`onTransitionRun`),hi(ui,`onTransitionStart`),hi(di,`onTransitionCancel`),hi(fi,`onTransitionEnd`),Wt(`onMouseEnter`,[`mouseout`,`mouseover`]),Wt(`onMouseLeave`,[`mouseout`,`mouseover`]),Wt(`onPointerEnter`,[`pointerout`,`pointerover`]),Wt(`onPointerLeave`,[`pointerout`,`pointerover`]),Ut(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ut(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ut(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ut(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ut(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ut(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var zf=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Bf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(zf));function Vf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){bi(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){bi(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[At];n===void 0&&(n=t[At]=new Set);var r=e+`__bubble`;n.has(r)||(Gf(t,e,2,!1),n.add(r))}function Hf(e,t,n){var r=0;t&&(r|=4),Gf(n,e,r,t)}var Uf=`_reactListening`+Math.random().toString(36).slice(2);function Wf(e){if(!e[Uf]){e[Uf]=!0,Ht.forEach(function(t){t!==`selectionchange`&&(Bf.has(t)||Hf(t,!1,e),Hf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Uf]||(t[Uf]=!0,Hf(`selectionchange`,!1,t))}}function Gf(e,t,n,r){switch(Ch(t)){case 2:var i=_h;break;case 8:i=vh;break;default:i=yh}n=i.bind(null,t,n,e),i=void 0,!jn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Kf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=It(s),o===null)return;if(c=o.tag,c===5||c===6||c===26||c===27){r=a=o;continue a}s=s.parentNode}}r=r.return}On(function(){var r=a,i=Cn(n),o=[];a:{var s=pi.get(e);if(s!==void 0){var c=Hn,u=e;switch(e){case`keypress`:if(Ln(n)===0)break a;case`keydown`:case`keyup`:c=or;break;case`focusin`:u=`focus`,c=Zn;break;case`focusout`:u=`blur`,c=Zn;break;case`beforeblur`:case`afterblur`:c=Zn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=Yn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Xn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=lr;break;case oi:case si:case ci:c=Qn;break;case fi:c=ur;break;case`scroll`:case`scrollend`:c=Wn;break;case`wheel`:c=dr;break;case`copy`:case`cut`:case`paste`:c=$n;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=sr;break;case`submit`:c=cr;break;case`toggle`:case`beforetoggle`:c=fr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?s===null?null:s+`Capture`:s;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=kn(m,p),g!=null&&d.push(qf(m,g,h))),f)break;m=m.return}0<d.length&&(s=new c(s,u,null,n,i),o.push({event:s,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,s=e===`mouseout`||e===`pointerout`,c&&n!==Sn&&(u=n.relatedTarget||n.fromElement)&&(It(u)||u[kt]))break a;(s||c)&&(u=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,s?(c=n.relatedTarget||n.toElement,s=r,c=c?It(c):null,c!==null&&(f=l(c),d=c.tag,c!==f||d!==5&&d!==27&&d!==6)&&(c=null)):(s=null,c=r),s!==c&&(d=Yn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=sr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=s==null?u:Rt(s),h=c==null?u:Rt(c),u=new d(g,m+`leave`,s,n,i),u.target=f,u.relatedTarget=h,g=null,It(i)===r&&(d=new d(p,m+`enter`,c,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=s&&c?E(s,c,Yf):null,s!==null&&Xf(o,u,s,d,!1),c!==null&&f!==null&&Xf(o,f,c,d,!0)))}a:{if(s=r?Rt(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var _=jr;else if(Tr(s)){if(Mr)_=Vr;else{_=zr;var v=Rr}}else c=s.nodeName,!c||c.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&_n(r.elementType)&&(_=jr):_=Br;if(_&&=_(e,r)){Er(o,_,n,i);break a}v&&v(e,s,r)}switch(v=r?Rt(r):window,e){case`focusin`:(Tr(v)||v.contentEditable===`true`)&&(Qr=v,$r=r,ei=null);break;case`focusout`:ei=$r=Qr=null;break;case`mousedown`:ti=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ti=!1,R(o,n,i);break;case`selectionchange`:if(Zr)break;case`keydown`:case`keyup`:R(o,n,i)}var y;if(mr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else xr?L(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(_r&&n.locale!==`ko`&&(xr||b!==`onCompositionStart`?b===`onCompositionEnd`&&xr&&(y=In()):(Nn=i,Pn=`value`in Nn?Nn.value:Nn.textContent,xr=!0)),v=Jf(r,b),0<v.length&&(b=new er(b,e,null,n,i),o.push({event:b,listeners:v}),y?b.data=y:(y=br(n),y!==null&&(b.data=y)))),(y=gr?Sr(e,n):Cr(e,n))&&(b=Jf(r,`onBeforeInput`),0<b.length&&(v=new er(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:v,listeners:b}),v.data=y)),If(o,e,r,n,i)}Vf(o,t)})}function qf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Jf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=kn(e,n),i!=null&&r.unshift(qf(e,i,a)),i=kn(e,t),i!=null&&r.push(qf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Yf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xf(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=kn(n,a),l!=null&&o.unshift(qf(n,l,c))):i||(l=kn(n,a),l!=null&&o.push(qf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Zf=/\r\n?/g,Qf=/\u0000|\uFFFD/g;function $f(e){return(typeof e==`string`?e:``+e).replace(Zf,`
9
+ `).replace(Qf,``)}function ep(e,t){return t=$f(t),$f(e)===t}function $(e,t,n,r,i,a){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||pn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&pn(e,``+r);else return;break;case`className`:Zt(e,`class`,r);break;case`tabIndex`:Zt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Zt(e,n,r);break;case`style`:gn(e,r,a);return;case`data`:if(t!==`object`){Zt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=bn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof a==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,i.name,i,null),$(e,t,`formEncType`,i.formEncType,i,null),$(e,t,`formMethod`,i.formMethod,i,null),$(e,t,`formTarget`,i.formTarget,i,null)):($(e,t,`encType`,i.encType,i,null),$(e,t,`method`,i.method,i,null),$(e,t,`target`,i.target,i,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=bn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=xn);return;case`onScroll`:r!=null&&Q(`scroll`,e);return;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(s(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(s(60));a?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=bn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),Xt(e,`popover`,r);break;case`xlinkActuate`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Xt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=vn.get(n)||n,Xt(e,n,r);else return}I=!0}function tp(e,t,n,r,i,a){switch(n){case`style`:gn(e,r,a);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(s(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(s(60));a?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)pn(e,r);else if(typeof r==`number`||typeof r==`bigint`)pn(e,``+r);else return;break;case`onScroll`:r!=null&&Q(`scroll`,e);return;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=xn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!F.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),a=n.slice(2,i?n.length-7:void 0),t=e[Ot]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(a,t,i),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(a,r,i);break a}I=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Xt(e,n,r)}return}I=!0}function np(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var o=n[a];if(o!=null)switch(a){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(s(137,t));default:$(e,t,a,o,n,null)}}i&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=a=o=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:o=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:a=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(s(137,t));break;default:$(e,t,r,d,n,null)}}cn(e,a,c,l,u,o,i,!1);return;case`select`:for(i in Q(`invalid`,e),r=o=a=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:a=c;break;case`defaultValue`:o=c;break;case`multiple`:r=c;default:$(e,t,i,c,n,null)}t=a,n=o,e.multiple=!!r,t==null?n!=null&&un(e,!!r,n,!0):un(e,!!r,t,!1);return;case`textarea`:for(o in Q(`invalid`,e),a=i=r=null,n)if(n.hasOwnProperty(o)&&(c=n[o],c!=null))switch(o){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:a=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(s(91));break;default:$(e,t,o,c,n,null)}fn(e,r,i,a);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<zf.length;r++)Q(zf[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(s(137,t));default:$(e,t,u,r,n,null)}return;default:if(_n(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&tp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}var rp={};function ip(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,a=null,o=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(I=!0),a=m;break;case`name`:m!==f&&(I=!0),i=m;break;case`checked`:m!==f&&(I=!0),u=m;break;case`defaultChecked`:m!==f&&(I=!0),d=m;break;case`value`:m!==f&&(I=!0),o=m;break;case`defaultValue`:m!==f&&(I=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(s(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}sn(e,o,c,l,u,d,a,i);return;case`select`:for(a in m=o=c=p=null,n)if(l=n[a],n.hasOwnProperty(a)&&l!=null)switch(a){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(a)||$(e,t,a,null,r,l)}for(i in r)if(a=r[i],l=n[i],r.hasOwnProperty(i)&&(a!=null||l!=null))switch(i){case`value`:a!==l&&(I=!0),p=a;break;case`defaultValue`:a!==l&&(I=!0),c=a;break;case`multiple`:a!==l&&(I=!0),o=a;default:a!==l&&$(e,t,i,a,r,l)}t=c,n=o,r=m,p==null?!!r!=!!n&&(t==null?un(e,!!n,n?[]:``,!1):un(e,!!n,t,!0)):un(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,i)}for(o in r)if(i=r[o],a=n[o],r.hasOwnProperty(o)&&(i!=null||a!=null))switch(o){case`value`:i!==a&&(I=!0),p=i;break;case`defaultValue`:i!==a&&(I=!0),m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(s(91));break;default:i!==a&&$(e,t,o,i,r,a)}dn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(I=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(s(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(_n(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&tp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||tp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function ap(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function op(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&ap(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&ap(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var sp=null,cp=null;function lp(e){return e.nodeType===9?e:e.ownerDocument}function up(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function dp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function fp(e,t,n,r){return n=lp(n).createElement(e),n[Dt]=r,n[Ot]=t,np(n,e,t),Bt(n),n}function pp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var mp=null;function hp(){var e=window.event;return e&&e.type===`popstate`?e!==mp&&(mp=e,!0):(mp=null,!1)}var gp=typeof setTimeout==`function`?setTimeout:void 0,_p=typeof clearTimeout==`function`?clearTimeout:void 0,vp=typeof Promise==`function`?Promise:void 0,yp=typeof requestAnimationFrame==`function`?requestAnimationFrame:gp,bp=typeof queueMicrotask==`function`?queueMicrotask:vp===void 0?gp:function(e){return vp.resolve(null).then(e).catch(xp)};function xp(e){setTimeout(function(){throw e})}function Sp(e){return e===`head`}function Cp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)_m(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,_m(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Nt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&_m(e.ownerDocument.body)}n=i}while(n);Hh(t)}function wp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Tp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Ep(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Dp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Op(e){return Dp(e.getBoundingClientRect(),getComputedStyle(e),e)}function kp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Dp(t,n,e)}function Ap(e){return e.documentElement.clientHeight}function jp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Mp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Ap(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Xm(f),u>$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Np(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Np.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Np.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Np.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Pp(e){return{name:e,group:new Np(`group`,e),imagePair:new Np(`image-pair`,e),old:new Np(`old`,e),new:new Np(`new`,e)}}function Fp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Fp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Bp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Rp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),h(this._fragmentFiber.child,!1,Ip,e,s,r)}this._eventListeners=a}};function Ip(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Fp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Bp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Rp(i.optionsOrUseCapture),h(this._fragmentFiber.child,!1,Lp,e,n,i),r.splice(t,1),a!==null&&a()}};function Lp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Rp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function zp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Bp(e,t,n,r){if(e.length===0)return-1;r=zp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&zp(a.optionsOrUseCapture)===r)return i}return-1}Fp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Fp.prototype.focus=function(e){h(this._fragmentFiber.child,!0,Vp,e,void 0,void 0)};function Vp(e,t){return e.tag!==6&&(e=b(e),pm(e,t))}Fp.prototype.focusLast=function(e){var t=[];h(this._fragmentFiber.child,!0,Hp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Vp(t[n],e);n--);};function Hp(e,t){return t.push(e),!1}Fp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=lp(e).activeElement,e!==null&&h(this._fragmentFiber.child,!1,Up,e,void 0,void 0))};function Up(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Fp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),h(this._fragmentFiber.child,!1,Wp,e,void 0,void 0)};function Wp(e,t){return e.tag!==6&&(e=b(e),t.observe(e),!1)}Fp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),h(this._fragmentFiber.child,!1,Gp,e,void 0,void 0);for(var n=t=0;n<Kp.length;n++){var r=Kp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Kp[t++]=r}Kp.length=t}};function Gp(e,t){return e.tag!==6&&(e=b(e),t.unobserve(e),!1)}var Kp=[],qp=!1;function Jp(e,t,n){Kp.push({fragmentInstance:e,observer:t,instance:n}),qp||(qp=!0,mm(function(){qp=!1;var e=Kp;Kp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Fp.prototype.getClientRects=function(){var e=[];return h(this._fragmentFiber.child,!1,Yp,e,void 0,void 0),e};function Yp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Fp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Fp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];h(this._fragmentFiber.child,!1,Hp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Xp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Xp(e,t,n,r,i){var a=It(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(h(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(h(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function Zp(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Fp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(s(566));var t=[];h(this._fragmentFiber.child,!1,Hp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),Zp(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var i=t[r];i.tag===6?(i=b(i),Zp(i,n)):b(i).scrollIntoView(e),r+=n?-1:1}};function Qp(e,t){return e=b(e),$p(e,t),!1}function $p(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function em(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Kp.length;i++){var a=Kp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Kp[r++]=a)}Kp.length=r,n.observe(e)}),$p(e,t))}function tm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Jp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function nm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:nm(n),Ft(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rm(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Nt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=lm(e.nextSibling),e===null)break}return null}function im(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lm(e.nextSibling),e===null))return null;return e}function am(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lm(e.nextSibling),e===null))return null;return e}function om(e){return e.data===`$?`||e.data===`$~`}function sm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function lm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var um=null;function dm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function fm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function pm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function mm(e){yp(function(){yp(function(t){return e(t)})})}function hm(e,t,n){switch(t=lp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(s(452));return e;case`head`:if(e=t.head,!e)throw Error(s(453));return e;case`body`:if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function gm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&$(e,t,r,null,rp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===xn&&(e.onclick=null),Ft(e)}function _m(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ft(e)}var vm=new Map,ym=new Set;function bm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var xm=A.d;A.d={f:Sm,r:Cm,D:Em,C:Dm,L:Om,m:km,X:jm,S:Am,M:Mm};function Sm(){var e=xm.f(),t=zd();return e||t}function Cm(e){var t=Lt(e);t!==null&&t.tag===5&&t.type===`form`?nc(t):xm.r(e)}var wm=typeof document>`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=on(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),Bt(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+on(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+on(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+on(n.imageSizes)+`"]`)):i+=`[href="`+on(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[Pt]=!0,o.onload=o.onerror=function(){Vt(o)}),Bt(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+on(r)+`"][href="`+on(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),Bt(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=zt(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);Bt(c),np(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=zt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Bt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=zt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Bt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var i=(i=Oe.current)?bm(i):null;if(!i)throw Error(s(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=zt(i).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var a=zt(i).hoistableStyles,o=a.get(e);if(o||(i=i.ownerDocument||i,o={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,o),(a=i.querySelector(Fm(e)))?a._p||(o.instance=a,o.state.loading=5):(a=vm.get(e),a||(a={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,a)),Lm(i,e,a,o.state))),t&&r===null)throw Error(s(528,``));return o}if(t&&r!==null)throw Error(s(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=zt(i).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Pm(e){return`href="`+on(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Pt]){r.loading=1;return}}else t=e.createElement(`link`),t[Pt]=!0,t.onload=t.onerror=Vt.bind(null,t),np(t,`link`,n),Bt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+on(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+on(n.href)+`"]`);if(r)return t.instance=r,Bt(r),r;var i=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Bt(r),np(r,`style`,i),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Pm(n.href);var a=e.querySelector(Fm(i));if(a)return t.state.loading|=4,t.instance=a,Bt(a),a;r=Im(n),(i=vm.get(i))&&Hm(r,i),a=(e.ownerDocument||e).createElement(`link`),Bt(a);var o=a;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(a,`link`,r),t.state.loading|=4,Vm(a,n.precedence,e),t.instance=a;case`script`:return a=Rm(n.src),(i=e.querySelector(zm(a)))?(t.instance=i,Bt(i),i):(r=n,(i=vm.get(a))&&(r=D({},n),Um(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),Bt(i),np(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(s(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Hm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Wm=null;function Gm(e,t,n){if(Wm===null){var r=new Map,i=Wm=new Map;i.set(n,r)}else i=Wm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Nt]||a[Dt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Km(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Bt(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),Bt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$m===0&&($m=62500*op());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=nh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var sh={$$typeof:se,Provider:null,Consumer:null,_currentValue:Se,_currentValue2:Se,_threadCount:0};function ch(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=gt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.hiddenUpdates=gt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function lh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ch(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Mi(3,null,null,t),e.current=a,a.stateNode=e,t=ja(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},mo(a),e}function uh(e){return e?(e=Ai,e):Ai}function dh(e,t,n,r,i,a){i=uh(i),r.context===null?r.context=i:r.pendingContext=i,r=go(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=_o(e,r,t),n!==null&&(Pd(n,e,t),vo(n,e,t))}function fh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ph(e,t){fh(e,t),(e=e.alternate)&&fh(e,t)}function mh(e){if(e.tag===13||e.tag===31){var t=Di(e,67108864);t!==null&&Pd(t,e,67108864),ph(e,67108864)}}function hh(e){if(e.tag===13||e.tag===31){var t=jd();t=St(t);var n=Di(e,t);n!==null&&Pd(n,e,t),ph(e,t)}}var gh=!0;function _h(e,t,n,r){var i=k.T;k.T=null;var a=A.p;try{A.p=2,yh(e,t,n,r)}finally{A.p=a,k.T=i}}function vh(e,t,n,r){var i=k.T;k.T=null;var a=A.p;try{A.p=8,yh(e,t,n,r)}finally{A.p=a,k.T=i}}function yh(e,t,n,r){if(gh){var i=bh(r);if(i===null)Kf(e,t,r,xh,n),Mh(e,r);else if(Ph(i,e,t,n,r))r.stopPropagation();else if(Mh(e,r),t&4&&-1<jh.indexOf(e)){for(;i!==null;){var a=Lt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=ut(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-rt(o);s.entanglements[1]|=c,o&=~c}Ef(a),!(K&6)&&(gd=Ke()+500,Df(0,!1))}}break;case 31:case 13:s=Di(a,2),s!==null&&Pd(s,a,2),zd(),ph(a,2)}if(a=bh(r),a===null&&Kf(e,t,r,xh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Kf(e,t,r,null,n)}}function bh(e){return e=Cn(e),Sh(e)}var xh=null;function Sh(e){if(xh=null,e=It(e),e!==null){var t=l(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=u(t),e!==null)return e;e=null}else if(n===31){if(e=d(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xh=e,null}function Ch(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(qe()){case Je:return 2;case Ye:return 8;case Xe:case Ze:return 32;case Qe:return 268435456;default:return 32}default:return 32}}var wh=!1,Th=null,Eh=null,Dh=null,Oh=new Map,kh=new Map,Ah=[],jh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Mh(e,t){switch(e){case`focusin`:case`focusout`:Th=null;break;case`dragenter`:case`dragleave`:Eh=null;break;case`mouseover`:case`mouseout`:Dh=null;break;case`pointerover`:case`pointerout`:Oh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kh.delete(t.pointerId)}}function Nh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Lt(t),t!==null&&mh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ph(e,t,n,r,i){switch(t){case`focusin`:return Th=Nh(Th,e,t,n,r,i),!0;case`dragenter`:return Eh=Nh(Eh,e,t,n,r,i),!0;case`mouseover`:return Dh=Nh(Dh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Oh.set(a,Nh(Oh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kh.set(a,Nh(kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Fh(e){var t=It(e.target);if(t!==null){var n=l(t);if(n!==null){if(t=n.tag,t===13){if(t=u(n),t!==null){e.blockedOn=t,Tt(e.priority,function(){hh(n)});return}}else if(t===31){if(t=d(n),t!==null){e.blockedOn=t,Tt(e.priority,function(){hh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ih(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Sn=r,n.target.dispatchEvent(r),Sn=null}else return t=Lt(n),t!==null&&mh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lh(e,t,n){Ih(e)&&n.delete(t)}function Rh(){wh=!1,Th!==null&&Ih(Th)&&(Th=null),Eh!==null&&Ih(Eh)&&(Eh=null),Dh!==null&&Ih(Dh)&&(Dh=null),Oh.forEach(Lh),kh.forEach(Lh)}function zh(e,n){e.blockedOn===n&&(e.blockedOn=null,wh||(wh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rh)))}var Bh=null;function Vh(e){Bh!==e&&(Bh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bh===e&&(Bh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Sh(r||n)===null)continue;break}var a=Lt(n);a!==null&&(e.splice(t,3),t-=3,ec(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}Th!==null&&zh(Th,e),Eh!==null&&zh(Eh,e),Dh!==null&&zh(Dh,e),Oh.forEach(t),kh.forEach(t);for(var n=0;n<Ah.length;n++){var r=Ah[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ah.length&&(n=Ah[0],n.blockedOn===null);)Fh(n),n.blockedOn===null&&Ah.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Ot]||null;if(typeof a==`function`)o||Vh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Ot]||null)s=o.formAction;else if(Sh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vh(n)}}}function Uh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wh(e){this._internalRoot=e}Gh.prototype.render=Wh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var n=t.current;dh(n,jd(),e,t,null,null)},Gh.prototype.unmount=Wh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dh(e.current,2,null,e,null,null),zd(),t[kt]=null}};function Gh(e){this._internalRoot=e}Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=wt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ah.length&&t!==0&&t<Ah[n].priority;n++);Ah.splice(n,0,e),n===0&&Fh(e)}};var Kh=r.version;if(Kh!==`19.3.0`)throw Error(s(527,Kh,`19.3.0`));A.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(s(188)):(e=Object.keys(e).join(`,`),Error(s(268,e)));return e=p(t),e=e===null?null:m(e),e=e===null?null:e.stateNode,e};var qh={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:k,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{et=Jh.inject(qh),tt=Jh}catch{}}e.createRoot=function(e,t){if(!c(e))throw Error(s(299));var n=!1,r=``,i=Cc,a=wc,o=Tc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=lh(e,1,!1,null,null,n,r,null,i,a,o,Uh),e[kt]=t.current,Wf(e),new Wh(t)}})),c=e(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()})),l=n(),u=c();function d(e){let t=e,n=new Set;return{get:()=>t,set(e){let r=typeof e==`function`?e(t):e;Object.is(r,t)||(t=r,n.forEach(e=>e()))},subscribe(e){return n.add(e),()=>{n.delete(e)}}}}function f(e,t){let n=t??(e=>e);return(0,l.useSyncExternalStore)(e.subscribe,()=>n(e.get()))}var p=()=>Math.random().toString(36).slice(2,10),m=(e,t,n)=>Math.max(t,Math.min(n,e)),h=(...e)=>e.filter(Boolean).join(` `),g=/Mac|iPhone|iPad/.test(navigator.platform),_=g?`⌘`:`Ctrl+`,v={get(e){try{let t=localStorage.getItem(e);return t?JSON.parse(t):null}catch{return null}},set(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}},remove(e){try{localStorage.removeItem(e)}catch{}}},y={language:`gallery:language`,preferences:`gallery:preferences`,outlineOpen:`gallery:outline-open`,outlineFolds:`gallery:outline`,emojiSkinTone:`gallery:emoji-skin-tone`,emojiFrecency:`gallery:emoji-frecency`,iconColor:`gallery:icon-picker-color`,recentGlyphs:`gallery:recent-glyphs`,glyphSet:`gallery:glyph-set`,sidebar:`gallery/workbench:sidebar`,theme:`gallery/workbench:theme`,tree:`gallery/workbench:tree`,favorites:`gallery/workbench:favorites`,presentZoom:`gallery/workbench:present-zoom`},b={language:`html-report-studio:language`,preferences:`html-report-studio:preferences`,outlineOpen:`html-report-studio:outline-open`,outlineFolds:`html-report-studio:outline`,emojiSkinTone:`report-studio:emoji-skin-tone`,emojiFrecency:`report-studio:emoji-frecency`,iconColor:`report-studio:icon-picker-color`,recentGlyphs:`report-studio:recent-glyphs`,glyphSet:`report-studio:glyph-set`,sidebar:`html-report-studio/workbench:sidebar`,theme:`html-report-studio/workbench:theme`,tree:`html-report-studio/workbench:tree`,favorites:`html-report-studio/workbench:favorites`,presentZoom:`html-report-studio/workbench:present-zoom`},x={workbench:`gallery-workbench`},S={workbench:`html-report-studio-workbench`},C=`gallery:renamed`,w=[[`report-edit:`,`gallery-edit:`]],T=((e,t)=>Object.keys(t).map(n=>[e[n],t[n]]))(b,y);function E(e,t=w,n=C){if(!e)return[];let r=new Set;try{for(let t=0;t<e.length;t++)r.add(e.key(t))}catch{}try{let t=JSON.parse(e.getItem(n)??`{}`);if(t&&typeof t==`object`&&!Array.isArray(t))for(let e of Object.keys(t))r.add(e)}catch{}return[...r].map(e=>D(e,t)).filter(Boolean)}function D(e,t=w){let n=typeof e==`string`?t.find(([t])=>e.startsWith(t)):null;return n?[e,n[1]+e.slice(n[0].length)]:null}function ee(e){if(e==null)return null;let t=2166136261;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),16777619);return`${e.length}:${(t>>>0).toString(36)}`}function te(e,t,n=C){let r=[];if(!e)return r;let i={};try{let t=JSON.parse(e.getItem(n)??`{}`);t&&typeof t==`object`&&!Array.isArray(t)&&(i=t)}catch{}let a=!1;for(let[n,o]of t)try{let t=e.getItem(n),s=ee(t),c=!Object.hasOwn(i,n);if(!c&&i[n]===s)continue;(!c||t!==null&&e.getItem(o)===null)&&(t===null?e.removeItem(o):e.setItem(o,t),r.push(o)),i[n]=s,a=!0}catch{}if(a)try{e.setItem(n,JSON.stringify(i))}catch{}return r}async function ne(e,{from:t,store:n,open:r}){let i=e=>new Promise((t,n)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>n(e.error)});if(typeof e.databases==`function`&&!(await e.databases()).some(e=>e.name===t))return 0;let a=await new Promise((n,r)=>{let i=e.open(t),a=!1;i.onupgradeneeded=()=>{a=!0,i.transaction.abort()},i.onsuccess=()=>n(i.result),i.onerror=e=>{if(!a)return r(i.error);e.preventDefault(),n(null)}});if(!a)return 0;let o;try{if(!a.objectStoreNames.contains(n))return 0;let e=a.transaction(n,`readonly`).objectStore(n),[t,r]=await Promise.all([i(e.getAllKeys()),i(e.getAll())]);o=t.map((e,t)=>[e,r[t]])}finally{a.close()}if(o.length===0)return 0;let s=await r();try{let e=s.transaction(n,`readwrite`),t=e.objectStore(n),r=0;for(let[e,n]of o){let i=t.get(e);i.onsuccess=()=>{i.result===void 0&&(t.put(n,e),r++)}}return await new Promise((t,n)=>{e.oncomplete=t,e.onerror=()=>n(e.error),e.onabort=()=>n(e.error??Error(`aborted`))}),r}finally{s.close()}}if(typeof document<`u`){let e=(()=>{try{return globalThis.localStorage??null}catch{return null}})(),t=(()=>{try{return globalThis.sessionStorage??null}catch{return null}})();te(e,[...T,...E(e)]),te(t,E(t)),globalThis.addEventListener?.(`storage`,t=>{if(!e||t.storageArea!==e)return;let n=T.find(([e])=>e===t.key)??D(t.key);n&&te(e,[n])})}var re={"正在读取文档…":`Loading documents…`,没有连上本地服务:`Not connected to the local service`,重试:`Retry`,还没有文档:`No documents yet`,"新建一份文档,或让 Agent 生成一份。":`Create a document, or have an Agent write one.`,新建文档:`New document`,"搜索文档…":`Search documents…`,"正在搜索…":`Searching…`,保存到:`Save to`,浏览器下载:`Browser downloads`,"选择文件夹…":`Choose a folder…`,"已导出到「{0}」:{1}":`Exported to “{0}”: {1}`,"没有写入「{0}」的权限,已改为浏览器下载":`No permission to write to “{0}”; downloaded instead`,演示视图:`Present`,"全屏放映,可用激光笔和画笔":`Full screen, with a laser pointer and pens`,演示:`Presentation`,指针:`Pointer`,激光笔:`Laser pointer`,画笔:`Pen`,荧光笔:`Highlighter`,橡皮擦:`Eraser`,"{0} · 双击清除全部":`{0} · double-click to clear all`,缩小:`Zoom out`,放大:`Zoom in`,缩放比例:`Zoom`,"恢复到 100%":`Back to 100%`,上一节:`Previous section`,下一节:`Next section`,退出演示:`Exit`,"正在搜索正文…":`Searching the text…`,匹配结果:`Results`,全部文档:`All documents`,没有找到结果:`No results`,文档标题:`Document title`,写作偏好:`Writing preferences`,复制页面内容:`Copy page content`,"Markdown 格式":`As Markdown`,"这份文档在电脑上的位置,可以直接告诉 Agent":`Where this document is on your computer, to tell an Agent`,在新标签页打开:`Open in new tab`,导出:`Export`,取消收藏:`Remove from favorites`,收藏:`Favorite`,创建副本:`Duplicate`,文档:`Documents`,重命名:`Rename`,移动到:`Move to`,导入:`Import`,移至回收区:`Move to trash`,"已移动到「{0}」":`Moved to “{0}”`,"移动到…":`Move to…`,顶层:`Top level`,没有匹配的文档:`No matching documents`,回收区:`Trash`,恢复:`Restore`,永久删除:`Delete forever`,回收区是空的:`Trash is empty`,偏好:`Preferences`,显示编辑框:`Show editing frame`,"点进一段文字时,在它周围显示蓝色虚线框":`A dashed blue frame around the text you click into`,减少通知:`Fewer notifications`,"日常操作不再提示,只说需要你处理或你该知道的事":`No notices for everyday actions, only what needs you or you should know`,语言:`Language`,"今天 {0}":`Today {0}`,"昨天 {0}":`Yesterday {0}`,"上次编辑 {0}":`Last edited {0}`,"{0} 个字":`{0} words`,侧边栏:`Sidebar`,关闭侧边栏:`Close sidebar`,搜索文档:`Search documents`,新建:`New`,设置:`Settings`,正在连接本地服务:`Connecting to the local service`,"外观:{0}":`Appearance: {0}`,"点击切换为{0}":`Click for {0}`,切换主题:`Switch theme`,拖动调整宽度:`Drag to resize`,点击收起侧边栏:`Click to close sidebar`,"Agent 写报告时照着写的规则,每次写报告前都会先读":`The rules Agents write reports by, read before every report`,"Agent 写报告时照着写的规则:写什么、怎么写、怎样忠于材料。每次写报告前它都会先读这里。":`The rules Agents write reports by: what to write, how, and how to stay true to the materials. They read this before writing any report.`,"写作偏好里有一处这里显示不了:{0}。Agent 照样读得到;在这里保存后,它会被去掉。":`One part of the writing preferences can't be shown here: {0}. Agents still read it; once you save here, it will be removed.`,"写作偏好里有 {0} 处这里显示不了,例如:{1}。Agent 照样读得到;在这里保存后,它们会被去掉。":`{0} parts of the writing preferences can't be shown here, such as: {1}. Agents still read them; once you save here, they will be removed.`,"写作偏好没有保存:{0}":`The writing preferences weren't saved: {0}`,"页面上的修改还没有存好,请稍后再试":`The changes on the page aren't stored yet. Try again in a moment`,"正在打开写作偏好…":`Opening the writing preferences…`,全部折叠:`Collapse all`,全部展开:`Expand all`,更多:`More`,折叠:`Collapse`,展开:`Expand`,在下面新建文档:`Add a document inside`,"移动、收藏等…":`Move, favorite and more…`,"另外 {0} 个":`{0} more`,"{0} 处冲突待处理":`{0} conflicts to resolve`,"{0} 处内容待处理":`{0} items to resolve`,"正在保存…":`Saving…`,"离线:修改暂存在浏览器":`Offline: changes kept in the browser`,待保存:`Waiting to save`,已保存:`Saved`,展开侧边栏:`Open sidebar`,打开侧边栏:`Open sidebar`,锁定展开侧边栏:`Keep sidebar open`,更多操作:`More actions`,操作:`Actions`,目录:`Outline`,"在页面右侧显示标题目录,点击标题跳到那里":`Shows the page's headings at its right; click one to go there`,拖动调整目录宽度:`Drag to resize the outline`,收起目录:`Collapse outline`,展开目录:`Expand outline`,"页面不够宽,变宽后展开":`Not wide enough: expands once there is room`,所有内容:`Everything`,文件和图片除外:`No files or images`,导出格式:`Export format`,页面内容:`Include content`,页面格式:`Page format`,比例百分比:`Scale percent`,"比例百分比必须是 10 到 200 之间的数字":`Scale percent must be a number between 10 and 200`,包含子页面:`Include subpages`,为子页面创建文件夹:`Create folders for subpages`,取消:`Cancel`,"导入到「{0}」下面":`Imports go inside “{0}”`,导入为顶层页面:`Imports go at the top level`,选择要导入的文件:`Choose files to import`,"拖放文件到这里,或":`Drop files here, or`,选择文件:`Choose files`,"Markdown、HTML、Word、PDF、EPUB、CSV 或 ZIP":`Markdown, HTML, Word, PDF, EPUB, CSV or ZIP`,"ZIP 里的每个文件都会成为一个页面,最大 5GB":`Each file in a ZIP becomes a page; ZIP files up to 5 GB`,"没有连上本地服务:修改暂存在浏览器里,连上后自动保存":`Not connected to the local service: changes are kept in the browser and saved once it reconnects`,"文件一直在变化(例如 AI 正在写入),稍后会自动再保存":`The file keeps changing (an AI may be writing it); it will be saved again shortly`,"自动保存已停止,请查看文档里的提示":`Autosave has stopped; see the notice in the document`,"没有保存成功,请在文档里查看提示":`Not saved; see the notice in the document`,浅色:`Light`,深色:`Dark`,找不到这份文档:`Document not found`,令牌失效:`The token has expired`,请求来源不对:`Request from the wrong origin`,请求地址不对:`Request to the wrong address`,请求格式不对:`Malformed request`,"服务器没有给出结果(HTTP {0})":`The server gave no answer (HTTP {0})`,"编辑只支持 Chrome 和 Edge:这个浏览器里可以阅读,要编辑请用 Chrome 或 Edge 打开这个地址":`Editing works in Chrome and Edge only: you can read here; to edit, open this address in Chrome or Edge`,"这是 npm run dev 的服务器:在运行它的地方停止它":`This is npm run dev's server: stop it where it runs`,"没有连上 Gallery 的本地服务:运行 gallery open 启动它。":`Not connected to Gallery's local service: run gallery open to start it.`,"读取失败({0})":`Could not read ({0})`,"操作没有成功({0})":`That didn't work ({0})`,"Agent 每次写报告前都会先读的写作偏好":`What Agents read before writing any report`,"(副本)":` (copy)`,操作失败:`That didn't work`,未命名文档:`Untitled`,已创建副本:`Duplicated`,"「{0}」已移至回收区":`“{0}” moved to trash`,撤销:`Undo`,"已恢复「{0}」":`Restored “{0}”`,"永久删除「{0}」?":`Delete “{0}” forever?`,这份文档:`this document`,"删除后无法恢复。":`This can't be undone.`,"正在导出…":`Exporting…`,"导出失败:{0}":`Export failed: {0}`,导出失败:`Export failed`,不支持的文件类型:`Unsupported file type`,"正在导入…":`Importing…`,"导入失败:{0}":`Import failed: {0}`,"已导入 {0} 个页面,{1} 个文件不支持:{2}":`Imported {0} pages; {1} files not supported: {2}`,"{0}已成功导入":`{0} imported`,你的文件已成功导入:`Your files were imported`,"{0} 张图片没有找到:{1}":`{0} pictures not found: {1}`,"已导入,{0} · 把图片和 Markdown 文件一起选上(图片在别的文件夹里时,把整个文件夹压缩成 .zip)再导入,就能带上它们":`Imported; {0} · choose the pictures together with the Markdown file (pictures in another folder: zip the whole folder) and import again to bring them in`,这页还有修改没有保存:`This page has unsaved changes`,已复制页面内容:`Page content copied`,"没有复制:{0}":`Not copied: {0}`,这份文档没有标题:`This document has no title`,没有改成标题:`The title was not changed`,"文档还没有打开,请稍后再试":`The document isn't open yet; try again in a moment`,没有进入改标题:`Couldn't start editing the title`,"目录没有保存:{0}":`The outline was not saved: {0}`,"操作没有成功(HTTP {0})":`That didn't work (HTTP {0})`,整体块:`Whole block`,"{0} 块":`{0} blocks`,"{0}和折叠的 {1} 块":`{0} and the {1} blocks folded under it`,"至少要保留一个选项卡。":`Keep at least one tab.`," 等":` and more`,"页面其他地方引用了这块({0},例如链接或详情卡片、无障碍关联),删掉会让它们失效,请让 AI 删除。":`Other parts of the page refer to this block ({0}: links, detail cards or accessibility references); deleting it would break them, so ask the AI to delete it.`,"这块被文档的脚本用到({0}),在页面上删掉会让脚本出错,请让 AI 删除。":`The document's script uses this block ({0}); deleting it here would break the script, so ask the AI to delete it.`,"这个{0}不能移动。":`This {0} can't be moved.`,"{0}{1}":`{0} {1}`,默认:`Default`,文本:`Text`,背景:`background`,"{0}(当前)":`{0} (current)`,上次使用:`Last used`,文本颜色:`Text color`,背景颜色:`Background color`,颜色:`Color`,"分成{0}栏":`Split into {0} columns`,并排分栏:`Side by side`,在右侧新增一栏:`Add a column on the right`,"分{0}栏":`{0} columns`,分区与分栏:`Layout`,"其中的{0}不能删除:{1}":`The {0} among them can't be deleted: {1}`,"已选中 {0} 块":`{0} blocks selected`,组成新分区:`Make a section`,删除:`Delete`,"{0} 块的操作":`Actions for {0} blocks`,在下方新建:`Add below`,"搜索块…":`Search blocks…`,没有结果:`No results`,在下方新建分区:`Add a section below`,解散分区:`Dissolve section`,解散所在分区:`Dissolve enclosing section`,选中外层:`Select outer block`,"{0}的操作":`{0} actions`,"选项卡 {0}":`Tab {0}`,"({0}没有粘贴过来:Gallery 没有这种块)":`({0} was not pasted: Gallery has no such block)`,"语雀画板「{0}」":`The Yuque board “{0}”`,语雀画板:`A Yuque board`,"语雀的「{0}」卡片":`A Yuque “{0}” card`,"选中的块还没保存,保存之后再复制。":`The selected blocks aren't saved yet; copy them once they are.`,"选中的块里有{0}:文档自己的组件不能在页面上复制,可以让 AI 复制。":`The selection holds {0}: the document's own components can't be copied on the page; ask the AI to copy it.`,组件:`a component`,"选中的块里有{0}:它剪切之后就没法再粘贴了,所以不能剪切;可以复制它,或者拖动它来移动。":`The selection holds {0}: once cut it couldn't be pasted again, so it can't be cut; copy it, or drag it to move it.`,"已复制 {0} · 在要放的块里按 Ctrl+V 粘贴到它后面":`Copied {0} · press Ctrl+V in a block to paste after it`,这一块:`this block`,"这里放不下这些块。":`These blocks can't go here.`,"已粘贴 {0} · Ctrl+Z 撤销":`Pasted {0} · Ctrl+Z to undo`,一块:`a block`,"这里放不下这种块。":`This kind of block can't go here.`,"这里不能粘贴块。":`Blocks can't be pasted here.`,"这里不能分段,多行文字已合并为一行。":`No line breaks here; the lines were joined into one.`,"复制的{0}只能粘贴到它所在的文档里,而且它还要在页面上。":`A copied {0} can only be pasted into its own document, while it is still on the page.`,新增分栏:`Add column`,"已调整栏宽:{0} · 双击竖线平分 · Ctrl+Z 撤销":`Column widths: {0} · double-click the line to even them · Ctrl+Z to undo`,"已平分栏宽 · Ctrl+Z 撤销":`Columns evened · Ctrl+Z to undo`,"已取消调整。":`Resize cancelled.`,复制我的文字:`Copy my text`,复制这一块:`Copy this block`,"AI 的写入把你之前保存的这段修改改回去了。":`The AI's write undid an edit you had saved here.`,恢复我的:`Restore mine`,"接受 AI 的":`Accept the AI's`,"AI 的写入删掉了你这次新建的这一块。":`The AI's write removed a block you just made.`,"AI 的写入把你移动的这一块放回了原处。":`The AI's write put a block you moved back where it was.`,"AI 的写入把你在这个组件里保存的修改改回去了。":`The AI's write undid a change you had saved in this component.`,"这一段你和 AI 同时改了同一处。":`You and the AI changed the same place in this paragraph.`,保留我的:`Keep mine`,使用最新版本:`Use the latest version`,"你修改的这一块已被 AI 删除。":`The AI deleted a block you edited.`,接受删除:`Accept the deletion`,"你修改的这一处所在的组件已被 AI 改过结构,没法确定对应的位置。":`The AI restructured the component around your edit, so its place can't be found.`,"这个自定义块刚刚变了,这处文字不再能修改,你的修改没有写进文件。":`This custom block just changed and no longer lets this text be edited, so your edit isn't in the file.`,"这一处在文件里找不到唯一对应的位置,没有保存。":`This edit has no single matching place in the file, so it wasn't saved.`,转换类型:`Convert`,移动:`Move`,调整:`Adjust`,"你{0}的这一块已被 AI 修改。":`The AI changed a block you chose to {0}.`,"AI 在你看到之后又改了这一块,这次{0}没有保存。":`The AI changed this block again after you saw it, so your choice to {0} it wasn't saved.`,"仍然{0}":`{0} anyway`,"保留 AI 的":`Keep the AI's`,"你{0}的这一块已被 AI 删除。":`The AI deleted a block you chose to {0}.`,"你删除的这一块现在被脚本或页面其他地方引用了,不能删除。":`A script or another part of the page now refers to the block you deleted, so it can't be deleted.`,保留它:`Keep it`,"你{0}的这一块在文件里找不到唯一对应的一块(AI 写了一样的内容),没有保存。":`The block you chose to {0} has no single match in the file (the AI wrote the same content), so it wasn't saved.`,"你{0}的这一块没能写进文件(周围的内容已被 AI 改动)。":`The block you chose to {0} couldn't be written (the AI changed what was around it).`,"你新建(或放回)的这一块没法放进文件(周围的块已被 AI 改动或删除)。":`The block you made (or put back) couldn't go into the file (the AI changed or deleted the blocks around it).`,放到附近:`Put it nearby`,撤销这一块:`Undo this block`,冲突:`Conflicts`,收起:`Collapse`,你的版本:`Your version`,"文件里的(AI 的)":`In the file (the AI's)`,"已复制。":`Copied.`,"没有可复制的文字。":`Nothing to copy.`,"没能完成,请再试一次。":`That didn't work; try again.`,你的:`Yours`,"AI 的":`AI's`,查看局部差异:`Show the differences`,查看两个版本:`Show both versions`,定位:`Locate`,"页面其他地方引用了这一段(链接、无障碍关联或文档的脚本),不能删除,也不能并入上一段。":`Other parts of the page refer to this paragraph (links, accessibility references or the document's script), so it can't be deleted or merged into the one above.`,"这段文字可以清空,但不能单独删除;要删掉整块,点左侧的手柄后按 Delete。":`This text can be cleared but not deleted on its own; to delete the whole block, click its handle on the left and press Delete.`,这一段:`This paragraph`,"{0}不能分段或换行。":`{0} can't take a paragraph or line break.`,"{0}不能分段;需要换行可以用 Shift+Enter。":`{0} can't be split; use Shift+Enter for a line break.`,"{0}不能删除,但可以清空。":`{0} can't be deleted, but it can be cleared.`,"{0}不能清空或删除,只能改字。":`{0} can't be cleared or deleted; only its words can change.`,"{0}里不能加链接。":`Links can't go in {0}.`,"{0}不能设置格式。":`{0} can't be formatted.`,"{0}不能放公式。":`Equations can't go in {0}.`,"{0}不能与相邻段落合并。":`{0} can't be merged with the paragraph next to it.`,"选中的块不相邻,不能一起上下移动;可以拖动其中一块的手柄,把它们一起移到别处。":`The selected blocks aren't next to each other, so they can't move up or down together; drag one of their handles to move them all elsewhere.`,"这里只有{0};可以拖动手柄移到别处。":`There's only {0} here; drag its handle to move it elsewhere.`,"这一个{0}":`this one {0}`,这几块:`these blocks`,"{0}已经在{1}。":`{0} is already at the {1}.`,最前面:`top`,最后面:`bottom`,"已移动{0} · Ctrl+Z 撤销":`Moved {0} · Ctrl+Z to undo`,"正在移动{0} · 拖到要放的位置后松开 · 停在选项卡上切换,停在折叠块标题上展开 · Esc 取消":`Moving {0} · release where it should go · rest on a tab to switch to it, on a toggle's title to open it · Esc to cancel`,"已取消移动。":`Move cancelled.`,"位置没有变化。":`Nothing moved.`,"{0} · 拖动栏间的竖线调宽度 · Ctrl+Z 撤销":`{0} · drag the line between columns to resize · Ctrl+Z to undo`,已移动这一栏:`Column moved`,"已把{0}放进新的一栏":`Put {0} in a new column`,"已把{0}并排分栏":`Put {0} side by side`,"已移动{0}{1}{2} · Ctrl+Z 撤销":`Moved {0}{1}{2} · Ctrl+Z to undo`,到上一项下面:` under the item above`,"(原来的外层已空,一并去掉)":` (its emptied container went too)`,"连不上 Gallery 的服务(它还在运行吗?gallery open 会启动它)":`Can't reach Gallery's server (is it still running? gallery open starts it)`,"{0}:修改暂存在浏览器里,连上后自动保存。":`{0}: changes are kept in the browser and saved once it reconnects.`,"已重新连上,修改已保存。":`Reconnected; changes saved.`,"这个组件已经不在这个工作区里,这一块没有保存。":`This component is no longer in this workspace, so this block wasn't saved.`,"template.html 要是这个自定义块的一个实例,有自己的结束标签,此外什么都没有":`template.html is to be one instance of this block, with an end tag of its own, and nothing else`,"template.html 里的 <{0}> 进不了新建的块:脚本、事件、样式和 Gallery 自己的标记都不写在模板里":`the <{0}> in template.html cannot go into a new block: scripts, handlers, styles and Gallery's own marks stay out of a template`,"template.html 的 {0} 和清单写的数目不符":`template.html does not hold as many of {0} as its manifest says`,"这里合并进了 AI 同时写的字,撤销会把它们一起撤掉:没有撤销,可以直接改。":`This merged in words the AI wrote meanwhile, and undo would take them away too, so it wasn't undone; edit it directly instead.`,无法使用这个自定义表情:`This custom emoji can't be used`,上传失败:`Upload failed`,打不开这个网页:`This page can't be opened`,"浏览器存储写不进去(空间满了,或被禁用):没保存的修改只在这个页面上,先不要关掉它。":`The browser's storage can't be written (full, or turned off): unsaved changes exist only on this page, so keep it open.`,"AI 的写入把你之前保存的 {0} 处修改改回去了:在左下方选择保留哪一边。":`The AI's write undid {0} of your saved edits: choose which side to keep at the bottom left.`,显示变更:`Show changes`,"Agent 改过文档后,新增的标绿、删掉的标红,可以在页面底部确认或撤回":`After an Agent edits a document, what it added shows in green and what it deleted in red, to keep or revert at the bottom of the page`,"Agent 的修改":`The Agent's changes`,"Agent 已修改":`Agent made changes`,"Agent 新增 {0} 块、改动 {1} 块、删除 {2} 块":`The Agent added {0}, changed {1} and deleted {2} blocks`,撤回:`Revert`,确认:`Keep`,"撤回 Agent 的这些修改,你自己的修改会保留":`Revert the Agent's changes; yours stay`,"保留这些修改,不再标出":`Keep these changes and stop marking them`,"已撤回 Agent 的修改":`Reverted the Agent's changes`,"还有修改没保存或有冲突待处理,处理完再撤回":`Some edits are not saved yet or wait for you: deal with them, then revert`,"没能撤回:{0}":`Could not revert: {0}`,"没能撤销:{0}":`Could not undo: {0}`,"没能确认:{0}":`Could not keep: {0}`,"Agent 刚刚又改了文档,再看一眼":`The Agent just changed the document again: have another look`,"撤回之后文档又改过了,没法撤销":`The document changed after the revert, so it cannot be undone`,撤销已经过期:`It is too late to undo`,预览服务器出错:`The preview server failed`,"{0} 处修改和文件的最新版本冲突,没有保存:在左下方选择怎么处理。":`{0} edits conflict with the file's latest version and weren't saved: choose what to do at the bottom left.`,"自定义块刚刚变了,{0} 处修改没有保存:在左下方选择怎么处理。":`A custom block just changed and {0} edits weren't saved: choose what to do at the bottom left.`,"{0} 处内容文档存不下,没有保存:在左下方选择怎么处理。":`{0} items can't be stored in the document and weren't saved: choose what to do at the bottom left.`,"这一处的内容文档存不下,没有保存。":`This can't be stored in the document, so it wasn't saved.`,"已自动合并 {0} 段 AI 同时做的修改。":`Merged {0} changes the AI made meanwhile.`,"预览服务器不认得这个页面了(重启过?),正在刷新;没保存的修改会自动放回。":`The preview server no longer knows this page (restarted?); reloading. Unsaved changes will be put back.`,"这份文档的文件不见了(被移动或删除了?)。修改暂存在浏览器里,没有保存。":`This document's file is gone (moved or deleted?). Changes are kept in the browser, not saved.`,"这次的修改太大,一次存不下":`This change is too large to save at once`,"没有保存:{0}":`Not saved: {0}`,"红框里的新段落所在的位置放不下段落,没有保存:请并入相邻段落,或拖到别处。":`The new paragraph in red can't stand where it is, so it wasn't saved: merge it into a neighbour or drag it elsewhere.`,"这里还空着:写上内容后才会保存。":`This is empty: it's saved once it has something in it.`,"已转换为{0}":`Turned into {0}`,"{0} · Ctrl+Z 撤销":`{0} · Ctrl+Z to undo`,"这里不能新建块。":`A block can't be added here.`,"已插入{0}":`Inserted {0}`,"已转换为{0} · Ctrl+Z 撤销":`Turned into {0} · Ctrl+Z to undo`,链接:`Link`,"这一块里没有可以直接修改的文字。":`This block has no text to edit directly.`,"这个组件没有运行:内容只能看,可以整块移动、复制和删除。":`This component is not running: what it holds can only be read, and the block moved, copied and deleted whole.`,内容区:`content area`,组件里的文字:`A component's text`,"自定义块@block":`Custom block`,组件列表:`Components`,自定义块:`Custom blocks`,内置块:`Built-in blocks`,正常:`Normal`,不在文档菜单里:`Not in the document menus`,已停用:`Disabled`,没有加载:`Not loaded`,在文档菜单里显示:`Show in document menus`,停用:`Disable`,"文档@place":`documents`,自定义页:`custom pages`,"用在:{0}":`Used in: {0}`,"{0} · 要用:{1}":`{0} · Uses: {1}`,工作区的数据:`the workspace's data`,文档里的表格:`the document's tables`,"联网:{0}":`the network: {0}`,"设置没有保存:{0}":`The setting wasn't saved: {0}`,"这个自定义块没有加载,开关不起作用":`This block isn't loaded, so its switches do nothing`,"改好 gallery.json 之后才能改这里":`Fix gallery.json to change this`,"{0}:没有能用的模板,菜单里不会出现":`{0}: it has no template to make a block from, so no menu offers it`,"Gallery 有新版本 {0}。这份副本添加后改过,所以不会自动更新;要换成新版本,删掉工作区里的 components/{1} 文件夹(改动会丢掉),再运行 gallery block add {2}。":`Gallery has a newer version, {0}. This copy was changed after it was added, so it is not updated by itself; to take the new one, delete the folder components/{1} in the workspace (its changes are lost) and run gallery block add {2}.`,"出现在 “/”、在下方新建和手柄的网格里;关掉后已有的块照常运行和导出,自定义页里照样能添加":`Offered in "/", Add below and the handle's grid. Off, existing blocks still run and export, and custom pages can still add it`,"不加载它的脚本和样式,已有的块只显示内容":`Its script and style aren't loaded. Existing blocks show only what they hold`,"文档菜单里出现哪些块,这个工作区加载哪些自定义块。":`Which blocks the document menus offer, and which custom blocks this workspace loads.`,"文档菜单里出现哪些块,这个工作区加载哪些自定义块":`Which blocks the document menus offer, and which custom blocks this workspace loads`,"块包的开关关掉后,它的块都不在 “/”、添加自定义块和表格的「视图」里;已经写在文档和页面里的块照常显示。":`With a pack's switch off, none of its blocks is offered in “/”, Add custom block or a table's Views; those already in documents and pages show as ever.`,"打开块包「{0}」":`Open the pack “{0}”`,"{0} 个块":`{0} blocks`,启用块包:`Pack on`,"选择 zip 文件…":`Choose a zip file…`,"Gallery 自带":`Gallery's own`,工作区自己写的块:`This workspace's own blocks`,"pack.json 读不出来:{0}":`pack.json can't be read: {0}`,"这个块包关着:它的块都不在 “/”、添加自定义块和表格的「视图」里;已经写在文档和页面里的块照常显示。":`This pack is off: none of its blocks is offered in “/”, Add custom block or a table's Views; those already in documents and pages show as ever.`,"这个块包装上后改过({0}),Gallery 的新版本 {1} 不会换上改过的部分;没改过的块照常更新。":`This pack was changed after it was installed ({0}): Gallery's new version {1} is not put over what changed; the blocks not changed are updated as ever.`,"这个块包装上后改过({0}):再装一次新版本时,改过的部分保持不变。":`This pack was changed after it was installed ({0}): installing a new version keeps what changed as it is.`,"这个块包里还没有块。":`This pack has no blocks yet.`,"已导入块包「{0}」{1}":`Imported the pack “{0}” {1}`,"块包「{0}」已更新到 {1}":`The pack “{0}” is updated to {1}`,"块包「{0}」{1} 已经装好了":`The pack “{0}” {1} is installed already`,"自定义块按块包放:每个块包右边的开关管它的块在 “/”、添加自定义块和表格的「视图」里提不提供;点一个块包看它的块。":`Custom blocks come in packs: the switch at a pack's right says whether its blocks are offered in “/”, Add custom block and a table's Views; click a pack to see its blocks.`,"这个工作区还没有自定义块:让 Agent 做一个,或导入一个块包,它们放在工作区的 components 文件夹里。":`This workspace has no custom blocks yet: ask an Agent to make one, or import a block pack. They live in the workspace's components folder.`,"每个块右边的开关管 “/”、添加自定义块和表格的「视图」里提不提供它,默认打开;点一行看它的说明和别的开关。":`The switch right of each block decides whether "/", Add custom block and a table's View menu offer it, on by default. Click a row for what it is and its other switches.`,在所有菜单里提供:`Offer in every menu`,"总开关关掉后,“/”、添加自定义块和表格的「视图」里都不再提供它;已经写在文档和页面里的块照常显示。":`With the master switch off, it is no longer offered in "/", Add custom block or a table's View menu. Blocks already written into documents and pages keep showing.`,"每个块右边的开关是「在文档菜单里显示」:关掉的块不再出现在 “/”、在下方新建和手柄的网格里,已有的块照常。":`The switch right of each block is "Show in document menus": a block switched off leaves "/", Add below and the handle's grid. Existing blocks stay as they are.`,这个块总在文档菜单里:`This block is always in the document menus`,"读不出 component.json":`component.json cannot be read`,"component.json 不是 JSON:{0}":`component.json is not JSON: {0}`,"{0} 不是 UTF-8 编码:请存成 UTF-8":`{0} is not UTF-8: save it as UTF-8`,"component.json 写的不是一个对象":`component.json holds no object`,"{0} 不能做自定义块的 id:范围和名字都只用小写字母、数字和连字符":`{0} can be no custom block's id: its scope and its name are lowercase letters, digits and dashes`,"{0} 不能做自定义块的 id:{1} 是 Windows 留给设备的名字":`{0} can be no custom block's id: {1} is a name Windows keeps for a device`,"{0} 有 {1} KB,而每一页都带着它,最多 {2} KB":`{0} is {1} KB, and every page holds it: {2} KB at most`,"清单的 id 是 {0},和它的文件夹 {1} 不一样":`its id says {0}, and its folder is {1}`,"缺少 {0}":`it has no {0}`,"apiVersion 要写成一个正整数":`apiVersion is a whole number from 1`,"这个自定义块要 apiVersion {0},这一版 Gallery 只支持 {1}":`it needs apiVersion {0}, and this Gallery runs {1}`,在设置里停用了:`turned off in the settings`,开关的值不对:`That setting isn't valid`,没有这个组件:`There is no such component`,"内置块只能隐藏,不能停用":`A built-in block can be hidden, not disabled`,这个块不能隐藏:`This block can't be hidden`,"gallery.json 读不出来:改好这个文件后再试":`gallery.json can't be read: fix the file and try again`,"gallery.json 不是 Gallery 的文件":`gallery.json isn't Gallery's file`,"gallery.json 写不进去:可能是只读的,或被别的程序占着":`gallery.json can't be written: it may be read-only, or held by another program`,"gallery.json 刚刚被改过:再试一次":`gallery.json just changed: try again`,"{0} 不是自定义块的清单能写的字段":`{0} is no field a custom block's manifest writes`,"{0} 要写成文字":`{0} is words`,"{0} 要写成 { zh, en } 两种语言的文字":`{0} is words in both languages: { zh, en }`,"{0} 要写成一张表":`{0} is a table, by name`,"{0} 写错了:{1}":`{0} is wrong: {1}`,"{0} 的 edit 只能是 text、data、flow 或 none":`{0}: edit is text, data, flow or none`,"{0} 是插槽,名字只用小写字母、数字和连字符":`{0} is a slot: its name is lowercase letters, digits and hyphens`,'{0} 是插槽,由 data-doc-slot="{1}" 标出,不写 at':`{0} is a slot, marked data-doc-slot="{1}": it has no at`,"{0} 是插槽,一个实例里只有一个,不写 min、max":`{0} is a slot, one to an instance: it has no min or max`,"{0} 要写成 true 或 false":`{0} is true or false`,"{0} 要写成不小于 0 的整数":`{0} is a whole number from 0`,"{0} 的 min 比 max 大,没有实例能满足":`{0}: min is over max, which no instance can meet`,"{0} 不能按文字编辑:<{1}> 不是能打字的文字":`{0} cannot be edited as text: a <{1}> is no text to type in`,"{0} 的 {1} 是整个实例,而这里只写它生成的节点":`{0}: {1} is the whole instance, and this names only what it generates`,"{0} 要写成一串文字":`{0} is a list of words`,"{0} 是 Gallery 自己的名字,自定义块不能用":`{0} is a name of Gallery's own, which no custom block may use`,"assets 里的 {0} 既不是套件的资源,也不是块的文件夹里的文件":`{0} in assets is neither a file of the kit's nor one of the block's folder`,"assets 写了 {0},块的文件夹里没有这个文件":`assets names {0}, which the block's folder does not hold`,"markdown 只能是 parts 或 text":`markdown is parts or text`,"schema 要写成一个正整数":`schema is a whole number from 1`,'places 要写成 document、page 中的一个或两个,如 ["document"]':`places is document, page or both, as ["document"]`,"places 里 {0} 写了两次":`places names {0} twice`,"card.sizes 要写成 [宽, 高] 的一串,宽 1 到 {0} 格,高 1 到 {1} 格":`card.sizes is a list of [width, height], from 1 to {0} cells wide and 1 to {1} high`,"card.sizes 里 {0} 写了两次":`card.sizes names {0} twice`,"写了 card.sizes,就不再写 card.{0}:第一种大小是默认的":`with card.sizes, write no card.{0}: the first size is the default`,"card.sizes 里 {0} 不在 card.min 到 card.max 之间":`card.sizes names {0} outside card.min to card.max`,"{0} 要写成 1 到 {1} 的整数":`{0} is a whole number from 1 to {1}`,"{0} 要写成 { w, h },单位是格":`{0} is { w, h }, in cells`,"card.min.{0} 比 card.max.{0} 大":`card.min.{0} is over card.max.{0}`,"默认的 card.{0} 是 {1},不在 card.min 到 card.max 之间({2} 到 {3})":`the default card.{0} is {1}, outside card.min to card.max ({2} to {3})`,"card.fit 只能是 fixed 或 content":`card.fit is fixed or content`,"{0} 要写成一串字段":`{0} is a list of fields`,"{0} 的 key 以小写字母开头,只用字母和数字(如 city、startDate)":`{0}: its key starts with a lowercase letter and has letters and digits alone (city, startDate)`,"settings 里 key {0} 写了两次":`settings has the key {0} twice`,"{0} 的 type 只能是 {1}":`{0}: its type is one of {1}`,"{0} 是 select,要有 options:一串文字":`{0} is a select: it has options, a list of words`,"{0} 的 options 里 {1} 写了两次":`{0}: its options name {1} twice`,"{0} 不是 select,不写 options":`{0} is no select: it has no options`,"{0} 的 default 和它的 type {1} 不符":`{0}: its default is no {1}`,"{0} 的 required 要写 true 或 false":`{0}: required is true or false`,'写了 settings,parts 里就要有一个名为 settings、edit 为 data 的部分,它是一个 <script type="application/json">,存卡片设置的值':`with settings, its parts have one named settings, edited as data, a <script type="application/json"> that holds the values of the card's settings`,"needs 里的 {0} 不认识:只认 workspace、tables 和 net:<域名>(小写的主机名,不带端口和路径,可以以 *. 开头)":`{0} in needs is none Gallery knows: workspace, tables and net:<host> (a lowercase host name, no port and no path, *. first for its subdomains)`,"needs 里 {0} 写了两次":`needs names {0} twice`,"places 里有 page,就不能有插槽:{0} 的 edit 是 flow,插槽放的是文档的块,自定义页上没有":`with page in its places it has no slot: {0} is edited as flow, and a slot holds a document's blocks, which a custom page has none of`,"自定义块刚刚变了,这次改动没有保存,页面已按新的块重新显示。":`A custom block just changed, so that change was not saved. The page now shows its new version.`,"其余修改已保存;红框处的冲突还没有保存。":`Other changes are saved; the conflict marked in red isn't.`,"其余修改已保存;红框处的内容还没有保存。":`Other changes are saved; what's marked in red isn't saved yet.`,"其余修改已保存;红框处的内容文档存不下,没有保存。":`Other changes are saved; what's marked in red can't be stored in the document and wasn't saved.`,"其余修改已保存;还没写完的块(红框或空标题)没有保存。":`Other changes are saved; unfinished blocks (in red, or with an empty title) aren't.`,"已保存。":`Saved.`,"有上次没保存的修改,但现在连不上预览服务器;连上后刷新页面即可放回。":`There are unsaved changes from last time, but the preview server can't be reached; reload once it's back to put them in.`,"有上次没保存的修改还没能放回(文件正在被修改,或预览服务器出错);稍后刷新页面会再试。":`Unsaved changes from last time couldn't be put back yet (the file is being changed, or the preview server failed); reloading later tries again.`,"文件里的这一段已被修改,你的版本如下:":`This paragraph changed in the file; your version:`,"文件里的这一块已被删除,你的版本如下:":`This block was deleted from the file; your version:`,"文件里的这一块已被修改:复制你的版本,再粘贴到页面上。":`This block changed in the file: copy your version, then paste it into the page.`,"新建的这一块放不进文件(周围的块已被改动或删除):":`This new block couldn't go into the file (the blocks around it changed or were deleted):`,"还没写完、没能保存的块:":`Unfinished blocks that weren't saved:`,"被 AI 的写入改回去的修改,你的版本如下:":`Edits the AI's write undid; your version:`,"上次没等到保存结果的新块里,后来写的内容:":`What you wrote later in new blocks whose save didn't finish:`,"没能保存的修改:":`Changes that weren't saved:`,"读不出来的暂存内容:":`Kept content that couldn't be read:`,"有 {0} 处修改没能放回文件,列在右下方:复制保存好再标记处理完。":`{0} changes couldn't go back into the file; they're listed at the bottom right: copy them somewhere safe, then mark them done.`,"{0} 处修改没能放回":`{0} changes not put back`,复制文字:`Copy text`,"都处理好了,不再保留":`All done; discard them`,"页面的样式或编辑器已更新,刷新页面即可看到。":`The page's styles or the editor changed; reload the page to see them.`,添加表情符号:`Add emoji`,最近:`Recent`,标注:`Notes`,人物:`People`,动物与自然:`Animals & Nature`,食物与饮料:`Food & Drink`,活动:`Activity`,旅行与地点:`Travel & Places`,物品:`Objects`,符号:`Symbols`,自定义:`Custom`,添加自定义表情符号:`Add custom emoji`,无结果:`No results`,"跳转到类别:{0}":`Jump to category: {0}`,选择肤色:`Choose skin tone`,图标:`Icons`,"图标:{0},切换为 {1}":`Icons: {0}; switch to {1}`,"切换为 {0} 图标":`Switch to {0} icons`,数字与符号:`Numbers & Symbols`,办公与学习:`Work & Study`,界面与操作:`Interface & Actions`,箭头与导航:`Arrows & Navigation`,设计与影音:`Design & Media`,设备与科技:`Devices & Technology`,沟通与表情:`Communication & Faces`,交通与建筑:`Transport & Buildings`,自然与天气:`Nature & Weather`,生活与消费:`Living & Shopping`,健康与运动:`Health & Sports`,品牌与娱乐:`Brands & Entertainment`,"选择图标颜色,已选定 {0}":`Choose icon color; {0} selected`,无颜色:`No color`,选择图标颜色:`Choose icon color`,"将颜色设置为{0}":`Set color to {0}`,每次询问:`Ask every time`,表情符号:`Emoji`,上传:`Upload`,移除:`Remove`,"筛选…":`Filter…`,清除输入:`Clear`,随机:`Random`,请求失败:`Request failed`,"图片太大(最多 {0})":`Image too large (at most {0})`,本机所有页面都可以使用自定义表情符号:`Custom emoji can be used on every page on this computer`,上传图片:`Upload an image`,替换:`Replace`,预览:`Preview`,"或{0}粘贴图片或链接":`or {0} to paste an image or link`,仅支持图片:`Images only`,"粘贴的链接不包含图像。<br>使用{0}粘贴其他链接":`The pasted link has no image.<br>Use {0} to paste another link`,添加到表情符号库:`Add to the emoji library`,表情符号名称:`Emoji name`,"搭建快乐!":`Happy building!`,返回:`Back`,保存:`Save`,"已将 {0} 添加到表情符号库":`Added {0} to the emoji library`,"无法保存此表情符号。请重试。":`This emoji couldn't be saved. Try again.`,"出了些问题。":`Something went wrong.`,"已导出 {0}":`Exported {0}`,"未导出:{0}":`Not exported: {0}`,"未导出:连不上 Gallery 的服务(gallery open 会启动它)":`Not exported: can't reach Gallery's server (gallery open starts it)`,无法连接预览服务器:`Can't reach the preview server`,无:`None`,"红色(默认)":`Red (default)`,橙色:`Orange`,蓝色:`Blue`,紫色:`Purple`,文字色:`Text-colored`,细:`Thin`,"中(默认)":`Medium (default)`,粗:`Thick`,应用格式:`Paint format`,"先给文字设置格式,这里会记住":`Format some text first; it is remembered here`,文字颜色:`Text color`,加粗:`Bold`,下划线:`Underline`,清除格式:`Clear formatting`,代码:`Code`,公式:`Equation`,转换为:`Turn into`,多个类型:`Multiple types`,删除线:`Strikethrough`,斜体:`Italic`,详情卡片:`Detail card`,文字格式:`Text format`,最近使用:`Recently used`,"下划线{0}":`{0} underline`,无下划线:`No underline`,线的颜色:`Line color`,线的粗细:`Line weight`,"{0}{1}下划线":`{1} {0} underline`,行内代码:`Inline code`,"公式和带图标的链接不能放进行内代码。":`Equations and links with icons can't go into inline code.`,"先选中要设置格式的文字。":`Select the text to format first.`,"不{0}":`No {0}`,"接着打的字:{0} · 再按一次取消":`What you type next: {0} · press again to cancel`,接着打的字照旧:`What you type next stays as it was`,"选中的文字跨了几块:链接、公式和详情卡片只能加在一块里的文字上。":`The selection spans blocks: links, equations and detail cards go on text within one block.`,"先选中要加链接的文字。":`Select the text to link first.`,"先选中要变成公式的文字。":`Select the text to turn into an equation first.`,"还没有可应用的格式:先给一段文字设置格式,再选中别的文字点它。":`No format to paint yet: format some text, then select other text and click this.`,"已应用{0} · Ctrl+Z 撤销":`Applied {0} · Ctrl+Z to undo`,"行内代码里不能放公式。":`Equations can't go in inline code.`,"公式功能没有加载。":`Equations didn't load.`,"公式已清空 · Ctrl+Z 撤销":`Equation cleared · Ctrl+Z to undo`,"已修改公式 · Ctrl+Z 撤销":`Equation changed · Ctrl+Z to undo`,"已插入公式 · Ctrl+Z 撤销":`Equation inserted · Ctrl+Z to undo`,"这个公式的写法特殊,暂不能在页面上修改,请让 AI 修改。":`This equation is written in a way the page can't edit yet; ask the AI to change it.`,"公式功能没能加载,不能插入公式。":`Equations didn't load, so none can be inserted.`,"公式功能没能加载,不能修改公式。":`Equations didn't load, so this one can't be changed.`,"公式(LaTeX)":`Equation (LaTeX)`,插入符号:`Insert symbol`,编辑公式块:`Edit block equation`,编辑公式:`Edit equation`,"无效的公式:":`Invalid equation: `,常用:`Common`,分数:`Fraction`,根号:`Root`,上标:`Superscript`,下标:`Subscript`,求和:`Sum`,积分:`Integral`,极限:`Limit`,度:`Degree`,结构:`Structures`,上下标:`Super- and subscript`,大分数:`Display fraction`,平方根:`Square root`,"n 次根":`nth root`,组合数:`Binomial`,对数:`Logarithm`,连乘:`Product`,定积分:`Definite integral`,二重积分:`Double integral`,环路积分:`Contour integral`,圆括号:`Parentheses`,方括号:`Brackets`,花括号:`Braces`,绝对值:`Absolute value`,范数:`Norm`,尖括号:`Angle brackets`,向下取整:`Floor`,向上取整:`Ceiling`,帽子:`Hat`,横线:`Bar`,波浪:`Tilde`,向量:`Vector`,一阶导:`First derivative`,二阶导:`Second derivative`,上划线:`Overline`,向量箭头:`Vector arrow`,下括号:`Underbrace`,删去:`Cancel`,方框:`Box`,"\\text{文}":`\\text{text}`,文字:`Text`,黑板粗体:`Blackboard bold`,花体:`Calligraphic`,粗体:`Bold`,粗斜体:`Bold italic`,正体:`Upright`,分段函数:`Cases`,"矩阵(圆括号)":`Matrix (parentheses)`,"矩阵(方括号)":`Matrix (brackets)`,行列式:`Determinant`,多行对齐:`Aligned lines`,希腊:`Greek`,小写:`Lowercase`,大写:`Uppercase`,运算:`Operators`,二元运算:`Binary operators`,大型运算:`Large operators`,其他:`Other`,关系与箭头:`Relations & arrows`,关系:`Relations`,集合与逻辑:`Sets & logic`,箭头:`Arrows`,带字箭头:`Arrow with text`,带字左箭头:`Left arrow with text`,化学:`Chemistry`,化学式:`Formula`,阳离子:`Cation`,阴离子:`Anion`,核素:`Nuclide`,单键:`Single bond`,双键:`Double bond`,三键:`Triple bond`,"结合(·)":`Adduct (·)`,物理量单位:`Physical unit`,反应:`Reaction`,逆向反应:`Reverse reaction`,共振:`Resonance`,可逆反应:`Equilibrium`,正向为主:`Equilibrium favoring products`,逆向为主:`Equilibrium favoring reactants`,气体:`Gas`,沉淀:`Precipitate`,"\\ce{->[\\text{上}][\\text{下}]}":`\\ce{->[\\text{above}][\\text{below}]}`,条件:`Conditions`,打开块菜单:`Open block menu`,"添加标题后,这里会列出它们":`Headings you add are listed here`,拖动以移动:`Drag to move`,点击打开菜单:`Click to open menu`,窗口宽一些才能拖动:`Widen the window to drag it`,点击在下方添加块:`Click to add a block below`,"{0}+点击在上方添加":`{0}+click to add a block above`,分区菜单:`Section menu`,点击打开分区菜单:`Click to open the section menu`,拖动移动分区:`Drag to move the section`,"这段里有页面上不显示的注释,为了不丢掉它,暂不能在页面上修改。":`This paragraph holds a comment the page doesn't show; to keep it, the paragraph can't be edited on the page yet.`,"这段在文件里的写法比较特殊,暂不能在页面上修改,可以让 AI 修改。":`This paragraph is written in an unusual way in the file, so it can't be edited on the page yet; an AI can change it.`,"这段里的页面块在文件里的写法不对,暂不能在页面上修改,可以让 AI 修改。":`A page block here isn't written the usual way in the file, so this text can't be edited on the page. You can ask AI to fix it.`,"这段含有不安全的链接地址,暂不能在页面上修改。":`This paragraph has an unsafe link address, so it can't be edited on the page yet.`,"这段文字是页面自己生成或更新的(和文件里写的不同),不能在页面上修改。":`The page makes or updates this text itself (it differs from what the file says), so it can't be edited on the page.`,"这一块已改用文件里的版本:处理完其余冲突、页面显示文件里的内容后才能修改。":`This block goes with the file's version now: it can be edited once the other conflicts are dealt with and the page shows what the file holds.`,"这一项含有嵌套列表:外层文字暂不能修改,里层的列表项可以修改。":`This item holds a nested list: its own text can't be edited yet, the nested items can.`,"这段含有按钮,为避免破坏组件,暂不能在页面上修改;可以让 AI 把其中详情卡片的入口改成链接,之后就能像普通文字一样修改。":`This paragraph holds a button, so it can't be edited here without breaking the component; an AI can turn a detail card's opener in it into a link, and then it edits like any text.`,"这段含有页面上编辑不了的内容({0}),可以让 AI 修改。":`This paragraph holds something the page can't edit ({0}); an AI can change it.`,"这段暂不能在页面上修改。":`This paragraph can't be edited on the page yet.`,"代码对比由数据绘制,整块移动;要改内容,请让 AI 修改。":`A code diff is drawn from data and moves as a whole; ask the AI to change its content.`,"这个代码块是页面自己生成的,或者写法特殊,暂不能在页面上修改,可以让 AI 修改。":`The page makes this code block itself, or it is written in an unusual way, so it can't be edited on the page yet; ask the AI to change it.`,"行间公式暂不能在页面上修改。":`Block equations can't be edited on the page yet.`,"交互控件暂不能在页面上修改。":`Interactive controls can't be edited on the page yet.`,"图是页面画出来的;要改它的数据或画法,请让 AI 修改。":`The page draws this figure; ask the AI to change its data or how it is drawn.`,"这里暂不能在页面上修改。":`This can't be edited on the page yet.`,"先选中要加链接的文字,再按 Ctrl+K。":`Select the text to link, then press Ctrl+K.`,输入链接或页面标题:`Link or page title`,输入页面标题:`Page title`,页面标题:`Page title`,页面块:`Page`,已转为页面块:`Shown as a page`,"这个地址不是工作区里的页面。":`This address isn't a page of this workspace.`,没能新建页面:`The page couldn't be made`,"已新建子页面:{0}":`New subpage: {0}`,"链接到页面或块…":`Link to a page or block…`,链接到页面:`Link to page`,链接地址:`Link address`,复制链接:`Copy link`,移除链接:`Remove link`,显示为:`Show as`,选择视图:`Choose a view`,"还没有链接地址。":`No link address yet.`,"已复制链接。":`Link copied.`,"这个块已经不在了。":`This block is no longer here.`,复制块链接:`Copy link to block`,"这一块还没有保存,保存后才能复制它的链接。":`This block isn't saved yet: copy its link once it is.`,"这个页面已删除。":`This page has been deleted.`,"没有找到这个页面。":`Page not found.`,"没能复制:浏览器不允许写剪贴板。":`Not copied: the browser doesn't allow writing to the clipboard.`,"不支持这种链接地址。":`This kind of link address isn't supported.`,"链接已移除。":`Link removed.`,"链接:{0}":`Link: {0}`,链接视图:`Link`,标题视图:`Title`,图标视图:`Mention`,书签视图:`Bookmark`,暂不支持获取该网站的预览信息:`This site's preview can't be fetched`,已转为链接视图:`Shown as a link`,标题用了网址的域名:`titled with the site's domain`,已转为标题视图:`Shown as a title`,用了网址的域名:`with the site's domain`,已转为图标视图:`Shown as a mention`,已转为网页书签:`Turned into a web bookmark`,"{0},用了网址的域名":`{0}, titled with the site's domain`,"已转为{0} · Ctrl+Z 撤销":`Turned into {0} · Ctrl+Z to undo`,"请输入有效的链接。":`Enter a valid link.`,上传文件:`Upload file`,"粘贴链接…":`Paste a link…`,嵌入链接:`Embed link`,当前:`Current`,已开启:`On`,搜索:`Search`,菜单:`Menu`,关闭:`Close`,连不上本地服务:`Can't reach the local service`,原宽度:`Original width`,铺满正文:`Fill the text width`,"超宽表 · 表宽 {0}px,横向滚动":`Wide table · {0}px wide, scrolls sideways`,"最窄 · {0}%":`Narrowest · {0}%`,"半宽 · 居中":`Half width · centered`,半宽:`Half width`,到中线:`To the middle`,全宽:`Full width`,占满本行:`Fills the row`," · 居中":` · centered`,原高度:`Original height`,显示全部代码:`Show all code`,"高 {0}px · 其余滚动查看":`{0}px high · scroll for the rest`,"与旁边对齐 · 图表高 {0}px":`Aligned with its neighbour · chart {0}px high`,"图表高 {0}px":`Chart {0}px high`,显示全部行:`Show all rows`,"高 {0}px":`{0}px high`,"已调整{0}{1}:{2} · Ctrl+Z 撤销":`{0} {1}: {2} · Ctrl+Z to undo`,"{0}{1}:{2}":`{0} {1}: {2}`,"栏宽:{0}":`Column widths: {0}`,"节点宽度:{0}":`Node widths: {0}`,卡片:`Card`,代码块:`Code`,表格:`Table`,宽度:`width`,高度:`height`,"已删除{0}{1}{2} · Ctrl+Z 撤销":`Deleted {0}{1}{2} · Ctrl+Z to undo`,"(外层已空,一并删除)":` (its emptied container went too)`,",连同其中的内容":`, with what it held`,"已选中 {0} 块 · Delete 删除 · 拖动手柄一起移动 · Esc 取消":`{0} blocks selected · Delete to delete · drag a handle to move them together · Esc to cancel`,"已选中{0} · Delete 删除{1} · Esc 取消":`{0} selected · Delete to delete{1} · Esc to cancel`," · Enter 编辑":` · Enter to edit`,这一栏里的全部内容:`everything in this column`,这个选项卡里的全部内容:`everything in this tab`,这一项下面的全部内容:`everything under this item`,"{0}里的全部内容":`everything in the {0}`,"整个{0}":`the whole {0}`,整个页面:`the whole page`," · 再按 {0} 选中{1}":` · {0} again: {1}`,"已选中{0} · Delete 删除 · Esc 取消{1}":`Selected: {0} · Delete to delete · Esc to cancel{1}`,"已选中这一块的文字 · 再按 {0} 选中{1}":`Selected: this block's text · {0} again: {1}`,已选中这一块的文字:`Selected: this block's text`," · Enter 在下方新建文本":` · Enter to add text below`,基本区块:`Basic blocks`,高级区块:`Advanced blocks`,建议:`Suggestions`,内联:`Inline`,插入块:`Insert block`,对齐:`Align`,拆分单元格:`Split cells`,合并单元格:`Merge cells`,清除内容:`Clear contents`,在上方插入行:`Insert row above`,在下方插入行:`Insert row below`,在左侧插入列:`Insert column left`,在右侧插入列:`Insert column right`,删除所在行:`Delete row`,删除所在列:`Delete column`,单元格:`Cells`,"已清除内容 · Ctrl+Z 撤销":`Contents cleared · Ctrl+Z to undo`,已插入一行:`Row inserted`,"已向下填充 · Ctrl+Z 撤销":`Filled down · Ctrl+Z to undo`,"已向右填充 · Ctrl+Z 撤销":`Filled right · Ctrl+Z to undo`,"已设置颜色 · Ctrl+Z 撤销":`Color set · Ctrl+Z to undo`,"已复制 {0} 格":`Copied {0} cells`,"一次粘贴的格子太多了。":`Too many cells to paste at once.`,"已粘贴 · Ctrl+Z 撤销":`Pasted · Ctrl+Z to undo`,移动列:`Move column`,移动行:`Move row`,在这里插入一列:`Insert a column here`,在这里插入一行:`Insert a row here`,添加行或列:`Add rows or columns`,点击以添加新行:`Click to add a row`,拖动以添加或移除行和列:`Drag to add or remove rows and columns`,已插入一列:`Column inserted`,已删除列:`Column deleted`,已删除行:`Row deleted`,"表格至少要留一列。":`A table keeps at least one column.`,"表格至少要留一行正文。":`A table keeps at least one body row.`,标题行:`Header row`,标题列:`Header column`,已取消标题列:`Header column off`,已设为标题列:`Header column on`,在上方插入:`Insert above`,在下方插入:`Insert below`,在左侧插入:`Insert left`,在右侧插入:`Insert right`,均分列宽:`Even column widths`,视图:`View`,自动调整列宽:`Auto-fit column widths`,列:`Column`,行:`Row`,已一键优化:`Optimized`,"这个表格已经是优化后的样子。":`This table is already optimized.`,"已识别数字列 · Ctrl+Z 撤销":`Number columns detected · Ctrl+Z to undo`,"这个表格的数字列已在识别。":`This table's number columns are already detected.`,"这一列已经是这个顺序。":`This column is already in that order.`,已按这一列降序排列:`Sorted by this column, descending`,已按这一列升序排列:`Sorted by this column, ascending`,已取消标题行:`Header row off`,已设为标题行:`Header row on`,"第一行和下面的行合并了单元格,不能设为标题行。":`The first row shares merged cells with the rows below, so it can't be the header row.`,"标题行不能和正文合并。":`The header row can't merge with the body.`,已合并单元格:`Cells merged`,"这些单元格不能合并。":`These cells can't be merged.`,已拆分单元格:`Cells split`,"{0} 列 × {1} 行":`{0} columns × {1} rows`,"{0} {1} 行":`{0} {1} rows`,已添加:`Added`,已移除:`Removed`,"{0} {1} 列":`{0} {1} columns`,已移动列:`Column moved`,已移动行:`Row moved`,"合并的单元格把这几列连在一起,不能这样移动。":`Merged cells tie these columns together, so they can't move this way.`,"合并的单元格把这几行连在一起,不能这样移动。":`Merged cells tie these rows together, so they can't move this way.`,一键优化:`Optimize`,识别数字列:`Detect number columns`,铺满这一栏:`Fill this column`,铺满正文宽度:`Fill the text width`,表格已铺满:`The table fills its width`,恢复默认大小:`Reset size`,已恢复默认大小:`Size reset`,已按内容调整列宽:`Column fitted to its content`,"拖动调整列宽;点击后拖动调整整个表格的宽度":`Drag to resize the column; click, then drag to resize the whole table`,"拖动调整列宽,双击按内容调整":`Drag to resize the column; double-click to fit its content`,拖动调整整个表格的宽度:`Drag to resize the whole table`,"拖动调整列宽 · 点击后可拖动调整整个表格的宽度":`Drag to resize the column · click, then drag to resize the whole table`,点击后拖动调整表格的高度:`Click, then drag to resize the table's height`,"拖动调整表格的高度,超出的行上下滚动":`Drag to resize the table's height; rows beyond it scroll`,点击后可拖动调整表格的高度:`Click, then drag to resize the table's height`,已自动调整列宽:`Column widths auto-fitted`,"列宽已按内容调整,无需再调。":`The column widths already fit their content.`,已均分列宽:`Column widths evened`,"跨块删除只支持正文、标题和列表里的文字。":`Deleting across blocks works only on text in paragraphs, headings and lists.`,"这里有不能删除的块。":`Some blocks here can't be deleted.`," 或 ":` or `," 空格":` Space`,"输入 / 选择类型":`Type / to choose a block`,"输入以筛选…":`Type to filter…`,"输入文字…":`Type here…`,"添加 Web 书签":`Add a web bookmark`,网页书签:`Web bookmark`,书签:`Bookmark`,"以 https://… 格式粘贴":`Paste in https://… format`,创建书签:`Create bookmark`,"从链接创建可视化书签。":`Create a visual bookmark from a link.`,请输入有效的链接:`Enter a valid link`,"获取预览中…":`Fetching preview…`,"无法获取网页预览:{0}":`Couldn't fetch the page preview: {0}`,"已刷新网页预览 · Ctrl+Z 撤销":`Preview refreshed · Ctrl+Z to undo`,已将链接拷贝到剪贴板:`Link copied to clipboard`,无法拷贝链接:`Couldn't copy the link`,"标题@caption":`Caption`,拷贝原始链接:`Copy original link`,刷新预览:`Refresh preview`,提示块:`Callout`,请输入代码块名称:`Name the code block`,代码块标题:`Code block title`,已折叠代码块:`Code block collapsed`,已展开代码块:`Code block expanded`,代码已取消自动换行:`Code wrap off`,代码已自动换行:`Code wrap on`,"{0}第 {1} 行的代码结构 · Ctrl+Z 撤销":`{0} the code structure at line {1} · Ctrl+Z to undo`,已折叠:`Collapsed`,已展开:`Expanded`,"自动识别 auto detect zidong zdsb":`auto detect zidong zdsb`,自动识别:`Auto detect`,代码语言:`Code language`,没有找到这种语言:`No such language`,搜索语言:`Search languages`,"代码语言:{0}":`Code language: {0}`,"代码语言:自动识别({0})":`Code language: auto detect ({0})`,代码块已显示全部代码:`Code block shows all its code`,一:`One`,两:`Two`,三:`Three`,四:`Four`,五:`Five`,分栏:`Columns`,栏:`Column`,"新分栏里还有空着的一栏:每一栏都写上内容后才会保存。":`A new column is still empty: the columns are saved once each has content.`,"一行最多 {0} 栏":`At most {0} columns in a row`,"只有相邻的块能并排分栏:中间还有没选中的块":`Only blocks next to each other can go side by side: there are unselected blocks between them`,"已分成{0}栏":`Split into {0} columns`,"已把 {0} 块并排分栏":`Put {0} blocks side by side`,"一行最多 {0} 栏。":`At most {0} columns in a row.`,"已新增一栏 · Ctrl+Z 撤销":`Column added · Ctrl+Z to undo`,折叠列表:`Toggle list`,折叠列表标题:`Toggle title`,折叠块标题:`Toggle title`,"空白折叠区块。点击或拖动区块到这里。":`Empty toggle. Click here, or drag blocks into it.`,"空白内容区。点击或拖动区块到这里。":`Empty content area. Click here, or drag blocks into it.`,"先选中点开详情卡片的文字。":`Select the text that should open the detail card first.`,"选中的文字里已经有链接,先移除链接(Ctrl+K)再做详情卡片的入口。":`The selected text already has a link; remove it (Ctrl+K) before making it open a detail card.`,"这里不能新建详情卡片。":`A detail card can't be added here.`,"已新建详情卡片:标题取自选中的文字,接着写卡片里的内容 · Esc 关闭 · Ctrl+Z 撤销":`Detail card made: its title is the selected text; now write what it holds · Esc to close · Ctrl+Z to undo`,打开:`Open`,移除入口:`Remove the opener`,打开详情卡片:`Open the detail card`,"入口已移除:页面上没有地方能打开这张详情卡片了 · Ctrl+Z 撤销":`Opener removed: nothing on the page opens this detail card now · Ctrl+Z to undo`,分割线:`Divider`,"嵌入网页,或上传 HTML、PDF 文件":`Embed a web page, or upload an HTML or PDF file`,嵌入:`Embed`,"粘贴网页链接,例如 https://…":`Paste a web link, such as https://…`,"适用于允许嵌入的网页。":`Works with pages that allow embedding.`,"支持 HTML 和 PDF 文件。":`HTML and PDF files.`,"只能嵌入 https 开头的网页。":`Only https pages can be embedded.`,"正在检查网页…":`Checking the page…`,"这个网页不允许嵌入,已改为网页书签。":`This page doesn't allow embedding, so it became a web bookmark.`,"这个网页不允许嵌入。":`This page doesn't allow embedding.`,"只能嵌入 HTML 或 PDF 文件。":`Only HTML or PDF files can be embedded.`,"文件太大(最多 {0})。":`File too large (at most {0}).`,"正在上传 {0}…":`Uploading {0}…`,无法上传这个文件:`This file couldn't be uploaded`,"已替换嵌入内容 · Ctrl+Z 撤销":`Embed replaced · Ctrl+Z to undo`,嵌入操作:`Embed actions`,全屏:`Full screen`,全屏查看:`View full screen`,查看原始内容:`View original`,在新标签页中打开:`Open in new tab`,打开区块操作菜单:`Open block actions`,"嵌入大小:{0},{1} · Ctrl+Z 撤销":`Embed size: {0}, {1} · Ctrl+Z to undo`,"{0}% 宽":`{0}% wide`,整行宽:`full width`,默认高度:`default height`,"已恢复默认大小 · Ctrl+Z 撤销":`Size reset · Ctrl+Z to undo`,卡片标题和说明:`Card title and caption`,居中显示:`Centered`,卡片已居中显示:`Card centered`,全宽显示:`Full width`,卡片已全宽显示:`Card shown full width`,文件:`File`,"粘贴文件链接…":`Paste a file link…`,"适用于任何文件的网址。":`Works with any file's address.`,"正在下载…":`Downloading…`,无法下载这个文件:`This file couldn't be downloaded`,"已替换文件 · Ctrl+Z 撤销":`File replaced · Ctrl+Z to undo`,替换文件:`Replace file`,下载:`Download`,标题:`Heading`,"标题 1":`Heading 1`,"标题 2":`Heading 2`,"标题 3":`Heading 3`,"标题 4":`Heading 4`,高亮块:`Highlight`,页面图标:`Page icon`,"已移除{0}":`Removed {0}`,这张图片没能存进文档:`This image couldn't be saved into the document`,"已更换{0}":`Changed {0}`,"{0}添加图标":`{0}Add icon`,已添加页面图标:`Page icon added`,更换图标:`Change icon`,添加图标:`Add icon`,自由:`Free`,裁剪图片:`Crop image`,添加图片:`Add an image`,图片:`Image`,左对齐:`Align left`,居中对齐:`Align center`,右对齐:`Align right`,"粘贴图片链接…":`Paste an image link…`,嵌入图片:`Embed image`,"适用于网络上的任何图片。":`Works with any image on the web.`,"很抱歉,不支持该文件类型。":`Sorry, this file type isn't supported.`,"图片太大(最多 {0})。":`Image too large (at most {0}).`,"正在上传…":`Uploading…`,无法上传这张图片:`This image couldn't be uploaded`,无法下载这张图片:`This image couldn't be downloaded`,"已替换图片 · Ctrl+Z 撤销":`Image replaced · Ctrl+Z to undo`,图片操作:`Image actions`,对齐方式:`Alignment`,设置区块对齐:`Set the block's alignment`,添加标题:`Add a caption`,"图片宽度 {0}% · Ctrl+Z 撤销":`Image width {0}% · Ctrl+Z to undo`,"已{0} · Ctrl+Z 撤销":`{0} · Ctrl+Z to undo`,"没能下载这张图片。":`The image couldn't be downloaded.`,"已恢复原图 · Ctrl+Z 撤销":`Original image restored · Ctrl+Z to undo`,"已裁剪图片 · Ctrl+Z 撤销":`Image cropped · Ctrl+Z to undo`,"无法保存裁剪的图片:{0}":`The cropped image couldn't be saved: {0}`,替换图片:`Replace image`,恢复原始大小:`Original size`,"已恢复原始大小 · Ctrl+Z 撤销":`Original size restored · Ctrl+Z to undo`,上一张:`Previous`,下一张:`Next`,查看图片:`Image viewer`,列表:`List`,列表项:`List item`,节点:`Node`,符号列表:`Bulleted list`,编号列表:`Numbered list`,待办事项:`To-do list`,步骤流程图:`Step flowchart`,方向:`Direction`,自动换行:`Wrap into rows`,排成一行:`One row`,排成一列:`One column`,流程图的方向:`Flowchart direction`,这个节点之后:`After this node`,整个流程图:`The whole flowchart`,跟随整体:`Follow the flowchart`,接在右边:`Next one to the right`,接在下边:`Next one below`,"方向已改为{0}":`Direction set to {0}`,"节点方向已改为{0}":`Node direction set to {0}`,"已调整节点宽度:{0} · 双击竖线等宽 · Ctrl+Z 撤销":`Node widths: {0} · double-click the line to even them · Ctrl+Z to undo`,"这一行的节点已等宽 · Ctrl+Z 撤销":`This row's nodes evened · Ctrl+Z to undo`,节点标题:`Node title`,在后面添加节点:`Add a node after`,"已添加节点 · Ctrl+Z 撤销":`Node added · Ctrl+Z to undo`,"节点里还有内容:清空后再按 Backspace 会删除节点":`The node still holds something: empty it, then Backspace deletes the node`,"节点不能缩进:Tab 只在节点里的列表中缩进。":`Nodes don't indent: Tab indents only in a node's lists.`,"这一项下面还有子项;要连同子项一起删除,点左侧的手柄后按 Delete。":`This item has items under it; to delete it with them, click its handle on the left and press Delete.`,"这一项下面还有内容;要连同这些内容一起删除,点左侧的手柄后按 Delete。":`This item has content under it; to delete it with that content, click its handle on the left and press Delete.`,"这一项上面没有同级的项,不能再缩进。":`No item at its level above it, so it can't be indented further.`,"这一项已经在最外层。":`This item is already at the outermost level.`,"选中的项上面没有同级的项,不能再缩进。":`The selected items have no item at their level above them, so they can't be indented further.`,"选中的项已经在最外层。":`The selected items are already at the outermost level.`,"{0} {1} 项 · Ctrl+Z 撤销":`{0} {1} items · Ctrl+Z to undo`,已缩进:`Indented`,已取消缩进:`Outdented`,已放到上一项下面:`Put under the item above`,已移出这一项:`Moved out of the item`,"已转换为文本 · Ctrl+Z 撤销":`Turned into text · Ctrl+Z to undo`,"这一项下面还有子项,不能并入上一项。":`This item has items under it, so it can't merge into the one above.`,"这一项下面还有内容,不能并入上一项。":`This item has content under it, so it can't merge into the one above.`,设置编号:`Numbering`,开始新列表:`Start a new list`,修改编号值:`Change the number`,新编号:`New number`,"编号是从 1 开始的整数。":`A number is a whole number from 1.`,"这一层的编号是字母(a、b、c…)或数字。":`This level is numbered with letters (a, b, c…) or numbers.`,"这一层的编号是罗马数字(i、ii、iii…)或数字。":`This level is numbered with Roman numerals (i, ii, iii…) or numbers.`,确定:`OK`,新编号为:`New number`,已开始新列表:`New list started`,"编号已改为 {0}":`Numbered from {0}`,"已接上前面的编号 · Ctrl+Z 撤销":`Continues the numbering above · Ctrl+Z to undo`,公式块:`Block equation`,无效的公式:`Invalid equation`,修改:`Edit`,"写一个标题…":`Write a caption…`,"说明@caption":`Caption`,小字:`Small text`,新公式:`New equation`,"添加一个 TeX 公式":`Add a TeX equation`,引用块:`Quote`,页面:`Page`,分组:`Group`,页眉:`Header`,文档主标题:`Document title`,分区:`Section`,"这个分区被脚本或链接用到,不能解散":`A script or link uses this section, so it can't be dissolved`,"分区里有不能移动的内容(例如脚本),不能解散":`The section holds content that can't move (a script, say), so it can't be dissolved`,只有同一层里的块能组成分区:`Only blocks at the same level can make a section`,分区里不能再放分区或选项卡区块:`A section can't hold a section or a tabs area`,"只有相邻的块能组成分区:中间还有没选中的块":`Only blocks next to each other can make a section: there are unselected blocks between them`,"已新建分区 · 标题、分割线都可以按需加":`Section added · add a heading or divider as needed`,"已把{0}组成新分区 · 标题、分割线都可以按需加 · Ctrl+Z 撤销":`Made {0} a section · add a heading or divider as needed · Ctrl+Z to undo`," {0} 块":` {0} blocks`,"已解散分区,内容留在原处 · Ctrl+Z 撤销":`Section dissolved; its content stays where it was · Ctrl+Z to undo`,选项卡区块:`Tabs`,选项卡:`Tab`,选项卡栏:`Tab bar`,选项卡名称:`Tab name`,"选项卡名称不能为空,已恢复原来的名称。":`A tab needs a name; the old one is back.`,显示边框:`Show border`,"{0}选项卡区块的边框":`{0} the tabs area's border`,已去掉:`Removed`,已显示:`Showing`,"{0}选项卡图标 · Ctrl+Z 撤销":`{0} the tab's icon · Ctrl+Z to undo`,已更换:`Changed`,选项卡的操作:`Tab actions`,编辑图标:`Edit icon`,添加选项卡:`Add tab`,"空白选项卡。点击或拖动区块到这里。":`Empty tab. Click here, or drag blocks into it.`,"已添加选项卡 · 输入名称后按 Enter · Ctrl+Z 撤销":`Tab added · type its name and press Enter · Ctrl+Z to undo`,表格单元格:`Table cell`,居中:`Center`,顶端对齐:`Align top`,垂直居中:`Align middle`,底端对齐:`Align bottom`,这段文字:`This text`,同一次保存的内容不一致:`The same save came with different content`,"文件一再被修改(例如 AI 正在写入),稍后再同步":`The file keeps changing (an AI may be writing it); it will sync again shortly`,"文件一再被修改(例如 AI 正在写入),没有写入":`The file keeps changing (an AI may be writing it); nothing was written`,这个预览服务器管的是另一个目录的文档:`This preview server serves the documents of another directory`,标题已更新:`Title updated`,"单独打开或导出时的页面名称原本就和标题不同,没有跟着改":`the page's name when it's opened on its own or exported was already different from the title, so it wasn't changed`,"搜索和侧栏里(没打开这份文档时)的文档名原本就和标题不同,没有跟着改":`the document's name in search and in the sidebar (while it isn't open) was already different from the title, so it wasn't changed`,"搜索和侧栏里(没打开这份文档时)的文档名没能跟着改":`the document's name in search and in the sidebar (while it isn't open) couldn't be changed with it`,"页面图标已更换,但搜索和侧栏里(没打开这份文档时)的图标没能跟着换":`Page icon changed, but its icon in search and in the sidebar (while it isn't open) couldn't follow`,标题不能为空:`The title can't be empty`,"只能嵌入 HTML 或 PDF 文件":`Only HTML or PDF files can be embedded`,"图片太大(最多 {0} MB)":`Image too large (at most {0} MB)`,"文件太大(最多 {0} MB)":`File too large (at most {0} MB)`,下载不了这张图片:`Couldn't download this image`,下载不了这个文件:`Couldn't download this file`,"网页返回 {0}":`The page answered {0}`,这个自定义表情已不在表情库里:`This custom emoji is no longer in the library`,名称已被占用:`That name is taken`,不是网址:`Not a web address`,"只支持 http(s) 网址":`Only http(s) addresses are supported`,"文档目录的结构不对:每份文档只能出现一次":`The document outline is malformed: each document may appear only once`,文档名不对:`Bad document name`,改名没有成功:`The rename didn't work`,"检查没有通过:{0}":`The checks didn't pass: {0}`,"检查没有通过:{0};{1}":`The checks didn't pass: {0}; {1}`,"检查没有通过:{0};{1};{2}":`The checks didn't pass: {0}; {1}; {2}`,"检查没有通过:{0};{1};{2} 等 {3} 条":`The checks didn't pass: {0}; {1}; {2} and more, {3} in all`,写作偏好不能移到回收区:`The writing preferences can't be moved to trash`,"写作偏好不在文档目录里,不能移动,下面也不能放文档":`The writing preferences aren't in the outline: they can't be moved or have documents under them`,找不到要放到它下面的文档:`Can't find the document to put it under`,找不到要放在它后面的文档:`Can't find the document to put it after`,要放在它后面的文档不在这一层:`The document to put it after isn't at that level`,文档目录刚在别处改过:`The outline was just changed elsewhere`,文档不能放在它自己后面:`A document can't go after itself`,文档不能移到它自己或它下面的文档下面:`A document can't move under itself or a document under it`,还没有写作偏好:`There are no writing preferences yet`,回收区里没有这一项:`That's not in the trash`,"文件太大(最多 5GB)":`File too large (at most 5 GB)`,文件名不对:`Bad file name`,文件没有传完:`The file didn't finish uploading`,导出选项不对:`Bad export options`,"上传的文件已过期,请重新导入":`The uploaded files expired; import them again`,"没有找到 Chrome 或 Edge:导出 PDF 需要电脑上装有其中一个浏览器":`No Chrome or Edge found: exporting a PDF needs one of them installed`,"压缩包太大(超过 4GB)":`The archive is too large (over 4 GB)`,压缩包里的文件太多:`The archive holds too many files`,"ZIP 文件已损坏":`The ZIP file is damaged`,"不是有效的 ZIP 文件":`Not a valid ZIP file`,"{0} 已加密":`{0} is encrypted`,"{0}:不支持的压缩方式":`{0}: unsupported compression method`,"{0}:大小不符":`{0}: the size doesn't match`,"转换进程意外退出({0})":`The conversion process stopped unexpectedly ({0})`,"{0}。":`{0}.`,";":`; `,批注:`Annotate`,复制批注:`Copy annotations`,删除批注:`Delete annotation`,全部删除:`Delete all`,"{0} 条":`{0}`,"还没有批注。选中文字或点块右边的按钮来写":`None yet. Select text or use a block's button`,"写下建议…":`Write a suggestion…`,"已复制 {0} 条批注":`Copied {0} annotations`,"已复制 1 条批注":`Copied 1 annotation`,"已删除 {0} 条批注":`Deleted {0} annotations`,"已删除 1 条批注":`Deleted 1 annotation`,没有删除批注:`The annotations were not deleted`,没有恢复批注:`The annotations were not put back`,没有读到批注:`The annotations could not be read`,"批注没能保存:{0}":`The annotation could not be saved: {0}`,"以下是我对这份文档的批注,共 {0} 条。请逐条按“建议”修改底稿;每条给出它在文档里的位置、块的 data-block-id 和批注的原文。":`These are my {0} annotations on this document. Please revise the source by each suggestion; each gives where it is in the document, the blocks' data-block-id and the words it is about.`,"以下是我对这份文档的一条批注。请按“建议”修改底稿;它给出在文档里的位置、块的 data-block-id 和批注的原文。":`This is my annotation on this document. Please revise the source by its suggestion; it gives where it is in the document, the blocks' data-block-id and the words it is about.`,页首:`Top of the page`,"文档@doc":`Document`,底稿:`Source`,块:`Block`,"(整块)":` (whole)`,"(还没有 id,按原文找)":`(no id yet: find it by its words)`,"建议@note":`Suggestion`,正文:`Body`,":":`: `,",":`, `,"、":`, `,"{0},{1}":`{0}, {1}`,"{0}:{1}":`{0}: {1}`,"Markdown:{0}":`Markdown: {0}`,"PDF、HTML、Markdown":`PDF, HTML, Markdown`,灰色:`Gray`,棕色:`Brown`,黄色:`Yellow`,绿色:`Green`,粉色:`Pink`,红色:`Red`,浅灰色:`Light gray`,"名称只能包含小写字母、数字、连字符或下划线":`A name can hold only lowercase letters, digits, hyphens or underscores`,"名称必须少于 50 个字符":`A name must be shorter than 50 characters`,新文档:`New document`,"导入自 {0}":`Imported from {0}`,"「{0}」里的组件 {1} 有错误,没有生成文件:可以让 AI 检查这份文档并修好":`Component {1} in “{0}” has an error, so no file was made: an AI agent can check this document and fix it`,"「{0}」没有通过导出前的检查,没有生成文件:{1}":`“{0}” didn't pass the checks before export, so no file was made: {1}`,"「{0}」没有通过导出前的检查,没有生成文件:{1}(共 {2} 处:可以让 AI 检查这份文档,列出全部并修好)":`“{0}” didn't pass the checks before export, so no file was made: {1} ({2} in all: ask the AI to check this document, list them all and fix them)`,字体与布局:`Font and layout`,字体:`Font`,等线体:`Sans`,衬线体:`Serif`,混合体:`Mixed`,"无衬线字体,屏幕上读起来清楚,适合任何文档":`A sans-serif font, clear on screen, for any document`,"标题和正文都用衬线字体,适合长文章":`A serif font for headings and text alike, for long reads`,"标题用衬线字体,正文用等线体":`Headings in a serif font, the text in sans`,字体大小:`Font size`,小号:`Small`,大号:`Large`,正文间距:`Spacing`,紧凑:`Compact`,宽松:`Loose`,正文宽度:`Text width`,偏窄:`Narrow`,偏宽:`Wide`,"默认字号下一行约 {0} 个字":`About {0} characters a line at the default font size`,全宽:`Full width`,"不管字体与布局里的正文宽度设成多少,页面都按全宽显示":`Shows the page at full width, whatever its text width is set to`,"全宽开着时不起作用,关掉全宽后按这里的宽度显示":`Not used while full width is on; with it off, the page takes this width`,"字体与布局没有保存:{0}":`Font and layout not saved: {0}`,写作偏好没有字体与布局:`Writing preferences have no font and layout`,字体与布局不对:`The font and layout given are not right`,这份文档的标题和说明读不出来:`This document's title and description could not be read`,应用到全部文档:`Apply to all documents`,"这份文档的字体与布局用到全部文档,新建的文档也一样":`Use this document's font and layout in every document, new ones too`,已应用到全部文档:`Applied to all documents`,"已应用到全部文档,替换了 {0} 篇的单独设置":`Applied to all documents; own settings replaced in {0}`,"没有应用到全部文档:{0}":`Not applied to all documents: {0}`,自定义页:`Custom page`,更多页面:`More pages`,未命名页面:`Untitled page`,首页不能移到回收区:`The home page cannot be moved to the trash`,找不到这个页面:`This page was not found`,"标题不能是空的,也不能超过 200 个字":`A title cannot be empty or longer than 200 characters`,"这一页在电脑上的位置,可以直接告诉 Agent":`Where this page is on your computer, to tell an Agent`,"把缺的默认卡片放回空位,别的不动":`Puts the missing default cards back in empty spots; nothing else moves`,"这张卡片刚被改过,请再操作一次":`This card was just changed: please do that again`,没能改动这个页面:`The page could not be changed`,"这一项待办刚被改过,没能撤销":`This to-do was just changed: it was not undone`,没能改动这一项待办:`The to-do could not be changed`,这个块只能放在文档里:`This block goes in documents only`,这个块已停用:`This block is turned off`,"拖动以移动卡片,点击打开菜单":`Drag to move the card, click to open its menu`,现在不能添加自定义块:`A custom block cannot be added now`,卡片菜单:`Card menu`,拖动调整大小:`Drag to resize`,添加自定义块:`Add custom block`,"设置…":`Settings…`,大小:`Size`,自带:`Built in`,没有能放在页面上的块:`No block goes on a page`,没有找到:`Nothing found`,这个块不能放在页面上:`This block cannot go on a page`,卡片设置:`Card settings`,"(未选择)":`(none)`,恢复默认卡片:`Restore default cards`,"已放回默认卡片:{0}":`Default cards put back: {0}`,"{0}已停用,没有放回":`{0} is turned off: not put back`,"没能放回:{0}":`Could not put back: {0}`,"默认卡片都在,没有要放回的":`All the default cards are there: nothing to put back`,没能恢复默认卡片:`The default cards could not be restored`,"首页之后又改过,在页面上按 Ctrl+Z 撤销":`The home page changed since: press Ctrl+Z on the page to undo`,"放回的卡片之后被改过或拿掉了,没有撤销":`The cards put back were changed or taken out since: nothing undone`,这是你的首页:`This is your home page`,"拖卡片右上角的 {0} 移动它,点一下它打开菜单(大小、设置、删除),点页面右上角的 ··· 里的「添加自定义块」加一张。":`Drag {0} at a card's top right to move it, click it to open the card's menu (Size, Settings, Delete), and use Add custom block in the ··· menu at the top right of the page to add one.`,"拖卡片右上角的 {0} 移动它,点一下它打开菜单(大小、设置、删除),点页面右上方的「添加自定义块」加一张。":`Drag {0} at a card's top right to move it, click it to open the card's menu (Size, Settings, Delete), and use Add custom block at the top right of the page to add one.`,"想要新卡片或新页面,跟 Agent 说,比如:":`For a new card or a new page, ask your Agent, for example:`,"用 Gallery 在首页加一张卡片,记我每天喝了几杯水。别动我摆好的卡片。":`Use Gallery to add a card to my home page that counts the glasses of water I drink each day. Leave the cards I placed where they are.`,复制:`Copy`,已复制:`Copied`,"已复制这句话,发给 Agent 就行":`Copied: send it to your Agent`,关闭这条说明:`Close this note`,首页的说明:`About the home page`,没能记下这条说明已关闭:`Could not keep this note closed`,这个块现在没有要联网的地方:`This block reaches no website now`,"允许「{0}」联网?":`Let “{0}” go online?`,"它要从这些网站取数据:{0}。Gallery 替它去取,只访问这些网站,不带你的登录信息;取到的数据只在 Gallery 里显示,不写进文档,导出的文件里只带最近一次取到的。随时可以在 设置 › 组件列表 里撤回。":`It fetches data from these websites: {0}. Gallery fetches it for the block, from these websites alone and without your sign-ins; what it gets is shown in Gallery and never written into a document, and an exported file holds only the last of it. Take it back at any time in Settings › Components.`,允许:`Allow`,"已允许「{0}」访问 {1}":`“{0}” may now reach {1}`,允许联网:`Online`,"允许它从这些网站取数据:{0}":`Lets it fetch data from these websites: {0}`,这个块不联网:`This block reaches no website`,加到首页:`Add to the home page`,首页有了新的卡片:`New cards for your home page`,"点「加到首页」放进空位,已有的卡片不动。以后也可以在侧栏里首页的菜单中点「恢复默认卡片」。":`Add to the home page puts them in the empty spots and leaves your cards as they are. Later, Restore default cards in the home page's menu in the sidebar does the same.`,首页的新卡片:`New cards for the home page`,没能把卡片放到首页:`The cards could not be put on the home page`,"这是 Gallery 自己的地址,请直接链接文档":`This is Gallery's own address: link the document instead`,这个网站不允许在别的页面里显示:`This website doesn't let other pages show it`,在浏览器中打开:`Open in browser`,修改网址:`Change address`,网址:`Address`,"粘贴网址,例如 https://…":`Paste an address, like https://…`,名称:`Name`,"正在读取网页标题…":`Reading the page's title…`,网页的标题:`The page's title`,添加:`Add`,网页链接:`Web link`,"修改网址…":`Change address…`,复制网址:`Copy address`,新建栏:`New column`,把条目拖到这里:`Drag entries here`,在这一栏新建文档:`New document in this column`,栏的名字:`Column name`,"这一栏的操作…":`Column actions…`,这一栏的操作:`Column actions`,链接的名称:`Link name`,"改名、复制网址等…":`Rename, copy address and more…`,"这个网站不允许在 Gallery 里显示,点开时会提供“在浏览器中打开”":`This website doesn't let Gallery show it: opening it offers Open in browser`,已复制网址:`Address copied`,未命名栏:`Untitled column`,找不到这个链接:`Link not found`,找不到要放在它后面的条目:`No entry to put it after`,要放在它后面的条目不在这一层:`The entry to put it after is not at this level`,找不到这一栏:`Column not found`,找不到要放到它下面的条目:`No entry to put it under`,这不是一个网址:`This is not a web address`,没有这个命令:`No such command`,网址不能是空的:`The address can't be empty`,"只能链接 http 或 https 的网址":`Only http and https addresses can be linked`,"网址太长了(最多 2048 个字符)":`The address is too long (2048 characters at most)`,"名称不能是空的,也不能超过 200 个字":`The name can't be empty or longer than 200 characters`,图标只能是表情或图标页签里的图标:`The icon must be an emoji or an icon of the Icons tab`,"正在启动它所在工作区的服务…":`Starting the server of its workspace…`,"没能打开这份底稿:{0}":`Couldn't open this draft: {0}`,"正在读取别的工作区…":`Reading the other workspaces…`,"别处的底稿 · {0}":`Draft from elsewhere · {0}`,别处的底稿:`Draft from elsewhere`,改的是那篇底稿的标题:`Changes the title of that draft`,"只改它在这里的显示位置,文件不动":`Changes only where it shows here: no file moves`,在文件夹中显示:`Show in folder`,在它的工作区里打开:`Open in its workspace`,"它自己的工作台:导出、批注、字体与布局在那里":`Its own workbench: export, comments, font and layout are there`,从文档树移除:`Remove from the sidebar`,"只移除这一条,不删除底稿":`Removes this entry only: the draft is not deleted`,"找不到底稿:本机登记的两个工作区编号相同":`Draft not found: two registered workspaces share one id`,"找不到底稿:{0}":`Draft not found: {0}`,找不到底稿:`Draft not found`,"这份文档在它自己的工作区里,不在这里的侧边栏中":`This document is in its own workspace, not in this sidebar`,找不到它所在的工作区:`Its workspace was not found`,"没有打开文件夹:{0}":`The folder was not opened: {0}`,"已从文档树移除「{0}」,底稿没有删除":`Removed “{0}” from the sidebar; the draft was not deleted`,"把这个文件夹登记成工作区?":`Register this folder as a workspace?`,登记并添加:`Register and add`,"没有添加:{0} 不在任何工作区里":`Not added: {0} is in no workspace`,这份文档就在这个工作区里:`This document is in this workspace`,它已经在侧边栏里了:`It is in the sidebar already`,找不到这个文件或文件夹:`No such file or folder`,"{0} 里的 gallery.json 是别的程序的,不能把它登记成工作区":`The gallery.json in {0} is another program's: it can't be registered as a workspace`,"会把 {0} 登记成一个工作区(在里面放 gallery.json 和 .gallery/)":`{0} will be registered as a workspace (a gallery.json and a .gallery/ put in it)`,没能把它的工作区记进本机的登记表:`Its workspace could not be added to this machine's registry`,"本机登记的 {0} 个工作区编号相同({1}),先用 gallery workspaces --forget 去掉其中一个":`{0} registered workspaces share one id ({1}): take one off with gallery workspaces --forget first`,这是当前的工作区:`This is the current workspace`,这个工作区不在本机的登记表里:`This workspace is not on this machine's registry`,"本机登记的工作区里有两个用的是同一个编号,先用 gallery workspaces --forget 去掉其中一个":`Two registered workspaces share this id: take one off with gallery workspaces --forget first`,"找不到它所在的工作区:它不在本机的登记表里":`Its workspace was not found: it is not on this machine's registry`,"找不到它所在的工作区:{0} 不在了":`Its workspace was not found: {0} is gone`,找不到这个文件夹:`Folder not found`,它所在工作区的服务没有在运行:`The server of its workspace is not running`,它所在工作区的服务没有回答:`The server of its workspace did not answer`,"没能启动它所在工作区的服务:{0}":`The server of its workspace did not start: {0}`,这个命令不能转给别的工作区:`This command can't be passed on to another workspace`,它所在工作区的服务没有给出结果:`The server of its workspace gave no answer`,这个条目已被扩展移除:`This entry was removed by its extension`,"条目读不出来:{0}":`Entries can't be read: {0}`,没有条目:`No entries`,"在浏览器中打开、复制网址等…":`Open in browser, copy address…`,扩展:`Extension`,扩展的栏里放不了别的条目:`An extension's column holds no other entries`,"文件超过 1MB":`The file is over 1 MB`,"不是 JSON:{0}":`Not JSON: {0}`,"最外层要是一个对象,有 title 和 entries":`The outermost value must be an object with title and entries`,"title 要有,是栏的名字(100 个字以内)":`title is needed: the column's name (100 characters at most)`,"entries 要是一个列表":`entries must be a list`,"icon 不是表情,也不是图标页签里的图标,没有显示":`icon is no emoji nor an icon of the Icons tab, so it is not shown`,"条目超过 {0} 层({1})":`Entries go past {0} levels ({1})`,"条目超过 {0} 个":`More than {0} entries`,"{0} 要是一个对象":`{0} must be an object`,"{0} 的 id 不对(1 到 128 个字符,只能用字母、数字和 . _ : -)":`{0}'s id is wrong (1 to 128 characters: letters, digits and . _ : -)`,"{0} 的 id「{1}」重复了(同一个文件里 id 不能重)":`{0}'s id "{1}" is repeated (an id is used once in a file)`,"{0} 要有 title(名称,200 个字以内)":`{0} needs a title (its name, 200 characters at most)`,"{0} 的 url 只能是 http 或 https 的网址":`{0}'s url must be an http or https address`,"{0} 的 url 太长了(最多 2048 个字符)":`{0}'s url is too long (2048 characters at most)`,"{0} 的 url 不是一个网址":`{0}'s url is not an address`,"{0} 的 icon 不是表情,也不是图标页签里的图标,没有显示":`{0}'s icon is no emoji nor an icon of the Icons tab, so it is not shown`,"{0} 的 children 要是一个列表":`{0}'s children must be a list`,"没有 sidebar.json":`No sidebar.json`,"读不出这个文件:{0}":`The file can't be read: {0}`,"sidebar.json 不是一个文件":`sidebar.json is not a file`,添加在线网页:`Add a web page`,"添加在线网页…":`Add a web page…`,"添加其他 Gallery 项目":`Add another Gallery project`,"添加其他 Gallery 项目…":`Add another Gallery project…`,"粘贴工作区的文件夹、doc.html 或它所在的文件夹":`Paste a workspace's folder, a doc.html or its folder`,本机没有登记别的工作区:`No other workspace is registered on this computer`,复制本地路径:`Copy local path`,"别的工作区,或其中的一篇文档:文件不动":`Another workspace, or one of its documents: no file moves`,从侧边栏移除:`Remove from sidebar`,"只是不在这里显示,工作区和文件都不动":`It is only no longer shown here: the workspace and its files stay`,"里面的条目回到「{0}」,不删除任何文件":`Its entries go back to “{0}”; no file is deleted`,"复制本地路径、移除等…":`Copy local path, remove and more…`,"已从侧边栏移除「{0}」,文件都没动":`Removed “{0}” from the sidebar; no file moved`,"已从侧边栏移除「{0}」,拖进去的 {1} 项回到了「{2}」,文件都没动":`Removed “{0}” from the sidebar: the {1} entries dragged into it went back to “{2}”; no file moved`,"已删除「{0}」栏,里面的 {1} 项回到了「{2}」":`Removed the column “{0}”: its {1} entries went back to “{2}”`,已复制本地路径:`Local path copied`,这就是当前的工作区:`This is the current workspace`,"侧边栏最多 {0} 栏,放不下这个工作区了":`The sidebar holds {0} columns at most: there is no room for this workspace`,默认文档:`Default documents`,"这不是 Gallery 的底稿或工作区,可以用「导入」把文件复制进来":`This is no Gallery draft or workspace: Import copies a file in`,"这份底稿不在它工作区的第一层(在回收区里,或是写作偏好),不能添加":`This draft is not at the top of its workspace (it is in the trash, or the writing preferences): it can't be added`,"这个文件夹的名字不是 Gallery 文档的写法(小写字母、数字和连字符),不能添加":`This folder's name is not a Gallery document's (lowercase letters, digits and hyphens): it can't be added`,"这个工作区在系统的临时文件夹里,不能添加":`This workspace is in the system's temporary folder: it can't be added`,"pack.json 的 {0} 要写成一段文字,或 { zh, en } 两种语言的文字":`pack.json's {0} is words, or { zh, en }: words in both languages`,"pack.json 不是 JSON":`pack.json is not JSON`,"pack.json 要写成一张表":`pack.json is to be an object`,"{0} 不是 pack.json 能写的字段":`{0} is not a field pack.json may hold`,"pack.json 缺少 {0}":`pack.json has no {0}`,"pack.json 的 id 只用小写字母、数字和连字符,如 my-cards":`pack.json's id is lowercase letters, digits and hyphens, as my-cards`,"{0} 留给工作区自己的块,块包换一个 id":`{0} is kept for the workspace's own blocks: give the pack another id`,"pack.json 的 version 要写成 1.0.0 这样的三段数字":`pack.json's version is three numbers, as 1.0.0`,"pack.json 的 {0} 要写成一段文字":`pack.json's {0} is words`,"pack.json 的 homepage 要写成 http 或 https 开头的地址":`pack.json's homepage is an address that starts with http or https`,"pack.json 的 icon 要写成一个表情或一两个字":`pack.json's icon is an emoji or a character or two`,"块包太大:最多 {0} 个文件、{1} MB":`The pack is too large: at most {0} files and {1} MB`,"{0} 指向块包外面,不能装":`{0} points outside the pack: not installed`,"最上一层没有 pack.json:块包是一个文件夹,最上一层放 pack.json,每个块一个文件夹":`No pack.json at its top: a block pack is a folder with pack.json at its top and a folder for each block`,"{0} 不是块的文件夹名:只用小写字母、数字和连字符":`{0} is no block's folder name: lowercase letters, digits and hyphens only`,"{0}/ 里没有 component.json":`{0}/ holds no component.json`,"{0}/component.json 不是 JSON":`{0}/component.json is not JSON`,"{0}/component.json 的 id 要写成 {1}":`{0}/component.json's id is to be {1}`,"{0} 是 Gallery 自带的块包用的 id:换一个 id 再装":`{0} is the id of one of Gallery's own packs: give this pack another id`,"工作区里已经有 components/{0}:这个名字被别的块包或别人写的块用着,换一个 id,或先把那个文件夹挪走":`The workspace has components/{0} already, another pack's or blocks someone wrote: give this pack another id, or move that folder away first`,"{0} 是 Gallery 自带的块包,不能删除:在 设置 › 组件列表 里把它关掉":`{0} is one of Gallery's own packs and can't be removed: turn it off in Settings › Components`,"工作区里没有块包 {0}":`The workspace has no pack {0}`,"components/{0} 不是装进来的块包,里面的块是有人在这个工作区写的:要删就自己删掉这个文件夹":`components/{0} is no pack an install put in: its blocks were written in this workspace, and are someone's; delete the folder yourself if you mean to`,"pack.json 的 id 是 {0},它的文件夹却是 components/{1}":`pack.json's id is {0}, but its folder is components/{1}`,"{0} 读不出来:不是完好的 zip":`{0} can't be read: not a whole zip`,"找不到 {0}":`{0} was not found`,"{0} 不是文件夹,也不是 zip":`{0} is neither a folder nor a zip`,"选的文件不是 zip":`The file chosen is not a zip`,没有这个块包:`No such block pack`,"粘贴块包的文件夹或 zip 的路径":`Paste the path of the pack's folder or zip`},ie={zh:`中文`,en:`English`},ae=y.language;function oe(){try{let e=globalThis.localStorage?.getItem(ae);return Object.hasOwn(ie,e??``)?e:null}catch{return null}}function se(e,t){return e??(/^zh\b/i.test(t??`zh`)?`zh`:`en`)}var ce=se(oe(),globalThis.navigator?.language),le=ce;function ue(e){if(Object.hasOwn(ie,e))try{globalThis.localStorage?.setItem(ae,e)}catch{}}function O(e,...t){let n=/^([\s\S]*)@[a-z]+$/.exec(e)?.[1]??e;return de(le===`en`?re[e]??n:n,t)}var de=(e,t)=>t.length===0?e:e.replace(/\{(\d+)\}/g,(e,n)=>n<t.length?String(t[n]):e);function fe(e){return typeof e?.text==`string`&&Array.isArray(e.values)?O(e.text,...e.values):typeof e?.message==`string`&&e.message?O(e.message):null}var pe=y.theme,me=window.matchMedia(`(prefers-color-scheme: dark)`),he=d({picked:(e=>e===`light`||e===`dark`?e:null)(v.get(pe)),systemDark:me.matches}),ge=e=>e.picked??(e.systemDark?`dark`:`light`),_e=e=>ge(e)===`dark`;function ve(){let{picked:e}=he.get();e?document.documentElement.setAttribute(`data-theme`,e):document.documentElement.removeAttribute(`data-theme`)}ve(),he.subscribe(ve),me.addEventListener(`change`,()=>he.set(e=>({...e,systemDark:me.matches})));function ye(e){v.set(pe,e),he.set(t=>({...t,picked:e}))}var be={light:{label:O(`浅色`),icon:`sun`},dark:{label:O(`深色`),icon:`moon`}},xe=e=>e===`light`?`dark`:`light`,k=()=>ye(xe(ge(he.get()))),A=o(),Se=[];function Ce(e){let t={close:e};return Se.push(t),()=>{let e=Se.indexOf(t);e>=0&&Se.splice(e,1)}}function we(){let e=Se.at(-1);return e?(e.close(),!0):!1}var Te=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),j=e(((e,t)=>{t.exports=Te()}))(),M=d(null);function Ee(e){return M.get()?.resolve(M.get().cancelId),new Promise(t=>M.set({...e,resolve:t}))}var De=e=>{let t=M.get();t&&(M.set(null),t.resolve(e))};function Oe(){let e=f(M),t=(0,l.useRef)(null);return(0,l.useEffect)(()=>{if(e)return t.current?.querySelector(`button[data-primary]`)?.focus(),Ce(()=>De(e.cancelId))},[e]),e?(0,A.createPortal)((0,j.jsx)(`div`,{className:`modal dialog-overlay`,onPointerDown:t=>{t.target===t.currentTarget&&De(e.cancelId)},children:(0,j.jsxs)(`div`,{className:`dialog`,role:`alertdialog`,"aria-modal":`true`,"aria-label":e.title,ref:t,children:[(0,j.jsx)(`div`,{className:`dialog-title`,children:e.title}),e.message&&(0,j.jsx)(`div`,{className:`dialog-message`,children:e.message}),(0,j.jsx)(`div`,{className:`dialog-actions`,children:e.actions.map(e=>(0,j.jsx)(`button`,{className:h(`dialog-btn`,e.primary&&`primary`,e.danger&&`danger`),"data-primary":e.primary||void 0,onClick:()=>De(e.id),children:e.label},e.id))})]})}),document.body):null}var ke=270,Ae=y.sidebar,je=window.matchMedia(`(max-width: 768px)`),Me=v.get(Ae),Ne=d({expanded:Me?.expanded??!0,width:m(Me?.width??ke,216,480),peek:!1,mobile:je.matches,mobileOpen:!1}),Pe=e=>Ne.set(t=>({...t,...e})),Fe=``;Ne.subscribe(()=>{let{expanded:e,width:t}=Ne.get(),n=JSON.stringify({expanded:e,width:t});n!==Fe&&(Fe=n,v.set(Ae,{expanded:e,width:t}))}),je.addEventListener(`change`,()=>Pe({mobile:je.matches,mobileOpen:!1,peek:!1}));var Ie=0,Le=0,Re=!1;function ze(e,{fromClick:t=!1}={}){if(Ne.get().mobile){Pe({mobileOpen:e});return}clearTimeout(Ie),!e&&t&&(Re=!0),Pe({expanded:e,peek:!1})}function Be(){let e=Ne.get();e.mobile?Pe({mobileOpen:!e.mobileOpen}):ze(!e.expanded)}var Ve=e=>Pe({mobileOpen:e}),He=e=>Pe({width:m(e,216,480)});function Ue(){let e=Ne.get();e.mobile||e.expanded||Re||(clearTimeout(Ie),Ie=window.setTimeout(()=>Pe({peek:!0}),60))}function We(){clearTimeout(Ie),Ne.get().peek&&Pe({peek:!1})}var Ge=e=>!!document.getElementById(e)?.matches(`:hover`);function Ke(e=300){clearTimeout(Ie),Ne.get().peek&&(Ie=window.setTimeout(()=>{Le>0||Ge(`sidebar`)||Ge(`tbMenu`)||Ge(`sbEdge`)||We()},e))}function qe(){Ne.get().peek?Ke():clearTimeout(Ie)}var Je=()=>clearTimeout(Ie),Ye=()=>{Re=!1},Xe=()=>Re;function Ze(){Le++;let e=!1;return()=>{e||(e=!0,Le=Math.max(0,Le-1),Ke())}}var Qe={sidebar:`<svg viewBox="0 0 24 24" class="lu"><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M9 3v18"/></svg>`,compose:`<svg viewBox="0 0 24 24" class="lu"><path d="M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"/></svg>`,home:`<svg viewBox="0 0 24 24" class="lu"><path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/><path d="M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></svg>`,board:`<svg viewBox="0 0 24 24" class="lu"><rect width="7" height="9" x="3" y="3" rx="1"/><rect width="7" height="5" x="14" y="3" rx="1"/><rect width="7" height="9" x="14" y="12" rx="1"/><rect width="7" height="5" x="3" y="16" rx="1"/></svg>`,web:`<svg viewBox="0 0 24 24" class="lu"><circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/></svg>`,columnAdd:`<svg viewBox="0 0 24 24" class="lu"><path d="M11 12H3"/><path d="M16 6H3"/><path d="M16 18H3"/><path d="M18 9v6"/><path d="M21 12h-6"/></svg>`,folderClosed:`<svg viewBox="0 0 24 24" class="lu"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.68-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/></svg>`,fileCode:`<svg viewBox="0 0 24 24" class="lu"><path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"/><path d="M14 2v5a1 1 0 0 0 1 1h5"/><path d="M10 12.5 8 15l2 2.5"/><path d="m14 12.5 2 2.5-2 2.5"/></svg>`,folder:`<svg viewBox="0 0 24 24" class="lu"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"/></svg>`,page:`<svg viewBox="0 0 24 24" class="lu"><path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"/><path d="M14 2v5a1 1 0 0 0 1 1h5"/><path d="M10 9H8"/><path d="M16 13H8"/><path d="M16 17H8"/></svg>`,chevron:`<svg viewBox="0 0 16 16"><path d="m6.25 4.25 3.75 3.75-3.75 3.75"/></svg>`,chevronDown:`<svg viewBox="0 0 16 16"><path d="m4.25 6.25 3.75 3.75 3.75-3.75"/></svg>`,plus:`<svg viewBox="0 0 16 16"><path d="M8 3.25v9.5M3.25 8h9.5"/></svg>`,plusLg:`<svg viewBox="0 0 20 20"><path d="M10 4.25v11.5M4.25 10h11.5"/></svg>`,more:`<svg viewBox="0 0 16 16" class="fill"><circle cx="3.25" cy="8" r="1.25"/><circle cx="8" cy="8" r="1.25"/><circle cx="12.75" cy="8" r="1.25"/></svg>`,moreLg:`<svg viewBox="0 0 20 20" class="fill"><circle cx="4.5" cy="10" r="1.4"/><circle cx="10" cy="10" r="1.4"/><circle cx="15.5" cy="10" r="1.4"/></svg>`,handle:`<svg viewBox="0 0 20 20" class="fill"><circle cx="7.5" cy="4" r="1.25"/><circle cx="12.5" cy="4" r="1.25"/><circle cx="7.5" cy="10" r="1.25"/><circle cx="12.5" cy="10" r="1.25"/><circle cx="7.5" cy="16" r="1.25"/><circle cx="12.5" cy="16" r="1.25"/></svg>`,star:`<svg viewBox="0 0 20 20"><path d="m10 3.1 2.1 4.3 4.7.68-3.4 3.3.8 4.7L10 13.87 5.8 16.08l.8-4.7-3.4-3.3 4.7-.68z"/></svg>`,starFill:`<svg viewBox="0 0 20 20" class="solid"><path d="m10 3.1 2.1 4.3 4.7.68-3.4 3.3.8 4.7L10 13.87 5.8 16.08l.8-4.7-3.4-3.3 4.7-.68z"/></svg>`,annotate:`<svg viewBox="0 0 20 20"><path d="M10 16.75A6.75 6.75 0 1 0 3.25 10v5.25a1.5 1.5 0 0 0 1.5 1.5z"/><path d="M7.5 9h5.5M7.5 12h3.5"/></svg>`,starOff:`<svg viewBox="0 0 20 20"><path d="m10 3.1 2.1 4.3 4.7.68-3.4 3.3.8 4.7L10 13.87 5.8 16.08l.8-4.7-3.4-3.3 4.7-.68z"/><path d="M3.5 3.5l13 13"/></svg>`,link:`<svg viewBox="0 0 20 20"><g transform="rotate(45 10 10)"><path d="M7 8.5V6a3 3 0 0 1 6 0v2.5M7 11.5V14a3 3 0 0 0 6 0v-2.5M10 7.5v5"/></g></svg>`,trash:`<svg viewBox="0 0 20 20"><path d="M3.75 5.75h12.5M8 5.75V4.5a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v1.25M5.25 5.75l.7 9.6a1.5 1.5 0 0 0 1.5 1.4h5.1a1.5 1.5 0 0 0 1.5-1.4l.7-9.6"/></svg>`,duplicate:`<svg viewBox="0 0 20 20"><rect x="6.75" y="6.75" width="9.5" height="9.5" rx="1.75"/><path d="M13.25 6.75v-1.5a1.5 1.5 0 0 0-1.5-1.5h-6.5a1.5 1.5 0 0 0-1.5 1.5v6.5a1.5 1.5 0 0 0 1.5 1.5h1.5"/></svg>`,rename:`<svg viewBox="0 0 20 20"><path d="M12.6 4.4a1.7 1.7 0 0 1 2.4 2.4l-7.6 7.6-3.15.75.75-3.15z"/><path d="m11.25 5.75 2.4 2.4"/></svg>`,moveTo:`<svg viewBox="0 0 20 20"><path d="M4 15.5V12a3.5 3.5 0 0 1 3.5-3.5h8.25"/><path d="m12.5 5.25 3.25 3.25-3.25 3.25"/></svg>`,restore:`<svg viewBox="0 0 20 20"><path d="M4.6 8.25A5.75 5.75 0 1 1 5.9 14"/><path d="M4.25 4.5v3.9h3.9"/></svg>`,sun:`<svg viewBox="0 0 20 20"><circle cx="10" cy="10" r="3.25"/><path d="M10 2.75v1.5M10 15.75v1.5M2.75 10h1.5M15.75 10h1.5M4.87 4.87l1.06 1.06M14.07 14.07l1.06 1.06M4.87 15.13l1.06-1.06M14.07 5.93l1.06-1.06"/></svg>`,moon:`<svg viewBox="0 0 20 20"><path d="M15.9 12.2A6.5 6.5 0 0 1 7.8 4.1a6.5 6.5 0 1 0 8.1 8.1z"/></svg>`,external:`<svg viewBox="0 0 20 20"><path d="M11.5 3.75h4.75V8.5M16 4 9.5 10.5"/><path d="M14.25 11.5v3a1.75 1.75 0 0 1-1.75 1.75h-7A1.75 1.75 0 0 1 3.75 14.5v-7A1.75 1.75 0 0 1 5.5 5.75h3"/></svg>`,importIn:`<svg viewBox="0 0 20 20"><path d="M10 3.75v9M6.25 9.25 10 13l3.75-3.75M4.25 16.25h11.5"/></svg>`,exportOut:`<svg viewBox="0 0 20 20"><path d="M10 13.25v-9M6.25 7.75 10 4l3.75 3.75M4.25 16.25h11.5"/></svg>`,upload:`<svg viewBox="0 0 20 20"><path d="M10 12.75v-9M6.25 7.5 10 3.75l3.75 3.75"/><path d="M3.75 12.5v2.25c0 .83.67 1.5 1.5 1.5h9.5c.83 0 1.5-.67 1.5-1.5V12.5"/></svg>`,settings:`<svg viewBox="0 0 24 24" class="lu"><path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"/><circle cx="12" cy="12" r="3"/></svg>`,guide:`<svg viewBox="0 0 24 24" class="lu"><path d="M12 5v16"/><path d="M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z"/></svg>`,blocks:`<svg viewBox="0 0 20 20"><rect x="3.75" y="3.75" width="5.25" height="5.25" rx="1.25"/><rect x="11" y="3.75" width="5.25" height="5.25" rx="1.25"/><rect x="3.75" y="11" width="5.25" height="5.25" rx="1.25"/><rect x="11" y="11" width="5.25" height="5.25" rx="1.25"/></svg>`,language:`<svg viewBox="0 0 20 20"><circle cx="10" cy="10" r="6.75"/><path d="M3.5 10h13M10 3.25c1.85 1.85 2.75 4.1 2.75 6.75S11.85 14.9 10 16.75C8.15 14.9 7.25 12.65 7.25 10S8.15 5.1 10 3.25z"/></svg>`,frame:`<svg viewBox="0 0 20 20"><rect x="3.75" y="4.75" width="12.5" height="10.5" rx="2" stroke-dasharray="2.6 2.2"/></svg>`,bell:`<svg viewBox="0 0 20 20"><path d="M5.25 13.75V9.5a4.75 4.75 0 0 1 9.5 0v4.25l1.25 1.5H4z"/><path d="M8.5 17.25h3"/></svg>`,diff:`<svg viewBox="0 0 20 20"><path d="M10 3v10M4.5 8h11M4.5 17h11"/></svg>`,outline:`<svg viewBox="0 0 20 20"><path d="M3.75 5.25h12.5M7.25 10h9M7.25 14.75h9"/></svg>`,fullWidth:`<svg viewBox="0 0 20 20"><path d="M3 10h14M6 7l-3 3 3 3M14 7l3 3-3 3"/></svg>`,download:`<svg viewBox="0 0 20 20"><path d="M10 3.75v9M6.25 9.25 10 13l3.75-3.75"/><path d="M3.75 13.5v1.25c0 .83.67 1.5 1.5 1.5h9.5c.83 0 1.5-.67 1.5-1.5V13.5"/></svg>`,save:`<svg viewBox="0 0 20 20"><path d="M4.75 3.75h8.5l3 3v8.5a1 1 0 0 1-1 1h-10.5a1 1 0 0 1-1-1v-10.5a1 1 0 0 1 1-1z"/><path d="M7 3.75v3.5h5.5v-3.5M6.75 16.25v-4.5h6.5v4.5"/></svg>`,smile:`<svg viewBox="0 0 20 20"><circle cx="10" cy="10" r="6.75"/><path d="M7.5 11.75c.6.8 1.5 1.25 2.5 1.25s1.9-.45 2.5-1.25"/><path d="M7.75 8.25v.5M12.25 8.25v.5"/></svg>`,search:`<svg viewBox="0 0 24 24" class="lu"><path d="m21 21-4.34-4.34"/><circle cx="11" cy="11" r="8"/></svg>`,check:`<svg viewBox="0 0 16 16"><path d="m3.5 8.5 3 3 6-7"/></svg>`,collapseAll:`<svg viewBox="0 0 20 20"><path d="M6.5 4.5 10 8l3.5-3.5M6.5 15.5 10 12l3.5 3.5"/></svg>`,expandAll:`<svg viewBox="0 0 20 20"><path d="M6.5 7.5 10 4l3.5 3.5M6.5 12.5 10 16l3.5-3.5"/></svg>`,tri:`<svg viewBox="0 0 12 12" class="fill"><path d="M4 2.2 9 6l-5 3.8z"/></svg>`,convert:`<svg viewBox="0 0 20 20"><path d="M4.25 8.5V6.5c0-.97.78-1.75 1.75-1.75h9.25"/><path d="m13 2.5 2.25 2.25L13 7"/><path d="M15.75 11.5v2c0 .97-.78 1.75-1.75 1.75H4.75"/><path d="M7 13l-2.25 2.25L7 17.5"/></svg>`,color:`<svg viewBox="0 0 20 20"><rect x="3.5" y="3" width="11" height="4.75" rx="1.25"/><path d="M14.5 5.4h1.25c.41 0 .75.34.75.75v2.6c0 .41-.34.75-.75.75H10v2.25"/><rect x="8.75" y="11.75" width="2.5" height="5.5" rx=".9"/></svg>`,suggest:`<svg viewBox="0 0 20 20"><path d="M16.25 10.5v3.25c0 .83-.67 1.5-1.5 1.5H8.5l-3.75 2.5v-2.5c-.83 0-1.5-.67-1.5-1.5v-8c0-.83.67-1.5 1.5-1.5h5"/><path d="m14.4 2.6 2.5 2.5-5.4 5.4-3.1.6.6-3.1z"/></svg>`,ai:`<svg viewBox="0 0 20 20"><path d="M9 3c.55 3.4 2.35 5.2 5.75 5.75C11.35 9.3 9.55 11.1 9 14.5 8.45 11.1 6.65 9.3 3.25 8.75 6.65 8.2 8.45 6.4 9 3z"/><path d="M15.25 12.5v4.5M13 14.75h4.5"/></svg>`,tText:`<svg viewBox="0 0 20 20"><path d="M5 5h10M10 5v10.5"/></svg>`,tPage:`<svg viewBox="0 0 20 20"><path d="M5.75 2.75h5.5l3.5 3.5v9.5a1.5 1.5 0 0 1-1.5 1.5h-7.5a1.5 1.5 0 0 1-1.5-1.5V4.25a1.5 1.5 0 0 1 1.5-1.5z"/><path d="M11 2.75v3c0 .41.34.75.75.75h3"/></svg>`,tPageIn:`<svg viewBox="0 0 20 20"><path d="M9.75 17.25h-4a1.5 1.5 0 0 1-1.5-1.5V4.25a1.5 1.5 0 0 1 1.5-1.5h5l3.5 3.5v3.5"/><path d="M10.5 2.75v3c0 .41.34.75.75.75h3"/><path d="M12 14.75h5M14.75 12.5 17 14.75 14.75 17"/></svg>`,tBullet:`<svg viewBox="0 0 20 20"><path d="M8.25 6.5h8.5M8.25 13.5h8.5"/><circle cx="4.5" cy="6.5" r="1.1" fill="currentColor" stroke="none"/><circle cx="4.5" cy="13.5" r="1.1" fill="currentColor" stroke="none"/></svg>`,tNumber:`<svg viewBox="0 0 20 20"><path d="M8.75 6.5h8M8.75 14h8"/><path d="M3.6 4.4 4.7 3.8V8" stroke-width="1.2"/><path d="M3.4 12.2a1.1 1.1 0 0 1 2.1.4c0 .8-2.1 1.8-2.1 3h2.2" stroke-width="1.2"/></svg>`,tTodo:`<svg viewBox="0 0 20 20"><path d="m3.25 6.25 1.5 1.5 2.5-3"/><rect x="3.25" y="11.75" width="4" height="4" rx=".9"/><path d="M9.75 6.25h7M9.75 13.75h7"/></svg>`,tToggle:`<svg viewBox="0 0 20 20"><path d="M3.5 4.25 6.75 6.5 3.5 8.75z" fill="currentColor" stroke="none"/><path d="M3.5 11.25l3.25 2.25-3.25 2.25z" fill="currentColor" stroke="none"/><path d="M9.5 6.5h7.25M9.5 13.5h7.25"/></svg>`,tCode:`<svg viewBox="0 0 20 20"><path d="M6.75 6 2.75 10l4 4M13.25 6l4 4-4 4M11.25 4.25l-2.5 11.5"/></svg>`,tCallout:`<svg viewBox="0 0 20 20"><rect x="3.25" y="3.25" width="13.5" height="13.5" rx="2.5"/><path d="M7 7.25h6M10 7.25v5.75"/></svg>`,tEquation:`<svg viewBox="0 0 20 20"><rect x="3.25" y="3.25" width="13.5" height="13.5" rx="2.5"/><path d="M13 6.75H7.5l2.75 3.25L7.5 13.25H13"/></svg>`,tSynced:`<svg viewBox="0 0 20 20"><path d="M3.25 5.25h10M3.25 9.25h5"/><path d="M16.75 13.25a3.25 3.25 0 0 0-5.9-1.4"/><path d="M10.5 15.25a3.25 3.25 0 0 0 5.9 1.4"/><path d="M10.6 9.9v2.1h2.1M16.65 18.6v-2.1h-2.1"/></svg>`,textFormat:`<svg viewBox="0 0 20 20"><path d="M2.75 15.5 6.6 4.75h.8l3.85 10.75M4.1 11.75h5.8"/><circle cx="14.6" cy="12.75" r="2.6"/><path d="M17.2 9.9v5.6"/></svg>`,present:`<svg viewBox="0 0 20 20"><rect x="2.75" y="3.25" width="14.5" height="9.5" rx="1.5"/><path d="M10 12.75v2.5M6.75 17l3.25-1.75L13.25 17"/><path d="m8.5 6.25 3 1.75-3 1.75z" fill="currentColor" stroke="none"/></svg>`,pointer:`<svg viewBox="0 0 20 20"><path d="M5.4 4.3c-.1-.7.6-1.1 1.2-.8l8.5 5.2c.6.4.5 1.3-.2 1.4l-3.3.6c-.3.1-.6.3-.7.6l-1.5 3.1c-.3.7-1.3.6-1.4-.1z"/></svg>`,minus:`<svg viewBox="0 0 16 16"><path d="M3.25 8h9.5"/></svg>`,laser:`<svg viewBox="0 0 20 20"><circle cx="10" cy="10" r="2.5" fill="currentColor" stroke="none"/><path d="M10 3v2M10 15v2M3 10h2M15 10h2M5.05 5.05l1.4 1.4M13.55 13.55l1.4 1.4M5.05 14.95l1.4-1.4M13.55 6.45l1.4-1.4"/></svg>`,pen:`<svg viewBox="0 0 20 20"><path d="M12.75 4.25 15.75 7.25 7.5 15.5l-3.75.75.75-3.75z"/><path d="m11 6 3 3"/></svg>`,marker:`<svg viewBox="0 0 20 20"><path d="m11.25 4 4.75 4.75-6.5 6.5H7.25l-1.5-1.5v-2.25z"/><path d="M5.75 13.75 3.75 16.25h4"/><path d="m9.25 6 4.75 4.75"/></svg>`,eraser:`<svg viewBox="0 0 20 20"><path d="M8.25 16.25 3.75 11.75a1.5 1.5 0 0 1 0-2.1l6-6a1.5 1.5 0 0 1 2.1 0l4.5 4.5a1.5 1.5 0 0 1 0 2.1l-6.15 6z"/><path d="M8.25 16.25h8M6.5 7l6.5 6.5"/></svg>`,chevronUp:`<svg viewBox="0 0 16 16"><path d="m4.25 9.75 3.75-3.75 3.75 3.75"/></svg>`,close:`<svg viewBox="0 0 20 20"><path d="m5.5 5.5 9 9M14.5 5.5l-9 9"/></svg>`};function N({name:e}){return(0,j.jsx)(`span`,{className:`ic`,dangerouslySetInnerHTML:{__html:Qe[e]}})}function $e({icon:e,slug:t,fallback:n=`page`}){if(!e)return(0,j.jsx)(N,{name:n});if(e.startsWith(`data:image/`))return(0,j.jsx)(`img`,{className:`page-icon site-icon`,src:e,alt:``,draggable:!1});let r=t&&!t.startsWith(`~`)?t:void 0,i=`/__gallery/edit/icon?${new URLSearchParams(r?{value:e,slug:r}:{value:e})}`;return e.startsWith(`/icons/`)?(0,j.jsx)(`span`,{className:`glyph-icon`,"data-icon":e,style:{WebkitMaskImage:`url("${i}")`,maskImage:`url("${i}")`}}):(0,j.jsx)(`img`,{className:`page-icon`,src:i,alt:``,draggable:!1})}var et=e=>typeof e==`string`?(0,j.jsx)(N,{name:e}):e;function tt({entry:e,active:t,open:n,onClick:r,onMouseMove:i,onMouseLeave:a,rowRef:o}){return(0,j.jsxs)(`div`,{ref:o,className:h(`menu-item`,e.danger&&`danger`,e.disabled&&`off`,t&&!e.disabled&&`active`),role:`menuitem`,"aria-disabled":e.disabled||void 0,"aria-haspopup":e.submenu?`menu`:void 0,"aria-expanded":e.submenu?!!n:void 0,"data-key":e.key,"data-tip":e.tip,onClick:r,onMouseMove:i,onMouseLeave:a,children:[(0,j.jsx)(`span`,{className:`mi-icon`,children:et(e.icon)}),e.detail?(0,j.jsxs)(`span`,{className:`mi-label`,children:[(0,j.jsx)(`span`,{className:`mi-line`,children:e.label}),(0,j.jsx)(`span`,{className:`mi-line mi-detail`,children:e.detail})]}):(0,j.jsx)(`span`,{className:`mi-label`,children:e.label}),e.kbd!=null&&e.kbd!==``&&(0,j.jsx)(`span`,{className:`mi-kbd`,children:e.kbd}),(e.arrow||e.submenu)&&(0,j.jsx)(`span`,{className:`mi-arrow`,children:(0,j.jsx)(N,{name:`chevron`})}),e.check&&(0,j.jsx)(`span`,{className:`mi-check`,children:(0,j.jsx)(N,{name:`check`})})]})}function nt({entry:e,children:t}){switch(e.kind){case`sep`:return(0,j.jsx)(`div`,{className:`menu-sep`});case`head`:return(0,j.jsx)(`div`,{className:`menu-head`,children:e.label});case`foot`:return(0,j.jsx)(`div`,{className:`menu-foot`,children:e.content});case`note`:return(0,j.jsx)(`div`,{className:`menu-note`,children:e.content});case`empty`:return(0,j.jsx)(`div`,{className:`menu-empty`,children:e.label});default:return(0,j.jsx)(j.Fragment,{children:t})}}function rt({entry:e,active:t,onMouseMove:n,onMouseLeave:r,rowRef:i}){let[a,o]=(0,l.useState)(e.value);return(0,j.jsxs)(`div`,{ref:i,className:h(`menu-item`,t&&`active`),role:`menuitemcheckbox`,"aria-checked":a,"data-key":e.key,"data-tip":e.tip,onClick:()=>{o(!a),e.onChange(!a)},onMouseMove:n,onMouseLeave:r,children:[(0,j.jsx)(`span`,{className:`mi-icon`,children:et(e.icon)}),(0,j.jsx)(`span`,{className:`mi-label`,children:e.label}),(0,j.jsx)(`span`,{className:h(`mi-switch`,a&&`on`),children:(0,j.jsx)(`span`,{})})]})}var it=`input, textarea, select, [contenteditable="true"]`,at=e=>(e.kind===void 0||e.kind===`item`||e.kind===`switch`)&&!(e.kind!==`switch`&&e.disabled),ot=e=>!!(e&&(e.kind===void 0||e.kind===`item`)&&e.submenu);function st(e,t){let n=t.getBoundingClientRect(),r=e.offsetWidth,i=e.offsetHeight,a=n.right;a+r>innerWidth-8&&(a=n.left-r);let o=n.top;o+i>innerHeight-12&&(o=n.bottom-i),e.style.left=`${m(a,8,Math.max(8,innerWidth-r-8))}px`,e.style.top=`${m(o,8,Math.max(8,innerHeight-i-8))}px`}function ct(e){if(!e?.querySelector(`[data-own-keys]`))return!1;let t=e.querySelector(`[data-menu-focus]`)??e.querySelector(`button`);return t?.focus({preventScroll:!0}),!!t}function lt({entry:e,row:t,onEnter:n,elRef:r,keyboard:i,menu:a}){return(0,l.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let n=()=>st(e,t);n();let i=new ResizeObserver(n);return i.observe(e),()=>i.disconnect()},[t]),(0,l.useLayoutEffect)(()=>{let e=r.current;return i&&ct(e),()=>{let t=document.activeElement;e&&t&&(e.contains(t)||t===document.body)&&a()?.focus({preventScroll:!0})}},[]),(0,A.createPortal)((0,j.jsx)(`div`,{ref:r,className:h(`menu`,`menu-sub`,e.submenuClass),role:`menu`,onMouseEnter:n,onMouseDown:e=>{e.target.closest(it)||e.preventDefault()},children:e.submenu?.()}),document.body)}function ut({entries:e,onDone:t,scrolled:n=0}){let[r,i]=(0,l.useState)(-1),[a,o]=(0,l.useState)(null),s=(0,l.useRef)([]),c=(0,l.useRef)(0),u=(0,l.useRef)(-1),d=(0,l.useRef)(null),f=(0,l.useRef)({active:r});f.current={active:r};let p=(0,l.useRef)(null),m=(0,l.useRef)(!1),h=(e,t=!1)=>{p.current=e,m.current=t,o(e)};(0,l.useEffect)(()=>()=>clearTimeout(c.current),[]),(0,l.useEffect)(()=>a===null?void 0:Ce(()=>h(null)),[a]);let g=(e,t=!1)=>{clearTimeout(c.current),i(e),h(e,t)},_=t=>{if(i(t),clearTimeout(c.current),p.current===t)return;let n=ot(e[t]);c.current=window.setTimeout(()=>h(n?t:null),n?120:100)},v=t=>({active:r===t,rowRef:e=>{s.current[t]=e},onMouseMove:()=>{u.current!==t&&(u.current=t,_(t))},onMouseLeave:()=>{u.current===t&&(u.current=-1,ot(e[t])||i(e=>e===t?-1:e))}}),y=(0,l.useRef)(null),b=(0,l.useRef)(null);(0,l.useLayoutEffect)(()=>{let e=s.current.find(Boolean)?.closest(`.menu`);if(!e)return;y.current=e;let t=document.activeElement;t instanceof HTMLIFrameElement||(t&&t!==document.body&&!e.contains(t)&&(b.current=t),e.tabIndex=-1,e.focus({preventScroll:!0}))},[]),(0,l.useEffect)(()=>()=>{if(y.current?.isConnected)return;let e=document.activeElement;(!e||e===document.body||y.current?.contains(e)||d.current?.contains(e))&&b.current?.isConnected&&b.current.focus({preventScroll:!0})},[]),(0,l.useEffect)(()=>{let t=e.map((e,t)=>at(e)?t:-1).filter(e=>e>=0),n=n=>{if(n.ctrlKey||n.metaKey||n.altKey||!t.length)return;let r=n.target,a=s.current.find(Boolean)?.closest(`.menu`);if(!r||!(a?.contains(r)||d.current?.contains(r))||r.closest?.(it)||d.current?.contains(r)&&r.closest?.(`[data-own-keys]`))return;let{active:o}=f.current,l=p.current;if(n.key===`ArrowDown`||n.key===`ArrowUp`){let e=n.key===`ArrowDown`?1:-1,r=t.indexOf(o),a=t[r<0?e>0?0:t.length-1:(r+e+t.length)%t.length];clearTimeout(c.current),i(a),l!==null&&l!==a&&h(null),s.current[a]?.scrollIntoView({block:`nearest`})}else if((n.key===`ArrowRight`||n.key===`Enter`)&&o>=0&&ot(e[o])){if(l!==o)g(o,!0);else if(!ct(d.current)&&n.key===`ArrowRight`)return}else if(n.key===`ArrowLeft`&&l!==null)h(null);else if(n.key===`Enter`&&o>=0)s.current[o]?.click();else return;n.preventDefault(),n.stopPropagation()};return window.addEventListener(`keydown`,n,!0),()=>window.removeEventListener(`keydown`,n,!0)},[e]);let x=a===null?void 0:e[a],S=e.map((e,n)=>e.kind===void 0||e.kind===`item`?(0,j.jsx)(tt,{entry:e,open:a===n,...v(n),onClick:()=>{e.disabled||(e.submenu?g(n):(t(),e.onSelect?.()))}},n):e.kind===`switch`?(0,j.jsx)(rt,{entry:e,...v(n)},n):(0,j.jsx)(nt,{entry:e},n));return(0,j.jsxs)(j.Fragment,{children:[n>0&&(0,j.jsx)(`div`,{className:`menu-scroll`,children:S.slice(0,n)}),S.slice(n),x&&(x.kind===void 0||x.kind===`item`)&&s.current[a]&&(0,j.jsx)(lt,{entry:x,row:s.current[a],elRef:d,keyboard:m.current,menu:()=>y.current,onEnter:()=>{clearTimeout(c.current),i(a)}},a)]})}var dt=d(null),ft=0,pt=null;function mt(e){ht(),e.anchor.closest(`#sidebar`)&&(pt=Ze()),dt.set({...e,id:++ft})}function ht(){dt.get()&&(dt.set(null),pt?.(),pt=null)}function gt(e){dt.get()?.ownerKey===e.ownerKey?ht():mt(e)}function _t(e,t,n={}){let r={...n,anchor:e,className:h(n.className,`controlled`),content:e=>(0,j.jsx)(ut,{entries:t,onDone:e})};n.ownerKey&&!n.point?gt(r):mt(r)}var vt=e=>f(dt,t=>t?.ownerKey===e);function yt(e,t,n,r){let i=t.getBoundingClientRect(),a=e.offsetWidth,o=e.offsetHeight,s,c;r?(s=r.x+a>innerWidth-8?r.x-a:r.x,c=r.y+o>innerHeight-8?r.y-o:r.y):n===`right-start`?(s=i.right+4,c=i.top-6,s+a>innerWidth-8&&(s=i.left-a-4)):n===`bottom-end`?(s=i.right-a,c=i.bottom+4):n===`top-start`?(s=i.left,c=i.top-o-4):(s=i.left,c=i.bottom+4),!r&&c+o>innerHeight-8&&(c=n===`right-start`?i.bottom-o+6:i.top-o-4),e.style.left=`${m(s,8,Math.max(8,innerWidth-a-8))}px`,e.style.top=`${m(c,8,Math.max(8,innerHeight-o-8))}px`}function bt(){let e=f(dt),t=(0,l.useRef)(null);return(0,l.useLayoutEffect)(()=>{let n=t.current;if(!e||!n)return;let r=()=>yt(n,e.anchor,e.placement??`bottom-start`,e.point);r();let i=new ResizeObserver(r);return i.observe(n),()=>i.disconnect()},[e]),(0,l.useEffect)(()=>{if(!e)return;let n=n=>{let r=n.target;t.current?.contains(r)||e.anchor.contains(r)||r.closest?.(`.menu-sub`)||ht()};document.addEventListener(`pointerdown`,n,!0),window.addEventListener(`resize`,ht),window.addEventListener(`blur`,ht);let r=Ce(ht),i=Ne.get().expanded,a=Ne.subscribe(()=>{let{expanded:e}=Ne.get();e!==i&&ht(),i=e});return()=>{document.removeEventListener(`pointerdown`,n,!0),window.removeEventListener(`resize`,ht),window.removeEventListener(`blur`,ht),r(),a()}},[e]),e?(0,A.createPortal)((0,j.jsx)(`div`,{ref:t,className:h(`menu`,e.className),role:`menu`,children:e.content(ht)},e.id),document.body):null}var xt=y.preferences,St={editFrame:!1,quietNotices:!1,showChanges:!0,outlineWidth:0,outlineCollapsed:!1};function Ct(){try{let e=JSON.parse(globalThis.localStorage?.getItem(xt)??`{}`);return e&&typeof e==`object`?e:{}}catch{return{}}}function wt(e){let t=Ct()[e];return typeof t==typeof St[e]&&(typeof t!=`number`||Number.isFinite(t))?t:St[e]}function Tt(e,t){if(Object.hasOwn(St,e))try{let n=typeof St[e]==`number`?Number.isFinite(Number(t))?Number(t):St[e]:!!t,r=Object.fromEntries(Object.entries(Ct()).filter(([e])=>Object.hasOwn(St,e)));globalThis.localStorage?.setItem(xt,JSON.stringify({...r,[e]:n}))}catch{}}var Et=y.outlineOpen;b.preferences,b.outlineOpen;function Dt(){try{let e=JSON.parse(globalThis.localStorage?.getItem(Et)??`[]`);return Array.isArray(e)?e.filter(e=>typeof e==`string`&&e!==``):[]}catch{return[]}}function Ot(e){return typeof e==`string`&&e!==``&&Dt().includes(e)}function kt(e,t){if(typeof e==`string`&&e!==``)try{let n=Dt().filter(t=>t!==e);t&&n.push(e),globalThis.localStorage?.setItem(Et,JSON.stringify(n.slice(-100)))}catch{}}var At=d({id:0,message:``,visible:!1}),jt=d(0),Mt=8;function P(e,{routine:t=!1,...n}={}){t&&wt(`quietNotices`)||At.set(t=>({id:t.id+1,message:O(e),action:void 0,onAction:void 0,duration:void 0,tone:void 0,...n,visible:!0}))}function Nt(e){jt.set(e)}function Pt(){At.set(e=>({...e,visible:!1}))}function Ft(){let e=f(At),t=f(jt);return(0,l.useEffect)(()=>{if(!e.visible)return;let t=setTimeout(()=>At.set(e=>({...e,visible:!1})),e.duration??(e.action?5e3:2200));return()=>clearTimeout(t)},[e.id,e.visible,e.action,e.duration]),(0,j.jsxs)(`div`,{className:h(`toast`,e.visible&&`show`,e.tone===`error`&&`error`),role:`status`,style:t?{bottom:t+Mt}:void 0,children:[(0,j.jsx)(`span`,{children:e.message}),e.action&&(0,j.jsx)(`button`,{onClick:()=>{At.set(e=>({...e,visible:!1})),e.onAction?.()},children:e.action})]})}function It(){let e=(0,l.useRef)(null);return(0,l.useEffect)(()=>{let t=e.current,n=0,r=null,i={x:0,y:0},a=()=>{clearTimeout(n),t.classList.remove(`show`),r=null},o=()=>document.body.classList.contains(`dragging`)||document.body.classList.contains(`resizing`)||document.body.classList.contains(`box-selecting`),s=e=>{if(!e.isConnected||o())return;t.replaceChildren();let n=document.createElement(`div`);if(n.textContent=e.dataset.tip??``,t.appendChild(n),e.dataset.sub){let n=document.createElement(`div`);n.className=`sub`,n.textContent=e.dataset.sub,t.appendChild(n)}let r=t.offsetWidth,a=t.offsetHeight,s,c;if(e.dataset.tipPos===`cursor`)s=i.x+12,c=i.y+14;else{let t=e.getBoundingClientRect();s=t.left+t.width/2-r/2,c=t.bottom+6,c+a>innerHeight-8&&(c=t.top-a-6)}t.style.transform=`translate(${m(s,8,innerWidth-r-8)}px, ${m(c,8,innerHeight-a-8)}px)`,t.classList.add(`show`)},c=e=>{i={x:e.clientX,y:e.clientY};let t=e.target.closest(`[data-tip]`);t!==r&&(a(),r=t,t&&(n=window.setTimeout(()=>s(t),Number(t.dataset.tipDelay)||450)))},l=e=>{i={x:e.clientX,y:e.clientY}};return document.addEventListener(`mouseover`,c),document.addEventListener(`mousemove`,l,{passive:!0}),document.addEventListener(`pointerdown`,a,!0),document.addEventListener(`scroll`,a,!0),document.documentElement.addEventListener(`mouseleave`,a),window.addEventListener(`blur`,a),()=>{window.removeEventListener(`blur`,a),document.removeEventListener(`mouseover`,c),document.removeEventListener(`mousemove`,l),document.removeEventListener(`pointerdown`,a,!0),document.removeEventListener(`scroll`,a,!0),document.documentElement.removeEventListener(`mouseleave`,a)}},[]),(0,j.jsx)(`div`,{className:`tip`,ref:e})}var Lt=[`gallery/session`,`html-report-studio/session`],Rt=e=>`gallery-edit:${e}:view`,zt={editing:!1,pending:!1,saving:!1,offline:!1,conflicts:0,unfit:0,changed:!1},Bt=e=>!!e&&typeof e==`object`&&Lt.includes(e.protocol)&&e.v===2&&typeof e.slug==`string`;function Vt(e,{slug:t,pageSlug:n,origin:r=()=>location.origin,onReady:i,onKey:a,onNotice:o,onNoticeRoom:s,onReload:c,onOpen:l,onJump:u,onWorkspace:d,onAnnotationsRemoved:f,onConsent:m}){let h=n??t,g=()=>r()!==location.origin,_=new Set,v={connected:!1,commands:[],flags:zt},y=null,b=null,x=new Map,S=e=>{v={...v,...e},_.forEach(e=>e(v))},C=()=>{y=null,b=null,x.forEach(e=>e({ok:!1,reason:`gone`})),S({connected:!1,reloading:!1,title:void 0,icon:void 0,look:void 0,commands:[],flags:zt,annotations:void 0,card:!1})};function w(){if(!g())try{let t=e.contentDocument;if(!t||t===y)return;y=t,t.defaultView?.addEventListener(`pagehide`,()=>{y===t&&C()},{once:!0})}catch{y=null}}let T=(t,n={},i=1e4)=>{if(!v.connected)return Promise.resolve({ok:!1,reason:`offline`});let a=p();return new Promise(o=>{let s=e=>{x.delete(a),clearTimeout(c),o(e)},c=window.setTimeout(()=>s({ok:!1,reason:`timeout`}),i);x.set(a,s);let l=r();try{if(!l)throw Error(`origin`);e.contentWindow?.postMessage({protocol:b??`gallery/session`,v:2,type:`command`,id:a,slug:h,name:t,...n},l)}catch{s({ok:!1,reason:`gone`})}})},E=t=>{if(t.source!==e.contentWindow||t.origin!==r()||!Bt(t.data)||t.data.slug!==h)return;let n=t.data;if(n.protocol!==`html-report-studio/session`||b!==`gallery/session`)switch(b=n.protocol,n.type){case`ready`:w(),S({connected:!0,reloading:!1,title:n.title??void 0,icon:n.icon??null,look:n.look,commands:n.commands,flags:n.state,annotations:n.annotations,card:n.card??!1}),i(T);break;case`state`:S({flags:n.state,title:n.title??void 0,icon:n.icon??null,look:n.look,annotations:n.annotations,card:n.card??!1});break;case`reply`:x.get(n.id)?.(n);break;case`key`:a(n.key);break;case`notice`:o(n);break;case`noticeRoom`:s?.(n.room);break;case`reload`:S({reloading:!0}),c?.();break;case`open`:l?.(n);break;case`jump`:typeof n.block==`string`&&n.place&&typeof n.place==`object`&&u?.(n.block,n.place);break;case`workspace`:d?.();break;case`annotations-removed`:f?.(n.items);break;case`consent`:typeof n.block==`string`&&m?.(n.block);break;case`bye`:g()&&C()}},D=()=>{if(!g()){try{if(y&&e.contentDocument===y)return}catch{}C()}};return window.addEventListener(`message`,E),e.addEventListener(`load`,D),{subscribe(e){return _.add(e),e(v),()=>{_.delete(e)}},command:T,dispose(){window.removeEventListener(`message`,E),e.removeEventListener(`load`,D),x.forEach(e=>e({ok:!1,reason:`gone`})),_.clear()}}}var Ht={slug:null,connected:!1,commands:[],flags:zt},F=d(Ht),Ut=null;function Wt(e,t){Gt(),Ut={slug:e,conn:t,unsubscribe:t.subscribe(t=>F.set({...t,slug:e}))}}function Gt(e){!Ut||e&&Ut.slug!==e||(Ut.unsubscribe(),Ut.conn.dispose(),Ut=null,F.set(Ht))}var Kt=()=>Ut?.conn??null,qt=(e=F.get())=>e.connected&&(e.flags.pending||e.flags.saving),Jt=(e,t=F.get())=>t.connected&&t.commands.includes(e),I=(e,t,n)=>Ut?Ut.conn.command(e,t,n):Promise.resolve({ok:!1,reason:`offline`});function Yt(e,t){return new Promise(n=>{if(e(F.get())){n(!0);return}let r=setTimeout(()=>{i(),n(!1)},t),i=F.subscribe(()=>{e(F.get())&&(clearTimeout(r),i(),n(!0))})})}var Xt=new WeakMap;async function Zt(){let e=Kt();if(e&&F.get().connected){let t=Xt.get(e);t||(t=e.command(`prepare-close`,{},1500).finally(()=>Xt.delete(e)),Xt.set(e,t)),await t}return!0}var Qt=e=>Xt.get(e)??Promise.resolve(),$t={offline:O(`没有连上本地服务:修改暂存在浏览器里,连上后自动保存`),busy:O(`文件一直在变化(例如 AI 正在写入),稍后会自动再保存`),error:O(`自动保存已停止,请查看文档里的提示`)};async function en(){let e=await I(`save`,{},3e4);return e.ok?!0:(P($t[String(e.outcome??e.reason)]??O(`没有保存成功,请在文档里查看提示`)),!1)}var tn=`docs`,nn=/^(?!ws-[0-9a-f]{6}$)[a-z0-9]+(?:-[a-z0-9]+)*$/,rn=e=>typeof e==`string`&&e.length<=48&&nn.test(e),an=e=>e===`docs`?``:`:${e}`,on=e=>e===``||e.startsWith(`:`),sn=e=>e===``?tn:e.slice(1);function cn(e,t=Math.random){for(;;){let n=`g-${Math.floor(t()*36**4).toString(36).padStart(4,`0`)}`;if(!e.some(e=>e.id===n))return n}}var ln=1048576,un={icon:2*ln,image:10*ln,file:20*ln,embed:20*ln};Math.ceil(Math.max(...Object.values(un))*4/3/ln+1)*ln;var dn={gray:[`#55534E`,`#D3D3D3`],lightgray:[`#A6A299`,`#7F7F7F`],brown:[`#9F6B53`,`#AA755F`],yellow:[`#CB912F`,`#CA8E1B`],orange:[`#D9730D`,`#D87620`],green:[`#448361`,`#2D9964`],blue:[`#337EA9`,`#2E7CD1`],purple:[`#9065B0`,`#8D5BC1`],pink:[`#C14C8A`,`#C94079`],red:[`#D44C47`,`#CD4945`]},fn=Object.keys(dn);RegExp(`^/icons/(?:(tabler)/)?([a-z0-9-]+)_(${fn.join(`|`)})\\.svg$`);var pn=(e,t=null,{tab:n=!1}={})=>`/__gallery/edit/icon?${new URLSearchParams({value:e,...t?{slug:t}:{},...n?{tab:`1`}:{}})}`,[mn,hn]=dn.gray,gn=`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="1 1 22 22" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><style>svg{color:${mn}}@media (prefers-color-scheme:dark){svg{color:${hn}}}</style><path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"/><path d="M14 2v5a1 1 0 0 0 1 1h5"/><path d="M10 9H8"/><path d="M16 13H8"/><path d="M16 17H8"/></svg>`)}`,_n={url:2048,title:200},vn=e=>typeof e==`string`?e.replace(/\s+/g,` `).trim():``;function yn(e){let t=vn(e);if(!t)return{refused:`url`,message:`网址不能是空的`};let n=/^[a-z][a-z0-9+.-]*:/i.test(t)?t:`https://${t}`,r;try{r=new URL(n)}catch{return{refused:`url`,message:`这不是一个网址`}}return r.protocol!==`http:`&&r.protocol!==`https:`?{refused:`scheme`,message:`只能链接 http 或 https 的网址`}:r.hostname?r.href.length>_n.url?{refused:`long`,message:`网址太长了(最多 2048 个字符)`}:{url:r.href}:{refused:`url`,message:`这不是一个网址`}}function bn(e,t){let n;try{n=new URL(e)}catch{return!1}let r=n.hostname.replace(/^\[|\]$/g,``).toLowerCase(),i=n.port||(n.protocol===`https:`?`443`:`80`);return[`127.0.0.1`,`localhost`,`::1`,`0.0.0.0`].includes(r)&&String(t)===i}var xn=/^[A-Za-z0-9._:-]{1,128}$/,Sn=(e,t)=>`~${e}/${t}`;function Cn(e){if(typeof e!=`string`||!e.startsWith(`~`))return null;let t=e.indexOf(`/`);if(t<0)return null;let n=e.slice(1,t),r=e.slice(t+1);return rn(n)&&xn.test(r)?{extension:n,entry:r}:null}function wn(e,t){for(let n of e??[]){if(n.id===t)return n;let e=wn(n.children,t);if(e)return e}return null}var Tn=/(?:[^\p{L}\p{M}\p{N}_]\p{M}*)+/gu,En=/^doc-([a-z][a-z0-9]{7})$/;function Dn(e){let t=3735928559,n=1103547991;for(let r=0;r<e.length;r++)t=Math.imul(t^e.charCodeAt(r),2654435761),n=Math.imul(n^e.charCodeAt(r),1597334677);t=Math.imul(t^t>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909);let r=(n>>>0)%2**21*2**32+(t>>>0);return String.fromCharCode(97+r%26)+Math.floor(r/26).toString(36).padStart(7,`0`).slice(-7)}var On=e=>En.exec(e)?.[1]??Dn(e),kn=e=>En.test(e)?Dn(e):null;function An({slug:e,title:t}){let n=String(t??``).replace(Tn,`-`).replace(/^[-\p{M}]+|-+$/gu,``);return n?`${n}-${On(e)}`:On(e)}var jn=e=>new Map(e.map(e=>[e.slug,An(e)]));function Mn(e,t){if(e.has(t))return t;let n=t.slice(t.lastIndexOf(`-`)+1);for(let t of e.keys())if(On(t)===n)return t;for(let t of e.keys())if(kn(t)===n)return t;return null}var Nn=(e,t)=>Mn(jn(e),t.split(`/`)[0])!==null,Pn=e=>Object.values(e).filter(({instructions:e})=>!e),Fn=`[a-z0-9]+(?:-[a-z0-9]+)*`,In=`(?:doc|report)\\.html`;RegExp(`^\\.\\./(${Fn})/${In}(?:#(.*))?$`),RegExp(`^/generated/(${Fn})\\.html$`),RegExp(`^/(${Fn})/${In}$`);function Ln(e,t=null){let n=e.indexOf(`/`),r=n<0?e:e.slice(0,n),i=n<0?null:e.slice(n+1)||null,a=t&&Mn(t,r);return a?{slug:a,block:i}:null}var Rn=e=>e.querySelector(`main`)??e.body,zn=e=>e.closest(`[data-block-id]`)?.getAttribute(`data-block-id`)??null,Bn=e=>{let t={};for(let n of e.document.querySelectorAll(`[data-doc-sheets]`)){let r=e.DocSheets?.get(n)?.get();typeof r==`string`&&(t[n.getAttribute(`data-doc-sheets`)]=r)}return t};function Vn(e){let t=e.document,n=Rn(t),r=null;if(n){let i=t.createTreeWalker(n,1,t=>{if(t.localName===`dialog`)return 2;let n=t.getBoundingClientRect();if(n.bottom<=0&&n.height>0)return 2;let{position:r}=e.getComputedStyle(t);return r===`fixed`||r===`sticky`?2:1});for(let e=i.nextNode();e;e=i.nextNode()){let t=e.getBoundingClientRect();if(t.height===0||t.top<0)continue;let i=[];for(let t=e;t!==n;t=t.parentElement)i.unshift([...t.parentElement.children].indexOf(t));r={path:i,id:zn(e),at:Math.round(t.top)};break}}return{x:Math.round(e.scrollX),y:Math.round(e.scrollY),top:r,tabs:Bn(e)}}var Hn=()=>({children:{"":[]},favorites:[],groups:[{id:tn}]}),Un=e=>an(typeof e==`string`?e:e.id),Wn=e=>on(e);function Gn(e,t,n=[],r=t){let i=e?.groups?.length?e.groups:[{id:tn}],a=new Set(t),o=new Set,s={"":[]};for(let e of i)s[Un(e)]=[];let c=t=>{let n=(e?.children?.[t]??[]).filter(e=>a.has(e)&&!o.has(e));n.forEach(e=>o.add(e)),(n.length||on(t))&&(s[t]=n),n.forEach(c)};i.forEach(e=>c(Un(e)));let l=i.find(e=>e.role===`links`),u=new Set(n);for(let e of t)o.has(e)||(s[u.has(e)&&l?Un(l):``].push(e),o.add(e));let d=new Set(r);return{children:s,favorites:[...new Set((e?.favorites??[]).filter(e=>d.has(e)))],groups:i}}var Kn=(e,t)=>e.children[t]??[];function qn(e,t){for(let[n,r]of Object.entries(e.children))if(r.includes(t))return n;return null}function Jn(e,t){let n=[],r=qn(e,t);for(;r!==null&&!on(r)&&!n.includes(r);)n.unshift(r),r=qn(e,r);return n}function Yn(e,t){let n=qn(e,t);for(let t=0;n!==null&&!on(n)&&t<1e3;t++)n=qn(e,n);return n===null?null:e.groups.find(e=>Un(e)===n)??null}function Xn(e,t,n){let r=t;for(let t=0;r!==null&&!on(r)&&t<1e3;t++){if(r===n)return!0;r=qn(e,r)}return!1}function Zn(e){let t=[],n=r=>Kn(e,r).forEach(e=>{t.push(e),n(e)});return e.groups.forEach(e=>n(Un(e))),t}function Qn(e,t,n){let r={...e.children};return n.length||on(t)?r[t]=n:delete r[t],{...e,children:r}}function $n(e,t){let n=qn(e,t)??``,r=Kn(e,n),i=r.indexOf(t),a=Kn(e,t),o=Qn(e,n,[...r.slice(0,i),...a,...r.slice(i+1)]);return o=Qn(o,t,[]),{meta:o,parent:n,index:Math.max(0,i)}}function er(e,t,n,r){let i=Kn(e,n).filter(e=>e!==t);return i.splice(r===void 0?i.length:m(r,0,i.length),0,t),Qn(e,n,i)}function tr(e,t,n){if(n.pos!==`root`&&(n.ref===t||Xn(e,n.ref,t)))return null;let r=qn(e,t)??``,i=Qn(e,r,Kn(e,r).filter(e=>e!==t));if(n.pos===`root`){let r=n.column??``;return!on(r)||!e.groups.some(e=>Un(e)===r&&!e.extension&&!e.hidden)?null:er(i,t,r,n.index)}if(n.pos===`inside`)return er(i,t,n.ref);if(n.pos===`inside-start`)return er(i,t,n.ref,0);let a=qn(i,n.ref)??``,o=Kn(i,a).indexOf(n.ref);return er(i,t,a,n.pos===`after`?o+1:o)}function nr(e,t){let n=e.favorites.includes(t)?e.favorites.filter(e=>e!==t):[...e.favorites,t];return{...e,favorites:n}}function rr(e,t,n,r){let i=e.favorites.filter(e=>e!==t),a=n?i.indexOf(n):0;return a<0?a=i.length:n&&r===`after`&&a++,i.splice(a,0,t),{...e,favorites:i}}var ir=e=>cn(e.groups);function ar(e,t,n){if(e.groups.some(e=>e.id===t.id))return null;let r=[...e.groups];return r.splice(n===void 0?r.length:m(n,0,r.length),0,t),{...e,groups:r,children:{...e.children,[Un(t.id)]:[]}}}function or(e,t,n){let r=e.groups.find(e=>e.id===t);if(!r?.hidden)return null;let{hidden:i,...a}=r,o=e.groups.filter(e=>e.id!==t);return o.splice(n===void 0?e.groups.indexOf(r):m(n,0,o.length),0,a),{...e,groups:o}}function sr(e,t,n){let r=n?e.groups.find(e=>e.workspace===n):e.groups.find(e=>e.id===tn),i=Yn(e,t);return!i||r&&r.id===i.id?null:r??(n?{workspace:n}:null)}function cr(e,t,n){let r=n===null?null:n.replace(/\s+/g,` `).trim().slice(0,100),i=e.groups.find(e=>e.id===t);if(!i||i.extension||r===``||(r??void 0)===i.title)return null;let a=e.groups.map(e=>{if(e.id!==t)return e;let{title:n,...i}=e;return r?{...i,title:r}:i});return{...e,groups:a}}function lr(e,t,n){let r=e.groups.findIndex(e=>e.id===t);if(r<0)return null;let i=m(n>r?n-1:n,0,e.groups.length-1);if(i===r)return null;let a=[...e.groups],[o]=a.splice(r,1);return a.splice(i,0,o),{...e,groups:a}}function ur(e,t){let n=e.groups.find(e=>e.id===t);if(!n?.workspace)return[];let r=`~${n.workspace}/`,i=[],a=t=>Kn(e,t).forEach((e,n)=>{e.startsWith(r)?a(e):i.push({slug:e,parent:t,index:n})});return a(Un(t)),i}function dr(e,t){let n=e;for(let{slug:e,parent:r,index:i}of t){let t=qn(n,e);t===null||(on(r)?!n.groups.some(e=>Un(e)===r):qn(n,r)===null)||Xn(n,r,e)||(n=er(Qn(n,t,Kn(n,t).filter(t=>t!==e)),e,r,i))}return n}function fr(e,t,n=!0){let r=/^~(ws-[0-9a-f]{6})\/(.+)$/.exec(t),i=r?e.groups.find(e=>e.workspace===r[1]):void 0;if(!r||!i||i.picked)return e;let a=(i.left??[]).filter(e=>e!==r[2]);n&&a.push(r[2]);let{left:o,...s}=i,c=a.length?{...s,left:a}:s;return{...e,groups:e.groups.map(e=>e===i?c:e)}}function pr(e,t){if(t===`docs`||!e.groups.some(e=>e.id===t&&!e.extension&&!e.hidden))return null;if(e.groups.some(e=>e.id===t&&e.workspace)){let n={...e,groups:e.groups.map(e=>e.id===t?{...e,hidden:!0}:e)};for(let{slug:r,parent:i}of ur(e,t))n=er(Qn(n,i,Kn(n,i).filter(e=>e!==r)),r,``);return n}let n=Un(t),r={...e.children,"":[...Kn(e,``),...Kn(e,n)]};return delete r[n],{...e,children:r,groups:e.groups.filter(e=>e.id!==t)}}var mr={missing:O(`找不到这份文档`),token:O(`令牌失效`),origin:O(`请求来源不对`),host:O(`请求地址不对`),body:O(`请求格式不对`)};async function hr(e){return await e.json().catch(()=>({ok:!1,reason:`server`,message:O(`服务器没有给出结果(HTTP {0})`,e.status)}))}var gr=()=>Error(O(`没有连上 Gallery 的本地服务:运行 gallery open 启动它。`));async function _r(e){let t=await hr(await fetch(`/__gallery/workspace/${e}`,{cache:`no-store`}).catch(()=>{throw gr()}));if(!t.ok)throw Error(fe(t)??mr[t.reason??``]??O(`读取失败({0})`,t.reason));return t}var vr=null;async function yr(e=!1){return e&&(vr=null),vr??=(await _r(`info`)).token,vr}async function L(e,t,n=!0){vr=await yr();let r=await hr(await fetch(`/__gallery/workspace/${e}`,{method:`POST`,headers:{"Content-Type":`application/json`,"X-Gallery-Token":vr},body:JSON.stringify(t)}).catch(()=>{throw gr()}));if(!r.ok&&r.reason===`token`&&n)return vr=null,L(e,t,!1);if(!r.ok)throw Object.assign(Error(fe(r)??mr[r.reason??``]??O(`操作没有成功({0})`,r.reason)),{reason:r.reason,answer:r});return r}var br=()=>_r(`outline`),xr=(e,t)=>L(`outline`,{outline:e,base:t}),Sr=async e=>(await _r(`search?q=${encodeURIComponent(e)}`)).results,Cr=e=>_r(`stats?slug=${encodeURIComponent(e)}`),wr=async(e,t=!1)=>(await _r(`source?slug=${encodeURIComponent(e)}${t?`&kind=page`:``}`)).path,Tr=()=>_r(`components`),Er=e=>L(`components`,e),Dr=(e,t)=>L(`components`,{pack:e,enabled:t}),Or=e=>L(`pack-install`,e);function kr(e){let t=new EventSource(`/__gallery/events`);return t.onmessage=({data:t})=>{String(t).startsWith(`settings `)&&e()},()=>t.close()}var Ar=`gallery-workspace-events`;function jr(e){let t=typeof BroadcastChannel==`function`&&`locks`in navigator?new BroadcastChannel(Ar):null,n=n=>{let r=new EventSource(`/__gallery/events?workspace`),i=n,a=()=>{e(),t?.postMessage(`workspace`)};return r.onmessage=({data:e})=>{String(e).startsWith(`workspace `)&&a()},r.onerror=()=>{i=!0},r.onopen=()=>{i&&(i=!1,a())},()=>r.close()};if(!t)return n(!1);t.onmessage=()=>e();let r=new AbortController,i=e=>new Promise(t=>{if(r.signal.aborted)return t();let i=n(e);r.signal.addEventListener(`abort`,()=>{i(),t()},{once:!0})}),a=!1;return navigator.locks.request(Ar,{ifAvailable:!0},e=>{if(e)return a=!0,i(!1)}).then(()=>a||r.signal.aborted?void 0:navigator.locks.request(Ar,{signal:r.signal},()=>i(!0))).catch(()=>{}),()=>{r.abort(),t.close()}}var Mr=async(e,t)=>(await L(`create`,{title:e,...t,description:O(`新文档`),language:ce})).report,Nr=async(e,t,n)=>(await L(`draft-create`,{ws:e,title:t,...n,description:O(`新文档`),language:ce})).entry,Pr=async()=>(await L(`instructions`,{title:O(`写作偏好`),description:O(`Agent 每次写报告前都会先读的写作偏好`),language:ce})).report,Fr=async e=>(await L(`duplicate`,{slug:e,suffix:O(`(副本)`),untitled:O(`未命名文档`)})).report,Ir=async(e,t)=>(await L(`rename`,{slug:e,title:t})).report,Lr=async(e,t)=>(await L(`look`,{slug:e,look:t})).report,Rr=e=>L(`looks`,{slug:e}),zr=async e=>(await L(`trash`,{slug:e})).entry,Br=async e=>(await L(`elsewhere`,{ws:e})).origin,Vr=async(e,t,n)=>(await L(`draft-command`,{ws:e,name:`rename`,slug:t,title:n})).report,Hr=(e,t,n=!1)=>L(`draft-add`,{path:e,after:t,confirm:n}),Ur=async()=>(await _r(`projects`)).workspaces,Wr=e=>L(`reveal`,e),Gr=async e=>(await L(`link`,e)).link,Kr=async(e,t)=>(await L(`link-set`,{slug:e,...t})).link,qr=async e=>(await L(`trash`,{slug:e,kind:`link`})).entry,Jr=e=>L(`frameable`,{url:e}),Yr=async e=>(await L(`title`,{url:e})).title,Xr=async(e,t)=>(await L(`rename`,{slug:e,title:t,kind:`page`})).page,Zr=async e=>(await L(`trash`,{slug:e,kind:`page`})).entry;async function Qr(e=!0){vr=await yr();let t=await hr(await fetch(`/__gallery/pages/home/cards`,{method:`POST`,headers:{"Content-Type":`application/json`,"X-Gallery-Token":vr},body:JSON.stringify({op:`restore-defaults`})}).catch(()=>{throw gr()}));if(!t.ok&&t.reason===`token`&&e)return vr=null,Qr(!1);if(!t.ok)throw Error(fe(t)??mr[t.reason??``]??O(`操作没有成功({0})`,t.reason));return t}var $r=e=>L(`restore`,{id:e}),ei=e=>L(`destroy`,{id:e}),ti=y.favorites,R=d({status:`loading`,reports:{},meta:Hn(),instructions:null,pages:[],trash:[],workspaces:{},self:null,extensions:[]}),ni=e=>R.set(t=>({...t,...e})),ri=0,ii=null;function z(){return ii??=(async()=>{try{let e=ri,{outline:t,instructions:n,reports:r,pages:i=[],trash:a,workspaces:o={},self:s=null,extensions:c=[]}=await br(),l=v.get(ti)??[],u=Object.keys(r).filter(e=>!r[e].instructions),d=u.filter(e=>r[e].kind===`link`),f=Gn(ri===e?{children:t.children,favorites:l,groups:t.groups}:R.get().meta,u,d);ni({status:`ready`,message:void 0,reports:r,meta:f,instructions:n??null,pages:i,trash:a.map(e=>({...e,kind:e.kind??`document`})),workspaces:o,self:s,extensions:c}),f.favorites.length!==l.length&&v.set(ti,f.favorites)}catch(e){ni({status:`offline`,message:e.message})}finally{ii=null}})(),ii}async function ai(){return ii&&await ii,z()}var oi=0,si=[],ci=()=>oi===0?Promise.resolve():new Promise(e=>si.push(e)),li=Promise.resolve(),ui=3,di=({children:e,groups:t})=>({children:e,groups:t});async function fi(e,t,n,r=ui){try{await xr(n,t)}catch(t){if(t.reason===`stale`&&r>1){await ai();let t=R.get();if(t.status!==`ready`)return;let n=e(t.meta);return!n||n.children===t.meta.children&&n.groups===t.meta.groups?void 0:(ri++,ni({meta:n}),fi(e,di(t.meta),di(n),r-1))}P(O(`目录没有保存:{0}`,t.message)),z()}}function pi(e){let t=R.get().meta,n=e(t);return n?(ni({meta:n}),(n.children!==t.children||n.groups!==t.groups)&&(ri++,oi++,li=li.then(()=>fi(e,di(t),di(n))).catch(()=>{}).finally(()=>{if(--oi>0)return;let e=si;si=[],e.forEach(e=>e())})),n.favorites!==t.favorites&&v.set(ti,n.favorites),!0):!1}var mi=(e,t=O(`未命名文档`))=>(e?.title??``).trim()||t,hi=(e,t=R.get())=>t.reports[e]?.kind===`link`,gi=e=>typeof e==`string`&&e.startsWith(`~`),_i=e=>{let t=/^~(ws-[0-9a-f]{6})\/(.+)$/.exec(e);return t?{ws:t[1],slug:t[2]}:null},vi=(e,t=R.get())=>t.workspaces[e]?.name||e,yi=(e,t=R.get())=>e?.id===`docs`?t.self??void 0:e?.workspace,bi=(e,t=R.get())=>{if(e?.extension)return t.extensions.find(t=>t.id===e.extension)?.title??e.extension;if(e?.title)return e.title;let n=yi(e,t);return n?t.workspaces[n]?.default?O(`默认文档`):t.workspaces[n]?.name||(e?.id===`docs`?O(`文档`):n):e?.role===`links`?O(`链接`):O(`未命名栏`)},xi=(e,t=R.get())=>!e.hidden&&(!e.workspace||t.workspaces[e.workspace]?.there===!0),Si=(e,t=R.get())=>{let n=yi(e,t);return n?t.workspaces[n]?.root??null:null},Ci=(e,t=R.get())=>{let n=yi(e,t);if(!n||e?.title)return null;let r=t.workspaces[n];if(!r||r.default)return null;if(r?.above)return r.above;let i=bi(e,t).toLowerCase();return t.meta.groups.some(n=>n.id!==e.id&&xi(n,t)&&bi(n,t).toLowerCase()===i)?r?.upper??r?.root??null:null},wi=(e,t=R.get())=>t.pages.find(t=>t.slug===e),Ti=e=>(e?.title??``).trim()||e?.slug||O(`未命名页面`),Ei=y.tree;function Di(){let e=v.get(Ei)??{expanded:{},collapsedSections:{}},{reports:t,...n}=e.collapsedSections??{};return{expanded:e.expanded??{},collapsedSections:t===void 0?n:{[tn]:t,...n}}}var Oi=d(Di());Oi.subscribe(()=>v.set(Ei,Oi.get()));var ki=(e,t)=>t===`fav`?`fav:${e}`:e;function Ai(e,t){Oi.set(n=>{if(!!n.expanded[e]===t)return n;let r={...n.expanded};return t?r[e]=!0:delete r[e],{...n,expanded:r}})}var ji=e=>Ai(e,!Oi.get().expanded[e]);function Mi(e){for(let t of Jn(R.get().meta,e))Ai(t,!0)}function Ni(e){Oi.set(t=>({...t,collapsedSections:{...t.collapsedSections,[e]:!t.collapsedSections[e]}}))}function Pi(e){Oi.set(t=>t.collapsedSections[e]?{...t,collapsedSections:{...t.collapsedSections,[e]:!1}}:t)}function Fi(e,t){let{meta:n}=R.get(),r=e===`fav`?`fav`:`tree`,i={...Oi.get().expanded},a=e=>e.forEach(e=>{let o=Kn(n,e),s=ki(e,r);t&&o.length?i[s]=!0:t||delete i[s],a(o)});a(e===`fav`?n.favorites:Kn(n,Un(e))),Oi.set(e=>({...e,expanded:i}))}var Ii=d({current:null,revealNonce:0}),Li=`home`,Ri=e=>`@${e}`,zi=e=>e.startsWith(`@`)&&!e.includes(`/`)?e.slice(1):null,Bi=(e=Ii.get())=>e.current?.kind===`document`?e.current.slug:null,Vi=(e=Ii.get())=>e.current?.kind===`page`?e.current.slug:null,Hi=(e=Ii.get())=>e.current?.kind===`link`?e.current.slug:null,Ui=(e=Ii.get())=>e.current&&e.current.kind!==`page`?e.current.slug:null,Wi=(e,t)=>e?.kind===t?.kind&&e?.slug===t?.slug;function Gi(e,t=R.get()){let n=Cn(e),r=n?t.extensions.find(e=>e.id===n.extension):void 0,i=n&&r?wn(r.entries,n.entry):null;return r&&i?{extension:r,entry:i}:void 0}var Ki=(e,t=R.get())=>{let n=Cn(e);return!!(n&&t.extensions.find(e=>e.id===n.extension)?.error)},qi=(e,t)=>t.kind===`page`?!!wi(t.slug,e):t.kind===`link`?hi(t.slug,e):t.kind===`extension`?!!Gi(t.slug,e)?.entry.url:!!e.reports[t.slug]&&!hi(t.slug,e)&&!e.reports[t.slug].missing,Ji=(e,t)=>qi(e,t)||t.kind===`extension`&&Ki(t.slug,e),Yi=(e,t=R.get())=>({kind:hi(e,t)?`link`:`document`,slug:e}),Xi=()=>{try{return decodeURIComponent(location.hash.slice(1))}catch{return``}};function Zi(){let e=F.get(),t=Pn(R.get().reports).map(t=>t.slug===e.slug&&e.connected&&typeof e.title==`string`?{...t,title:e.title}:t),n=jn(t.filter(e=>!gi(e.slug)));for(let e of t)gi(e.slug)&&n.set(e.slug,Qi(e));return n}function Qi({slug:e,title:t}){let n=_i(e);return n?`~${n.ws}/${An({slug:n.slug,title:t})}`:e}function $i(e){let t=/^~(ws-[0-9a-f]{6})\/([^/]+)(?:\/(.+))?$/.exec(e),n=Zi();if(!t)return Ln(e,new Map([...n].filter(([e])=>!gi(e))));let[,r,i,a=null]=t,o=new Map;for(let[e,t]of n){let n=gi(e)?_i(e):null;n?.ws===r&&o.set(n.slug,t.slice(r.length+2))}let s=Mn(o,i);return s?{slug:`~${r}/${s}`,block:a}:null}function ea(){let e=document.querySelector(`iframe.report-frame:not([data-pending])`)?.contentWindow;try{return e?Vn(e):null}catch{return null}}function ta(e,t){let{slug:n}=e;if(e.kind===`page`){try{t?(history.replaceState({...history.state,view:ea()},``),history.pushState({page:n},``,`#${Ri(n)}`)):history.replaceState({page:n},``,`#${Ri(n)}`)}catch{}return}if(e.kind===`extension`){try{t?(history.replaceState({...history.state,view:ea()},``),history.pushState({extension:n},``,`#${n}`)):history.replaceState({extension:n},``,`#${n}`)}catch{}return}let r=Zi().get(n)??n;try{t?(history.replaceState({...history.state,view:ea()},``),history.pushState({slug:n},``,`#${r}`)):history.replaceState(history.state?.slug===n?{...history.state}:{slug:n},``,`#${r}`)}catch{}}function na(e,t,n){if(Bi()!==e)return;let r=history.state??{};if(r.slug!==e||r.block!==t)try{history.replaceState({...r,slug:e,view:n},``),history.pushState({slug:e,block:t},``,`#${Zi().get(e)??e}`)}catch{}}var ra=e=>window.open(`#${Zi().get(e)??e}`,`_blank`),B=e=>window.open(`#${Ri(e)}`,`_blank`),V=e=>window.open(`#${e}`,`_blank`);function ia(e,t=R.get()){let n=Cn(e),r=n?t.extensions.find(e=>e.id===n.extension):void 0;if(!n||!r)return[];let i=(e,t)=>{for(let r of e){if(r.id===n.entry)return t;let e=i(r.children??[],[...t,r]);if(e)return e}return null};return i(r.entries,[])??[]}function aa(e,t){let n=Cn(e);if(n)for(let r of ia(e,t))Ai(`~${n.extension}/${r.id}`,!0)}async function oa(e,{push:t=!0,reveal:n=!0,skipGuard:r=!1}={}){if(!qi(R.get(),e))return!1;da+=1;let i=Ii.get(),a=e.kind===`page`?Ri(e.slug):e.slug,o=i.current&&!Wi(i.current,e)&&!r&&F.get().slug!==a?Zt():null,s=n&&e.kind!==`page`&&e.kind!==`extension`;s&&Mi(e.slug),e.kind===`extension`&&aa(e.slug,R.get());let c=Ii.get();return Ii.set({current:e,revealNonce:s?c.revealNonce+1:c.revealNonce}),Ve(!1),ta(e,t&&!Wi(i.current,e)),o&&await o,!0}var sa=(e,t={})=>oa(Yi(e),t),ca=(e,t={})=>oa({kind:`extension`,slug:e},{...t,reveal:!1}),la=(e,t={})=>oa({kind:`page`,slug:e},{...t,reveal:!1}),ua=null,da=0;async function fa(e,t){let n=Xi();ua=n,await Yt(t=>t.slug===e&&t.connected&&!t.reloading,8e3)&&Jt(`reveal-block`)&&await I(`reveal-block`,{block:t}),ua===n&&(ua=null),Bi()===e&&Xi().includes(`/`)&&ta({kind:`document`,slug:e},!1)}function pa(e){let t=zi(e),n=R.get().trash;P(O((t===null?Nn(n.filter(e=>e.kind!==`page`),e):n.some(e=>e.kind===`page`&&e.slug===t))?`这个页面已删除。`:`没有找到这个页面。`))}var ma=e=>e.includes(`/`)||Nn(R.get().trash,e),ha=e=>{if(`hash`in e)return $i(e.hash);let t=Mn(Zi(),e.target);return t?{slug:t,block:e.block??null}:null};async function ga(e){let t=da+=1;if(await z(),t!==da)return;let n=`hash`in e?zi(e.hash):null;if(n!==null){await la(n)||pa(Ri(n));return}if(`hash`in e&&Cn(e.hash)){await ca(e.hash)||P(O(`没有找到这个页面。`));return}let r=ha(e);if(!r){pa(`hash`in e?e.hash:e.target);return}await sa(r.slug),r.block&&await fa(r.slug,r.block)}async function _a(e,t,n){let r=_i(e);if(!r)return;let i=da+=1;if(await z(),i!==da)return;let a=`hash`in t?t.hash:null,o=`target`in t?{key:`~${r.ws}/${t.target}`,block:t.block??null}:null,s=o?R.get().reports[o.key]?{slug:o.key,block:o.block}:null:a!==null&&!a.startsWith(`@`)?$i(`~${r.ws}/${a}`):null;if(s&&await sa(s.slug)){s.block&&await fa(s.slug,s.block);return}let c=a??(`target`in t?`${t.target}${t.block?`/${t.block}`:``}`:``);P(O(`这份文档在它自己的工作区里,不在这里的侧边栏中`),n?{action:O(`在它的工作区里打开`),onAction:()=>{window.open(`${n}/#${c}`,`_blank`)}}:{})}function va(){let e=R.get();if(e.status!==`ready`)return;let t=Ii.get();if(t.current&&Ji(e,t.current))return;let n=Xi(),r=zi(n),i=r===null&&Cn(n)!==null,a=r===null&&!i?$i(n):null,o=Zn(e.meta).filter(e=>!gi(e)),s=o.find(t=>!hi(t,e))??o[0],c=r!==null&&wi(r,e)?{kind:`page`,slug:r}:i&&Gi(n,e)?.entry.url?{kind:`extension`,slug:n}:a?Yi(a.slug,e):wi(`home`,e)?{kind:`page`,slug:Li}:s?Yi(s,e):null;Wi(c,t.current)||(c?.kind===`extension`?aa(c.slug,e):c&&c.kind!==`page`&&Mi(c.slug),Ii.set({current:c,revealNonce:t.revealNonce+1}),c?.kind===`document`&&a?.block?fa(c.slug,a.block):c&&ta(c,!1),i?c?.kind!==`extension`&&P(t.current?.kind===`extension`?O(`这个条目已被扩展移除`):O(`没有找到这个页面。`)):(r===null?!a&&ma(n):!wi(r,e))&&pa(n))}R.subscribe(va);function ya(){let{current:e}=Ii.get(),t=Xi();if(!(!e||ua!==null||!Ji(R.get(),e))){if(e.kind===`page`){t!==Ri(e.slug)&&ta(e,!1);return}if(e.kind===`extension`){t!==e.slug&&ta(e,!1);return}t!==Zi().get(e.slug)&&!t.includes(`/`)&&ta(e,!1)}}R.subscribe(ya),F.subscribe(ya);function ba(e,t){let n=Bi();if(!n||e?.slug!==n||!(typeof e.block==`string`||e.view))return!1;let r=$i(t);return r?.slug===n&&!r.block}async function xa(e){let t=da+=1,n=e.slug;!await Yt(e=>e.slug===n&&e.connected&&!e.reloading,8e3)||t!==da||Bi()!==n||(e.view&&Jt(`show-place`)?await I(`show-place`,{place:e.view}):typeof e.block==`string`&&Jt(`reveal-block`)&&await I(`reveal-block`,{block:e.block}))}async function Sa(e,t=!1){let n=Xi();if(ba(e,n)){ya(),t&&xa(e);return}if(n===ua)return;let r=da+=1;if(ua=n,await z(),ua===n&&(ua=null),r!==da||Xi()!==n)return;t&&(e=history.state);let{current:i}=Ii.get(),a=typeof e?.page==`string`?e.page:zi(n);if(a!==null){if(i?.kind===`page`&&i.slug===a)return;la(a,{push:!1}).then(e=>{e||!i||(pa(Ri(a)),ta(i,!0))});return}let o=typeof e?.extension==`string`?e.extension:Cn(n)?n:null;if(o!==null){if(i?.kind===`extension`&&i.slug===o)return;ca(o,{push:!1}).then(e=>{e||!i||(P(O(`没有找到这个页面。`)),ta(i,!0))});return}let s=$i(n),c=e?.slug??s?.slug??n,l=s?.block??null,u=Ui();if(c){if(c===u){l?fa(c,l):ya();return}if(e?.view)try{sessionStorage.setItem(Rt(c),JSON.stringify({...e.view,unit:null,self:!1,offset:null}))}catch{}sa(c,{push:!1}).then(e=>{e&&l&&fa(c,l),!(e||!i)&&(ma(n)&&pa(n),ta(i,!0))})}}window.addEventListener(`popstate`,e=>void Sa(e.state,!0)),window.addEventListener(`hashchange`,()=>void Sa(history.state));var Ca={markdown:[`.md`,`.markdown`,`.mdx`,`.txt`,`.text`],html:[`.html`,`.htm`,`.xhtml`],csv:[`.csv`,`.tsv`],docx:[`.docx`],pdf:[`.pdf`],epub:[`.epub`],zip:[`.zip`]},wa=e=>/\.[^./\\]+$/.exec(String(e).toLowerCase())?.[0]??``,Ta=e=>Object.keys(Ca).find(t=>Ca[t].includes(wa(e)))??null,Ea=()=>Error(O(`没有连上 Gallery 的本地服务:运行 gallery open 启动它。`));async function Da(e,t){let n=`/__gallery/transfer/${e}${t.query?`?${new URLSearchParams(t.query)}`:``}`;for(let e of[!1,!0]){let r=await yr(e),i=await fetch(n,{...t,headers:{...t.headers,"X-Gallery-Token":r}}).catch(()=>{throw Ea()});if(!(i.status===403&&!e&&(await i.clone().json().catch(()=>null))?.reason===`token`))return i}throw Ea()}async function Oa(e){let t=await e.json().catch(()=>null);return Object.assign(Error(fe(t)??O(`操作没有成功(HTTP {0})`,e.status)),{reason:t?.reason})}async function ka(e,t){let n=await Da(`export`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({slug:e,options:t})});if(!n.ok)throw await Oa(n);return{name:decodeURIComponent(n.headers.get(`X-File-Name`)??`Export.zip`),blob:await n.blob()}}async function Aa(e){let t=await Da(`markdown`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({slug:e})});if(!t.ok)throw await Oa(t);return(await t.json()).text}async function ja({opening:e=!1}={}){let t=await Da(`preferences`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({opening:e})});if(!t.ok)throw await Oa(t);let n=await t.json();return{path:n.path,remade:n.remade===!0,unshown:Array.isArray(n.unshown)?n.unshown:[]}}async function Ma(e){let t=await Da(`upload`,{method:`POST`,headers:{"Content-Type":`application/octet-stream`},body:e,query:{name:e.name}});if(!t.ok)throw await Oa(t);return(await t.json()).id}async function Na(e,t){let n=await Da(`import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({uploads:e,parent:t,from:O(`导入自 {0}`),language:ce})});if(!n.ok)throw await Oa(n);return n.json()}var Pa=globalThis.showDirectoryPicker,Fa=typeof Pa==`function`,Ia=x.workbench,La=`handles`,Ra=`export-folder`;function za(){return new Promise((e,t)=>{let n=indexedDB.open(Ia,1);n.onupgradeneeded=()=>n.result.createObjectStore(La),n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)})}var Ba=null;async function Va(e,t){await(Ba??=ne(indexedDB,{from:S.workbench,store:La,open:za}).catch(()=>{Ba=null}));let n=await za();return new Promise((r,i)=>{let a=t(n.transaction(La,e).objectStore(La));a.onsuccess=()=>r(a.result),a.onerror=()=>i(a.error)})}var Ha;async function Ua(){if(Ha!==void 0)return Ha;try{Ha=Fa?await Va(`readonly`,e=>e.get(Ra))??null:null}catch{Ha=null}return Ha}async function Wa(){if(!Pa)return null;try{let e=await Pa({id:`report-export`,mode:`readwrite`,...Ha?{startIn:Ha}:{}});return Ha=e,await Va(`readwrite`,t=>t.put(e,Ra)).catch(()=>{}),e}catch{return null}}async function Ga(e){try{return await e.queryPermission?.({mode:`readwrite`})===`granted`||await e.requestPermission?.({mode:`readwrite`})===`granted`}catch{return!1}}async function Ka(e,t,n){let r=t.lastIndexOf(`.`),[i,a]=r>0?[t.slice(0,r),t.slice(r)]:[t,``],o=t;for(let t=1;t<1e3;t++)try{await e.getFileHandle(o),o=`${i} (${t})${a}`}catch{break}let s=await(await e.getFileHandle(o,{create:!0})).createWritable();return await s.write(n),await s.close(),o}var qa=Object.freeze({font:`data-doc-font`,size:`data-doc-size`,spacing:`data-doc-spacing`,width:`data-doc-measure`,full:`data-doc-width`});[...Object.values(qa)];var Ja=Object.freeze({font:Object.freeze([`sans`,`serif`,`mixed`]),size:Object.freeze([`default`,`small`,`large`]),spacing:Object.freeze([`default`,`compact`,`loose`]),width:Object.freeze([`default`,`narrow`,`wide`]),full:Object.freeze([`default`,`full`])});Object.freeze({default:1,small:15/16,large:18/16}),Object.freeze({default:Object.freeze({leading:1,gaps:1}),compact:Object.freeze({leading:.8,gaps:.75}),loose:Object.freeze({leading:1.2,gaps:1.25})}),Object.freeze({default:712,narrow:648,wide:776});var Ya=`"Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Songti SC", "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", SimSun, serif`,Xa=e=>!!e&&typeof e==`object`&&!Array.isArray(e);function Za(e){let t={};if(!Xa(e))return t;for(let[n,r]of Object.entries(Ja)){let i=e[n];typeof i==`string`&&r.includes(i)&&i!==r[0]&&(t[n]=i)}return t}var Qa=(e,t)=>JSON.stringify(Za(e))===JSON.stringify(Za(t));String.raw`(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'>]+))?`;var $a=e=>P(e.message||O(`操作失败`)),eo=(e,t)=>pi(n=>tr(n,e,t)),to=e=>pi(t=>nr(t,e)),no=(e,t,n)=>(Pi(`fav`),pi(r=>rr(r,e,t,n)));function ro(e){let{meta:t}=R.get();if(e.after)return Yn(t,e.after);let n=e.parent??``;return on(n)?t.groups.find(e=>Un(e)===n)??null:Yn(t,n)}async function io(e={parent:``}){if(!await Zt())return;let t=ro(e),n=t?.workspace&&t.workspace!==R.get().self?t.workspace:null;try{let r=n?await Nr(n,``,e):(await Mr(``,e)).slug;await z(),t&&Pi(t.id);let i=e.after?qn(R.get().meta,e.after):e.parent??``;i&&!on(i)&&Ai(i,!0),await sa(r,{skipGuard:!0}),Lo(r,{quiet:!0})}catch(e){$a(e)}}function ao(){let e=R.get(),t=Ui(),n=t&&e.reports[t]?Yn(e.meta,t):null;return io(t&&n&&xi(n,e)?{after:t}:{parent:``,first:!0})}async function oo(e){e===ce||!await Zt()||(ue(e),location.reload())}async function so(e){Bi()===e&&await en();try{let t=await Fr(e);await z(),P(O(`已创建副本`),{routine:!0}),await sa(t.slug)}catch(e){$a(e)}}async function co(e){if(gi(e))return;let t=hi(e),n=Ui()===e;if(n&&!t&&!await Zt())return;let r=mi(R.get().reports[e]),i;try{i=await(t?qr(e):zr(e))}catch(e){$a(e);return}if(await z(),n){let e=R.get(),t=i.parent&&e.reports[i.parent]?i.parent:Zn(e.meta)[0];t&&await sa(t,{skipGuard:!0,push:!1})}P(O(`「{0}」已移至回收区`,r),{action:O(`撤销`),onAction:()=>void lo(i.id)})}async function lo(e){try{let{report:t,page:n,entry:r}=await $r(e);await z();let i=t&&r?.kind!==`page`?Yn(R.get().meta,t.slug):null;i&&Pi(i.id),P(O(`已恢复「{0}」`,n?Ti(n):mi(t)),{routine:!0})}catch(e){$a(e)}}function uo(e){let t=R.get().meta,n=ir(t),r=e?t.groups.findIndex(t=>t.id===e):-1;return pi(e=>ar(e,{id:n},r<0?void 0:r+1))?(Pi(n),n):null}var fo=(e,t)=>pi(n=>cr(n,e,t)),po=(e,t)=>pi(n=>lr(n,e,t));function mo(e){let t=R.get().meta,n=t.groups.find(t=>t.id===e),r=Kn(t,Un(e)),i=bi(n),a=ur(t,e);if(!(!n||!pi(t=>pr(t,e)))){if(n.workspace){let n=t.groups.findIndex(t=>t.id===e);P(a.length?O(`已从侧边栏移除「{0}」,拖进去的 {1} 项回到了「{2}」,文件都没动`,i,a.length,bi(t.groups.find(e=>e.id===tn))):O(`已从侧边栏移除「{0}」,文件都没动`,i),{action:O(`撤销`),onAction:()=>{pi(t=>{let r=or(t,e,n);return r&&dr(r,a)})}});return}Pi(tn),P(O(`已删除「{0}」栏,里面的 {1} 项回到了「{2}」`,i,r.length,bi(t.groups.find(e=>e.id===tn))),{action:O(`撤销`),onAction:()=>{pi(i=>{if(i.groups.some(t=>t.id===e))return null;let a=Math.min(t.groups.findIndex(t=>t.id===e),i.groups.length),o=[...i.groups];o.splice(a,0,n);let s=Kn(i,``).filter(e=>!r.includes(e));return{...i,groups:o,children:{...i.children,"":s,[Un(e)]:r.filter(e=>Kn(i,``).includes(e))}}})}})}}async function ho(e,t=``){let n;try{n=await Gr({...e,parent:t,first:!0})}catch(e){return e.message||O(`操作失败`)}await z();let r=Yn(R.get().meta,n.slug);return r&&Pi(r.id),t!==void 0&&!on(t)&&Ai(t,!0),await sa(n.slug),Jr(n.url??e.url).then(({frameable:e})=>{e||P(O(`这个网站不允许在 Gallery 里显示,点开时会提供“在浏览器中打开”`),{duration:6e3})},()=>{}),null}async function go(e,t){let n=t.replace(/\s+/g,` `).trim(),r=R.get().reports[e];if(!(!n||!r||n===r.title)){R.set(t=>({...t,reports:{...t.reports,[e]:{...t.reports[e],title:n}}}));try{await Kr(e,{title:n})}catch(e){$a(e)}await z()}}async function _o(e,t){try{await Kr(e,{url:t})}catch(e){return $a(e),!1}return await z(),!0}var vo=e=>{window.open(e,`_blank`,`noopener,noreferrer`)};function yo(e){navigator.clipboard.writeText(e).then(()=>P(O(`已复制网址`)),e=>P(O(`没有复制:{0}`,e.message),{tone:`error`,duration:5e3}))}async function bo(e,t){let n=t.replace(/\s+/g,` `).trim();if(!(!n||n===wi(e)?.title))try{await Xr(e,n),await z()}catch(e){$a(e)}}function xo({added:e,skipped:t}){let n=e=>e.name?.[ce===`en`?`en`:`zh`]??e.block,r=e=>e.map(n).join(O(`、`)),i=t.filter(e=>e.reason===`disabled`),a=t.filter(e=>e.reason!==`disabled`),o=[...e.length?[O(`已放回默认卡片:{0}`,r(e))]:[],...i.length?[O(`{0}已停用,没有放回`,r(i))]:[],...a.length?[O(`没能放回:{0}`,r(a))]:[]];return o.length?o.join(O(`;`)):O(`默认卡片都在,没有要放回的`)}async function So(){if(!wi(`home`)||Vi()!==`home`&&!await la(`home`))return;let e=await Yt(e=>e.slug===`@home`&&e.connected&&!e.reloading&&e.commands.includes(`restore-defaults`),15e3)&&Jt(`restore-defaults`)?await I(`restore-defaults`):null;if(e&&!e.ok&&e.reason!==`board`){P(O(`没能恢复默认卡片`),{tone:`error`});return}if(e?.ok){let t={added:e.added??[],skipped:e.skipped??[]},n=t.added.map(e=>e.card);P(xo(t),n.length?{action:O(`撤销`),onAction:()=>void(async()=>{if(!await Yt(e=>e.slug===`@home`&&e.connected&&!e.reloading,8e3)||!Jt(`undo-restore`))return;let e=await I(`undo-restore`,{cards:n});e.ok||P(e.reason===`refused`?O(`放回的卡片之后被改过或拿掉了,没有撤销`):O(`首页之后又改过,在页面上按 Ctrl+Z 撤销`))})()}:{});return}try{P(xo(await Qr()))}catch(e){$a(e)}}async function Co(e){let t=Vi()===e;if(t&&!await Zt())return;let n=Ti(wi(e)),r;try{r=await Zr(e)}catch(e){$a(e);return}if(await z(),t){let e=R.get(),t=Zn(e.meta)[0];wi(`home`,e)?await la(Li,{skipGuard:!0,push:!1}):t&&await sa(t,{skipGuard:!0,push:!1})}P(O(`「{0}」已移至回收区`,n),{action:O(`撤销`),onAction:()=>void lo(r.id)})}async function wo(e){if(await Ee({title:O(`永久删除「{0}」?`,R.get().trash.find(t=>t.id===e)?.title??O(`这份文档`)),message:O(`删除后无法恢复。`),actions:[{id:`cancel`,label:O(`取消`)},{id:`delete`,label:O(`永久删除`),danger:!0,primary:!0}],cancelId:`cancel`})===`delete`)try{await ei(e),await z()}catch(e){$a(e)}}async function To(e,t,n={}){if(!(Bi()&&!await en())){P(O(`正在导出…`),{duration:6e5});try{let{name:r,blob:i}=await ka(e,t);if(Pt(),n.folder){let e=await Ka(n.folder,r,i);P(O(`已导出到「{0}」:{1}`,n.folder.name,e),{duration:5e3});return}n.refused&&P(O(`没有写入「{0}」的权限,已改为浏览器下载`,n.refused),{duration:5e3});let a=URL.createObjectURL(i),o=Object.assign(document.createElement(`a`),{href:a,download:r});document.body.append(o),o.click(),o.remove(),setTimeout(()=>URL.revokeObjectURL(a),6e4)}catch(e){if(e.reason===`check`){Pt(),await Ee({title:O(`导出失败`),message:e.message,actions:[{id:`ok`,label:O(`确定`),primary:!0}],cancelId:`ok`});return}P(O(`导出失败:{0}`,e.message),{tone:`error`,duration:6e3})}}}async function Eo(e,t){if(!e.some(e=>Ta(e.name))){P(O(`不支持的文件类型`));return}P(O(`正在导入…`),{duration:6e5});let n;try{let r=[];for(let t of e)r.push(await Ma(t));n=await Na(r,t)}catch(e){P(O(`导入失败:{0}`,e.message),{tone:`error`,duration:6e3});return}if(await z(),!n.pages){P(O(`不支持的文件类型`));return}t?Ai(t,!0):Pi(tn),n.reports[0]&&await sa(n.reports[0]);let r=n.missing??[],i=r.length?O(`{0} 张图片没有找到:{1}`,r.length,r.join(O(`、`))):``;n.skipped.length?P(O(`已导入 {0} 个页面,{1} 个文件不支持:{2}`,n.pages,n.skipped.length,n.skipped.join(O(`、`)))+(i?` · ${i}`:``),{duration:i?1e4:6e3}):i?P(O(`已导入,{0} · 把图片和 Markdown 文件一起选上(图片在别的文件夹里时,把整个文件夹压缩成 .zip)再导入,就能带上它们`,i),{duration:1e4}):P(e.length===1?O(`{0}已成功导入`,e[0].name):O(`你的文件已成功导入`))}function Do(e){let t=null,n=(async()=>{if(Bi()===e&&!await en())throw Error(O(`这页还有修改没有保存`));return Aa(e)})().catch(e=>{throw t=e,e});(typeof ClipboardItem<`u`&&navigator.clipboard?.write?navigator.clipboard.write([new ClipboardItem({"text/plain":n.then(e=>new Blob([e],{type:`text/plain`}))})]):n.then(e=>navigator.clipboard.writeText(e))).then(()=>P(O(`已复制页面内容`)),e=>P(O(`没有复制:{0}`,(t??e).message),{tone:`error`,duration:5e3}))}function Oo(e,{page:t=!1}={}){let n=null,r=wr(e,t).catch(e=>{throw n=e,e});(typeof ClipboardItem<`u`&&navigator.clipboard?.write?navigator.clipboard.write([new ClipboardItem({"text/plain":r.then(e=>new Blob([e],{type:`text/plain`}))})]):r.then(e=>navigator.clipboard.writeText(e))).then(()=>P(O(`已复制本地路径`)),e=>P(O(`没有复制:{0}`,(n??e).message),{tone:`error`,duration:5e3}))}async function ko(e,t){let n=t.replace(/\s+/g,` `).trim(),r=R.get().reports[e],i=F.get(),a=i.slug===e&&i.connected;if(!n||!r||n===(a&&i.title||mi(r)))return;if(R.set(t=>({...t,reports:{...t.reports,[e]:{...t.reports[e],title:n}}})),a&&Jt(`set-title`,i)){let e=await I(`set-title`,{title:n});if(e.ok)return;P(e.reason===`no-title`?O(`这份文档没有标题`):O(`没有改成标题`)),z();return}let o=_i(e);try{o?await Vr(o.ws,o.slug,n):await Ir(e,n)}catch(e){$a(e)}await z()}function Ao(e,t){navigator.clipboard.writeText(e).then(()=>P(t),e=>P(O(`没有复制:{0}`,e.message),{tone:`error`,duration:5e3}))}function jo(e){let t=R.get().reports[e];if(!t?.path){P(O(`找不到底稿`));return}Ao(t.path,O(`已复制本地路径`))}function Mo(e){let t=R.get().workspaces[e]?.root;if(!t){P(O(`找不到它所在的工作区`));return}Ao(t,O(`已复制本地路径`))}async function No(e){try{let{opened:t,why:n}=await Wr(e);t||P(O(`没有打开文件夹:{0}`,n??``),{duration:5e3})}catch(e){$a(e)}}function Po(e){let t=R.get().meta,n=mi(R.get().reports[e]),r=Kn(t,e),i={parent:``,index:0};if(!pi(t=>{if(qn(t,e)===null)return null;let{meta:n,parent:r,index:a}=$n(t,e);return Object.assign(i,{parent:r,index:a}),fr(n,e)}))return;let{parent:a,index:o}=i;P(O(`已从文档树移除「{0}」,底稿没有删除`,n),{action:O(`撤销`),onAction:()=>{pi(t=>{if(qn(t,e)!==null||!Wn(a)&&qn(t,a)===null)return null;let n=er(fr(t,e,!1),e,a,o);for(let t of r)qn(n,t)!==null&&(n=tr(n,t,{pos:`inside`,ref:e})??n);return n})}})}async function Fo(e,t){let n;try{n=await Hr(e,t)}catch(r){let{reason:i,answer:a}=r;if(i!==`unregistered`)return r.message||O(`操作失败`);if(await Ee({title:O(`把这个文件夹登记成工作区?`),message:r.message,actions:[{id:`cancel`,label:O(`取消`)},{id:`register`,label:O(`登记并添加`),primary:!0}],cancelId:`cancel`})!==`register`)return O(`没有添加:{0} 不在任何工作区里`,a?.folder??e);try{n=await Hr(e,t,!0)}catch(e){return e.message||O(`操作失败`)}}await z();let r=R.get();if(n.kind===`workspace`){if(!n.own&&!n.column)return O(`侧边栏最多 {0} 栏,放不下这个工作区了`,50);let e=n.own?tn:n.column;return e&&(Pi(e),document.querySelector(`.sec-head[data-column="${CSS.escape(e)}"]`)?.scrollIntoView({block:`nearest`})),n.own&&P(O(`这就是当前的工作区`),{routine:!0}),null}let i=n.entry,a=Yn(r.meta,i);a&&Pi(a.id);for(let e of Jn(r.meta,i))Ai(e,!0);return n.added&&n.added.length>1&&Ai(i,!0),await sa(i),n.existing&&P(n.own?O(`这份文档就在这个工作区里`):O(`它已经在侧边栏里了`),{routine:!0}),null}async function Io(e){let t=_i(e);if(!t)return;let n=window.open(`about:blank`,`_blank`);try{let e=await Br(t.ws);n&&(n.location.href=`${e}/#${t.slug}`)}catch(e){n?.close(),$a(e)}}async function Lo(e,{quiet:t=!1}={}){if(Bi()!==e&&!await sa(e))return;if(!await Yt(t=>t.slug===e&&t.connected,8e3)){t||P(O(`文档还没有打开,请稍后再试`));return}let n=await I(`edit-title`);n.ok||t||P(n.reason===`no-title`?O(`这份文档没有标题`):O(`没有进入改标题`))}var Ro=new Map;function zo(e){let t=Ro.get(e);if(t)return t.look;let n=F.get();return n.slug===e&&n.connected&&n.look?n.look:R.get().reports[e]?.look??{}}var Bo=Promise.resolve();function Vo(e,t,n){let r=Za(zo(e)),i=Za({...r,[t]:n});if(Qa(r,i))return;let a=t=>{R.set(n=>n.reports[e]?{...n,reports:{...n.reports,[e]:{...n.reports[e],look:t}}}:n);let n=F.get();n.slug===e&&Jt(`look`,n)&&I(`look`,{look:t})},o={look:i};Ro.set(e,o),a(i),Bo=Bo.then(()=>Lr(e,i)).then(t=>{Ro.get(e)===o&&Ro.delete(e),R.set(n=>n.reports[e]?{...n,reports:{...n.reports,[e]:{...n.reports[e],look:t.look}}}:n)},t=>{Ro.get(e)===o&&(Ro.delete(e),a(r)),P(O(`字体与布局没有保存:{0}`,t.message),{tone:`error`,duration:5e3})})}function H(e){Bo=Bo.then(()=>Rr(e)).then(({look:e,replaced:t})=>{let n=Za(e),r=Object.keys(n).length?n:void 0;R.set(e=>({...e,reports:Object.fromEntries(Object.entries(e.reports).map(([e,t])=>[e,t.instructions?t:{...t,look:r}]))})),P(t>0?O(`已应用到全部文档,替换了 {0} 篇的单独设置`,t):O(`已应用到全部文档`))},e=>P(O(`没有应用到全部文档:{0}`,e.message),{tone:`error`,duration:5e3}))}var U=d(!1),Ho=()=>{ht(),U.set(!0)},Uo=()=>U.set(!1),Wo=()=>U.get()?Uo():Ho();function Go(){return f(U)?(0,A.createPortal)((0,j.jsx)(Xo,{}),document.body):null}var Ko=e=>e.replace(/\s+/g,` `).trim();function qo(e,t){if(!t)return e;let n=e.toLowerCase(),r=[],i=0;for(let a=n.indexOf(t);a>=0&&t;a=n.indexOf(t,a+t.length))r.push(e.slice(i,a),(0,j.jsx)(`mark`,{children:e.slice(a,a+t.length)},a)),i=a+t.length;return r.push(e.slice(i)),(0,j.jsx)(j.Fragment,{children:r})}var Jo=e=>(0,j.jsxs)(j.Fragment,{children:[e.text.slice(0,e.start),(0,j.jsx)(`mark`,{children:e.text.slice(e.start,e.end)}),e.text.slice(e.end)]});async function Yo(e,t,n){await sa(e)&&(!await Yt(t=>t.slug===e&&t.connected,8e3)||!Jt(`reveal`)||await I(`reveal`,{text:n,before:t.before,index:t.index}))}function Xo(){let e=f(R),[t,n]=(0,l.useState)(``),[r,i]=(0,l.useState)(0),[a,o]=(0,l.useState)(null),s=(0,l.useRef)(null);(0,l.useEffect)(()=>Ce(Uo),[]);let c=Ko(t).toLowerCase();(0,l.useEffect)(()=>{if(!c)return;let e=!0,t=setTimeout(()=>{Sr(c).then(t=>{e&&o({words:c,results:t})},()=>{e&&o({words:c,results:[]})})},120);return()=>{e=!1,clearTimeout(t)}},[c]);let u=!!c&&a?.words===c,d=(0,l.useMemo)(()=>{let t=Zn(e.meta).filter(t=>{let n=e.reports[t];return n&&(mi(n).toLowerCase().includes(c)||n.description.toLowerCase().includes(c)||t.includes(c))}),n=u?a.results.filter(t=>e.reports[t.slug]):[],r=new Map(n.map(e=>[e.slug,e.hits])),i=[...new Set([...n.filter(e=>e.title).map(e=>e.slug),...t,...n.map(e=>e.slug)])].slice(0,50);return[...c?e.pages.filter(e=>Ti(e).toLowerCase().includes(c)||e.slug.includes(c)).map(e=>({slug:e.slug,page:!0})):[],...i.flatMap(e=>{let[t,...n]=r.get(e)??[];return[{slug:e,hit:t},...n.map(t=>({slug:e,hit:t,more:!0}))]})]},[e,c,u,a]),p=m(r,0,Math.max(0,d.length-1)),g=t=>Jn(e.meta,t).map(t=>mi(e.reports[t])).join(` / `);(0,l.useEffect)(()=>{s.current?.querySelector(`.search-item.active`)?.scrollIntoView({block:`nearest`})},[p]);let _=e=>{let t=d[e];t&&(Uo(),t.page?la(t.slug):t.hit?Yo(t.slug,t.hit,c):sa(t.slug))};return(0,j.jsx)(`div`,{className:`modal`,onPointerDown:e=>{e.target===e.currentTarget&&Uo()},children:(0,j.jsxs)(`div`,{className:`search-panel`,children:[(0,j.jsxs)(`div`,{className:`search-bar`,children:[(0,j.jsx)(N,{name:`search`}),(0,j.jsx)(`input`,{autoFocus:!0,placeholder:O(`搜索文档…`),value:t,onChange:e=>{n(e.target.value),i(0)},onKeyDown:e=>{e.key===`ArrowDown`||e.key===`ArrowUp`?(e.preventDefault(),i(m(p+(e.key===`ArrowDown`?1:-1),0,d.length-1))):e.key===`Enter`&&!e.nativeEvent.isComposing&&(e.preventDefault(),_(p))}})]}),(0,j.jsx)(`div`,{className:`search-list`,ref:s,children:d.length?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`div`,{className:`menu-head`,children:O(c?`匹配结果`:`全部文档`)}),d.map((t,n)=>{let{slug:r,hit:a,more:o}=t,s={className:h(`search-item`,a&&`with-hit`,o&&`more`,n===p&&`active`),onMouseMove:()=>n!==p&&i(n),onClick:()=>_(n)};if(t.page){let t=wi(r,e);return(0,j.jsxs)(`div`,{...s,children:[(0,j.jsx)(`span`,{className:`pg-icon`,children:(0,j.jsx)($e,{icon:t?.icon,fallback:r===`home`?`home`:`board`})}),(0,j.jsx)(`span`,{className:`search-main`,children:(0,j.jsxs)(`span`,{className:`search-line`,children:[(0,j.jsx)(`span`,{className:`t`,children:qo(Ti(t),c)}),(0,j.jsx)(`span`,{className:`path`,children:O(`自定义页`)})]})})]},`@${r}`)}return o?(0,j.jsx)(`div`,{...s,children:(0,j.jsx)(`span`,{className:`search-snippet`,children:Jo(a)})},`${r}:${a.index}`):(0,j.jsxs)(`div`,{...s,children:[(0,j.jsx)(`span`,{className:`pg-icon`,children:(0,j.jsx)($e,{icon:e.reports[r]?.icon,slug:r,fallback:e.reports[r]?.kind===`link`?`web`:`page`})}),(0,j.jsxs)(`span`,{className:`search-main`,children:[(0,j.jsxs)(`span`,{className:`search-line`,children:[(0,j.jsx)(`span`,{className:`t`,children:qo(mi(e.reports[r]),c)}),(0,j.jsx)(`span`,{className:`path`,children:g(r)||(e.reports[r].kind===`draft`?vi(e.reports[r].workspace??``,e):!a&&e.reports[r].description)})]}),a&&(0,j.jsx)(`span`,{className:`search-snippet`,children:Jo(a)})]})]},r)}),c&&!u&&(0,j.jsx)(`div`,{className:`search-note`,children:O(`正在搜索正文…`)})]}):(0,j.jsx)(`div`,{className:`menu-empty`,children:O(c&&!u?`正在搜索…`:`没有找到结果`)})})]})})}var Zo={head:`以下是我对这份文档的批注,共 {0} 条。请逐条按“建议”修改底稿;每条给出它在文档里的位置、块的 data-block-id 和批注的原文。`,headOne:`以下是我对这份文档的一条批注。请按“建议”修改底稿;它给出在文档里的位置、块的 data-block-id 和批注的原文。`,report:`文档`,source:`底稿`,block:`块`,whole:`(整块)`,noId:`(还没有 id,按原文找)`,suggestion:`建议`,body:`正文`,top:`页首`,colon:`:`,comma:`,`},Qo=(e,...t)=>e.replace(/\{(\d+)\}/g,(e,n)=>n<t.length?String(t[n]):e);function $o({title:e,path:t,items:n},r=Zo){let i={...Zo,...r},a=[n.length===1&&i.headOne?i.headOne:Qo(i.head,n.length),``,`- ${i.report}${i.colon}${e}`,`- ${i.source}${i.colon}${t}`];return n.forEach((e,t)=>{let n=e.where?.length?e.where.join(` › `):e.top?i.top:i.body,r=e.blocks?.length?e.blocks.map(e=>`\`data-block-id="${e}"\``).join(i.comma)+(e.whole?i.whole:``):i.noId;a.push(``,`## ${t+1}. ${n}`,``,`${i.block}${i.colon}${r}`,``);for(let t of String(e.quote??``).split(`
10
+ `))a.push(`> ${t}`);let o=String(e.text??``).replace(/\r\n?/g,`
11
+ `).split(`
12
+ `).map(e=>e.trim()).filter(Boolean);a.push(``,`${i.suggestion}${i.colon}${o[0]??``}`);for(let e of o.slice(1))a.push(``,e)}),`${a.join(`
13
+ `)}\n`}Object.freeze({above:18,gap:10,draft:14,end:50}),Object.freeze({marker:24,markerAt:14,bar:7,card:280});function es(){let e=document.querySelector(`.annot-btn`);if(!e){P(O(`还没有批注。选中文字或点块右边的按钮来写`));return}e.focus({preventScroll:!0}),e.click()}async function ts(){let e=await I(`annotations`,{action:`list`});return e.ok?e.items:[]}function ns(e){I(`annotations`,{action:`locate`,id:e}),addEventListener(`pointerdown`,()=>{I(`annotations`,{action:`away`})},{capture:!0,once:!0})}var rs=()=>({head:O(`以下是我对这份文档的批注,共 {0} 条。请逐条按“建议”修改底稿;每条给出它在文档里的位置、块的 data-block-id 和批注的原文。`),headOne:O(`以下是我对这份文档的一条批注。请按“建议”修改底稿;它给出在文档里的位置、块的 data-block-id 和批注的原文。`),report:O(`文档@doc`),source:O(`底稿`),block:O(`块`),whole:O(`(整块)`),noId:O(`(还没有 id,按原文找)`),suggestion:O(`建议@note`),body:O(`正文`),top:O(`页首`),colon:O(`:`),comma:O(`,`)});function is(){let e=null,t=0,n=(async()=>{let e=await I(`annotations`,{action:`copy`},3e4);if(!e.ok)throw Error(e.reason===`offline`?O(`没有连上本地服务`):O(`没有读到批注`));let n=e.data;return t=n.items.length,$o(n,rs())})().catch(t=>{throw e=t,t});(typeof ClipboardItem<`u`&&navigator.clipboard?.write?navigator.clipboard.write([new ClipboardItem({"text/plain":n.then(e=>new Blob([e],{type:`text/plain`}))})]):n.then(e=>navigator.clipboard.writeText(e))).then(()=>P(t===1?O(`已复制 1 条批注`):O(`已复制 {0} 条批注`,t)),t=>P(O(`没有复制:{0}`,(e??t).message),{tone:`error`,duration:5e3}))}async function as(e,t){let n=async n=>{let r=await yr(n).catch(()=>``);return await(await fetch(`/__gallery/edit/annotations`,{method:`POST`,headers:{"Content-Type":`application/json`,"X-Gallery-Token":r},body:JSON.stringify({slug:e,restore:t})}).catch(()=>null))?.json().catch(()=>null)??{ok:!1,reason:`offline`}},r=await n(!1);if(!r.ok&&r.reason===`token`&&(r=await n(!0)),!r.ok){P(O(`没有恢复批注`),{tone:`error`});return}F.get().slug===e&&Jt(`annotate`)&&I(`annotate`,{refresh:!0})}function os(e,t){P(t.length===1?O(`已删除 1 条批注`):O(`已删除 {0} 条批注`,t.length),{action:O(`撤销`),duration:6e3,onAction:()=>{e&&as(e,t)}})}async function ss(){let e=F.get().slug,t=await I(`annotations`,{action:`clear`});if(!t.ok){P(O(`没有删除批注`),{tone:`error`});return}os(t.slug??e,t.removed??[])}var cs=e=>Array.isArray(e)?e.filter(e=>typeof e==`string`&&e.startsWith(`net:`)).map(e=>e.slice(4)):[];async function ls(e,t){let n=t;try{n??=await Tr()}catch(e){return P(e.message,{tone:`error`}),!1}let r=n.packages.find(t=>t.id===e),i=cs(r?.needs??[]);if(!r||i.length===0)return P(O(`这个块现在没有要联网的地方`),{tone:`error`}),!1;let a=r.name?ce===`en`?r.name.en:r.name.zh:e;if(await Ee({title:O(`允许「{0}」联网?`,a),message:O(`它要从这些网站取数据:{0}。Gallery 替它去取,只访问这些网站,不带你的登录信息;取到的数据只在 Gallery 里显示,不写进文档,导出的文件里只带最近一次取到的。随时可以在 设置 › 组件列表 里撤回。`,i.join(O(`、`))),actions:[{id:`cancel`,label:O(`取消`)},{id:`allow`,label:O(`允许`),primary:!0}],cancelId:`cancel`})!==`allow`)return!1;try{await Er({id:e,net:!0})}catch(e){return P(O(`设置没有保存:{0}`,e.message),{tone:`error`}),!1}return P(O(`已允许「{0}」访问 {1}`,a,i.join(O(`、`)))),!0}function us(e){let t=null,n=()=>void I(`close-card`);function r(){let r=document.createElement(`div`);r.className=`card-underlay`,r.setAttribute(`aria-hidden`,`true`);let i=()=>{let{left:t,top:n,right:i,bottom:a}=e.getBoundingClientRect();r.style.clipPath=`polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, ${t}px ${n}px, ${i}px ${n}px, ${i}px ${a}px, ${t}px ${a}px, ${t}px ${n}px)`};i(),document.body.append(r),document.body.classList.add(`card-open`);let a=new ResizeObserver(i);a.observe(e),window.addEventListener(`resize`,i),r.addEventListener(`pointerdown`,e=>{!e.isPrimary||e.button!==0||(e.preventDefault(),ds(),n())});let o=Ce(n);t=()=>{o(),window.removeEventListener(`resize`,i),a.disconnect(),r.remove(),document.body.classList.remove(`card-open`)}}let i=()=>{let e=F.get(),n=e.connected&&!!e.card;n&&!t?r():!n&&t&&(t(),t=null)},a=F.subscribe(i);return i(),()=>{a(),t?.(),t=null}}function ds(){let e=e=>{e.preventDefault(),e.stopPropagation(),t()},t=()=>{window.removeEventListener(`click`,e,!0),window.removeEventListener(`pointerdown`,t,!0)};window.addEventListener(`click`,e,!0),window.addEventListener(`pointerdown`,t,!0)}var fs=3,ps=1500;function ms(e,t){let n={};for(let[t,r]of Object.entries(e))r.kind===`link`&&(n[t]={url:r.url??``,title:mi(r)});let r=(e,t)=>{for(let i of t)i.url&&(n[Sn(e,i.id)]={url:i.url,title:i.title}),r(e,i.children??[])};for(let e of t)r(e.id,e.entries);return n}function hs({current:e}){let t=f(R,e=>e.reports),n=f(R,e=>e.extensions),r=(0,l.useMemo)(()=>ms(t,n),[t,n]),i=(0,l.useMemo)(()=>n.filter(e=>e.error).map(e=>`~${e.id}/`),[n]),[a,o]=(0,l.useState)([]);return(0,l.useEffect)(()=>{o(t=>{let n=t.filter(e=>r[e.slug]||i.some(t=>e.slug.startsWith(t))).map(e=>!r[e.slug]||r[e.slug].url===e.url?e:{...e,url:r[e.slug].url}),a=e?r[e]?.url:void 0;if(e&&a)for(n=n.findIndex(t=>t.slug===e)>=0?n.map(t=>t.slug===e?{...t,used:Date.now()}:t):[...n,{slug:e,url:a,used:Date.now()}];n.length>fs;){let t=n.reduce((t,n)=>n.slug!==e&&(t.slug===e||n.used<t.used)?n:t);n=n.filter(e=>e!==t)}return n.length===t.length&&n.every((e,n)=>e===t[n])?t:n})},[e,r,i]),(0,j.jsx)(`div`,{className:h(`link-view`,!e&&`off`),children:a.map(t=>(0,j.jsx)(gs,{slug:t.slug,url:t.url,title:r[t.slug]?.title??t.slug,shown:t.slug===e},`${t.slug} ${t.url}`))})}function gs({slug:e,url:t,title:n,shown:r}){let[i,a]=(0,l.useState)(()=>_s(t)?{show:`refused`,reason:`own`}:{show:`wait`});return(0,l.useEffect)(()=>{if(_s(t))return;let e=!0,n=window.setTimeout(()=>{e&&a(e=>e.show===`wait`?{show:`frame`}:e)},ps);return Jr(t).then(({frameable:t,reason:n})=>{e&&a(t?(e=>e.show===`wait`?{show:`frame`}:e):{show:`refused`,reason:n})},()=>{e&&a(e=>e.show===`wait`?{show:`frame`}:e)}).finally(()=>clearTimeout(n)),()=>{e=!1,clearTimeout(n)}},[t]),(0,j.jsxs)(`div`,{className:h(`link-pane`,!r&&`off`),"data-link":e,"data-show":i.show,children:[i.show===`frame`&&(0,j.jsx)(`iframe`,{className:`link-frame`,src:t,title:n,sandbox:`allow-scripts allow-popups allow-top-navigation-by-user-activation allow-forms allow-same-origin allow-storage-access-by-user-activation allow-popups-to-escape-sandbox`,referrerPolicy:`strict-origin-when-cross-origin`,allow:`fullscreen`,allowFullScreen:!0}),i.show===`refused`&&(0,j.jsxs)(`div`,{className:`report-state link-refused`,children:[(0,j.jsx)(`span`,{className:`link-refused-icon`,children:(0,j.jsx)(N,{name:`web`})}),(0,j.jsx)(`h2`,{children:i.reason===`own`?O(`这是 Gallery 自己的地址,请直接链接文档`):O(`这个网站不允许在别的页面里显示`)}),(0,j.jsx)(`p`,{className:`link-refused-url`,children:t}),(0,j.jsx)(`div`,{className:`report-state-actions`,children:(0,j.jsxs)(`button`,{className:`ghost-btn`,onClick:()=>vo(t),children:[(0,j.jsx)(N,{name:`external`}),(0,j.jsx)(`span`,{children:O(`在浏览器中打开`)})]})})]})]})}var _s=e=>bn(e,location.port||(location.protocol===`https:`?`443`:`80`)),vs=e=>e.startsWith(`@`)?`/pages/${encodeURIComponent(e.slice(1))}`:`/generated/${encodeURIComponent(e)}.html`,ys=e=>e.startsWith(`@`),bs={"Mod+\\":Be,"Mod+K":Ho,"Mod+Alt+M":()=>{Jt(`annotate`,F.get())&&es()}};function xs(){let e=f(R),{current:t}=f(Ii);if(e.status===`loading`)return(0,j.jsx)(`div`,{className:`report-state`,children:(0,j.jsx)(`p`,{className:`muted`,children:O(`正在读取文档…`)})});if(e.status===`offline`)return(0,j.jsxs)(`div`,{className:`report-state`,children:[(0,j.jsx)(`h2`,{children:O(`没有连上本地服务`)}),(0,j.jsx)(`p`,{children:e.message}),(0,j.jsx)(`div`,{className:`report-state-actions`,children:(0,j.jsxs)(`button`,{className:`ghost-btn`,onClick:()=>void z(),children:[(0,j.jsx)(N,{name:`restore`}),(0,j.jsx)(`span`,{children:O(`重试`)})]})})]});let n=t?.kind===`page`?wi(t.slug,e):void 0,r=t?.kind===`link`&&e.reports[t.slug]?.kind===`link`?e.reports[t.slug]:void 0,i=t?.kind===`extension`&&(Gi(t.slug,e)?.entry.url||Ki(t.slug,e))?t.slug:void 0;if(!t||(t.kind===`document`?!e.reports[t.slug]:t.kind===`page`?!n:t.kind===`extension`?!i:!r))return(0,j.jsxs)(`div`,{className:`report-state`,children:[(0,j.jsx)(`h2`,{children:O(`还没有文档`)}),(0,j.jsx)(`p`,{children:O(`新建一份文档,或让 Agent 生成一份。`)}),(0,j.jsx)(`div`,{className:`report-state-actions`,children:(0,j.jsxs)(`button`,{className:`ghost-btn`,onClick:()=>void io(),children:[(0,j.jsx)(N,{name:`plus`}),(0,j.jsx)(`span`,{children:O(`新建文档`)})]})})]});let a=t.kind===`page`?Ri(t.slug):t.kind===`document`?t.slug:null,o=t.kind===`page`?Ti(n):t.kind===`extension`?Gi(t.slug,e)?.entry.title??``:mi(e.reports[t.slug]);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(ks,{slug:a,title:o}),(0,j.jsx)(hs,{current:r||i?t.slug:null})]})}var Ss=15e3,Cs=e=>new Promise(t=>{let n=e.contentWindow,r=window.setTimeout(t,300);if(!n){t();return}let i=()=>{clearTimeout(r),t()};try{n.requestAnimationFrame(()=>n.requestAnimationFrame(i))}catch{requestAnimationFrame(()=>requestAnimationFrame(i))}});async function ws(e){let t=!1,n=window.setTimeout(()=>{t=!0,P(O(`正在启动它所在工作区的服务…`),{duration:6e4})},1e3);try{let n=await Br(e);return t&&Pt(),n}catch(e){return P(O(`没能打开这份底稿:{0}`,e.message),{tone:`error`,duration:6e3}),z(),null}finally{clearTimeout(n)}}function Ts(e){try{let t=e.contentDocument;return!t||t.URL===`about:blank`||!t.documentElement?!1:t.documentElement.hasAttribute(`data-doc-ready`)||t.readyState===`complete`&&!t.querySelector(`body > .doc-page`)}catch{return!0}}function Es(e,t){let n=null,r=0,i=()=>Ts(e)?(s(),t(),!0):!1,a=new MutationObserver(i),o=()=>{if(!i()){try{let t=e.contentDocument;t&&t.URL!==`about:blank`&&t.documentElement&&t.documentElement!==n&&(n=t.documentElement,a.observe(n,{attributes:!0,attributeFilter:[`data-doc-ready`]}))}catch{}r=requestAnimationFrame(o)}};function s(){cancelAnimationFrame(r),a.disconnect()}return r=requestAnimationFrame(o),s}function Ds(e){let t=()=>_e(he.get())?`dark`:`light`,n=null,r=null,i=!1,a=null,o=!1,s=new WeakMap,c=()=>{let e=n?.frame,t=e?s.get(e)??0:0;Nt(t&&e?Math.round(t+window.innerHeight-e.getBoundingClientRect().bottom):0)},l=(e,t)=>{typeof t==`number`&&(s.set(e,t),n?.frame===e&&c())},u=new WeakMap,d=(t,n,r)=>{let i=document.createElement(`iframe`);i.className=`report-frame`,i.title=r,n&&i.setAttribute(`data-pending`,``);let a=_i(t);return a?(i.dataset.draft=a.ws,ws(a.ws).then(e=>{!e||!i.isConnected||(u.set(i,e),i.src=`${e}/generated/${encodeURIComponent(a.slug)}.html?shell=${encodeURIComponent(location.origin)}`)})):i.src=vs(t),e.append(i),i},f=(e,n)=>{let i=_i(e);return Vt(n,{slug:e,...i?{pageSlug:i.slug,origin:()=>u.get(n)??null}:{},onReady:i=>{let a=Promise.all([i(`theme`,{theme:t()}),i(`keys`,{keys:Object.keys(bs)}),...ys(e)?[]:[i(`annotate`)]]),o=r;o?.frame===n&&a.then(()=>Cs(n)).then(()=>h(o))},onKey:e=>bs[e]?.(),onNotice:({text:e,tone:t,hold:r,room:i})=>{l(n,i),e?P(e,{tone:t,duration:r}):Pt()},onNoticeRoom:e=>l(n,e),onReload:()=>v(n),onOpen:t=>void(i?_a(e,t,u.get(n)??null):ga(t)),onJump:(t,n)=>na(e,t,n),onWorkspace:()=>{z(),Ai(e,!0)},onAnnotationsRemoved:t=>{i||os(e,t)},onConsent:e=>{i||ls(e)}})},p=e=>{clearTimeout(e.timer),e.stop(),e.conn.dispose(),e.frame.remove()};function m(e,t,r){let i=d(e,!0,r);t||i.setAttribute(`data-no-focus`,``);let a={slug:e,frame:i,conn:f(e,i),hadFocus:t,stop:()=>{},timer:0};return a.timer=window.setTimeout(()=>void h(a),Ss),e!==n?.slug&&(a.stop=Es(i,()=>void h(a))),a}async function h(e){r===e&&(n&&await Qt(n.conn),r===e&&g())}function g(){let{slug:e,frame:t,conn:a,timer:o,stop:s,hadFocus:l}=r;clearTimeout(o),s(),r=null;let u=n;t.removeAttribute(`data-pending`),n={slug:e,frame:t,conn:a},i=!1,c(),Wt(e,a),u?.frame.remove(),l&&document.activeElement!==t&&t.focus()}function _(){let e=n,t=r?r.hadFocus:document.activeElement===e.frame;r&&p(r),e.frame.inert=!0,r=m(e.slug,t,e.frame.title)}function v(e){if(!o){if(n?.frame===e)i=!0,(!r||r.slug===n.slug)&&_();else if(r?.frame===e){let{slug:t,hadFocus:n}=r;p(r),r=m(t,n,e.title)}}}function y(){if(r&&=(p(r),null),!n)return;let e=n;n=null,i=!1,e.frame.inert=!0,e.frame.setAttribute(`data-pending`,``),c(),Qt(e.conn).then(()=>{Kt()===e.conn?Gt(e.slug):e.conn.dispose(),e.frame.remove()})}function b(){let t=a;if(a=null,!o){if(t===Os){y();return}if(!n){let r=d(t,!1,e.dataset.title??``);n={slug:t,frame:r,conn:f(t,r)},Wt(t,n.conn);return}if(r?.slug!==t){if(t===n.slug){r&&=(p(r),null),i?_():n.frame.inert=!1;return}r&&=(p(r),null),n.frame.inert=!0,r=m(t,!1,e.dataset.title??``)}}}let x=he.subscribe(()=>{n&&n.conn.command(`theme`,{theme:t()}),r&&r.conn.command(`theme`,{theme:t()})}),S=us(e),C=null,w=null,T,E=F.subscribe(()=>{let e=F.get();if(!n||e.slug!==n.slug||ys(e.slug)||!e.connected||e.flags.pending||typeof e.title!=`string`||(e.slug!==C&&(C=e.slug,w=null,T=void 0),e.title===w&&e.icon===T))return;w=e.title,T=e.icon;let t=R.get().reports[e.slug];((e.title||O(`未命名文档`))!==mi(t)||e.icon!==void 0&&(e.icon??void 0)!==t?.icon)&&z()});return{show(e){a===null&&queueMicrotask(b),a=e??Os},title(e,t){for(let i of[n,r])i?.slug===e&&(i.frame.title=t)},dispose(){o=!0,x(),E(),S(),r&&p(r),r=null,n&&Gt(n.slug),n=null,c(),e.replaceChildren()}}}var Os=``;function ks({slug:e,title:t}){let n=(0,l.useRef)(null),r=(0,l.useRef)(null);return(0,l.useLayoutEffect)(()=>{let e=Ds(n.current);return r.current=e,()=>{e.dispose(),r.current===e&&(r.current=null)}},[]),(0,l.useLayoutEffect)(()=>{n.current.dataset.title=t,e&&r.current?.title(e,t)},[e,t]),(0,l.useLayoutEffect)(()=>{r.current?.show(e)},[e]),(0,j.jsx)(`div`,{ref:n,className:h(`report-view`,!e&&`off`),"data-title":t})}var As=d(null),js=()=>As.set(null),Ms=e=>{ht(),As.set({kind:`export`,slug:e})},Ns=e=>{ht(),As.set({kind:`import`,parent:e})};function Ps(){let e=f(As);return e?(0,A.createPortal)((0,j.jsx)(`div`,{className:`xf-overlay`,onPointerDown:e=>{e.target===e.currentTarget&&js()},children:e.kind===`export`?(0,j.jsx)(Hs,{slug:e.slug}):(0,j.jsx)(Ks,{parent:e.parent})}),document.body):null}var Fs=`workbench:export-options`,Is=[[`pdf`,`PDF`],[`html`,`HTML`],[`markdown`,`Markdown`]],Ls=[[`everything`,O(`所有内容`)],[`no_files`,O(`文件和图片除外`)]],Rs=[[[`A4`,`A4`],[`A3`,`A3`]],[[`Letter`,`Letter`],[`Legal`,`Legal`],[`Tabloid`,`Tabloid`]]],zs=/Win/.test(navigator.platform),Bs=e=>e>.1&&e<2,Vs=(e,t=[`Enter`,` `])=>t.includes(e.key);function Hs({slug:e}){let t=v.get(Fs)??{},[n,r]=(0,l.useState)(Is.some(([e])=>e===t.format)?t.format:`markdown`),[i,a]=(0,l.useState)(Rs.flat().some(([e])=>e===t.paper)?t.paper:`A4`),[o,s]=(0,l.useState)(`everything`),[c,u]=(0,l.useState)(1),[d,f]=(0,l.useState)(`100`),[p,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(!zs),[_,y]=(0,l.useState)(null),[b,x]=(0,l.useState)(t.place===`folder`);(0,l.useEffect)(()=>{Ua().then(e=>{y(e),e||x(!1)})},[]);let S=(0,l.useRef)(null);(0,l.useEffect)(()=>(S.current?.querySelector(`[role="button"]`)?.focus({preventScroll:!0}),Ce(js)),[]);let C=n!==`pdf`||Bs(c),w=async()=>{if(!C)return;v.set(Fs,{format:n,paper:i,place:b&&_?`folder`:`download`});let t=b&&_&&await Ga(_)?_:null;js(),To(e,{format:n,content:o,subpages:p,folders:h,paper:i,scale:c},{folder:t,refused:b&&_&&!t?_.name:void 0})},T=e=>{e===`download`?x(!1):e===`folder`?x(!0):Wa().then(e=>{e&&(y(e),x(!0))})},E=(e,t)=>e.find(([e])=>e===t)?.[1]??t;return(0,j.jsxs)(`div`,{className:`xf-export`,role:`dialog`,"aria-modal":`true`,"aria-label":O(`导出`),ref:S,children:[(0,j.jsx)(Us,{label:O(`导出格式`),value:E(Is,n),groups:[Is],onPick:e=>r(e)}),(0,j.jsx)(Us,{label:O(`页面内容`),value:E(Ls,o),groups:[Ls],onPick:e=>s(e)}),n===`pdf`&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Us,{label:O(`页面格式`),value:i,groups:Rs,onPick:e=>a(e)}),(0,j.jsxs)(`div`,{className:`xf-row xf-scale-row`,children:[(0,j.jsx)(`div`,{className:`xf-label`,children:O(`比例百分比`)}),(0,j.jsx)(`input`,{className:`xf-scale`,type:`text`,inputMode:`decimal`,"aria-label":O(`比例百分比`),value:d,onChange:e=>{f(e.target.value);let t=parseFloat(e.target.value.replace(/[%\s]/g,``));Number.isNaN(t)||u(t/100)},onKeyDown:e=>{e.key===`Enter`&&w()}})]}),!Bs(c)&&(0,j.jsx)(`div`,{className:`xf-error`,children:O(`比例百分比必须是 10 到 200 之间的数字`)})]}),Fa&&(0,j.jsx)(Us,{label:O(`保存到`),value:b&&_?_.name:O(`浏览器下载`),groups:[[[`download`,O(`浏览器下载`)],..._?[[`folder`,_.name]]:[]],[[`choose`,O(`选择文件夹…`)]]],onPick:T}),(0,j.jsx)(Ws,{label:O(`包含子页面`),on:p,onChange:m}),(0,j.jsx)(Ws,{label:O(`为子页面创建文件夹`),on:h,disabled:!p,onChange:g}),(0,j.jsxs)(`div`,{className:`xf-actions`,children:[(0,j.jsx)(`div`,{role:`button`,tabIndex:0,className:`xf-btn gray`,onClick:js,onKeyDown:e=>{Vs(e)&&(e.preventDefault(),js())},children:O(`取消`)}),(0,j.jsx)(`div`,{role:`button`,tabIndex:0,className:`xf-btn blue`,"aria-disabled":!C||void 0,onClick:()=>void w(),onKeyDown:e=>{Vs(e)&&(e.preventDefault(),w())},children:O(`导出`)})]})]})}function Us({label:e,value:t,groups:n,onPick:r}){let i=(0,l.useRef)(null),a=`export-${e}`,o=vt(a),s=()=>{let e=n.flatMap((e,t)=>[...t?[{kind:`sep`}]:[],...e.map(([e,t])=>({label:t,onSelect:()=>r(e)}))]);_t(i.current,e,{ownerKey:a,placement:`bottom-end`,className:`menu-select`})};return(0,j.jsxs)(`div`,{className:`xf-row`,children:[(0,j.jsx)(`div`,{className:`xf-label`,children:e}),(0,j.jsxs)(`div`,{ref:i,role:`button`,tabIndex:0,"aria-haspopup":`menu`,className:h(`xf-select`,o&&`open`),onClick:s,onKeyDown:e=>{Vs(e,[`Enter`,` `,`ArrowDown`])&&(e.preventDefault(),s())},children:[(0,j.jsx)(`span`,{children:t}),(0,j.jsx)(N,{name:`chevronDown`})]})]})}function Ws({label:e,on:t,disabled:n=!1,onChange:r}){let i=()=>{n||r(!t)};return(0,j.jsxs)(`div`,{className:`xf-row xf-switch-row`,children:[(0,j.jsx)(`div`,{className:`xf-label`,children:e}),(0,j.jsx)(`div`,{role:`switch`,"aria-label":e,"aria-checked":t,"aria-disabled":n||void 0,tabIndex:n?-1:0,className:h(`xf-switch`,t&&`on`,n&&`disabled`),onClick:i,onKeyDown:e=>{Vs(e)&&(e.preventDefault(),i())},children:(0,j.jsx)(`span`,{})})]})}var Gs=[...Object.values(Ca).flat(),`image/*`].join(`,`);function Ks({parent:e}){let[t,n]=(0,l.useState)(!1),r=(0,l.useRef)(0),i=f(R);(0,l.useEffect)(()=>Ce(js),[]);let a=t=>{js(),Eo(t,e)},o=()=>{let e=document.createElement(`input`);e.type=`file`,e.multiple=!0,e.accept=Gs,e.addEventListener(`change`,()=>{e.files?.length&&a([...e.files])}),e.click()},s=e=>e.dataTransfer?.types.includes(`Files`),c=e&&i.reports[e]?O(`导入到「{0}」下面`,mi(i.reports[e])):O(`导入为顶层页面`);return(0,j.jsxs)(`div`,{className:`xf-import`,role:`dialog`,"aria-modal":`true`,"aria-label":O(`导入`),onDragEnter:e=>{s(e)&&(e.preventDefault(),r.current+=1,n(!0))},onDragLeave:()=>{--r.current,r.current<=0&&(r.current=0,n(!1))},onDragOver:e=>{s(e)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`)},onDrop:e=>{e.dataTransfer?.files.length&&(e.preventDefault(),r.current=0,n(!1),a([...e.dataTransfer.files]))},children:[(0,j.jsxs)(`div`,{className:`xf-import-head`,children:[(0,j.jsx)(`div`,{className:`xf-import-title`,children:O(`导入`)}),(0,j.jsx)(`div`,{className:`xf-import-where`,children:c})]}),(0,j.jsxs)(`div`,{role:`button`,tabIndex:0,"aria-label":O(`选择要导入的文件`),className:h(`xf-drop`,t&&`dragging`),onClick:o,onKeyDown:e=>{Vs(e)&&(e.preventDefault(),o())},children:[(0,j.jsx)(N,{name:`upload`}),(0,j.jsxs)(`div`,{className:`xf-drop-main`,children:[O(`拖放文件到这里,或`),(0,j.jsx)(`span`,{className:`xf-choose`,children:O(`选择文件`)})]}),(0,j.jsx)(`div`,{className:`xf-drop-kinds`,children:O(`Markdown、HTML、Word、PDF、EPUB、CSV 或 ZIP`)})]}),(0,j.jsx)(`div`,{className:`xf-import-note`,children:O(`ZIP 里的每个文件都会成为一个页面,最大 5GB`)})]})}var qs=d(!1);function Js(){ht(),qs.set(!0)}function Ys(){return f(qs)?(0,A.createPortal)((0,j.jsx)(_c,{}),document.body):null}var Xs=()=>qs.set(!1),Zs=e=>ce===`en`?e.en:e.zh,Qs={normal:O(`正常`),hidden:O(`不在文档菜单里`),disabled:O(`已停用`),broken:O(`没有加载`)},$s={document:O(`文档@place`),page:O(`自定义页`)},ec=O(`在文档菜单里显示`),tc=O(`在所有菜单里提供`),nc=O(`总开关关掉后,“/”、添加自定义块和表格的「视图」里都不再提供它;已经写在文档和页面里的块照常显示。`),rc=O(`出现在 “/”、在下方新建和手柄的网格里;关掉后已有的块照常运行和导出,自定义页里照样能添加`),ic=O(`块包的开关关掉后,它的块都不在 “/”、添加自定义块和表格的「视图」里;已经写在文档和页面里的块照常显示。`),ac=e=>e===`workspace`?O(`工作区的数据`):e===`tables`?O(`文档里的表格`):e.startsWith(`net:`)?O(`联网:{0}`,e.slice(4)):e;function oc(e){if(!e.places)return null;let t=O(`用在:{0}`,[`document`,`page`].filter(t=>e.places?.includes(t)).map(e=>$s[e]).join(O(`、`)));return e.needs?.length?O(`{0} · 要用:{1}`,t,e.needs.map(ac).join(O(`、`))):t}function sc({label:e,on:t,locked:n=!1,tip:r,onChange:i}){return(0,j.jsx)(`button`,{type:`button`,role:`switch`,className:`comp-toggle`,"aria-label":e,"aria-checked":t,"aria-disabled":n,"data-tip":r,onClick:()=>{n||i(!t)},children:(0,j.jsx)(`span`,{className:h(`mi-switch`,t&&`on`),children:(0,j.jsx)(`span`,{})})})}function cc({label:e,name:t,hint:n,on:r,locked:i=!1,tip:a,onChange:o}){return(0,j.jsxs)(`button`,{type:`button`,role:`switch`,className:`comp-opt`,"aria-label":O(`{0}:{1}`,e,t),"aria-checked":r,"aria-disabled":i,"data-tip":a,onClick:()=>{i||o(!r)},children:[(0,j.jsxs)(`span`,{className:`comp-opt-text`,children:[(0,j.jsx)(`span`,{className:`comp-toggle-name`,children:e}),n&&(0,j.jsx)(`span`,{className:`comp-opt-hint`,children:n})]}),(0,j.jsx)(`span`,{className:h(`mi-switch`,r&&`on`),children:(0,j.jsx)(`span`,{})})]})}function lc(e){return e.reason?O(`{0}:{1}`,Qs[e.state],Zs(e.reason)):e.template||e.state===`disabled`?Qs[e.state]:O(`{0}:没有能用的模板,菜单里不会出现`,Qs[e.state])}function uc({item:e,icon:t,frozen:n,flip:r,allowNet:i}){let[a,o]=(0,l.useState)(!1),s=e.name?Zs(e.name):e.id,c=e.reason!==null||n,u=n?O(`改好 gallery.json 之后才能改这里`):c?O(`这个自定义块没有加载,开关不起作用`):void 0,d=oc(e),f=(e.places??[`document`]).includes(`document`),p=t=>r(f?{id:e.id,hidden:!t}:{id:e.id,shown:t}),m=cs(e.needs??[]),h=m.length>0&&m.every(t=>e.allowed.includes(t)),g=e.state===`disabled`||e.state===`broken`;return(0,j.jsxs)(`div`,{className:`comp-row comp-pkg`,"data-id":e.id,"data-open":a?``:void 0,children:[(0,j.jsxs)(`div`,{className:`comp-line`,children:[(0,j.jsxs)(`button`,{type:`button`,className:`comp-head`,"aria-expanded":a,onClick:()=>o(!a),children:[(0,j.jsx)(`span`,{className:`comp-icon`,"aria-hidden":`true`,dangerouslySetInnerHTML:{__html:t}}),(0,j.jsx)(`span`,{className:`comp-name`,children:s}),(0,j.jsx)(`span`,{className:`comp-chev`,"aria-hidden":`true`,children:(0,j.jsx)(N,{name:`chevron`})}),g&&(0,j.jsx)(`span`,{className:`comp-tag`,children:Qs[e.state]})]}),(0,j.jsx)(sc,{label:O(`{0}:{1}`,tc,s),on:!e.unlisted,locked:c,tip:u??nc,onChange:t=>r({id:e.id,unlisted:!t})})]}),a&&(0,j.jsxs)(`div`,{className:`comp-detail`,children:[(0,j.jsx)(`div`,{className:`comp-meta`,children:[e.name&&e.id,e.version].filter(Boolean).join(` · `)}),e.description&&(0,j.jsx)(`div`,{className:`comp-note`,children:Zs(e.description)}),d&&(0,j.jsx)(`div`,{className:`comp-note comp-uses`,children:d}),(0,j.jsx)(`div`,{className:`comp-note comp-state`,children:lc(e)}),e.newer&&(0,j.jsx)(`div`,{className:`comp-note comp-newer`,children:O(`Gallery 有新版本 {0}。这份副本添加后改过,所以不会自动更新;要换成新版本,删掉工作区里的 components/{1} 文件夹(改动会丢掉),再运行 gallery block add {2}。`,e.newer,e.id,e.addAs??e.id.slice(e.id.indexOf(`/`)+1))}),(0,j.jsx)(`div`,{className:`comp-note comp-master`,children:nc}),(0,j.jsxs)(`div`,{className:`comp-opts`,children:[(0,j.jsx)(cc,{label:ec,name:s,hint:rc,on:e.menu,locked:c,tip:u,onChange:p}),(0,j.jsx)(cc,{label:O(`停用`),name:s,hint:O(`不加载它的脚本和样式,已有的块只显示内容`),on:e.disabled||e.state===`disabled`,locked:c,tip:u,onChange:t=>r({id:e.id,disabled:t})}),m.length>0&&(0,j.jsx)(cc,{label:O(`允许联网`),name:s,hint:O(`允许它从这些网站取数据:{0}`,m.join(O(`、`))),on:h,locked:c,tip:u,onChange:t=>t?i(e.id):r({id:e.id,net:!1})})]})]})]})}function dc({pack:e,fallback:t}){return e.icon?(0,j.jsx)(`span`,{className:`comp-pack-icon`,"aria-hidden":`true`,children:e.icon}):(0,j.jsx)(`span`,{className:`comp-pack-icon`,"aria-hidden":`true`,dangerouslySetInnerHTML:{__html:t}})}function fc({pack:e,icon:t,frozen:n,open:r,flipPack:i}){let a=Zs(e.name);return(0,j.jsxs)(`div`,{className:`comp-pack`,"data-pack":e.id,"data-off":e.enabled?void 0:``,children:[(0,j.jsxs)(`button`,{type:`button`,className:`comp-pack-open`,"aria-label":O(`打开块包「{0}」`,a),onClick:()=>r(e.id),children:[(0,j.jsx)(dc,{pack:e,fallback:t}),(0,j.jsxs)(`span`,{className:`comp-pack-words`,children:[(0,j.jsx)(`span`,{className:`comp-pack-name`,children:a}),(0,j.jsxs)(`span`,{className:`comp-pack-meta`,children:[(0,j.jsx)(`span`,{className:`comp-pack-count`,children:O(`{0} 个块`,e.blocks)}),e.author&&(0,j.jsx)(`span`,{className:`comp-pack-author`,children:e.author})]})]})]}),(0,j.jsx)(sc,{label:O(`{0}:{1}`,O(`启用块包`),a),on:e.enabled,locked:n,tip:n?O(`改好 gallery.json 之后才能改这里`):ic,onChange:t=>i(e.id,t)})]})}function pc(e){let t=new Uint8Array(e),n=``;for(let e=0;e<t.length;e+=32768)n+=String.fromCharCode(...t.subarray(e,e+32768));return btoa(n)}function mc({done:e}){let[t,n]=(0,l.useState)(``),[r,i]=(0,l.useState)(``),[a,o]=(0,l.useState)(!1),s=(0,l.useRef)(null),c=(0,l.useRef)(null);(0,l.useEffect)(()=>{s.current?.focus()},[]);let u=async t=>{if(!a){o(!0),i(``);try{e(await Or(t))}catch(e){i(e.message)}finally{o(!1)}}},d=async e=>{e&&(c.current&&(c.current.value=``),await u({zip:pc(await e.arrayBuffer())}))};return(0,j.jsxs)(`div`,{className:`comp-import`,children:[(0,j.jsxs)(`div`,{className:`comp-import-row`,children:[(0,j.jsx)(`input`,{ref:s,className:`pop-input`,name:`pack-path`,spellCheck:!1,placeholder:O(`粘贴块包的文件夹或 zip 的路径`),value:t,onChange:e=>{n(e.target.value),i(``)},onKeyDown:e=>{e.key===`Enter`&&!e.nativeEvent.isComposing&&t.trim()&&(e.preventDefault(),u({path:t.trim()}))}}),(0,j.jsx)(`button`,{type:`button`,className:h(`dialog-btn primary comp-import-confirm`,a&&`busy`),disabled:a||!t.trim(),onClick:()=>void u({path:t.trim()}),children:O(`确认`)})]}),(0,j.jsx)(`button`,{type:`button`,className:`comp-import-pick`,disabled:a,onClick:()=>c.current?.click(),children:O(`选择 zip 文件…`)}),(0,j.jsx)(`input`,{ref:c,type:`file`,accept:`.zip,application/zip`,hidden:!0,onChange:e=>void d(e.target.files?.[0])}),r&&(0,j.jsx)(`div`,{className:`comp-import-error`,role:`alert`,children:r})]})}function hc({pack:e,packages:t,icon:n,frozen:r,flip:i,allowNet:a,flipPack:o,back:s}){let c=Zs(e.name),u=(0,l.useRef)(null);(0,l.useEffect)(()=>{u.current?.focus()},[]);let d=[e.kind===`official`?O(`Gallery 自带`):e.kind===`own`?O(`工作区自己写的块`):null,e.version,e.kind===`official`?null:e.author].filter(Boolean).join(` · `);return(0,j.jsxs)(`div`,{className:`comp-pack-view`,"data-pack":e.id,children:[(0,j.jsxs)(`button`,{type:`button`,ref:u,className:`comp-back`,onClick:s,children:[(0,j.jsx)(`span`,{"aria-hidden":`true`,children:`‹`}),` `,O(`返回`)]}),(0,j.jsxs)(`div`,{className:`comp-pack-head`,children:[(0,j.jsx)(dc,{pack:e,fallback:n}),(0,j.jsxs)(`span`,{className:`comp-pack-words`,children:[(0,j.jsx)(`span`,{className:`comp-pack-name`,children:c}),d&&(0,j.jsx)(`span`,{className:`comp-pack-meta`,children:d})]}),(0,j.jsx)(sc,{label:O(`{0}:{1}`,O(`启用块包`),c),on:e.enabled,locked:r,tip:r?O(`改好 gallery.json 之后才能改这里`):ic,onChange:t=>o(e.id,t)})]}),e.description&&(0,j.jsx)(`div`,{className:`comp-note comp-pack-says`,children:Zs(e.description)}),e.problem&&(0,j.jsx)(`div`,{className:`comp-note comp-pack-problem`,children:O(`pack.json 读不出来:{0}`,Zs(e.problem))}),!e.enabled&&(0,j.jsx)(`div`,{className:`comp-note comp-pack-off`,children:O(`这个块包关着:它的块都不在 “/”、添加自定义块和表格的「视图」里;已经写在文档和页面里的块照常显示。`)}),e.changed.length>0&&(0,j.jsx)(`div`,{className:`comp-note comp-newer`,children:e.newer?O(`这个块包装上后改过({0}),Gallery 的新版本 {1} 不会换上改过的部分;没改过的块照常更新。`,e.changed.join(O(`、`)),e.newer):O(`这个块包装上后改过({0}):再装一次新版本时,改过的部分保持不变。`,e.changed.join(O(`、`)))}),t.length>0?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`div`,{className:`comp-lead`,children:O(`每个块右边的开关管 “/”、添加自定义块和表格的「视图」里提不提供它,默认打开;点一行看它的说明和别的开关。`)}),t.map(e=>(0,j.jsx)(uc,{item:e,icon:n,frozen:r,flip:i,allowNet:a},e.id))]}):(0,j.jsx)(`div`,{className:`comp-empty`,children:O(`这个块包里还没有块。`)})]})}function gc({item:e,frozen:t,flip:n}){let r=Zs(e.name),i=t?O(`改好 gallery.json 之后才能改这里`):e.hideable?void 0:O(`这个块总在文档菜单里`);return(0,j.jsxs)(`div`,{className:`comp-row comp-block`,"data-id":e.id,children:[e.icon&&(0,j.jsx)(`span`,{className:`comp-icon`,"aria-hidden":`true`,dangerouslySetInnerHTML:{__html:e.icon}}),(0,j.jsx)(`div`,{className:`comp-name`,children:r}),(0,j.jsx)(sc,{label:O(`{0}:{1}`,ec,r),on:!e.hidden,locked:!e.hideable||t,tip:i,onChange:t=>n({id:e.id,hidden:!t})})]})}function _c(){let[e,t]=(0,l.useState)(null),[n,r]=(0,l.useState)(null),[i,a]=(0,l.useState)(!1),o=(0,l.useRef)(null),s=(0,l.useRef)(null);(0,l.useEffect)(()=>{n!==null||!s.current||(o.current?.querySelector(`.comp-pack[data-pack="${CSS.escape(s.current)}"] .comp-pack-open`)?.focus(),s.current=null)},[n]),(0,l.useEffect)(()=>{let e=!0,n=()=>Tr().then(n=>{e&&t(n)},e=>{Xs(),P(e.message,{tone:`error`})});n();let r=kr(n),i=Ce(Xs),a=document.activeElement;return o.current?.querySelector(`.pref-close`)?.focus(),()=>{e=!1,r(),i(),a?.focus()}},[]);let c=e=>{if(e.key!==`Tab`)return;let t=[...e.currentTarget.querySelectorAll(`button:not([disabled]), input:not([hidden])`)],[n,r]=e.shiftKey?[t[0],t.at(-1)]:[t.at(-1),t[0]];document.activeElement===n&&(e.preventDefault(),r?.focus())},u=e=>{Er(e).then(t,e=>P(O(`设置没有保存:{0}`,e.message),{tone:`error`}))},d=(e,n)=>{Dr(e,n).then(t,e=>P(O(`设置没有保存:{0}`,e.message),{tone:`error`}))},f=e=>{t(e),a(!1);let n=Zs(e.installed.name);P(e.installed.did===`installed`?O(`已导入块包「{0}」{1}`,n,e.installed.version):e.installed.did===`updated`?O(`块包「{0}」已更新到 {1}`,n,e.installed.version):O(`块包「{0}」{1} 已经装好了`,n,e.installed.version))},p=()=>{s.current=n,r(null)},m=n=>{ls(n,e??void 0).then(e=>{e&&Tr().then(t,()=>{})})};return(0,j.jsx)(`div`,{className:`pref-overlay`,onPointerDown:e=>{e.target===e.currentTarget&&Xs()},children:(0,j.jsxs)(`div`,{className:`pref-dialog comp-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":O(`组件列表`),ref:o,onKeyDown:c,children:[(0,j.jsxs)(`header`,{className:`pref-head`,children:[(0,j.jsx)(`span`,{className:`pref-title`,children:O(`组件列表`)}),(0,j.jsx)(`span`,{className:`pref-sub`,children:O(`文档菜单里出现哪些块,这个工作区加载哪些自定义块。`)}),(0,j.jsx)(`div`,{className:`pref-actions`,children:(0,j.jsx)(`button`,{className:`icon-btn pref-close`,"aria-label":O(`关闭`),"data-tip":O(`关闭`),onClick:Xs,children:(0,j.jsx)(N,{name:`close`})})})]}),(0,j.jsx)(`div`,{className:`comp-body`,"aria-busy":!e,children:e&&(0,j.jsxs)(j.Fragment,{children:[e.problem&&(0,j.jsx)(`div`,{className:`comp-problem`,role:`alert`,children:Zs(e.problem)}),(0,j.jsx)(`h3`,{className:`comp-group`,children:O(`自定义块`)}),(()=>{let t=n===null?null:e.packs.find(e=>e.id===n);return t?(0,j.jsx)(hc,{pack:t,packages:e.packages.filter(e=>e.pack===t.id),icon:e.packageIcon,frozen:!!e.problem,flip:u,allowNet:m,flipPack:d,back:p}):(0,j.jsxs)(j.Fragment,{children:[e.packs.length>0?(0,j.jsx)(`div`,{className:`comp-lead`,children:O(`自定义块按块包放:每个块包右边的开关管它的块在 “/”、添加自定义块和表格的「视图」里提不提供;点一个块包看它的块。`)}):(0,j.jsx)(`div`,{className:`comp-empty`,children:O(`这个工作区还没有自定义块:让 Agent 做一个,或导入一个块包,它们放在工作区的 components 文件夹里。`)}),(0,j.jsxs)(`div`,{className:`comp-packs`,children:[e.packs.map(t=>(0,j.jsx)(fc,{pack:t,icon:e.packageIcon,frozen:!!e.problem,open:r,flipPack:d},t.id)),(0,j.jsxs)(`button`,{type:`button`,className:`comp-pack comp-pack-add`,"aria-expanded":i,onClick:()=>a(!i),children:[(0,j.jsx)(`span`,{className:`comp-pack-icon`,"aria-hidden":`true`,children:(0,j.jsx)(N,{name:`plus`})}),(0,j.jsx)(`span`,{className:`comp-pack-name`,children:O(`导入`)})]})]}),i&&(0,j.jsx)(mc,{done:f})]})})(),n===null&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`h3`,{className:`comp-group`,children:O(`内置块`)}),(0,j.jsx)(`div`,{className:`comp-lead`,children:O(`每个块右边的开关是「在文档菜单里显示」:关掉的块不再出现在 “/”、在下方新建和手柄的网格里,已有的块照常。`)}),e.blocks.map(t=>(0,j.jsx)(gc,{item:t,frozen:!!e.problem,flip:u},t.id))]})]})})]})})}var vc=d(null),yc=0;async function bc(){ht();let e=++yc;vc.set({id:e,slug:null,unshown:[]});let t=()=>vc.get()?.id===e;try{let n=R.get().instructions;n||(n=(await Pr()).slug,await z());let{unshown:r}=await ja({opening:!0});if(!t())return;xc(n),vc.set({id:e,slug:n,unshown:r})}catch(e){t()&&wc(),P(e.message)}}function xc(e){let t=w.flatMap(([t,n])=>[`${t}${e}:`,`${n}${e}:`]);for(let e of[()=>localStorage,()=>sessionStorage])try{let n=e();for(let e of Object.keys(n))t.some(t=>e.startsWith(t))&&n.removeItem(e)}catch{}}function Sc(){let e=f(vc);return e?(0,A.createPortal)((0,j.jsx)(Ec,{...e},e.id),document.body):null}var Cc=e=>{let t=[...e[0]].length>40?`${[...e[0]].slice(0,40).join(``)}…`:e[0];return e.length===1?O(`写作偏好里有一处这里显示不了:{0}。Agent 照样读得到;在这里保存后,它会被去掉。`,t):O(`写作偏好里有 {0} 处这里显示不了,例如:{1}。Agent 照样读得到;在这里保存后,它们会被去掉。`,e.length,t)},wc=()=>vc.set(null);function Tc(e){try{e?.contentWindow?.dispatchEvent(new CustomEvent(`doc-theme-request`,{detail:{theme:_e(he.get())?`dark`:`light`}}))}catch{}}function Ec({slug:e,unshown:t}){let n=(0,l.useRef)(null),[r,i]=(0,l.useState)(null),a=r??t,[o,s]=(0,l.useState)(!1),c=(0,l.useRef)(!1),u=(0,l.useRef)(0),d=(0,l.useRef)(0),[f,p]=(0,l.useState)(!1),[m,h]=(0,l.useState)(!1),g=(0,l.useRef)(!1),_=async()=>{if(!(!c.current||g.current||u.current===d.current)){g.current=!0,h(!0);try{let e=n.current?.contentWindow,t=e?.__galleryEditFlush?await e.__galleryEditFlush():`nothing`;if(t!==`saved`&&t!==`nothing`)throw Error(O(`页面上的修改还没有存好,请稍后再试`));let r=u.current,a=await ja();d.current=r,p(u.current!==r),i(a.unshown),P(O(`已保存。`),{routine:!0})}catch(e){P(O(`写作偏好没有保存:{0}`,e.message),{tone:`error`})}finally{g.current=!1,h(!1)}}},v=(0,l.useRef)(_);v.current=_;let y=e=>{!(e.ctrlKey||e.metaKey)||e.altKey||e.shiftKey||e.key.toLowerCase()!==`s`||(e.preventDefault(),e.stopPropagation(),v.current())};(0,l.useEffect)(()=>{window.addEventListener(`keydown`,y,!0);let e=Ce(wc),t=he.subscribe(()=>Tc(n.current));return()=>{window.removeEventListener(`keydown`,y,!0),e(),t()}},[]),(0,l.useEffect)(()=>{let t=n.current;if(!e||!t)return;let r=!0,i=()=>{!r||c.current||(c.current=!0,s(!0))},a=Es(t,()=>{Tc(t),Cs(t).then(i)}),o=window.setTimeout(i,Ss);return()=>{r=!1,a(),clearTimeout(o)}},[e]);let b=(0,l.useRef)(null);return(0,l.useEffect)(()=>()=>b.current?.disconnect(),[]),(0,j.jsx)(`div`,{className:`pref-overlay`,onPointerDown:e=>{e.target===e.currentTarget&&wc()},children:(0,j.jsxs)(`div`,{className:`pref-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":O(`写作偏好`),children:[(0,j.jsxs)(`header`,{className:`pref-head`,children:[(0,j.jsx)(`span`,{className:`pref-title`,children:O(`写作偏好`)}),(0,j.jsx)(`span`,{className:`pref-sub`,children:O(`Agent 写报告时照着写的规则:写什么、怎么写、怎样忠于材料。每次写报告前它都会先读这里。`)}),(0,j.jsxs)(`div`,{className:`pref-actions`,children:[(0,j.jsx)(`button`,{className:`pref-save`,onClick:()=>void _(),disabled:!o||!f||m,children:O(`保存`)}),(0,j.jsx)(`button`,{className:`icon-btn pref-close`,"aria-label":O(`关闭`),"data-tip":O(`关闭`),onClick:wc,children:(0,j.jsx)(N,{name:`close`})})]})]}),a.length>0&&(0,j.jsx)(`div`,{className:`pref-note`,children:Cc(a)}),(0,j.jsxs)(`div`,{className:`pref-body`,"aria-busy":!o,children:[e&&(0,j.jsx)(`iframe`,{ref:n,className:`pref-frame`,"data-pending":o?void 0:``,title:O(`写作偏好`),src:`/generated/${e}.html?solo`,onLoad:()=>{let e=n.current?.contentWindow,t=n.current?.contentDocument?.documentElement;!e||!t||(Tc(n.current),b.current?.disconnect(),b.current=new MutationObserver(()=>{t.getAttribute(`data-ge-save`)!==`saved`&&(u.current+=1,p(!0))}),b.current.observe(t,{attributes:!0,attributeFilter:[`data-ge-save`]}),e.addEventListener(`keydown`,y,!0))}}),!o&&(0,j.jsx)(`div`,{className:`pref-loading`,role:`progressbar`,"aria-label":O(`正在打开写作偏好…`)})]})]})})}var Dc=d(null);function Oc(e){ht();let t=Jt(`save`)?I(`save`):Promise.resolve(null);kc=Promise.race([t,new Promise(e=>setTimeout(e,1500))]),Dc.set(e),document.documentElement.requestFullscreen?.().catch(()=>{})}var kc=Promise.resolve();function Ac(){let e=f(Dc);return e?(0,A.createPortal)((0,j.jsx)(Uc,{slug:e}),document.body):null}var jc=[{tool:`pointer`,icon:`pointer`,label:O(`指针`),key:`V`},{tool:`laser`,icon:`laser`,label:O(`激光笔`),key:`L`},{tool:`pen`,icon:`pen`,label:O(`画笔`),key:`P`},{tool:`marker`,icon:`marker`,label:O(`荧光笔`),key:`H`},{tool:`eraser`,icon:`eraser`,label:O(`橡皮擦`),key:`E`}],Mc={pen:{color:`#e03e3e`,width:3},marker:{color:`rgba(255, 204, 0, 0.6)`,width:18}},Nc=450,Pc={color:`#ff2d2d`,rgb:[255,45,45],alpha:.55},Fc=10,Ic=Array.from({length:16},(e,t)=>(50+t*10)/100),Lc=30,Rc=50,zc=y.presentZoom,Bc=()=>{let e=v.get(zc);return typeof e==`number`&&Ic.includes(e)?e:1},Vc=`input:not([type="checkbox"], [type="radio"], [type="button"], [type="submit"], [type="reset"], [type="file"], [type="color"]), textarea, select, [contenteditable]:not([contenteditable="false"]), [data-doc-component]`;function Hc(e,t,n){let r=n.x-t.x,i=n.y-t.y,a=r||i?Math.max(0,Math.min(1,((e.x-t.x)*r+(e.y-t.y)*i)/(r*r+i*i))):0;return Math.hypot(e.x-(t.x+a*r),e.y-(t.y+a*i))}function Uc({slug:e}){let t=(0,l.useRef)(null),n=(0,l.useRef)(null),[r,i]=(0,l.useState)(null),[a,o]=(0,l.useState)(`pointer`),[s,c]=(0,l.useState)(0),[u,d]=(0,l.useState)(``),[f,p]=(0,l.useState)(!1),m=(0,l.useRef)(0),[g,_]=(0,l.useState)(Bc),y=(0,l.useRef)(g),b=(0,l.useRef)([]),x=(0,l.useRef)([]),S=(0,l.useRef)(null),C=(0,l.useRef)(null),w=(0,l.useRef)([]),T=(0,l.useRef)(null),E=(0,l.useRef)(0),D=(0,l.useRef)(0),ee=()=>{Dc.set(null),document.fullscreenElement&&document.exitFullscreen().catch(()=>{})},te=()=>{let e=t.current?.contentWindow;try{return e?.document?e:null}catch{return null}},ne=()=>{let e=te();return{x:e?.scrollX??0,y:e?.scrollY??0}},re=()=>{let e=n.current,t=e?.getContext(`2d`);if(!e||!t)return;let r=(devicePixelRatio||1)*y.current,{x:i,y:a}=ne();t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.width,e.height),t.setTransform(r,0,0,r,-i*r,-a*r),t.lineCap=`round`,t.lineJoin=`round`;for(let e of[...b.current,...S.current?[S.current]:[]]){let[n,...r]=e.points;t.beginPath(),t.moveTo(n.x,n.y),r.length||t.lineTo(n.x+.01,n.y),r.forEach((e,n)=>{let i=r[n+1];i?t.quadraticCurveTo(e.x,e.y,(e.x+i.x)/2,(e.y+i.y)/2):t.lineTo(e.x,e.y)}),t.strokeStyle=Mc[e.tool].color,t.lineWidth=Mc[e.tool].width,t.stroke()}let o=performance.now();w.current=w.current.filter((e,t,n)=>o-e.at<Nc||t===n.length-1);let s=w.current;if(s.length>1){let n=T.current??=document.createElement(`canvas`);(n.width!==e.width||n.height!==e.height)&&(n.width=e.width,n.height=e.height);let c=n.getContext(`2d`);if(c){c.setTransform(1,0,0,1,0,0),c.clearRect(0,0,n.width,n.height),c.setTransform(r,0,0,r,-i*r,-a*r),c.lineCap=`round`,c.lineJoin=`round`;let l=getComputedStyle(e).mixBlendMode===`screen`,u=l?`lighten`:`darken`;c.globalCompositeOperation=u;let d=(e,t)=>({x:(e.x+t.x)/2,y:(e.y+t.y)/2});for(let e=1;e<s.length;e++){let t=Math.max(0,1-(o-s[e].at)/Nc),n=Pc.alpha*t,[r,i,a]=Pc.rgb.map(e=>Math.round(l?e*n:255-(255-e)*n));c.strokeStyle=`rgb(${r}, ${i}, ${a})`;let u=s[e],f=e===1?s[0]:d(s[e-1],u),p=s[e+1];if(c.beginPath(),c.moveTo(f.x,f.y),p){let e=d(u,p);c.quadraticCurveTo(u.x,u.y,e.x,e.y)}else c.lineTo(u.x,u.y);c.lineWidth=(4*t+1)/y.current,c.stroke()}t.save(),t.setTransform(1,0,0,1,0,0),t.globalCompositeOperation=u,t.drawImage(n,0,0),t.restore()}}let c=s[s.length-1];c&&(t.save(),t.shadowColor=`rgba(255, 30, 30, 0.9)`,t.shadowBlur=14,t.fillStyle=Pc.color,t.beginPath(),t.arc(c.x,c.y,5/y.current,0,Math.PI*2),t.fill(),t.restore()),s.length>1&&(D.current=requestAnimationFrame(re))},ie=()=>{cancelAnimationFrame(D.current),D.current=requestAnimationFrame(re)},ae=()=>{c(b.current.length),ie()},oe=()=>{let e=x.current.pop();if(e){if(e.kind===`add`)b.current=b.current.filter(t=>t!==e.stroke);else if(e.kind===`erase`)for(let{stroke:t,index:n}of[...e.erased].reverse())b.current.splice(n,0,t);else b.current=e.strokes;ae()}},se=()=>{b.current.length&&(x.current.push({kind:`clear`,strokes:b.current}),b.current=[],ae())},ce=e=>{let t=Fc/y.current;for(let n=b.current.length-1;n>=0;n--){let r=b.current[n],i=Mc[r.tool].width/2;r.points.some((n,a)=>Hc(e,r.points[Math.max(0,a-1)],n)<=t+i)&&(b.current.splice(n,1),(C.current??=[]).push({stroke:r,index:n}))}ae()},le=e=>{y.current=e,_(e),v.set(zc,e),ie()},ue=e=>{let t=Ic.indexOf(y.current),n=Ic[Math.max(0,Math.min(Ic.length-1,(t<0?Ic.indexOf(1):t)+e))];n!==y.current&&le(n)},de=e=>{let n=t.current?.contentWindow,r=t.current?.contentDocument;if(!n||!r)return;let i=[...r.querySelectorAll(`main h2, main h1`)].filter(e=>e.getClientRects().length).map(e=>e.getBoundingClientRect().top-24),a=e>0?i.find(e=>e>4):i.filter(e=>e<-4).pop();n.scrollTo({top:a===void 0?e>0?r.documentElement.scrollHeight:0:n.scrollY+a,behavior:`smooth`})},fe=(0,l.useRef)(()=>{});fe.current=e=>{if(e.isComposing||e.target?.closest?.(Vc)&&(e.key!==`Escape`||e.defaultPrevented))return;let t=e.key.toLowerCase(),n=e.ctrlKey||e.metaKey;if(n&&t===`z`){e.preventDefault(),oe();return}if(n||e.altKey)return;let r=jc.find(e=>e.key.toLowerCase()===t);if(r)o(r.tool);else if(e.key===`ArrowRight`)de(1);else if(e.key===`ArrowLeft`)de(-1);else if(e.key===`+`||e.key===`=`)ue(1);else if(e.key===`-`||e.key===`_`)ue(-1);else if(e.key===`0`)le(1);else if(e.key===`Escape`)ee();else return;e.preventDefault()},(0,l.useEffect)(()=>Ce(ee),[]),(0,l.useEffect)(()=>{let e=0,n=n=>{n.source!==t.current?.contentWindow||n.origin!==location.origin||!Bt(n.data)||n.data.type!==`notice`||(d(n.data.text),clearTimeout(e),e=window.setTimeout(()=>d(``),3e3))};return addEventListener(`message`,n),()=>{clearTimeout(e),removeEventListener(`message`,n)}},[]),(0,l.useEffect)(()=>{let t=!0;return kc.then(()=>{t&&i(`/generated/${encodeURIComponent(e)}.html?present`)}),()=>{t=!1}},[e]),(0,l.useEffect)(()=>{let e=!!document.fullscreenElement,t=()=>{document.fullscreenElement?e=!0:e&&Dc.set(null)},r=e=>fe.current(e),i=()=>{let e=n.current;e&&(e.width=Math.round(innerWidth*(devicePixelRatio||1)),e.height=Math.round(innerHeight*(devicePixelRatio||1)),ie())};return i(),document.addEventListener(`fullscreenchange`,t),addEventListener(`keydown`,r),addEventListener(`resize`,i),()=>{document.removeEventListener(`fullscreenchange`,t),removeEventListener(`keydown`,r),removeEventListener(`resize`,i),cancelAnimationFrame(D.current)}},[]);let pe=()=>{clearTimeout(m.current),m.current=window.setTimeout(()=>p(!0),2500)};(0,l.useEffect)(()=>(pe(),()=>clearTimeout(m.current)),[]);let me=()=>{let e=te();e&&(e.dispatchEvent(new CustomEvent(`doc-theme-request`,{detail:{theme:_e(he.get())?`dark`:`light`}})),e.addEventListener(`scroll`,ie,{passive:!0}),e.addEventListener(`keydown`,e=>fe.current(e)),e.focus(),ie())},ge=e=>{let{x:t,y:n}=ne();return{x:e.clientX/y.current+t,y:e.clientY/y.current+n}},ve=e=>{if(e.ctrlKey)return;let{deltaY:t,deltaMode:n}=e;t&&(!(n!==0||Math.abs(t)>=Lc)&&(Math.sign(t)!==Math.sign(E.current)&&(E.current=0),E.current+=t,Math.abs(E.current)<Rc)||(E.current=0,ue(t<0?1:-1)))},ye=a===`pen`||a===`marker`;return(0,j.jsxs)(`div`,{className:`present`,"data-tool":a,children:[r&&(0,j.jsx)(`iframe`,{ref:t,className:`present-frame`,title:O(`演示`),src:r,onLoad:me,style:{width:`${100/g}%`,height:`${100/g}%`,transform:`scale(${g})`}}),(0,j.jsx)(`canvas`,{ref:n,className:`present-ink`,"data-strokes":s,onPointerDown:e=>{if(!(e.button!==0||!(ye||a===`eraser`))){if(e.currentTarget.setPointerCapture(e.pointerId),a===`eraser`){C.current=[],ce(ge(e));return}S.current={tool:a,points:[ge(e)]},ie()}},onPointerMove:e=>{if(S.current)S.current.points.push(ge(e)),ie();else if(C.current)ce(ge(e));else if(a===`laser`){let t=e.nativeEvent.getCoalescedEvents?.()??[],n=performance.now();for(let r of t.length?t:[e])w.current.push({...ge(r),at:n});ie()}},onPointerUp:()=>{if(C.current){C.current.length&&x.current.push({kind:`erase`,erased:C.current}),C.current=null;return}S.current&&(b.current.push(S.current),x.current.push({kind:`add`,stroke:S.current}),S.current=null,ae())},onPointerLeave:()=>{w.current=[],ie()},onWheel:e=>te()?.scrollBy({left:e.deltaX/y.current,top:e.deltaY/y.current})}),(0,j.jsxs)(`div`,{className:h(`present-bar`,f&&`idle`),role:`toolbar`,"aria-label":O(`演示`),onPointerEnter:()=>{clearTimeout(m.current),p(!1)},onPointerLeave:pe,children:[jc.map(e=>(0,j.jsx)(`button`,{className:`present-btn`,"aria-pressed":a===e.tool,"aria-label":e.label,"data-tip":e.label,"data-sub":e.tool===`eraser`?O(`{0} · 双击清除全部`,e.key):e.key,onClick:()=>o(e.tool),onDoubleClick:e.tool===`eraser`?se:void 0,children:(0,j.jsx)(N,{name:e.icon})},e.tool)),(0,j.jsx)(`span`,{className:`present-sep`}),(0,j.jsx)(`button`,{className:`present-btn`,"aria-label":O(`缩小`),"data-tip":O(`缩小`),"data-sub":`−`,disabled:g<=Ic[0],onClick:()=>ue(-1),children:(0,j.jsx)(N,{name:`minus`})}),(0,j.jsxs)(`button`,{className:`present-zoom`,"aria-label":O(`缩放比例`),"data-tip":O(`恢复到 100%`),"data-sub":`0`,onClick:()=>le(1),onWheel:ve,children:[Math.round(g*100),`%`]}),(0,j.jsx)(`button`,{className:`present-btn`,"aria-label":O(`放大`),"data-tip":O(`放大`),"data-sub":`+`,disabled:g>=Ic[Ic.length-1],onClick:()=>ue(1),children:(0,j.jsx)(N,{name:`plus`})}),(0,j.jsx)(`span`,{className:`present-sep`}),(0,j.jsx)(`button`,{className:`present-btn`,"aria-label":O(`上一节`),"data-tip":O(`上一节`),"data-sub":`←`,onClick:()=>de(-1),children:(0,j.jsx)(N,{name:`chevronUp`})}),(0,j.jsx)(`button`,{className:`present-btn`,"aria-label":O(`下一节`),"data-tip":O(`下一节`),"data-sub":`→`,onClick:()=>de(1),children:(0,j.jsx)(N,{name:`chevronDown`})}),(0,j.jsx)(`span`,{className:`present-sep`}),(0,j.jsx)(`button`,{className:`present-btn`,"aria-label":O(`退出演示`),"data-tip":O(`退出演示`),"data-sub":`Esc`,onClick:ee,children:(0,j.jsx)(N,{name:`close`})})]}),u&&(0,j.jsx)(`div`,{className:`present-notice`,role:`status`,children:u})]})}function Wc(e,t={}){mt({anchor:e,placement:e.closest(`.row, .sec-head`)?`right-start`:`bottom-start`,className:`menu-wide link-form-pop`,content:e=>(0,j.jsx)(Kc,{close:e,parent:t.parent,slug:t.slug})})}var Gc=e=>{try{return new URL(e).hostname.replace(/^www\./,``)}catch{return e}};function Kc({close:e,parent:t,slug:n}){let r=n!==void 0,[i,a]=(0,l.useState)(r?R.get().reports[n]?.url??``:``),[o,s]=(0,l.useState)(``),[c,u]=(0,l.useState)(null),[d,f]=(0,l.useState)(!1),[p,m]=(0,l.useState)(``),[g,_]=(0,l.useState)(!1),v=(0,l.useRef)(!1),y=(0,l.useRef)(null);(0,l.useEffect)(()=>{y.current?.focus(),y.current?.select()},[]);let b=yn(i);(0,l.useEffect)(()=>{if(r||b.refused||c?.url===b.url)return;let e=!0,t=window.setTimeout(()=>{f(!0),Yr(b.url).then(t=>{e&&(u({url:b.url,title:t}),!v.current&&t&&s(t))},()=>{e&&u({url:b.url,title:``})}).finally(()=>{e&&f(!1)})},400);return()=>{e=!1,clearTimeout(t)}},[r,b.url,b.refused,c?.url]);let x=async()=>{if(!g){if(b.refused){m(O(b.message));return}_(!0),m(``);try{if(r){await _o(n,b.url)&&e();return}let i=o.trim()||(c&&c.url===b.url?c.title:``)||Gc(b.url),a=await ho({url:b.url,title:i},t);a?m(a):e()}finally{_(!1)}}};return(0,j.jsxs)(`div`,{className:`link-form`,onKeyDown:e=>{e.key===`Enter`&&!e.nativeEvent.isComposing&&(e.preventDefault(),x())},children:[(0,j.jsx)(`div`,{className:`menu-head`,children:O(r?`修改网址`:`添加在线网页`)}),(0,j.jsxs)(`label`,{className:`link-field`,children:[(0,j.jsx)(`span`,{className:`link-label`,children:O(`网址`)}),(0,j.jsx)(`input`,{ref:y,className:`pop-input`,name:`url`,placeholder:O(`粘贴网址,例如 https://…`),value:i,spellCheck:!1,onChange:e=>{a(e.target.value),m(``)}})]}),!r&&(0,j.jsxs)(`label`,{className:`link-field`,children:[(0,j.jsx)(`span`,{className:`link-label`,children:O(`名称`)}),(0,j.jsx)(`input`,{className:`pop-input`,name:`title`,placeholder:O(d?`正在读取网页标题…`:`网页的标题`),value:o,onChange:e=>{v.current=!0,s(e.target.value)}})]}),p&&(0,j.jsx)(`div`,{className:`link-error`,role:`alert`,children:p}),(0,j.jsxs)(`div`,{className:`link-actions`,children:[(0,j.jsx)(`button`,{className:`dialog-btn`,onClick:e,children:O(`取消`)}),(0,j.jsx)(`button`,{className:h(`dialog-btn primary`,g&&`busy`),disabled:g||!i.trim(),onClick:()=>void x(),children:O(r?`保存`:`添加`)})]})]})}var qc=e=>e.filter(Boolean);function Jc(e,t,{withExport:n=!1,onRename:r}={}){let i=R.get(),a=i.reports[e],o=i.meta.favorites.includes(e),s=!n;return a?.instructions?qc([{kind:`head`,label:O(`写作偏好`)},n&&{icon:`duplicate`,label:O(`复制页面内容`),tip:O(`Markdown 格式`),onSelect:()=>Do(e)},{icon:`external`,label:O(`在新标签页打开`),onSelect:()=>window.open(vs(e),`_blank`)},n&&{icon:`exportOut`,label:O(`导出`),tip:O(`PDF、HTML、Markdown`),onSelect:()=>Ms(e)},{kind:`sep`},{kind:`foot`,content:(0,j.jsx)(al,{slug:e})}]):qc([{kind:`head`,label:O(`文档`)},n&&{icon:`duplicate`,label:O(`复制页面内容`),tip:O(`Markdown 格式`),onSelect:()=>Do(e)},n&&{icon:`fileCode`,label:O(`复制本地路径`),tip:O(`这份文档在电脑上的位置,可以直接告诉 Agent`),onSelect:()=>Oo(e)},n&&{icon:`present`,label:O(`演示视图`),tip:O(`全屏放映,可用激光笔和画笔`),onSelect:()=>Oc(e)},s&&{icon:o?`starOff`:`star`,label:O(o?`取消收藏`:`收藏`),onSelect:()=>to(e)},s&&{kind:`sep`},s&&{icon:`rename`,label:O(`重命名`),onSelect:r??(()=>void Lo(e))},s&&{icon:`duplicate`,label:O(`创建副本`),onSelect:()=>void so(e)},s&&{icon:`moveTo`,label:O(`移动到`),onSelect:()=>$c(e,t())},{icon:`external`,label:O(`在新标签页打开`),onSelect:()=>ra(e)},n&&{icon:`importIn`,label:O(`导入`),onSelect:()=>Ns(e)},n&&{icon:`exportOut`,label:O(`导出`),tip:O(`PDF、HTML、Markdown`),onSelect:()=>Ms(e)},{icon:`trash`,label:O(`移至回收区`),danger:!0,onSelect:()=>void co(e)},{kind:`sep`},{kind:`foot`,content:(0,j.jsx)(al,{slug:e})}])}function Yc(e,{inTopbar:t=!1,onRename:n,onAddCard:r}){return qc([{kind:`head`,label:O(`自定义页`)},t&&r!==void 0&&{icon:`plus`,label:O(`添加自定义块`),onSelect:r},t&&r!==void 0&&{kind:`sep`},{icon:`rename`,label:O(`重命名`),onSelect:n},t&&{icon:`fileCode`,label:O(`复制本地路径`),tip:O(`这一页在电脑上的位置,可以直接告诉 Agent`),onSelect:()=>Oo(e,{page:!0})},t&&{icon:`folder`,label:O(`在文件夹中显示`),onSelect:()=>void No({page:e})},{icon:`external`,label:O(`在新标签页打开`),onSelect:()=>B(e)},t&&{kind:`sep`},e===`home`?{icon:`restore`,label:O(`恢复默认卡片`),tip:O(`把缺的默认卡片放回空位,别的不动`),onSelect:()=>void So()}:{icon:`trash`,label:O(`移至回收区`),danger:!0,onSelect:()=>void Co(e)}])}function Xc(e,t,{inTopbar:n=!1,onRename:r}={}){let i=R.get(),a=i.reports[e]?.url??``,o=i.meta.favorites.includes(e),s=!n;return qc([{kind:`head`,label:O(`网页链接`)},s&&{icon:o?`starOff`:`star`,label:O(o?`取消收藏`:`收藏`),onSelect:()=>to(e)},s&&{kind:`sep`},s&&r!==void 0&&{icon:`rename`,label:O(`重命名`),onSelect:r},{icon:`link`,label:O(`修改网址…`),onSelect:()=>Wc(t(),{slug:e})},{icon:`web`,label:O(`在浏览器中打开`),onSelect:()=>vo(a)},{icon:`duplicate`,label:O(`复制网址`),onSelect:()=>yo(a)},s&&{icon:`moveTo`,label:O(`移动到`),onSelect:()=>$c(e,t())},{icon:`external`,label:O(`在新标签页打开`),onSelect:()=>ra(e)},{icon:`trash`,label:O(`移至回收区`),danger:!0,onSelect:()=>void co(e)}])}function Zc(e,t,{inTopbar:n=!1,onRename:r}={}){let i=R.get(),a=i.reports[e],o=i.meta.favorites.includes(e),s=!n,c=!a?.missing;return qc([{kind:`head`,label:a?.workspace?O(`别处的底稿 · {0}`,vi(a.workspace,i)):O(`别处的底稿`)},s&&{icon:o?`starOff`:`star`,label:O(o?`取消收藏`:`收藏`),onSelect:()=>to(e)},s&&{kind:`sep`},s&&c&&r!==void 0&&{icon:`rename`,label:O(`重命名`),tip:O(`改的是那篇底稿的标题`),onSelect:r},s&&{icon:`moveTo`,label:O(`移动到`),tip:O(`只改它在这里的显示位置,文件不动`),onSelect:()=>$c(e,t())},c&&{icon:`external`,label:O(`在新标签页打开`),onSelect:()=>ra(e)},!!a?.path&&{icon:`fileCode`,label:O(`复制本地路径`),tip:a?.path,onSelect:()=>jo(e)},c&&{icon:`folder`,label:O(`在文件夹中显示`),onSelect:()=>void No({entry:e})},n&&{icon:`sidebar`,label:O(`在它的工作区里打开`),tip:O(`它自己的工作台:导出、批注、字体与布局在那里`),onSelect:()=>void Io(e)},s&&{kind:`sep`},s&&{icon:`minus`,label:O(`从文档树移除`),tip:O(`只移除这一条,不删除底稿`),onSelect:()=>Po(e)}])}function Qc(e,{inTopbar:t=!1}={}){let n=Gi(e),r=n?.entry.url??``;return qc([{kind:`head`,label:n?.extension.title??O(`扩展`)},!t&&{icon:`web`,label:O(`在浏览器中打开`),onSelect:()=>vo(r)},{icon:`duplicate`,label:O(`复制网址`),onSelect:()=>yo(r)},{icon:`external`,label:O(`在新标签页打开`),onSelect:()=>V(e)}])}function $c(e,t){mt({anchor:t,placement:`right-start`,className:`menu-wide`,content:t=>(0,j.jsx)(el,{slug:e,close:t})})}function el({slug:e,close:t}){let n=f(R),[r,i]=(0,l.useState)(``),a=(0,l.useRef)(null);(0,l.useEffect)(()=>a.current?.focus(),[]);let o=r.trim().toLowerCase(),s=n.meta.groups.filter(e=>!e.extension&&xi(e,n)),c=(0,l.useMemo)(()=>Zn(n.meta).filter(t=>{let r=Yn(n.meta,t);return!!(r&&xi(r,n))&&!Xn(n.meta,t,e)&&mi(n.reports[t]).toLowerCase().includes(o)}),[n,e,o]),u=s.filter(e=>bi(e).toLowerCase().includes(o)||!o&&s.length===1),d=s.length===1,p=e=>{let t=Yn(n.meta,e);return[...t&&t.id!==`docs`?[bi(t)]:[],...Jn(n.meta,e).map(e=>mi(n.reports[e]))].join(` / `)},m=(e,n)=>{t(),e&&P(O(`已移动到「{0}」`,n),{routine:!0})};return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`div`,{className:`pop-search`,children:(0,j.jsx)(`input`,{ref:a,className:`pop-input`,placeholder:O(`移动到…`),value:r,onChange:e=>i(e.target.value)})}),(0,j.jsxs)(`div`,{className:`pop-list`,children:[(d?!o:u.length>0)&&(0,j.jsxs)(j.Fragment,{children:[!d&&(0,j.jsx)(`div`,{className:`menu-head`,children:O(`栏`)}),(d?s:u).map(t=>(0,j.jsxs)(`div`,{className:`menu-item`,"data-column":t.id,onClick:()=>m(eo(e,{pos:`root`,column:Un(t)}),d?O(`顶层`):bi(t)),children:[(0,j.jsx)(`span`,{className:`mi-icon`,children:(0,j.jsx)(N,{name:`sidebar`})}),(0,j.jsx)(`span`,{className:`mi-label`,children:d?O(`顶层`):bi(t)})]},t.id))]}),(0,j.jsx)(`div`,{className:`menu-head`,children:O(`文档`)}),c.length?c.map(t=>(0,j.jsxs)(`div`,{className:`menu-item`,onClick:()=>{let r=eo(e,{pos:`inside`,ref:t});r&&Ai(t,!0),m(r,mi(n.reports[t]))},children:[(0,j.jsx)(`span`,{className:`mi-icon`,children:(0,j.jsx)(`span`,{className:`pg-icon`,children:(0,j.jsx)($e,{icon:n.reports[t]?.icon,slug:n.reports[t]?.kind?void 0:t,fallback:n.reports[t]?.kind===`link`?`web`:`page`})})}),(0,j.jsx)(`span`,{className:`mi-label`,children:mi(n.reports[t])}),(0,j.jsx)(`span`,{className:`mi-kbd`,children:p(t)})]},t)):(0,j.jsx)(`div`,{className:`menu-empty`,children:O(`没有匹配的文档`)})]})]})}function tl(){let{trash:e}=f(R);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`div`,{className:`menu-head`,children:O(`回收区`)}),e.length?e.map(e=>(0,j.jsxs)(`div`,{className:`trash-item`,children:[(0,j.jsx)(`span`,{className:`pg-icon`,children:(0,j.jsx)(N,{name:e.kind===`page`?`board`:e.kind===`link`?`web`:`page`})}),(0,j.jsx)(`span`,{className:`t`,children:e.title}),(0,j.jsx)(`button`,{className:`row-act`,"data-tip":O(`恢复`),onClick:()=>void lo(e.id),children:(0,j.jsx)(N,{name:`restore`})}),(0,j.jsx)(`button`,{className:`row-act`,"data-tip":O(`永久删除`),onClick:()=>void wo(e.id),children:(0,j.jsx)(N,{name:`trash`})})]},e.id)):(0,j.jsx)(`div`,{className:`menu-empty`,children:O(`回收区是空的`)})]})}function nl(){let e=f(R,e=>e.trash.length);return e?(0,j.jsx)(j.Fragment,{children:e}):null}function rl(){return[{icon:`importIn`,label:O(`导入`),onSelect:()=>Ns(``)},{icon:`trash`,label:O(`回收区`),kbd:(0,j.jsx)(nl,{}),submenu:()=>(0,j.jsx)(tl,{}),submenuClass:`menu-wide`},{kind:`sep`},{kind:`head`,label:O(`偏好`)},{icon:`guide`,label:O(`写作偏好`),tip:O(`Agent 写报告时照着写的规则,每次写报告前都会先读`),onSelect:()=>void bc()},{icon:`blocks`,label:O(`组件列表`),tip:O(`文档菜单里出现哪些块,这个工作区加载哪些自定义块`),onSelect:Js},{kind:`switch`,icon:`frame`,label:O(`显示编辑框`),tip:O(`点进一段文字时,在它周围显示蓝色虚线框`),value:()=>wt(`editFrame`),onChange:e=>Tt(`editFrame`,e)},{kind:`switch`,icon:`bell`,label:O(`减少通知`),tip:O(`日常操作不再提示,只说需要你处理或你该知道的事`),value:()=>wt(`quietNotices`),onChange:e=>Tt(`quietNotices`,e)},{kind:`switch`,icon:`diff`,label:O(`显示变更`),tip:O(`Agent 改过文档后,新增的标绿、删掉的标红,可以在页面底部确认或撤回`),value:()=>wt(`showChanges`),onChange:e=>Tt(`showChanges`,e)},{kind:`sep`},{kind:`head`,label:O(`语言`)},...Object.entries(ie).map(([e,t])=>({icon:`language`,label:t,check:e===ce,onSelect:()=>void oo(e)}))]}function il(e){let t=new Date(e),n=new Date,r=`${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}`,i=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime(),a=Math.round((i(n)-i(t))/864e5);if(a===0)return O(`今天 {0}`,r);if(a===1)return O(`昨天 {0}`,r);let o=e=>new Intl.DateTimeFormat(ce===`en`?`en`:`zh-CN`,{month:ce===`en`?`short`:`long`,day:`numeric`,...e}).format(t);return t.getFullYear()===n.getFullYear()?`${o({})} ${r}`:o({year:`numeric`})}function al({slug:e}){let[t,n]=(0,l.useState)(null);return(0,l.useEffect)(()=>{let t=!0;return Cr(e).then(e=>{t&&n(e)},()=>{}),()=>{t=!1}},[e]),(0,j.jsxs)(`div`,{className:`menu-stats`,children:[(0,j.jsx)(`div`,{children:t?O(`上次编辑 {0}`,il(t.edited)):`\xA0`}),(0,j.jsx)(`div`,{children:t?O(`{0} 个字`,t.words.toLocaleString(`zh-CN`)):`\xA0`})]})}var ol=d(null),sl=(e,t)=>`${t}:${e}`,cl=(e,t)=>ol.set(sl(e,t)),ll=()=>ol.set(null),ul=(e,t)=>f(ol,n=>n===sl(e,t));function dl({slug:e,title:t,label:n=O(`文档标题`),onSave:r}){let i=!r&&t===O(`未命名文档`),a=(0,l.useRef)(null),o=(0,l.useRef)(!1),s=t=>{if(o.current||(o.current=!0,ol.set(null),!t))return;let n=a.current?.value??``;r?r(n):ko(e,n)},c=(0,l.useRef)(s);return c.current=s,(0,l.useLayoutEffect)(()=>{a.current?.focus(),a.current?.select()},[]),(0,l.useEffect)(()=>{let e=Ze(),t=Ce(()=>c.current(!1));return()=>{t(),e()}},[]),(0,j.jsx)(`input`,{ref:a,className:`row-rename`,defaultValue:i?``:t,placeholder:i?t:void 0,"aria-label":n,spellCheck:!1,onKeyDown:e=>{e.key===`Enter`&&!e.nativeEvent.isComposing&&(e.preventDefault(),s(!0))},onBlur:()=>s(!0),onClick:e=>e.stopPropagation()})}function fl(){let e=f(R,e=>e.pages),t=f(Ii,Vi),n=vt(`pages-more`);if(e.length===0)return null;let r=e.slice(0,5),i=e.slice(5);return(0,j.jsxs)(`div`,{className:`sb-pages`,"aria-label":O(`自定义页`),children:[r.map(e=>(0,j.jsx)(pl,{page:e,selected:e.slug===t},e.slug)),i.length>0&&(0,j.jsxs)(`button`,{className:h(`sb-act sb-more-pages`,n&&`menu-open`,i.some(e=>e.slug===t)&&`selected`),onClick:e=>_t(e.currentTarget,i.map(e=>({key:e.slug,icon:(0,j.jsx)(`span`,{className:`pg-icon`,children:(0,j.jsx)($e,{icon:e.icon,fallback:e.slug===`home`?`home`:`board`})}),label:Ti(e),check:e.slug===t,onSelect:()=>void la(e.slug)})),{placement:`right-start`,ownerKey:`pages-more`}),children:[(0,j.jsx)(`span`,{className:`sb-act-icon`,children:(0,j.jsx)(N,{name:`more`})}),(0,j.jsx)(`span`,{className:`sb-act-label`,children:O(`更多页面`)})]})]})}function pl({page:e,selected:t}){let n=`page:${e.slug}`,r=vt(n),i=ul(e.slug,`page`),a=Ti(e),o=()=>Yc(e.slug,{onRename:()=>cl(e.slug,`page`)});return(0,j.jsxs)(`div`,{className:h(`sb-act sb-page`,t&&`selected`,r&&`menu-open`,i&&`renaming`),role:`button`,tabIndex:0,"data-page":e.slug,"aria-current":t?`page`:void 0,onClick:()=>{i||la(e.slug)},onKeyDown:t=>{!i&&(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),la(e.slug))},onContextMenu:e=>{e.target.closest(`input`)||(e.preventDefault(),_t(e.currentTarget,o(),{ownerKey:n,point:{x:e.clientX,y:e.clientY}}))},children:[(0,j.jsx)(`span`,{className:`sb-act-icon`,children:(0,j.jsx)(`span`,{className:`pg-icon`,children:(0,j.jsx)($e,{icon:e.icon,fallback:e.slug===`home`?`home`:`board`})})}),i?(0,j.jsx)(dl,{slug:e.slug,title:a,label:O(`页面标题`),onSave:t=>void bo(e.slug,t)}):(0,j.jsx)(`span`,{className:`sb-act-label`,children:a})]})}var ml=e=>f(F,t=>e&&t.slug===e&&t.connected&&typeof t.title==`string`?t.title||O(`未命名文档`):void 0),hl=e=>f(F,t=>e&&t.slug===e&&t.connected&&t.icon!==void 0?t.icon:void 0);function gl(e,t){mt({anchor:e,placement:e.closest(`.row, .sec-head`)?`right-start`:`bottom-start`,className:`menu-wide link-form-pop project-form-pop`,content:e=>(0,j.jsx)(_l,{close:e,after:t})})}function _l({close:e,after:t}){let[n,r]=(0,l.useState)(``),[i,a]=(0,l.useState)(null),[o,s]=(0,l.useState)({}),[c,u]=(0,l.useState)(``),[d,f]=(0,l.useState)(!1),[p,m]=(0,l.useState)(null),g=(0,l.useRef)(null);(0,l.useEffect)(()=>{g.current?.focus()},[]),(0,l.useEffect)(()=>{let e=!0;return Ur().then(t=>{e&&m(t)},()=>{e&&m([])}),()=>{e=!1}},[]);let _=async n=>{if(!(d||!n.trim())){f(!0),u(``);try{let r=await Fo(n.trim(),t);r?u(r):e()}finally{f(!1)}}},v=(e,t)=>{a(e),r(t),u(``)};return(0,j.jsxs)(`div`,{className:`link-form project-form`,onKeyDown:e=>{e.key===`Enter`&&!e.nativeEvent.isComposing&&e.target.matches(`input`)&&(e.preventDefault(),_(n))},children:[(0,j.jsx)(`div`,{className:`menu-head`,children:O(`添加其他 Gallery 项目`)}),(0,j.jsxs)(`div`,{className:`project-path`,children:[(0,j.jsx)(`input`,{ref:g,className:`pop-input`,name:`path`,placeholder:O(`粘贴工作区的文件夹、doc.html 或它所在的文件夹`),value:n,spellCheck:!1,onChange:e=>{r(e.target.value),a(null),u(``)}}),(0,j.jsx)(`button`,{className:h(`dialog-btn primary project-confirm`,d&&`busy`),disabled:d||!n.trim(),onClick:()=>void _(n),children:O(`确认`)})]}),c&&(0,j.jsx)(`div`,{className:`link-error`,role:`alert`,children:c}),p===null&&(0,j.jsx)(`div`,{className:`menu-empty`,children:O(`正在读取别的工作区…`)}),p!==null&&p.length===0&&(0,j.jsx)(`div`,{className:`menu-empty`,children:O(`本机没有登记别的工作区`)}),p!==null&&p.length>0&&(0,j.jsx)(`div`,{className:`project-list`,children:p.map(e=>{let t=!!o[e.ws];return(0,j.jsxs)(`div`,{className:`project-group`,"data-ws":e.ws,children:[(0,j.jsxs)(`div`,{className:h(`project-row project-workspace`,i===e.ws&&`selected`),"data-ws":e.ws,"data-tip":e.root,onClick:()=>v(e.ws,e.root),onDoubleClick:()=>void _(e.root),children:[(0,j.jsx)(`button`,{className:`project-toggle`,"aria-expanded":t,"aria-label":O(t?`收起`:`展开`),disabled:e.documents.length===0,onClick:n=>{n.stopPropagation(),s(n=>({...n,[e.ws]:!t}))},children:(0,j.jsx)(N,{name:`chevron`})}),(0,j.jsx)(`span`,{className:`mi-icon`,children:(0,j.jsx)(N,{name:`folderClosed`})}),(0,j.jsxs)(`span`,{className:`mi-label`,children:[e.name,e.above&&(0,j.jsx)(`span`,{className:`project-above`,children:e.above})]}),(0,j.jsx)(`span`,{className:`project-count`,children:e.documents.length})]}),t&&e.documents.map(e=>(0,j.jsxs)(`div`,{className:h(`project-row project-document`,i===e.entry&&`selected`),"data-entry":e.entry,"data-tip":e.path,style:{"--depth":e.depth},onClick:()=>v(e.entry,e.path),onDoubleClick:()=>void _(e.path),children:[(0,j.jsx)(`span`,{className:`mi-icon`,children:(0,j.jsx)(`span`,{className:`pg-icon`,children:(0,j.jsx)($e,{icon:e.icon})})}),(0,j.jsx)(`span`,{className:`mi-label`,children:e.title})]},e.entry))]},e.ws)})})]})}function W({extension:e,expanded:t,current:n}){return e?e.error?(0,j.jsx)(`div`,{className:`sb-note inset sb-ext-note`,"data-extension-error":e.id,children:O(`条目读不出来:{0}`,fe(e.error)??``)}):e.entries.length?(0,j.jsx)(j.Fragment,{children:e.entries.map(r=>(0,j.jsx)(vl,{extension:e,entry:r,depth:0,expanded:t,current:n},r.id))}):(0,j.jsx)(`div`,{className:`sb-note inset sb-ext-note`,children:O(`没有条目`)}):null}function vl({extension:e,entry:t,depth:n,expanded:r,current:i}){let a=Sn(e.id,t.id),o=(0,l.useRef)(null),s=`row:ext:${a}`,c=vt(s),u=t.children??[],d=u.length>0,f=d&&!!r[a],{url:p}=t,m=()=>Qc(a);return(0,j.jsxs)(`div`,{className:h(`node`,f&&`open`),children:[(0,j.jsxs)(`div`,{ref:o,className:h(`row`,`ext-row`,d&&`has-kids`,a===i&&`selected`,c&&`menu-open`),role:`treeitem`,"aria-expanded":d?f:void 0,style:{"--depth":n},"data-id":a,"data-scope":`ext`,"data-depth":n,"data-kind":`extension`,"data-extension":e.id,onClick:()=>{p?ca(a):ji(a)},onContextMenu:e=>{p&&(e.preventDefault(),_t(e.currentTarget,m(),{ownerKey:s,point:{x:e.clientX,y:e.clientY}}))},children:[(0,j.jsxs)(`div`,{className:`row-icon`,children:[(0,j.jsx)(`span`,{className:`pg-icon`,children:(0,j.jsx)($e,{icon:t.icon??e.icon,fallback:p?`web`:`page`})}),d&&(0,j.jsx)(`button`,{className:`row-chevron`,"aria-label":O(f?`折叠`:`展开`),onClick:e=>{e.stopPropagation(),ji(a)},children:(0,j.jsx)(N,{name:`chevron`})})]}),(0,j.jsx)(`div`,{className:`row-title`,children:t.title}),p&&(0,j.jsx)(`div`,{className:`row-actions`,children:(0,j.jsx)(`button`,{className:`row-act`,"data-tip":O(`在浏览器中打开、复制网址等…`),onClick:e=>{e.stopPropagation(),_t(e.currentTarget,m(),{placement:`right-start`,ownerKey:s})},children:(0,j.jsx)(N,{name:`more`})})})]}),f&&(0,j.jsx)(`div`,{className:`kids`,children:u.map(t=>(0,j.jsx)(vl,{extension:e,entry:t,depth:n+1,expanded:r,current:i},t.id))})]})}function yl(e,t){let n=R.get().extensions.find(t=>t.id===e);if(!n)return;let r={...Oi.get().expanded},i=n=>n.forEach(n=>{let a=Sn(e,n.id);t&&n.children?.length?r[a]=!0:t||delete r[a],i(n.children??[])});i(n.entries),Oi.set(e=>({...e,expanded:r}))}function bl(e){let t=e.extension??``;return[{kind:`head`,label:bi(e)},{icon:`collapseAll`,label:O(`全部折叠`),onSelect:()=>yl(t,!1)},{icon:`expandAll`,label:O(`全部展开`),onSelect:()=>yl(t,!0)}]}function xl(e,t){(0,l.useEffect)(()=>{let n=e.current,r=null,i=!1,a=()=>t.current,o=()=>{n.querySelectorAll(`.drop-inside`).forEach(e=>e.classList.remove(`drop-inside`)),a().classList.remove(`show`)},s=()=>[...n.querySelectorAll(`.section[data-column]`)],c=e=>R.get().meta.groups.findIndex(t=>t.id===e.dataset.column);function l(e,t){let n=s();if(!n.length)return null;let r=e.closest(`.section[data-column]`);if(!r){if(e.closest(`.section[data-section="fav"]`))return{type:`column`,index:c(n[0]),el:n[0],level:0,linePos:`before`};let r=n[n.length-1];return t>=r.getBoundingClientRect().bottom?{type:`column`,index:c(r)+1,el:r,level:0,linePos:`after`}:null}let i=c(r);if(i<0)return null;let a=r.getBoundingClientRect();return t<a.top+a.height/2?{type:`column`,index:i,el:r,level:0,linePos:`before`}:{type:`column`,index:i+1,el:r,level:0,linePos:`after`}}let u=e=>{let t=e.dataset.column,n=e.querySelector(`:scope > .tree`);if(!t||!n||e.dataset.extension)return null;let r=n.querySelector(`.sb-empty`);return{type:`section`,column:Un(t),el:r??n,linePos:r?`before`:`after`,level:0}};function d(e,t){let i=r;if(i.kind===`column`)return l(e,t);let a=e.closest(`.row`);if(a?.dataset.scope===`ext`)return null;if(a){let e=a.getBoundingClientRect(),n=(t-e.top)/e.height,r=a.dataset.id,o=a.dataset.scope,s=Number(a.dataset.depth),c=o===`fav`&&s===0;if(i.kind===`fav`)return!c||r===i.id?null:{type:`fav`,ref:r,pos:n<.5?`before`:`after`,el:a,level:0};let l=n<.25?`before`:n>.75?`after`:`inside`;return c&&l!==`inside`?{type:`fav`,ref:r,pos:l,el:a,level:0}:Xn(R.get().meta,r,i.id)?null:l===`after`&&a.parentElement.classList.contains(`open`)?{type:`page`,ref:r,pos:`inside-start`,el:a,linePos:`after`,level:s+1,scope:o}:{type:`page`,ref:r,pos:l,el:a,level:s,scope:o}}let o=e.closest(`.sec-head`);if(o)return o.dataset.section===`fav`?{type:`fav`,ref:null,pos:`before`,el:o,linePos:`after`,level:0}:i.kind===`fav`||!o.dataset.column||o.dataset.extension?null:{type:`section`,column:Un(o.dataset.column),index:0,el:o,linePos:`after`,level:0};if(i.kind===`fav`)return null;let c=e.closest(`.sb-empty`),d=(c??e).closest(`.section[data-column]`);if(c&&d)return u(d);let f=d??(e===n||e.closest(`.drop-line`)?s().at(-1)??null:null),p=f?.querySelector(`:scope > .tree`);return f&&p&&t>=p.getBoundingClientRect().bottom&&!e.closest(`.row, .sec-head`)?u(f):null}function f(e){let t=r,i=t.target;if(i&&e&&i.el===e.el&&i.type===e.type&&(`pos`in i?i.pos:``)===(`pos`in e?e.pos:``)&&i.linePos===e.linePos||(t.target=e,o(),clearTimeout(t.expandTimer),!e))return;if(e.type===`page`&&e.pos===`inside`){e.el.classList.add(`drop-inside`),!e.el.parentElement.classList.contains(`open`)&&Kn(R.get().meta,e.ref).length&&(t.expandTimer=window.setTimeout(()=>{Ai(ki(e.ref,e.scope),!0),r&&(r.target=null,setTimeout(()=>r&&p(r.lastX,r.lastY),0))},700));return}let s=e.linePos??(`pos`in e&&e.pos===`before`?`before`:`after`),c=n.getBoundingClientRect(),l=e.el.getBoundingClientRect(),u=(s===`before`?l.top:l.bottom)-c.top+n.scrollTop,d=l.left-c.left+8+e.level*8,f=a();f.style.top=`${u-1.5}px`,f.style.left=`${d}px`,f.style.width=`${Math.max(24,l.right-c.left-d)}px`,f.classList.add(`show`)}function p(e,t){let r=document.elementFromPoint(e,t);if(!r||!n.contains(r))return f(null);let i=d(r,t);!i&&!r.closest(`.row, .sec-head`)&&r.closest(`.tree, .kids`)||f(i)}function h(){if(!r?.started)return;let e=n.getBoundingClientRect(),t=r.lastX,i=r.lastY;if(t>=e.left&&t<=e.right){let r=0;i<e.top+40?r=-Math.ceil((e.top+40-i)/4):i>e.bottom-40&&(r=Math.ceil((i-(e.bottom-40))/4)),r&&(n.scrollTop+=m(r,-18,18),p(t,i))}r.raf=requestAnimationFrame(h)}function g(){let e=r,t=e.srcRow.getBoundingClientRect();e.started=!0,e.offX=Math.min(e.sx-t.left,60),e.offY=Math.min(e.sy-t.top,30);let n=document.createElement(`div`);n.className=`drag-ghost`,n.style.maxWidth=`${Math.min(t.width,260)}px`;let i=e.kind===`column`?null:e.srcRow.querySelector(`.pg-icon`)?.cloneNode(!0);i&&n.appendChild(i);let a=document.createElement(`span`);a.className=`t`;let o=R.get();a.textContent=e.kind===`column`?bi(o.meta.groups.find(t=>t.id===e.id)):mi(o.reports[e.id]),n.appendChild(a),document.body.appendChild(n),e.ghost=n,document.body.classList.add(`dragging`),e.srcRow.classList.add(`drag-src`),e.release=Ze(),e.raf=requestAnimationFrame(h)}function _(e){let t=r;if(r=null,!t.started)return;cancelAnimationFrame(t.raf),clearTimeout(t.expandTimer),t.ghost?.remove(),document.body.classList.remove(`dragging`),t.srcRow.classList.remove(`drag-src`),o(),i=!0,setTimeout(()=>{i=!1},60),t.release?.();let n=t.target;e&&n?n.type===`column`?po(t.id,n.index):n.type===`fav`?no(t.id,n.ref,n.pos):n.type===`section`?(eo(t.id,{pos:`root`,column:n.column,index:n.index}),Pi(sn(n.column))):eo(t.id,{pos:n.pos,ref:n.ref})&&n.pos.startsWith(`inside`)&&(Ai(n.ref,!0),n.scope===`fav`&&Ai(ki(n.ref,`fav`),!0)):e&&t.kind!==`column`&&document.elementFromPoint(t.lastX,t.lastY)?.closest(`.row`)===t.srcRow&&sa(t.id,{reveal:!1})}let v=e=>{if(e.button!==0||e.pointerType===`touch`)return;let t=e.target;if(t.closest(`input`)||t.closest(`button:not(.sec-toggle)`))return;let n=t.closest(`.row`);if(n?.dataset.scope===`ext`)return;let i=n?null:t.closest(`.sec-head[data-column]`);if(i){let t=i.closest(`.section`);r={id:i.dataset.column,kind:`column`,srcRow:t,sx:e.clientX,sy:e.clientY,lastX:e.clientX,lastY:e.clientY,started:!1,target:null};return}n&&(r={id:n.dataset.id,kind:n.dataset.scope===`fav`&&n.dataset.depth===`0`?`fav`:`page`,srcRow:n,sx:e.clientX,sy:e.clientY,lastX:e.clientX,lastY:e.clientY,started:!1,target:null})},y=e=>{if(r){if(r.lastX=e.clientX,r.lastY=e.clientY,!r.started){if(Math.hypot(e.clientX-r.sx,e.clientY-r.sy)<5)return;g()}r.ghost.style.transform=`translate(${e.clientX-r.offX}px, ${e.clientY-r.offY}px)`,p(e.clientX,e.clientY)}},b=()=>{r&&_(!0)},x=()=>{r&&_(!1)},S=e=>{e.key===`Escape`&&r?.started&&(e.preventDefault(),e.stopImmediatePropagation(),_(!1))},C=e=>{i&&(i=!1,e.stopPropagation(),e.preventDefault())},w=e=>e.preventDefault();return n.addEventListener(`pointerdown`,v),n.addEventListener(`dragstart`,w),window.addEventListener(`pointermove`,y),window.addEventListener(`pointerup`,b),window.addEventListener(`pointercancel`,x),window.addEventListener(`keydown`,S,!0),window.addEventListener(`click`,C,!0),()=>{n.removeEventListener(`pointerdown`,v),n.removeEventListener(`dragstart`,w),window.removeEventListener(`pointermove`,y),window.removeEventListener(`pointerup`,b),window.removeEventListener(`pointercancel`,x),window.removeEventListener(`keydown`,S,!0),window.removeEventListener(`click`,C,!0)}},[e,t])}function Sl({onScrolled:e}){let t=f(R),n=f(Oi),r=f(Ii),i=Ui(r),{revealNonce:a}=r,o=(0,l.useRef)(null),s=(0,l.useRef)(null);xl(o,s),(0,l.useEffect)(()=>{o.current?.querySelector(`.row[data-id="${CSS.escape(i??``)}"]:is([data-scope="tree"], [data-scope="ext"])`)?.scrollIntoView({block:`nearest`})},[i,a]);let c=t.meta.favorites.filter(e=>t.reports[e]);return(0,j.jsxs)(`div`,{className:`sb-scroll`,ref:o,onScroll:t=>e(t.currentTarget.scrollTop>0),children:[t.status===`loading`&&(0,j.jsx)(`div`,{className:`sb-note`,children:O(`正在读取文档…`)}),t.status===`offline`&&(0,j.jsx)(`div`,{className:`sb-note`,children:O(`没有连上本地服务`)}),t.status===`ready`&&(0,j.jsxs)(j.Fragment,{children:[c.length>0&&(0,j.jsx)(wl,{sectionKey:`fav`,label:O(`收藏`),collapsed:!!n.collapsedSections.fav,children:c.map(e=>(0,j.jsx)(Tl,{slug:e,depth:0,scope:`fav`,ws:t,expanded:n.expanded,current:i},e))}),t.meta.groups.map((e,r)=>{if(!xi(e,t))return null;if(e.extension)return(0,j.jsx)(wl,{sectionKey:e.id,column:e,index:r,label:bi(e),collapsed:!!n.collapsedSections[e.id],children:(0,j.jsx)(W,{extension:t.extensions.find(t=>t.id===e.extension),expanded:n.expanded,current:i})},e.id);let a=Kn(t.meta,Un(e)).filter(e=>t.reports[e]);return(0,j.jsxs)(wl,{sectionKey:e.id,column:e,index:r,label:bi(e,t),above:Ci(e,t),path:Si(e,t),collapsed:!!n.collapsedSections[e.id],children:[a.map(e=>(0,j.jsx)(Tl,{slug:e,depth:0,scope:`tree`,ws:t,expanded:n.expanded,current:i},e)),a.length===0&&(0,j.jsx)(`div`,{className:`sb-note inset sb-empty`,children:e.id===`docs`||e.workspace&&!e.picked?O(`还没有文档`):O(`把条目拖到这里`)})]},e.id)})]}),(0,j.jsx)(`div`,{className:`drop-line`,ref:s})]})}function Cl(e,t){let n=Un(e),r=R.get(),i=yi(e,r),a=Si(e,r);return[{kind:`head`,label:bi(e)},{icon:`web`,label:O(`添加在线网页…`),onSelect:()=>Wc(t(),{parent:n})},{icon:`columnAdd`,label:O(`新建栏`),onSelect:()=>{let t=uo(e.id);t&&cl(t,`column`)}},{icon:`fileCode`,label:O(`添加其他 Gallery 项目…`),tip:O(`别的工作区,或其中的一篇文档:文件不动`),onSelect:()=>gl(t(),e.id)},{kind:`sep`},{icon:`rename`,label:O(`重命名`),onSelect:()=>cl(e.id,`column`)},...i?[{icon:`folderClosed`,label:O(`复制本地路径`),tip:a??void 0,onSelect:()=>Mo(i)},{icon:`folder`,label:O(`在文件夹中显示`),onSelect:()=>void No({ws:i})}]:[],{icon:`collapseAll`,label:O(`全部折叠`),onSelect:()=>Fi(e.id,!1)},{icon:`expandAll`,label:O(`全部展开`),onSelect:()=>Fi(e.id,!0)},...e.id===`docs`?[]:[{kind:`sep`},e.workspace?{icon:`minus`,label:O(`从侧边栏移除`),tip:O(`只是不在这里显示,工作区和文件都不动`),onSelect:()=>mo(e.id)}:{icon:`minus`,label:O(`从侧边栏移除`),tip:O(`里面的条目回到「{0}」,不删除任何文件`,bi(r.meta.groups.find(e=>e.id===tn))),onSelect:()=>mo(e.id)}]]}function wl({sectionKey:e,column:t,label:n,above:r=null,path:i=null,collapsed:a,children:o}){let s=`sec:${e}`,c=vt(s),u=ul(e,`column`),d=(0,l.useRef)(null),f=e=>()=>d.current?.isConnected?d.current:e,p=!!t?.extension,m=n=>t?.extension?bl(t):t?Cl(t,f(n)):[{icon:`collapseAll`,label:O(`全部折叠`),onSelect:()=>Fi(e,!1)},{icon:`expandAll`,label:O(`全部展开`),onSelect:()=>Fi(e,!0)}];return(0,j.jsxs)(`div`,{className:h(`section`,!a&&`expanded`),"data-section":e,"data-column":t?.id,"data-extension":t?.extension,children:[(0,j.jsxs)(`div`,{ref:d,className:h(`sec-head`,c&&`menu-open`,u&&`renaming`),"data-section":e,"data-column":t?.id,"data-extension":t?.extension,onContextMenu:e=>{e.target.closest(`input`)||(e.preventDefault(),_t(e.currentTarget,m(e.currentTarget),{ownerKey:s,point:{x:e.clientX,y:e.clientY}}))},children:[u&&t?(0,j.jsx)(dl,{slug:t.id,title:n,label:O(`栏的名字`),onSave:e=>{fo(t.id,e)}}):(0,j.jsxs)(`button`,{className:`sec-toggle`,"aria-expanded":!a,onClick:()=>Ni(e),"data-tip":i??void 0,"data-tip-delay":i?1e3:void 0,children:[(0,j.jsxs)(`span`,{className:`sec-text`,children:[(0,j.jsx)(`span`,{className:`sec-label`,children:n}),r&&(0,j.jsx)(`span`,{className:`sec-above`,children:r})]}),(0,j.jsx)(`span`,{className:`sec-chev`,children:(0,j.jsx)(N,{name:`chevron`})})]}),t&&!u&&(0,j.jsxs)(`div`,{className:`sec-actions`,children:[!p&&(0,j.jsx)(`button`,{className:`row-act`,"data-tip":O(`在这一栏新建文档`),"aria-label":O(`在这一栏新建文档`),onClick:e=>{e.stopPropagation(),io({parent:Un(t),first:!0})},children:(0,j.jsx)(N,{name:`plus`})}),(0,j.jsx)(`button`,{className:`row-act`,"data-tip":O(`这一栏的操作…`),"aria-label":O(`这一栏的操作`),onClick:e=>{e.stopPropagation(),_t(e.currentTarget,m(e.currentTarget),{placement:`bottom-start`,ownerKey:s})},children:(0,j.jsx)(N,{name:`more`})})]})]}),!a&&(0,j.jsx)(`div`,{className:`tree`,role:`tree`,children:o})]})}function Tl({slug:e,depth:t,scope:n,ws:r,expanded:i,current:a}){let o=r.reports[e],s=(0,l.useRef)(null),c=`row:${n}:${e}`,u=vt(c),d=ml(e),f=hl(e),p=ul(e,n);if(!o)return null;let m=o.kind===`link`,g=o.kind===`draft`,_=g&&!!o.missing,v=Kn(r.meta,e).filter(e=>r.reports[e]),y=v.length>0,b=y&&!!i[ki(e,n)],x=(m?null:d)??mi(o),S=!m&&!_?sr(r.meta,e,g?o.workspace??null:null):null,C=S?S.id&&!S.hidden?bi(S,r):vi(S.workspace??yi(S,r)??``,r):null,w=r.self?r.workspaces[r.self]?.root:void 0,T=g?o.path??o.folder:w?[w,e].join(w.includes(`\\`)?`\\`:`/`):void 0,E=!!C,D=e=>()=>s.current?.isConnected?s.current:e,ee=t=>m?Xc(e,D(t),{onRename:()=>cl(e,n)}):g?Zc(e,D(t),{onRename:()=>cl(e,n)}):Jc(e,D(t),{onRename:()=>cl(e,n)});return(0,j.jsxs)(`div`,{className:h(`node`,b&&`open`),children:[(0,j.jsxs)(`div`,{ref:s,className:h(`row`,y&&`has-kids`,m&&`link-row`,g&&`draft-row`,_&&`missing`,e===a&&`selected`,u&&`menu-open`,p&&`renaming`),role:`treeitem`,"aria-expanded":y?b:void 0,style:{"--depth":t},"data-id":e,"data-scope":n,"data-depth":t,"data-kind":m?`link`:g?`draft`:void 0,onClick:()=>_?P(o.missing===`ambiguous`?O(`找不到底稿:本机登记的两个工作区编号相同`):O(`找不到底稿:{0}`,o.path??o.workspace??e)):void sa(e,{reveal:!1}),onContextMenu:e=>{e.target.closest(`input`)||(e.preventDefault(),_t(e.currentTarget,ee(e.currentTarget),{ownerKey:c,point:{x:e.clientX,y:e.clientY}}))},children:[(0,j.jsxs)(`div`,{className:`row-icon`,children:[(0,j.jsx)(`span`,{className:`pg-icon`,children:(0,j.jsx)($e,{icon:!m&&!g&&f!==void 0?f:m?o.icon??o.siteIcon:o.icon,slug:m||g?void 0:e,fallback:m?`web`:`page`})}),y&&(0,j.jsx)(`button`,{className:`row-chevron`,"aria-label":O(b?`折叠`:`展开`),onClick:t=>{t.stopPropagation(),ji(ki(e,n))},children:(0,j.jsx)(N,{name:`chevron`})})]}),p?(0,j.jsx)(dl,{slug:e,title:x,label:m?O(`链接的名称`):void 0,onSave:m?t=>void go(e,t):void 0}):(0,j.jsx)(`div`,{className:`row-title`,"data-tip":E?T:void 0,children:x}),m&&!p&&(0,j.jsx)(`span`,{className:`row-tag`,children:O(`链接`)}),_&&!p&&(0,j.jsx)(`span`,{className:`row-tag`,children:O(`找不到底稿`)}),E&&!p&&(0,j.jsx)(`span`,{className:`row-tag row-column`,"data-tip":T,children:C}),(0,j.jsxs)(`div`,{className:`row-actions`,children:[(0,j.jsx)(`button`,{className:`row-act`,"data-tip":O(`在下面新建文档`),onClick:t=>{t.stopPropagation(),Ai(ki(e,n),!0),io({parent:e})},children:(0,j.jsx)(N,{name:`plus`})}),(0,j.jsx)(`button`,{className:`row-act`,"data-tip":O(m?`改名、复制网址等…`:g?`复制本地路径、移除等…`:`移动、收藏等…`),onClick:e=>{e.stopPropagation(),_t(e.currentTarget,ee(e.currentTarget),{placement:`right-start`,ownerKey:c})},children:(0,j.jsx)(N,{name:`more`})})]})]}),b&&(0,j.jsx)(`div`,{className:`kids`,children:v.map(e=>(0,j.jsx)(Tl,{slug:e,depth:t+1,scope:n,ws:r,expanded:i,current:a},e))})]})}var El={wide:32,narrow:8,least:2,clear:8,breath:14};function Dl(e){let t=e?.contentDocument,n=t?.querySelector(`main.doc-page`);if(!e||!t||!n)return El.wide;let r=parseFloat(getComputedStyle(t.documentElement).getPropertyValue(`--ge-edge-room`))||0,i=e.getBoundingClientRect().left+n.getBoundingClientRect().left-r,a=i+El.breath;return Math.round(Math.max(El.least,Math.min(El.wide,Math.max(i-El.clear,Math.min(El.narrow,a)))))}function Ol(){let e=f(Ne),t=f(R,e=>!!wi(Li,e)),n=e.mobile||!e.expanded,r=!e.mobile&&!e.expanded,[i,a]=(0,l.useState)(!1);(0,l.useLayoutEffect)(()=>{document.documentElement.style.setProperty(`--sb-w`,`${e.width}px`)},[e.width]);let o=f(F,e=>e.slug),s=f(F,e=>e.connected),[c,u]=(0,l.useState)(El.wide);(0,l.useEffect)(()=>{if(!r)return;let e=()=>document.querySelector(`iframe.report-frame:not([data-pending])`),t=null,n=()=>{let r=e()?.contentWindow??null;if(r!==t){try{t?.removeEventListener(`resize`,n)}catch{}t=r;try{t?.addEventListener(`resize`,n)}catch{t=null}}u(Dl(e()))};n();let i=e()?.parentElement,a=new ResizeObserver(n);i&&a.observe(i);let o=new MutationObserver(n);return i&&o.observe(i,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`data-pending`]}),window.addEventListener(`resize`,n),()=>{a.disconnect(),o.disconnect();try{t?.removeEventListener(`resize`,n)}catch{}window.removeEventListener(`resize`,n)}},[r,o,s]),(0,l.useEffect)(()=>e.mobile&&e.mobileOpen?Ce(()=>Ve(!1)):void 0,[e.mobile,e.mobileOpen]);let d=h(`sidebar`,r&&`floating`,r&&e.peek&&`peek`,e.mobile&&`mobile`,e.mobile&&e.mobileOpen&&`mobile-open`);return(0,j.jsxs)(`aside`,{className:h(`sb-container`,n&&`collapsed`),children:[(0,j.jsx)(`div`,{className:h(`sb-backdrop`,e.mobile&&e.mobileOpen&&`show`),onClick:()=>Ve(!1)}),(0,j.jsx)(`div`,{className:`sb-edge`,id:`sbEdge`,style:{width:c},onMouseEnter:Ue,onMouseLeave:qe}),(0,j.jsx)(`div`,{className:`sb-anchor`,children:(0,j.jsxs)(`nav`,{id:`sidebar`,className:d,"aria-label":O(`侧边栏`),onMouseEnter:()=>{Ne.get().peek&&Je()},onMouseLeave:()=>Ke(),children:[(0,j.jsx)(`div`,{className:`float-bg`}),(0,j.jsxs)(`div`,{className:`sb-inner`,children:[(0,j.jsxs)(`div`,{className:h(`sb-head`,i&&`scrolled`),children:[(0,j.jsxs)(`div`,{className:`sb-top`,children:[(0,j.jsx)(`button`,{className:`icon-btn sb-toggle`,"data-tip":O(`关闭侧边栏`),"data-sub":`${_}\\`,"aria-label":O(`关闭侧边栏`),onClick:()=>ze(!1,{fromClick:!0}),children:(0,j.jsx)(N,{name:`sidebar`})}),(0,j.jsx)(`span`,{className:h(`sb-brand`,t&&`home`),onClick:t?()=>void la(Li):void 0,children:`Gallery`})]}),(0,j.jsx)(`div`,{className:`sb-new-line`,children:(0,j.jsxs)(`button`,{className:`sb-act sb-new`,onClick:()=>void ao(),children:[(0,j.jsx)(`span`,{className:`sb-act-icon`,children:(0,j.jsx)(N,{name:`compose`})}),(0,j.jsx)(`span`,{className:`sb-act-label`,children:O(`新建`)})]})}),(0,j.jsxs)(`button`,{className:`sb-act sb-search`,"data-tip":O(`搜索文档`),"data-sub":`${_}K`,onClick:Ho,children:[(0,j.jsx)(`span`,{className:`sb-act-icon`,children:(0,j.jsx)(N,{name:`search`})}),(0,j.jsx)(`span`,{className:`sb-act-label`,children:O(`搜索`)})]}),(0,j.jsx)(fl,{})]}),(0,j.jsx)(Sl,{onScrolled:a}),(0,j.jsx)(kl,{})]})]})}),!n&&(0,j.jsx)(Al,{width:e.width})]})}function kl(){let e=f(he,ge),t=vt(`workspace`),n=f(R,e=>e.status);return(0,j.jsxs)(`div`,{className:`sb-foot`,children:[(0,j.jsxs)(`button`,{className:h(`ws-btn`,t&&`menu-open`),onClick:e=>_t(e.currentTarget,rl(),{placement:`top-start`,ownerKey:`workspace`}),children:[(0,j.jsx)(N,{name:`settings`}),(0,j.jsx)(`span`,{className:`ws-name`,children:O(`设置`)}),n!==`ready`&&(0,j.jsx)(`span`,{className:h(`ws-dot`,n),"data-tip":O(n===`loading`?`正在连接本地服务`:`没有连上本地服务`)})]}),(0,j.jsx)(`button`,{className:`icon-btn`,"data-tip":O(`外观:{0}`,be[e].label),"data-sub":O(`点击切换为{0}`,be[xe(e)].label),"aria-label":O(`切换主题`),onClick:k,children:(0,j.jsx)(N,{name:be[e].icon})})]})}function Al({width:e}){let t=(0,l.useRef)(null),n=n=>{if(n.button===0){n.preventDefault();try{n.currentTarget.setPointerCapture(n.pointerId)}catch{}t.current={x:n.clientX,w:e,moved:!1},document.body.classList.add(`resizing`)}},r=e=>{let n=t.current;if(!n)return;let r=e.clientX-n.x;!n.moved&&Math.abs(r)<3||(n.moved=!0,He(n.w+r))},i=()=>{let e=t.current;t.current=null,document.body.classList.remove(`resizing`),e&&!e.moved&&ze(!1)};return(0,j.jsx)(`div`,{className:`sb-resizer`,"data-tip":O(`拖动调整宽度`),"data-sub":O(`点击收起侧边栏`),"data-tip-pos":`cursor`,onPointerDown:n,onPointerMove:r,onPointerUp:i,onPointerCancel:i})}var jl=100,Ml=200,Nl=100,Pl=200,Fl=20,Il=5,Ll=d(null),Rl=new Set,zl=0,Bl=0,Vl=0,Hl=null,Ul=()=>{clearTimeout(Vl),Vl=0},Wl=()=>{Vl||=window.setTimeout(Jl,Ml)};function Gl(e,t){if(Ll.get()?.slug===e){Ul();return}clearTimeout(Bl),Bl=window.setTimeout(()=>ql(e,t),jl)}var Kl=()=>clearTimeout(Bl);function ql(e,t){clearTimeout(Bl),Ul(),!(Ne.get().peek||!t.isConnected)&&Ll.get()?.slug!==e&&(Ll.set({id:++zl,slug:e,anchor:t}),Hl??=Zl())}function Jl(){clearTimeout(Bl),Ul(),Ll.get()&&(Ll.set(null),Hl?.(),Hl=null)}var Yl=(e,t,n,r)=>e.left-r<=t&&t<=e.right+r&&e.top-r<=n&&n<=e.bottom+r;function Xl(e,t,n){let r=Ll.get();if(r&&Yl(r.anchor.getBoundingClientRect(),e,t,n))return!0;for(let r of Rl)if(Yl(r.getBoundingClientRect(),e,t,n))return!0;return!1}function Zl(){let e=e=>Xl(e.clientX,e.clientY,Fl)?Ul():Wl(),t=e=>{e.target instanceof HTMLIFrameElement&&Wl()},n=e=>{Xl(e.clientX,e.clientY,0)||Jl()},r=document.documentElement;document.addEventListener(`mousemove`,e,!0),document.addEventListener(`mouseover`,t,!0),document.addEventListener(`click`,n,!0),r.addEventListener(`mouseleave`,Wl),window.addEventListener(`blur`,Jl),window.addEventListener(`resize`,Jl);let i=Ce(Jl),a=Ne.subscribe(()=>{Ne.get().peek&&Jl()}),o=Ii.get().current,s=Ii.subscribe(()=>{Ii.get().current!==o&&Jl(),o=Ii.get().current});return()=>{document.removeEventListener(`mousemove`,e,!0),document.removeEventListener(`mouseover`,t,!0),document.removeEventListener(`click`,n,!0),r.removeEventListener(`mouseleave`,Wl),window.removeEventListener(`blur`,Jl),window.removeEventListener(`resize`,Jl),i(),a(),s()}}function Ql(e,t){let n=qn(e.meta,t)??``,r=Kn(e.meta,n).filter(t=>e.reports[t]),i=e.meta.groups.find(e=>(e.id===`docs`?``:`:${e.id}`)===n);return i?{items:r,label:bi(i,e)}:{items:r}}var $l=(e,t)=>Kn(e.meta,t).filter(t=>e.reports[t]);function eu(e,t,n){if(n||e.length<=6)return{visible:e,extra:0};let r=e.slice(0,Il);return!t||r.includes(t)||!e.includes(t)?{visible:r,extra:e.length-Il}:{visible:[t,...e.filter(e=>e!==t).slice(0,4)],extra:e.length-Il}}function tu(e,t,n){let r=t.getBoundingClientRect(),i=e.offsetWidth,a=e.offsetHeight,o=n===`below`?r.left:r.right+4+i>innerWidth-8?r.left-i-4:r.right+4,s=n===`below`?r.bottom+4:r.top;e.style.left=`${m(o,8,Math.max(8,innerWidth-i-8))}px`,e.style.top=`${m(s,8,Math.max(8,innerHeight-a-8))}px`}function nu(){let e=f(Ll),t=f(R);if(!e||t.status!==`ready`||!t.reports[e.slug])return null;let{items:n,label:r}=Ql(t,e.slug);return(0,j.jsx)(ru,{ws:t,items:n,label:r,trigger:e.slug,anchor:e.anchor,side:`below`},e.id)}function ru({ws:e,items:t,label:n,trigger:r,anchor:i,side:a}){let o=(0,l.useRef)(null),[s,c]=(0,l.useState)(!1),[u,d]=(0,l.useState)(null),p=(0,l.useRef)(0),m=f(Ii,e=>Bi(e));(0,l.useLayoutEffect)(()=>{let e=o.current,t=()=>tu(e,i,a);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[i,a]),(0,l.useEffect)(()=>{let e=o.current;return Rl.add(e),()=>{Rl.delete(e),clearTimeout(p.current)}},[]);let h=e=>{clearTimeout(p.current),p.current=window.setTimeout(()=>d(e),Nl)},g=()=>{clearTimeout(p.current),p.current=window.setTimeout(()=>d(null),Pl)},{visible:_,extra:v}=eu(t,r??m,s);return(0,A.createPortal)((0,j.jsxs)(`div`,{ref:o,className:`crumb-pop`,role:`menu`,children:[n&&(0,j.jsx)(`div`,{className:`crumb-pop-head`,children:n}),_.map(t=>(0,j.jsx)(iu,{ws:e,slug:t,tone:t===m?`current`:t===r?`trigger`:void 0,open:u===t,onHover:()=>$l(e,t).length?h(t):g()},t)),v>0&&(0,j.jsx)(`div`,{className:`crumb-pop-item more`,role:`menuitem`,onMouseOver:g,onClick:()=>c(!0),children:O(`另外 {0} 个`,v)})]}),document.body)}function iu({ws:e,slug:t,tone:n,open:r,onHover:i}){let[a,o]=(0,l.useState)(null),s=ml(t),c=e.reports[t],u=$l(e,t);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`div`,{ref:o,className:h(`crumb-pop-item`,n,r&&`open`),role:`menuitem`,"data-slug":t,onMouseOver:i,onClick:()=>{Jl(),sa(t)},children:[(0,j.jsx)(`span`,{className:`pg-icon`,children:(0,j.jsx)($e,{icon:c?.icon,slug:t,fallback:c?.kind===`link`?`web`:`page`})}),(0,j.jsx)(`span`,{className:`t`,children:s??mi(c)}),u.length>0&&(0,j.jsx)(`span`,{className:`crumb-pop-arrow`,children:(0,j.jsx)(N,{name:`chevron`})})]}),r&&a&&u.length>0&&(0,j.jsx)(ru,{ws:e,items:u,trigger:null,anchor:a,side:`beside`})]})}var G=`annotate`;function au({onDone:e}){let t=f(F,e=>e.annotations??0),n=f(F,e=>e.slug),[r,i]=(0,l.useState)([]);(0,l.useEffect)(()=>{let e=!1;return ts().then(t=>{e||i(t)}),()=>{e=!0}},[t,n]);let a=t===0?0:r.length,o=(0,l.useMemo)(()=>{let e=[{icon:`duplicate`,label:O(`复制批注`),kbd:t?O(`{0} 条`,t):``,disabled:t===0,onSelect:is},{icon:`trash`,label:O(`全部删除`),danger:!0,disabled:t===0,onSelect:()=>void ss()}];if(t===0)return[{kind:`empty`,label:O(`还没有批注。选中文字或点块右边的按钮来写`)},{kind:`sep`},...e];if(r.length===0)return e;let n=e=>e.quote||O(`(整块)`);return[...r.map(e=>({key:e.id,label:e.text.trim()||n(e),detail:e.text.trim()?n(e):void 0,onSelect:()=>ns(e.id)})),{kind:`sep`},...e]},[r,t]);return(0,j.jsx)(ut,{entries:o,onDone:e,scrolled:a})}function ou(){let e=f(F),t=vt(G),n=(0,l.useRef)(null),r=(0,l.useRef)(!1),i=()=>gt({anchor:n.current,ownerKey:G,placement:`bottom-end`,className:`controlled annot-list`,content:e=>(0,j.jsx)(au,{onDone:e})});return e.connected&&!Jt(`annotate`,e)?r.current=!1:e.connected&&e.annotations!==void 0&&(r.current=e.annotations>0),!r.current&&!t?null:(0,j.jsx)(`button`,{ref:n,className:h(`icon-btn`,`annot-btn`,t&&`annot-open`),"aria-label":O(`批注`),"aria-haspopup":`menu`,"aria-expanded":t,"data-tip":t?void 0:O(`批注`),"data-sub":t?void 0:g?`⌘⌥M`:`Ctrl+Alt+M`,onClick:i,onKeyDown:e=>{e.key===`ArrowDown`&&!t&&(e.preventDefault(),i())},children:(0,j.jsx)(N,{name:`annotate`})})}var su=`var(--font)`,cu=[{value:`sans`,label:O(`等线体`),tip:O(`无衬线字体,屏幕上读起来清楚,适合任何文档`),glyph:(0,j.jsx)(`span`,{style:{fontFamily:su},children:`Ag`})},{value:`serif`,label:O(`衬线体`),tip:O(`标题和正文都用衬线字体,适合长文章`),glyph:(0,j.jsx)(`span`,{style:{fontFamily:Ya},children:`Ag`})},{value:`mixed`,label:O(`混合体`),tip:O(`标题用衬线字体,正文用等线体`),glyph:(0,j.jsxs)(`span`,{children:[(0,j.jsx)(`span`,{style:{fontFamily:Ya},children:`A`}),(0,j.jsx)(`span`,{style:{fontFamily:su},children:`g`})]})}],lu=[{key:`size`,title:O(`字体大小`),choices:[{value:`small`,label:O(`小号`)},{value:`default`,label:O(`默认`)},{value:`large`,label:O(`大号`)}]},{key:`width`,title:O(`正文宽度`),choices:[{value:`narrow`,label:O(`偏窄`),tip:O(`默认字号下一行约 {0} 个字`,40)},{value:`default`,label:O(`默认`),tip:O(`默认字号下一行约 {0} 个字`,44)},{value:`wide`,label:O(`偏宽`),tip:O(`默认字号下一行约 {0} 个字`,48)}]},{key:`spacing`,title:O(`正文间距`),choices:[{value:`compact`,label:O(`紧凑`)},{value:`default`,label:O(`默认`)},{value:`loose`,label:O(`宽松`)}]}],uu=O(`全宽开着时不起作用,关掉全宽后按这里的宽度显示`);function du(e){return{kind:`switch`,key:`full-width`,icon:`fullWidth`,label:O(`全宽`),tip:O(`不管字体与布局里的正文宽度设成多少,页面都按全宽显示`),value:()=>zo(e).full===`full`,onChange:t=>Vo(e,`full`,t?`full`:`default`)}}function fu({slug:e}){f(F,e=>e.look),f(R,t=>t.reports[e]?.look);let t=zo(e),n=e=>t[e]??Ja[e][0],r=n(`full`)===`full`,i=(0,l.useRef)(null),a=e=>{let t=e.target,n=[...i.current?.querySelectorAll(`[data-look-row]`)??[]],r=n.findIndex(e=>e.contains(t));if(r<0)return;let a=e=>[...n[e].querySelectorAll(`button`)],o=a(r).indexOf(t),s=e=>{let t=a(e);return t[Math.min(o,t.length-1)]},c;if(e.key===`ArrowLeft`)c=a(r)[o-1];else if(e.key===`ArrowRight`)c=a(r)[o+1];else if(e.key===`ArrowUp`)c=r>0?s(r-1):void 0;else if(e.key===`ArrowDown`)c=r<n.length-1?s(r+1):void 0;else return;e.preventDefault(),c?.focus()},o=(t,r)=>({type:`button`,role:`radio`,"aria-checked":n(t)===r.value,"data-look":t,"data-value":r.value,"data-tip":r.tip,"data-menu-focus":t===`font`&&n(t)===r.value?``:void 0,onClick:()=>Vo(e,t,r.value)});return(0,j.jsxs)(`div`,{ref:i,className:`look-card`,"data-own-keys":``,onKeyDown:a,children:[(0,j.jsx)(`div`,{className:`menu-head`,children:O(`字体`)}),(0,j.jsx)(`div`,{className:`look-fonts`,role:`radiogroup`,"aria-label":O(`字体`),"data-look-row":``,children:cu.map(e=>(0,j.jsxs)(`button`,{className:h(`look-font`,n(`font`)===e.value&&`on`),...o(`font`,e),children:[(0,j.jsx)(`span`,{className:`look-glyph`,children:e.glyph}),(0,j.jsx)(`span`,{className:`look-caption`,children:e.label})]},e.value))}),lu.map(e=>{let t=e.key===`width`&&r;return(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`div`,{className:`menu-head`,children:e.title}),(0,j.jsx)(`div`,{className:h(`look-row`,t&&`look-off`),role:`radiogroup`,"aria-label":e.title,"data-look-row":``,"data-look-off":t?``:void 0,children:e.choices.map(r=>(0,j.jsx)(`button`,{className:h(`look-option`,n(e.key)===r.value&&`on`),...o(e.key,t?{...r,tip:uu}:r),children:r.label},r.value))})]},e.key)}),(0,j.jsx)(`div`,{className:`menu-sep`}),(0,j.jsx)(`div`,{className:`look-row`,"data-look-row":``,children:(0,j.jsx)(`button`,{type:`button`,className:`look-option look-apply`,"data-look-apply":``,"data-tip":O(`这份文档的字体与布局用到全部文档,新建的文档也一样`),onClick:()=>H(e),children:O(`应用到全部文档`)})})]})}function pu(e){if(!e.connected)return null;let t=e.flags;return t.conflicts>0?{text:t.unfit>0?O(`{0} 处内容待处理`,t.conflicts):O(`{0} 处冲突待处理`,t.conflicts),tone:`danger`}:t.offline?{text:O(`离线:修改暂存在浏览器`),tone:`warn`}:t.saving?{text:O(`正在保存…`),tone:`muted`}:t.pending?{text:O(`待保存`),tone:`muted`}:t.editing?{text:O(`已保存`),tone:`muted`}:null}function mu(){let e=f(R),t=f(Ii),n=Bi(t),r=Vi(t),i=r?wi(r,e):void 0,a=f(Ne,e=>e.mobile),o=f(F),s=vt(`topbar-more`),c=ul(r??``,`title`);(0,l.useEffect)(()=>ll,[r]);let u=ml(n),d=hl(n),p=n?e.reports[n]:void 0,m=Hi(t),g=m?e.reports[m]:void 0,v=t.current?.kind===`extension`?t.current.slug:null,y=(0,l.useRef)(null),b=v?Gi(v,e):void 0;b&&v&&(y.current={key:v,found:b});let x=b??(v&&Ki(v,e)&&y.current?.key===v?y.current.found:void 0);(0,l.useEffect)(()=>{let e=e=>{Xe()&&!e.target.closest?.(`#tbMenu`)&&Ye()};return document.addEventListener(`mousemove`,e,{passive:!0}),()=>document.removeEventListener(`mousemove`,e)},[]);let S=i?Ti(i):g?mi(g):x?x.entry.title:u??mi(p),C=!!(p||i||g||x);(0,l.useEffect)(()=>{document.title=C?`${S} · Gallery`:`Gallery`},[C,S]);let w=i?i.icon:g?g.icon??g.siteIcon??null:x?x.entry.icon??x.extension.icon??null:p?d===void 0?p.icon:d:null;(0,l.useEffect)(()=>{let e=document.querySelector(`link[rel="icon"]`);if(!e)return;if(!w||!(n||r||m||v)){e.href=gn;return}let t=w.startsWith(`data:image/`)?w:pn(w,n?.startsWith(`~`)?null:n,{tab:!0}),i=!1,a=new Image;return a.onload=()=>{i||(e.href=t)},a.onerror=()=>{i||(e.href=gn)},a.src=t,()=>{i=!0}},[w,n,r,m,v]);let T=(0,j.jsx)(`button`,{id:`tbMenu`,className:`icon-btn tb-menu`,"aria-label":O(`展开侧边栏`),"data-tip":O(a?`打开侧边栏`:`锁定展开侧边栏`),"data-sub":a?void 0:`${_}\\`,onMouseEnter:()=>{Xe()||Ue()},onMouseLeave:()=>{Ye(),qe()},onClick:()=>a?Ve(!0):ze(!0),children:(0,j.jsx)(N,{name:`sidebar`})});if(i){let e=async e=>{let t=document.querySelector(`iframe.report-frame:not([data-pending])`),n=e.getBoundingClientRect(),r=t?.getBoundingClientRect();(await I(`add-card`,{anchor:r?{left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,bottom:n.bottom-r.top}:void 0})).ok||P(O(`现在不能添加自定义块`),{tone:`error`})};return(0,j.jsxs)(`header`,{className:`topbar tb-page`,children:[(0,j.jsxs)(`div`,{className:`tb-left`,children:[T,(0,j.jsx)(`div`,{className:`crumbs`,children:(0,j.jsx)(`span`,{className:`crumb-wrap`,children:c?(0,j.jsx)(`span`,{className:`crumb crumb-rename`,"data-current":!0,children:(0,j.jsx)(dl,{slug:i.slug,title:S,label:O(`页面标题`),onSave:e=>void bo(i.slug,e)})}):(0,j.jsx)(`button`,{className:`crumb`,"data-current":!0,onClick:()=>{Jt(`scroll-top`,o)&&I(`scroll-top`)},children:(0,j.jsx)(`span`,{className:`t`,children:S})})})})]}),(0,j.jsx)(`div`,{className:`tb-right`,children:(0,j.jsx)(`button`,{className:h(`icon-btn`,s&&`menu-open`),"data-tip":O(`更多操作`),"aria-label":O(`操作`),onClick:t=>{let n=t.currentTarget;_t(n,Yc(i.slug,{inTopbar:!0,onRename:()=>cl(i.slug,`title`),onAddCard:Jt(`add-card`)?()=>void e(n):void 0}),{placement:`bottom-end`,ownerKey:`topbar-more`})},children:(0,j.jsx)(N,{name:`moreLg`})})})]})}if(m&&g||v&&x)return null;if(!n||!p)return(0,j.jsx)(`header`,{className:`topbar`,children:(0,j.jsx)(`div`,{className:`tb-left`,children:T})});let E=[...Jn(e.meta,n),n],D=E.map(e=>({slug:e}));a&&E.length>1?D=[{more:E.slice(0,-1)},{slug:n}]:E.length>4&&(D=[{slug:E[0]},{more:E.slice(1,-2)},{slug:E.at(-2)},{slug:n}]);let ee=e.meta.favorites.includes(n),te=p.kind===`draft`,ne=o.slug===n&&o.connected,re=o.slug===n?pu(o):null,ie=t=>t===n?S:mi(e.reports[t]),ae=async e=>{ne&&Jt(`scroll-top`,o)&&(await I(`scroll-top`)).scrolled?Jl():ql(n,e)};return(0,j.jsxs)(`header`,{className:`topbar`,children:[(0,j.jsxs)(`div`,{className:`tb-left`,children:[T,(0,j.jsx)(`div`,{className:`crumbs`,children:D.map((t,r)=>(0,j.jsxs)(`span`,{className:`crumb-wrap`,children:[r>0&&(0,j.jsx)(`span`,{className:`crumb-sep`,children:`/`}),`more`in t?(0,j.jsx)(`button`,{className:`crumb`,onClick:n=>_t(n.currentTarget,t.more.map(t=>({icon:`page`,label:mi(e.reports[t]),onSelect:()=>void sa(t)})),{ownerKey:`crumb-more`}),children:`…`}):(0,j.jsx)(`button`,{className:`crumb`,"data-current":t.slug===n||void 0,onMouseEnter:e=>Gl(t.slug,e.currentTarget),onMouseLeave:Kl,onClick:e=>void(t.slug===n?ae(e.currentTarget):sa(t.slug)),children:(0,j.jsx)(`span`,{className:`t`,children:ie(t.slug)})})]},`slug`in t?t.slug:`more-${r}`))}),re&&(0,j.jsx)(`span`,{className:h(`session-badge`,re.tone),children:re.text}),(0,j.jsx)(nu,{})]}),(0,j.jsxs)(`div`,{className:`tb-right`,children:[!te&&(0,j.jsx)(ou,{}),(0,j.jsx)(`button`,{className:h(`icon-btn`,ee&&`on`),"data-tip":O(ee?`取消收藏`:`收藏`),"aria-label":O(`收藏`),onClick:()=>to(n),children:(0,j.jsx)(N,{name:ee?`starFill`:`star`})}),(0,j.jsx)(`button`,{className:h(`icon-btn`,s&&`menu-open`),"data-tip":O(`更多操作`),"aria-label":O(`操作`),onClick:e=>{let t=e.currentTarget;if(te){_t(t,Zc(n,()=>document.querySelector(`.crumb[data-current]`)??t,{inTopbar:!0}),{placement:`bottom-end`,ownerKey:`topbar-more`});return}_t(t,[...Jc(n,()=>document.querySelector(`.crumb[data-current]`)??t,{withExport:!0}).slice(0,-2),...p.instructions?[]:[{kind:`sep`},{key:`look`,icon:`textFormat`,label:O(`字体与布局`),submenu:()=>(0,j.jsx)(fu,{slug:n}),submenuClass:`look-menu`}],...p.instructions?[]:[{kind:`switch`,key:`outline`,icon:`outline`,label:O(`目录`),tip:O(`在页面右侧显示标题目录,点击标题跳到那里`),value:()=>Ot(n),onChange:e=>kt(n,e)}],...p.instructions?[]:[du(n)],{kind:`sep`},{kind:`foot`,content:(0,j.jsx)(al,{slug:n})}],{placement:`bottom-end`,ownerKey:`topbar-more`})},children:(0,j.jsx)(N,{name:`moreLg`})})]})]})}function hu(){(0,l.useEffect)(()=>{let e=e=>{let t=e.ctrlKey||e.metaKey;if(t&&(e.key===`\\`||e.code===`Backslash`)){e.preventDefault(),Be();return}if(t&&e.key.toLowerCase()===`k`){e.preventDefault(),Wo();return}if(t&&e.key.toLowerCase()===`s`){e.preventDefault(),Jt(`save`,F.get())&&en();return}if(t&&e.altKey&&!e.shiftKey&&e.code===`KeyM`){Jt(`annotate`,F.get())&&(e.preventDefault(),es());return}e.key===`Escape`&&we()&&e.preventDefault()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[])}function gu(){let e=0,t=!1,n=!1,r=async()=>{if(t){n=!0;return}t=!0;try{do{n=!1,await ci();let e=R.get();await ai();let t=R.get();if(e.status===`ready`&&t.status===`ready`)for(let n of Zn(t.meta)){let r=qn(t.meta,n);r!==``&&r!==qn(e.meta,n)&&Mi(n)}}while(n)}finally{t=!1}},i=jr(()=>{clearTimeout(e),e=window.setTimeout(()=>void r(),100)});return()=>{clearTimeout(e),i()}}function _u(){let e=navigator.userAgentData?.brands;return e?.length?e.some(e=>e.brand===`Chromium`):/\b(Chrome|Chromium|Edg)\//.test(navigator.userAgent)}function vu(){let e=f(Ne),t=e.mobile||!e.expanded;return hu(),(0,l.useEffect)(()=>{z(),_u()||P(O(`编辑只支持 Chrome 和 Edge:这个浏览器里可以阅读,要编辑请用 Chrome 或 Edge 打开这个地址`),{duration:15e3});let e=0,t=()=>{document.visibilityState!==`visible`||Date.now()-e<2e3||(e=Date.now(),z())},n=e=>{qt()&&e.preventDefault()};document.addEventListener(`visibilitychange`,t),window.addEventListener(`beforeunload`,n);let r=gu();return()=>{r(),document.removeEventListener(`visibilitychange`,t),window.removeEventListener(`beforeunload`,n)}},[]),(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`div`,{className:h(`app`,t&&`sb-collapsed`,!e.mobile&&!e.expanded&&`peekable`),children:[(0,j.jsx)(Ol,{}),(0,j.jsxs)(`main`,{className:`main`,children:[(0,j.jsx)(mu,{}),(0,j.jsx)(xs,{})]})]}),(0,j.jsx)(bt,{}),(0,j.jsx)(Go,{}),(0,j.jsx)(Ps,{}),(0,j.jsx)(Sc,{}),(0,j.jsx)(Ys,{}),(0,j.jsx)(Ac,{}),(0,j.jsx)(Oe,{}),(0,j.jsx)(It,{}),(0,j.jsx)(Ft,{})]})}document.documentElement.lang=ce===`en`?`en`:`zh-CN`,(0,u.createRoot)(document.getElementById(`root`)).render((0,j.jsx)(l.StrictMode,{children:(0,j.jsx)(vu,{})})),setTimeout(()=>document.body.classList.remove(`preload`),100);