orc-ai 0.1.63 → 0.1.65

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 (268) hide show
  1. package/README.md +3 -2
  2. package/dist/index.js +910 -809
  3. package/dist/skills/orc-platform/SKILL.md +1 -1
  4. package/dist/skills/orc-platform/references/html-kit.md +154 -0
  5. package/dist/skills/orc-platform/references/scratchpads.md +6 -2
  6. package/dist/web/assets/{Agents-DmrIiUAL.js → Agents-CXxHOAVS.js} +2 -2
  7. package/dist/web/assets/Audit-B38_H4W1.js +1 -0
  8. package/dist/web/assets/ChatUiRenderer-BYlgsVLZ.js +4 -0
  9. package/dist/web/assets/ConfirmDialog-DKN0AVIw.js +1 -0
  10. package/dist/web/assets/{Dashboard-Dh9P-zTd.js → Dashboard-BZKUS4Tw.js} +1 -1
  11. package/dist/web/assets/DocumentWorkspace-B9hQN2EX.js +1 -0
  12. package/dist/web/assets/{ErrorState-DB0nWfcc.js → ErrorState-CpcyNx03.js} +1 -1
  13. package/dist/web/assets/FileEditor-BK8_4AJM.js +1 -0
  14. package/dist/web/assets/{IntegrationCallback-CUZ5N-88.js → IntegrationCallback-DCf4a1AA.js} +1 -1
  15. package/dist/web/assets/JobWebhooks-C2F4RzTr.js +1 -0
  16. package/dist/web/assets/Jobs-Dho4B9b-.js +3 -0
  17. package/dist/web/assets/Knowledge-CDhPBr8J.js +1 -0
  18. package/dist/web/assets/{MarkdownRenderer-fsBqw-wB.js → MarkdownRenderer-DM6lt7Sg.js} +5 -5
  19. package/dist/web/assets/{NativeFolderField-BuHwey26.js → NativeFolderField-D1ZqCzY1.js} +1 -1
  20. package/dist/web/assets/Notifications-Ciw_MC2q.js +1 -0
  21. package/dist/web/assets/PackageCatalog-BuT4GoJo.js +8 -0
  22. package/dist/web/assets/{PackageRunDialog-C8m43ZhJ.js → PackageRunDialog-CW_N4ttU.js} +14 -14
  23. package/dist/web/assets/{Pager-Dbs7fj3d.js → Pager-B-GnS1ry.js} +1 -1
  24. package/dist/web/assets/{PriorityBadge-DOfXvpzs.js → PriorityBadge-CZt2elFq.js} +1 -1
  25. package/dist/web/assets/Projects-C27puQUE.js +3 -0
  26. package/dist/web/assets/{ResponsiveFilters-HzhzzjyL.js → ResponsiveFilters-BwU4JbGU.js} +1 -1
  27. package/dist/web/assets/{ResumeActions-e6YpUhEq.js → ResumeActions-S3h5yKXv.js} +1 -1
  28. package/dist/web/assets/Rules-Dqx8X4wX.js +18 -0
  29. package/dist/web/assets/{ScratchpadDiagramEditor-DkW_SmM8.js → ScratchpadDiagramEditor-iUkemC_h.js} +1 -1
  30. package/dist/web/assets/{ScratchpadDiagramPreview-C76RVMjL.js → ScratchpadDiagramPreview-Cmim9yNA.js} +1 -1
  31. package/dist/web/assets/Scratchpads-DRIBlLwW.js +10 -0
  32. package/dist/web/assets/SessionContextChart-CXAR0czK.js +53 -0
  33. package/dist/web/assets/SessionHomeLink-DKoq9wT8.js +1 -0
  34. package/dist/web/assets/Sessions-DBthIWpR.js +5 -0
  35. package/dist/web/assets/Settings-DU-nfC2z.js +14 -0
  36. package/dist/web/assets/Skills-BPkciOfy.js +3 -0
  37. package/dist/web/assets/{SourceEditor-B6pT-Rc0.js → SourceEditor-CKe3Nz5k.js} +4 -4
  38. package/dist/web/assets/{StatusBadge-CKL0hTFN.js → StatusBadge-Cz0GkMFG.js} +1 -1
  39. package/dist/web/assets/{TagInput-ChFu05vJ.js → TagInput-QqNDQOz_.js} +1 -1
  40. package/dist/web/assets/TaskDetailSheet-BGAiFxPD.js +1 -0
  41. package/dist/web/assets/Tasks-daCTnumY.js +22 -0
  42. package/dist/web/assets/Terminals-CmRdwS_i.js +2 -0
  43. package/dist/web/assets/{ViewHeader-D-lhe59Y.js → ViewHeader-BiFirRWq.js} +1 -1
  44. package/dist/web/assets/{Webhooks-BxpA1QBK.js → Webhooks-8B-qbOiF.js} +1 -1
  45. package/dist/web/assets/{abnfDiagram-VCTEODGH-YjFRM2fZ.js → abnfDiagram-VCTEODGH-iJD2ux9-.js} +1 -1
  46. package/dist/web/assets/{ar-SA-G6X2FPQ2-BHNmOPAa.js → ar-SA-G6X2FPQ2-A9u8XBOh.js} +1 -1
  47. package/dist/web/assets/arc--oLrmj2u.js +1 -0
  48. package/dist/web/assets/{architectureDiagram-5GKGNRK7-CM-izM65.js → architectureDiagram-5GKGNRK7-N_U_y2_H.js} +1 -1
  49. package/dist/web/assets/{az-AZ-76LH7QW2-CYylNbd1.js → az-AZ-76LH7QW2-_Avg9k39.js} +1 -1
  50. package/dist/web/assets/{badge-BqTVr27Z.js → badge-BEhHQEk0.js} +1 -1
  51. package/dist/web/assets/band-Dy_5MQ5S.js +1 -0
  52. package/dist/web/assets/{bg-BG-XCXSNQG7-VqpfCk7Q.js → bg-BG-XCXSNQG7-BdxsdW9p.js} +1 -1
  53. package/dist/web/assets/{blockDiagram-I7D4REHJ-DRqi0uO6.js → blockDiagram-I7D4REHJ-WgVekjtP.js} +2 -2
  54. package/dist/web/assets/{bn-BD-2XOGV67Q-sq5066za.js → bn-BD-2XOGV67Q-CC9Qp9V1.js} +1 -1
  55. package/dist/web/assets/bundle-mjs-Dvhef5Db.js +1 -0
  56. package/dist/web/assets/button-BlVCkBiz.js +1 -0
  57. package/dist/web/assets/{c4Diagram-7LVT6UL2-5kgD36Wg.js → c4Diagram-7LVT6UL2-CDC_qpoG.js} +1 -1
  58. package/dist/web/assets/{ca-ES-6MX7JW3Y-C1-EfJt9.js → ca-ES-6MX7JW3Y-NrHWpdXC.js} +1 -1
  59. package/dist/web/assets/channel-DCr5AYQF.js +1 -0
  60. package/dist/web/assets/check-cnj-S1QW.js +1 -0
  61. package/dist/web/assets/chevron-down-CsfelGxA.js +1 -0
  62. package/dist/web/assets/chevron-up-COeKodk9.js +1 -0
  63. package/dist/web/assets/{chunk-4HAMMTFA-DY6eE90t.js → chunk-4HAMMTFA-Cpqa-wt-.js} +1 -1
  64. package/dist/web/assets/chunk-75Z2AOVW-sSmASBxo.js +2 -0
  65. package/dist/web/assets/{chunk-DU6HZSFF-BaVVqpDB.js → chunk-DU6HZSFF-DaBSmv4k.js} +15 -15
  66. package/dist/web/assets/{chunk-EIO257PC-D5dZL9PV.js → chunk-EIO257PC-CGfJ7MC8.js} +1 -1
  67. package/dist/web/assets/chunk-F27PBJKO-CcJz7Bwe.js +1 -0
  68. package/dist/web/assets/{chunk-GMAD6QVW-D7d5cxQ3.js → chunk-GMAD6QVW-DZDh-p1Z.js} +1 -1
  69. package/dist/web/assets/{chunk-GVQU2GXP-GfOuiNH1.js → chunk-GVQU2GXP-BbzNYx58.js} +1 -1
  70. package/dist/web/assets/{chunk-IMKFNOWR-BRI_39MI.js → chunk-IMKFNOWR-wPoHkMoN.js} +1 -1
  71. package/dist/web/assets/{chunk-L3NEJ4N5-BD8q2mez.js → chunk-L3NEJ4N5-4ku89onu.js} +1 -1
  72. package/dist/web/assets/{chunk-OB3PAWPO-1IihCzFx.js → chunk-OB3PAWPO-BD6ylT0A.js} +1 -1
  73. package/dist/web/assets/{chunk-OSK3NFVY-DN8XtEwT.js → chunk-OSK3NFVY-C3koYeVe.js} +2 -2
  74. package/dist/web/assets/{chunk-P2QGCYS3-DpMkYw3X.js → chunk-P2QGCYS3-BUvkZ5te.js} +1 -1
  75. package/dist/web/assets/{chunk-POPQ4Y6H-D3Y4enjb.js → chunk-POPQ4Y6H-pNL2Y3ZS.js} +1 -1
  76. package/dist/web/assets/{chunk-PWAF6VOD-CP1kSMru.js → chunk-PWAF6VOD-BA8RFgOa.js} +1 -1
  77. package/dist/web/assets/{chunk-SHT3W25Y-agGbkFhr.js → chunk-SHT3W25Y-C6oc6uF-.js} +1 -1
  78. package/dist/web/assets/{chunk-SVP7TREG-CjcYm9eZ.js → chunk-SVP7TREG-knpgIhM0.js} +1 -1
  79. package/dist/web/assets/{chunk-TICWLB2K-Db1GTJPo.js → chunk-TICWLB2K-CnSgTstQ.js} +1 -1
  80. package/dist/web/assets/chunk-XXDRQBXY-CiSqEX14.js +1 -0
  81. package/dist/web/assets/{circle-check-DWP3C_MJ.js → circle-check-CrMHbBhC.js} +1 -1
  82. package/dist/web/assets/classDiagram-ZZMXUADV-CniI4twA.js +1 -0
  83. package/dist/web/assets/classDiagram-v2-VYDZK3BY-CniI4twA.js +1 -0
  84. package/dist/web/assets/client-RPZmgRqE.js +1 -0
  85. package/dist/web/assets/clsx-DB0hHKMi.js +1 -0
  86. package/dist/web/assets/{cose-bilkent-JH36ORCC-D7HExB1j.js → cose-bilkent-JH36ORCC-WMJznyo8.js} +1 -1
  87. package/dist/web/assets/{cs-CZ-2BRQDIVT-57tJuhpe.js → cs-CZ-2BRQDIVT-Ba4hnkba.js} +1 -1
  88. package/dist/web/assets/{cynefinDiagram-5FMLGOSQ-BRv5c19u.js → cynefinDiagram-5FMLGOSQ-wD6URJ3N.js} +1 -1
  89. package/dist/web/assets/{da-DK-5WZEPLOC-DM7XjaYi.js → da-DK-5WZEPLOC-uSaFrm3y.js} +1 -1
  90. package/dist/web/assets/{dagre-GXQ25YYZ-CcpkObIw.js → dagre-GXQ25YYZ-I42gsSBt.js} +1 -1
  91. package/dist/web/assets/{de-DE-XR44H4JA-CQpZC2C8.js → de-DE-XR44H4JA-BDGHC6qO.js} +1 -1
  92. package/dist/web/assets/{diagram-S7CK7UJ4-DPSbKZeN.js → diagram-S7CK7UJ4-BZ_g6i3U.js} +1 -1
  93. package/dist/web/assets/{diagram-UQ7AKVKN-C8fuojtv.js → diagram-UQ7AKVKN-VdNRRNwK.js} +1 -1
  94. package/dist/web/assets/{diagram-VSXAHHWV-DXpqw8sz.js → diagram-VSXAHHWV-rtLzm0Wd.js} +1 -1
  95. package/dist/web/assets/{diagram-VX7I27RA-CvLbqSKv.js → diagram-VX7I27RA-gyOuVk1o.js} +1 -1
  96. package/dist/web/assets/{diagram-Z3DM3KII-CCJALgIu.js → diagram-Z3DM3KII-BIAY89dr.js} +1 -1
  97. package/dist/web/assets/dist-B-iYpxX5.js +1 -0
  98. package/dist/web/assets/{dist-DScw4RwC.js → dist-BxZ8dALn.js} +1 -1
  99. package/dist/web/assets/{dist-BcD2-hDT.js → dist-CDGM8ohF.js} +1 -1
  100. package/dist/web/assets/{download-BD7lYc4O.js → download-Cnjcb403.js} +1 -1
  101. package/dist/web/assets/{ebnfDiagram-PWID7BFC-CcnL5GVi.js → ebnfDiagram-PWID7BFC-y5UVvV0S.js} +1 -1
  102. package/dist/web/assets/{el-GR-BZB4AONW-BG0fwyry.js → el-GR-BZB4AONW-Cq0J1GFb.js} +1 -1
  103. package/dist/web/assets/{en-B4ZKOASM-CYtHfac-.js → en-B4ZKOASM-BKgOGNRH.js} +1 -1
  104. package/dist/web/assets/{erDiagram-RLTQ6QDP-BxnqbJDI.js → erDiagram-RLTQ6QDP-D72PXJS0.js} +1 -1
  105. package/dist/web/assets/{es-ES-U4NZUMDT-DeCoGq3I.js → es-ES-U4NZUMDT-BQarpdAK.js} +1 -1
  106. package/dist/web/assets/{eu-ES-A7QVB2H4-BgrTM9Q_.js → eu-ES-A7QVB2H4-BFw3LO5C.js} +1 -1
  107. package/dist/web/assets/{fa-IR-HGAKTJCU-BMNXHhCI.js → fa-IR-HGAKTJCU-G08hIy4T.js} +1 -1
  108. package/dist/web/assets/{fi-FI-Z5N7JZ37-AvkTA6Bg.js → fi-FI-Z5N7JZ37-B2zrN1xY.js} +1 -1
  109. package/dist/web/assets/flowDiagram-HODETNUW-DnTsInvQ.js +1 -0
  110. package/dist/web/assets/{fr-FR-RHASNOE6-DdOUGndN.js → fr-FR-RHASNOE6-BDx47Foj.js} +1 -1
  111. package/dist/web/assets/ganttDiagram-EL5Y4UJY-DjxW88Yq.js +292 -0
  112. package/dist/web/assets/{gitGraphDiagram-WWUBYQGX-jRvw-5Ks.js → gitGraphDiagram-WWUBYQGX-Dj0nxLL6.js} +1 -1
  113. package/dist/web/assets/{gl-ES-HMX3MZ6V-BOcT9Eh2.js → gl-ES-HMX3MZ6V-BSuDtk1T.js} +1 -1
  114. package/dist/web/assets/{he-IL-6SHJWFNN-XKCHaRIK.js → he-IL-6SHJWFNN-BD_wF5WF.js} +1 -1
  115. package/dist/web/assets/{hi-IN-IWLTKZ5I-DIIO_PCe.js → hi-IN-IWLTKZ5I-PL1UA69H.js} +1 -1
  116. package/dist/web/assets/{highlighted-body-JLMTFACH-CAMR1LA5.js → highlighted-body-JLMTFACH-DqkWK4Ru.js} +1 -1
  117. package/dist/web/assets/{hu-HU-A5ZG7DT2-Dbjtq-D1.js → hu-HU-A5ZG7DT2-BXSops5K.js} +1 -1
  118. package/dist/web/assets/{id-ID-SAP4L64H-CDk9puhw.js → id-ID-SAP4L64H-CCy09Vc3.js} +1 -1
  119. package/dist/web/assets/{image-GAAHSSAO-rkI8hLQy.js → image-GAAHSSAO-L254mjR1.js} +1 -1
  120. package/dist/web/assets/index-DMLXoHsj.css +1 -0
  121. package/dist/web/assets/index-DsVJrhHJ.js +134 -0
  122. package/dist/web/assets/{infoDiagram-27XIBGKW-BNBESmTb.js → infoDiagram-27XIBGKW-LjBCF4PZ.js} +1 -1
  123. package/dist/web/assets/init-ZlXS9mIS.js +1 -0
  124. package/dist/web/assets/isArguments-2ZchtnyI.js +1 -0
  125. package/dist/web/assets/{ishikawaDiagram-5VMMS53U-DaNMtDzK.js → ishikawaDiagram-5VMMS53U-j6nqDra0.js} +1 -1
  126. package/dist/web/assets/{it-IT-JPQ66NNP-YRZ57kPD.js → it-IT-JPQ66NNP-DFolA_LS.js} +1 -1
  127. package/dist/web/assets/{ja-JP-DBVTYXUO-DVMZSYKy.js → ja-JP-DBVTYXUO-B6D9xBWl.js} +1 -1
  128. package/dist/web/assets/{journeyDiagram-3NMN7TZE-DxFIkTjg.js → journeyDiagram-3NMN7TZE-LzOfr9eG.js} +1 -1
  129. package/dist/web/assets/{kaa-6HZHGXH3-CptDAgKS.js → kaa-6HZHGXH3-C72QaGJt.js} +1 -1
  130. package/dist/web/assets/{kab-KAB-ZGHBKWFO-OATW2sAD.js → kab-KAB-ZGHBKWFO-B8iK2b_z.js} +1 -1
  131. package/dist/web/assets/{kanban-definition-UXKFOSKX-FWblng5Q.js → kanban-definition-UXKFOSKX-D2I3KztT.js} +1 -1
  132. package/dist/web/assets/{kk-KZ-P5N5QNE5-B6R_70EG.js → kk-KZ-P5N5QNE5-D6W-P7rh.js} +1 -1
  133. package/dist/web/assets/{km-KH-HSX4SM5Z-Cxdswtta.js → km-KH-HSX4SM5Z-FNampihM.js} +1 -1
  134. package/dist/web/assets/{ko-KR-MTYHY66A-C-K_IuWl.js → ko-KR-MTYHY66A-VOraSkjG.js} +1 -1
  135. package/dist/web/assets/{ku-TR-6OUDTVRD-zFXPVPDH.js → ku-TR-6OUDTVRD-m2GGjf0J.js} +1 -1
  136. package/dist/web/assets/linear-jUOPAx5A.js +1 -0
  137. package/dist/web/assets/{live-sessions-C6D_vHcN.js → live-sessions-DYGSpoN-.js} +1 -1
  138. package/dist/web/assets/{lt-LT-XHIRWOB4-DkOTIbBj.js → lt-LT-XHIRWOB4-d3lU0RUK.js} +1 -1
  139. package/dist/web/assets/{lv-LV-5QDEKY6T-DjJBaytN.js → lv-LV-5QDEKY6T-C-V5Fk7E.js} +1 -1
  140. package/dist/web/assets/{maximize-2-BUxUwGbf.js → maximize-2-ar3sWM7r.js} +1 -1
  141. package/dist/web/assets/mermaid-WFAXDIZX-3nzsUtGy.js +1 -0
  142. package/dist/web/assets/{mermaid.core-CE0shN4j.js → mermaid.core-BD-HQdEx.js} +7 -7
  143. package/dist/web/assets/{mindmap-definition-YA3MSWOX-B6gMnn2w.js → mindmap-definition-YA3MSWOX-B9R_Kw48.js} +1 -1
  144. package/dist/web/assets/{mr-IN-CRQNXWMA-CpBrL5xP.js → mr-IN-CRQNXWMA-Daz7uyn8.js} +1 -1
  145. package/dist/web/assets/{my-MM-5M5IBNSE-n3gOu566.js → my-MM-5M5IBNSE-Mjs8RG1b.js} +1 -1
  146. package/dist/web/assets/{nb-NO-T6EIAALU-BotYv1MD.js → nb-NO-T6EIAALU-C0RCBqbi.js} +1 -1
  147. package/dist/web/assets/{nl-NL-IS3SIHDZ-DW0fsbWy.js → nl-NL-IS3SIHDZ-Bsic6fKl.js} +1 -1
  148. package/dist/web/assets/{nn-NO-6E72VCQL-Bb-fnU0x.js → nn-NO-6E72VCQL-DSLrCxXF.js} +1 -1
  149. package/dist/web/assets/{oc-FR-POXYY2M6-shEPc56q.js → oc-FR-POXYY2M6-CPVBImHE.js} +1 -1
  150. package/dist/web/assets/orc-kit-BZEVA3Qv.js +317 -0
  151. package/dist/web/assets/{ordinal-DtR4qwUh.js → ordinal-CNdcxYwv.js} +1 -1
  152. package/dist/web/assets/{pa-IN-N4M65BXN-DKavQSyF.js → pa-IN-N4M65BXN-C00X1yKx.js} +1 -1
  153. package/dist/web/assets/{pegDiagram-XKGWAZYB-C8m_jYi3.js → pegDiagram-XKGWAZYB-BscU1Iej.js} +1 -1
  154. package/dist/web/assets/percentages-BXMCSKIN-C29vMz-s.js +1 -0
  155. package/dist/web/assets/{pieDiagram-E7YTZNPT-hq51jARC.js → pieDiagram-E7YTZNPT-Dod_xS5_.js} +2 -2
  156. package/dist/web/assets/{pl-PL-T2D74RX3-BNiWQazy.js → pl-PL-T2D74RX3-CM9U623C.js} +1 -1
  157. package/dist/web/assets/prod-C5uPTMUm.js +159 -0
  158. package/dist/web/assets/{pt-BR-5N22H2LF-BNrp0SJn.js → pt-BR-5N22H2LF-DQ3Sbme5.js} +1 -1
  159. package/dist/web/assets/{pt-PT-UZXXM6DQ-MqcjbYsn.js → pt-PT-UZXXM6DQ-CR9ceNr0.js} +1 -1
  160. package/dist/web/assets/{quadrantDiagram-AXDQQJYC-BZo19rHO.js → quadrantDiagram-AXDQQJYC--WMts-_Y.js} +1 -1
  161. package/dist/web/assets/{railroadDiagram-O6MQD6OU-BoHZurmH.js → railroadDiagram-O6MQD6OU-Zo4FiyLl.js} +1 -1
  162. package/dist/web/assets/{requirementDiagram-BXWQKSXE-gtSxT-KO.js → requirementDiagram-BXWQKSXE-C9FUscr7.js} +1 -1
  163. package/dist/web/assets/{ro-RO-JPDTUUEW-BaD_m5BY.js → ro-RO-JPDTUUEW-gSdEtVLo.js} +1 -1
  164. package/dist/web/assets/{ru-RU-B4JR7IUQ-BOeGQntq.js → ru-RU-B4JR7IUQ-Bfn8z4LG.js} +1 -1
  165. package/dist/web/assets/{sankeyDiagram-P5KCCOFB-DNEPPK03.js → sankeyDiagram-P5KCCOFB-B2nE--ks.js} +1 -1
  166. package/dist/web/assets/{scratchpad-kinds-B0Y6McXL.js → scratchpad-kinds-BFBap9Ix.js} +1 -1
  167. package/dist/web/assets/{scratchpad-routes-BtsIfhUW.js → scratchpad-routes-DqBRARVl.js} +1 -1
  168. package/dist/web/assets/{scroll-area-BhajWBGy.js → scroll-area-BN-yOL-R.js} +1 -1
  169. package/dist/web/assets/send-CwHls3BT.js +1 -0
  170. package/dist/web/assets/{sequenceDiagram-WJ2MYXX4-CQUgLsRi.js → sequenceDiagram-WJ2MYXX4-NENQLpHl.js} +1 -1
  171. package/dist/web/assets/{si-LK-N5RQ5JYF-CEpiTE5c.js → si-LK-N5RQ5JYF-DqNpE809.js} +1 -1
  172. package/dist/web/assets/{sk-SK-C5VTKIMK-lXa56uQB.js → sk-SK-C5VTKIMK-DSieo7hl.js} +1 -1
  173. package/dist/web/assets/{sl-SI-NN7IZMDC-S7pYt-A8.js → sl-SI-NN7IZMDC-C_QNEPH3.js} +1 -1
  174. package/dist/web/assets/src-B1erg8EN.js +1 -0
  175. package/dist/web/assets/stateDiagram-D77RDMKH-CDO25lPI.js +1 -0
  176. package/dist/web/assets/stateDiagram-v2-MP3YSRHH-C9Au5pzl.js +1 -0
  177. package/dist/web/assets/subset-shared.chunk-TWhTI8tf.js +1 -0
  178. package/dist/web/assets/{subset-worker.chunk-DAdqTVJ_.js → subset-worker.chunk-BOESNY_w.js} +1 -1
  179. package/dist/web/assets/{sv-SE-XGPEYMSR-BAmS64lt.js → sv-SE-XGPEYMSR-DQbljox0.js} +1 -1
  180. package/dist/web/assets/{swimlanes-42K2YHIH-oYky4P3y.js → swimlanes-42K2YHIH--W-6fn8i.js} +1 -1
  181. package/dist/web/assets/swimlanesDiagram-VR7AAH4N-C6219OQ4.js +8 -0
  182. package/dist/web/assets/{ta-IN-2NMHFXQM-B2aOysQ6.js → ta-IN-2NMHFXQM-CfU7EiJ8.js} +1 -1
  183. package/dist/web/assets/{table-COm8Aml-.js → table-D2GMF--l.js} +1 -1
  184. package/dist/web/assets/{th-TH-HPSO5L25-MKFJurV1.js → th-TH-HPSO5L25-DGG0--S2.js} +1 -1
  185. package/dist/web/assets/time-B49d1LAz.js +1 -0
  186. package/dist/web/assets/{timeline-definition-24CTP7MA-DlK_cujT.js → timeline-definition-24CTP7MA-BkCND9aP.js} +1 -1
  187. package/dist/web/assets/{tr-TR-DEFEU3FU-DKE7gZ4N.js → tr-TR-DEFEU3FU-CsrGQhyP.js} +1 -1
  188. package/dist/web/assets/{uk-UA-QMV73CPH-DutAOQit.js → uk-UA-QMV73CPH-BLl6JvGg.js} +1 -1
  189. package/dist/web/assets/{upload-CPf6QZHl.js → upload-Bbixlc7i.js} +1 -1
  190. package/dist/web/assets/{useDetailRoute-DOhAbdV7.js → useDetailRoute-B-xjWsyW.js} +1 -1
  191. package/dist/web/assets/{useIntegrations-C0MAVKB4.js → useIntegrations-D5PIxedU.js} +1 -1
  192. package/dist/web/assets/{useJobs-BlWldKP0.js → useJobs-DYaqHA8F.js} +1 -1
  193. package/dist/web/assets/{useListSelection-BnMxiGpC.js → useListSelection-BKCFyGyf.js} +1 -1
  194. package/dist/web/assets/{useMemories-CAf8HcOI.js → useMemories-Ce1S_iFK.js} +1 -1
  195. package/dist/web/assets/useProjectScope-DpgzthH7.js +1 -0
  196. package/dist/web/assets/{useSessions-DiUU2FN8.js → useSessions-D1nMvBf0.js} +1 -1
  197. package/dist/web/assets/{vennDiagram-4TSXK5OY-C53t_PT9.js → vennDiagram-4TSXK5OY-VAg3OK5L.js} +1 -1
  198. package/dist/web/assets/{vi-VN-M7AON7JQ-BpbS22dK.js → vi-VN-M7AON7JQ-D4YR0jtR.js} +1 -1
  199. package/dist/web/assets/{view-params-DD7i9s5g.js → view-params-YEmeZppw.js} +1 -1
  200. package/dist/web/assets/{wardleyDiagram-VM6X3IG4-ks9GYCVg.js → wardleyDiagram-VM6X3IG4-ryXBKUqB.js} +1 -1
  201. package/dist/web/assets/with-selector-DSvXfKhy.js +1 -0
  202. package/dist/web/assets/x-uOircJYm.js +1 -0
  203. package/dist/web/assets/xychartDiagram-S5SC5T6Z-DvmDulIn.js +7 -0
  204. package/dist/web/assets/{zh-CN-LNUGB5OW-BWtL4V8y.js → zh-CN-LNUGB5OW-D_9Jun9E.js} +1 -1
  205. package/dist/web/assets/{zh-HK-E62DVLB3-DrfXDi4l.js → zh-HK-E62DVLB3-DRMBZQpA.js} +1 -1
  206. package/dist/web/assets/{zh-TW-RAJ6MFWO-BVZGUfP5.js → zh-TW-RAJ6MFWO-a3dZK_3C.js} +1 -1
  207. package/dist/web/index.html +17 -22
  208. package/dist/web/sw.js +26 -17
  209. package/package.json +1 -1
  210. package/dist/web/assets/Audit-DGSNmToV.js +0 -1
  211. package/dist/web/assets/ChatUiRenderer-Dddr55cW.js +0 -4
  212. package/dist/web/assets/ConfirmDialog-B5es4nUp.js +0 -1
  213. package/dist/web/assets/DocumentWorkspace-I81K42yx.js +0 -1
  214. package/dist/web/assets/FileEditor-wRs221QU.js +0 -1
  215. package/dist/web/assets/JobWebhooks-oaF694Af.js +0 -1
  216. package/dist/web/assets/Jobs-Lmyw5700.js +0 -3
  217. package/dist/web/assets/Knowledge-V4JuZnUZ.js +0 -1
  218. package/dist/web/assets/Markdown-D-AaJ4bU.js +0 -2
  219. package/dist/web/assets/MarkdownEditor-5U4_BhYm.js +0 -2
  220. package/dist/web/assets/PackageCatalog-BC-yAjPQ.js +0 -8
  221. package/dist/web/assets/Projects-C280nbHV.js +0 -3
  222. package/dist/web/assets/Rules-BwsnRQBe.js +0 -18
  223. package/dist/web/assets/Scratchpads-BtUKOhup.js +0 -10
  224. package/dist/web/assets/SessionHomeLink-BAWO86fJ.js +0 -1
  225. package/dist/web/assets/Sessions-Cn2dIJBt.js +0 -4
  226. package/dist/web/assets/Settings-Bb01CfFw.js +0 -14
  227. package/dist/web/assets/Skills-Vw41zPVg.js +0 -3
  228. package/dist/web/assets/TaskDetailSheet-DuTfo6rZ.js +0 -1
  229. package/dist/web/assets/Tasks-CC92r1kL.js +0 -22
  230. package/dist/web/assets/Terminals-dCbgpRsm.js +0 -2
  231. package/dist/web/assets/arc-DMybztRk.js +0 -1
  232. package/dist/web/assets/array-BifhSqXX.js +0 -1
  233. package/dist/web/assets/bundle-mjs-CdK3cBzO.js +0 -1
  234. package/dist/web/assets/button-By-NN7c7.js +0 -1
  235. package/dist/web/assets/channel-D_DFR6oL.js +0 -1
  236. package/dist/web/assets/check-Cg2_C_4I.js +0 -1
  237. package/dist/web/assets/chevron-down-KBvm_HoX.js +0 -1
  238. package/dist/web/assets/chunk-75Z2AOVW-DGmxZV98.js +0 -2
  239. package/dist/web/assets/chunk-F27PBJKO-CXQQU8th.js +0 -1
  240. package/dist/web/assets/chunk-XXDRQBXY-uYQniKdI.js +0 -1
  241. package/dist/web/assets/classDiagram-ZZMXUADV-CCfdDM3y.js +0 -1
  242. package/dist/web/assets/classDiagram-v2-VYDZK3BY-CCfdDM3y.js +0 -1
  243. package/dist/web/assets/client-954dj6K2.js +0 -1
  244. package/dist/web/assets/dialog-DNIYhwi4.js +0 -1
  245. package/dist/web/assets/file-kind-BYU1kv95.js +0 -1
  246. package/dist/web/assets/flowDiagram-HODETNUW-K6mpRghJ.js +0 -1
  247. package/dist/web/assets/ganttDiagram-EL5Y4UJY-BixeVtgw.js +0 -292
  248. package/dist/web/assets/index-XIDqokJX.js +0 -133
  249. package/dist/web/assets/index-hvCYuRJb.css +0 -1
  250. package/dist/web/assets/init-C-OQMol4.js +0 -1
  251. package/dist/web/assets/label-Bm_d0NKL.js +0 -1
  252. package/dist/web/assets/line-BmNPsHiE.js +0 -1
  253. package/dist/web/assets/linear-BF68Zt8D.js +0 -1
  254. package/dist/web/assets/mermaid-WFAXDIZX-Bzg8wVqT.js +0 -1
  255. package/dist/web/assets/path-fybaL0A-.js +0 -1
  256. package/dist/web/assets/percentages-BXMCSKIN-G1-czdqc.js +0 -1
  257. package/dist/web/assets/prod-BxHPuooG.js +0 -159
  258. package/dist/web/assets/select-cyLFVkkB.js +0 -1
  259. package/dist/web/assets/src-DpAUOMD9.js +0 -1
  260. package/dist/web/assets/stateDiagram-D77RDMKH-Cgi4pLWL.js +0 -1
  261. package/dist/web/assets/stateDiagram-v2-MP3YSRHH-D7-KCEKC.js +0 -1
  262. package/dist/web/assets/subset-shared.chunk-C-8kChur.js +0 -1
  263. package/dist/web/assets/swimlanesDiagram-VR7AAH4N-Dg5C5S8F.js +0 -8
  264. package/dist/web/assets/tabs-bEwJLtA0.js +0 -1
  265. package/dist/web/assets/textarea-CovStda2.js +0 -1
  266. package/dist/web/assets/useProjectScope-DtEj9j-P.js +0 -1
  267. package/dist/web/assets/x-tY-z3woy.js +0 -1
  268. package/dist/web/assets/xychartDiagram-S5SC5T6Z-DO_DSVE-.js +0 -7
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t}from"./src-B1erg8EN.js";import{j as n}from"./chunk-DU6HZSFF-DaBSmv4k.js";import{t as r}from"./dist-BwUkq7ma.js";var i=r(),a=e((e,t)=>{let n=e.append(`rect`);if(n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),t.name&&n.attr(`name`,t.name),t.rx&&n.attr(`rx`,t.rx),t.ry&&n.attr(`ry`,t.ry),t.attrs!==void 0)for(let e in t.attrs)n.attr(e,t.attrs[e]);return t.class&&n.attr(`class`,t.class),n},`drawRect`),o=e((e,t)=>{a(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:`rect`}).lower()},`drawBackgroundRect`),s=e((e,t)=>{let r=t.text.replace(n,` `),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.attr(`class`,`legend`),i.style(`text-anchor`,t.anchor),t.class&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.text(r),i},`drawText`),c=e((e,t,n,r)=>{let a=e.append(`image`);a.attr(`x`,t),a.attr(`y`,n);let o=(0,i.sanitizeUrl)(r);a.attr(`xlink:href`,o)},`drawImage`),l=e((e,t,n,r)=>{let a=e.append(`use`);a.attr(`x`,t),a.attr(`y`,n);let o=(0,i.sanitizeUrl)(r);a.attr(`xlink:href`,`#${o}`)},`drawEmbeddedImage`),u=e(()=>({x:0,y:0,width:100,height:100,fill:`#EDF2AE`,stroke:`#666`,anchor:`start`,rx:0,ry:0}),`getNoteRect`),d=e(()=>({x:0,y:0,width:100,height:100,"text-anchor":`start`,style:`#666`,textMargin:0,rx:0,ry:0,tspan:!0}),`getTextObj`),f=e(()=>{let e=t(`.mermaidTooltip`);return e.empty()&&(e=t(`body`).append(`div`).attr(`class`,`mermaidTooltip`).style(`opacity`,0).style(`position`,`absolute`).style(`text-align`,`center`).style(`max-width`,`200px`).style(`padding`,`2px`).style(`font-size`,`12px`).style(`background`,`#ffffde`).style(`border`,`1px solid #333`).style(`border-radius`,`2px`).style(`pointer-events`,`none`).style(`z-index`,`100`)),e},`createTooltip`);export{a,d as c,c as i,o as n,s as o,l as r,u as s,f as t};
@@ -1,4 +1,4 @@
1
- import{a as e,t}from"./rolldown-runtime-DSDNlrLa.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r,p as i}from"./src-DpAUOMD9.js";import{A as a,F as o,b as s,s as c,z as l}from"./chunk-DU6HZSFF-BaVVqpDB.js";import{a as u}from"./chunk-75Z2AOVW-DGmxZV98.js";import{n as d,t as f}from"./chunk-PWAF6VOD-CP1kSMru.js";var p=t(((e,t,n)=>{(function(e){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(e){return setTimeout(e,16)};function r(){var t=this;t.reads=[],t.writes=[],t.raf=n.bind(e)}r.prototype={constructor:r,runTasks:function(e){for(var t;t=e.shift();)t()},measure:function(e,t){var n=t?e.bind(t):e;return this.reads.push(n),i(this),n},mutate:function(e,t){var n=t?e.bind(t):e;return this.writes.push(n),i(this),n},clear:function(e){return o(this.reads,e)||o(this.writes,e)},extend:function(e){if(typeof e!=`object`)throw Error(`expected object`);var t=Object.create(this);return s(t,e),t.fastdom=this,t.initialize&&t.initialize(),t},catch:null};function i(e){e.scheduled||(e.scheduled=!0,e.raf(a.bind(null,e)))}function a(e){var t=e.writes,n=e.reads,r;try{n.length,e.runTasks(n),t.length,e.runTasks(t)}catch(e){r=e}if(e.scheduled=!1,(n.length||t.length)&&i(e),r){if(r.message,e.catch)e.catch(r);else throw r}}function o(e,t){var n=e.indexOf(t);return!!~n&&!!e.splice(n,1)}function s(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}var c=e.fastdom=e.fastdom||new r;typeof define==`function`?define(function(){return c}):typeof t==`object`&&(t.exports=c)})(typeof window<`u`?window:n===void 0?globalThis:n)})),m=t(((e,t)=>{(function(){var e={initialize:function(){this._tasks=new Map},mutate:function(e,t){return n(this,`mutate`,e,t)},measure:function(e,t){return n(this,`measure`,e,t)},clear:function(e){var t=this._tasks,n=t.get(e);this.fastdom.clear(n),t.delete(e)}};function n(e,t,n,r){var i=e._tasks,a=e.fastdom,o,s=new Promise(function(e,c){o=a[t](function(){i.delete(s);try{e(r?n.call(r):n())}catch(e){c(e)}},r)});return i.set(s,o),s}(typeof define)[0]==`f`?define(function(){return e}):(typeof t)[0]==`o`?t.exports=e:window.fastdomPromised=e})()})),h=e(p(),1),ee=e(m(),1);function g(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var _=g();function te(e){_=e}var v={exec:()=>null};function y(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(b.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var ne=(()=>{try{return!0}catch{return!1}})(),b={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},re=/^(?:[ \t]*(?:\n|$))+/,ie=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ae=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,x=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,oe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,S=/(?:[*+-]|\d{1,9}[.)])/,se=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ce=y(se).replace(/bull/g,S).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),le=y(se).replace(/bull/g,S).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),C=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ue=/^[^\n]+/,w=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,de=y(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,w).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fe=y(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,S).getRegex(),T=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,E=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,pe=y(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,E).replace(`tag`,T).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),me=y(C).replace(`hr`,x).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,T).getRegex(),D={blockquote:y(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,me).getRegex(),code:ie,def:de,fences:ae,heading:oe,hr:x,html:pe,lheading:ce,list:fe,newline:re,paragraph:me,table:v,text:ue},he=y(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,x).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,T).getRegex(),ge={...D,lheading:le,table:he,paragraph:y(C).replace(`hr`,x).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,he).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,T).getRegex()},_e={...D,html:y(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,E).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:v,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:y(C).replace(`hr`,x).replace(`heading`,` *#{1,6} *[^
1
+ import{a as e,t}from"./rolldown-runtime-DSDNlrLa.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n as r,t as i}from"./src-B1erg8EN.js";import{A as a,F as o,b as s,s as c,z as l}from"./chunk-DU6HZSFF-DaBSmv4k.js";import{a as u}from"./chunk-75Z2AOVW-sSmASBxo.js";import{n as d,t as f}from"./chunk-PWAF6VOD-BA8RFgOa.js";var p=t(((e,t,n)=>{(function(e){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(e){return setTimeout(e,16)};function r(){var t=this;t.reads=[],t.writes=[],t.raf=n.bind(e)}r.prototype={constructor:r,runTasks:function(e){for(var t;t=e.shift();)t()},measure:function(e,t){var n=t?e.bind(t):e;return this.reads.push(n),i(this),n},mutate:function(e,t){var n=t?e.bind(t):e;return this.writes.push(n),i(this),n},clear:function(e){return o(this.reads,e)||o(this.writes,e)},extend:function(e){if(typeof e!=`object`)throw Error(`expected object`);var t=Object.create(this);return s(t,e),t.fastdom=this,t.initialize&&t.initialize(),t},catch:null};function i(e){e.scheduled||(e.scheduled=!0,e.raf(a.bind(null,e)))}function a(e){var t=e.writes,n=e.reads,r;try{n.length,e.runTasks(n),t.length,e.runTasks(t)}catch(e){r=e}if(e.scheduled=!1,(n.length||t.length)&&i(e),r){if(r.message,e.catch)e.catch(r);else throw r}}function o(e,t){var n=e.indexOf(t);return!!~n&&!!e.splice(n,1)}function s(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}var c=e.fastdom=e.fastdom||new r;typeof define==`function`?define(function(){return c}):typeof t==`object`&&(t.exports=c)})(typeof window<`u`?window:n===void 0?globalThis:n)})),m=t(((e,t)=>{(function(){var e={initialize:function(){this._tasks=new Map},mutate:function(e,t){return n(this,`mutate`,e,t)},measure:function(e,t){return n(this,`measure`,e,t)},clear:function(e){var t=this._tasks,n=t.get(e);this.fastdom.clear(n),t.delete(e)}};function n(e,t,n,r){var i=e._tasks,a=e.fastdom,o,s=new Promise(function(e,c){o=a[t](function(){i.delete(s);try{e(r?n.call(r):n())}catch(e){c(e)}},r)});return i.set(s,o),s}(typeof define)[0]==`f`?define(function(){return e}):(typeof t)[0]==`o`?t.exports=e:window.fastdomPromised=e})()})),h=e(p(),1),ee=e(m(),1);function g(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var _=g();function te(e){_=e}var v={exec:()=>null};function y(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(b.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var ne=(()=>{try{return!0}catch{return!1}})(),b={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},re=/^(?:[ \t]*(?:\n|$))+/,ie=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ae=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,x=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,oe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,S=/(?:[*+-]|\d{1,9}[.)])/,se=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ce=y(se).replace(/bull/g,S).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),le=y(se).replace(/bull/g,S).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),C=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ue=/^[^\n]+/,w=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,de=y(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,w).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fe=y(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,S).getRegex(),T=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,E=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,pe=y(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,E).replace(`tag`,T).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),me=y(C).replace(`hr`,x).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,T).getRegex(),D={blockquote:y(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,me).getRegex(),code:ie,def:de,fences:ae,heading:oe,hr:x,html:pe,lheading:ce,list:fe,newline:re,paragraph:me,table:v,text:ue},he=y(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,x).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,T).getRegex(),ge={...D,lheading:le,table:he,paragraph:y(C).replace(`hr`,x).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,he).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,T).getRegex()},_e={...D,html:y(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,E).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:v,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:y(C).replace(`hr`,x).replace(`heading`,` *#{1,6} *[^
2
2
  ]`).replace(`lheading`,ce).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},ve=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ye=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,be=/^( {2,}|\\)\n(?!\s*$)/,xe=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,O=/[\p{P}\p{S}]/u,k=/[\s\p{P}\p{S}]/u,Se=/[^\s\p{P}\p{S}]/u,Ce=y(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,k).getRegex(),we=/(?!~)[\p{P}\p{S}]/u,Te=/(?!~)[\s\p{P}\p{S}]/u,Ee=/(?:[^\s\p{P}\p{S}]|~)/u,De=y(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,ne?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Oe=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ke=y(Oe,`u`).replace(/punct/g,O).getRegex(),Ae=y(Oe,`u`).replace(/punct/g,we).getRegex(),je=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Me=y(je,`gu`).replace(/notPunctSpace/g,Se).replace(/punctSpace/g,k).replace(/punct/g,O).getRegex(),Ne=y(je,`gu`).replace(/notPunctSpace/g,Ee).replace(/punctSpace/g,Te).replace(/punct/g,we).getRegex(),Pe=y(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Se).replace(/punctSpace/g,k).replace(/punct/g,O).getRegex(),Fe=y(/\\(punct)/,`gu`).replace(/punct/g,O).getRegex(),Ie=y(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Le=y(E).replace(`(?:-->|$)`,`-->`).getRegex(),Re=y(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,Le).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),A=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,ze=y(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,A).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Be=y(/^!?\[(label)\]\[(ref)\]/).replace(`label`,A).replace(`ref`,w).getRegex(),Ve=y(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,w).getRegex(),He=y(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Be).replace(`nolink`,Ve).getRegex(),Ue=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,j={_backpedal:v,anyPunctuation:Fe,autolink:Ie,blockSkip:De,br:be,code:ye,del:v,emStrongLDelim:ke,emStrongRDelimAst:Me,emStrongRDelimUnd:Pe,escape:ve,link:ze,nolink:Ve,punctuation:Ce,reflink:Be,reflinkSearch:He,tag:Re,text:xe,url:v},We={...j,link:y(/^!?\[(label)\]\((.*?)\)/).replace(`label`,A).getRegex(),reflink:y(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,A).getRegex()},M={...j,emStrongRDelimAst:Ne,emStrongLDelim:Ae,url:y(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,Ue).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:y(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,Ue).getRegex()},Ge={...M,br:y(be).replace(`{2,}`,`*`).getRegex(),text:y(M.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},N={normal:D,gfm:ge,pedantic:_e},P={normal:j,gfm:M,breaks:Ge,pedantic:We},Ke={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},qe=e=>Ke[e];function F(e,t){if(t){if(b.escapeTest.test(e))return e.replace(b.escapeReplace,qe)}else if(b.escapeTestNoEncode.test(e))return e.replace(b.escapeReplaceNoEncode,qe);return e}function Je(e){try{e=encodeURI(e).replace(b.percentDecode,`%`)}catch{return null}return e}function Ye(e,t){let n=e.replace(b.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(b.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(b.slashPipe,`|`);return n}function I(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function Xe(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Ze(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function Qe(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
3
3
  `).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
