@tinyrack/issuary-server 0.29.3 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/dist/entities/oauth-client.entity.d.ts +6 -6
  2. package/dist/entities/oauth-code.entity.d.ts +6 -6
  3. package/dist/entities/oauth-device-code.entity.d.ts +6 -6
  4. package/dist/entities/revoked-token.entity.d.ts +6 -6
  5. package/dist/entities/terms-content.entity.d.ts +3 -3
  6. package/dist/entities/terms.entity.d.ts +3 -3
  7. package/dist/entities/user-consent.entity.d.ts +6 -6
  8. package/dist/entities/user-passkey.entity.d.ts +4 -4
  9. package/dist/entities/user-passkey.entity.d.ts.map +1 -1
  10. package/dist/entities/user-passkey.entity.js.map +1 -1
  11. package/dist/entities/user-terms-consent.entity.d.ts +3 -3
  12. package/dist/entities/user-totp-recovery-code.entity.d.ts +3 -3
  13. package/dist/entities/user-totp.entity.d.ts +3 -3
  14. package/dist/entities/user.entity.d.ts +3 -3
  15. package/dist/entrypoints/app.d.ts +255 -4
  16. package/dist/entrypoints/app.d.ts.map +1 -1
  17. package/dist/entrypoints/database/postgres/compiled-functions.js +1 -1
  18. package/dist/entrypoints/database/postgres/compiled-functions.js.map +1 -1
  19. package/dist/entrypoints/database/sqlite/compiled-functions.js +1 -1
  20. package/dist/entrypoints/database/sqlite/compiled-functions.js.map +1 -1
  21. package/dist/lib/config/client.js +1 -1
  22. package/dist/lib/config/client.js.map +1 -1
  23. package/dist/repositories/user-consent.repository.d.ts.map +1 -1
  24. package/dist/repositories/user-consent.repository.js +8 -2
  25. package/dist/repositories/user-consent.repository.js.map +1 -1
  26. package/dist/repositories/user-passkey.repository.d.ts +3 -3
  27. package/dist/repositories/user-totp-recovery-code.repository.d.ts +2 -2
  28. package/dist/repositories/user-totp.repository.d.ts +3 -3
  29. package/dist/routes/api/auth/index.d.ts +126 -2
  30. package/dist/routes/api/auth/index.d.ts.map +1 -1
  31. package/dist/routes/api/auth/passkey/options/post.d.ts +126 -2
  32. package/dist/routes/api/auth/passkey/options/post.d.ts.map +1 -1
  33. package/dist/routes/api/consent/get.d.ts +3 -0
  34. package/dist/routes/api/consent/get.d.ts.map +1 -1
  35. package/dist/routes/api/consent/get.js +26 -4
  36. package/dist/routes/api/consent/get.js.map +1 -1
  37. package/dist/routes/api/consent/index.d.ts +3 -0
  38. package/dist/routes/api/consent/index.d.ts.map +1 -1
  39. package/dist/routes/api/consent/post.d.ts.map +1 -1
  40. package/dist/routes/api/consent/post.js +8 -1
  41. package/dist/routes/api/consent/post.js.map +1 -1
  42. package/dist/routes/api/index.d.ts +255 -4
  43. package/dist/routes/api/index.d.ts.map +1 -1
  44. package/dist/routes/api/user/index.d.ts +126 -2
  45. package/dist/routes/api/user/index.d.ts.map +1 -1
  46. package/dist/routes/api/user/passkeys/register/options/post.d.ts +126 -2
  47. package/dist/routes/api/user/passkeys/register/options/post.d.ts.map +1 -1
  48. package/dist/routes/index.d.ts +255 -4
  49. package/dist/routes/index.d.ts.map +1 -1
  50. package/dist/services/container.d.ts.map +1 -1
  51. package/dist/services/container.js +1 -1
  52. package/dist/services/container.js.map +1 -1
  53. package/dist/services/oauth-authorize.service.d.ts +3 -1
  54. package/dist/services/oauth-authorize.service.d.ts.map +1 -1
  55. package/dist/services/oauth-authorize.service.js +33 -4
  56. package/dist/services/oauth-authorize.service.js.map +1 -1
  57. package/dist/services/passkey.service.d.ts.map +1 -1
  58. package/dist/services/passkey.service.js +8 -1
  59. package/dist/services/passkey.service.js.map +1 -1
  60. package/dist/services/terms.service.d.ts.map +1 -1
  61. package/dist/services/terms.service.js +3 -2
  62. package/dist/services/terms.service.js.map +1 -1
  63. package/dist/services/user-consent.service.d.ts +12 -0
  64. package/dist/services/user-consent.service.d.ts.map +1 -1
  65. package/dist/services/user-consent.service.js +19 -1
  66. package/dist/services/user-consent.service.js.map +1 -1
  67. package/frontend/client/assets/{CompositeItem-VmYWaHnv.js → CompositeItem-JwkStZhq.js} +1 -1
  68. package/frontend/client/assets/{FieldControl-D6zWw018.js → FieldControl-CwHXFt7p.js} +1 -1
  69. package/frontend/client/assets/{FieldItemContext-CPjig163.js → FieldItemContext-B3N2qWH8.js} +1 -1
  70. package/frontend/client/assets/{HydrationBoundary-CGOTaz3j.js → HydrationBoundary-C71PwQKm.js} +1 -1
  71. package/frontend/client/assets/{NullStore-BxU9yW8l.js → NullStore-UyCsFQfz.js} +1 -1
  72. package/frontend/client/assets/{Separator-eMrsmRws.js → Separator-Bu_799IG.js} +1 -1
  73. package/frontend/client/assets/{admin-console-BVGtfvzy.js → admin-console-Ej5TUkij.js} +1 -1
  74. package/frontend/client/assets/{admin-users-notice-DcKE5B43.js → admin-users-notice-D3rf-k5S.js} +1 -1
  75. package/frontend/client/assets/{alert-B9BFeQs3.js → alert-BIM0hnda.js} +1 -1
  76. package/frontend/client/assets/{alert-CFUBsmUN.js → alert-DS8e0Gvg.js} +1 -1
  77. package/frontend/client/assets/api-CfCwvXbU.js +1 -0
  78. package/frontend/client/assets/auth-choice-row-DNB3B1Vs.js +1 -0
  79. package/frontend/client/assets/auth-field-CDCz-y27.js +1 -0
  80. package/frontend/client/assets/{auth-footer-DgRsLHyD.js → auth-footer-LG_gGuJv.js} +1 -1
  81. package/frontend/client/assets/{auth-layout-CFKu8bHI.js → auth-layout-BedWIZ7L.js} +1 -1
  82. package/frontend/client/assets/{auth-outcome-B7tCCKZC.js → auth-outcome-DyY0JgWG.js} +1 -1
  83. package/frontend/client/assets/{auth-page-header-D5Z-EA6V.js → auth-page-header-C6Z6Air-.js} +1 -1
  84. package/frontend/client/assets/{avatar-BacTFLjX.js → avatar-DupqO5iP.js} +1 -1
  85. package/frontend/client/assets/badge-Cr0iG_iG.js +1 -0
  86. package/frontend/client/assets/{card-CTv8DubK.js → card-BaQElRNE.js} +1 -1
  87. package/frontend/client/assets/checkbox-BymOAmaw.js +1 -0
  88. package/frontend/client/assets/circle-alert-BZCKPkRn.js +1 -0
  89. package/frontend/client/assets/circle-check-BW_XcUlv.js +1 -0
  90. package/frontend/client/assets/code-Dc5QnXCh.js +1 -0
  91. package/frontend/client/assets/components-DF4L3dSB.js +1 -0
  92. package/frontend/client/assets/{entry.client-wT_SpBr6.js → entry.client-DVFGkhCN.js} +1 -1
  93. package/frontend/client/assets/{errorBoundaries-BmdAyh9C.js → errorBoundaries-C_UC4h4T.js} +2 -2
  94. package/frontend/client/assets/field-Du5xBKGW.js +2 -0
  95. package/frontend/client/assets/fingerprint-pattern-AUfgwio5.js +1 -0
  96. package/frontend/client/assets/i18n-Dzv9HKFm.js +1 -0
  97. package/frontend/client/assets/{initial-avatar-D4aPMV9z.js → initial-avatar-ByHiX-IF.js} +1 -1
  98. package/frontend/client/assets/{input-BFJdEx8B.js → input-Dyj4-3JM.js} +1 -1
  99. package/frontend/client/assets/{jsx-runtime-BFZ_fnNJ.js → jsx-runtime-B-57GDDH.js} +1 -1
  100. package/frontend/client/assets/key-round-BlUAV-K9.js +1 -0
  101. package/frontend/client/assets/{labeled-separator-DkexQjxp.js → labeled-separator-JGa2pO6H.js} +1 -1
  102. package/frontend/client/assets/language-selector-CeLHnp1n.js +1 -0
  103. package/frontend/client/assets/{link-DcBltZGP.js → link-Dsq51NsW.js} +1 -1
  104. package/frontend/client/assets/{link-button-qvSTUE1n.js → link-button-DGt9hwk7.js} +1 -1
  105. package/frontend/client/assets/lock-Cr_egoXD.js +1 -0
  106. package/frontend/client/assets/logout-DpMjBzc5.js +1 -0
  107. package/frontend/client/assets/mail-B2PK2vlI.js +1 -0
  108. package/frontend/client/assets/manifest-71025d92.js +1 -0
  109. package/frontend/client/assets/{modal-LoTH9Ttl.js → modal-BDu41alh.js} +1 -1
  110. package/frontend/client/assets/{mutation-C0KT2UXZ.js → mutation-DMG1qWFd.js} +1 -1
  111. package/frontend/client/assets/oauth-search-DebNssaC.js +1 -0
  112. package/frontend/client/assets/passkey-Bkqvhjwb.js +1 -0
  113. package/frontend/client/assets/{passkey-error-CZnhXTc7.js → passkey-error-C3DrncLi.js} +1 -1
  114. package/frontend/client/assets/{password-reset-BuDycpfY.js → password-reset-BhkJhVQ4.js} +1 -1
  115. package/frontend/client/assets/{password-strength-DLtV7dBZ.js → password-strength-B1w3RCA1.js} +1 -1
  116. package/frontend/client/assets/{pin-input-DtemAOnm.js → pin-input-DiWLndxH.js} +1 -1
  117. package/frontend/client/assets/{progress-xdWpxn2G.js → progress-vGb7EZn1.js} +1 -1
  118. package/frontend/client/assets/promise-CepnkPDw.js +1 -0
  119. package/frontend/client/assets/provider-mark-CCOkSxh7.js +1 -0
  120. package/frontend/client/assets/{react-dom-BxmrrPTH.js → react-dom-oT9-I0GD.js} +1 -1
  121. package/frontend/client/assets/{root-DTCHNfT8.js → root-CM8lJbh5.js} +1 -1
  122. package/frontend/client/assets/route-1rid8j-3.js +1 -0
  123. package/frontend/client/assets/route-B4jDMFTW.js +1 -0
  124. package/frontend/client/assets/{route-ID67gqvy.js → route-BKFb9RYA.js} +1 -1
  125. package/frontend/client/assets/{route-Cvob9_0Q.js → route-BYWFA1fQ.js} +1 -1
  126. package/frontend/client/assets/route-BcXtt6V2.js +1 -0
  127. package/frontend/client/assets/route-BwhQptmx.js +1 -0
  128. package/frontend/client/assets/{route-DCfkikii.js → route-C-DecXPL.js} +1 -1
  129. package/frontend/client/assets/{route-Ceht21dJ.js → route-C4_l_qs9.js} +1 -1
  130. package/frontend/client/assets/{route-_DMD2pp1.js → route-CF1S7UUy.js} +1 -1
  131. package/frontend/client/assets/{route-R-BJj3-W.js → route-CGTMMDiX.js} +1 -1
  132. package/frontend/client/assets/route-CKiun7AR.js +1 -0
  133. package/frontend/client/assets/route-CMJbXiDe.js +1 -0
  134. package/frontend/client/assets/route-CdPHVY9W.js +1 -0
  135. package/frontend/client/assets/route-Clxc1C2d.js +4 -0
  136. package/frontend/client/assets/{route-CkS9fAlL.js → route-D9Y1oCUO.js} +1 -1
  137. package/frontend/client/assets/route-DBpAiakW.js +1 -0
  138. package/frontend/client/assets/route-DFwqLWT0.js +1 -0
  139. package/frontend/client/assets/{route-Bx9hz_OF.js → route-DS92RKs5.js} +1 -1
  140. package/frontend/client/assets/{route-DlKXugZV.js → route-DZvCkU11.js} +1 -1
  141. package/frontend/client/assets/route-Dc6G2aDX.js +1 -0
  142. package/frontend/client/assets/{route-Caw4ohFV.js → route-DkoXJmYM.js} +1 -1
  143. package/frontend/client/assets/{route-DVMfGHhl.js → route-DphbGk_G.js} +1 -1
  144. package/frontend/client/assets/route-DqAmRSJE.js +1 -0
  145. package/frontend/client/assets/{route-CsT5EJEh.js → route-DrtpzI6u.js} +1 -1
  146. package/frontend/client/assets/route-Ezzcj26w.js +1 -0
  147. package/frontend/client/assets/route-HA9dma-h.js +1 -0
  148. package/frontend/client/assets/route-Y1_yJKhW.js +1 -0
  149. package/frontend/client/assets/{route-error-fallback-C2OHu3JW.js → route-error-fallback-CRL2Et8O.js} +1 -1
  150. package/frontend/client/assets/{route-module-Bm4sHkx9.js → route-module-2foR49uh.js} +1 -1
  151. package/frontend/client/assets/{sanitized-rich-text-nFi_4i6F.js → sanitized-rich-text-uZcpKo6H.js} +1 -1
  152. package/frontend/client/assets/{schemas-Dxi9xZo6.js → schemas-B87iTMww.js} +2 -2
  153. package/frontend/client/assets/search-QwZZIij9.js +1 -0
  154. package/frontend/client/assets/select-C_WHBpl_.js +1 -0
  155. package/frontend/client/assets/separator-nIgnJSXV.js +1 -0
  156. package/frontend/client/assets/shell-header-bar-CjPlfRKT.js +1 -0
  157. package/frontend/client/assets/shield-check-2DKLuF9J.js +1 -0
  158. package/frontend/client/assets/{standard-schema-C8Td_miB.js → standard-schema-kM5DbC12.js} +1 -1
  159. package/frontend/client/assets/{table-D2oRcUKc.js → table-BpQCtRY7.js} +1 -1
  160. package/frontend/client/assets/{terms-BReb6uEz.js → terms-BGJD_l_i.js} +1 -1
  161. package/frontend/client/assets/text-CBHShrvS.js +1 -0
  162. package/frontend/client/assets/{toast-_zV1SGz6.js → toast-XXVYYXim.js} +1 -1
  163. package/frontend/client/assets/{totp-BW4BoCpi.js → totp-4989Pb-o.js} +1 -1
  164. package/frontend/client/assets/trash-C7RyeTUJ.js +1 -0
  165. package/frontend/client/assets/triangle-alert-B0lTzZDi.js +1 -0
  166. package/frontend/client/assets/use-admin-selection-i-WvRvvB.js +1 -0
  167. package/frontend/client/assets/use-totp-setup-Cwuds2tR.js +2 -0
  168. package/frontend/client/assets/{useAriaLabelledBy-CYSspZIu.js → useAriaLabelledBy-CQ_H8SUl.js} +1 -1
  169. package/frontend/client/assets/{useMutation-C4CmK9Sb.js → useMutation-BkuKGzks.js} +1 -1
  170. package/frontend/client/assets/usePositioner-CrQOY-iw.js +1 -0
  171. package/frontend/client/assets/useQuery-BLm0XsTI.js +1 -0
  172. package/frontend/client/assets/useRender-DSFiJ2Vm.js +1 -0
  173. package/frontend/server/assets/{hydration-yaDCGSA8.js → hydration-B63_G0fd.js} +1 -1
  174. package/frontend/server/assets/{root-loader.server-Cwm-l9OS.js → root-loader.server-DUIBlg_3.js} +3 -3
  175. package/frontend/server/assets/{route-runtime.server-CjDbp5w6.js → route-runtime.server-DiqwWb8W.js} +1 -1
  176. package/frontend/server/assets/{session-CSnQWUgx.js → session-BaAt7WMI.js} +28 -46
  177. package/frontend/server/index.js +2189 -1798
  178. package/package.json +18 -18
  179. package/frontend/client/assets/api-0SzZx6X7.js +0 -1
  180. package/frontend/client/assets/auth-choice-row-DBHleTc9.js +0 -1
  181. package/frontend/client/assets/auth-field-1EM9pnWe.js +0 -1
  182. package/frontend/client/assets/authorization-context-banner-Cqtzj9A1.js +0 -1
  183. package/frontend/client/assets/badge-BCQspax5.js +0 -1
  184. package/frontend/client/assets/checkbox-OA4CFk-6.js +0 -1
  185. package/frontend/client/assets/circle-alert-DGTJ9B9k.js +0 -1
  186. package/frontend/client/assets/circle-check-CGasu2tI.js +0 -1
  187. package/frontend/client/assets/code-RrwtZcA2.js +0 -1
  188. package/frontend/client/assets/components-C1SipCbb.js +0 -1
  189. package/frontend/client/assets/field-DzNLNMM0.js +0 -2
  190. package/frontend/client/assets/fingerprint-pattern-V_eTEvnZ.js +0 -1
  191. package/frontend/client/assets/i18n-BY3irWek.js +0 -1
  192. package/frontend/client/assets/key-round-DgCbGqQL.js +0 -1
  193. package/frontend/client/assets/language-selector-CGXk9vW_.js +0 -1
  194. package/frontend/client/assets/lock-m97gMmUy.js +0 -1
  195. package/frontend/client/assets/logout-CBTnIosZ.js +0 -1
  196. package/frontend/client/assets/mail-tgQpWyoC.js +0 -1
  197. package/frontend/client/assets/manifest-9217f574.js +0 -1
  198. package/frontend/client/assets/oauth-search-BtLPTIS7.js +0 -1
  199. package/frontend/client/assets/passkey-C9bzur2Z.js +0 -1
  200. package/frontend/client/assets/promise-CFWkfv2A.js +0 -1
  201. package/frontend/client/assets/provider-mark-B05f08GZ.js +0 -1
  202. package/frontend/client/assets/route-48mZ_bkD.js +0 -1
  203. package/frontend/client/assets/route-9i9rqQdx.js +0 -4
  204. package/frontend/client/assets/route-Bc48Eq7F.js +0 -1
  205. package/frontend/client/assets/route-C5Pe2AZT.js +0 -1
  206. package/frontend/client/assets/route-C9TWgUZf.js +0 -1
  207. package/frontend/client/assets/route-CBjporWj.js +0 -1
  208. package/frontend/client/assets/route-CLo3eo-R.js +0 -1
  209. package/frontend/client/assets/route-CPIXY7eE.js +0 -1
  210. package/frontend/client/assets/route-D-ycfUyo.js +0 -1
  211. package/frontend/client/assets/route-DHEnEwHa.js +0 -1
  212. package/frontend/client/assets/route-DLNoCW7x.js +0 -1
  213. package/frontend/client/assets/route-DokK6Iod.js +0 -1
  214. package/frontend/client/assets/route-OWWRYmAT.js +0 -1
  215. package/frontend/client/assets/route-goGP2kXu.js +0 -1
  216. package/frontend/client/assets/route-xuoylbDO.js +0 -1
  217. package/frontend/client/assets/search-DSkOjYwI.js +0 -1
  218. package/frontend/client/assets/select--ltVnlVl.js +0 -1
  219. package/frontend/client/assets/separator-C5dnwYaA.js +0 -1
  220. package/frontend/client/assets/shell-header-bar-C3KYib1D.js +0 -1
  221. package/frontend/client/assets/shield-check-93-WFkyJ.js +0 -1
  222. package/frontend/client/assets/text-CGN4ZtUZ.js +0 -1
  223. package/frontend/client/assets/trash-2-BOsxjkzU.js +0 -1
  224. package/frontend/client/assets/triangle-alert-DSSurAZ_.js +0 -1
  225. package/frontend/client/assets/use-admin-selection-CAegSKw5.js +0 -1
  226. package/frontend/client/assets/use-totp-setup-BOSkSnYG.js +0 -2
  227. package/frontend/client/assets/usePositioner-DcBnB2-O.js +0 -1
  228. package/frontend/client/assets/useQuery-BtUeFnRt.js +0 -1
  229. package/frontend/client/assets/useRender-BF5_Ad3C.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinyrack/issuary-server",