4
4
  `)}var L=class{options;rules;lexer;constructor(e){this.options=e||_}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:I(e,`
@@ -1 +1 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-DpAUOMD9.js";import{u as n}from"./chunk-75Z2AOVW-DGmxZV98.js";import{o as r}from"./chunk-4HAMMTFA-DY6eE90t.js";var i=e(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,n=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:t+n}},`getSubGraphTitleMargins`),a=new Map;async function o(e,t,i){let o,s;t.shape===`rect`&&(t.shape=t.rx&&t.ry?`roundedRect`:`squareRect`);let c=t.shape?r[t.shape]:void 0;if(!c)throw Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let n;i.config.securityLevel===`sandbox`?n=`_top`:t.linkTarget&&(n=t.linkTarget||`_blank`),o=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,n??null),s=await c(o,t,i)}else s=await c(e,t,i),o=s;return o.attr(`data-look`,n(t.look)),t.tooltip&&s.attr(`title`,t.tooltip),a.set(t.id,o),t.haveCallback&&o.attr(`class`,o.attr(`class`)+` clickable`),o}e(o,`insertNode`);var s=e((e,t)=>{a.set(t.id,e)},`setNodeElem`),c=e(()=>{a.clear()},`clear`),l=e(e=>{let n=a.get(e.id);t.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let r=e.diff||0;return e.clusterNode?n.attr(`transform`,`translate(`+(e.x+r-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):n.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),r},`positionNode`);export{s as a,l as i,i as n,o as r,c as t};
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n as t}from"./src-B1erg8EN.js";import{u as n}from"./chunk-75Z2AOVW-sSmASBxo.js";import{o as r}from"./chunk-4HAMMTFA-Cpqa-wt-.js";var i=e(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,n=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:t+n}},`getSubGraphTitleMargins`),a=new Map;async function o(e,t,i){let o,s;t.shape===`rect`&&(t.shape=t.rx&&t.ry?`roundedRect`:`squareRect`);let c=t.shape?r[t.shape]:void 0;if(!c)throw Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let n;i.config.securityLevel===`sandbox`?n=`_top`:t.linkTarget&&(n=t.linkTarget||`_blank`),o=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,n??null),s=await c(o,t,i)}else s=await c(e,t,i),o=s;return o.attr(`data-look`,n(t.look)),t.tooltip&&s.attr(`title`,t.tooltip),a.set(t.id,o),t.haveCallback&&o.attr(`class`,o.attr(`class`)+` clickable`),o}e(o,`insertNode`);var s=e((e,t)=>{a.set(t.id,e)},`setNodeElem`),c=e(()=>{a.clear()},`clear`),l=e(e=>{let n=a.get(e.id);t.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let r=e.diff||0;return e.clusterNode?n.attr(`transform`,`translate(`+(e.x+r-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):n.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),r},`positionNode`);export{s as a,l as i,i as n,o as r,c as t};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-DpAUOMD9.js";import{$ as r,H as i,K as a,U as o,a as s,s as c,v as l,w as u,x as d,y as f}from"./chunk-DU6HZSFF-BaVVqpDB.js";import{g as p,s as m}from"./chunk-75Z2AOVW-DGmxZV98.js";import{r as h}from"./mermaid.core-CE0shN4j.js";import{t as g}from"./chunk-F27PBJKO-CXQQU8th.js";import{t as _}from"./chunk-XXDRQBXY-uYQniKdI.js";import{t as v}from"./chunk-POPQ4Y6H-D3Y4enjb.js";var y=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,16],l=[1,17],u=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],h=[1,22],g=[1,23],_=[1,24],v=[1,26],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,32],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],j=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],M=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NL`,6:`SD`,14:`DESCR`,15:`-->`,16:`HIDE_EMPTY`,17:`scale`,18:`WIDTH`,19:`COMPOSIT_STATE`,20:`STRUCT_START`,21:`STRUCT_STOP`,22:`STATE_DESCR`,23:`AS`,24:`ID`,25:`FORK`,26:`JOIN`,27:`CHOICE`,28:`CONCURRENT`,29:`note`,31:`NOTE_TEXT`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,38:`CLICK`,39:`STRING`,40:`HREF`,41:`classDef`,42:`CLASSDEF_ID`,43:`CLASSDEF_STYLEOPTS`,44:`DEFAULT`,45:`style`,46:`STYLE_IDS`,47:`STYLEDEF_STYLEOPTS`,48:`class`,49:`CLASSENTITY_IDS`,50:`STYLECLASS`,51:`direction_tb`,52:`direction_bt`,53:`direction_rl`,54:`direction_lr`,56:`;`,57:`EDGE_STATE`,58:`STYLE_SEPARATOR`,59:`left_of`,60:`right_of`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:a[s]!=`nl`&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$=`nl`;break;case 12:this.$=a[s];break;case 13:let e=a[s-1];e.description=r.trimColon(a[s]),this.$=e;break;case 14:this.$={stmt:`relation`,state1:a[s-2],state2:a[s]};break;case 15:let t=r.trimColon(a[s]);this.$={stmt:`relation`,state1:a[s-3],state2:a[s-1],description:t};break;case 19:this.$={stmt:`state`,id:a[s-3],type:`default`,description:``,doc:a[s-1]};break;case 20:var c=a[s],l=a[s-2].trim();if(a[s].match(`:`)){var u=a[s].split(`:`);c=u[0],l=[l,u[1]]}this.$={stmt:`state`,id:c,type:`default`,description:l};break;case 21:this.$={stmt:`state`,id:a[s-3],type:`default`,description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:`state`,id:a[s],type:`fork`};break;case 23:this.$={stmt:`state`,id:a[s],type:`join`};break;case 24:this.$={stmt:`state`,id:a[s],type:`choice`};break;case 25:this.$={stmt:`state`,id:r.getDividerId(),type:`divider`};break;case 26:this.$={stmt:`state`,id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:this.$={stmt:`click`,id:a[s-3],url:a[s-2],tooltip:a[s-1]};break;case 33:this.$={stmt:`click`,id:a[s-3],url:a[s-1],tooltip:``};break;case 34:case 35:this.$={stmt:`classDef`,id:a[s-1].trim(),classes:a[s].trim()};break;case 36:this.$={stmt:`style`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 37:this.$={stmt:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:r.setDirection(`TB`),this.$={stmt:`dir`,value:`TB`};break;case 39:r.setDirection(`BT`),this.$={stmt:`dir`,value:`BT`};break;case 40:r.setDirection(`RL`),this.$={stmt:`dir`,value:`RL`};break;case 41:r.setDirection(`LR`),this.$={stmt:`dir`,value:`LR`};break;case 44:case 45:this.$={stmt:`state`,id:a[s].trim(),type:`default`,description:``};break;case 46:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break;case 47:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``}}},`anonymous`),table:[{3:1,4:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,7]),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(A,[2,11]),t(A,[2,12],{14:[1,40],15:[1,41]}),t(A,[2,16]),{18:[1,42]},t(A,[2,18],{20:[1,43]}),{23:[1,44]},t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(A,[2,28]),{34:[1,49]},{36:[1,50]},t(A,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(j,[2,44],{58:[1,56]}),t(j,[2,45],{58:[1,57]}),t(A,[2,38]),t(A,[2,39]),t(A,[2,40]),t(A,[2,41]),t(A,[2,6]),t(A,[2,13]),{13:58,24:f,57:k},t(A,[2,17]),t(M,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(A,[2,29]),t(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(A,[2,14],{14:[1,71]}),{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,72],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(A,[2,34]),t(A,[2,35]),t(A,[2,36]),t(A,[2,37]),t(j,[2,46]),t(j,[2,47]),t(A,[2,15]),t(A,[2,19]),t(M,a,{7:78}),t(A,[2,26]),t(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,81],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,32]),t(A,[2,33]),t(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n as t,t as n}from"./src-B1erg8EN.js";import{$ as r,H as i,K as a,U as o,a as s,s as c,v as l,w as u,x as d,y as f}from"./chunk-DU6HZSFF-DaBSmv4k.js";import{g as p,s as m}from"./chunk-75Z2AOVW-sSmASBxo.js";import{r as h}from"./mermaid.core-BD-HQdEx.js";import{t as g}from"./chunk-F27PBJKO-CcJz7Bwe.js";import{t as _}from"./chunk-XXDRQBXY-CiSqEX14.js";import{t as v}from"./chunk-POPQ4Y6H-pNL2Y3ZS.js";var y=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,16],l=[1,17],u=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],h=[1,22],g=[1,23],_=[1,24],v=[1,26],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,32],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],j=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],M=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NL`,6:`SD`,14:`DESCR`,15:`-->`,16:`HIDE_EMPTY`,17:`scale`,18:`WIDTH`,19:`COMPOSIT_STATE`,20:`STRUCT_START`,21:`STRUCT_STOP`,22:`STATE_DESCR`,23:`AS`,24:`ID`,25:`FORK`,26:`JOIN`,27:`CHOICE`,28:`CONCURRENT`,29:`note`,31:`NOTE_TEXT`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,38:`CLICK`,39:`STRING`,40:`HREF`,41:`classDef`,42:`CLASSDEF_ID`,43:`CLASSDEF_STYLEOPTS`,44:`DEFAULT`,45:`style`,46:`STYLE_IDS`,47:`STYLEDEF_STYLEOPTS`,48:`class`,49:`CLASSENTITY_IDS`,50:`STYLECLASS`,51:`direction_tb`,52:`direction_bt`,53:`direction_rl`,54:`direction_lr`,56:`;`,57:`EDGE_STATE`,58:`STYLE_SEPARATOR`,59:`left_of`,60:`right_of`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:a[s]!=`nl`&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$=`nl`;break;case 12:this.$=a[s];break;case 13:let e=a[s-1];e.description=r.trimColon(a[s]),this.$=e;break;case 14:this.$={stmt:`relation`,state1:a[s-2],state2:a[s]};break;case 15:let t=r.trimColon(a[s]);this.$={stmt:`relation`,state1:a[s-3],state2:a[s-1],description:t};break;case 19:this.$={stmt:`state`,id:a[s-3],type:`default`,description:``,doc:a[s-1]};break;case 20:var c=a[s],l=a[s-2].trim();if(a[s].match(`:`)){var u=a[s].split(`:`);c=u[0],l=[l,u[1]]}this.$={stmt:`state`,id:c,type:`default`,description:l};break;case 21:this.$={stmt:`state`,id:a[s-3],type:`default`,description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:`state`,id:a[s],type:`fork`};break;case 23:this.$={stmt:`state`,id:a[s],type:`join`};break;case 24:this.$={stmt:`state`,id:a[s],type:`choice`};break;case 25:this.$={stmt:`state`,id:r.getDividerId(),type:`divider`};break;case 26:this.$={stmt:`state`,id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:this.$={stmt:`click`,id:a[s-3],url:a[s-2],tooltip:a[s-1]};break;case 33:this.$={stmt:`click`,id:a[s-3],url:a[s-1],tooltip:``};break;case 34:case 35:this.$={stmt:`classDef`,id:a[s-1].trim(),classes:a[s].trim()};break;case 36:this.$={stmt:`style`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 37:this.$={stmt:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:r.setDirection(`TB`),this.$={stmt:`dir`,value:`TB`};break;case 39:r.setDirection(`BT`),this.$={stmt:`dir`,value:`BT`};break;case 40:r.setDirection(`RL`),this.$={stmt:`dir`,value:`RL`};break;case 41:r.setDirection(`LR`),this.$={stmt:`dir`,value:`LR`};break;case 44:case 45:this.$={stmt:`state`,id:a[s].trim(),type:`default`,description:``};break;case 46:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break;case 47:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``}}},`anonymous`),table:[{3:1,4:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,7]),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(A,[2,11]),t(A,[2,12],{14:[1,40],15:[1,41]}),t(A,[2,16]),{18:[1,42]},t(A,[2,18],{20:[1,43]}),{23:[1,44]},t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(A,[2,28]),{34:[1,49]},{36:[1,50]},t(A,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(j,[2,44],{58:[1,56]}),t(j,[2,45],{58:[1,57]}),t(A,[2,38]),t(A,[2,39]),t(A,[2,40]),t(A,[2,41]),t(A,[2,6]),t(A,[2,13]),{13:58,24:f,57:k},t(A,[2,17]),t(M,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(A,[2,29]),t(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(A,[2,14],{14:[1,71]}),{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,72],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(A,[2,34]),t(A,[2,35]),t(A,[2,36]),t(A,[2,37]),t(j,[2,46]),t(j,[2,47]),t(A,[2,15]),t(A,[2,19]),t(M,a,{7:78}),t(A,[2,26]),t(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,81],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,32]),t(A,[2,33]),t(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};N.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-DpAUOMD9.js";import{T as r,g as i,x as a}from"./chunk-DU6HZSFF-BaVVqpDB.js";import{a as o,i as s}from"./chunk-P2QGCYS3-DpMkYw3X.js";import{n as c}from"./chunk-GMAD6QVW-D7d5cxQ3.js";import{t as l}from"./rough.esm-Dy-Kn_BL.js";import{n as u,r as d,t as f}from"./chunk-4HAMMTFA-DY6eE90t.js";import{n as p}from"./chunk-GVQU2GXP-GfOuiNH1.js";var m=e(async(e,r)=>{let u=a(),{themeVariables:f,handDrawnSeed:p}=u,{clusterBkg:m,clusterBorder:h}=f,g=h,{labelStyles:_,nodeStyles:v,borderStyles:y,backgroundStyles:b}=s(r),x=e.insert(`g`).attr(`class`,`cluster swimlane `+(r.cssClasses||``)).attr(`id`,r.id).attr(`data-id`,r.id).attr(`data-et`,`cluster`).attr(`data-look`,r.look),S=i(u.flowchart.htmlLabels),C=r.direction===`LR`,w=x.insert(`g`).attr(`class`,`cluster-label swimlane-label`),T=await c(w,r.label,{style:r.labelStyle,useHtmlLabels:S,isNode:!0,width:r.width}),E=T.getBBox();if(S){let e=T.children[0],t=n(T);E=e.getBoundingClientRect(),t.attr(`width`,E.width),t.attr(`height`,E.height)}let D=r.padding??0,O=r.width<=E.width+D?E.width+D:r.width;r.diff=r.width<=E.width+D?(O-r.width)/2-D:-D;let k=r.height,A=r.y-k/2,j=r.y+k/2,M=r.x-O/2,N=r.swimlaneContentTop===void 0?A+k/3:r.swimlaneContentTop,P=C?4:0,F=E.height+2*P,I,L;if(C){let e=Math.max(F,E.height+2*P),t=M+e,n=Math.max(0,O-e);if(r.look===`handDrawn`){let i=l.svg(x),a=o(r,{roughness:.7,fill:m,stroke:g,fillWeight:3,seed:p}),s=o(r,{roughness:.7,fill:`none`,stroke:g,seed:p}),c=i.rectangle(M,A,e,k,a);I=x.insert(()=>c,`:first-child`);let u=i.rectangle(t,A,n,k,s);L=x.insert(()=>u,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,y.join(`;`)),I.select(`path`).attr(`style`,b.join(`;`).replace(`fill`,`stroke`))}else I=x.insert(`rect`,`:first-child`),L=x.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,v).attr(`x`,M).attr(`y`,A).attr(`width`,e).attr(`height`,k).attr(`fill`,m).attr(`stroke`,g),L.attr(`class`,`swimlane-body`).attr(`style`,v).attr(`x`,t).attr(`y`,A).attr(`width`,n).attr(`height`,k).attr(`fill`,`none`).attr(`stroke`,g);let i=M+e/2,a=r.y;w.attr(`transform`,`translate(${i}, ${a}) rotate(-90) translate(${-E.width/2}, ${-E.height/2})`)}else{let e=Math.max(0,N-A),t=Math.min(F,e),n=A+t,i=Math.max(0,j-n),a=r.x-O/2;if(r.look===`handDrawn`){let e=l.svg(x),s=o(r,{roughness:.7,fill:m,stroke:g,fillWeight:3,seed:p}),c=o(r,{roughness:.7,fill:`none`,stroke:g,seed:p}),u=e.rectangle(a,A,O,t,s);I=x.insert(()=>u,`:first-child`);let d=e.rectangle(a,n,O,i,c);L=x.insert(()=>d,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,y.join(`;`)),I.select(`path`).attr(`style`,b.join(`;`).replace(`fill`,`stroke`))}else I=x.insert(`rect`,`:first-child`),L=x.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,v).attr(`x`,a).attr(`y`,A).attr(`width`,O).attr(`height`,t).attr(`fill`,m).attr(`stroke`,g),L.attr(`class`,`swimlane-body`).attr(`style`,v).attr(`x`,a).attr(`y`,n).attr(`width`,O).attr(`height`,i).attr(`fill`,`none`).attr(`stroke`,g);let s=r.x-E.width/2,c=A+(t-E.height)/2;w.attr(`transform`,`translate(${s}, ${c})`)}if(t.trace(`Swimlane data `,r,JSON.stringify(r)),_){let e=w.select(`span`);e&&e.attr(`style`,_)}return r.offsetX=0,r.width=O,r.height=k,r.offsetY=E.height-D/2,r.intersect=function(e){return d(r,e)},{cluster:x,labelBBox:E}},`swimlane`),h=e(async(e,i)=>{t.info(`Creating subgraph rect for `,i.id,i);let m=a(),{themeVariables:h,handDrawnSeed:g}=m,{clusterBkg:_,clusterBorder:v}=h,{labelStyles:y,nodeStyles:b,borderStyles:x,backgroundStyles:S}=s(i),C=e.insert(`g`).attr(`class`,`cluster `+i.cssClasses).attr(`id`,i.domId).attr(`data-look`,i.look),w=r(m),T=C.insert(`g`).attr(`class`,`cluster-label `),E;E=i.labelType===`markdown`?await c(T,i.label,{style:i.labelStyle,useHtmlLabels:w,isNode:!0,width:i.width}):await f(T,i.label,i.labelStyle||``,!1,!0);let D=E.getBBox();if(r(m)){let e=E.children[0],t=n(E);D=e.getBoundingClientRect(),t.attr(`width`,D.width),t.attr(`height`,D.height)}let O=i.width<=D.width+i.padding?D.width+i.padding:i.width;i.diff=i.width<=D.width+i.padding?(O-i.width)/2-i.padding:-i.padding;let k=i.height,A=i.x-O/2,j=i.y-k/2;t.trace(`Data `,i,JSON.stringify(i));let M;if(i.look===`handDrawn`){let e=l.svg(C),n=o(i,{roughness:.7,fill:_,stroke:v,fillWeight:3,seed:g}),r=e.path(u(A,j,O,k,0),n);M=C.insert(()=>(t.debug(`Rough node insert CXC`,r),r),`:first-child`),M.select(`path:nth-child(2)`).attr(`style`,x.join(`;`)),M.select(`path`).attr(`style`,S.join(`;`).replace(`fill`,`stroke`))}else M=C.insert(`rect`,`:first-child`),M.attr(`style`,b).attr(`rx`,i.rx).attr(`ry`,i.ry).attr(`x`,A).attr(`y`,j).attr(`width`,O).attr(`height`,k);let{subGraphTitleTopMargin:N}=p(m);if(T.attr(`transform`,`translate(${i.x-D.width/2}, ${i.y-i.height/2+N})`),y){let e=T.select(`span`);e&&e.attr(`style`,y)}let P=M.node().getBBox();return i.offsetX=0,i.width=P.width,i.height=P.height,i.offsetY=D.height-i.padding/2,i.intersect=function(e){return d(i,e)},{cluster:C,labelBBox:D}},`rect`),g={rect:h,squareRect:h,roundedWithTitle:e(async(e,t)=>{let i=a(),{themeVariables:o,handDrawnSeed:s}=i,{altBackground:c,compositeBackground:p,compositeTitleBackground:m,nodeBorder:h}=o,g=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),_=g.insert(`g`,`:first-child`),v=g.insert(`g`).attr(`class`,`cluster-label`),y=g.append(`rect`),b=await f(v,t.label,t.labelStyle,void 0,!0),x=b.getBBox();if(r(i)){let e=b.children[0],t=n(b);x=e.getBoundingClientRect(),t.attr(`width`,x.width),t.attr(`height`,x.height)}let S=0*t.padding,C=S/2,w=(t.width<=x.width+t.padding?x.width+t.padding:t.width)+S;t.diff=t.width<=x.width+t.padding?(w-t.width)/2-t.padding:-t.padding;let T=t.height+S,E=t.height+S-x.height-6,D=t.x-w/2,O=t.y-T/2;t.width=w;let k=t.y-t.height/2-C+x.height+2,A;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=l.svg(g),r=t.rx||t.ry?n.path(u(D,O,w,T,10),{roughness:.7,fill:m,fillStyle:`solid`,stroke:h,seed:s}):n.rectangle(D,O,w,T,{seed:s});A=g.insert(()=>r,`:first-child`);let i=n.rectangle(D,k,w,E,{fill:e?c:p,fillStyle:e?`hachure`:`solid`,stroke:h,seed:s});A=g.insert(()=>r,`:first-child`),y=g.insert(()=>i)}else A=_.insert(`rect`,`:first-child`),A.attr(`class`,`outer`).attr(`x`,D).attr(`y`,O).attr(`width`,w).attr(`height`,T).attr(`data-look`,t.look),y.attr(`class`,`inner`).attr(`x`,D).attr(`y`,k).attr(`width`,w).attr(`height`,E);return v.attr(`transform`,`translate(${t.x-x.width/2}, ${O+1-(r(i)?0:3)})`),t.height=A.node().getBBox().height,t.offsetX=0,t.offsetY=x.height-t.padding/2,t.labelBBox=x,t.intersect=function(e){return d(t,e)},{cluster:g,labelBBox:x}},`roundedWithTitle`),noteGroup:e((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return d(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:e((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=a(),{nodeBorder:i}=n,o=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),s=o.insert(`g`,`:first-child`),c=0*t.padding,u=t.width+c;t.diff=-t.padding;let f=t.height+c,p=t.x-u/2,m=t.y-f/2;t.width=u;let h;if(t.look===`handDrawn`){let e=l.svg(o).rectangle(p,m,u,f,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});h=o.insert(()=>e,`:first-child`)}else{h=s.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),h.attr(`class`,e).attr(`x`,p).attr(`y`,m).attr(`width`,u).attr(`height`,f).attr(`data-look`,t.look)}return t.height=h.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return d(t,e)},{cluster:o,labelBBox:{}}},`divider`),kanbanSection:e(async(e,i)=>{t.info(`Creating subgraph rect for `,i.id,i);let f=a(),{themeVariables:m,handDrawnSeed:h}=f,{clusterBkg:g,clusterBorder:_}=m,{labelStyles:v,nodeStyles:y,borderStyles:b,backgroundStyles:x}=s(i),S=e.insert(`g`).attr(`class`,`cluster `+i.cssClasses).attr(`id`,i.domId).attr(`data-look`,i.look),C=r(f),w=S.insert(`g`).attr(`class`,`cluster-label `),T=await c(w,i.label,{style:i.labelStyle,useHtmlLabels:C,isNode:!0,width:i.width}),E=T.getBBox();if(r(f)){let e=T.children[0],t=n(T);E=e.getBoundingClientRect(),t.attr(`width`,E.width),t.attr(`height`,E.height)}let D=i.width<=E.width+i.padding?E.width+i.padding:i.width;i.diff=i.width<=E.width+i.padding?(D-i.width)/2-i.padding:-i.padding;let O=i.height,k=i.x-D/2,A=i.y-O/2;t.trace(`Data `,i,JSON.stringify(i));let j;if(i.look===`handDrawn`){let e=l.svg(S),n=o(i,{roughness:.7,fill:g,stroke:_,fillWeight:4,seed:h}),r=e.path(u(k,A,D,O,i.rx),n);j=S.insert(()=>(t.debug(`Rough node insert CXC`,r),r),`:first-child`),j.select(`path:nth-child(2)`).attr(`style`,b.join(`;`)),j.select(`path`).attr(`style`,x.join(`;`).replace(`fill`,`stroke`))}else j=S.insert(`rect`,`:first-child`),j.attr(`style`,y).attr(`rx`,i.rx).attr(`ry`,i.ry).attr(`x`,k).attr(`y`,A).attr(`width`,D).attr(`height`,O);let{subGraphTitleTopMargin:M}=p(f);if(w.attr(`transform`,`translate(${i.x-E.width/2}, ${i.y-i.height/2+M})`),v){let e=w.select(`span`);e&&e.attr(`style`,v)}let N=j.node().getBBox();return i.offsetX=0,i.width=N.width,i.height=N.height,i.offsetY=E.height-i.padding/2,i.intersect=function(e){return d(i,e)},{cluster:S,labelBBox:E}},`kanbanSection`),swimlane:m},_=new Map,v=e(async(e,t)=>{let n=await g[t.shape||`rect`](e,t);return _.set(t.id,n),n},`insertCluster`),y=e(()=>{_=new Map},`clear`);export{v as n,y as t};
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n as t,t as n}from"./src-B1erg8EN.js";import{T as r,g as i,x as a}from"./chunk-DU6HZSFF-DaBSmv4k.js";import{a as o,i as s}from"./chunk-P2QGCYS3-BUvkZ5te.js";import{n as c}from"./chunk-GMAD6QVW-DZDh-p1Z.js";import{t as l}from"./rough.esm-Dy-Kn_BL.js";import{n as u,r as d,t as f}from"./chunk-4HAMMTFA-Cpqa-wt-.js";import{n as p}from"./chunk-GVQU2GXP-BbzNYx58.js";var m=e(async(e,r)=>{let u=a(),{themeVariables:f,handDrawnSeed:p}=u,{clusterBkg:m,clusterBorder:h}=f,g=h,{labelStyles:_,nodeStyles:v,borderStyles:y,backgroundStyles:b}=s(r),x=e.insert(`g`).attr(`class`,`cluster swimlane `+(r.cssClasses||``)).attr(`id`,r.id).attr(`data-id`,r.id).attr(`data-et`,`cluster`).attr(`data-look`,r.look),S=i(u.flowchart.htmlLabels),C=r.direction===`LR`,w=x.insert(`g`).attr(`class`,`cluster-label swimlane-label`),T=await c(w,r.label,{style:r.labelStyle,useHtmlLabels:S,isNode:!0,width:r.width}),E=T.getBBox();if(S){let e=T.children[0],t=n(T);E=e.getBoundingClientRect(),t.attr(`width`,E.width),t.attr(`height`,E.height)}let D=r.padding??0,O=r.width<=E.width+D?E.width+D:r.width;r.diff=r.width<=E.width+D?(O-r.width)/2-D:-D;let k=r.height,A=r.y-k/2,j=r.y+k/2,M=r.x-O/2,N=r.swimlaneContentTop===void 0?A+k/3:r.swimlaneContentTop,P=C?4:0,F=E.height+2*P,I,L;if(C){let e=Math.max(F,E.height+2*P),t=M+e,n=Math.max(0,O-e);if(r.look===`handDrawn`){let i=l.svg(x),a=o(r,{roughness:.7,fill:m,stroke:g,fillWeight:3,seed:p}),s=o(r,{roughness:.7,fill:`none`,stroke:g,seed:p}),c=i.rectangle(M,A,e,k,a);I=x.insert(()=>c,`:first-child`);let u=i.rectangle(t,A,n,k,s);L=x.insert(()=>u,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,y.join(`;`)),I.select(`path`).attr(`style`,b.join(`;`).replace(`fill`,`stroke`))}else I=x.insert(`rect`,`:first-child`),L=x.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,v).attr(`x`,M).attr(`y`,A).attr(`width`,e).attr(`height`,k).attr(`fill`,m).attr(`stroke`,g),L.attr(`class`,`swimlane-body`).attr(`style`,v).attr(`x`,t).attr(`y`,A).attr(`width`,n).attr(`height`,k).attr(`fill`,`none`).attr(`stroke`,g);let i=M+e/2,a=r.y;w.attr(`transform`,`translate(${i}, ${a}) rotate(-90) translate(${-E.width/2}, ${-E.height/2})`)}else{let e=Math.max(0,N-A),t=Math.min(F,e),n=A+t,i=Math.max(0,j-n),a=r.x-O/2;if(r.look===`handDrawn`){let e=l.svg(x),s=o(r,{roughness:.7,fill:m,stroke:g,fillWeight:3,seed:p}),c=o(r,{roughness:.7,fill:`none`,stroke:g,seed:p}),u=e.rectangle(a,A,O,t,s);I=x.insert(()=>u,`:first-child`);let d=e.rectangle(a,n,O,i,c);L=x.insert(()=>d,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,y.join(`;`)),I.select(`path`).attr(`style`,b.join(`;`).replace(`fill`,`stroke`))}else I=x.insert(`rect`,`:first-child`),L=x.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,v).attr(`x`,a).attr(`y`,A).attr(`width`,O).attr(`height`,t).attr(`fill`,m).attr(`stroke`,g),L.attr(`class`,`swimlane-body`).attr(`style`,v).attr(`x`,a).attr(`y`,n).attr(`width`,O).attr(`height`,i).attr(`fill`,`none`).attr(`stroke`,g);let s=r.x-E.width/2,c=A+(t-E.height)/2;w.attr(`transform`,`translate(${s}, ${c})`)}if(t.trace(`Swimlane data `,r,JSON.stringify(r)),_){let e=w.select(`span`);e&&e.attr(`style`,_)}return r.offsetX=0,r.width=O,r.height=k,r.offsetY=E.height-D/2,r.intersect=function(e){return d(r,e)},{cluster:x,labelBBox:E}},`swimlane`),h=e(async(e,i)=>{t.info(`Creating subgraph rect for `,i.id,i);let m=a(),{themeVariables:h,handDrawnSeed:g}=m,{clusterBkg:_,clusterBorder:v}=h,{labelStyles:y,nodeStyles:b,borderStyles:x,backgroundStyles:S}=s(i),C=e.insert(`g`).attr(`class`,`cluster `+i.cssClasses).attr(`id`,i.domId).attr(`data-look`,i.look),w=r(m),T=C.insert(`g`).attr(`class`,`cluster-label `),E;E=i.labelType===`markdown`?await c(T,i.label,{style:i.labelStyle,useHtmlLabels:w,isNode:!0,width:i.width}):await f(T,i.label,i.labelStyle||``,!1,!0);let D=E.getBBox();if(r(m)){let e=E.children[0],t=n(E);D=e.getBoundingClientRect(),t.attr(`width`,D.width),t.attr(`height`,D.height)}let O=i.width<=D.width+i.padding?D.width+i.padding:i.width;i.diff=i.width<=D.width+i.padding?(O-i.width)/2-i.padding:-i.padding;let k=i.height,A=i.x-O/2,j=i.y-k/2;t.trace(`Data `,i,JSON.stringify(i));let M;if(i.look===`handDrawn`){let e=l.svg(C),n=o(i,{roughness:.7,fill:_,stroke:v,fillWeight:3,seed:g}),r=e.path(u(A,j,O,k,0),n);M=C.insert(()=>(t.debug(`Rough node insert CXC`,r),r),`:first-child`),M.select(`path:nth-child(2)`).attr(`style`,x.join(`;`)),M.select(`path`).attr(`style`,S.join(`;`).replace(`fill`,`stroke`))}else M=C.insert(`rect`,`:first-child`),M.attr(`style`,b).attr(`rx`,i.rx).attr(`ry`,i.ry).attr(`x`,A).attr(`y`,j).attr(`width`,O).attr(`height`,k);let{subGraphTitleTopMargin:N}=p(m);if(T.attr(`transform`,`translate(${i.x-D.width/2}, ${i.y-i.height/2+N})`),y){let e=T.select(`span`);e&&e.attr(`style`,y)}let P=M.node().getBBox();return i.offsetX=0,i.width=P.width,i.height=P.height,i.offsetY=D.height-i.padding/2,i.intersect=function(e){return d(i,e)},{cluster:C,labelBBox:D}},`rect`),g={rect:h,squareRect:h,roundedWithTitle:e(async(e,t)=>{let i=a(),{themeVariables:o,handDrawnSeed:s}=i,{altBackground:c,compositeBackground:p,compositeTitleBackground:m,nodeBorder:h}=o,g=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),_=g.insert(`g`,`:first-child`),v=g.insert(`g`).attr(`class`,`cluster-label`),y=g.append(`rect`),b=await f(v,t.label,t.labelStyle,void 0,!0),x=b.getBBox();if(r(i)){let e=b.children[0],t=n(b);x=e.getBoundingClientRect(),t.attr(`width`,x.width),t.attr(`height`,x.height)}let S=0*t.padding,C=S/2,w=(t.width<=x.width+t.padding?x.width+t.padding:t.width)+S;t.diff=t.width<=x.width+t.padding?(w-t.width)/2-t.padding:-t.padding;let T=t.height+S,E=t.height+S-x.height-6,D=t.x-w/2,O=t.y-T/2;t.width=w;let k=t.y-t.height/2-C+x.height+2,A;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=l.svg(g),r=t.rx||t.ry?n.path(u(D,O,w,T,10),{roughness:.7,fill:m,fillStyle:`solid`,stroke:h,seed:s}):n.rectangle(D,O,w,T,{seed:s});A=g.insert(()=>r,`:first-child`);let i=n.rectangle(D,k,w,E,{fill:e?c:p,fillStyle:e?`hachure`:`solid`,stroke:h,seed:s});A=g.insert(()=>r,`:first-child`),y=g.insert(()=>i)}else A=_.insert(`rect`,`:first-child`),A.attr(`class`,`outer`).attr(`x`,D).attr(`y`,O).attr(`width`,w).attr(`height`,T).attr(`data-look`,t.look),y.attr(`class`,`inner`).attr(`x`,D).attr(`y`,k).attr(`width`,w).attr(`height`,E);return v.attr(`transform`,`translate(${t.x-x.width/2}, ${O+1-(r(i)?0:3)})`),t.height=A.node().getBBox().height,t.offsetX=0,t.offsetY=x.height-t.padding/2,t.labelBBox=x,t.intersect=function(e){return d(t,e)},{cluster:g,labelBBox:x}},`roundedWithTitle`),noteGroup:e((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return d(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:e((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=a(),{nodeBorder:i}=n,o=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),s=o.insert(`g`,`:first-child`),c=0*t.padding,u=t.width+c;t.diff=-t.padding;let f=t.height+c,p=t.x-u/2,m=t.y-f/2;t.width=u;let h;if(t.look===`handDrawn`){let e=l.svg(o).rectangle(p,m,u,f,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});h=o.insert(()=>e,`:first-child`)}else{h=s.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),h.attr(`class`,e).attr(`x`,p).attr(`y`,m).attr(`width`,u).attr(`height`,f).attr(`data-look`,t.look)}return t.height=h.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return d(t,e)},{cluster:o,labelBBox:{}}},`divider`),kanbanSection:e(async(e,i)=>{t.info(`Creating subgraph rect for `,i.id,i);let f=a(),{themeVariables:m,handDrawnSeed:h}=f,{clusterBkg:g,clusterBorder:_}=m,{labelStyles:v,nodeStyles:y,borderStyles:b,backgroundStyles:x}=s(i),S=e.insert(`g`).attr(`class`,`cluster `+i.cssClasses).attr(`id`,i.domId).attr(`data-look`,i.look),C=r(f),w=S.insert(`g`).attr(`class`,`cluster-label `),T=await c(w,i.label,{style:i.labelStyle,useHtmlLabels:C,isNode:!0,width:i.width}),E=T.getBBox();if(r(f)){let e=T.children[0],t=n(T);E=e.getBoundingClientRect(),t.attr(`width`,E.width),t.attr(`height`,E.height)}let D=i.width<=E.width+i.padding?E.width+i.padding:i.width;i.diff=i.width<=E.width+i.padding?(D-i.width)/2-i.padding:-i.padding;let O=i.height,k=i.x-D/2,A=i.y-O/2;t.trace(`Data `,i,JSON.stringify(i));let j;if(i.look===`handDrawn`){let e=l.svg(S),n=o(i,{roughness:.7,fill:g,stroke:_,fillWeight:4,seed:h}),r=e.path(u(k,A,D,O,i.rx),n);j=S.insert(()=>(t.debug(`Rough node insert CXC`,r),r),`:first-child`),j.select(`path:nth-child(2)`).attr(`style`,b.join(`;`)),j.select(`path`).attr(`style`,x.join(`;`).replace(`fill`,`stroke`))}else j=S.insert(`rect`,`:first-child`),j.attr(`style`,y).attr(`rx`,i.rx).attr(`ry`,i.ry).attr(`x`,k).attr(`y`,A).attr(`width`,D).attr(`height`,O);let{subGraphTitleTopMargin:M}=p(f);if(w.attr(`transform`,`translate(${i.x-E.width/2}, ${i.y-i.height/2+M})`),v){let e=w.select(`span`);e&&e.attr(`style`,v)}let N=j.node().getBBox();return i.offsetX=0,i.width=N.width,i.height=N.height,i.offsetY=E.height-i.padding/2,i.intersect=function(e){return d(i,e)},{cluster:S,labelBBox:E}},`kanbanSection`),swimlane:m},_=new Map,v=e(async(e,t)=>{let n=await g[t.shape||`rect`](e,t);return _.set(t.id,n),n},`insertCluster`),y=e(()=>{_=new Map},`clear`);export{v as n,y as t};
@@ -1,4 +1,4 @@
1
1
  import{a as e}from"./rolldown-runtime-DSDNlrLa.js";import{n as t}from"./jsx-runtime-CVMpzJz9.js";var n=e(t(),1),r=e=>{throw TypeError(e)},i=(e,t,n)=>t.has(e)||r(`Cannot `+n),a=(e,t,n)=>(i(e,t,`read from private field`),n?n.call(e):t.get(e)),o=(e,t,n)=>t.has(e)?r(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),s=(e,t,n,r)=>(i(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),c=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,l=/^[\\/]{2}/;function u(e,t){return t+e.replace(/\\/g,`/`)}var d=`popstate`;function f(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function p(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return v(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:y(t)}return x(t,n,null,e)}function m(e,t){if(e===!1||e==null)throw Error(t)}function h(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function g(){return Math.random().toString(36).substring(2,10)}function _(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function v(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?b(t):t,state:n,key:t&&t.key||r||g(),mask:i}}function y({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function b(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function x(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function p(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:y.location,delta:t})}function m(e,t){s=`PUSH`;let r=f(e)?e:v(y.location,e,t);n&&n(r,e),l=u()+1;let d=_(r,l),p=y.createHref(r.mask||r);try{o.pushState(d,``,p)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(p)}a&&c&&c({action:s,location:y.location,delta:1})}function h(e,t){s=`REPLACE`;let r=f(e)?e:v(y.location,e,t);n&&n(r,e),l=u();let i=_(r,l),d=y.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:y.location,delta:0})}function g(e){return S(i,e)}let y={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(d,p),c=e,()=>{i.removeEventListener(d,p),c=null}},createHref(e){return t(i,e)},createURL:g,encodeLocation(e){let t=g(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:m,replace:h,go(e){return o.go(e)}};return y}function S(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),m(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:y(t);return i=i.replace(/ $/,`%20`),!n&&l.test(i)&&(i=r+i),new URL(i,r)}function C(e){return{defaultValue:e}}var w,T=class{constructor(e){if(o(this,w,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(a(this,w).has(e))return a(this,w).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){a(this,w).set(e,t)}};w=new WeakMap;var E=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function D(e){return E.has(e)}var ee=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function O(e){return ee.has(e)}function k(e){return e.index===!0}function A(e,t,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(m(e.index!==!0||!e.children,`Cannot specify children on an index route`),m(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),k(e)){let n={...e,id:s};return r[s]=j(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=j(n,t(n)),e.children&&(n.children=A(e.children,t,o,r,i)),n}})}function j(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function M(e,t,n=`/`){return N(e,t,n,!1)}function N(e,t,n,r,i){let a=V((typeof t==`string`?b(t):t).pathname||`/`,n);if(a==null)return null;let o=i??P(e),s=null,c=B(a);for(let e=0;s==null&&e<o.length;++e)s=ue(o[e],c,r);return s}function te(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function P(e){let t=F(e);return I(t),t}function F(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;m(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=U([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(m(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),F(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:ce(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=fe(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ne(e.path))a(e,t,!0,n)}),t}function ne(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ne(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function I(e){e.sort((e,t)=>e.score===t.score?le(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var re=/^:[\w-]+$/,ie=3,ae=2,L=1,oe=10,se=-2,R=e=>e===`*`;function ce(e,t){let n=e.split(`/`),r=n.length;return n.some(R)&&(r+=se),t&&(r+=ae),n.filter(e=>!R(e)).reduce((e,t)=>e+(re.test(t)?ie:t===``?L:oe),r)}function le(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function ue(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?de(u,l,s.matcher,s.compiledParams):z(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=z({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:U([a,d.pathname]),pathnameBase:Se(U([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=U([a,d.pathnameBase]))}return o}function z(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=fe(e.path,e.caseSensitive,e.end);return de(e,t,n,r)}function de(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=xe(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=xe(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function fe(e,t=!1,n=!0){h(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function B(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return h(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function V(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function pe({basename:e,pathname:t}){return t===`/`?e:U([e,t])}var me=e=>c.test(e);function he(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?b(e):e,a;return n?(n=be(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?ge(n.substring(1),`/`):ge(n,t)):a=t,{pathname:a,search:Ce(r),hash:we(i)}}function ge(e,t){let n=xe(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function _e(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ve(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function ye(e){let t=ve(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function H(e,t,n,r=!1){let i;typeof e==`string`?i=b(e):(i={...e},m(!i.pathname||!i.pathname.includes(`?`),_e(`?`,`pathname`,`search`,i)),m(!i.pathname||!i.pathname.includes(`#`),_e(`#`,`pathname`,`hash`,i)),m(!i.search||!i.search.includes(`#`),_e(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=he(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var be=e=>e.replace(/[\\/]{2,}/g,`/`),U=e=>be(e.join(`/`));function xe(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var Se=e=>xe(e).replace(/^\/*/,`/`),Ce=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,we=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Te=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],Ee=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function De(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Oe(e){return U(e.map(e=>e.route.path).filter(Boolean))||`/`}var ke=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ae(e,t){let n=e;if(typeof n!=`string`||!c.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(ke)try{let e=new URL(window.location.href),r=l.test(n)?new URL(u(n,e.protocol)):new URL(n),a=V(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{h(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var W=Symbol(`Uninstrumented`);function je(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=G(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=G(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[W]??i,a=G(n[e],t,(...e)=>Pe(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[W]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[W]??e,r=G(n.middleware,t,(...e)=>Pe(e[0]));return r?(r[W]=t,r):e})),r}function Me(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[W]??e.navigate,r=G(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?y(n):`.`,...K(e,r??{})}});r&&(r[W]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[W]??e.fetch,r=G(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...K(e,i??{})}});r&&(r[W]=t,e.fetch=r)}return e}function G(e,t,n){return e.length===0?null:async(...r)=>{let i=await Ne(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function Ne(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=Ne(e,t,n,r-1),a=await o,m(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function Pe(e){let{request:t,context:n,params:r,pattern:i}=e;return{request:Fe(t),params:{...r},pattern:i,context:Ie(n)}}function K(e,t){return{currentUrl:y(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function Fe(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Ie(e){if(Re(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var Le=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Re(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===Le}var ze=new URL(`http://localhost`);function q(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),ze)}catch{return ze}}function Be(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function Ve(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function He(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!Be(i,n),s=!Be(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!Ve(e,i)||!Be(i,a)))throw Error(`External navigation is not allowed`)}var Ue=[`POST`,`PUT`,`PATCH`,`DELETE`],We=new Set(Ue),Ge=[`GET`,...Ue],Ke=new Set(Ge),qe=new Set([301,302,303,307,308]),Je=new Set([307,308]),Ye={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Xe={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ze={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},Qe=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),$e=`remix-router-transitions`,et=Symbol(`ResetLoaderData`),tt,nt,rt,it,at=class{constructor(e){o(this,tt),o(this,nt),o(this,rt),o(this,it),s(this,tt,e),s(this,nt,P(e))}get stableRoutes(){return a(this,tt)}get activeRoutes(){return a(this,rt)??a(this,tt)}get branches(){return a(this,it)??a(this,nt)}get hasHMRRoutes(){return a(this,rt)!=null}setRoutes(e){s(this,tt,e),s(this,nt,P(e))}setHmrRoutes(e){s(this,rt,e),s(this,it,P(e))}commitHmrRoutes(){a(this,rt)&&(s(this,tt,a(this,rt)),s(this,nt,a(this,it)),s(this,rt,void 0),s(this,it,void 0))}};tt=new WeakMap,nt=new WeakMap,rt=new WeakMap,it=new WeakMap;function ot(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;m(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||Qe,a=i;if(e.instrumentations){let t=e.instrumentations;a=e=>({...i(e),...je(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new at(A(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let u=e.dataStrategy||Ct,d={...e.future},f=null,p=new Set,g=null,_=null,x=null,C=null,w=e.hydrationData!=null,E=N(s.activeRoutes,e.history.location,c,!1,s.branches),D=!1,ee=null,O,k;if(E==null&&!e.patchRoutesOnNavigation){let t=J(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=qt(s.activeRoutes);O=!0,k=!O,E=n,ee={[r.id]:t}}else if(E&&!e.hydrationData&&it(E,s.activeRoutes,e.history.location.pathname).active&&(E=null),!E){O=!1,k=!O,E=[];let t=it(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(D=!0,E=t.matches)}else if(E.some(e=>e.route.lazy))O=!1,k=!O;else if(!E.some(e=>dt(e.route)))O=!0,k=!O;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=E;if(n){let e=E.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}k=!1,O=!0,r.forEach(e=>{let r=ft(e.route,t,n);k||=r.renderFallback,O&&=!r.shouldLoad})}let j,M={historyAction:e.history.action,location:e.history.location,matches:E,initialized:O,renderFallback:k,navigation:Ye,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||ee,fetchers:new Map,blockers:new Map},P=`POP`,F=null,ne=!1,I,re=!1,ie=new Map,ae=null,L=!1,oe=!1,se=new Set,R=new Map,ce=0,le=-1,ue=new Map,z=new Set,de=new Map,fe=new Map,B=new Set,pe=new Map,he,ge=null;function _e(){if(f=e.history.listen(({action:t,location:n,delta:r})=>{if(he){he(),he=void 0;return}h(pe.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=qe({currentLocation:M.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{he=e});e.history.go(r*-1),Ke(i,{state:`blocked`,location:n,proceed(){Ke(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(M.blockers);e.set(i,Ze),H({blockers:e})}}),F?.resolve(),F=null}else return Se(t,n)}),n){gn(t,ie);let e=()=>_n(t,ie);t.addEventListener(`pagehide`,e),ae=()=>t.removeEventListener(`pagehide`,e)}return M.initialized||Se(`POP`,M.location,{initialHydration:!0}),j}function ve(){f&&f(),ae&&ae(),p.clear(),I&&I.abort(),M.fetchers.forEach((e,t)=>Re(M.fetchers,t)),M.blockers.forEach((e,t)=>Ge(t))}function ye(e){if(p.add(e),g){let{newErrors:t}=g;g=null,e(M,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>p.delete(e)}function H(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),M={...M,...e};let n=[],r=[];M.fetchers.forEach((e,t)=>{e.state===`idle`&&(B.has(t)?n.push(t):r.push(t))}),B.forEach(e=>{!M.fetchers.has(e)&&!R.has(e)&&n.push(e)}),p.size===0&&(g={newErrors:e.errors??null}),[...p].forEach(r=>r(M,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Re(M.fetchers,e)),r.forEach(e=>M.fetchers.delete(e))}function be(t,n,{flushSync:r}={}){let i=M.actionData!=null&&M.navigation.formMethod!=null&&X(M.navigation.formMethod)&&M.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?M.actionData:null;let o=n.loaderData?Wt(M.loaderData,n.loaderData,n.matches||[],n.errors):M.loaderData,c=M.blockers;c.size>0&&(c=new Map(c),c.forEach((e,t)=>c.set(t,Ze)));let l=!L&&rt(t,n.matches||M.matches),u=ne===!0||M.navigation.formMethod!=null&&X(M.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),L||P===`POP`||(P===`PUSH`?e.history.push(t,t.state):P===`REPLACE`&&e.history.replace(t,t.state));let d;if(P===`POP`&&!L&&t!==M.location){let e=ie.get(M.location.pathname);e&&e.has(t.pathname)?d={currentLocation:M.location,nextLocation:t}:ie.has(t.pathname)&&(d={currentLocation:t,nextLocation:M.location})}else if(re){let e=ie.get(M.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),ie.set(M.location.pathname,e)),d={currentLocation:M.location,nextLocation:t}}H({...n,actionData:a,loaderData:o,historyAction:P,location:t,initialized:!0,renderFallback:!1,navigation:Ye,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),P=`POP`,ne=!1,re=!1,L=!1,oe=!1,F?.resolve(),F=null,ge?.resolve(),ge=null}async function U(t,n){if(F?.resolve(),F=null,typeof t==`number`){F||=vn();let n=F.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=lt(!1,ct(M.location,M.matches,c,t,n?.fromRouteId,n?.relative),n),o;if(n?.mask){let t=typeof n.mask==`string`?b(n.mask):{...M.location.mask,...n.mask};if(o={pathname:t.pathname??``,search:t.search??``,hash:t.hash??``},l.test(o.pathname))throw Error(`External navigation is not allowed`);o.pathname.startsWith(`\\`)&&(o.pathname=o.pathname.replace(/^\\+/,`/`)),He(typeof n.mask==`string`?n.mask:y(n.mask),y(o),e.history.createURL(`/`),`reject`)}let s=M.location,u=v(s,r,n&&n.state,void 0,o);u={...u,...e.history.encodeLocation(u)},He(t==null?e.history.createHref(M.location):typeof t==`string`?t:y(t),e.history.createHref(u.mask||u),e.history.createURL(`/`),`reject`);let d=n&&n.replace!=null?n.replace:void 0,f=`PUSH`;d===!0?f=`REPLACE`:d===!1||i!=null&&X(i.formMethod)&&i.formAction===M.location.pathname+M.location.search&&(f=`REPLACE`);let p=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,m=(n&&n.flushSync)===!0,h=qe({currentLocation:s,nextLocation:u,historyAction:f});h?Ke(h,{state:`blocked`,location:u,proceed(){Ke(h,{state:`proceeding`,proceed:void 0,reset:void 0,location:u}),U(t,n)},reset(){let e=new Map(M.blockers);e.set(h,Ze),H({blockers:e})}}):await Se(f,u,{submission:i,pendingError:a,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:m,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate})}function xe(){ge||=vn(),Pe(),H({revalidation:`loading`});let e=ge.promise;return M.navigation.state===`submitting`?e:M.navigation.state===`idle`?(Se(M.historyAction,M.location,{startUninterruptedRevalidation:!0}),e):(Se(P||M.historyAction,M.navigation.location,{overrideNavigation:M.navigation,enableViewTransition:re===!0}),e)}async function Se(t,n,r){I&&I.abort(),I=null,P=t,L=(r&&r.startUninterruptedRevalidation)===!0,nt(M.location,M.matches),ne=(r&&r.preventScrollReset)===!0,re=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&M.matches&&M.matches.length>0&&!D?M.matches:N(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&M.initialized&&!oe&&Xt(M.location,n)&&!(r&&r.submission&&X(r.submission.formMethod))){be(n,{matches:a},{flushSync:o});return}let l=it(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),!a){let{error:e,notFoundMatches:t,route:r}=$e(n.pathname);be(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;I=new AbortController;let d=Rt(e.history,n,I.signal,r&&r.submission),f=e.getContext?await e.getContext():new T,p;if(r&&r.pendingError)p=[Kt(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&X(r.submission.formMethod)){let i=await Ce(d,n,r.submission,a,t,f,l.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:o});if(i.shortCircuited)return;if(i.pendingActionResult){let[e,t]=i.pendingActionResult;if(Y(t)&&De(t.error)&&t.error.status===404){I=null,be(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=dn(n,a,t,r.submission),o=!1,l.active=!1,d=Rt(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await we(d,n,a,t,f,l.active,u,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,p,r&&r.callSiteDefaultShouldRevalidate);m||(I=null,be(n,{matches:h||a,...Gt(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function Ce(t,n,i,l,u,d,f,p,m={}){if(Pe(),H({navigation:fn(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await ot(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=qt(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=Kt(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=$e(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=ln(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:J(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await G(t,n,kt(a,o,t,n,l,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of l)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(tn(h)){let n;return n=m&&m.replace!=null?m.replace:Lt(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===M.location.pathname+M.location.search,await W(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(Y(h)){let e=Kt(l,g.route.id);return(m&&m.replace)!==!0&&(P=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function we(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||dn(n,i,l,p),x=p||m||un(b),S=!L&&!g;if(d){if(S){let e=Te(v);H({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await ot(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=qt(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=Kt(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=$e(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:w,revalidatingFetchers:T}=ut(t,u,a,o,e.history,M,i,x,n,g?[]:r,g===!0,oe,se,B,de,z,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(le=++ce,!e.dataStrategy&&!w.some(e=>e.shouldLoad)&&!w.some(e=>e.route.middleware&&e.route.middleware.length>0)&&T.length===0){let e=new Map(M.fetchers),t=Ve(e);return be(n,{matches:i,loaderData:{},errors:v&&Y(v[1])?{[v[0]]:v[1].error}:null,...Gt(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=Te(v);t!==void 0&&(e.actionData=t)}T.length>0&&(e.fetchers=Ee(T)),H(e,{flushSync:_})}T.forEach(e=>{q(e.key),e.controller&&R.set(e.key,e.controller)});let E=()=>T.forEach(e=>q(e.key));I&&I.signal.addEventListener(`abort`,E);let{loaderResults:D,fetcherResults:ee}=await Ne(w,T,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};I&&I.signal.removeEventListener(`abort`,E),T.forEach(e=>R.delete(e.key));let O=Jt(D);if(O)return await W(t,O.result,!0,{replace:h}),{shortCircuited:!0};if(O=Jt(ee),O)return z.add(O.key),await W(t,O.result,!0,{replace:h}),{shortCircuited:!0};let k=new Map(M.fetchers),{loaderData:A,errors:j}=Ut(M,i,D,v,T,ee,k);g&&M.errors&&(j={...M.errors,...j});let N=Ve(k),te=Ue(le,k),P=N||te||T.length>0;return{matches:i,loaderData:A,errors:j,...P?{workingFetchers:k}:{}}}function Te(e){if(e&&!Y(e[1]))return{[e[0]]:e[1].data};if(M.actionData)return Object.keys(M.actionData).length===0?null:M.actionData}function Ee(e){let t=new Map(M.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=pn(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function Oe(t,n,r,i){q(t);let a=(i&&i.flushSync)===!0,o=s.activeRoutes,l=ct(M.location,M.matches,c,r,n,i?.relative),u=N(o,l,c,!1,s.branches),d=it(u,o,l);if(d.active&&d.matches&&(u=d.matches),!u){Fe(t,n,J(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=lt(!0,l,i);if(m){Fe(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new T,g=(i&&i.preventScrollReset)===!0;p&&X(p.formMethod)?await ke(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate):(de.set(t,{routeId:n,path:f}),await Ae(t,n,f,u,h,d.active,a,g,p))}async function ke(t,n,i,l,u,d,f,p,h,g){Pe(),de.delete(t),K(t,mn(h,M.fetchers.get(t)),{flushSync:f});let _=new AbortController,v=Rt(e.history,i,_.signal,h);if(d){let e=await ot(l,new URL(v.url).pathname,v.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Fe(t,n,e.error,{flushSync:f});return}if(e.matches)l=e.matches;else{Fe(t,n,J(404,{pathname:i}),{flushSync:f});return}}let y=ln(l,i);if(!y.route.action&&!y.route.lazy){Fe(t,n,J(405,{method:h.formMethod,pathname:i,routeId:n}),{flushSync:f});return}R.set(t,_);let b=ce,x=kt(a,o,v,i,l,y,r,u),S=await G(v,i,x,u,t),C=S[y.route.id];if(!C){for(let e of x)if(S[e.route.id]){C=S[e.route.id];break}}if(v.signal.aborted){R.get(t)===_&&R.delete(t);return}if(B.has(t)){if(tn(C)||Y(C)){K(t,hn(void 0));return}}else{if(tn(C)){if(R.delete(t),le>b){K(t,hn(void 0));return}return z.add(t),K(t,pn(h)),W(v,C,!1,{fetcherSubmission:h,preventScrollReset:p})}if(Y(C)){Fe(t,n,C.error);return}}let w=M.navigation.location||M.location,T=Rt(e.history,w,_.signal),E=s.activeRoutes,D=M.navigation.state===`idle`?M.matches:N(E,M.navigation.location,c,!1,s.branches);m(D,`Didn't find any matches after fetcher action`);let ee=++ce;ue.set(t,ee);let{dsMatches:O,revalidatingFetchers:k}=ut(T,u,a,o,e.history,M,D,h,w,r,!1,oe,se,B,de,z,E,c,e.patchRoutesOnNavigation!=null,s.branches,[y.route.id,C],g),A=pn(h,C.data),j=new Map(M.fetchers);j.set(t,A),k.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=j.get(t),r=pn(void 0,n?n.data:void 0);j.set(t,r),q(t),e.controller&&R.set(t,e.controller)}),H({fetchers:j});let te=()=>k.forEach(e=>q(e.key));_.signal.addEventListener(`abort`,te);let{loaderResults:F,fetcherResults:ne}=await Ne(O,k,T,w,u);if(_.signal.aborted)return;_.signal.removeEventListener(`abort`,te),ue.delete(t),R.delete(t),k.forEach(e=>R.delete(e.key));let re=M.fetchers.has(t),ie=e=>{if(!re)return e;let n=new Map(e.fetchers);return n.set(t,hn(C.data)),{...e,fetchers:n}},ae=Jt(F);if(ae)return M=ie(M),W(T,ae.result,!1,{preventScrollReset:p});if(ae=Jt(ne),ae)return z.add(ae.key),M=ie(M),W(T,ae.result,!1,{preventScrollReset:p});let L=new Map(M.fetchers);re&&L.set(t,hn(C.data));let{loaderData:fe,errors:V}=Ut(M,D,F,void 0,k,ne,L);Ue(ee,L),M.navigation.state===`loading`&&ee>le?(m(P,`Expected pending action`),I&&I.abort(),be(M.navigation.location,{matches:D,loaderData:fe,errors:V,fetchers:L})):(H({errors:V,loaderData:Wt(M.loaderData,fe,D,V),fetchers:L}),oe=!1)}async function Ae(t,n,i,s,c,l,u,d,f){let p=M.fetchers.get(t);K(t,pn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=Rt(e.history,i,m.signal);if(l){let e=await ot(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Fe(t,n,e.error,{flushSync:u});return}if(e.matches)s=e.matches;else{Fe(t,n,J(404,{pathname:i}),{flushSync:u});return}}let g=ln(s,i);R.set(t,m);let _=ce,v=await G(h,i,kt(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(R.get(t)===m&&R.delete(t),!h.signal.aborted){if(B.has(t))K(t,hn(void 0));else if(tn(y)){if(le>_){K(t,hn(void 0));return}z.add(t),await W(h,y,!1,{preventScrollReset:d})}else Y(y)?Fe(t,n,y.error):K(t,hn(y.data))}}async function W(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(F?.resolve(),F=null),i.response.headers.has(`X-Remix-Revalidate`)&&(oe=!0);let d=i.response.headers.get(`Location`);m(d,`Expected a Location header on the redirect Response`);let f=d,p=new URL(r.url);d=Lt(d,p,c,e.history),He(f,d,p,`allow-explicit`);let h=v(M.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(me(d)){let n=S(t,d,!0);e=n.origin!==t.location.origin||V(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}I=null;let g=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:_,formAction:y,formEncType:b}=M.navigation;!o&&!s&&_&&y&&b&&(o=un(M.navigation));let x=o||s;Je.has(i.response.status)&&x&&X(x.formMethod)?await Se(g,h,{submission:{...x,formAction:d},preventScrollReset:l||ne,enableViewTransition:a?re:void 0}):await Se(g,h,{overrideNavigation:dn(h,[],g,o),fetcherSubmission:s,preventScrollReset:l||ne,enableViewTransition:a?re:void 0})}async function G(e,t,n,r,i){let a,o={};try{a=await At(u,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!X(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;a.hasOwnProperty(e.route.id)||M.loaderData.hasOwnProperty(e.route.id)||M.errors&&M.errors.hasOwnProperty(e.route.id)||!e.shouldCallHandler()||(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(en(r)){let i=r.result;o[t]={type:`redirect`,response:Pt(i,e,t,n,c)}}else o[t]=await Nt(r);return o}async function Ne(e,t,n,r,i){let a=G(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await G(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:`error`,error:J(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Pe(){oe=!0,de.forEach((e,t)=>{R.has(t)&&se.add(t),q(t)})}function K(e,t,n={}){let r=new Map(M.fetchers);r.set(e,t),H({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function Fe(e,t,n,r={}){let i=Kt(M.matches,t),a=new Map(M.fetchers);Re(a,e),H({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Ie(e){return fe.set(e,(fe.get(e)||0)+1),B.has(e)&&B.delete(e),M.fetchers.get(e)||Xe}function Le(e,t){q(e,t?.reason),K(e,hn(null))}function Re(e,t){let n=M.fetchers.get(t);R.has(t)&&!(n&&n.state===`loading`&&ue.has(t))&&q(t),de.delete(t),ue.delete(t),z.delete(t),B.delete(t),se.delete(t),e.delete(t)}function ze(e){let t=(fe.get(e)||0)-1;t<=0?(fe.delete(e),B.add(e)):fe.set(e,t),H({fetchers:new Map(M.fetchers)})}function q(e,t){let n=R.get(e);n&&(n.abort(t),R.delete(e))}function Be(e,t){for(let n of e){let e=t.get(n);m(e,`Expected fetcher: ${n}`);let r=hn(e.data);t.set(n,r)}}function Ve(e){let t=[],n=!1;for(let r of z){let i=e.get(r);m(i,`Expected fetcher: ${r}`),i.state===`loading`&&(z.delete(r),t.push(r),n=!0)}return Be(t,e),n}function Ue(e,t){let n=[];for(let[r,i]of ue)if(i<e){let e=t.get(r);m(e,`Expected fetcher: ${r}`),e.state===`loading`&&(q(r),ue.delete(r),n.push(r))}return Be(n,t),n.length>0}function We(e,t){let n=M.blockers.get(e)||Ze;return pe.get(e)!==t&&pe.set(e,t),n}function Ge(e){M.blockers.delete(e),pe.delete(e)}function Ke(e,t){let n=M.blockers.get(e)||Ze;m(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(M.blockers);r.set(e,t),H({blockers:r})}function qe({currentLocation:e,nextLocation:t,historyAction:n}){if(pe.size===0)return;pe.size>1&&h(!1,`A router only supports one blocker at a time`);let r=Array.from(pe.entries()),[i,a]=r[r.length-1],o=M.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function $e(e){let t=J(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=qt(n);return{notFoundMatches:r,route:i,error:t}}function et(e,t,n){if(_=e,C=t,x=n||null,!w&&M.navigation===Ye){w=!0;let e=rt(M.location,M.matches);e!=null&&H({restoreScrollPosition:e})}return()=>{_=null,C=null,x=null}}function tt(e,t){return x&&x(e,t.map(e=>te(e,M.loaderData)))||e.key}function nt(e,t){if(_&&C){let n=tt(e,t);_[n]=C()}}function rt(e,t){if(_){let n=tt(e,t),r=_[n];if(typeof r==`number`)return r}return null}function it(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:N(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:N(n,r,c,!0,e)}}return{active:!1,matches:null}}async function ot(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||gt(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=N(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=N(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&st(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=N(s.activeRoutes,n,c,!0,u),!f||st(l,f))return{type:`success`,matches:null};l=f}}function st(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function pt(e){o={},s.setHmrRoutes(A(e,a,void 0,o))}function mt(e,t,n=!1){gt(e,t,s,o,a,n),s.hasHMRRoutes||H({})}return j={get basename(){return c},get future(){return d},get state(){return M},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:_e,subscribe:ye,enableScrollRestoration:et,navigate:U,fetch:Oe,revalidate:xe,createHref:t=>e.history.createHref(t),createURL:t=>e.history.createURL(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ie,resetFetcher:Le,deleteFetcher:ze,dispose:ve,getBlocker:We,deleteBlocker:Ge,patchRoutes:mt,_internalFetchControllers:R,_internalSetRoutes:pt,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){H(e)}},e.instrumentations&&(j=Me(j,e.instrumentations.map(e=>e.router).filter(Boolean))),j}function st(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function ct(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=H(r||`.`,ye(o),V(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=cn(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=pe({basename:n,pathname:c.pathname})),y(c)}function lt(e,t,n){if(!n||!st(n))return{path:t};if(n.formMethod&&!sn(n.formMethod))return{path:t,error:J(405,{method:n.formMethod})};let r=()=>({path:t,error:J(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=Yt(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!X(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}
2
2
  `,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if(n.formEncType===`application/json`){if(!X(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}m(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=Bt(n.formData),s=n.formData;else if(n.body instanceof FormData)o=Bt(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=Vt(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=Vt(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(X(c.formMethod))return{path:t,submission:c};let l=b(t);return e&&l.search&&cn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:y(l),submission:c}}function ut(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?Y(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&Y(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let E=b?b[1].statusCode:void 0,D=E&&E>=400,ee={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},O=Oe(o),k=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!dt(s))f=!1;else if(u){let{shouldLoad:e}=ft(s,a.loaderData,a.errors);f=e}else pt(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return Ot(n,r,e,c,O,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:D?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?mt(a.matches[o],i)&&(p=!0):p=!0;let m={...ee,defaultShouldRevalidate:p},h=ht(i,m);return Ot(n,r,e,c,O,i,l,t,h,m,x)}),A=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,b=N(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;A.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=ln(b,e.path),C=new AbortController,w=Rt(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=kt(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=kt(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!D&&d;let a={...ee,defaultShouldRevalidate:i};ht(S,a)&&(T=kt(n,r,w,e.path,b,S,l,t,a))}T&&A.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:k,revalidatingFetchers:A}}function dt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function ft(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!dt(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function pt(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function mt(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function ht(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function gt(e,t,n,r,i,a){let o;if(e){let t=r[e];m(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>_t(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=A(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=A([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function _t(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index!==t.index||e.path!==t.path||e.caseSensitive!==t.caseSensitive?!1:(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>_t(e,t)))??!1}var vt=new WeakMap,yt=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(m(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=vt.get(i);o||(o={},vt.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=D(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)h(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)h(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},bt=new WeakMap;function xt(e,t,n,r,i){let a=n[e.id];if(m(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=bt.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{m(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=O(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?h(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?h(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return bt.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=yt({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function St(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function Ct(e){return e.matches.some(e=>e.route.middleware)?wt(e,()=>St(e)):St(e)}function wt(e,t){return Tt(e,t,e=>{if(on(e))throw e;return e},Qt,n);function n(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:`error`,result:t}}));{let{matches:r}=e,i=Kt(r,r[Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0))].route.id).route.id;return Promise.resolve({[i]:{type:`error`,result:t}})}}}async function Tt(e,t,n,r,i){let{matches:a,...o}=e;return await Et(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function Et(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await Et(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function Dt(e,t,n,r,i){let a=yt({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=xt(r.route,X(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Ot(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=Dt(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?ht(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?ht(a,{...l,defaultShouldRevalidate:e}):ht(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!X(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(X(n.method)||!p)?jt({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function kt(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?Ot(e,t,n,r,Oe(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Dt(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function At(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:zt(t,n),pattern:Oe(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return wt(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function jt({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=X(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:zt(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a){if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw J(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}}else if(t)c=await f(t);else{let t=new URL(e.url);throw J(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function Mt(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Nt(e){let{result:t,type:n}=e;if(rn(t)){let e;try{e=await Mt(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new Ee(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?nn(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:Zt(t),statusCode:De(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:De(t)?t.status:void 0}:nn(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function Pt(e,t,n,r,i){let a=e.headers.get(`Location`);if(m(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!me(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=ct(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Ft=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function It(e){try{return Ft.includes(new URL(e).protocol)}catch{return!1}}function Lt(e,t,n,r){if(me(e)){let r=e,i=l.test(r)?new URL(u(r,t.protocol)):new URL(r);if(It(i.toString()))throw Error(`Invalid redirect location`);let a=V(i.pathname,n)!=null;if(i.origin===t.origin&&a)return be(i.pathname)+i.search+i.hash}try{if(It(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function Rt(e,t,n,r){let i=e.createURL(Yt(t)).toString(),a={signal:n};if(r&&X(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):a.body=t===`text/plain`?r.text:t===`application/x-www-form-urlencoded`&&r.formData?Bt(r.formData):r.formData}return new Request(i,a)}function zt(e,t){let n=new URL(e.url),r=typeof t==`string`?b(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);n.search=e.size?`?${e.toString()}`:``}else n.search=``;return n.hash=r.hash||``,n}function Bt(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function Vt(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Ht(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&Y(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(m(!tn(f),`Cannot handle redirect results in processLoaderData`),Y(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=Kt(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=et),c||(c=!0,s=De(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function Ut(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=Ht(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(m(s,`Did not find corresponding fetcher result`),Y(s)){let t=Kt(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(tn(s))m(!1,`Unhandled fetcher revalidation redirect`);else{let e=hn(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function Wt(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==et).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function Gt(e){return e?Y(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Kt(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function qt(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function J(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new Ee(e||500,o,Error(s),!0)}function Jt(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(tn(r))return{key:n,result:r}}}function Yt(e){return y({...typeof e==`string`?b(e):e,hash:``})}function Xt(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function Zt(e){return new Ee(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function Qt(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&$t(t))}function $t(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function en(e){return rn(e.result)&&qe.has(e.result.status)}function Y(e){return e.type===`error`}function tn(e){return(e&&e.type)===`redirect`}function nn(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function rn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function an(e){return qe.has(e)}function on(e){return rn(e)&&an(e.status)&&e.headers.has(`Location`)}function sn(e){return Ke.has(e.toUpperCase())}function X(e){return We.has(e.toUpperCase())}function cn(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function ln(e,t){let n=typeof t==`string`?b(t).search:t.search;if(e[e.length-1].route.index&&cn(n||``))return e[e.length-1];let r=ve(e);return r[r.length-1]}function un(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(t&&n&&r){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function dn(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function fn(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function pn(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function mn(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function hn(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function gn(e,t){try{let n=e.sessionStorage.getItem($e);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function _n(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem($e,JSON.stringify(n))}catch(e){h(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function vn(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var yn=n.createContext(null);yn.displayName=`DataRouter`;var bn=n.createContext(null);bn.displayName=`DataRouterState`;var xn=n.createContext(!1);function Sn(){return n.useContext(xn)}var Cn=n.createContext({isTransitioning:!1});Cn.displayName=`ViewTransition`;var wn=n.createContext(new Map);wn.displayName=`Fetchers`;var Tn=n.createContext(null);Tn.displayName=`Await`;var Z=n.createContext(null);Z.displayName=`Navigation`;var En=n.createContext(null);En.displayName=`Location`;var Q=n.createContext({outlet:null,matches:[],isDataRoute:!1});Q.displayName=`Route`;var Dn=n.createContext(null);Dn.displayName=`RouteError`;var On=`REACT_ROUTER_ERROR`,kn=`REDIRECT`,An=`ROUTE_ERROR_RESPONSE`;function jn(e){if(e.startsWith(`${On}:${kn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Mn(e){if(e.startsWith(`${On}:${An}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Ee(t.status,t.statusText,t.data)}catch{}}function Nn(e,{relative:t}={}){m(Pn(),`useHref() may be used only in the context of a <Router> component.`);let{basename:r,navigator:i}=n.useContext(Z),{hash:a,pathname:o,search:s}=Vn(e,{relative:t}),c=o;return r!==`/`&&(c=o===`/`?r:U([r,o])),i.createHref({pathname:c,search:s,hash:a})}function Pn(){return n.useContext(En)!=null}function $(){return m(Pn(),`useLocation() may be used only in the context of a <Router> component.`),n.useContext(En).location}function Fn(e){m(Pn(),`useMatch() may be used only in the context of a <Router> component.`);let{pathname:t}=$();return n.useMemo(()=>z(e,B(t)),[t,e])}var In=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Ln(e){n.useContext(Z).static||n.useLayoutEffect(e)}function Rn(){let{isDataRoute:e}=n.useContext(Q);return e?or():zn()}function zn(){m(Pn(),`useNavigate() may be used only in the context of a <Router> component.`);let e=n.useContext(yn),{basename:t,navigator:r}=n.useContext(Z),{matches:i}=n.useContext(Q),{pathname:a}=$(),o=JSON.stringify(ye(i)),s=n.useRef(!1);return Ln(()=>{s.current=!0}),n.useCallback((n,i={})=>{if(h(s.current,In),!s.current)return;if(typeof n==`number`){r.go(n);return}let c=H(n,JSON.parse(o),a,i.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:U([t,c.pathname])),He(typeof n==`string`?n:y(n),r.createHref(c),q(r),`reject`),(i.replace?r.replace:r.push)(c,i.state,i)},[t,r,o,a,e])}n.createContext(null);function Bn(){let{matches:e}=n.useContext(Q);return e[e.length-1]?.params??{}}function Vn(e,{relative:t}={}){let{matches:r}=n.useContext(Q),{pathname:i}=$(),a=JSON.stringify(ye(r));return n.useMemo(()=>H(e,JSON.parse(a),i,t===`path`),[e,a,i,t])}function Hn(e,t){return Un(e,t)}function Un(e,t,r){m(Pn(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:i}=n.useContext(Z),{matches:a}=n.useContext(Q),o=a[a.length-1],s=o?o.params:{},c=o?o.pathname:`/`,l=o?o.pathnameBase:`/`,u=o&&o.route;{let e=u&&u.path||``;cr(c,!u||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
3
3
 
4
- Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let d=$(),f;if(t){let e=typeof t==`string`?b(t):t;m(l===`/`||e.pathname?.startsWith(l),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=d;let p=f.pathname||`/`,g=p;if(l!==`/`){let e=l.replace(/^\//,``).split(`/`);g=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let _=r&&r.state.matches.length?r.state.matches.map(e=>Object.assign(e,{route:r.manifest[e.route.id]||e.route})):M(e,{pathname:g});h(u||_!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),h(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=Xn(_&&_.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:U([l,i.encodeLocation?i.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?l:U([l,i.encodeLocation?i.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),a,r);return t&&v?n.createElement(En.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},v):v}function Wn(){let e=rr(),t=De(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i=`rgba(200,200,200, 0.5)`,a={padding:`0.5rem`,backgroundColor:i},o={padding:`2px 4px`,backgroundColor:i},s=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),s=n.createElement(n.Fragment,null,n.createElement(`p`,null,`💿 Hey developer 👋`),n.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,n.createElement(`code`,{style:o},`ErrorBoundary`),` or`,` `,n.createElement(`code`,{style:o},`errorElement`),` prop on your route.`)),n.createElement(n.Fragment,null,n.createElement(`h2`,null,`Unexpected Application Error!`),n.createElement(`h3`,{style:{fontStyle:`italic`}},t),r?n.createElement(`pre`,{style:a},r):null,s)}var Gn=n.createElement(Wn,null),Kn=class extends n.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Mn(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:n.createElement(Q.Provider,{value:this.props.routeContext},n.createElement(Dn.Provider,{value:e,children:this.props.component}));return this.context?n.createElement(Jn,{error:e},t):t}};Kn.contextType=xn;var qn=new WeakMap;function Jn({children:e,error:t}){let{basename:r,navigator:i}=n.useContext(Z);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=jn(t.digest);if(e){let a=qn.get(t);if(a)throw a;let o=Ae(e.location,r),s=o.absoluteURL||o.to;if(He(e.location,s,q(i),`allow-explicit`),It(s))throw Error(`Invalid redirect location`);if(ke&&!qn.get(t)){if(o.isExternal||e.reloadDocument)window.location.href=s;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:e.replace}));throw qn.set(t,n),n}}return n.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${s}`})}}return e}function Yn({routeContext:e,match:t,children:r}){let i=n.useContext(yn);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),n.createElement(Q.Provider,{value:e},r)}function Xn(e,t=[],r){let i=r?.state;if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(t.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let a=e,o=i?.errors;if(o!=null){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);m(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(`,`)}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,c=-1;if(r&&i){s=i.renderFallback;for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:n}=i,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!n||n[t.route.id]===void 0);if(t.route.lazy||o){r.isStatic&&(s=!0),a=c>=0?a.slice(0,c+1):[a[0]];break}}}}let l=r?.onError,u=i&&l?(e,t)=>{l(e,{location:i.location,params:i.matches?.[0]?.params??{},pattern:Oe(i.matches),errorInfo:t})}:void 0;return a.reduceRight((e,r,l)=>{let d,f=!1,p=null,m=null;i&&(d=o&&r.route.id?o[r.route.id]:void 0,p=r.route.errorElement||Gn,s&&(c<0&&l===0?(cr(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):c===l&&(f=!0,m=r.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,l+1)),g=()=>{let t;return t=d?p:f?m:r.route.Component?n.createElement(r.route.Component,null):r.route.element?r.route.element:e,n.createElement(Yn,{match:r,routeContext:{outlet:e,matches:h,isDataRoute:i!=null},children:t})};return i&&(r.route.ErrorBoundary||r.route.errorElement||l===0)?n.createElement(Kn,{location:i.location,revalidation:i.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function Zn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Qn(e){let t=n.useContext(yn);return m(t,Zn(e)),t}function $n(e){let t=n.useContext(bn);return m(t,Zn(e)),t}function er(e){let t=n.useContext(Q);return m(t,Zn(e)),t}function tr(e){let t=er(e),n=t.matches[t.matches.length-1];return m(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function nr(){return tr(`useRouteId`)}function rr(){let e=n.useContext(Dn),t=$n(`useRouteError`),r=tr(`useRouteError`);return e===void 0?t.errors?.[r]:e}var ir=0;function ar(e){let{router:t,basename:r}=Qn(`useBlocker`),i=$n(`useBlocker`),[a,o]=n.useState(``),s=n.useCallback(t=>{if(typeof e!=`function`)return!!e;if(r===`/`)return e(t);let{currentLocation:n,nextLocation:i,historyAction:a}=t;return e({currentLocation:{...n,pathname:V(n.pathname,r)||n.pathname},nextLocation:{...i,pathname:V(i.pathname,r)||i.pathname},historyAction:a})},[r,e]);return n.useEffect(()=>{let e=String(++ir);return o(e),()=>t.deleteBlocker(e)},[t]),n.useEffect(()=>{a!==``&&t.getBlocker(a,s)},[t,a,s]),a&&i.blockers.has(a)?i.blockers.get(a):Ze}function or(){let{router:e}=Qn(`useNavigate`),t=tr(`useNavigate`),r=n.useRef(!1);return Ln(()=>{r.current=!0}),n.useCallback(async(n,i={})=>{h(r.current,In),r.current&&(typeof n==`number`?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...i}))},[e,t])}var sr={};function cr(e,t,n){!t&&!sr[e]&&(sr[e]=!0,h(!1,n))}var lr={};function ur(e,t){!e&&!lr[t]&&(lr[t]=!0,console.warn(t))}var dr=n.useOptimistic,fr=()=>void 0;function pr(e){return dr?dr(e):[e,fr]}function mr(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&h(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:n.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&h(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:n.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&h(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:n.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var hr=[`HydrateFallback`,`hydrateFallbackElement`],gr=class{constructor(){this.status=`pending`,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function _r({router:e,flushSync:t,onError:r,useTransitions:i}){i=Sn()||i;let[a,o]=n.useState(e.state),[s,c]=pr(a),[l,u]=n.useState(),[d,f]=n.useState({isTransitioning:!1}),[p,m]=n.useState(),[h,g]=n.useState(),[_,v]=n.useState(),y=n.useRef(new Map),b=n.useCallback((a,{deletedFetchers:s,newErrors:l,flushSync:d,viewTransitionOpts:_})=>{l&&r&&Object.values(l).forEach(e=>r(e,{location:a.location,params:a.matches[0]?.params??{},pattern:Oe(a.matches)})),a.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),s.forEach(e=>y.current.delete(e)),ur(d===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let b=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(ur(_==null||b,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!_||!b)t&&d?t(()=>o(a)):i===!1?o(a):n.startTransition(()=>{i===!0&&c(e=>vr(e,a)),o(a)});else if(t&&d){t(()=>{h&&(p?.resolve(),h.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>o(a))});n.finished.finally(()=>{t(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})})}),t(()=>g(n))}else h?(p?.resolve(),h.skipTransition(),v({state:a,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(u(a),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[e.window,t,h,p,i,c,r]);n.useLayoutEffect(()=>e.subscribe(b),[e,b]),n.useEffect(()=>{d.isTransitioning&&!d.flushSync&&m(new gr)},[d]),n.useEffect(()=>{if(p&&l&&e.window){let t=l,r=p.promise,a=e.window.document.startViewTransition(async()=>{i===!1?o(t):n.startTransition(()=>{i===!0&&c(e=>vr(e,t)),o(t)}),await r});a.finished.finally(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})}),g(a)}},[l,p,e.window,i,c]),n.useEffect(()=>{p&&l&&s.location.key===l.location.key&&p.resolve()},[p,h,s.location,l]),n.useEffect(()=>{!d.isTransitioning&&_&&(u(_.state),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),v(void 0))},[d.isTransitioning,_]);let x=n.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),S=e.basename||`/`,C=n.useMemo(()=>({router:e,navigator:x,static:!1,basename:S,onError:r}),[e,x,S,r]);return n.createElement(n.Fragment,null,n.createElement(yn.Provider,{value:C},n.createElement(bn.Provider,{value:s},n.createElement(wn.Provider,{value:y.current},n.createElement(Cn.Provider,{value:d},n.createElement(Cr,{basename:S,location:s.location,navigationType:s.historyAction,navigator:x,useTransitions:i},n.createElement(yr,{routes:e.routes,manifest:e.manifest,future:e.future,state:s,isStatic:!1,onError:r})))))),null)}function vr(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var yr=n.memo(br);function br({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Un(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function xr({to:e,replace:t,state:r,relative:i}){m(Pn(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:a,navigator:o}=n.useContext(Z);h(!a,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:s}=n.useContext(Q),{pathname:c}=$(),l=Rn(),u=H(e,ye(s),c,i===`path`);He(typeof e==`string`?e:y(e),o.createHref(u),q(o),`reject`);let d=JSON.stringify(u);return n.useEffect(()=>{l(JSON.parse(d),{replace:t,state:r,relative:i})},[l,d,i,t,r]),null}function Sr(e){m(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Cr({basename:e=`/`,children:t=null,location:r,navigationType:i=`POP`,navigator:a,static:o=!1,useTransitions:s}){m(!Pn(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let c=e.replace(/^\/*/,`/`),l=n.useMemo(()=>({basename:c,navigator:a,static:o,useTransitions:s,future:{}}),[c,a,o,s]);typeof r==`string`&&(r=b(r));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:g=`default`,mask:_}=r,v=n.useMemo(()=>{let e=V(u,c);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:g,mask:_},navigationType:i}},[c,u,d,f,p,g,i,_]);return h(v!=null,`<Router basename="${c}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:n.createElement(Z.Provider,{value:l},n.createElement(En.Provider,{children:t,value:v}))}function wr({children:e,location:t}){return Hn(Tr(e),t)}n.Component;function Tr(e,t=[]){let r=[];return n.Children.forEach(e,(e,i)=>{if(!n.isValidElement(e))return;let a=[...t,i];if(e.type===n.Fragment){r.push.apply(r,Tr(e.props.children,a));return}m(e.type===Sr,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),m(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let o={id:e.props.id||a.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=Tr(e.props.children,a)),r.push(o)}),r}var Er=`get`,Dr=`application/x-www-form-urlencoded`;function Or(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function kr(e){return Or(e)&&e.tagName.toLowerCase()===`button`}function Ar(e){return Or(e)&&e.tagName.toLowerCase()===`form`}function jr(e){return Or(e)&&e.tagName.toLowerCase()===`input`}function Mr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Nr(e,t){return e.button===0&&(!t||t===`_self`)&&!Mr(e)}function Pr(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Fr(e,t){let n=Pr(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Ir=null;function Lr(){if(Ir===null)try{new FormData(document.createElement(`form`),0),Ir=!1}catch{Ir=!0}return Ir}var Rr=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function zr(e){return e!=null&&!Rr.has(e)?(h(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Dr}"`),null):e}function Br(e,t){let n,r,i,a,o;if(Ar(e)){let o=e.getAttribute(`action`);r=o?V(o,t):null,n=e.getAttribute(`method`)||Er,i=zr(e.getAttribute(`enctype`))||Dr,a=new FormData(e)}else if(kr(e)||jr(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?V(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Er,i=zr(e.getAttribute(`formenctype`))||zr(o.getAttribute(`enctype`))||Dr,a=new FormData(o,e),!Lr()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Or(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Er,r=null,i=Dr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Vr(e,t){if(e===!1||e==null)throw Error(t)}function Hr(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&V(i.pathname,t)===`/`?`${xe(t)}/_root.${r}`:`${xe(i.pathname)}.${r}`,i}async function Ur(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Wr(e){return e!=null&&typeof e.page==`string`}function Gr(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Kr(e,t,n){return Zr((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Ur(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Gr).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function qr(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Jr(e,t,{includeHydrateFallback:n}={}){return Yr(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Yr(e){return[...new Set(e)]}function Xr(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Zr(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Wr(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Xr(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Qr(){let e=n.useContext(yn);return Vr(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function $r(){let e=n.useContext(bn);return Vr(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var ei=n.createContext(void 0);ei.displayName=`FrameworkContext`;function ti(){let e=n.useContext(ei);return Vr(e,`You must render this element inside a <HydratedRouter> element`),e}function ni(e,t){let r=n.useContext(ei),[i,a]=n.useState(!1),[o,s]=n.useState(!1),{onFocus:c,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=n.useRef(null);n.useEffect(()=>{if(e===`render`&&s(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),n.useEffect(()=>{if(i){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[i]);let m=()=>{a(!0)},h=()=>{a(!1),s(!1)};return r?e===`intent`?[o,p,{onFocus:ri(c,m),onBlur:ri(l,h),onMouseEnter:ri(u,m),onMouseLeave:ri(d,h),onTouchStart:ri(f,m)}]:[o,p,{}]:[!1,p,{}]}function ri(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ii({page:e,...t}){let r=Sn(),{nonce:i}=ti(),{router:a}=Qr(),o=n.useMemo(()=>M(a.routes,e,a.basename),[a.routes,e,a.basename]);return o?(t.nonce==null&&i&&(t={...t,nonce:i}),r?n.createElement(oi,{page:e,matches:o,...t}):n.createElement(si,{page:e,matches:o,...t})):null}function ai(e){let{manifest:t,routeModules:r}=ti(),[i,a]=n.useState([]);return n.useEffect(()=>{let n=!1;return Kr(e,t,r).then(e=>{n||a(e)}),()=>{n=!0}},[e,t,r]),i}function oi({page:e,matches:t,...r}){let i=$(),{future:a}=ti(),{basename:o}=Qr(),s=n.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let n=Hr(e,o,a.v8_trailingSlashAwareDataRequests,`rsc`),r=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?r=!0:s.push(e.route.id);return r&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[o,a.v8_trailingSlashAwareDataRequests,e,i,t]);return n.createElement(n.Fragment,null,s.map(e=>n.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...r})))}function si({page:e,matches:t,...r}){let i=$(),{future:a,manifest:o,routeModules:s}=ti(),{basename:c}=Qr(),{loaderData:l,matches:u}=$r(),d=n.useMemo(()=>qr(e,t,u,o,i,`data`),[e,t,u,o,i]),f=n.useMemo(()=>qr(e,t,u,o,i,`assets`),[e,t,u,o,i]),p=n.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let n=new Set,r=!1;if(t.forEach(e=>{let t=o.routes[e.route.id];t&&t.hasLoader&&(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?r=!0:n.add(e.route.id))}),n.size===0)return[];let u=Hr(e,c,a.v8_trailingSlashAwareDataRequests,`data`);return r&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[c,a.v8_trailingSlashAwareDataRequests,l,i,o,d,t,e,s]),m=n.useMemo(()=>Jr(f,o),[f,o]),h=ai(f);return n.createElement(n.Fragment,null,p.map(e=>n.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...r})),m.map(e=>n.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...r})),h.map(({key:e,link:t})=>n.createElement(`link`,{key:e,nonce:r.nonce,...t,crossOrigin:t.crossOrigin??r.crossOrigin})))}function ci(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}n.Component;var li=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{li&&(window.__reactRouterVersion=`7.18.4`)}catch{}function ui(e,t){return ot({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:p({window:t?.window}),hydrationData:t?.hydrationData||di(),routes:e,mapRouteProperties:mr,hydrationRouteProperties:hr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function di(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:fi(e.errors)}),e}function fi(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new Ee(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&Te.includes(r.__subType)){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}var pi=n.forwardRef(function({onClick:e,discover:t=`render`,prefetch:r=`none`,relative:i,reloadDocument:a,replace:o,mask:s,state:l,target:u,to:d,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m,...h},g){let{basename:_,navigator:v,useTransitions:y}=n.useContext(Z),b=typeof d==`string`&&c.test(d),x=Ae(d,_);d=x.to;let S=Nn(d,{relative:i}),C=$(),w=null;if(s){let e=H(s,[],C.mask?C.mask.pathname:`/`,!0);_!==`/`&&(e.pathname=e.pathname===`/`?_:U([_,e.pathname])),w=v.createHref(e)}let[T,E,D]=ni(r,h),ee=vi(d,{replace:o,mask:s,state:l,target:u,preventScrollReset:f,relative:i,viewTransition:p,defaultShouldRevalidate:m,useTransitions:y});function O(t){e&&e(t),t.defaultPrevented||ee(t)}let k=!(x.isExternal||a),A=n.createElement(`a`,{...h,...D,href:(k?w:void 0)||x.absoluteURL||S,onClick:k?O:e,ref:ci(g,E),target:u,"data-discover":!b&&t===`render`?`true`:void 0});return T&&!b?n.createElement(n.Fragment,null,A,n.createElement(ii,{page:S})):A});pi.displayName=`Link`;var mi=n.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:r=``,end:i=!1,style:a,to:o,viewTransition:s,children:c,...l},u){let d=Vn(o,{relative:l.relative}),f=$(),p=n.useContext(bn),{navigator:m,basename:h}=n.useContext(Z),g=p!=null&&wi(d)&&s===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=V(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!i&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!i&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof r==`function`?r(C):[r,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof a==`function`?a(C):a;return n.createElement(pi,{...l,"aria-current":w,className:T,ref:u,style:E,to:o,viewTransition:s},typeof c==`function`?c(C):c)});mi.displayName=`NavLink`;var hi=n.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:r,reloadDocument:i,replace:a,state:o,method:s=Er,action:l,onSubmit:u,relative:d,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m,...h},g)=>{let{useTransitions:_}=n.useContext(Z),v=Si(),y=Ci(l,{relative:d}),b=s.toLowerCase()===`get`?`get`:`post`,x=typeof l==`string`&&c.test(l);return n.createElement(`form`,{ref:g,method:b,action:y,onSubmit:i?u:e=>{if(u&&u(e),e.defaultPrevented)return;e.preventDefault();let i=e.nativeEvent.submitter,c=i?.getAttribute(`formmethod`)||s,l=()=>v(i||e.currentTarget,{fetcherKey:t,method:c,navigate:r,replace:a,state:o,relative:d,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m});_&&r!==!1?n.startTransition(()=>l()):l()},...h,"data-discover":!x&&e===`render`?`true`:void 0})});hi.displayName=`Form`;function gi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _i(e){let t=n.useContext(yn);return m(t,gi(e)),t}function vi(e,{target:t,replace:r,mask:i,state:a,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l,useTransitions:u}={}){let d=Rn(),f=$(),p=Vn(e,{relative:s});return n.useCallback(m=>{if(Nr(m,t)){m.preventDefault();let t=r===void 0?y(f)===y(p):r,h=()=>d(e,{replace:t,mask:i,state:a,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l});u?n.startTransition(()=>h()):h()}},[f,d,p,r,i,a,t,e,o,s,c,l,u])}function yi(e){h(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=n.useRef(Pr(e)),r=n.useRef(!1),i=$(),a=n.useMemo(()=>Fr(i.search,r.current?null:t.current),[i.search]),o=Rn();return[a,n.useCallback((e,t)=>{let n=Pr(typeof e==`function`?e(new URLSearchParams(a)):e);r.current=!0,o(`?`+n,t)},[o,a])]}var bi=0,xi=()=>`__${String(++bi)}__`;function Si(){let{router:e}=_i(`useSubmit`),{basename:t}=n.useContext(Z),r=nr(),i=e.fetch,a=e.navigate;return n.useCallback(async(e,n={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Br(e,t);if(n.navigate===!1){let e=n.fetcherKey||xi();await i(e,r,n.action||o,{defaultShouldRevalidate:n.defaultShouldRevalidate,preventScrollReset:n.preventScrollReset,formData:l,body:u,formMethod:n.method||s,formEncType:n.encType||c,flushSync:n.flushSync})}else await a(n.action||o,{defaultShouldRevalidate:n.defaultShouldRevalidate,preventScrollReset:n.preventScrollReset,formData:l,body:u,formMethod:n.method||s,formEncType:n.encType||c,replace:n.replace,state:n.state,fromRouteId:r,flushSync:n.flushSync,viewTransition:n.viewTransition})},[i,a,t,r])}function Ci(e,{relative:t}={}){let{basename:r}=n.useContext(Z),i=n.useContext(Q);m(i,`useFormAction must be used inside a RouteContext`);let[a]=i.matches.slice(-1),o={...Vn(e||`.`,{relative:t})},s=$();if(e==null){o.search=s.search;let e=new URLSearchParams(o.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();o.search=n?`?${n}`:``}}return(!e||e===`.`)&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,`?index&`):`?index`),r!==`/`&&(o.pathname=o.pathname===`/`?r:U([r,o.pathname])),y(o)}function wi(e,{relative:t}={}){let r=n.useContext(Cn);m(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=_i(`useViewTransitionState`),a=Vn(e,{relative:t});if(!r.isTransitioning)return!1;let o=V(r.currentLocation.pathname,i)||r.currentLocation.pathname,s=V(r.nextLocation.pathname,i)||r.nextLocation.pathname;return z(a.pathname,s)!=null||z(a.pathname,o)!=null}export{_r as a,C as c,Fn as d,Rn as f,Sr as i,ar as l,yi as m,mi as n,wr as o,Bn as p,xr as r,ui as s,pi as t,$ as u};
4
+ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let d=$(),f;if(t){let e=typeof t==`string`?b(t):t;m(l===`/`||e.pathname?.startsWith(l),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=d;let p=f.pathname||`/`,g=p;if(l!==`/`){let e=l.replace(/^\//,``).split(`/`);g=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let _=r&&r.state.matches.length?r.state.matches.map(e=>Object.assign(e,{route:r.manifest[e.route.id]||e.route})):M(e,{pathname:g});h(u||_!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),h(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=Xn(_&&_.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:U([l,i.encodeLocation?i.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?l:U([l,i.encodeLocation?i.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),a,r);return t&&v?n.createElement(En.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},v):v}function Wn(){let e=rr(),t=De(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i=`rgba(200,200,200, 0.5)`,a={padding:`0.5rem`,backgroundColor:i},o={padding:`2px 4px`,backgroundColor:i},s=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),s=n.createElement(n.Fragment,null,n.createElement(`p`,null,`💿 Hey developer 👋`),n.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,n.createElement(`code`,{style:o},`ErrorBoundary`),` or`,` `,n.createElement(`code`,{style:o},`errorElement`),` prop on your route.`)),n.createElement(n.Fragment,null,n.createElement(`h2`,null,`Unexpected Application Error!`),n.createElement(`h3`,{style:{fontStyle:`italic`}},t),r?n.createElement(`pre`,{style:a},r):null,s)}var Gn=n.createElement(Wn,null),Kn=class extends n.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Mn(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:n.createElement(Q.Provider,{value:this.props.routeContext},n.createElement(Dn.Provider,{value:e,children:this.props.component}));return this.context?n.createElement(Jn,{error:e},t):t}};Kn.contextType=xn;var qn=new WeakMap;function Jn({children:e,error:t}){let{basename:r,navigator:i}=n.useContext(Z);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=jn(t.digest);if(e){let a=qn.get(t);if(a)throw a;let o=Ae(e.location,r),s=o.absoluteURL||o.to;if(He(e.location,s,q(i),`allow-explicit`),It(s))throw Error(`Invalid redirect location`);if(ke&&!qn.get(t)){if(o.isExternal||e.reloadDocument)window.location.href=s;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:e.replace}));throw qn.set(t,n),n}}return n.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${s}`})}}return e}function Yn({routeContext:e,match:t,children:r}){let i=n.useContext(yn);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),n.createElement(Q.Provider,{value:e},r)}function Xn(e,t=[],r){let i=r?.state;if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(t.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let a=e,o=i?.errors;if(o!=null){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);m(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(`,`)}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,c=-1;if(r&&i){s=i.renderFallback;for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:n}=i,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!n||n[t.route.id]===void 0);if(t.route.lazy||o){r.isStatic&&(s=!0),a=c>=0?a.slice(0,c+1):[a[0]];break}}}}let l=r?.onError,u=i&&l?(e,t)=>{l(e,{location:i.location,params:i.matches?.[0]?.params??{},pattern:Oe(i.matches),errorInfo:t})}:void 0;return a.reduceRight((e,r,l)=>{let d,f=!1,p=null,m=null;i&&(d=o&&r.route.id?o[r.route.id]:void 0,p=r.route.errorElement||Gn,s&&(c<0&&l===0?(cr(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):c===l&&(f=!0,m=r.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,l+1)),g=()=>{let t;return t=d?p:f?m:r.route.Component?n.createElement(r.route.Component,null):r.route.element?r.route.element:e,n.createElement(Yn,{match:r,routeContext:{outlet:e,matches:h,isDataRoute:i!=null},children:t})};return i&&(r.route.ErrorBoundary||r.route.errorElement||l===0)?n.createElement(Kn,{location:i.location,revalidation:i.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function Zn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Qn(e){let t=n.useContext(yn);return m(t,Zn(e)),t}function $n(e){let t=n.useContext(bn);return m(t,Zn(e)),t}function er(e){let t=n.useContext(Q);return m(t,Zn(e)),t}function tr(e){let t=er(e),n=t.matches[t.matches.length-1];return m(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function nr(){return tr(`useRouteId`)}function rr(){let e=n.useContext(Dn),t=$n(`useRouteError`),r=tr(`useRouteError`);return e===void 0?t.errors?.[r]:e}var ir=0;function ar(e){let{router:t,basename:r}=Qn(`useBlocker`),i=$n(`useBlocker`),[a,o]=n.useState(``),s=n.useCallback(t=>{if(typeof e!=`function`)return!!e;if(r===`/`)return e(t);let{currentLocation:n,nextLocation:i,historyAction:a}=t;return e({currentLocation:{...n,pathname:V(n.pathname,r)||n.pathname},nextLocation:{...i,pathname:V(i.pathname,r)||i.pathname},historyAction:a})},[r,e]);return n.useEffect(()=>{let e=String(++ir);return o(e),()=>t.deleteBlocker(e)},[t]),n.useEffect(()=>{a!==``&&t.getBlocker(a,s)},[t,a,s]),a&&i.blockers.has(a)?i.blockers.get(a):Ze}function or(){let{router:e}=Qn(`useNavigate`),t=tr(`useNavigate`),r=n.useRef(!1);return Ln(()=>{r.current=!0}),n.useCallback(async(n,i={})=>{h(r.current,In),r.current&&(typeof n==`number`?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...i}))},[e,t])}var sr={};function cr(e,t,n){!t&&!sr[e]&&(sr[e]=!0,h(!1,n))}var lr={};function ur(e,t){!e&&!lr[t]&&(lr[t]=!0,console.warn(t))}var dr=n.useOptimistic,fr=()=>void 0;function pr(e){return dr?dr(e):[e,fr]}function mr(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&h(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:n.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&h(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:n.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&h(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:n.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var hr=[`HydrateFallback`,`hydrateFallbackElement`],gr=class{constructor(){this.status=`pending`,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function _r({router:e,flushSync:t,onError:r,useTransitions:i}){i=Sn()||i;let[a,o]=n.useState(e.state),[s,c]=pr(a),[l,u]=n.useState(),[d,f]=n.useState({isTransitioning:!1}),[p,m]=n.useState(),[h,g]=n.useState(),[_,v]=n.useState(),y=n.useRef(new Map),b=n.useCallback((a,{deletedFetchers:s,newErrors:l,flushSync:d,viewTransitionOpts:_})=>{l&&r&&Object.values(l).forEach(e=>r(e,{location:a.location,params:a.matches[0]?.params??{},pattern:Oe(a.matches)})),a.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),s.forEach(e=>y.current.delete(e)),ur(d===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let b=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(ur(_==null||b,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!_||!b)t&&d?t(()=>o(a)):i===!1?o(a):n.startTransition(()=>{i===!0&&c(e=>vr(e,a)),o(a)});else if(t&&d){t(()=>{h&&(p?.resolve(),h.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>o(a))});n.finished.finally(()=>{t(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})})}),t(()=>g(n))}else h?(p?.resolve(),h.skipTransition(),v({state:a,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(u(a),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[e.window,t,h,p,i,c,r]);n.useLayoutEffect(()=>e.subscribe(b),[e,b]),n.useEffect(()=>{d.isTransitioning&&!d.flushSync&&m(new gr)},[d]),n.useEffect(()=>{if(p&&l&&e.window){let t=l,r=p.promise,a=e.window.document.startViewTransition(async()=>{i===!1?o(t):n.startTransition(()=>{i===!0&&c(e=>vr(e,t)),o(t)}),await r});a.finished.finally(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})}),g(a)}},[l,p,e.window,i,c]),n.useEffect(()=>{p&&l&&s.location.key===l.location.key&&p.resolve()},[p,h,s.location,l]),n.useEffect(()=>{!d.isTransitioning&&_&&(u(_.state),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),v(void 0))},[d.isTransitioning,_]);let x=n.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),S=e.basename||`/`,C=n.useMemo(()=>({router:e,navigator:x,static:!1,basename:S,onError:r}),[e,x,S,r]);return n.createElement(n.Fragment,null,n.createElement(yn.Provider,{value:C},n.createElement(bn.Provider,{value:s},n.createElement(wn.Provider,{value:y.current},n.createElement(Cn.Provider,{value:d},n.createElement(Cr,{basename:S,location:s.location,navigationType:s.historyAction,navigator:x,useTransitions:i},n.createElement(yr,{routes:e.routes,manifest:e.manifest,future:e.future,state:s,isStatic:!1,onError:r})))))),null)}function vr(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var yr=n.memo(br);function br({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Un(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function xr({to:e,replace:t,state:r,relative:i}){m(Pn(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:a,navigator:o}=n.useContext(Z);h(!a,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:s}=n.useContext(Q),{pathname:c}=$(),l=Rn(),u=H(e,ye(s),c,i===`path`);He(typeof e==`string`?e:y(e),o.createHref(u),q(o),`reject`);let d=JSON.stringify(u);return n.useEffect(()=>{l(JSON.parse(d),{replace:t,state:r,relative:i})},[l,d,i,t,r]),null}function Sr(e){m(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Cr({basename:e=`/`,children:t=null,location:r,navigationType:i=`POP`,navigator:a,static:o=!1,useTransitions:s}){m(!Pn(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let c=e.replace(/^\/*/,`/`),l=n.useMemo(()=>({basename:c,navigator:a,static:o,useTransitions:s,future:{}}),[c,a,o,s]);typeof r==`string`&&(r=b(r));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:g=`default`,mask:_}=r,v=n.useMemo(()=>{let e=V(u,c);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:g,mask:_},navigationType:i}},[c,u,d,f,p,g,i,_]);return h(v!=null,`<Router basename="${c}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:n.createElement(Z.Provider,{value:l},n.createElement(En.Provider,{children:t,value:v}))}function wr({children:e,location:t}){return Hn(Tr(e),t)}n.Component;function Tr(e,t=[]){let r=[];return n.Children.forEach(e,(e,i)=>{if(!n.isValidElement(e))return;let a=[...t,i];if(e.type===n.Fragment){r.push.apply(r,Tr(e.props.children,a));return}m(e.type===Sr,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),m(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let o={id:e.props.id||a.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=Tr(e.props.children,a)),r.push(o)}),r}var Er=`get`,Dr=`application/x-www-form-urlencoded`;function Or(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function kr(e){return Or(e)&&e.tagName.toLowerCase()===`button`}function Ar(e){return Or(e)&&e.tagName.toLowerCase()===`form`}function jr(e){return Or(e)&&e.tagName.toLowerCase()===`input`}function Mr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Nr(e,t){return e.button===0&&(!t||t===`_self`)&&!Mr(e)}function Pr(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Fr(e,t){let n=Pr(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Ir=null;function Lr(){if(Ir===null)try{new FormData(document.createElement(`form`),0),Ir=!1}catch{Ir=!0}return Ir}var Rr=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function zr(e){return e!=null&&!Rr.has(e)?(h(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Dr}"`),null):e}function Br(e,t){let n,r,i,a,o;if(Ar(e)){let o=e.getAttribute(`action`);r=o?V(o,t):null,n=e.getAttribute(`method`)||Er,i=zr(e.getAttribute(`enctype`))||Dr,a=new FormData(e)}else if(kr(e)||jr(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?V(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Er,i=zr(e.getAttribute(`formenctype`))||zr(o.getAttribute(`enctype`))||Dr,a=new FormData(o,e),!Lr()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Or(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Er,r=null,i=Dr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Vr(e,t){if(e===!1||e==null)throw Error(t)}function Hr(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&V(i.pathname,t)===`/`?`${xe(t)}/_root.${r}`:`${xe(i.pathname)}.${r}`,i}async function Ur(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Wr(e){return e!=null&&typeof e.page==`string`}function Gr(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Kr(e,t,n){return Zr((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Ur(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Gr).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function qr(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Jr(e,t,{includeHydrateFallback:n}={}){return Yr(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Yr(e){return[...new Set(e)]}function Xr(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Zr(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Wr(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Xr(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Qr(){let e=n.useContext(yn);return Vr(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function $r(){let e=n.useContext(bn);return Vr(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var ei=n.createContext(void 0);ei.displayName=`FrameworkContext`;function ti(){let e=n.useContext(ei);return Vr(e,`You must render this element inside a <HydratedRouter> element`),e}function ni(e,t){let r=n.useContext(ei),[i,a]=n.useState(!1),[o,s]=n.useState(!1),{onFocus:c,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=n.useRef(null);n.useEffect(()=>{if(e===`render`&&s(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),n.useEffect(()=>{if(i){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[i]);let m=()=>{a(!0)},h=()=>{a(!1),s(!1)};return r?e===`intent`?[o,p,{onFocus:ri(c,m),onBlur:ri(l,h),onMouseEnter:ri(u,m),onMouseLeave:ri(d,h),onTouchStart:ri(f,m)}]:[o,p,{}]:[!1,p,{}]}function ri(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ii({page:e,...t}){let r=Sn(),{nonce:i}=ti(),{router:a}=Qr(),o=n.useMemo(()=>M(a.routes,e,a.basename),[a.routes,e,a.basename]);return o?(t.nonce==null&&i&&(t={...t,nonce:i}),r?n.createElement(oi,{page:e,matches:o,...t}):n.createElement(si,{page:e,matches:o,...t})):null}function ai(e){let{manifest:t,routeModules:r}=ti(),[i,a]=n.useState([]);return n.useEffect(()=>{let n=!1;return Kr(e,t,r).then(e=>{n||a(e)}),()=>{n=!0}},[e,t,r]),i}function oi({page:e,matches:t,...r}){let i=$(),{future:a}=ti(),{basename:o}=Qr(),s=n.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let n=Hr(e,o,a.v8_trailingSlashAwareDataRequests,`rsc`),r=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?r=!0:s.push(e.route.id);return r&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[o,a.v8_trailingSlashAwareDataRequests,e,i,t]);return n.createElement(n.Fragment,null,s.map(e=>n.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...r})))}function si({page:e,matches:t,...r}){let i=$(),{future:a,manifest:o,routeModules:s}=ti(),{basename:c}=Qr(),{loaderData:l,matches:u}=$r(),d=n.useMemo(()=>qr(e,t,u,o,i,`data`),[e,t,u,o,i]),f=n.useMemo(()=>qr(e,t,u,o,i,`assets`),[e,t,u,o,i]),p=n.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let n=new Set,r=!1;if(t.forEach(e=>{let t=o.routes[e.route.id];t&&t.hasLoader&&(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?r=!0:n.add(e.route.id))}),n.size===0)return[];let u=Hr(e,c,a.v8_trailingSlashAwareDataRequests,`data`);return r&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[c,a.v8_trailingSlashAwareDataRequests,l,i,o,d,t,e,s]),m=n.useMemo(()=>Jr(f,o),[f,o]),h=ai(f);return n.createElement(n.Fragment,null,p.map(e=>n.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...r})),m.map(e=>n.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...r})),h.map(({key:e,link:t})=>n.createElement(`link`,{key:e,nonce:r.nonce,...t,crossOrigin:t.crossOrigin??r.crossOrigin})))}function ci(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}n.Component;var li=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{li&&(window.__reactRouterVersion=`7.18.4`)}catch{}function ui(e,t){return ot({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:p({window:t?.window}),hydrationData:t?.hydrationData||di(),routes:e,mapRouteProperties:mr,hydrationRouteProperties:hr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function di(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:fi(e.errors)}),e}function fi(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new Ee(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&Te.includes(r.__subType)){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}var pi=n.forwardRef(function({onClick:e,discover:t=`render`,prefetch:r=`none`,relative:i,reloadDocument:a,replace:o,mask:s,state:l,target:u,to:d,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m,...h},g){let{basename:_,navigator:v,useTransitions:y}=n.useContext(Z),b=typeof d==`string`&&c.test(d),x=Ae(d,_);d=x.to;let S=Nn(d,{relative:i}),C=$(),w=null;if(s){let e=H(s,[],C.mask?C.mask.pathname:`/`,!0);_!==`/`&&(e.pathname=e.pathname===`/`?_:U([_,e.pathname])),w=v.createHref(e)}let[T,E,D]=ni(r,h),ee=vi(d,{replace:o,mask:s,state:l,target:u,preventScrollReset:f,relative:i,viewTransition:p,defaultShouldRevalidate:m,useTransitions:y});function O(t){e&&e(t),t.defaultPrevented||ee(t)}let k=!(x.isExternal||a),A=n.createElement(`a`,{...h,...D,href:(k?w:void 0)||x.absoluteURL||S,onClick:k?O:e,ref:ci(g,E),target:u,"data-discover":!b&&t===`render`?`true`:void 0});return T&&!b?n.createElement(n.Fragment,null,A,n.createElement(ii,{page:S})):A});pi.displayName=`Link`;var mi=n.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:r=``,end:i=!1,style:a,to:o,viewTransition:s,children:c,...l},u){let d=Vn(o,{relative:l.relative}),f=$(),p=n.useContext(bn),{navigator:m,basename:h}=n.useContext(Z),g=p!=null&&wi(d)&&s===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=V(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!i&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!i&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof r==`function`?r(C):[r,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof a==`function`?a(C):a;return n.createElement(pi,{...l,"aria-current":w,className:T,ref:u,style:E,to:o,viewTransition:s},typeof c==`function`?c(C):c)});mi.displayName=`NavLink`;var hi=n.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:r,reloadDocument:i,replace:a,state:o,method:s=Er,action:l,onSubmit:u,relative:d,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m,...h},g)=>{let{useTransitions:_}=n.useContext(Z),v=Si(),y=Ci(l,{relative:d}),b=s.toLowerCase()===`get`?`get`:`post`,x=typeof l==`string`&&c.test(l);return n.createElement(`form`,{ref:g,method:b,action:y,onSubmit:i?u:e=>{if(u&&u(e),e.defaultPrevented)return;e.preventDefault();let i=e.nativeEvent.submitter,c=i?.getAttribute(`formmethod`)||s,l=()=>v(i||e.currentTarget,{fetcherKey:t,method:c,navigate:r,replace:a,state:o,relative:d,preventScrollReset:f,viewTransition:p,defaultShouldRevalidate:m});_&&r!==!1?n.startTransition(()=>l()):l()},...h,"data-discover":!x&&e===`render`?`true`:void 0})});hi.displayName=`Form`;function gi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _i(e){let t=n.useContext(yn);return m(t,gi(e)),t}function vi(e,{target:t,replace:r,mask:i,state:a,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l,useTransitions:u}={}){let d=Rn(),f=$(),p=Vn(e,{relative:s});return n.useCallback(m=>{if(Nr(m,t)){m.preventDefault();let t=r===void 0?y(f)===y(p):r,h=()=>d(e,{replace:t,mask:i,state:a,preventScrollReset:o,relative:s,viewTransition:c,defaultShouldRevalidate:l});u?n.startTransition(()=>h()):h()}},[f,d,p,r,i,a,t,e,o,s,c,l,u])}function yi(e){h(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=n.useRef(Pr(e)),r=n.useRef(!1),i=$(),a=n.useMemo(()=>Fr(i.search,r.current?null:t.current),[i.search]),o=Rn();return[a,n.useCallback((e,t)=>{let n=Pr(typeof e==`function`?e(new URLSearchParams(a)):e);r.current=!0,o(`?`+n,t)},[o,a])]}var bi=0,xi=()=>`__${String(++bi)}__`;function Si(){let{router:e}=_i(`useSubmit`),{basename:t}=n.useContext(Z),r=nr(),i=e.fetch,a=e.navigate;return n.useCallback(async(e,n={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Br(e,t);if(n.navigate===!1){let e=n.fetcherKey||xi();await i(e,r,n.action||o,{defaultShouldRevalidate:n.defaultShouldRevalidate,preventScrollReset:n.preventScrollReset,formData:l,body:u,formMethod:n.method||s,formEncType:n.encType||c,flushSync:n.flushSync})}else await a(n.action||o,{defaultShouldRevalidate:n.defaultShouldRevalidate,preventScrollReset:n.preventScrollReset,formData:l,body:u,formMethod:n.method||s,formEncType:n.encType||c,replace:n.replace,state:n.state,fromRouteId:r,flushSync:n.flushSync,viewTransition:n.viewTransition})},[i,a,t,r])}function Ci(e,{relative:t}={}){let{basename:r}=n.useContext(Z),i=n.useContext(Q);m(i,`useFormAction must be used inside a RouteContext`);let[a]=i.matches.slice(-1),o={...Vn(e||`.`,{relative:t})},s=$();if(e==null){o.search=s.search;let e=new URLSearchParams(o.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();o.search=n?`?${n}`:``}}return(!e||e===`.`)&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,`?index&`):`?index`),r!==`/`&&(o.pathname=o.pathname===`/`?r:U([r,o.pathname])),y(o)}function wi(e,{relative:t}={}){let r=n.useContext(Cn);m(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=_i(`useViewTransitionState`),a=Vn(e,{relative:t});if(!r.isTransitioning)return!1;let o=V(r.currentLocation.pathname,i)||r.currentLocation.pathname,s=V(r.nextLocation.pathname,i)||r.nextLocation.pathname;return z(a.pathname,s)!=null||z(a.pathname,o)!=null}export{_r as a,C as c,Fn as d,Rn as f,yi as h,Sr as i,ar as l,rr as m,mi as n,wr as o,Bn as p,xr as r,ui as s,pi as t,$ as u};