3
- "version": "0.29.3",
3
+ "version": "0.31.0",
4
4
  "type": "module",
5
5
  "description": "OpenID Connect Provider with OAuth2 support",
6
6
  "license": "MIT",
@@ -76,38 +76,38 @@
76
76
  }
77
77
  },
78
78
  "devDependencies": {
79
- "@biomejs/biome": "^2.5.11",
79
+ "@biomejs/biome": "^2.5.12",
80
80
  "@react-email/ui": "^6.9.3",
81
- "@types/node": "^24.13.3",
81
+ "@types/node": "^26.5.0",
82
82
  "@types/nodemailer": "^8.0.1",
83
83
  "@types/pg": "^8.23.1",
84
84
  "@types/qrcode": "^1.5.6",
85
85
  "@types/react": "^19.2.18",
86
- "@vitest/coverage-v8": "^4.1.11",
86
+ "@vitest/coverage-v8": "^5.0.0",
87
87
  "tsx": "^4.23.13",
88
88
  "typescript": "^7.0.2",
89
- "vitest": "^4.1.11"
89
+ "vitest": "^5.0.0"
90
90
  },
91
91
  "dependencies": {
92
92
  "@hono/standard-validator": "^0.4.0",
93
93
  "@opentelemetry/api": "^1.9.1",
94
- "@mikro-orm/cli": "^7.1.14",
95
- "@mikro-orm/core": "^7.1.14",
96
- "@mikro-orm/decorators": "^7.1.14",
97
- "@mikro-orm/migrations": "^7.1.14",
98
- "@mikro-orm/postgresql": "^7.1.14",
99
- "@mikro-orm/seeder": "^7.1.14",
100
- "@mikro-orm/sql": "^7.1.14",
101
- "@scalar/hono-api-reference": "^0.12.0",
102
- "@simplewebauthn/server": "^13.3.3",
94
+ "@mikro-orm/cli": "^7.2.0",
95
+ "@mikro-orm/core": "^7.2.0",
96
+ "@mikro-orm/decorators": "^7.2.0",
97
+ "@mikro-orm/migrations": "^7.2.0",
98
+ "@mikro-orm/postgresql": "^7.2.0",
99
+ "@mikro-orm/seeder": "^7.2.0",
100
+ "@mikro-orm/sql": "^7.2.0",
101
+ "@scalar/hono-api-reference": "^0.12.1",
102
+ "@simplewebauthn/server": "^14.0.1",
103
103
  "croner": "^10.0.1",
104
- "hono": "^4.13.5",
105
- "hono-openapi": "^1.3.1",
106
- "jose": "^6.2.10",
104
+ "hono": "^4.13.7",
105
+ "hono-openapi": "^1.3.2",
106
+ "jose": "^6.2.12",
107
107
  "kysely": "^0.29.5",
108
108
  "pino-pretty": "^13.1.3",
109
109
  "react-email": "^6.9.3",
110
- "nodemailer": "^9.1.1",
110
+ "nodemailer": "^10.0.1",
111
111
  "otplib": "^13.5.0",
112
112
  "pg": "^8.23.0",
113
113
  "pino": "^10.3.1",
@@ -1 +0,0 @@
1
- import{$ as e,J as t,Y as n}from"./components-C1SipCbb.js";import{t as r}from"./jsx-runtime-BFZ_fnNJ.js";var i=e(t(),1),a=r(),o=i.createContext(void 0),s=e=>{let t=i.useContext(o);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},c=({client:e,children:t})=>(i.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,a.jsx)(o.Provider,{value:e,children:t})),l={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},u=new class{#e=l;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function d(e){setTimeout(e,0)}var f=typeof window>`u`||`Deno`in globalThis;function p(){}function m(e,t){return typeof e==`function`?e(t):e}function h(e){return typeof e==`number`&&e>=0&&e!==1/0}function g(e,t){return Math.max(e+(t||0)-Date.now(),0)}function _(e,t){return typeof e==`function`?e(t):e}function v(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==b(o,t.options))return!1}else if(!S(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function y(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(x(t.options.mutationKey)!==x(a))return!1}else if(!S(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function b(e,t){return(t?.queryKeyHashFn||x)(e)}function x(e){return JSON.stringify(e,(e,t)=>E(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function S(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!S(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!S(e[r],t[r]))return!1;return!0}return!1}var C=Object.prototype.hasOwnProperty;function w(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=ee(e)&&ee(t);if(!r&&!(E(e)&&E(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:C.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=w(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function T(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function ee(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function E(e){if(!D(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!D(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function D(e){return Object.prototype.toString.call(e)===`[object Object]`}function te(e){return new Promise(t=>{u.setTimeout(t,e)})}function ne(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:w(e,t)}function re(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function ie(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var O=Symbol();function k(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===O?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ae(e,t){return typeof e==`function`?e(...t):!!e}function oe(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var se=()=>f,A=()=>se(),j=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},M=new class extends j{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},ce=d;function le(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ce,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var N=le(),P=new class extends j{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ue(e){return Math.min(1e3*2**e,3e4)}function de(e){return(e??`online`)!==`online`||P.isOnline()}var F=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function fe(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(p);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new F(t);g(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>M.isFocused()&&(e.networkMode===`always`||P.isOnline())&&e.canRun(),m=()=>de(e.networkMode)&&e.canRun(),h=e=>{c()||(r?.(),i=`resolved`,a(e))},g=e=>{c()||(r?.(),i=`rejected`,o(e))},_=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),v=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(h).catch(r=>{if(c())return;let i=e.retry??(A()?0:3),a=e.retryDelay??ue,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){g(r);return}n++,e.onFail?.(n,r),te(o).then(()=>f()?void 0:_()).then(()=>{t?g(r):v()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:m,start:()=>(m()?v():_().then(v),s)}}var I=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),h(this.gcTime)&&(this.#e=u.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(A()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(u.clearTimeout(this.#e),this.#e=void 0)}};function pe(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{oe(e,()=>t.signal,()=>n=!0)},u=k(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?ie:re;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?me:L,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:L(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function L(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function me(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var he=class extends I{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=B(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=B(this.options);e.data!==void 0&&(this.setState(z(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=ne(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(p).catch(p):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>_(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===O||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>_(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!g(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=k(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?pe(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=fe({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof F&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof F){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...R(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...z(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),N.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function R(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:de(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function z(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function B(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}function V(...e){return e.filter(Boolean).join(` `)}function ge(e,t){return typeof t==`function`?n=>V(e,t(n)):V(e,t)}var _e=n((e=>{var n=t();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=n.useSyncExternalStore===void 0?f:n.useSyncExternalStore})),H=n(((e,t)=>{t.exports=_e()})),ve=H(),ye=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);J(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},U={},W=(e,t,n,r)=>{J(n)&&U[n]||(J(n)&&(U[n]=new Date),ye(e,t,n,r))},G=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},K=(e,t,n)=>{e.loadNamespaces(t,G(e,n))},q=(e,t,n,r)=>{if(J(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return K(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,G(e,r))},be=(e,t,n={})=>!t.languages||!t.languages.length?(W(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),J=e=>typeof e==`string`,xe=e=>typeof e==`object`&&!!e,Se=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ce={"&amp;":`&`,"&#38;":`&`,"&lt;":`<`,"&#60;":`<`,"&gt;":`>`,"&#62;":`>`,"&apos;":`'`,"&#39;":`'`,"&quot;":`"`,"&#34;":`"`,"&nbsp;":` `,"&#160;":` `,"&copy;":`©`,"&#169;":`©`,"&reg;":`®`,"&#174;":`®`,"&hellip;":`…`,"&#8230;":`…`,"&#x2F;":`/`,"&#47;":`/`},we=e=>Ce[e],Y={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(Se,we),transDefaultProps:void 0},Te=(e={})=>{Y={...Y,...e}},Ee=()=>Y,X,De=e=>{X=e},Oe=()=>X,ke=(0,i.createContext)(),Ae=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},je={t:(e,t)=>{if(J(t))return t;if(xe(t)&&J(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},Me=()=>()=>{},Ne=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:a}=(0,i.useContext)(ke)||{},o=n||r||Oe();o&&!o.reportNamespaces&&(o.reportNamespaces=new Ae),o||W(o,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`);let s=(0,i.useMemo)(()=>({...Ee(),...o?.options?.react,...t}),[o,t]),{useSuspense:c,keyPrefix:l}=s,u=e||a||o?.options?.defaultNS,d=J(u)?[u]:u||[`translation`],f=(0,i.useMemo)(()=>d,d);o?.reportNamespaces?.addUsedNamespaces?.(f);let p=(0,i.useRef)(0),m=(0,i.useCallback)(e=>{if(!o)return Me;let{bindI18n:t,bindI18nStore:n}=s,r=()=>{p.current+=1,e()};return t&&o.on(t,r),n&&o.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>o.off(e,r)),n&&n.split(` `).forEach(e=>o.store.off(e,r))}},[o,s]),h=(0,i.useRef)(),g=(0,i.useCallback)(()=>{if(!o)return je;let e=!!(o.isInitialized||o.initializedStoreOnce)&&f.every(e=>be(e,o,s)),n=t.lng||o.language,r=p.current,i=h.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===l&&i.revision===r)return i;let a={t:o.getFixedT(n,s.nsMode===`fallback`?f:f[0],l,{scopeNs:f}),ready:e,lng:n,keyPrefix:l,revision:r};return h.current=a,a},[o,f,l,s,t.lng]),[_,v]=(0,i.useState)(0),{t:y,ready:b}=(0,ve.useSyncExternalStore)(m,g,g);(0,i.useEffect)(()=>{if(o&&!b&&!c){let e=()=>v(e=>e+1);t.lng?q(o,t.lng,f,e):K(o,f,e)}},[o,t.lng,f,b,c,_]);let x=o||{},S=(0,i.useRef)(null),C=(0,i.useRef)(),w=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},T=(0,i.useMemo)(()=>{let e=x,t=e?.language,n=e;e&&(S.current&&S.current.__original===e&&C.current===t?n=S.current:(n=w(e),S.current=n,C.current=t));let r=!b&&!c?(...e)=>(W(o,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),y(...e)):y,i=[r,n,b];return i.t=r,i.i18n=n,i.ready=b,i},[y,x,b,x.resolvedLanguage,x.language,x.languages]);if(o&&c&&!b){let e=!1;try{e=!1}catch{}throw e&&W(o,`SUSPENDED_WHILE_LOADING`,`useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook`),new Promise(e=>{let n=()=>e();t.lng?q(o,t.lng,f,n):K(o,f,n)})}return T},Pe=/^[\w!#$%&'*.^`|~+-]+$/,Fe=(e,t,n={})=>{if(!Pe.test(e))throw Error(`Invalid cookie name`);let r=`${e}=${t}`;if(e.startsWith(`__Secure-`)&&!n.secure)throw Error(`__Secure- Cookie must have Secure attributes`);if(e.startsWith(`__Host-`)){if(!n.secure)throw Error(`__Host- Cookie must have Secure attributes`);if(n.path!==`/`)throw Error(`__Host- Cookie must have Path attributes with "/"`);if(n.domain)throw Error(`__Host- Cookie must not have Domain attributes`)}for(let e of[`domain`,`path`,`sameSite`,`priority`])if(n[e]&&/[;\r\n]/.test(n[e]))throw Error(`${e} must not contain ";", "\\r", or "\\n"`);if(n&&typeof n.maxAge==`number`&&n.maxAge>=0){if(n.maxAge>3456e4)throw Error(`Cookies Max-Age SHOULD NOT be greater than 400 days (34560000 seconds) in duration.`);r+=`; Max-Age=${n.maxAge|0}`}if(n.domain&&n.prefix!==`host`&&(r+=`; Domain=${n.domain}`),n.path&&(r+=`; Path=${n.path}`),n.expires){if(n.expires.getTime()-Date.now()>3456e7)throw Error(`Cookies Expires SHOULD NOT be greater than 400 days (34560000 seconds) in the future.`);r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+=`; HttpOnly`),n.secure&&(r+=`; Secure`),n.sameSite&&(r+=`; SameSite=${n.sameSite.charAt(0).toUpperCase()+n.sameSite.slice(1)}`),n.priority&&(r+=`; Priority=${n.priority.charAt(0).toUpperCase()+n.priority.slice(1)}`),n.partitioned){if(!n.secure)throw Error(`Partitioned Cookie must have Secure attributes`);r+=`; Partitioned`}return r},Ie=(e,t,n)=>(t=encodeURIComponent(t),Fe(e,t,n)),Le=(e,t)=>(e=e.replace(/\/+$/,``),e+=`/`,t=t.replace(/^\/+/,``),e+t),Z=(e,t)=>{for(let[n,r]of Object.entries(t)){let t=RegExp(`/:`+n+`(?:{[^/]+})?\\??(?=/|$)`);e=e.replace(t,()=>r?`/${r}`:``)}return e},Re=e=>{let t=new URLSearchParams;for(let[n,r]of Object.entries(e))if(r!==void 0){if(Array.isArray(r))for(let e of r)e!==void 0&&t.append(n,e);else t.set(n,r)}return t},ze=(e,t)=>{switch(t){case`ws`:return e.replace(/^http/,`ws`);case`http`:return e.replace(/^ws/,`http`)}},Be=e=>/^https?:\/\/[^\/]+?\/index(?=\?|$)/.test(e)?e.replace(/\/index(?=\?|$)/,`/`):e.replace(/\/index(?=\?|$)/,``);function Q(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ve(e,t){if(!Q(e)&&!Q(t))return t;let n={...e};for(let e in t){let r=t[e];n[e]=Q(n[e])&&Q(r)?Ve(n[e],r):r}return n}var He=(e,t)=>new Proxy(()=>{},{get(n,r){if(typeof r==`string`&&r!==`then`)return He(e,[...t,r])},apply(n,r,i){return e({path:t,args:i})}}),$=(e,t)=>{let n=t.toString();return n?`${e}?${n}`:e},Ue=class{url;method;buildSearchParams;queryParams=void 0;pathParams={};rBody;cType=void 0;constructor(e,t,n){this.url=e,this.method=t,this.buildSearchParams=n.buildSearchParams}fetch=async(e,t)=>{if(e){if(e.query&&(this.queryParams=this.buildSearchParams(e.query)),e.form){let t=new FormData;for(let[n,r]of Object.entries(e.form))if(r!==void 0){if(Array.isArray(r))for(let e of r)e!==void 0&&t.append(n,e);else t.append(n,r)}this.rBody=t}e.json!==void 0&&(this.rBody=JSON.stringify(e.json),this.cType=`application/json`),e.param&&(this.pathParams=e.param)}let n=this.method.toUpperCase(),r={...e?.header,...typeof t?.headers==`function`?await t.headers():t?.headers};if(e?.cookie){let t=[];for(let[n,r]of Object.entries(e.cookie))r!==void 0&&t.push(Ie(n,r));t.length>0&&(r.Cookie=t.join(`; `))}this.cType&&(r[`Content-Type`]=this.cType);let i=new Headers;for(let[e,t]of Object.entries(r))t!==void 0&&i.set(e,t);let a=this.url;a=Be(a),a=Z(a,this.pathParams),this.queryParams&&(a=$(a,this.queryParams)),n=this.method.toUpperCase();let o=n!==`GET`&&n!==`HEAD`;return(t?.fetch||fetch)(a,{body:o?this.rBody:void 0,method:n,headers:i,...t?.init})}},We=(e,t)=>He(function n(r){let i=t?.buildSearchParams??Re,a=[...r.path],o=a.slice(-3).reverse();if(o[0]===`toString`)return o[1]===`name`?o[2]||``:n.toString();if(o[0]===`valueOf`)return o[1]===`name`?o[2]||``:n;let s=``;if(/^\$/.test(o[0])){let e=a.pop();e&&(s=e.replace(/^\$/,``))}let c=Le(e,a.join(`/`));if(s===`url`||s===`path`){let t=c;return r.args[0]&&(r.args[0].param&&(t=Z(c,r.args[0].param)),r.args[0].query&&(t=$(t,i(r.args[0].query)))),t=Be(t),s===`url`?new URL(t):t.slice(e.replace(/\/+$/,``).length).replace(/^\/?/,`/`)}if(s===`ws`){let e=ze(r.args[0]?.param?Z(c,r.args[0].param):c,`ws`),n=new URL(e),a=r.args[0]?.query;return a&&i(a).forEach((e,t)=>{n.searchParams.append(t,e)}),((...e)=>t?.webSocket!==void 0&&typeof t.webSocket==`function`?t.webSocket(...e):new WebSocket(...e))(n.toString())}let l=new Ue(c,s,{buildSearchParams:i});if(s){t??={};let e={...r.args[1]},n=t.headers,i=e.headers;n&&i&&(e.headers=async()=>({...typeof n==`function`?await n():n,...typeof i==`function`?await i():i}));let a=Ve(t,e);return l.fetch(r.args[0],a)}return l},[]),Ge=class e extends Error{code;status;constructor(e,t,n){super(n),this.name=`IssuaryError`,this.code=e,this.status=t}static async fromResponse(t){let n=`UNKNOWN_ERROR`,r=t.statusText||`An unknown error occurred`;try{let e=await t.json();e.code&&(n=e.code),e.message&&(r=e.message)}catch{}return new e(n,t.status,r)}};function Ke(e){return async(t,n)=>{let r=new Headers(n?.headers);r.has(`Accept-Language`)||r.set(`Accept-Language`,e.language()),e.cookie&&!r.has(`Cookie`)&&r.set(`Cookie`,e.cookie);let i=typeof t==`string`?t:t instanceof URL?t.href:t.url,a=e.baseUrl===`/`?t:new URL(i,e.baseUrl),o=await e.fetch(a,{...n,headers:r});if(!o.ok)throw await Ge.fromResponse(o);return o}}function qe(e){return We(e.baseUrl,{fetch:Ke(e)})}var Je=`en`;function Ye(e){Je=e}var Xe=qe({baseUrl:`/`,fetch:(e,t)=>globalThis.fetch(e,t),language:()=>Je});async function Ze(e){return await e.json()}export{_ as A,b as C,p as D,v as E,u as F,c as I,s as L,ae as M,O as N,S as O,g as P,x as S,y as T,N as _,Ne as a,A as b,Te as c,ge as d,he as f,P as g,fe as h,Ge as i,T as j,ne as k,H as l,I as m,Ze as n,ke as o,R as p,Ye as r,De as s,Xe as t,V as u,M as v,h as w,m as x,j as y};
@@ -1 +0,0 @@
1
- import{t as e}from"./jsx-runtime-BFZ_fnNJ.js";import{t}from"./text-CGN4ZtUZ.js";import{V as n}from"./select--ltVnlVl.js";import{t as r}from"./card-CTv8DubK.js";import{t as i}from"./link-button-qvSTUE1n.js";var a=n(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),o=e();function s({render:e,icon:n,leading:s,label:c,description:l,indicator:u,selected:d=!1,surface:f=`standalone`,trailing:p}){let m=(0,o.jsxs)(i,{appearance:f===`card`?`ghost`:`outline`,className:`h-auto min-w-0 flex-1 justify-start gap-tinyrack-md px-tinyrack-lg py-tinyrack-md text-start transition-colors duration-tinyrack-fast ease-tinyrack-standard`,intent:`neutral`,render:e,uiSize:`lg`,children:[s??(n?(0,o.jsx)(n,{"aria-hidden":!0,className:`size-tinyrack-xl shrink-0`}):null),(0,o.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col whitespace-normal`,children:[(0,o.jsx)(t,{className:`min-w-0 break-words`,variant:`body`,weight:`medium`,children:c}),l||u?(0,o.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-tinyrack-xs gap-y-tinyrack-3xs`,children:[l?(0,o.jsx)(t,{color:`muted`,variant:`caption`,children:l}):null,u]}):null]}),(0,o.jsx)(a,{"aria-hidden":!0,className:`size-tinyrack-lg shrink-0 text-tinyrack-text-muted`})]});return f===`card`?(0,o.jsxs)(r.Root,{className:`flex min-w-0 items-center transition-colors duration-tinyrack-fast ease-tinyrack-standard ${d?`border-tinyrack-info-border bg-tinyrack-info-surface-subtle`:`bg-tinyrack-surface-muted`}`,padding:`none`,variant:`outlined`,children:[m,p?(0,o.jsx)(`div`,{className:`flex shrink-0 items-center px-tinyrack-xs`,children:p}):null]}):(0,o.jsxs)(`div`,{className:`flex items-center gap-tinyrack-xs`,children:[m,p]})}export{s as t};
@@ -1 +0,0 @@
1
- import{$ as e,J as t}from"./components-C1SipCbb.js";import{t as n}from"./jsx-runtime-BFZ_fnNJ.js";import{a as r}from"./api-0SzZx6X7.js";import{V as i}from"./select--ltVnlVl.js";import{t as a}from"./field-DzNLNMM0.js";import{t as o}from"./input-BFJdEx8B.js";var s=i(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),c=i(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),l=e(t(),1),u=n();function d({icon:e,type:t=`text`,label:n,placeholder:i,hint:d,labelAction:f,autoComplete:p,error:m,errorTestId:h=`field-error`,hideLabel:g=!1,className:_=``,ref:v,...y}){let{t:b}=r(),x=(0,l.useId)(),[S,C]=(0,l.useState)(!1),w=y.id??x,T=d?`${w}-hint`:void 0,E=m?`${w}-error`:void 0,D=E??T,O=t===`password`,k=O&&S?`text`:t;return(0,u.jsxs)(a.Root,{className:_,children:[g?(0,u.jsx)(a.Label,{className:`sr-only`,htmlFor:w,children:n}):(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)(`div`,{className:`flex items-baseline justify-between gap-tinyrack-sm`,children:[(0,u.jsx)(a.Label,{htmlFor:w,children:n}),f]})}),(0,u.jsxs)(o.Group,{"data-invalid":m?``:void 0,"data-testid":m?`input-error-wrapper`:void 0,uiSize:`lg`,children:[e&&(0,u.jsx)(o.Adornment,{children:(0,u.jsx)(e,{"aria-hidden":!0,className:`size-tinyrack-xl opacity-tinyrack-hover`})}),(0,u.jsx)(o,{"aria-describedby":D,"aria-invalid":m?!0:void 0,autoComplete:p,"data-invalid":m?``:void 0,id:w,placeholder:i,ref:v,type:k,uiSize:`lg`,...y}),O&&(0,u.jsx)(o.Action,{"aria-label":b(S?`common.password.hide`:`common.password.show`),onClick:()=>C(e=>!e),children:S?(0,u.jsx)(s,{"aria-hidden":!0,className:`size-tinyrack-lg`}):(0,u.jsx)(c,{"aria-hidden":!0,className:`size-tinyrack-lg`})})]}),d&&!m&&(0,u.jsx)(a.Description,{id:T,children:d}),(0,u.jsx)(a.Error,{"data-testid":h,id:E,match:!!m,children:m?.message})]})}export{d as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./jsx-runtime-BFZ_fnNJ.js";import{a as t,n,t as r}from"./api-0SzZx6X7.js";import{n as i,r as a,t as o}from"./text-CGN4ZtUZ.js";import{V as s}from"./select--ltVnlVl.js";import{t as c}from"./card-CTv8DubK.js";import{r as l}from"./language-selector-CGXk9vW_.js";import{t as u}from"./shield-check-93-WFkyJ.js";import{t as d}from"./badge-BCQspax5.js";import{i as f}from"./oauth-search-BtLPTIS7.js";var p=s(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),m=(e,t)=>i({queryKey:l.oauth.authorizationContext(t.client_id,t.redirect_uri,t.response_type,t.scope),queryFn:async()=>{let r=await e.api.oauth[`authorization-context`].$get({query:{client_id:t.client_id,redirect_uri:t.redirect_uri,response_type:t.response_type,scope:t.scope}});return n(r)},staleTime:6e4}),h=e=>m(r,e),g=e();function _({search:e,className:t=``}){return f(e)?(0,g.jsx)(v,{className:t,search:e}):null}function v({search:e,className:n}){let{t:r}=t(),{data:i}=a(h(e));return(0,g.jsx)(c.Root,{"aria-label":r(`authorizationContext.label`),className:n,"data-testid":`authorization-context`,padding:`lg`,render:(0,g.jsx)(`section`,{}),variant:`outlined`,children:(0,g.jsxs)(c.Content,{className:`flex flex-col gap-tinyrack-sm`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-tinyrack-sm`,children:[(0,g.jsx)(u,{"aria-hidden":!0,className:`size-tinyrack-lg shrink-0 text-tinyrack-info-foreground`}),(0,g.jsx)(o,{variant:`body`,weight:`medium`,children:r(`authorizationContext.title`,{app:i.client.name})})]}),(0,g.jsxs)(`div`,{className:`flex min-w-0 items-center gap-tinyrack-xs`,children:[(0,g.jsx)(p,{"aria-hidden":!0,className:`size-tinyrack-lg shrink-0 text-tinyrack-text-muted`}),(0,g.jsx)(o,{color:`muted`,truncate:!0,variant:`caption`,children:r(`authorizationContext.redirect`,{origin:i.redirect_origin})})]}),(0,g.jsxs)(`div`,{className:`flex flex-col gap-tinyrack-xs`,children:[(0,g.jsx)(o,{color:`muted`,variant:`caption`,weight:`medium`,children:r(`authorizationContext.permissions`)}),i.scopes.length>0?(0,g.jsx)(`ul`,{className:`flex flex-wrap gap-tinyrack-xs`,children:i.scopes.map(e=>(0,g.jsx)(`li`,{children:(0,g.jsx)(d,{uiSize:`md`,variant:`neutral`,children:r(`consent.scope.${e.name}`,{defaultValue:e.description})})},e.name))}):(0,g.jsx)(o,{color:`muted`,variant:`caption`,children:r(`authorizationContext.noScopes`)})]})]})})}export{_ as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./jsx-runtime-BFZ_fnNJ.js";import{u as t}from"./api-0SzZx6X7.js";var n=e();function r({className:e,uiSize:r=`md`,variant:i=`neutral`,...a}){return(0,n.jsx)(`span`,{...a,className:t(`tr-badge`,e),"data-ui-size":r,"data-variant":i})}export{r as t};
@@ -1 +0,0 @@
1
- import{$ as e,J as t}from"./components-C1SipCbb.js";import{t as n}from"./jsx-runtime-BFZ_fnNJ.js";import{d as r}from"./api-0SzZx6X7.js";import{Bn as i,Dn as a,E as o,Fn as s,In as c,Mn as ee,Nn as l,On as te,Pn as u,Rn as d,Tn as f,V as p,X as m,Y as h,at as g,fn as ne,kn as re,lt as _,zn as ie}from"./usePositioner-DcBnB2-O.js";import{E as ae,S as oe,_ as se,g as ce,p as le,rt as v,x as y,y as ue}from"./select--ltVnlVl.js";import{n as de}from"./FieldItemContext-CPjig163.js";import{t as fe}from"./useAriaLabelledBy-CYSspZIu.js";var b=e(t(),1);function pe(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(e===`BUTTON`||e===`INPUT`){let e=t;if(e.type===`submit`)return e}}return null}function me(e){return{checked(t){return e.indeterminate?{}:t?{"data-checked":``}:{"data-unchecked":``}},...y}}var he=b.createContext(void 0);function ge(){return b.useContext(he)}var x=b.createContext(void 0);function S(){let e=b.useContext(x);if(e===void 0)throw Error(c(14));return e}var C=n(),_e=`data-parent`,w=b.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i=!1,"aria-labelledby":c,disabled:g=!1,form:_,id:v,indeterminate:y=!1,inputRef:he,name:S,onCheckedChange:w,parent:T=!1,readOnly:E=!1,render:ve,required:D=!1,uncheckedValue:ye,value:O,nativeButton:k=!1,style:be,...xe}=e,{clearErrors:Se}=le(),{disabled:Ce,name:we,setDirty:Te,setFilled:A,setFocused:Ee,setTouched:De,state:j,validationMode:Oe,validityData:ke,validation:Ae}=ue(),je=de(),{labelId:Me,controlId:Ne,registerControlId:M,getDescriptionProps:N}=ce(),P=ge(),F=P?.allValues===void 0?void 0:P.parent,I=F!==void 0,L=Ce||je.disabled||P?.disabled||g,R=we??S,z=O??R,B=f(),V=f(),H=v||Ne;I&&(T?H=V:z===void 0?H||=V:H=`${F.id}-${z}`);let U={};I&&(T?U=F.getParentProps():z!==void 0&&(U=F.getChildProps(z)));let{checked:Pe=n,indeterminate:Fe=y,onCheckedChange:Ie,...Le}=U,W=P?.value,G=b.useRef(null),K=s(()=>Symbol()),q=b.useRef(!1),{getButtonProps:Re,buttonRef:ze}=h({disabled:L,native:k}),J=P?.validation??Ae,[Y,Be]=oe({controlled:z!==void 0&&W!==void 0&&!T?W.includes(z):Pe,default:i,name:`Checkbox`,state:`checked`}),X=I?!!Pe:Y,Z=I&&Fe||y;a(()=>{M!==l&&(q.current=!0,M(K.current,H))},[H,M,K]),b.useEffect(()=>{let e=K.current;return()=>{!q.current||M===l||(q.current=!1,M(e,void 0))}},[M,K]),se(G,B,Y,void 0,!P&&!L,S);let Q=b.useRef(null),Ve=J.registerInput,He=P?z:void 0,Ue=b.useCallback(e=>Ve(e,{controlRef:G,value:He}),[Ve,He]),We=u(he,Q,T?void 0:Ue),Ge=fe(c,Me,Q,!k,H??void 0);a(()=>{Q.current&&(Q.current.indeterminate=Z,Y&&A(!0))},[Y,Z,A]),ae(Y,()=>{P||(Se(R),A(Y),Te(Y!==ke.initialValue),J.change(Y))});let Ke=re({checked:Y,disabled:L,form:_,name:T?void 0:R,id:k?void 0:H??void 0,required:D,ref:We,style:R?ie:d,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(E){e.preventDefault();return}let t=e.currentTarget.checked,n=o(p,e.nativeEvent);if(w?.(t,n),!n.isCanceled&&(Ie?.(t,n),!n.isCanceled&&(Be(t),z!==void 0&&P!==void 0&&!T&&!I))){let e=t?[...P.value,z]:P.value.filter(e=>e!==z);P.setValue(e,n)}},onClick(e){e.stopPropagation()},onFocus(){G.current?.focus()}},O===void 0?ee:{value:(P?Y&&O:O)||``},N,e=>J.getValidationProps(L,e));b.useEffect(()=>{if(!F||z===void 0)return;let e=F.disabledStatesRef.current;return e.set(z,L),()=>{e.delete(z)}},[F,L,z]);let $=b.useMemo(()=>({...j,checked:X,disabled:L,readOnly:E,required:D,indeterminate:Z}),[j,X,L,E,D,Z]),qe=me($),Je=te(`span`,e,{state:$,ref:[ze,G,t],props:[{id:k?H??void 0:B,role:`checkbox`,"aria-checked":Z?`mixed`:X,"aria-readonly":E||void 0,"aria-required":D||void 0,"aria-labelledby":Ge,[_e]:T?``:void 0,onFocus(){L||Ee(!0)},onBlur(){let e=Q.current;e&&(De(!0),Ee(!1),Oe===`onBlur`&&J.commit(P?W:e.checked))},onKeyDown(e){if(e.key!==`Enter`||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=Q.current?.form??null,n=e.currentTarget,r=e.nativeEvent,i=e.preventDefault,a=r.preventDefault,o=!1;e.preventDefault=()=>{o=!0,i.call(e)},r.preventDefault=()=>{o=!0,a.call(r)},a.call(r),ne(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||pe(t)?.click()})},onClick(e){if(E||L)return;e.preventDefault();let t=Q.current;t&&m(t,e)}},xe,Le,Re,N,e=>J.getValidationProps(L,e)],stateAttributesMapping:qe});return(0,C.jsxs)(x.Provider,{value:$,children:[Je,!Y&&!P&&R&&!T&&ye!==void 0&&(0,C.jsx)(`input`,{type:`hidden`,form:_,name:R,value:ye,disabled:L}),(0,C.jsx)(`input`,{...Ke,suppressHydrationWarning:!0})]})}),T=i(b.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=S(),c=s.checked||s.indeterminate,{mounted:ee,transitionStatus:l,setMounted:u}=v(c),d=b.useRef(null),f={...s,transitionStatus:l};g({open:c,ref:d,onComplete(){c||u(!1)}});let p={...me(s),..._},m=a||ee,h=te(`span`,e,{ref:[t,d],state:f,stateAttributesMapping:p,props:o});return m?h:null}),`tr-checkbox-indicator`);function E({checked:e,className:t,ref:n,uiSize:i=`md`,...a}){let o=(0,b.useRef)(null),[s,c]=(0,b.useState)(0);return(0,b.useEffect)(()=>{if(e!==void 0)return;let t=e=>{let t=e.target;if(!(t instanceof HTMLFormElement))return;let n=o.current?.nextElementSibling??null;for(;n instanceof HTMLInputElement;){if(n.type===`checkbox`&&n.form===t){c(e=>e+1);return}n=n.nextElementSibling}};return document.addEventListener(`reset`,t,!0),()=>document.removeEventListener(`reset`,t,!0)},[e]),(0,b.createElement)(w,{...a,checked:e,className:r(`tr-checkbox`,t),"data-ui-size":i,key:s,ref:e=>{o.current=e,typeof n==`function`?n(e):n&&(n.current=e)}})}var ve={Root:E,Indicator:T};export{ve as t};
@@ -1 +0,0 @@
1
- import{V as e}from"./select--ltVnlVl.js";var t=e(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]);export{t};
@@ -1 +0,0 @@
1
- import{V as e}from"./select--ltVnlVl.js";var t=e(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]]);export{t};
@@ -1 +0,0 @@
1
- import{t as e}from"./jsx-runtime-BFZ_fnNJ.js";import{u as t}from"./api-0SzZx6X7.js";var n=e();function r({className:e,...r}){return(0,n.jsx)(`code`,{...r,className:t(`tr-code`,e)})}export{r as t};
@@ -1 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,o)=>(o=n==null?{}:e(i(n)),l(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e),f=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ee(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var F=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},te={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=te,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ee}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,F)}catch(e){F(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),p=s(((e,t)=>{t.exports=f()})),m=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,h=/^[\\/]{2}/;function g(e,t){return t+e.replace(/\\/g,`/`)}var _=`popstate`;function v(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function y(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return w(``,{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:T(t)}return D(t,n,null,e)}function b(e,t){if(e===!1||e==null)throw Error(t)}function x(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function S(){return Math.random().toString(36).substring(2,10)}function C(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 w(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?E(t):t,state:n,key:t&&t.key||r||S(),mask:i}}function T({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 E(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 D(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 d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=v(e)?e:w(h.location,e,t);n&&n(r,e),l=u()+1;let d=C(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=v(e)?e:w(h.location,e,t);n&&n(r,e),l=u();let i=C(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return O(i,e)}let h={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),c=e,()=>{i.removeEventListener(_,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function O(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),b(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:T(t);return i=i.replace(/ $/,`%20`),!n&&h.test(i)&&(i=r+i),new URL(i,r)}var k=u(p(),1),A=class{#e=new Map;constructor(e){if(e)for(let[t,n]of e)this.set(t,n)}get(e){if(this.#e.has(e))return this.#e.get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){this.#e.set(e,t)}},j=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function M(e){return j.has(e)}var N=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function P(e){return N.has(e)}function ee(e){return e.index===!0}function F(e){let t={};return e.Component&&Object.assign(t,{element:k.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:k.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:k.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function te(e,t=F,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(b(e.index!==!0||!e.children,`Cannot specify children on an index route`),b(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),ee(e)){let n={...e,id:s};return r[s]=I(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=I(n,t(n)),e.children&&(n.children=te(e.children,t,o,r,i)),n}})}function I(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function ne(e,t,n=`/`){return L(e,t,n,!1)}function L(e,t,n,r,i){let a=ve((typeof t==`string`?E(t):t).pathname||`/`,n);if(a==null)return null;let o=i??R(e),s=null,c=_e(a);for(let e=0;s==null&&e<o.length;++e)s=me(o[e],c,r);return s}function re(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,loaderData:t[n.id],handle:n.handle}}function R(e){let t=z(e);return ae(t),t}function z(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;b(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=W([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(b(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),z(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:fe(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=U(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 ie(e.path))a(e,t,!0,n)}),t}function ie(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=ie(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 ae(e){e.sort((e,t)=>e.score===t.score?pe(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var B=/^:[\w-]+$/,oe=/^:[\w-]+/,se=3.5,ce=3,le=2,ue=1,de=10,V=-2,H=e=>e===`*`;function fe(e,t){let n=e.split(`/`),r=n.length;return n.some(H)&&(r+=V),t&&(r+=le),n.filter(e=>!H(e)).reduce((e,t)=>e+(B.test(t)?ce:oe.test(t)?se:t===``?ue:de),r)}function pe(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 me(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?ge(u,l,s.matcher,s.compiledParams):he(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=he({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:W([a,d.pathname]),pathnameBase:ke(W([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=W([a,d.pathnameBase]))}return o}function he(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=U(e.path,e.caseSensitive,e.end);return ge(e,t,n,r)}function ge(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=Oe(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=Oe(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 U(e,t=!1,n=!0){x(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)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function _e(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return x(!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 ve(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 ye({basename:e,pathname:t}){return t===`/`?e:W([e,t])}var be=e=>m.test(e);function xe(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?E(e):e,a;return n?(n=De(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?Se(n.substring(1),`/`):Se(n,t)):a=t,{pathname:a,search:Ae(r),hash:je(i)}}function Se(e,t){let n=Oe(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Ce(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 we(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Te(e){let t=we(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ee(e,t,n,r=!1){let i;typeof e==`string`?i=E(e):(i={...e},b(!i.pathname||!i.pathname.includes(`?`),Ce(`?`,`pathname`,`search`,i)),b(!i.pathname||!i.pathname.includes(`#`),Ce(`#`,`pathname`,`hash`,i)),b(!i.search||!i.search.includes(`#`),Ce(`#`,`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=xe(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var De=e=>e.replace(/[\\/]{2,}/g,`/`),W=e=>De(e.join(`/`));function Oe(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 ke=e=>Oe(e).replace(/^\/*/,`/`),Ae=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,je=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Me=class{type=`DataWithResponseInit`;data;init;constructor(e,t){this.data=e,this.init=t||null}};function G(e,t){return new Me(e,typeof t==`number`?{status:t}:t)}var K=(e,t=302)=>{let n=t;typeof n==`number`?n={status:n}:n.status===void 0&&(n.status=302);let r=new Headers(n.headers);return r.set(`Location`,e),new Response(null,{...n,headers:r})},Ne=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],Pe=class{status;statusText;data;error;internal;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 Fe(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ie(e){return W(e.map(e=>e.route.path).filter(Boolean))||`/`}function Le(e,t){let n=new URL(typeof e==`string`||e instanceof URL?e:e.url),r=typeof t==`string`?E(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);let i=e.toString();n.search=i?`?${i}`:``}else n.search=``;return n.hash=r.hash||``,n}var q=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Re(e,t){let n=e;if(typeof n!=`string`||!m.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(q)try{let e=new URL(window.location.href),r=h.test(n)?new URL(g(n,e.protocol)):new URL(n),a=ve(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{x(!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 ze=Symbol(`Uninstrumented`),Be=new WeakMap;function Ve(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){e.lazy!=null&&n.lazy.push(e.lazy),e[`lazy.loader`]!=null&&n[`lazy.loader`].push(e[`lazy.loader`]),e[`lazy.action`]!=null&&n[`lazy.action`].push(e[`lazy.action`]),e[`lazy.middleware`]!=null&&n[`lazy.middleware`].push(e[`lazy.middleware`]),e.middleware!=null&&n.middleware.push(e.middleware),e.loader!=null&&n.loader.push(e.loader),e.action!=null&&n.action.push(e.action)}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=t.lazy;r.lazy=async(...t)=>J(await Y(n.lazy,void 0,()=>e(...t),qe))}if(typeof t.lazy==`object`){let e=t.lazy;if(typeof e.middleware==`function`&&n[`lazy.middleware`].length>0){let t=e.middleware;r.lazy=Object.assign(r.lazy||{},{middleware:async(...e)=>J(await Y(n[`lazy.middleware`],void 0,()=>t(...e),qe))})}if(typeof e.loader==`function`&&n[`lazy.loader`].length>0){let t=e.loader;r.lazy=Object.assign(r.lazy||{},{loader:async(...e)=>J(await Y(n[`lazy.loader`],void 0,()=>t(...e),qe))})}if(typeof e.action==`function`&&n[`lazy.action`].length>0){let t=e.action;r.lazy=Object.assign(r.lazy||{},{action:async(...e)=>J(await Y(n[`lazy.action`],void 0,()=>t(...e),qe))})}}if(typeof t.loader==`function`&&n.loader.length>0){let e=Ue(t.loader),i=async(...t)=>J(await Y(n.loader,Je(t[0]),()=>e(...t),qe));e.hydrate===!0&&(i.hydrate=!0),We(i,e),r.loader=i}if(typeof t.action==`function`&&n.action.length>0){let e=Ue(t.action),i=async(...t)=>J(await Y(n.action,Je(t[0]),()=>e(...t),qe));We(i,e),r.action=i}return t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=Ue(e),r=async(...e)=>J(await Y(n.middleware,Je(e[0]),()=>t(...e),qe));return We(r,t),r})),r}function He(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){e.navigate!=null&&n.navigate.push(e.navigate),e.fetch!=null&&n.fetch.push(e.fetch)}})),n.navigate.length>0){let t=Ue(e.navigate),r=async(...r)=>{let[i,a]=r,o,s={to:typeof i==`number`||typeof i==`string`?i:i?T(i):`.`,...Ye(e,a??{})};return J(await Y(n.navigate,s,async()=>{if(typeof i==`number`)return await t(...r);let n=Ge(e,e=>{o=e});try{return await t(...r)}finally{n()}},e=>({...qe(e),meta:o})))};We(r,t),e.navigate=r}if(n.fetch.length>0){let t=Ue(e.fetch),r=async(...r)=>{let[i,a,o,s]=r,c;return J(await Y(n.fetch,{href:o??`.`,fetcherKey:i,...Ye(e,s??{})},async()=>{let n=Ge(e,e=>{c=e});try{return await t(...r)}finally{n()}},e=>({...qe(e),meta:c})))};We(r,t),e.fetch=r}return e}function Ue(e){return e[ze]??e}function We(e,t){e[ze]=t}function Ge(e,t){return Be.set(e,t),()=>{Be.get(e)===t&&Be.delete(e)}}function Ke(e){let t=Be.get(e);return Be.delete(e),t}function J(e){if(e.type===`error`)throw e.value;return e.value}async function Y(e,t,n,r,i={result:null,innerResult:null},a=e.length-1){let o=e[a];if(o){let s,c=async()=>(s?console.error(`You cannot call instrumented handlers more than once`):s=Y(e,t,n,r,i,a-1),await s,b(i.innerResult,`Expected an inner result`),i.innerResult);try{await o(c,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}s||await c(),await s}else{try{i.result={type:`success`,value:await n()}}catch(e){i.result={type:`error`,value:e}}i.innerResult=r(i.result,t)}return i.result?i.result:(i.result={type:`error`,value:Error(`No result assigned in instrumentation chain.`)},i.innerResult=r(i.result,t),i.result)}function qe(e){return e.type===`error`&&e.value instanceof Error?{status:`error`,error:e.value}:{status:`success`,error:void 0}}function Je(e){let{request:t,context:n,params:r}=e;return{...e,request:Xe(t),params:{...r},context:Ze(n)}}function Ye(e,t){return{currentUrl:T(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 Xe(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Ze(e){return{get:t=>e.get(t)}}var Qe=new URL(`http://localhost`);function $e(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),Qe)}catch{return Qe}}function et(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function tt(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 nt(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&&!et(i,n),s=!et(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!tt(e,i)||!et(i,a)))throw Error(`External navigation is not allowed`)}var rt=[`POST`,`PUT`,`PATCH`,`DELETE`],it=new Set(rt),at=[`GET`,...rt],ot=new Set(at),st=new Set([301,302,303,307,308]),ct=new Set([307,308]),lt={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},ut={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},dt={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},ft=`remix-router-transitions`,pt=Symbol(`ResetLoaderData`),mt=class{#e;#t;#n;#r;constructor(e){this.#e=e,this.#t=R(e)}get stableRoutes(){return this.#e}get activeRoutes(){return this.#n??this.#e}get branches(){return this.#r??this.#t}get hasHMRRoutes(){return this.#n!=null}setRoutes(e){this.#e=e,this.#t=R(e)}setHmrRoutes(e){this.#n=e,this.#r=R(e)}commitHmrRoutes(){this.#n&&(this.#e=this.#n,this.#t=this.#r,this.#n=void 0,this.#r=void 0)}};function ht(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;b(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties,a=i||(()=>({}));if(e.instrumentations){let t=e.instrumentations;a=e=>({...i?.(e),...Ve(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new mt(te(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||Mt,u={...e.future},d=null,f=new Set,p=null,m=null,g=null,_=null,v=e.hydrationData!=null,y=L(s.activeRoutes,e.history.location,c,!1,s.branches),S=!1,C=null,D,k;if(y==null&&!e.patchRoutesOnNavigation){let t=X(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=tn(s.activeRoutes);D=!0,k=!D,y=n,C={[r.id]:t}}else if(y&&!e.hydrationData&&Ze(y,s.activeRoutes,e.history.location.pathname).active&&(y=null),!y){D=!1,k=!D,y=[];let t=Ze(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(S=!0,y=t.matches)}else if(y.some(e=>e.route.lazy))D=!1,k=!D;else if(!y.some(e=>bt(e.route)))D=!0,k=!D;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=y;if(n){let e=y.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}k=!1,D=!0,r.forEach(e=>{let r=xt(e.route,t,n);k||=r.renderFallback,D&&=!r.shouldLoad})}let j,M={historyAction:e.history.action,location:e.history.location,matches:y,initialized:D,renderFallback:k,navigation:lt,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||C,fetchers:new Map,blockers:new Map},N=`POP`,P=null,ee=!1,F,I=!1,ne=new Map,R=null,z=!1,ie=!1,ae=new Set,B=new Map,oe=0,se=-1,ce=new Map,le=new Set,ue=new Map,de=new Map,V=new Set,H=new Map,fe,pe=null;function me(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(fe){fe(),fe=void 0;return}x(H.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=J({currentLocation:M.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{fe=e});e.history.go(r*-1),Ge(i,{state:`blocked`,location:n,proceed(){Ge(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,dt),U({blockers:e})}}),P?.resolve(),P=null;return}return Se(t,n)}),n){Tn(t,ne);let e=()=>En(t,ne);t.addEventListener(`pagehide`,e),R=()=>t.removeEventListener(`pagehide`,e)}return M.initialized||Se(`POP`,M.location,{initialHydration:!0}),j}function he(){d&&d(),R&&R(),f.clear(),F&&F.abort(),M.fetchers.forEach((e,t)=>Ie(M.fetchers,t)),M.blockers.forEach((e,t)=>We(t))}function ge(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(M,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function U(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`&&(V.has(t)?n.push(t):r.push(t))}),V.forEach(e=>{!M.fetchers.has(e)&&!B.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(M,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Ie(M.fetchers,e)),r.forEach(e=>M.fetchers.delete(e))}function _e(t,n,{flushSync:r}={}){let i=M.actionData!=null&&M.navigation.formMethod!=null&&Q(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?Qt(M.loaderData,n.loaderData,n.matches||[],n.errors):M.loaderData,c=M.blockers;c.size>0&&!z&&(c=new Map(c),c.forEach((e,t)=>c.set(t,dt)));let l=!z&&Xe(t,n.matches||M.matches),u=ee===!0||M.navigation.formMethod!=null&&Q(M.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),z||N===`POP`||(N===`PUSH`?e.history.push(t,t.state):N===`REPLACE`&&e.history.replace(t,t.state));let d;if(N===`POP`){let e=ne.get(M.location.pathname);e&&e.has(t.pathname)?d={currentLocation:M.location,nextLocation:t}:ne.has(t.pathname)&&(d={currentLocation:t,nextLocation:M.location})}else if(I){let e=ne.get(M.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),ne.set(M.location.pathname,e)),d={currentLocation:M.location,nextLocation:t}}U({...n,actionData:a,loaderData:o,historyAction:N,location:t,initialized:!0,renderFallback:!1,navigation:lt,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),N=`POP`,ee=!1,I=!1,z=!1,ie=!1,P?.resolve(),P=null,pe?.resolve(),pe=null}async function ye(t,n){if(P?.resolve(),P=null,typeof t==`number`){P||=Dn();let n=P.promise;return e.history.go(t),n}let r=Ke(j),{path:i,submission:a,error:o}=vt(!1,_t(M.location,M.matches,c,t,n?.fromRouteId,n?.relative),n),s;if(n?.mask){let t=typeof n.mask==`string`?E(n.mask):{...M.location.mask,...n.mask};if(s={pathname:t.pathname??``,search:t.search??``,hash:t.hash??``},h.test(s.pathname))throw Error(`External navigation is not allowed`);s.pathname.startsWith(`\\`)&&(s.pathname=s.pathname.replace(/^\\+/,`/`)),nt(typeof n.mask==`string`?n.mask:T(n.mask),T(s),e.history.createURL(`/`),`reject`)}let l=M.location,u=w(l,i,n&&n.state,void 0,s);u={...u,...e.history.encodeLocation(u)},nt(t==null?e.history.createHref(M.location):typeof t==`string`?t:T(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||a!=null&&Q(a.formMethod)&&a.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,g=J({currentLocation:l,nextLocation:u,historyAction:f});if(g){Ge(g,{state:`blocked`,location:u,proceed(){Ge(g,{state:`proceeding`,proceed:void 0,reset:void 0,location:u}),ye(t,n)},reset(){let e=new Map(M.blockers);e.set(g,dt),U({blockers:e})}});return}await Se(f,u,{submission:a,pendingError:o,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:m,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate,instrumentationNavigateMetaReceiver:r})}function xe(){pe||=Dn(),Me(),U({revalidation:`loading`});let e=pe.promise;return M.navigation.state===`submitting`?e:M.navigation.state===`idle`?(Se(M.historyAction,M.location,{startUninterruptedRevalidation:!0}),e):(Se(N||M.historyAction,M.navigation.location,{overrideNavigation:M.navigation,enableViewTransition:I===!0}),e)}async function Se(t,n,r){F&&F.abort(),F=null,N=t,z=(r&&r.startUninterruptedRevalidation)===!0,Ye(M.location,M.matches),ee=(r&&r.preventScrollReset)===!0,I=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&M.matches&&M.matches.length>0&&!S?M.matches:L(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&M.initialized&&!ie&&an(M.location,n)&&!(r&&r.submission&&Q(r.submission.formMethod))){_e(n,{matches:a},{flushSync:o});return}let l=Ze(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),r?.instrumentationNavigateMetaReceiver){let t=vn(e.history,n,a);r.instrumentationNavigateMetaReceiver(t)}if(!a){let{error:e,notFoundMatches:t,route:r}=Y(n.pathname);_e(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;F=new AbortController;let d=qt(e.history,n,F.signal,r&&r.submission),f=e.getContext?await e.getContext():new A,p;if(r&&r.pendingError)p=[en(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Q(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(Z(t)&&Fe(t.error)&&t.error.status===404){F=null,_e(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=bn(n,a,t,r.submission),o=!1,l.active=!1,d=qt(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||(F=null,_e(n,{matches:h||a,...$t(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function Ce(t,n,i,l,u,d,f,p,m={}){if(Me(),U({navigation:xn(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await Qe(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}=tn(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=en(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}=Y(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=_n(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:X(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await Ae(t,n,Rt(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(un(h)){let n;return n=m&&m.replace!=null?m.replace:Kt(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===M.location.pathname+M.location.search,await ke(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(Z(h)){let e=en(l,g.route.id);return(m&&m.replace)!==!0&&(N=`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||bn(n,i,l,p),x=p||m||yn(b),S=!z&&!g;if(d){if(S){let e=Te(v);U({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await Qe(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}=tn(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=en(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}=Y(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:w,revalidatingFetchers:T}=yt(t,u,a,o,e.history,M,i,x,n,g?[]:r,g===!0,ie,ae,V,ue,le,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(se=++oe,!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=ze(e);return _e(n,{matches:i,loaderData:{},errors:v&&Z(v[1])?{[v[0]]:v[1].error}:null,...$t(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)),U(e,{flushSync:_})}T.forEach(e=>{q(e.key),e.controller&&B.set(e.key,e.controller)});let E=()=>T.forEach(e=>q(e.key));F&&F.signal.addEventListener(`abort`,E);let{loaderResults:D,fetcherResults:O}=await je(w,T,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};F&&F.signal.removeEventListener(`abort`,E),T.forEach(e=>B.delete(e.key));let k=nn(D);if(k)return await ke(t,k.result,!0,{replace:h}),{shortCircuited:!0};if(k=nn(O),k)return le.add(k.key),await ke(t,k.result,!0,{replace:h}),{shortCircuited:!0};let A=new Map(M.fetchers),{loaderData:j,errors:N}=Zt(M,i,D,v,T,O,A);g&&M.errors&&(N={...M.errors,...N});let P=ze(A),ee=Be(se,A),te=P||ee||T.length>0;return{matches:i,loaderData:j,errors:N,...te?{workingFetchers:A}:{}}}function Te(e){if(e&&!Z(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=Sn(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function De(t,n,r,i){q(t);let a=(i&&i.flushSync)===!0,o=Ke(j),l=s.activeRoutes,u=_t(M.location,M.matches,c,r,n,i?.relative),d=L(l,u,c,!1,s.branches),f=Ze(d,l,u);if(f.active&&f.matches&&(d=f.matches),o&&o(vn(e.history,u,d)),!d){K(t,n,X(404,{pathname:u}),{flushSync:a});return}let{path:p,submission:m,error:h}=vt(!0,u,i);if(h){K(t,n,h,{flushSync:a});return}let g=e.getContext?await e.getContext():new A,_=(i&&i.preventScrollReset)===!0;if(m&&Q(m.formMethod)){await W(t,n,p,d,g,f.active,a,_,m,i&&i.defaultShouldRevalidate);return}ue.set(t,{routeId:n,path:p}),await Oe(t,n,p,d,g,f.active,a,_,m)}async function W(t,n,i,l,u,d,f,p,m,h){Me(),ue.delete(t),G(t,Cn(m,M.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=qt(e.history,i,g.signal,m);if(d){let e=await Qe(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){K(t,n,e.error,{flushSync:f});return}if(e.matches)l=e.matches;else{K(t,n,X(404,{pathname:i}),{flushSync:f});return}}let v=_n(l,i);if(!v.route.action&&!v.route.lazy){K(t,n,X(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}B.set(t,g);let y=oe,x=Rt(a,o,_,i,l,v,r,u),S=await Ae(_,i,x,u,t),C=S[v.route.id];if(!C){for(let e of x)if(S[e.route.id]){C=S[e.route.id];break}}if(_.signal.aborted){B.get(t)===g&&B.delete(t);return}if(V.has(t)){if(un(C)||Z(C)){G(t,wn(void 0));return}}else{if(un(C)){if(B.delete(t),se>y){G(t,wn(void 0));return}return le.add(t),G(t,Sn(m)),ke(_,C,!1,{fetcherSubmission:m,preventScrollReset:p})}if(Z(C)){K(t,n,C.error);return}}let w=M.navigation.location||M.location,T=qt(e.history,w,g.signal),E=s.activeRoutes,D=M.navigation.state===`idle`?M.matches:L(E,M.navigation.location,c,!1,s.branches);b(D,`Didn't find any matches after fetcher action`);let O=++oe;ce.set(t,O);let{dsMatches:k,revalidatingFetchers:A}=yt(T,u,a,o,e.history,M,D,m,w,r,!1,ie,ae,V,ue,le,E,c,e.patchRoutesOnNavigation!=null,s.branches,[v.route.id,C],h),j=Sn(m,C.data),P=new Map(M.fetchers);P.set(t,j),A.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=P.get(t),r=Sn(void 0,n?n.data:void 0);P.set(t,r),q(t),e.controller&&B.set(t,e.controller)}),U({fetchers:P});let ee=()=>A.forEach(e=>q(e.key));g.signal.addEventListener(`abort`,ee);let{loaderResults:te,fetcherResults:I}=await je(k,A,T,w,u);if(g.signal.aborted){ce.get(t)===O&&ce.delete(t);return}g.signal.removeEventListener(`abort`,ee),ce.delete(t),B.delete(t),A.forEach(e=>B.delete(e.key));let ne=M.fetchers.has(t),re=e=>{if(!ne)return e;let n=new Map(e.fetchers);return n.set(t,wn(C.data)),{...e,fetchers:n}},R=nn(te);if(R)return M=re(M),ke(T,R.result,!1,{preventScrollReset:p});if(R=nn(I),R)return le.add(R.key),M=re(M),ke(T,R.result,!1,{preventScrollReset:p});let z=new Map(M.fetchers);ne&&z.set(t,wn(C.data));let{loaderData:de,errors:H}=Zt(M,D,te,void 0,A,I,z);Be(O,z),M.navigation.state===`loading`&&O>se?(b(N,`Expected pending action`),F&&F.abort(),_e(M.navigation.location,{matches:D,loaderData:de,errors:H,fetchers:z})):(U({errors:H,loaderData:Qt(M.loaderData,de,D,H),fetchers:z}),ie=!1)}async function Oe(t,n,i,s,c,l,u,d,f){let p=M.fetchers.get(t);G(t,Sn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=qt(e.history,i,m.signal);if(l){let e=await Qe(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){K(t,n,e.error,{flushSync:u});return}if(e.matches)s=e.matches;else{K(t,n,X(404,{pathname:i}),{flushSync:u});return}}let g=_n(s,i);B.set(t,m);let _=oe,v=await Ae(h,i,Rt(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(B.get(t)===m&&B.delete(t),!h.signal.aborted){if(V.has(t)){G(t,wn(void 0));return}if(un(y)){if(se>_){G(t,wn(void 0));return}le.add(t),await ke(h,y,!1,{preventScrollReset:d});return}if(Z(y)){K(t,n,y.error);return}G(t,wn(y.data))}}async function ke(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(P?.resolve(),P=null),i.response.headers.has(`X-Remix-Revalidate`)&&(ie=!0);let d=i.response.headers.get(`Location`);b(d,`Expected a Location header on the redirect Response`);let f=d,p=new URL(r.url);d=Kt(d,p,c,e.history),nt(f,d,p,`allow-explicit`);let m=w(M.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(be(d)){let n=O(t,d,!0);e=n.origin!==t.location.origin||ve(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}F=null;let h=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:g,formAction:_,formEncType:v}=M.navigation;!o&&!s&&g&&_&&v&&(o=yn(M.navigation));let y=o||s;ct.has(i.response.status)&&y&&Q(y.formMethod)?await Se(h,m,{submission:{...y,formAction:d},preventScrollReset:l||ee,enableViewTransition:a?I:void 0}):await Se(h,m,{overrideNavigation:bn(m,[],h,o),fetcherSubmission:s,preventScrollReset:l||ee,enableViewTransition:a?I:void 0})}async function Ae(e,t,n,r,i){let a,o={};try{a=await zt(l,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(!Q(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(ln(r)){let i=r.result;o[t]={type:`redirect`,response:Ut(i,e,t,n,c)}}else o[t]=await Ht(r);return o}async function je(e,t,n,r,i){let a=Ae(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Ae(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:X(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Me(){ie=!0,ue.forEach((e,t)=>{B.has(t)&&ae.add(t),q(t)})}function G(e,t,n={}){let r=new Map(M.fetchers);r.set(e,t),U({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function K(e,t,n,r={}){let i=en(M.matches,t),a=new Map(M.fetchers);Ie(a,e),U({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Ne(e){return de.set(e,(de.get(e)||0)+1),V.has(e)&&V.delete(e),M.fetchers.get(e)||ut}function Pe(e,t){q(e,t?.reason),G(e,wn(null))}function Ie(e,t){let n=M.fetchers.get(t);B.has(t)&&!(n&&n.state===`loading`&&ce.has(t))&&q(t),ue.delete(t),ce.delete(t),le.delete(t),V.delete(t),ae.delete(t),e.delete(t)}function Le(e){let t=(de.get(e)||0)-1;t<=0?(de.delete(e),V.add(e)):de.set(e,t),U({fetchers:new Map(M.fetchers)})}function q(e,t){let n=B.get(e);n&&(n.abort(t),B.delete(e))}function Re(e,t){for(let n of e){let e=t.get(n);b(e,`Expected fetcher: ${n}`);let r=wn(e.data);t.set(n,r)}}function ze(e){let t=[],n=!1;for(let r of le){let i=e.get(r);b(i,`Expected fetcher: ${r}`),i.state===`loading`&&(le.delete(r),t.push(r),n=!0)}return Re(t,e),n}function Be(e,t){let n=[];for(let[r,i]of ce)if(i<e){let e=t.get(r);b(e,`Expected fetcher: ${r}`),e.state===`loading`&&(q(r),ce.delete(r),n.push(r))}return Re(n,t),n.length>0}function Ue(e,t){let n=M.blockers.get(e)||dt;return H.get(e)!==t&&H.set(e,t),n}function We(e){M.blockers.delete(e),H.delete(e)}function Ge(e,t){let n=M.blockers.get(e)||dt;b(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),U({blockers:r})}function J({currentLocation:e,nextLocation:t,historyAction:n}){if(H.size===0)return;H.size>1&&x(!1,`A router only supports one blocker at a time`);let r=Array.from(H.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 Y(e){let t=X(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=tn(n);return{notFoundMatches:r,route:i,error:t}}function qe(e,t,n){if(m=e,_=t,g=n||null,!v&&M.navigation===lt){v=!0;let e=Xe(M.location,M.matches);e!=null&&U({restoreScrollPosition:e})}return()=>{m=null,_=null,g=null}}function Je(e,t){return g&&g(e,t.map(e=>re(e,M.loaderData)))||e.key}function Ye(e,t){if(m&&_){let n=Je(e,t);m[n]=_()}}function Xe(e,t){if(m){let n=Je(e,t),r=m[n];if(typeof r==`number`)return r}return null}function Ze(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:L(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:L(n,r,c,!0,e)}}return{active:!1,matches:null}}async function Qe(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||Tt(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=L(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=L(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&$e(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=L(s.activeRoutes,n,c,!0,u),!f||$e(l,f))return{type:`success`,matches:null};l=f}}function $e(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function et(e){o={},s.setHmrRoutes(te(e,a,void 0,o))}function tt(e,t,n=!1){Tt(e,t,s,o,a,n),s.hasHMRRoutes||U({})}return j={get basename(){return c},get future(){return u},get state(){return M},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:me,subscribe:ge,enableScrollRestoration:qe,navigate:ye,fetch:De,revalidate:xe,createHref:t=>e.history.createHref(t),createURL:t=>e.history.createURL(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ne,resetFetcher:Pe,deleteFetcher:Le,dispose:he,getBlocker:Ue,deleteBlocker:We,patchRoutes:tt,_internalFetchControllers:B,_internalSetRoutes:et,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){U(e)}},e.instrumentations&&(j=He(j,e.instrumentations.map(e=>e.router).filter(Boolean))),j}function gt(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function _t(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=Ee(r||`.`,Te(o),ve(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=gn(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=ye({basename:n,pathname:c.pathname})),T(c)}function vt(e,t,n){if(!n||!gt(n))return{path:t};if(n.formMethod&&!hn(n.formMethod))return{path:t,error:X(405,{method:n.formMethod})};let r=()=>({path:t,error:X(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=rn(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Q(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}\n`,``):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(!Q(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()}}}b(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=Jt(n.formData),s=n.formData;else if(n.body instanceof FormData)o=Jt(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=Yt(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=Yt(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(Q(c.formMethod))return{path:t,submission:c};let l=E(t);return e&&l.search&&gn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:T(l),submission:c}}function yt(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?Z(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&&Z(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,O={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},k=Ie(o),A=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(!bt(s))f=!1;else if(u){let{shouldLoad:e}=xt(s,a.loaderData,a.errors);f=e}else St(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return Lt(n,r,e,c,k,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?Ct(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p};return Lt(n,r,e,c,k,i,l,t,wt(i,m),m,x)}),j=[];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=L(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;j.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=_n(b,e.path),C=new AbortController,w=qt(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=Rt(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=Rt(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!D&&d;let a={...O,defaultShouldRevalidate:i};wt(S,a)&&(T=Rt(n,r,w,e.path,b,S,l,t,a))}T&&j.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:A,revalidatingFetchers:j}}function bt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function xt(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!bt(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 St(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function Ct(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function wt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Tt(e,t,n,r,i,a){let o;if(e){let t=r[e];b(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=>Et(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=te(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]=te([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 Et(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=>Et(e,t)))??!1}var Dt=new WeakMap,Ot=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(b(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=Dt.get(i);o||(o={},Dt.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=M(e),n=i[e]!==void 0;if(t)x(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)x(!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},kt=new WeakMap;function At(e,t,n,r,i){let a=n[e.id];if(b(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=kt.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{b(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=P(e),o=a[e]!==void 0;i?x(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?x(!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 kt.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=Ot({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 jt(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 Mt(e){return e.matches.some(e=>e.route.middleware)?Nt(e,()=>jt(e)):jt(e)}function Nt(e,t){return Pt(e,t,e=>{if(mn(e))throw e;return e},sn,n);async function n(t,n,r){if(r)return Object.assign(r.value,{[n]:{type:`error`,result:t}});{let{matches:r}=e,i=Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0)),a=r[i].route.id;for(let e of r.slice(0,i+1))try{await e._lazyPromises?.route}catch{a=e.route.id;break}return{[en(r,a).route.id]:{type:`error`,result:t}}}}}async function Pt(e,t,n,r,i){let{matches:a,...o}=e;return await Ft(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function Ft(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 Ft(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 It(e,t,n,r,i){let a=Ot({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=At(r.route,Q(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Lt(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=It(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?wt(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?wt(a,{...l,defaultShouldRevalidate:e}):wt(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!Q(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(Q(n.method)||!p)?Bt({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 Rt(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?Lt(e,t,n,r,Ie(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:It(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function zt(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:Le(t,n),pattern:Ie(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 Nt(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 Bt({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=Q(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:Le(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 X(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 X(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function Vt(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 Ht(e){let{result:t,type:n}=e;if(fn(t)){let e;try{e=await Vt(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new Pe(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?dn(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:on(t),statusCode:Fe(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Fe(t)?t.status:void 0}:dn(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 Ut(e,t,n,r,i){let a=e.headers.get(`Location`);if(b(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!be(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=_t(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Wt=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Gt(e){try{return Wt.includes(new URL(e).protocol)}catch{return!1}}function Kt(e,t,n,r){if(be(e)){let r=e,i=h.test(r)?new URL(g(r,t.protocol)):new URL(r);if(Gt(i.toString()))throw Error(`Invalid redirect location`);let a=ve(i.pathname,n)!=null;if(i.origin===t.origin&&a)return De(i.pathname)+i.search+i.hash}try{if(Gt(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function qt(e,t,n,r){let i=e.createURL(rn(t)).toString(),a={signal:n};if(r&&Q(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?Jt(r.formData):r.formData}return new Request(i,a)}function Jt(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function Yt(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Xt(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&Z(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(b(!un(f),`Cannot handle redirect results in processLoaderData`),Z(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=en(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=pt),c||(c=!0,s=Fe(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 Zt(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=Xt(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(b(s,`Did not find corresponding fetcher result`),Z(s)){let t=en(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(un(s))b(!1,`Unhandled fetcher revalidation redirect`);else{let e=wn(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function Qt(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==pt).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 $t(e){return e?Z(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function en(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.ErrorBoundary!=null||e.route.errorElement!=null)||e[0]}function tn(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 X(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 Pe(e||500,o,Error(s),!0)}function nn(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(un(r))return{key:n,result:r}}}function rn(e){return T({...typeof e==`string`?E(e):e,hash:``})}function an(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function on(e){return new Pe(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function sn(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&cn(t))}function cn(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function ln(e){return fn(e.result)&&st.has(e.result.status)}function Z(e){return e.type===`error`}function un(e){return(e&&e.type)===`redirect`}function dn(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function fn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function pn(e){return st.has(e)}function mn(e){return fn(e)&&pn(e.status)&&e.headers.has(`Location`)}function hn(e){return ot.has(e.toUpperCase())}function Q(e){return it.has(e.toUpperCase())}function gn(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function _n(e,t){let n=typeof t==`string`?E(t).search:t.search;if(e[e.length-1].route.index&&gn(n||``))return e[e.length-1];let r=we(e);return r[r.length-1]}function vn(e,t,n){return{url:Le(e.createURL(t),t),pattern:n?Ie(n):``,params:n?.[0]?.params?{...n[0].params}:{}}}function yn(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 bn(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 xn(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 Sn(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 Cn(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 wn(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 Tn(e,t){try{let n=e.sessionStorage.getItem(ft);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 En(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(ft,JSON.stringify(n))}catch(e){x(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function Dn(){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 On=k.createContext(null);On.displayName=`DataRouter`;var kn=k.createContext(null);kn.displayName=`DataRouterState`;var An=k.createContext(!1);function jn(){return k.useContext(An)}var Mn=k.createContext({isTransitioning:!1});Mn.displayName=`ViewTransition`;var Nn=k.createContext(new Map);Nn.displayName=`Fetchers`;var Pn=k.createContext(null);Pn.displayName=`Await`;var Fn=k.createContext(null);Fn.displayName=`Navigation`;var In=k.createContext(null);In.displayName=`Location`;var $=k.createContext({outlet:null,matches:[],isDataRoute:!1});$.displayName=`Route`;var Ln=k.createContext(null);Ln.displayName=`RouteError`;var Rn=`REACT_ROUTER_ERROR`,zn=`REDIRECT`,Bn=`ROUTE_ERROR_RESPONSE`;function Vn(e){if(e.startsWith(`${Rn}:${zn}:{`))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 Hn(e){if(e.startsWith(`${Rn}:${Bn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Pe(t.status,t.statusText,t.data)}catch{}}function Un(e,{relative:t}={}){b(Wn(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=k.useContext(Fn),{hash:i,pathname:a,search:o}=$n(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:W([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Wn(){return k.useContext(In)!=null}function Gn(){return b(Wn(),`useLocation() may be used only in the context of a <Router> component.`),k.useContext(In).location}function Kn(){return k.useContext(In).navigationType}var qn=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Jn(){let{isDataRoute:e}=k.useContext($);return e?xr():Yn()}function Yn(){b(Wn(),`useNavigate() may be used only in the context of a <Router> component.`);let e=k.useContext(On),{basename:t,navigator:n}=k.useContext(Fn),{matches:r}=k.useContext($),{pathname:i}=Gn(),a=JSON.stringify(Te(r)),o=k.useRef(!1);return k.useLayoutEffect(()=>{o.current=!0}),k.useCallback((r,s={})=>{if(x(o.current,qn),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Ee(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:W([t,c.pathname])),nt(typeof r==`string`?r:T(r),n.createHref(c),$e(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Xn=k.createContext(null);function Zn(e){let t=k.useContext($).outlet;return k.useMemo(()=>t&&k.createElement(Xn.Provider,{value:e},t),[t,e])}function Qn(){let{matches:e}=k.useContext($);return e[e.length-1]?.params??{}}function $n(e,{relative:t}={}){let{matches:n}=k.useContext($),{pathname:r}=Gn(),i=JSON.stringify(Te(n));return k.useMemo(()=>Ee(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function er(e,t,n){b(Wn(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=k.useContext(Fn),{matches:i}=k.useContext($),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=Gn(),l;if(t){let e=typeof t==`string`?E(t):t;b(s===`/`||e.pathname?.startsWith(s),`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 "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):ne(e,{pathname:d}),p=sr(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:W([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:W([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?k.createElement(In.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function tr(){let e=br(),t=Fe(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return k.createElement(k.Fragment,null,k.createElement(`h2`,null,`Unexpected Application Error!`),k.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?k.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var nr=k.createElement(tr,null),rr=class extends k.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=An;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=Hn(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:k.createElement($.Provider,{value:this.props.routeContext},k.createElement(Ln.Provider,{value:e,children:this.props.component}));return this.context?k.createElement(ar,{error:e},t):t}},ir=new WeakMap;function ar({children:e,error:t}){let{basename:n,navigator:r}=k.useContext(Fn);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Vn(t.digest);if(e){let i=ir.get(t);if(i)throw i;let a=Re(e.location,n),o=a.absoluteURL||a.to;if(nt(e.location,o,$e(r),`allow-explicit`),Gt(o))throw Error(`Invalid redirect location`);if(q&&!ir.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw ir.set(t,n),n}}return k.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function or({routeContext:e,match:t,children:n}){let r=k.useContext(On);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),k.createElement($.Provider,{value:e},n)}function sr(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);b(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Ie(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||nr,o&&(s<0&&c===0?(Cr(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?k.createElement(n.route.Component,null):n.route.element?n.route.element:e,k.createElement(or,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?k.createElement(rr,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function cr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lr(e){let t=k.useContext(On);return b(t,cr(e)),t}function ur(e){let t=k.useContext(kn);return b(t,cr(e)),t}function dr(e){let t=k.useContext($);return b(t,cr(e)),t}function fr(e){let t=dr(e),n=t.matches[t.matches.length-1];return b(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function pr(){return fr(`useRouteId`)}function mr(){let e=ur(`useNavigation`);return k.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function hr(){let e=lr(`useRevalidator`),t=ur(`useRevalidator`),n=k.useCallback(async()=>{await e.router.revalidate()},[e.router]);return k.useMemo(()=>({revalidate:n,state:t.revalidation}),[n,t.revalidation])}function gr(){let{matches:e,loaderData:t}=ur(`useMatches`);return k.useMemo(()=>e.map(e=>re(e,t)),[e,t])}function _r(){let e=ur(`useLoaderData`),t=fr(`useLoaderData`);return e.loaderData[t]}function vr(e){return ur(`useRouteLoaderData`).loaderData[e]}function yr(){let e=ur(`useActionData`),t=fr(`useLoaderData`);return e.actionData?e.actionData[t]:void 0}function br(){let e=k.useContext(Ln),t=ur(`useRouteError`),n=fr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function xr(){let{router:e}=lr(`useNavigate`),t=fr(`useNavigate`),n=k.useRef(!1);return k.useLayoutEffect(()=>{n.current=!0}),k.useCallback(async(r,i={})=>{x(n.current,qn),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Sr={};function Cr(e,t,n){!t&&!Sr[e]&&(Sr[e]=!0,x(!1,n))}var wr={};function Tr(e,t){!e&&!wr[t]&&(wr[t]=!0,console.warn(t))}var Er=[`HydrateFallback`,`hydrateFallbackElement`],Dr=class{status=`pending`;promise;resolve;reject;constructor(){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 Or({router:e,flushSync:t,onError:n,useTransitions:r}){r=jn()||r;let[i,a]=k.useState(e.state),[o,s]=(0,k.useOptimistic)(i),[c,l]=k.useState(),[u,d]=k.useState({isTransitioning:!1}),[f,p]=k.useState(),[m,h]=k.useState(),[g,_]=k.useState(),v=k.useRef(new Map),y=k.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:g})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:Ie(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&v.current.set(t,e.data)}),o.forEach(e=>v.current.delete(e)),Tr(u===!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 y=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(Tr(g==null||y,"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."),!g||!y){t&&u?t(()=>a(i)):r===!1?a(i):k.startTransition(()=>{r===!0&&s(e=>kr(e,i)),a(i)});return}if(t&&u){t(()=>{m&&(f?.resolve(),m.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:g.currentLocation,nextLocation:g.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>h(n));return}m?(f?.resolve(),m.skipTransition(),_({state:i,currentLocation:g.currentLocation,nextLocation:g.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}))},[e.window,t,m,f,r,s,n]);k.useLayoutEffect(()=>e.subscribe(y),[e,y]),k.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new Dr)},[u]),k.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):k.startTransition(()=>{r===!0&&s(e=>kr(e,t)),a(t)}),await n});i.finished.finally(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})}),h(i)}},[c,f,e.window,r,s]),k.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),k.useEffect(()=>{!u.isTransitioning&&g&&(l(g.state),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),_(void 0))},[u.isTransitioning,g]);let b=k.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]),x=e.basename||`/`,S=k.useMemo(()=>({router:e,navigator:b,static:!1,basename:x,onError:n}),[e,b,x,n]);return k.createElement(k.Fragment,null,k.createElement(On.Provider,{value:S},k.createElement(kn.Provider,{value:o},k.createElement(Nn.Provider,{value:v.current},k.createElement(Mn.Provider,{value:u},k.createElement(Nr,{basename:x,location:o.location,navigationType:o.historyAction,navigator:b,useTransitions:r},k.createElement(Ar,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function kr(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 Ar=k.memo(jr);function jr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return er(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Mr(e){return Zn(e.context)}function Nr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){b(!Wn(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=k.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=E(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=k.useMemo(()=>{let e=ve(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return x(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:k.createElement(Fn.Provider,{value:c},k.createElement(In.Provider,{children:t,value:h}))}k.Component;function Pr(){return{params:Qn(),loaderData:_r(),actionData:yr(),matches:gr()}}function Fr(e){return function(){let t=Pr();return k.createElement(e,t)}}function Ir(){return{params:Qn(),loaderData:_r(),actionData:yr(),error:br()}}function Lr(e){return function(){let t=Ir();return k.createElement(e,t)}}export{u as $,Ne as A,K as B,$ as C,dn as D,ht as E,W as F,b as G,ve as H,he as I,p as J,x as K,ne as L,G as M,F as N,fn as O,Fe as P,d as Q,L as R,Fn as S,jn as T,y as U,Ee as V,T as W,o as X,s as Y,c as Z,br as _,Fr as a,On as b,Un as c,gr as d,Jn as f,hr as g,$n as h,Er as i,U as j,Pe as k,_r as l,Kn as m,Nr as n,Lr as o,mr as p,m as q,Or as r,Tr as s,Mr as t,Gn as u,pr as v,Mn as w,kn as x,vr as y,Re as z};
@@ -1,2 +0,0 @@
1
- import{$ as e,J as t}from"./components-C1SipCbb.js";import{t as n}from"./jsx-runtime-BFZ_fnNJ.js";import{d as r}from"./api-0SzZx6X7.js";import{Bn as i,Dn as a,Fn as o,In as s,Mn as c,On as l,Tn as u,Vn as d,at as f,kn as p,lt as m,rn as h,yn as g}from"./usePositioner-DcBnB2-O.js";import{b as _,g as v,h as y,p as b,rt as x,u as S,v as C,x as w,y as T}from"./select--ltVnlVl.js";import{n as E,t as D}from"./FieldItemContext-CPjig163.js";import{t as O}from"./FieldControl-D6zWw018.js";var k=n(),A=e(t(),1),j=A.createContext(void 0);function M(e=!1){let t=A.useContext(j);if(!t&&!e)throw Error(s(86));return t}var N=function(e){let t=u(),n=e.controlId===void 0?t:e.controlId,[r,i]=A.useState(n),[a,s]=A.useState(e.labelId),[c,l]=A.useState([]),d=o(()=>new Map),{messageIds:f}=v(),p=g((e,t)=>{let n=d.current;if(t===void 0){n.delete(e);return}n.set(e,t),i(e=>{if(n.size===0)return;let t;for(let r of n.values()){if(e!==void 0&&r===e)return e;t===void 0&&(t=r)}return t})}),m=A.useCallback(e=>{let t=e[`aria-describedby`]?e[`aria-describedby`].split(` `):[];return t.push(...f,...c),{...e,"aria-describedby":Array.from(new Set(t)).join(` `)||void 0}},[f,c]),h=A.useMemo(()=>({controlId:r,registerControlId:p,labelId:a,setLabelId:s,messageIds:c,setMessageIds:l,getDescriptionProps:m}),[r,p,a,s,c,l,m]);return(0,k.jsx)(y.Provider,{value:h,children:e.children})};function P(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}var F=Object.keys(_);function I(e,t){return e.matches(`:disabled`)?!1:!t||e.form===t||e.form===null&&!e.hasAttribute(`form`)}function L(e,t){let n=null;for(let r of e.keys())if(I(r,t)){if(!r.validity.valid)return r;n??=r}return n}function R(e,t){for(let e of t.keys())e.setCustomValidity(``);e?.setCustomValidity(``)}function z(e){let{elementRef:t,formRef:n}=b(),{setValidityData:r,validate:i,validityData:a,validationDebounceTime:s,invalid:l,markedDirtyRef:u,state:d,shouldValidateOnChange:f,registeredFieldIdRef:m}=e,{controlId:y,getDescriptionProps:x}=v(),S=h(),C=A.useRef(null),w=o(()=>new Map).current,T=A.useRef(0),E=A.useCallback((e,t)=>(w.set(e,t),()=>{w.delete(e)}),[w]),D=g(()=>{let e=L(w,t.current);return e&&w.get(e)?.controlRef.current||null}),O=g(async(e,o=!1)=>{T.current+=1;let s=T.current;function c(e,t=l){let r=m.current??y;if(r==null)return;let i=n.current.fields.get(r);if(!i)return;let a=P(e,t);n.current.fields.set(r,{...i,validityData:a})}function p(t,n){let i={value:e,state:{..._,valid:!0},error:``,errors:[],initialValue:a.initialValue};R(t,w),c(i,n),r(i)}let h=w.size>0?L(w,t.current):C.current;if(o){if(d.valid!==!1||!h)return;let e=h.validity;if(!e.valueMissing){p(h,!1);return}for(let t of F)if(t!==`valid`&&t!==`valueMissing`&&t!==`customError`&&e[t])return}function g(e){let t=F.reduce((t,n)=>(t[n]=e.validity[n],t),{}),n=!1;for(let e of F)if(e!==`valid`){if(e===`valueMissing`&&t[e])n=!0;else if(t[e])return t}return n&&!u.current&&(t.valid=!0,t.valueMissing=!1),t}S.clear();let v=null,b=[],x=h?g(h):{..._,valid:!0},E,D=f();if(h&&h.validationMessage&&!D)E=h.validationMessage,b=[h.validationMessage];else{let t=Array.from(n.current.fields.values()).reduce((e,t)=>(t.name&&(e[t.name]=t.getValue()),e),{}),r=i(e,t);if(typeof r==`object`&&r&&`then`in r){if(v=await r,s!==T.current)return}else v=r;v===null?D&&(R(h,w),x.customError=!1,h&&h.validationMessage?(E=h.validationMessage,b=[h.validationMessage]):(!h||h.validity.valid)&&!x.valid&&(x.valid=!0)):(x.valid=!1,x.customError=!0,Array.isArray(v)?(b=v,h?.setCustomValidity(v.join(`
2
- `))):v&&(b=[v],h?.setCustomValidity(v)))}let O={value:e,state:x,error:E??(Array.isArray(v)?v[0]:v??``),errors:b,initialValue:a.initialValue};c(O),r(O)}),k=g(e=>{S.clear();let t=f();t&&e!==``&&s?(T.current+=1,S.start(s,()=>{O(e)})):O(e,!t)}),j=A.useCallback((e,t={})=>p(x(t),d.valid===!1&&!d.disabled&&!e?{"aria-invalid":!0}:c),[x,d.disabled,d.valid]);return A.useMemo(()=>({getValidationProps:j,inputRef:C,registeredInputs:w,registerInput:E,getInputControl:D,commit:O,change:k}),[j,w,E,D,O,k])}function ee(e){let{commit:t,invalid:n,markedDirtyRef:r,name:i,setRegisteredFieldName:o,registeredFieldIdRef:s,setValidityData:c,validityData:l}=e,{formRef:u}=b(),d=A.useRef(null),f=A.useRef(null),p=A.useRef(!1),m=g(()=>{let e=f.current;if(e)return e.getValue?e.getValue():e.value});function h(e){return e.value===void 0?m():e.value}let _=g(()=>{let e=f.current;if(r.current=!0,!e){t(l.value);return}t(h(e))});function v(){let e=f.current;!e||!e.id||u.current.fields.set(e.id,{getValue:m,name:i??e.name,controlRef:e.controlRef,validityData:P(l,n),validate:_})}function y(e=f.current?.id){e&&u.current.fields.delete(e)}function x(e){if(p.current)return;p.current=!0;let t=h(e);c(e=>e.initialValue===t?e:{...e,initialValue:t})}return a(()=>{let e=f.current;!e||!e.id||(o(i?void 0:e.name),u.current.fields.set(e.id,{getValue:m,name:i??e.name,controlRef:e.controlRef,validityData:P(l,n),validate:_}))},[u,m,n,i,o,_,l]),a(()=>{let e=u.current.fields;return()=>{let t=f.current?.id;t&&e.delete(t)}},[u]),[_,g((e,t)=>{if(!t){d.current===e&&(d.current=null,y(),f.current=null,o(void 0),s.current=void 0);return}let n=f.current?.id;d.current=e,f.current=t,i||o(t.name),s.current=t.id,n&&n!==t.id&&y(n),x(t),v()})]}var B=A.forwardRef(function(e,t){let{errors:n,validationMode:r,submitAttemptedRef:i}=b(),{render:o,className:s,validate:c,validationDebounceTime:u=0,validationMode:d=r,name:f,disabled:p=!1,invalid:m,dirty:h,touched:v,actionsRef:y,style:x,...S}=e,T=M(!0)?.disabled,E=g(c||(()=>null)),D=T||p,[O,j]=A.useState(!1),[N,P]=A.useState(!1),[F,I]=A.useState(!1),[L,R]=A.useState(!1),B=h??N,V=v??O,H=A.useRef(B),U=A.useRef(void 0),[te,ne]=A.useState(),W=f??te;a(()=>{h!==void 0&&(H.current=h)},[h]);let G=g(e=>{h===void 0&&(e&&(H.current=!0),P(e))}),K=g(e=>{v===void 0&&j(e)}),q=g(()=>d===`onChange`||d===`onSubmit`&&i.current),J=W&&Object.hasOwn(n,W)?n[W]:null,re=!!(Array.isArray(J)?J.length:J),Y=m===!0||re,[X,Z]=A.useState({state:_,error:``,errors:[],value:null,initialValue:null}),ie=!Y&&(D?null:X.state.valid),Q=A.useMemo(()=>({disabled:D,touched:V,dirty:B,valid:ie,filled:F,focused:L}),[D,V,B,ie,F,L]),$=z({setValidityData:Z,validate:E,validityData:X,validationDebounceTime:u,invalid:Y,markedDirtyRef:H,state:Q,shouldValidateOnChange:q,registeredFieldIdRef:U}),[ae,oe]=ee({commit:$.commit,invalid:Y,markedDirtyRef:H,name:f,setRegisteredFieldName:ne,registeredFieldIdRef:U,setValidityData:Z,validityData:X});A.useImperativeHandle(y,()=>({validate:ae}),[ae]);let se=A.useMemo(()=>({invalid:Y,name:W,validityData:X,setValidityData:Z,disabled:D,setTouched:K,setDirty:G,setFilled:I,setFocused:R,validationMode:d,shouldValidateOnChange:q,state:Q,registerFieldControl:oe,validation:$}),[Y,W,X,D,K,G,I,R,d,q,Q,oe,$]),ce=l(`div`,e,{ref:t,state:Q,props:S,stateAttributesMapping:w});return(0,k.jsx)(C.Provider,{value:se,children:ce})}),V=A.forwardRef(function(e,t){return(0,k.jsx)(N,{children:(0,k.jsx)(B,{...e,ref:t})})}),H=A.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,nativeLabel:o=!0,...s}=e,c=T(!1),u=E(),{labelId:d}=v(),f={...c.state,disabled:c.disabled||u.disabled},p=A.useRef(null),m=S({id:d??a,native:o});return l(`label`,e,{ref:[t,p],state:f,props:[m,s],stateAttributesMapping:w})}),U={...w,...m},te=A.forwardRef(function(e,t){let{render:n,id:r,className:i,match:o,style:s,...c}=e,d=u(r),{validityData:p,state:m,name:h}=T(!1),{setMessageIds:g}=v(),{errors:_}=b(),y=h&&Object.hasOwn(_,h)?_[h]:null,S=!!(Array.isArray(y)?y.length:y),C=typeof o==`string`,w=!1;w=o===!0?!0:m.disabled?!1:C?!!p.state[o]:S||p.state.valid===!1;let{mounted:E,transitionStatus:D,setMounted:O}=x(w);a(()=>{if(!(!w||!d))return g(e=>e.concat(d)),()=>{g(e=>e.filter(e=>e!==d))}},[w,d,g]);let j=A.useRef(null),[M,N]=A.useState(null),[P,F]=A.useState(null),I=p.error;!C&&S?I=y:p.errors.length>1&&(I=p.errors);let L=I;Array.isArray(I)&&(L=I.length>1?(0,k.jsx)(`ul`,{children:I.map(e=>(0,k.jsx)(`li`,{children:e},e))}):I[0]);let R=Array.isArray(I)?JSON.stringify(I):I;w&&R!==P&&(F(R),N(L)),f({open:w,ref:j,onComplete(){w||O(!1)}});let z={...m,transitionStatus:D},ee=l(`div`,e,{ref:[t,j],state:z,props:[{id:d,children:w?L:M},c],stateAttributesMapping:U,enabled:E});return E?ee:null}),ne=A.forwardRef(function(e,t){let{render:n,id:r,className:i,style:o,...s}=e,c=u(r),d=T(!1),f=E(),{setMessageIds:p}=v(),m={...d.state,disabled:d.disabled||f.disabled};return a(()=>{if(c)return p(e=>e.concat(c)),()=>{p(e=>e.filter(e=>e!==c))}},[c,p]),l(`p`,e,{ref:t,state:m,props:[{id:c},s],stateAttributesMapping:w})}),W=function(e){let{children:t}=e,{validityData:n,invalid:r}=T(!1),i=A.useMemo(()=>P(n,r),[n,r]),a=i.state.valid===!1,{transitionStatus:o}=x(a),s=A.useMemo(()=>({...i,validity:i.state,transitionStatus:o}),[i,o]);return(0,k.jsx)(A.Fragment,{children:t(s)})},G=A.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,...o}=e,{state:s,disabled:c}=T(!1),u=c||a,d={...s,disabled:u},f=A.useMemo(()=>({disabled:u}),[u]),p=l(`div`,e,{ref:t,state:d,props:o,stateAttributesMapping:w});return(0,k.jsx)(N,{children:(0,k.jsx)(D.Provider,{value:f,children:p})})});function K({className:e,uiSize:t=`md`,...n}){return d(),(0,k.jsx)(O,{...n,className:r(`tr-field-control`,e),"data-ui-size":t})}var q=i(ne,`tr-field-description`),J=i(te,`tr-field-error`),re=i(G,`tr-field-item`),Y=i(H,`tr-label`);function X({className:e,...t}){return(0,k.jsx)(V,{...t,className:r(`tr-field`,e)})}var Z={Root:X,Label:Y,Error:J,Description:q,Control:K,Validity:i(W,`tr-field-validity`),Item:re};export{j as n,M as r,Z as t};
@@ -1 +0,0 @@
1
- import{V as e}from"./select--ltVnlVl.js";var t=e(`fingerprint-pattern`,[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`,key:`1nerag`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`,key:`o46ks0`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`,key:`ptglia`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`,key:`ydlgp0`}],[`path`,{d:`M2 16h.01`,key:`1gqxmh`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`,key:`drycrb`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`,key:`1tidbn`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`,key:`13wd9y`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`,key:`1fr1j5`}]]);export{t};