@decocms/mesh 2.113.0 → 2.114.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 (209) hide show
  1. package/dist/client/assets/{AlertCircle-CooHa8Dx.js → AlertCircle-FL98lGLa.js} +1 -1
  2. package/dist/client/assets/{AlertOctagon-Dbg9uZyB.js → AlertOctagon-B33KdaLi.js} +1 -1
  3. package/dist/client/assets/{AlertTriangle-Ca8IB5bL.js → AlertTriangle-DteHmOG1.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-DIF2VO2W.js → ArrowLeft-CMuGBwkE.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-DgvOdNkG.js → ArrowUp-xougxkbC.js} +1 -1
  6. package/dist/client/assets/{Check-DGXJXTap.js → Check-BY-DCpO_.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-DDajcDWB.js → CheckCircle-CpXx2avT.js} +1 -1
  8. package/dist/client/assets/{CheckDone01-CnxPjvi4.js → CheckDone01-DJLuFHxJ.js} +1 -1
  9. package/dist/client/assets/{CheckVerified02-Iy-LVhoI.js → CheckVerified02-Cqu-AawR.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-Di42C1UO.js → ChevronDown-FdgQzkaa.js} +1 -1
  11. package/dist/client/assets/{ChevronRight-BNn59ko7.js → ChevronRight-DYxU3E_q.js} +1 -1
  12. package/dist/client/assets/{Clock-BLkZwDYw.js → Clock-Drw10Mc_.js} +1 -1
  13. package/dist/client/assets/{Code01-DooPA--K.js → Code01-CowHxp14.js} +1 -1
  14. package/dist/client/assets/{Container-C1CLnDNL.js → Container-B7qKC3EI.js} +1 -1
  15. package/dist/client/assets/{Copy01-rucQ3PSp.js → Copy01-B_7d0dwb.js} +1 -1
  16. package/dist/client/assets/{Dataflow03-DY9MPHye.js → Dataflow03-Cf4yDkKR.js} +1 -1
  17. package/dist/client/assets/{DotsHorizontal-CxkCXGJv.js → DotsHorizontal-CqtaWGEh.js} +1 -1
  18. package/dist/client/assets/{DotsVertical-NXfqoXCN.js → DotsVertical-qEJ2g9HJ.js} +1 -1
  19. package/dist/client/assets/{Download01-f5vnFohs.js → Download01-IPqVm26W.js} +1 -1
  20. package/dist/client/assets/{Edit01-CxGjhFGJ.js → Edit01-CUcmwNxC.js} +1 -1
  21. package/dist/client/assets/{Eye-CmK33jvc.js → Eye-Rq15dwoo.js} +1 -1
  22. package/dist/client/assets/{File02-Bs24RCQ6.js → File02-DPSlzBxh.js} +1 -1
  23. package/dist/client/assets/{File06-XfbhoM8r.js → File06-xsY7vCFb.js} +1 -1
  24. package/dist/client/assets/{FilterLines-Gpro-d22.js → FilterLines-CJgE2bmA.js} +1 -1
  25. package/dist/client/assets/{Globe01-CspKYhQJ.js → Globe01-BuKzbzrx.js} +1 -1
  26. package/dist/client/assets/{Globe02-DcNEoN4R.js → Globe02-BIRPCTiD.js} +1 -1
  27. package/dist/client/assets/{Grid01-DkGxNKPL.js → Grid01-CcUd9dpu.js} +1 -1
  28. package/dist/client/assets/{Hash02-DFSzHnWN.js → Hash02-BAkYwsUS.js} +1 -1
  29. package/dist/client/assets/{Home02-CccWHOVS.js → Home02-CyX62jfB.js} +1 -1
  30. package/dist/client/assets/{Image01-F0dDnjWb.js → Image01-CiGMIZf1.js} +1 -1
  31. package/dist/client/assets/{Inbox01-rhXjoTLG.js → Inbox01-CxlDy_Yy.js} +1 -1
  32. package/dist/client/assets/{InfoCircle-DDMndy6f.js → InfoCircle-BBQwzN3e.js} +1 -1
  33. package/dist/client/assets/{Key01-BoEk45CQ.js → Key01-CcfhRF0P.js} +1 -1
  34. package/dist/client/assets/{LinkExternal01-6fiITYn6.js → LinkExternal01-CHfE9mil.js} +1 -1
  35. package/dist/client/assets/{List-DLWOvAOP.js → List-BkcTlONj.js} +1 -1
  36. package/dist/client/assets/{Loading01-BGpLDRYx.js → Loading01-CWwskqmx.js} +1 -1
  37. package/dist/client/assets/{Lock01-CkEZCQ8T.js → Lock01-C-e30A69.js} +1 -1
  38. package/dist/client/assets/{Pin01-CSZOSQvf.js → Pin01-DNrhTTs3.js} +1 -1
  39. package/dist/client/assets/{Play-Ck339o9D.js → Play-sMJsBLST.js} +1 -1
  40. package/dist/client/assets/{Plus-BB0XqcsP.js → Plus-7gpDbhJy.js} +1 -1
  41. package/dist/client/assets/{RefreshCcw01-BlblCD0d.js → RefreshCcw01-BzY8N8T3.js} +1 -1
  42. package/dist/client/assets/{RefreshCw01-C2HUNviY.js → RefreshCw01-dI5kYugT.js} +1 -1
  43. package/dist/client/assets/{Save01-j7EMqYuR.js → Save01-C9jVAZgo.js} +1 -1
  44. package/dist/client/assets/{SearchMd-CguhhQVb.js → SearchMd-BMO4jqwv.js} +1 -1
  45. package/dist/client/assets/{Settings01-jz5w4e3w.js → Settings01-CRoxTuTO.js} +1 -1
  46. package/dist/client/assets/{Share07-DA5hMI-c.js → Share07-DFdDYoqj.js} +1 -1
  47. package/dist/client/assets/Shield01-DymehiLu.js +1 -0
  48. package/dist/client/assets/{Terminal-B6KzedA2.js → Terminal-zi42zfXM.js} +1 -1
  49. package/dist/client/assets/{Tool01-BPh57jnm.js → Tool01-lC4M_AmN.js} +1 -1
  50. package/dist/client/assets/{Trash01-DGjvH5rG.js → Trash01-BKhksYCP.js} +1 -1
  51. package/dist/client/assets/{Upload01-BWKtoN2l.js → Upload01-CorstXj2.js} +1 -1
  52. package/dist/client/assets/{Users03-DWNrz1Vr.js → Users03-B6oew679.js} +1 -1
  53. package/dist/client/assets/{XCircle-VzD2IKvZ.js → XCircle-WTPrrNWD.js} +1 -1
  54. package/dist/client/assets/{XClose-quksRQbf.js → XClose-DoKE29TG.js} +1 -1
  55. package/dist/client/assets/{agent-connections-preview-DO3HZtWQ.js → agent-connections-preview-DybZ18X5.js} +1 -1
  56. package/dist/client/assets/agent-detail-DncXhd81.js +1 -0
  57. package/dist/client/assets/agents-D-4jcSt1.js +1 -0
  58. package/dist/client/assets/{alert-dialog-BobozgbA.js → alert-dialog-Dm7Md3Yk.js} +1 -1
  59. package/dist/client/assets/{auth-catchall-Bg2u42FQ.js → auth-catchall-DHQTu60x.js} +1 -1
  60. package/dist/client/assets/avatar-B-mPVtLH.js +1 -0
  61. package/dist/client/assets/{badge-Ba42zrft.js → badge-Bt6C7wEJ.js} +1 -1
  62. package/dist/client/assets/{binder-XSlHh33G.js → binder-BvXUsKRF.js} +1 -1
  63. package/dist/client/assets/breadcrumb-Cipoy1eR.js +1 -0
  64. package/dist/client/assets/button-Bl7hMmCe.js +1 -0
  65. package/dist/client/assets/card-BMQBEGUR.js +1 -0
  66. package/dist/client/assets/{checkbox-BgqFPCG8.js → checkbox-C-nrBu1T.js} +1 -1
  67. package/dist/client/assets/{circle-alert-D1V0DFvr.js → circle-alert-DYoRV5F7.js} +1 -1
  68. package/dist/client/assets/{collection-detail-tuOZUkEg.js → collection-detail-x0pDfnG2.js} +3 -3
  69. package/dist/client/assets/{collection-tab-DpQw4w-_.js → collection-tab-CMJJpUjs.js} +1 -1
  70. package/dist/client/assets/{collection-table-wrapper-Dwsrv-is.js → collection-table-wrapper-DS44ibQ8.js} +1 -1
  71. package/dist/client/assets/{collection-tabs-BxPjmpup.js → collection-tabs-Dyc14WST.js} +1 -1
  72. package/dist/client/assets/{command-eII6FM4T.js → command-DGGP5Edh.js} +1 -1
  73. package/dist/client/assets/{connect-CjbgNw43.js → connect-BqPwKrDp.js} +1 -1
  74. package/dist/client/assets/{connection-card-B-vaA7In.js → connection-card-B_yTVrCB.js} +1 -1
  75. package/dist/client/assets/connection-detail-BHwcydrH.js +1 -0
  76. package/dist/client/assets/connections-C2FniOCy.js +1 -0
  77. package/dist/client/assets/constants-B9b2QjkO.js +1 -0
  78. package/dist/client/assets/{constants-DTZgxhQr.js → constants-DY_BU6PR.js} +1 -1
  79. package/dist/client/assets/{create-organization-dialog-_ENRfzh2.js → create-organization-dialog-BmtVHISe.js} +1 -1
  80. package/dist/client/assets/{create-project-dialog-CkoSW_Yw.js → create-project-dialog-DFYOBIMM.js} +1 -1
  81. package/dist/client/assets/dialog-BTs7spED.js +1 -0
  82. package/dist/client/assets/{dropdown-menu-DwhvTSoj.js → dropdown-menu-Dk3PdiLq.js} +1 -1
  83. package/dist/client/assets/dynamic-plugin-layout-C8tDNw7E.js +1 -0
  84. package/dist/client/assets/empty-state-BrrA9jzc.js +1 -0
  85. package/dist/client/assets/{empty-state-CUSdR_G_.js → empty-state-yzpNvfA-.js} +1 -1
  86. package/dist/client/assets/{env-vars-editor-CX-fJfxt.js → env-vars-editor-CxFtbjNH.js} +1 -1
  87. package/dist/client/assets/{error-boundary-Di0tQXdv.js → error-boundary-GB3TovJQ.js} +1 -1
  88. package/dist/client/assets/{extract-connection-data-Dd3BvcTW.js → extract-connection-data-Cjm6QMzJ.js} +1 -1
  89. package/dist/client/assets/{file-browser-CyYYn3HQ.js → file-browser-CeBgj9Bh.js} +2 -2
  90. package/dist/client/assets/{form-DIsigMsk.js → form-Dxe8J4dP.js} +1 -1
  91. package/dist/client/assets/{grid-view-BsAPFz5e.js → grid-view-qfkYjNIX.js} +1 -1
  92. package/dist/client/assets/{home-DoBwFvBu.js → home-C39nGjR7.js} +1 -1
  93. package/dist/client/assets/index-48TFsA2Q.css +1 -0
  94. package/dist/client/assets/{index-BVrm4rGn.js → index-B2KxLjHq.js} +1 -1
  95. package/dist/client/assets/{index-CMu5spRk.js → index-BOlMuTYA.js} +6 -6
  96. package/dist/client/assets/index-BrH9wXxf.js +1 -0
  97. package/dist/client/assets/{index-qSvnMMX3.js → index-BuPkfOh7.js} +1 -1
  98. package/dist/client/assets/{index-Cs0vYfu9.js → index-CLUeNS9F.js} +1 -1
  99. package/dist/client/assets/{index-DeBwK236.js → index-CSf23Q8F.js} +5 -5
  100. package/dist/client/assets/index-CzSiUwwv.js +218 -0
  101. package/dist/client/assets/{index-NEbz2HQu.js → index-DVHOzh7f.js} +1 -1
  102. package/dist/client/assets/{index-CDwFwb7Q.js → index-Dps5khDb.js} +1 -1
  103. package/dist/client/assets/{infiniteQueryObserver-DbZCUgr5.js → infiniteQueryObserver-Ctmp4byY.js} +1 -1
  104. package/dist/client/assets/{input-Cw77piS4.js → input-CAPxG1rh.js} +1 -1
  105. package/dist/client/assets/{integration-icon-D3fWRQzh.js → integration-icon-jbm4PmZt.js} +1 -1
  106. package/dist/client/assets/{label-CUy1x9Fc.js → label-A7ibpcPd.js} +1 -1
  107. package/dist/client/assets/{layout-BPYuOiPI.js → layout-DHncYg0M.js} +1 -1
  108. package/dist/client/assets/{localstorage-keys-DRPmjZks.js → localstorage-keys-Cc9e53sU.js} +1 -1
  109. package/dist/client/assets/{login-CUcM51_h.js → login-C4VFa6jD.js} +1 -1
  110. package/dist/client/assets/{markdown-BUX5ABnz.js → markdown-DTO-ngpn.js} +1 -1
  111. package/dist/client/assets/{mcp-oauth-Da77-kcD.js → mcp-oauth-lMxJpMMH.js} +1 -1
  112. package/dist/client/assets/{mcp-server-card-DcZS4AhS.js → mcp-server-card-C-sPhXVX.js} +1 -1
  113. package/dist/client/assets/mcp-server-detail-BtO9BwQ6.js +2 -0
  114. package/dist/client/assets/members-Dh31vMll.js +3 -0
  115. package/dist/client/assets/{monitoring-DINJ4pYy.js → monitoring-D0DgTEcy.js} +1 -1
  116. package/dist/client/assets/monitoring-dashboard-edit-DCcFalwQ.js +1 -0
  117. package/dist/client/assets/{monitoring-dashboard-view-B53vWJlZ.js → monitoring-dashboard-view-CuFcYaD_.js} +1 -1
  118. package/dist/client/assets/{oauth-callback-Dsqe_oXS.js → oauth-callback-DKWROL5U.js} +1 -1
  119. package/dist/client/assets/{page-BKBuf2HE.js → page-BpCfHp43.js} +1 -1
  120. package/dist/client/assets/page-CoIEp87I.js +1 -0
  121. package/dist/client/assets/{plugin-empty-state-D_Z6xsRD.js → plugin-empty-state-DMdw5AKa.js} +1 -1
  122. package/dist/client/assets/{plugin-empty-state-Cdi0lxlF.js → plugin-empty-state-DfPCNHNV.js} +1 -1
  123. package/dist/client/assets/{plugin-header-D_XJF06t.js → plugin-header-CVaBr8-j.js} +1 -1
  124. package/dist/client/assets/{plugin-header-DGLeYRv9.js → plugin-header-DqwJE7vc.js} +1 -1
  125. package/dist/client/assets/{popover-C8z2ljXJ.js → popover-Ca9Cyzf7.js} +1 -1
  126. package/dist/client/assets/{project-layout-gRYIrnzO.js → project-layout-F2YJOnzp.js} +1 -1
  127. package/dist/client/assets/project-settings-DwtLH_vq.js +1 -0
  128. package/dist/client/assets/projects-list-DPMlGsBe.js +1 -0
  129. package/dist/client/assets/{readme-viewer-DSTuLgLE.js → readme-viewer-D5RieYNW.js} +1 -1
  130. package/dist/client/assets/registry-layout-BrhYm9Dr.js +5 -0
  131. package/dist/client/assets/{registry-utils-D8FLO1oI.js → registry-utils--fif7P3x.js} +1 -1
  132. package/dist/client/assets/{reports-layout-NWBpDTNI.js → reports-layout-9yNTvI9o.js} +1 -1
  133. package/dist/client/assets/{reset-password-BEvAUHxp.js → reset-password-FRWYt8ap.js} +1 -1
  134. package/dist/client/assets/{resizable-Q_6VrAvM.js → resizable-DKtpdeB3.js} +1 -1
  135. package/dist/client/assets/{save-actions-DnatwzCI.js → save-actions-DH-J_-0b.js} +1 -1
  136. package/dist/client/assets/{scroll-area--Dl42eG7.js → scroll-area-BfJ2ZkbI.js} +1 -1
  137. package/dist/client/assets/{select-DmOdy-_2.js → select-CKDoCTJO.js} +1 -1
  138. package/dist/client/assets/shell-layout-DkuDKL8p.js +3 -0
  139. package/dist/client/assets/{spinner-BFe5KsON.js → spinner-B-FWJ8nx.js} +1 -1
  140. package/dist/client/assets/{store-invite-B6QzkY9D.js → store-invite-1HxdtnDC.js} +1 -1
  141. package/dist/client/assets/{switch-BTNdX6uT.js → switch-ySGmS6Zx.js} +1 -1
  142. package/dist/client/assets/{table-m7xKes0i.js → table-DGDNn7mH.js} +1 -1
  143. package/dist/client/assets/tasks-BuxJd7k9.js +1 -0
  144. package/dist/client/assets/{textarea-1ZAkAqPs.js → textarea-COGwSIgK.js} +1 -1
  145. package/dist/client/assets/{time-range-picker-S5DXdK6J.js → time-range-picker-hBuoR0m0.js} +1 -1
  146. package/dist/client/assets/{toggle-group-B4gd2g4g.js → toggle-group-RO8j2kDd.js} +1 -1
  147. package/dist/client/assets/{tools-list-BYJP7wdj.js → tools-list-CBpacE22.js} +1 -1
  148. package/dist/client/assets/tooltip-CLbmwjfd.js +1 -0
  149. package/dist/client/assets/topbar-portal-BHxVS8Tl.js +1 -0
  150. package/dist/client/assets/typewriter-title-C4OcGX3b.js +16 -0
  151. package/dist/client/assets/{use-binding-CAtjL1rr.js → use-binding-D36c91MK.js} +1 -1
  152. package/dist/client/assets/{use-connection-BRwTI0xk.js → use-connection-CdIwTzRh.js} +1 -1
  153. package/dist/client/assets/{use-copy-BnGNgGbL.js → use-copy-BZqI2HfR.js} +1 -1
  154. package/dist/client/assets/{use-create-virtual-mcp-BIn6DTPa.js → use-create-virtual-mcp-DKrayFIg.js} +1 -1
  155. package/dist/client/assets/{use-deco-chat-open-CWPuucLF.js → use-deco-chat-open-BuMsTBnv.js} +3 -3
  156. package/dist/client/assets/{use-install-from-registry-GZkHb-J_.js → use-install-from-registry-kn39eg4d.js} +1 -1
  157. package/dist/client/assets/{use-list-state-CLqJqhda.js → use-list-state-CYucxtoX.js} +1 -1
  158. package/dist/client/assets/{use-llm-BToIG9lg.js → use-llm-CX9QGbjZ.js} +1 -1
  159. package/dist/client/assets/{use-mcp-prompts-C28zFdyF.js → use-mcp-prompts-DMC1gnwj.js} +1 -1
  160. package/dist/client/assets/{use-mcp-tools-CnGq7c_h.js → use-mcp-tools-SZ1hgrkZ.js} +1 -1
  161. package/dist/client/assets/{use-organization-settings-BVsgnOKP.js → use-organization-settings-1mU06z41.js} +1 -1
  162. package/dist/client/assets/{use-project-pPGjnPtH.js → use-project-CsuhSK50.js} +1 -1
  163. package/dist/client/assets/use-view-mode-CVN4cPaD.js +1 -0
  164. package/dist/client/assets/{use-virtual-mcp-C67SrK4s.js → use-virtual-mcp-CqdRLJoL.js} +1 -1
  165. package/dist/client/assets/useInfiniteQuery-Bd_PpC7_.js +1 -0
  166. package/dist/client/assets/{useMutation-BLWSoXAi.js → useMutation-BYl8vvsl.js} +1 -1
  167. package/dist/client/assets/useQuery-CTct6gOY.js +1 -0
  168. package/dist/client/assets/useSuspenseInfiniteQuery-DJZPFUMY.js +1 -0
  169. package/dist/client/assets/workflow-CMJomw9A.js +1 -0
  170. package/dist/client/index.html +2 -2
  171. package/dist/server/cli.js +3 -3
  172. package/dist/server/migrate.js +3 -3
  173. package/dist/server/server.js +3 -3
  174. package/package.json +1 -1
  175. package/dist/client/assets/Settings02-BEGJoXOf.js +0 -1
  176. package/dist/client/assets/X-hlRWRdLd.js +0 -1
  177. package/dist/client/assets/agent-detail-Dm90C1dq.js +0 -1
  178. package/dist/client/assets/agents-Dp1lzRWx.js +0 -1
  179. package/dist/client/assets/avatar-DzNBuwvQ.js +0 -1
  180. package/dist/client/assets/breadcrumb-DVboj9hZ.js +0 -1
  181. package/dist/client/assets/button-BvpGJmwj.js +0 -1
  182. package/dist/client/assets/card-DUyr2anf.js +0 -1
  183. package/dist/client/assets/connection-detail-1_ZQMYvG.js +0 -1
  184. package/dist/client/assets/connections-DSsqgW7V.js +0 -1
  185. package/dist/client/assets/constants-BXsR0e2f.js +0 -1
  186. package/dist/client/assets/dialog-Djb2_yQ3.js +0 -1
  187. package/dist/client/assets/dynamic-plugin-layout-gS11xmZg.js +0 -1
  188. package/dist/client/assets/empty-state-CfAcFJ3T.js +0 -1
  189. package/dist/client/assets/index-hmLeN6Cx.css +0 -1
  190. package/dist/client/assets/index-p5ek_T2U.js +0 -218
  191. package/dist/client/assets/index-r3RmHcg-.js +0 -1
  192. package/dist/client/assets/mcp-server-detail-BsuSFuH9.js +0 -2
  193. package/dist/client/assets/members-Dt-WMWXs.js +0 -3
  194. package/dist/client/assets/monitoring-dashboard-edit-ViuWKC7f.js +0 -1
  195. package/dist/client/assets/page-BLmopBsr.js +0 -1
  196. package/dist/client/assets/project-settings-iakvSAMp.js +0 -1
  197. package/dist/client/assets/projects-list-BTf0o0Dw.js +0 -1
  198. package/dist/client/assets/registry-layout-D0ZI3R-w.js +0 -5
  199. package/dist/client/assets/shell-layout-DaVrqTvl.js +0 -12
  200. package/dist/client/assets/tasks-B817iTsv.js +0 -1
  201. package/dist/client/assets/tooltip-w4nyO9EM.js +0 -1
  202. package/dist/client/assets/topbar-portal-DFijBXBE.js +0 -1
  203. package/dist/client/assets/typewriter-title-fwTbDCyQ.js +0 -16
  204. package/dist/client/assets/use-mobile-Dl83qL71.js +0 -1
  205. package/dist/client/assets/use-view-mode-BC3VVzlU.js +0 -1
  206. package/dist/client/assets/useInfiniteQuery-CL1DQ1B_.js +0 -1
  207. package/dist/client/assets/useQuery-CoMTdc_B.js +0 -1
  208. package/dist/client/assets/useSuspenseInfiniteQuery-BEcP523_.js +0 -1
  209. package/dist/client/assets/workflow-D3d1tCTr.js +0 -1
@@ -1,218 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/file-browser-CyYYn3HQ.js","assets/topbar-portal-DFijBXBE.js","assets/useInfiniteQuery-CL1DQ1B_.js","assets/infiniteQueryObserver-DbZCUgr5.js","assets/button-BvpGJmwj.js","assets/checkbox-BgqFPCG8.js","assets/Check-DGXJXTap.js","assets/AlertCircle-CooHa8Dx.js","assets/ChevronRight-BNn59ko7.js","assets/Download01-f5vnFohs.js","assets/File02-Bs24RCQ6.js","assets/Grid01-DkGxNKPL.js","assets/Home02-CccWHOVS.js","assets/List-DLWOvAOP.js","assets/Loading01-BGpLDRYx.js","assets/Trash01-DGjvH5rG.js","assets/Upload01-BWKtoN2l.js","assets/useMutation-BLWSoXAi.js","assets/plugin-header-DGLeYRv9.js","assets/ChevronDown-Di42C1UO.js","assets/registry-layout-D0ZI3R-w.js","assets/CheckCircle-DDajcDWB.js","assets/Container-C1CLnDNL.js","assets/Settings01-jz5w4e3w.js","assets/useQuery-CoMTdc_B.js","assets/constants-DTZgxhQr.js","assets/badge-Ba42zrft.js","assets/input-Cw77piS4.js","assets/dropdown-menu-DwhvTSoj.js","assets/table-m7xKes0i.js","assets/toggle-group-B4gd2g4g.js","assets/use-view-mode-BC3VVzlU.js","assets/use-mobile-Dl83qL71.js","assets/DotsVertical-NXfqoXCN.js","assets/FilterLines-Gpro-d22.js","assets/Globe01-CspKYhQJ.js","assets/SearchMd-CguhhQVb.js","assets/dialog-Djb2_yQ3.js","assets/X-hlRWRdLd.js","assets/alert-dialog-BobozgbA.js","assets/card-DUyr2anf.js","assets/label-CUy1x9Fc.js","assets/select-DmOdy-_2.js","assets/index-CDwFwb7Q.js","assets/switch-BTNdX6uT.js","assets/textarea-1ZAkAqPs.js","assets/ArrowLeft-DIF2VO2W.js","assets/use-copy-BnGNgGbL.js","assets/RefreshCcw01-BlblCD0d.js","assets/Eye-CmK33jvc.js","assets/LinkExternal01-6fiITYn6.js","assets/XCircle-VzD2IKvZ.js","assets/use-connection-BRwTI0xk.js","assets/popover-C8z2ljXJ.js","assets/Copy01-rucQ3PSp.js","assets/Save01-j7EMqYuR.js","assets/Key01-BoEk45CQ.js","assets/Plus-BB0XqcsP.js","assets/tooltip-w4nyO9EM.js","assets/mcp-oauth-Da77-kcD.js","assets/Play-Ck339o9D.js","assets/reports-layout-NWBpDTNI.js","assets/binder-XSlHh33G.js","assets/CheckDone01-CnxPjvi4.js","assets/Clock-BLkZwDYw.js","assets/Inbox01-rhXjoTLG.js","assets/InfoCircle-DDMndy6f.js","assets/markdown-BUX5ABnz.js","assets/ArrowUp-DgvOdNkG.js","assets/CheckVerified02-Iy-LVhoI.js","assets/Hash02-DFSzHnWN.js","assets/plugin-header-D_XJF06t.js","assets/Dataflow03-DY9MPHye.js","assets/plugin-empty-state-Cdi0lxlF.js","assets/login-CUcM51_h.js","assets/reset-password-BEvAUHxp.js","assets/connect-CjbgNw43.js","assets/circle-alert-D1V0DFvr.js","assets/oauth-callback-Dsqe_oXS.js","assets/shell-layout-DaVrqTvl.js","assets/index-DeBwK236.js","assets/use-deco-chat-open-CWPuucLF.js","assets/use-virtual-mcp-C67SrK4s.js","assets/use-llm-BToIG9lg.js","assets/use-binding-CAtjL1rr.js","assets/localstorage-keys-DRPmjZks.js","assets/error-boundary-Di0tQXdv.js","assets/AlertTriangle-Ca8IB5bL.js","assets/File06-XfbhoM8r.js","assets/Image01-F0dDnjWb.js","assets/useSuspenseInfiniteQuery-BEcP523_.js","assets/spinner-BFe5KsON.js","assets/use-mcp-prompts-C28zFdyF.js","assets/form-DIsigMsk.js","assets/integration-icon-D3fWRQzh.js","assets/usage-B8eRkRZY.js","assets/Edit01-CxGjhFGJ.js","assets/Users03-DWNrz1Vr.js","assets/Code01-DooPA--K.js","assets/use-create-virtual-mcp-BIn6DTPa.js","assets/marked.esm-BaswSlok.js","assets/tools-list-BYJP7wdj.js","assets/collection-table-wrapper-Dwsrv-is.js","assets/empty-state-CUSdR_G_.js","assets/Globe02-DcNEoN4R.js","assets/RefreshCw01-C2HUNviY.js","assets/layout-BPYuOiPI.js","assets/index-r3RmHcg-.js","assets/generate-id-Dyweu44Y.js","assets/typewriter-title-fwTbDCyQ.js","assets/create-project-dialog-CkoSW_Yw.js","assets/use-project-pPGjnPtH.js","assets/avatar-DzNBuwvQ.js","assets/XClose-quksRQbf.js","assets/Settings02-BEGJoXOf.js","assets/create-organization-dialog-_ENRfzh2.js","assets/use-organization-settings-BVsgnOKP.js","assets/resizable-Q_6VrAvM.js","assets/home-DoBwFvBu.js","assets/project-layout-gRYIrnzO.js","assets/page-BLmopBsr.js","assets/Pin01-CSZOSQvf.js","assets/Share07-DA5hMI-c.js","assets/tasks-B817iTsv.js","assets/use-list-state-CLqJqhda.js","assets/format-time-CMKyl-GC.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/breadcrumb-DVboj9hZ.js","assets/AlertOctagon-Dbg9uZyB.js","assets/project-settings-iakvSAMp.js","assets/use-install-from-registry-GZkHb-J_.js","assets/extract-connection-data-Dd3BvcTW.js","assets/constants-BXsR0e2f.js","assets/github-icon-Dp3wHhYE.js","assets/registry-utils-D8FLO1oI.js","assets/projects-list-BTf0o0Dw.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/members-Dt-WMWXs.js","assets/command-eII6FM4T.js","assets/index-NEbz2HQu.js","assets/DotsHorizontal-CxkCXGJv.js","assets/Lock01-CkEZCQ8T.js","assets/connections-DSsqgW7V.js","assets/connection-card-B-vaA7In.js","assets/use-mcp-tools-CnGq7c_h.js","assets/Terminal-B6KzedA2.js","assets/env-vars-editor-CX-fJfxt.js","assets/connection-detail-1_ZQMYvG.js","assets/index-qSvnMMX3.js","assets/save-actions-DnatwzCI.js","assets/index-CMu5spRk.js","assets/index-BVrm4rGn.js","assets/collection-tabs-BxPjmpup.js","assets/collection-tab-DpQw4w-_.js","assets/empty-state-CfAcFJ3T.js","assets/readme-viewer-DSTuLgLE.js","assets/readme-viewer-DWnTz46N.css","assets/collection-detail-tuOZUkEg.js","assets/scroll-area--Dl42eG7.js","assets/Tool01-BPh57jnm.js","assets/monitoring-DINJ4pYy.js","assets/time-range-picker-S5DXdK6J.js","assets/monitoring-dashboard-view-B53vWJlZ.js","assets/monitoring-dashboard-edit-ViuWKC7f.js","assets/page-BKBuf2HE.js","assets/slugify-CEUa2lfQ.js","assets/mcp-server-card-DcZS4AhS.js","assets/mcp-server-detail-BsuSFuH9.js","assets/agents-Dp1lzRWx.js","assets/agent-connections-preview-DO3HZtWQ.js","assets/agent-detail-Dm90C1dq.js","assets/workflow-D3d1tCTr.js","assets/dynamic-plugin-layout-gS11xmZg.js"])))=>i.map(i=>d[i]);
2
- function JD(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(r,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const c of i.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();const e5="modulepreload",t5=function(e){return"/"+e},QR={},It=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let c=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=u?.nonce||u?.getAttribute("nonce");a=c(n.map(f=>{if(f=t5(f),f in QR)return;QR[f]=!0;const m=f.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const g=document.createElement("link");if(g.rel=m?"stylesheet":e5,m||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),m)return new Promise((y,w)=>{g.addEventListener("load",y),g.addEventListener("error",()=>w(Error(`Unable to preload CSS for ${f}`)))})}))}function i(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return a.then(c=>{for(const u of c||[])u.status==="rejected"&&i(u.reason);return t().catch(i)})};var joe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Za(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ey={exports:{}},gu={};var XR;function n5(){if(XR)return gu;XR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,i){var c=null;if(i!==void 0&&(c=""+i),a.key!==void 0&&(c=""+a.key),"key"in a){i={};for(var u in a)u!=="key"&&(i[u]=a[u])}else i=a;return a=i.ref,{$$typeof:e,type:r,key:c,ref:a!==void 0?a:null,props:i}}return gu.Fragment=t,gu.jsx=n,gu.jsxs=n,gu}var JR;function r5(){return JR||(JR=1,Ey.exports=n5()),Ey.exports}var x=r5(),Ry={exports:{}},vu={},xy={exports:{}},Ty={};var ex;function o5(){return ex||(ex=1,(function(e){function t(F,Y){var ie=F.length;F.push(Y);e:for(;0<ie;){var fe=ie-1>>>1,K=F[fe];if(0<a(K,Y))F[fe]=Y,F[ie]=K,ie=fe;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var Y=F[0],ie=F.pop();if(ie!==Y){F[0]=ie;e:for(var fe=0,K=F.length,D=K>>>1;fe<D;){var q=2*(fe+1)-1,B=F[q],L=q+1,z=F[L];if(0>a(B,ie))L<K&&0>a(z,B)?(F[fe]=z,F[L]=ie,fe=L):(F[fe]=B,F[q]=ie,fe=q);else if(L<K&&0>a(z,ie))F[fe]=z,F[L]=ie,fe=L;else break e}}return Y}function a(F,Y){var ie=F.sortIndex-Y.sortIndex;return ie!==0?ie:F.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var c=Date,u=c.now();e.unstable_now=function(){return c.now()-u}}var d=[],f=[],m=1,p=null,g=3,y=!1,w=!1,S=!1,b=!1,E=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function O(F){for(var Y=n(f);Y!==null;){if(Y.callback===null)r(f);else if(Y.startTime<=F)r(f),Y.sortIndex=Y.expirationTime,t(d,Y);else break;Y=n(f)}}function C(F){if(S=!1,O(F),!w)if(n(d)!==null)w=!0,I||(I=!0,G());else{var Y=n(f);Y!==null&&le(C,Y.startTime-F)}}var I=!1,N=-1,P=5,$=-1;function W(){return b?!0:!(e.unstable_now()-$<P)}function V(){if(b=!1,I){var F=e.unstable_now();$=F;var Y=!0;try{e:{w=!1,S&&(S=!1,R(N),N=-1),y=!0;var ie=g;try{t:{for(O(F),p=n(d);p!==null&&!(p.expirationTime>F&&W());){var fe=p.callback;if(typeof fe=="function"){p.callback=null,g=p.priorityLevel;var K=fe(p.expirationTime<=F);if(F=e.unstable_now(),typeof K=="function"){p.callback=K,O(F),Y=!0;break t}p===n(d)&&r(d),O(F)}else r(d);p=n(d)}if(p!==null)Y=!0;else{var D=n(f);D!==null&&le(C,D.startTime-F),Y=!1}}break e}finally{p=null,g=ie,y=!1}Y=void 0}}finally{Y?G():I=!1}}}var G;if(typeof T=="function")G=function(){T(V)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,J=U.port2;U.port1.onmessage=V,G=function(){J.postMessage(null)}}else G=function(){E(V,0)};function le(F,Y){N=E(function(){F(e.unstable_now())},Y)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(F){F.callback=null},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(F){switch(g){case 1:case 2:case 3:var Y=3;break;default:Y=g}var ie=g;g=Y;try{return F()}finally{g=ie}},e.unstable_requestPaint=function(){b=!0},e.unstable_runWithPriority=function(F,Y){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var ie=g;g=F;try{return Y()}finally{g=ie}},e.unstable_scheduleCallback=function(F,Y,ie){var fe=e.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?fe+ie:fe):ie=fe,F){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=ie+K,F={id:m++,callback:Y,priorityLevel:F,startTime:ie,expirationTime:K,sortIndex:-1},ie>fe?(F.sortIndex=ie,t(f,F),n(d)===null&&F===n(f)&&(S?(R(N),N=-1):S=!0,le(C,ie-fe))):(F.sortIndex=K,t(d,F),w||y||(w=!0,I||(I=!0,G()))),F},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(F){var Y=g;return function(){var ie=g;g=Y;try{return F.apply(this,arguments)}finally{g=ie}}}})(Ty)),Ty}var tx;function a5(){return tx||(tx=1,xy.exports=o5()),xy.exports}var Oy={exports:{}},tt={};var nx;function s5(){if(nx)return tt;nx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function y(D){return D===null||typeof D!="object"?null:(D=g&&D[g]||D["@@iterator"],typeof D=="function"?D:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,b={};function E(D,q,B){this.props=D,this.context=q,this.refs=b,this.updater=B||w}E.prototype.isReactComponent={},E.prototype.setState=function(D,q){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,q,"setState")},E.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function R(){}R.prototype=E.prototype;function T(D,q,B){this.props=D,this.context=q,this.refs=b,this.updater=B||w}var O=T.prototype=new R;O.constructor=T,S(O,E.prototype),O.isPureReactComponent=!0;var C=Array.isArray;function I(){}var N={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function $(D,q,B){var L=B.ref;return{$$typeof:e,type:D,key:q,ref:L!==void 0?L:null,props:B}}function W(D,q){return $(D.type,q,D.props)}function V(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function G(D){var q={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(B){return q[B]})}var U=/\/+/g;function J(D,q){return typeof D=="object"&&D!==null&&D.key!=null?G(""+D.key):q.toString(36)}function le(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(I,I):(D.status="pending",D.then(function(q){D.status==="pending"&&(D.status="fulfilled",D.value=q)},function(q){D.status==="pending"&&(D.status="rejected",D.reason=q)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function F(D,q,B,L,z){var Q=typeof D;(Q==="undefined"||Q==="boolean")&&(D=null);var me=!1;if(D===null)me=!0;else switch(Q){case"bigint":case"string":case"number":me=!0;break;case"object":switch(D.$$typeof){case e:case t:me=!0;break;case m:return me=D._init,F(me(D._payload),q,B,L,z)}}if(me)return z=z(D),me=L===""?"."+J(D,0):L,C(z)?(B="",me!=null&&(B=me.replace(U,"$&/")+"/"),F(z,q,B,"",function(Ie){return Ie})):z!=null&&(V(z)&&(z=W(z,B+(z.key==null||D&&D.key===z.key?"":(""+z.key).replace(U,"$&/")+"/")+me)),q.push(z)),1;me=0;var ve=L===""?".":L+":";if(C(D))for(var Ce=0;Ce<D.length;Ce++)L=D[Ce],Q=ve+J(L,Ce),me+=F(L,q,B,Q,z);else if(Ce=y(D),typeof Ce=="function")for(D=Ce.call(D),Ce=0;!(L=D.next()).done;)L=L.value,Q=ve+J(L,Ce++),me+=F(L,q,B,Q,z);else if(Q==="object"){if(typeof D.then=="function")return F(le(D),q,B,L,z);throw q=String(D),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return me}function Y(D,q,B){if(D==null)return D;var L=[],z=0;return F(D,L,"","",function(Q){return q.call(B,Q,z++)}),L}function ie(D){if(D._status===-1){var q=D._result;q=q(),q.then(function(B){(D._status===0||D._status===-1)&&(D._status=1,D._result=B)},function(B){(D._status===0||D._status===-1)&&(D._status=2,D._result=B)}),D._status===-1&&(D._status=0,D._result=q)}if(D._status===1)return D._result.default;throw D._result}var fe=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},K={map:Y,forEach:function(D,q,B){Y(D,function(){q.apply(this,arguments)},B)},count:function(D){var q=0;return Y(D,function(){q++}),q},toArray:function(D){return Y(D,function(q){return q})||[]},only:function(D){if(!V(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return tt.Activity=p,tt.Children=K,tt.Component=E,tt.Fragment=n,tt.Profiler=a,tt.PureComponent=T,tt.StrictMode=r,tt.Suspense=d,tt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,tt.__COMPILER_RUNTIME={__proto__:null,c:function(D){return N.H.useMemoCache(D)}},tt.cache=function(D){return function(){return D.apply(null,arguments)}},tt.cacheSignal=function(){return null},tt.cloneElement=function(D,q,B){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var L=S({},D.props),z=D.key;if(q!=null)for(Q in q.key!==void 0&&(z=""+q.key),q)!P.call(q,Q)||Q==="key"||Q==="__self"||Q==="__source"||Q==="ref"&&q.ref===void 0||(L[Q]=q[Q]);var Q=arguments.length-2;if(Q===1)L.children=B;else if(1<Q){for(var me=Array(Q),ve=0;ve<Q;ve++)me[ve]=arguments[ve+2];L.children=me}return $(D.type,z,L)},tt.createContext=function(D){return D={$$typeof:c,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:i,_context:D},D},tt.createElement=function(D,q,B){var L,z={},Q=null;if(q!=null)for(L in q.key!==void 0&&(Q=""+q.key),q)P.call(q,L)&&L!=="key"&&L!=="__self"&&L!=="__source"&&(z[L]=q[L]);var me=arguments.length-2;if(me===1)z.children=B;else if(1<me){for(var ve=Array(me),Ce=0;Ce<me;Ce++)ve[Ce]=arguments[Ce+2];z.children=ve}if(D&&D.defaultProps)for(L in me=D.defaultProps,me)z[L]===void 0&&(z[L]=me[L]);return $(D,Q,z)},tt.createRef=function(){return{current:null}},tt.forwardRef=function(D){return{$$typeof:u,render:D}},tt.isValidElement=V,tt.lazy=function(D){return{$$typeof:m,_payload:{_status:-1,_result:D},_init:ie}},tt.memo=function(D,q){return{$$typeof:f,type:D,compare:q===void 0?null:q}},tt.startTransition=function(D){var q=N.T,B={};N.T=B;try{var L=D(),z=N.S;z!==null&&z(B,L),typeof L=="object"&&L!==null&&typeof L.then=="function"&&L.then(I,fe)}catch(Q){fe(Q)}finally{q!==null&&B.types!==null&&(q.types=B.types),N.T=q}},tt.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},tt.use=function(D){return N.H.use(D)},tt.useActionState=function(D,q,B){return N.H.useActionState(D,q,B)},tt.useCallback=function(D,q){return N.H.useCallback(D,q)},tt.useContext=function(D){return N.H.useContext(D)},tt.useDebugValue=function(){},tt.useDeferredValue=function(D,q){return N.H.useDeferredValue(D,q)},tt.useEffect=function(D,q){return N.H.useEffect(D,q)},tt.useEffectEvent=function(D){return N.H.useEffectEvent(D)},tt.useId=function(){return N.H.useId()},tt.useImperativeHandle=function(D,q,B){return N.H.useImperativeHandle(D,q,B)},tt.useInsertionEffect=function(D,q){return N.H.useInsertionEffect(D,q)},tt.useLayoutEffect=function(D,q){return N.H.useLayoutEffect(D,q)},tt.useMemo=function(D,q){return N.H.useMemo(D,q)},tt.useOptimistic=function(D,q){return N.H.useOptimistic(D,q)},tt.useReducer=function(D,q,B){return N.H.useReducer(D,q,B)},tt.useRef=function(D){return N.H.useRef(D)},tt.useState=function(D){return N.H.useState(D)},tt.useSyncExternalStore=function(D,q,B){return N.H.useSyncExternalStore(D,q,B)},tt.useTransition=function(){return N.H.useTransition()},tt.version="19.2.4",tt}var rx;function Ws(){return rx||(rx=1,Oy.exports=s5()),Oy.exports}var Cy={exports:{}},hr={};var ox;function i5(){if(ox)return hr;ox=1;var e=Ws();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function i(d,f,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:p==null?null:""+p,children:d,containerInfo:f,implementation:m}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return hr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,hr.createPortal=function(d,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return i(d,f,null,m)},hr.flushSync=function(d){var f=c.T,m=r.p;try{if(c.T=null,r.p=2,d)return d()}finally{c.T=f,r.p=m,r.d.f()}},hr.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},hr.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},hr.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,p=u(m,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:y}):m==="script"&&r.d.X(d,{crossOrigin:p,integrity:g,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},hr.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=u(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},hr.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,p=u(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},hr.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=u(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},hr.requestFormReset=function(d){r.d.r(d)},hr.unstable_batchedUpdates=function(d,f){return d(f)},hr.useFormState=function(d,f,m){return c.H.useFormState(d,f,m)},hr.useFormStatus=function(){return c.H.useHostTransitionStatus()},hr.version="19.2.4",hr}var ax;function KC(){if(ax)return Cy.exports;ax=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Cy.exports=i5(),Cy.exports}var sx;function c5(){if(sx)return vu;sx=1;var e=a5(),t=Ws(),n=KC();function r(o){var s="https://react.dev/errors/"+o;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+o+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function i(o){var s=o,l=o;if(o.alternate)for(;s.return;)s=s.return;else{o=s;do s=o,(s.flags&4098)!==0&&(l=s.return),o=s.return;while(o)}return s.tag===3?l:null}function c(o){if(o.tag===13){var s=o.memoizedState;if(s===null&&(o=o.alternate,o!==null&&(s=o.memoizedState)),s!==null)return s.dehydrated}return null}function u(o){if(o.tag===31){var s=o.memoizedState;if(s===null&&(o=o.alternate,o!==null&&(s=o.memoizedState)),s!==null)return s.dehydrated}return null}function d(o){if(i(o)!==o)throw Error(r(188))}function f(o){var s=o.alternate;if(!s){if(s=i(o),s===null)throw Error(r(188));return s!==o?null:o}for(var l=o,h=s;;){var v=l.return;if(v===null)break;var _=v.alternate;if(_===null){if(h=v.return,h!==null){l=h;continue}break}if(v.child===_.child){for(_=v.child;_;){if(_===l)return d(v),o;if(_===h)return d(v),s;_=_.sibling}throw Error(r(188))}if(l.return!==h.return)l=v,h=_;else{for(var k=!1,j=v.child;j;){if(j===l){k=!0,l=v,h=_;break}if(j===h){k=!0,h=v,l=_;break}j=j.sibling}if(!k){for(j=_.child;j;){if(j===l){k=!0,l=_,h=v;break}if(j===h){k=!0,h=_,l=v;break}j=j.sibling}if(!k)throw Error(r(189))}}if(l.alternate!==h)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?o:s}function m(o){var s=o.tag;if(s===5||s===26||s===27||s===6)return o;for(o=o.child;o!==null;){if(s=m(o),s!==null)return s;o=o.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),T=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),W=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function G(o){return o===null||typeof o!="object"?null:(o=V&&o[V]||o["@@iterator"],typeof o=="function"?o:null)}var U=Symbol.for("react.client.reference");function J(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===U?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case S:return"Fragment";case E:return"Profiler";case b:return"StrictMode";case C:return"Suspense";case I:return"SuspenseList";case $:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case w:return"Portal";case T:return o.displayName||"Context";case R:return(o._context.displayName||"Context")+".Consumer";case O:var s=o.render;return o=o.displayName,o||(o=s.displayName||s.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case N:return s=o.displayName||null,s!==null?s:J(o.type)||"Memo";case P:s=o._payload,o=o._init;try{return J(o(s))}catch{}}return null}var le=Array.isArray,F=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},fe=[],K=-1;function D(o){return{current:o}}function q(o){0>K||(o.current=fe[K],fe[K]=null,K--)}function B(o,s){K++,fe[K]=o.current,o.current=s}var L=D(null),z=D(null),Q=D(null),me=D(null);function ve(o,s){switch(B(Q,s),B(z,o),B(L,null),s.nodeType){case 9:case 11:o=(o=s.documentElement)&&(o=o.namespaceURI)?bR(o):0;break;default:if(o=s.tagName,s=s.namespaceURI)s=bR(s),o=wR(s,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}q(L),B(L,o)}function Ce(){q(L),q(z),q(Q)}function Ie(o){o.memoizedState!==null&&B(me,o);var s=L.current,l=wR(s,o.type);s!==l&&(B(z,o),B(L,l))}function H(o){z.current===o&&(q(L),q(z)),me.current===o&&(q(me),fu._currentValue=ie)}var re,be;function se(o){if(re===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);re=s&&s[1]||"",be=-1<l.stack.indexOf(`
3
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
4
- `+re+o+be}var ue=!1;function Oe(o,s){if(!o||ue)return"";ue=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(s){var Te=function(){throw Error()};if(Object.defineProperty(Te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Te,[])}catch(ge){var pe=ge}Reflect.construct(o,[],Te)}else{try{Te.call()}catch(ge){pe=ge}o.call(Te.prototype)}}else{try{throw Error()}catch(ge){pe=ge}(Te=o())&&typeof Te.catch=="function"&&Te.catch(function(){})}}catch(ge){if(ge&&pe&&typeof ge.stack=="string")return[ge.stack,pe.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _=h.DetermineComponentFrameRoot(),k=_[0],j=_[1];if(k&&j){var X=k.split(`
5
- `),he=j.split(`
6
- `);for(v=h=0;h<X.length&&!X[h].includes("DetermineComponentFrameRoot");)h++;for(;v<he.length&&!he[v].includes("DetermineComponentFrameRoot");)v++;if(h===X.length||v===he.length)for(h=X.length-1,v=he.length-1;1<=h&&0<=v&&X[h]!==he[v];)v--;for(;1<=h&&0<=v;h--,v--)if(X[h]!==he[v]){if(h!==1||v!==1)do if(h--,v--,0>v||X[h]!==he[v]){var we=`
7
- `+X[h].replace(" at new "," at ");return o.displayName&&we.includes("<anonymous>")&&(we=we.replace("<anonymous>",o.displayName)),we}while(1<=h&&0<=v);break}}}finally{ue=!1,Error.prepareStackTrace=l}return(l=o?o.displayName||o.name:"")?se(l):""}function Le(o,s){switch(o.tag){case 26:case 27:case 5:return se(o.type);case 16:return se("Lazy");case 13:return o.child!==s&&s!==null?se("Suspense Fallback"):se("Suspense");case 19:return se("SuspenseList");case 0:case 15:return Oe(o.type,!1);case 11:return Oe(o.type.render,!1);case 1:return Oe(o.type,!0);case 31:return se("Activity");default:return""}}function Xe(o){try{var s="",l=null;do s+=Le(o,l),l=o,o=o.return;while(o);return s}catch(h){return`
8
- Error generating stack: `+h.message+`
9
- `+h.stack}}var Be=Object.prototype.hasOwnProperty,Ke=e.unstable_scheduleCallback,Z=e.unstable_cancelCallback,te=e.unstable_shouldYield,oe=e.unstable_requestPaint,Se=e.unstable_now,xe=e.unstable_getCurrentPriorityLevel,Re=e.unstable_ImmediatePriority,ke=e.unstable_UserBlockingPriority,Je=e.unstable_NormalPriority,at=e.unstable_LowPriority,kt=e.unstable_IdlePriority,dr=e.log,nn=e.unstable_setDisableYieldValue,Rn=null,rn=null;function jn(o){if(typeof dr=="function"&&nn(o),rn&&typeof rn.setStrictMode=="function")try{rn.setStrictMode(Rn,o)}catch{}}var xn=Math.clz32?Math.clz32:qe,Qa=Math.log,va=Math.LN2;function qe(o){return o>>>=0,o===0?32:31-(Qa(o)/va|0)|0}var St=256,Ct=262144,ut=4194304;function Mt(o){var s=o&42;if(s!==0)return s;switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function He(o,s,l){var h=o.pendingLanes;if(h===0)return 0;var v=0,_=o.suspendedLanes,k=o.pingedLanes;o=o.warmLanes;var j=h&134217727;return j!==0?(h=j&~_,h!==0?v=Mt(h):(k&=j,k!==0?v=Mt(k):l||(l=j&~o,l!==0&&(v=Mt(l))))):(j=h&~_,j!==0?v=Mt(j):k!==0?v=Mt(k):l||(l=h&~o,l!==0&&(v=Mt(l)))),v===0?0:s!==0&&s!==v&&(s&_)===0&&(_=v&-v,l=s&-s,_>=l||_===32&&(l&4194048)!==0)?s:v}function dt(o,s){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&s)===0}function Qt(o,s){switch(o){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Gt(){var o=ut;return ut<<=1,(ut&62914560)===0&&(ut=4194304),o}function fr(o){for(var s=[],l=0;31>l;l++)s.push(o);return s}function Pt(o,s){o.pendingLanes|=s,s!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function on(o,s,l,h,v,_){var k=o.pendingLanes;o.pendingLanes=l,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=l,o.entangledLanes&=l,o.errorRecoveryDisabledLanes&=l,o.shellSuspendCounter=0;var j=o.entanglements,X=o.expirationTimes,he=o.hiddenUpdates;for(l=k&~l;0<l;){var we=31-xn(l),Te=1<<we;j[we]=0,X[we]=-1;var pe=he[we];if(pe!==null)for(he[we]=null,we=0;we<pe.length;we++){var ge=pe[we];ge!==null&&(ge.lane&=-536870913)}l&=~Te}h!==0&&ao(o,h,0),_!==0&&v===0&&o.tag!==0&&(o.suspendedLanes|=_&~(k&~s))}function ao(o,s,l){o.pendingLanes|=s,o.suspendedLanes&=~s;var h=31-xn(s);o.entangledLanes|=s,o.entanglements[h]=o.entanglements[h]|1073741824|l&261930}function Yn(o,s){var l=o.entangledLanes|=s;for(o=o.entanglements;l;){var h=31-xn(l),v=1<<h;v&s|o[h]&s&&(o[h]|=s),l&=~v}}function xr(o,s){var l=s&-s;return l=(l&42)!==0?1:Zi(l),(l&(o.suspendedLanes|s))!==0?0:l}function Zi(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function Ao(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function hg(){var o=Y.p;return o!==0?o:(o=window.event,o===void 0?32:qR(o.type))}function sw(o,s){var l=Y.p;try{return Y.p=o,s()}finally{Y.p=l}}var Xa=Math.random().toString(36).slice(2),Qn="__reactFiber$"+Xa,Tr="__reactProps$"+Xa,Wi="__reactContainer$"+Xa,pg="__reactEvents$"+Xa,FP="__reactListeners$"+Xa,BP="__reactHandles$"+Xa,iw="__reactResources$"+Xa,Ol="__reactMarker$"+Xa;function mg(o){delete o[Qn],delete o[Tr],delete o[pg],delete o[FP],delete o[BP]}function Ki(o){var s=o[Qn];if(s)return s;for(var l=o.parentNode;l;){if(s=l[Wi]||l[Qn]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(o=CR(o);o!==null;){if(l=o[Qn])return l;o=CR(o)}return s}o=l,l=o.parentNode}return null}function Yi(o){if(o=o[Qn]||o[Wi]){var s=o.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return o}return null}function Cl(o){var s=o.tag;if(s===5||s===26||s===27||s===6)return o.stateNode;throw Error(r(33))}function Qi(o){var s=o[iw];return s||(s=o[iw]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function qn(o){o[Ol]=!0}var cw=new Set,lw={};function ti(o,s){Xi(o,s),Xi(o+"Capture",s)}function Xi(o,s){for(lw[o]=s,o=0;o<s.length;o++)cw.add(s[o])}var qP=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),uw={},dw={};function HP(o){return Be.call(dw,o)?!0:Be.call(uw,o)?!1:qP.test(o)?dw[o]=!0:(uw[o]=!0,!1)}function Ud(o,s,l){if(HP(s))if(l===null)o.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":o.removeAttribute(s);return;case"boolean":var h=s.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){o.removeAttribute(s);return}}o.setAttribute(s,""+l)}}function zd(o,s,l){if(l===null)o.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(s);return}o.setAttribute(s,""+l)}}function ya(o,s,l,h){if(h===null)o.removeAttribute(l);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(l);return}o.setAttributeNS(s,l,""+h)}}function so(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function fw(o){var s=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function GP(o,s,l){var h=Object.getOwnPropertyDescriptor(o.constructor.prototype,s);if(!o.hasOwnProperty(s)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var v=h.get,_=h.set;return Object.defineProperty(o,s,{configurable:!0,get:function(){return v.call(this)},set:function(k){l=""+k,_.call(this,k)}}),Object.defineProperty(o,s,{enumerable:h.enumerable}),{getValue:function(){return l},setValue:function(k){l=""+k},stopTracking:function(){o._valueTracker=null,delete o[s]}}}}function gg(o){if(!o._valueTracker){var s=fw(o)?"checked":"value";o._valueTracker=GP(o,s,""+o[s])}}function hw(o){if(!o)return!1;var s=o._valueTracker;if(!s)return!0;var l=s.getValue(),h="";return o&&(h=fw(o)?o.checked?"true":"false":o.value),o=h,o!==l?(s.setValue(o),!0):!1}function Vd(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var ZP=/[\n"\\]/g;function io(o){return o.replace(ZP,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function vg(o,s,l,h,v,_,k,j){o.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?o.type=k:o.removeAttribute("type"),s!=null?k==="number"?(s===0&&o.value===""||o.value!=s)&&(o.value=""+so(s)):o.value!==""+so(s)&&(o.value=""+so(s)):k!=="submit"&&k!=="reset"||o.removeAttribute("value"),s!=null?yg(o,k,so(s)):l!=null?yg(o,k,so(l)):h!=null&&o.removeAttribute("value"),v==null&&_!=null&&(o.defaultChecked=!!_),v!=null&&(o.checked=v&&typeof v!="function"&&typeof v!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?o.name=""+so(j):o.removeAttribute("name")}function pw(o,s,l,h,v,_,k,j){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(o.type=_),s!=null||l!=null){if(!(_!=="submit"&&_!=="reset"||s!=null)){gg(o);return}l=l!=null?""+so(l):"",s=s!=null?""+so(s):l,j||s===o.value||(o.value=s),o.defaultValue=s}h=h??v,h=typeof h!="function"&&typeof h!="symbol"&&!!h,o.checked=j?o.checked:!!h,o.defaultChecked=!!h,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(o.name=k),gg(o)}function yg(o,s,l){s==="number"&&Vd(o.ownerDocument)===o||o.defaultValue===""+l||(o.defaultValue=""+l)}function Ji(o,s,l,h){if(o=o.options,s){s={};for(var v=0;v<l.length;v++)s["$"+l[v]]=!0;for(l=0;l<o.length;l++)v=s.hasOwnProperty("$"+o[l].value),o[l].selected!==v&&(o[l].selected=v),v&&h&&(o[l].defaultSelected=!0)}else{for(l=""+so(l),s=null,v=0;v<o.length;v++){if(o[v].value===l){o[v].selected=!0,h&&(o[v].defaultSelected=!0);return}s!==null||o[v].disabled||(s=o[v])}s!==null&&(s.selected=!0)}}function mw(o,s,l){if(s!=null&&(s=""+so(s),s!==o.value&&(o.value=s),l==null)){o.defaultValue!==s&&(o.defaultValue=s);return}o.defaultValue=l!=null?""+so(l):""}function gw(o,s,l,h){if(s==null){if(h!=null){if(l!=null)throw Error(r(92));if(le(h)){if(1<h.length)throw Error(r(93));h=h[0]}l=h}l==null&&(l=""),s=l}l=so(s),o.defaultValue=l,h=o.textContent,h===l&&h!==""&&h!==null&&(o.value=h),gg(o)}function ec(o,s){if(s){var l=o.firstChild;if(l&&l===o.lastChild&&l.nodeType===3){l.nodeValue=s;return}}o.textContent=s}var WP=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function vw(o,s,l){var h=s.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?h?o.setProperty(s,""):s==="float"?o.cssFloat="":o[s]="":h?o.setProperty(s,l):typeof l!="number"||l===0||WP.has(s)?s==="float"?o.cssFloat=l:o[s]=(""+l).trim():o[s]=l+"px"}function yw(o,s,l){if(s!=null&&typeof s!="object")throw Error(r(62));if(o=o.style,l!=null){for(var h in l)!l.hasOwnProperty(h)||s!=null&&s.hasOwnProperty(h)||(h.indexOf("--")===0?o.setProperty(h,""):h==="float"?o.cssFloat="":o[h]="");for(var v in s)h=s[v],s.hasOwnProperty(v)&&l[v]!==h&&vw(o,v,h)}else for(var _ in s)s.hasOwnProperty(_)&&vw(o,_,s[_])}function _g(o){if(o.indexOf("-")===-1)return!1;switch(o){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var KP=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),YP=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Fd(o){return YP.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function _a(){}var bg=null;function wg(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var tc=null,nc=null;function _w(o){var s=Yi(o);if(s&&(o=s.stateNode)){var l=o[Tr]||null;e:switch(o=s.stateNode,s.type){case"input":if(vg(o,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),s=l.name,l.type==="radio"&&s!=null){for(l=o;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+io(""+s)+'"][type="radio"]'),s=0;s<l.length;s++){var h=l[s];if(h!==o&&h.form===o.form){var v=h[Tr]||null;if(!v)throw Error(r(90));vg(h,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(s=0;s<l.length;s++)h=l[s],h.form===o.form&&hw(h)}break e;case"textarea":mw(o,l.value,l.defaultValue);break e;case"select":s=l.value,s!=null&&Ji(o,!!l.multiple,s,!1)}}}var Sg=!1;function bw(o,s,l){if(Sg)return o(s,l);Sg=!0;try{var h=o(s);return h}finally{if(Sg=!1,(tc!==null||nc!==null)&&(If(),tc&&(s=tc,o=nc,nc=tc=null,_w(s),o)))for(s=0;s<o.length;s++)_w(o[s])}}function Al(o,s){var l=o.stateNode;if(l===null)return null;var h=l[Tr]||null;if(h===null)return null;l=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(o=o.type,h=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!h;break e;default:o=!1}if(o)return null;if(l&&typeof l!="function")throw Error(r(231,s,typeof l));return l}var ba=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Eg=!1;if(ba)try{var Il={};Object.defineProperty(Il,"passive",{get:function(){Eg=!0}}),window.addEventListener("test",Il,Il),window.removeEventListener("test",Il,Il)}catch{Eg=!1}var Ja=null,Rg=null,Bd=null;function ww(){if(Bd)return Bd;var o,s=Rg,l=s.length,h,v="value"in Ja?Ja.value:Ja.textContent,_=v.length;for(o=0;o<l&&s[o]===v[o];o++);var k=l-o;for(h=1;h<=k&&s[l-h]===v[_-h];h++);return Bd=v.slice(o,1<h?1-h:void 0)}function qd(o){var s=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&s===13&&(o=13)):o=s,o===10&&(o=13),32<=o||o===13?o:0}function Hd(){return!0}function Sw(){return!1}function Or(o){function s(l,h,v,_,k){this._reactName=l,this._targetInst=v,this.type=h,this.nativeEvent=_,this.target=k,this.currentTarget=null;for(var j in o)o.hasOwnProperty(j)&&(l=o[j],this[j]=l?l(_):_[j]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?Hd:Sw,this.isPropagationStopped=Sw,this}return p(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Hd)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Hd)},persist:function(){},isPersistent:Hd}),s}var ni={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gd=Or(ni),Nl=p({},ni,{view:0,detail:0}),QP=Or(Nl),xg,Tg,kl,Zd=p({},Nl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cg,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==kl&&(kl&&o.type==="mousemove"?(xg=o.screenX-kl.screenX,Tg=o.screenY-kl.screenY):Tg=xg=0,kl=o),xg)},movementY:function(o){return"movementY"in o?o.movementY:Tg}}),Ew=Or(Zd),XP=p({},Zd,{dataTransfer:0}),JP=Or(XP),e3=p({},Nl,{relatedTarget:0}),Og=Or(e3),t3=p({},ni,{animationName:0,elapsedTime:0,pseudoElement:0}),n3=Or(t3),r3=p({},ni,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),o3=Or(r3),a3=p({},ni,{data:0}),Rw=Or(a3),s3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i3={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},c3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function l3(o){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(o):(o=c3[o])?!!s[o]:!1}function Cg(){return l3}var u3=p({},Nl,{key:function(o){if(o.key){var s=s3[o.key]||o.key;if(s!=="Unidentified")return s}return o.type==="keypress"?(o=qd(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?i3[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cg,charCode:function(o){return o.type==="keypress"?qd(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?qd(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),d3=Or(u3),f3=p({},Zd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xw=Or(f3),h3=p({},Nl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cg}),p3=Or(h3),m3=p({},ni,{propertyName:0,elapsedTime:0,pseudoElement:0}),g3=Or(m3),v3=p({},Zd,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),y3=Or(v3),_3=p({},ni,{newState:0,oldState:0}),b3=Or(_3),w3=[9,13,27,32],Ag=ba&&"CompositionEvent"in window,Ml=null;ba&&"documentMode"in document&&(Ml=document.documentMode);var S3=ba&&"TextEvent"in window&&!Ml,Tw=ba&&(!Ag||Ml&&8<Ml&&11>=Ml),Ow=" ",Cw=!1;function Aw(o,s){switch(o){case"keyup":return w3.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Iw(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var rc=!1;function E3(o,s){switch(o){case"compositionend":return Iw(s);case"keypress":return s.which!==32?null:(Cw=!0,Ow);case"textInput":return o=s.data,o===Ow&&Cw?null:o;default:return null}}function R3(o,s){if(rc)return o==="compositionend"||!Ag&&Aw(o,s)?(o=ww(),Bd=Rg=Ja=null,rc=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Tw&&s.locale!=="ko"?null:s.data;default:return null}}var x3={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Nw(o){var s=o&&o.nodeName&&o.nodeName.toLowerCase();return s==="input"?!!x3[o.type]:s==="textarea"}function kw(o,s,l,h){tc?nc?nc.push(h):nc=[h]:tc=h,s=jf(s,"onChange"),0<s.length&&(l=new Gd("onChange","change",null,l,h),o.push({event:l,listeners:s}))}var Pl=null,Dl=null;function T3(o){pR(o,0)}function Wd(o){var s=Cl(o);if(hw(s))return o}function Mw(o,s){if(o==="change")return s}var Pw=!1;if(ba){var Ig;if(ba){var Ng="oninput"in document;if(!Ng){var Dw=document.createElement("div");Dw.setAttribute("oninput","return;"),Ng=typeof Dw.oninput=="function"}Ig=Ng}else Ig=!1;Pw=Ig&&(!document.documentMode||9<document.documentMode)}function Lw(){Pl&&(Pl.detachEvent("onpropertychange",jw),Dl=Pl=null)}function jw(o){if(o.propertyName==="value"&&Wd(Dl)){var s=[];kw(s,Dl,o,wg(o)),bw(T3,s)}}function O3(o,s,l){o==="focusin"?(Lw(),Pl=s,Dl=l,Pl.attachEvent("onpropertychange",jw)):o==="focusout"&&Lw()}function C3(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Wd(Dl)}function A3(o,s){if(o==="click")return Wd(s)}function I3(o,s){if(o==="input"||o==="change")return Wd(s)}function N3(o,s){return o===s&&(o!==0||1/o===1/s)||o!==o&&s!==s}var zr=typeof Object.is=="function"?Object.is:N3;function Ll(o,s){if(zr(o,s))return!0;if(typeof o!="object"||o===null||typeof s!="object"||s===null)return!1;var l=Object.keys(o),h=Object.keys(s);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var v=l[h];if(!Be.call(s,v)||!zr(o[v],s[v]))return!1}return!0}function $w(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function Uw(o,s){var l=$w(o);o=0;for(var h;l;){if(l.nodeType===3){if(h=o+l.textContent.length,o<=s&&h>=s)return{node:l,offset:s-o};o=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=$w(l)}}function zw(o,s){return o&&s?o===s?!0:o&&o.nodeType===3?!1:s&&s.nodeType===3?zw(o,s.parentNode):"contains"in o?o.contains(s):o.compareDocumentPosition?!!(o.compareDocumentPosition(s)&16):!1:!1}function Vw(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var s=Vd(o.document);s instanceof o.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch{l=!1}if(l)o=s.contentWindow;else break;s=Vd(o.document)}return s}function kg(o){var s=o&&o.nodeName&&o.nodeName.toLowerCase();return s&&(s==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||s==="textarea"||o.contentEditable==="true")}var k3=ba&&"documentMode"in document&&11>=document.documentMode,oc=null,Mg=null,jl=null,Pg=!1;function Fw(o,s,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Pg||oc==null||oc!==Vd(h)||(h=oc,"selectionStart"in h&&kg(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),jl&&Ll(jl,h)||(jl=h,h=jf(Mg,"onSelect"),0<h.length&&(s=new Gd("onSelect","select",null,s,l),o.push({event:s,listeners:h}),s.target=oc)))}function ri(o,s){var l={};return l[o.toLowerCase()]=s.toLowerCase(),l["Webkit"+o]="webkit"+s,l["Moz"+o]="moz"+s,l}var ac={animationend:ri("Animation","AnimationEnd"),animationiteration:ri("Animation","AnimationIteration"),animationstart:ri("Animation","AnimationStart"),transitionrun:ri("Transition","TransitionRun"),transitionstart:ri("Transition","TransitionStart"),transitioncancel:ri("Transition","TransitionCancel"),transitionend:ri("Transition","TransitionEnd")},Dg={},Bw={};ba&&(Bw=document.createElement("div").style,"AnimationEvent"in window||(delete ac.animationend.animation,delete ac.animationiteration.animation,delete ac.animationstart.animation),"TransitionEvent"in window||delete ac.transitionend.transition);function oi(o){if(Dg[o])return Dg[o];if(!ac[o])return o;var s=ac[o],l;for(l in s)if(s.hasOwnProperty(l)&&l in Bw)return Dg[o]=s[l];return o}var qw=oi("animationend"),Hw=oi("animationiteration"),Gw=oi("animationstart"),M3=oi("transitionrun"),P3=oi("transitionstart"),D3=oi("transitioncancel"),Zw=oi("transitionend"),Ww=new Map,Lg="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Lg.push("scrollEnd");function Io(o,s){Ww.set(o,s),ti(s,[o])}var Kd=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},co=[],sc=0,jg=0;function Yd(){for(var o=sc,s=jg=sc=0;s<o;){var l=co[s];co[s++]=null;var h=co[s];co[s++]=null;var v=co[s];co[s++]=null;var _=co[s];if(co[s++]=null,h!==null&&v!==null){var k=h.pending;k===null?v.next=v:(v.next=k.next,k.next=v),h.pending=v}_!==0&&Kw(l,v,_)}}function Qd(o,s,l,h){co[sc++]=o,co[sc++]=s,co[sc++]=l,co[sc++]=h,jg|=h,o.lanes|=h,o=o.alternate,o!==null&&(o.lanes|=h)}function $g(o,s,l,h){return Qd(o,s,l,h),Xd(o)}function ai(o,s){return Qd(o,null,null,s),Xd(o)}function Kw(o,s,l){o.lanes|=l;var h=o.alternate;h!==null&&(h.lanes|=l);for(var v=!1,_=o.return;_!==null;)_.childLanes|=l,h=_.alternate,h!==null&&(h.childLanes|=l),_.tag===22&&(o=_.stateNode,o===null||o._visibility&1||(v=!0)),o=_,_=_.return;return o.tag===3?(_=o.stateNode,v&&s!==null&&(v=31-xn(l),o=_.hiddenUpdates,h=o[v],h===null?o[v]=[s]:h.push(s),s.lane=l|536870912),_):null}function Xd(o){if(50<au)throw au=0,Zv=null,Error(r(185));for(var s=o.return;s!==null;)o=s,s=o.return;return o.tag===3?o.stateNode:null}var ic={};function L3(o,s,l,h){this.tag=o,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vr(o,s,l,h){return new L3(o,s,l,h)}function Ug(o){return o=o.prototype,!(!o||!o.isReactComponent)}function wa(o,s){var l=o.alternate;return l===null?(l=Vr(o.tag,s,o.key,o.mode),l.elementType=o.elementType,l.type=o.type,l.stateNode=o.stateNode,l.alternate=o,o.alternate=l):(l.pendingProps=s,l.type=o.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=o.flags&65011712,l.childLanes=o.childLanes,l.lanes=o.lanes,l.child=o.child,l.memoizedProps=o.memoizedProps,l.memoizedState=o.memoizedState,l.updateQueue=o.updateQueue,s=o.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=o.sibling,l.index=o.index,l.ref=o.ref,l.refCleanup=o.refCleanup,l}function Yw(o,s){o.flags&=65011714;var l=o.alternate;return l===null?(o.childLanes=0,o.lanes=s,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,s=l.dependencies,o.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),o}function Jd(o,s,l,h,v,_){var k=0;if(h=o,typeof o=="function")Ug(o)&&(k=1);else if(typeof o=="string")k=VD(o,l,L.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case $:return o=Vr(31,l,s,v),o.elementType=$,o.lanes=_,o;case S:return si(l.children,v,_,s);case b:k=8,v|=24;break;case E:return o=Vr(12,l,s,v|2),o.elementType=E,o.lanes=_,o;case C:return o=Vr(13,l,s,v),o.elementType=C,o.lanes=_,o;case I:return o=Vr(19,l,s,v),o.elementType=I,o.lanes=_,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case T:k=10;break e;case R:k=9;break e;case O:k=11;break e;case N:k=14;break e;case P:k=16,h=null;break e}k=29,l=Error(r(130,o===null?"null":typeof o,"")),h=null}return s=Vr(k,l,s,v),s.elementType=o,s.type=h,s.lanes=_,s}function si(o,s,l,h){return o=Vr(7,o,h,s),o.lanes=l,o}function zg(o,s,l){return o=Vr(6,o,null,s),o.lanes=l,o}function Qw(o){var s=Vr(18,null,null,0);return s.stateNode=o,s}function Vg(o,s,l){return s=Vr(4,o.children!==null?o.children:[],o.key,s),s.lanes=l,s.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},s}var Xw=new WeakMap;function lo(o,s){if(typeof o=="object"&&o!==null){var l=Xw.get(o);return l!==void 0?l:(s={value:o,source:s,stack:Xe(s)},Xw.set(o,s),s)}return{value:o,source:s,stack:Xe(s)}}var cc=[],lc=0,ef=null,$l=0,uo=[],fo=0,es=null,Qo=1,Xo="";function Sa(o,s){cc[lc++]=$l,cc[lc++]=ef,ef=o,$l=s}function Jw(o,s,l){uo[fo++]=Qo,uo[fo++]=Xo,uo[fo++]=es,es=o;var h=Qo;o=Xo;var v=32-xn(h)-1;h&=~(1<<v),l+=1;var _=32-xn(s)+v;if(30<_){var k=v-v%5;_=(h&(1<<k)-1).toString(32),h>>=k,v-=k,Qo=1<<32-xn(s)+v|l<<v|h,Xo=_+o}else Qo=1<<_|l<<v|h,Xo=o}function Fg(o){o.return!==null&&(Sa(o,1),Jw(o,1,0))}function Bg(o){for(;o===ef;)ef=cc[--lc],cc[lc]=null,$l=cc[--lc],cc[lc]=null;for(;o===es;)es=uo[--fo],uo[fo]=null,Xo=uo[--fo],uo[fo]=null,Qo=uo[--fo],uo[fo]=null}function eS(o,s){uo[fo++]=Qo,uo[fo++]=Xo,uo[fo++]=es,Qo=s.id,Xo=s.overflow,es=o}var Xn=null,an=null,xt=!1,ts=null,ho=!1,qg=Error(r(519));function ns(o){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ul(lo(s,o)),qg}function tS(o){var s=o.stateNode,l=o.type,h=o.memoizedProps;switch(s[Qn]=o,s[Tr]=h,l){case"dialog":bt("cancel",s),bt("close",s);break;case"iframe":case"object":case"embed":bt("load",s);break;case"video":case"audio":for(l=0;l<iu.length;l++)bt(iu[l],s);break;case"source":bt("error",s);break;case"img":case"image":case"link":bt("error",s),bt("load",s);break;case"details":bt("toggle",s);break;case"input":bt("invalid",s),pw(s,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":bt("invalid",s);break;case"textarea":bt("invalid",s),gw(s,h.value,h.defaultValue,h.children)}l=h.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||s.textContent===""+l||h.suppressHydrationWarning===!0||yR(s.textContent,l)?(h.popover!=null&&(bt("beforetoggle",s),bt("toggle",s)),h.onScroll!=null&&bt("scroll",s),h.onScrollEnd!=null&&bt("scrollend",s),h.onClick!=null&&(s.onclick=_a),s=!0):s=!1,s||ns(o,!0)}function nS(o){for(Xn=o.return;Xn;)switch(Xn.tag){case 5:case 31:case 13:ho=!1;return;case 27:case 3:ho=!0;return;default:Xn=Xn.return}}function uc(o){if(o!==Xn)return!1;if(!xt)return nS(o),xt=!0,!1;var s=o.tag,l;if((l=s!==3&&s!==27)&&((l=s===5)&&(l=o.type,l=!(l!=="form"&&l!=="button")||cy(o.type,o.memoizedProps)),l=!l),l&&an&&ns(o),nS(o),s===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));an=OR(o)}else if(s===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));an=OR(o)}else s===27?(s=an,gs(o.type)?(o=hy,hy=null,an=o):an=s):an=Xn?mo(o.stateNode.nextSibling):null;return!0}function ii(){an=Xn=null,xt=!1}function Hg(){var o=ts;return o!==null&&(Nr===null?Nr=o:Nr.push.apply(Nr,o),ts=null),o}function Ul(o){ts===null?ts=[o]:ts.push(o)}var Gg=D(null),ci=null,Ea=null;function rs(o,s,l){B(Gg,s._currentValue),s._currentValue=l}function Ra(o){o._currentValue=Gg.current,q(Gg)}function Zg(o,s,l){for(;o!==null;){var h=o.alternate;if((o.childLanes&s)!==s?(o.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),o===l)break;o=o.return}}function Wg(o,s,l,h){var v=o.child;for(v!==null&&(v.return=o);v!==null;){var _=v.dependencies;if(_!==null){var k=v.child;_=_.firstContext;e:for(;_!==null;){var j=_;_=v;for(var X=0;X<s.length;X++)if(j.context===s[X]){_.lanes|=l,j=_.alternate,j!==null&&(j.lanes|=l),Zg(_.return,l,o),h||(k=null);break e}_=j.next}}else if(v.tag===18){if(k=v.return,k===null)throw Error(r(341));k.lanes|=l,_=k.alternate,_!==null&&(_.lanes|=l),Zg(k,l,o),k=null}else k=v.child;if(k!==null)k.return=v;else for(k=v;k!==null;){if(k===o){k=null;break}if(v=k.sibling,v!==null){v.return=k.return,k=v;break}k=k.return}v=k}}function dc(o,s,l,h){o=null;for(var v=s,_=!1;v!==null;){if(!_){if((v.flags&524288)!==0)_=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var k=v.alternate;if(k===null)throw Error(r(387));if(k=k.memoizedProps,k!==null){var j=v.type;zr(v.pendingProps.value,k.value)||(o!==null?o.push(j):o=[j])}}else if(v===me.current){if(k=v.alternate,k===null)throw Error(r(387));k.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(o!==null?o.push(fu):o=[fu])}v=v.return}o!==null&&Wg(s,o,l,h),s.flags|=262144}function tf(o){for(o=o.firstContext;o!==null;){if(!zr(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function li(o){ci=o,Ea=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Jn(o){return rS(ci,o)}function nf(o,s){return ci===null&&li(o),rS(o,s)}function rS(o,s){var l=s._currentValue;if(s={context:s,memoizedValue:l,next:null},Ea===null){if(o===null)throw Error(r(308));Ea=s,o.dependencies={lanes:0,firstContext:s},o.flags|=524288}else Ea=Ea.next=s;return l}var j3=typeof AbortController<"u"?AbortController:function(){var o=[],s=this.signal={aborted:!1,addEventListener:function(l,h){o.push(h)}};this.abort=function(){s.aborted=!0,o.forEach(function(l){return l()})}},$3=e.unstable_scheduleCallback,U3=e.unstable_NormalPriority,Tn={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Kg(){return{controller:new j3,data:new Map,refCount:0}}function zl(o){o.refCount--,o.refCount===0&&$3(U3,function(){o.controller.abort()})}var Vl=null,Yg=0,fc=0,hc=null;function z3(o,s){if(Vl===null){var l=Vl=[];Yg=0,fc=Jv(),hc={status:"pending",value:void 0,then:function(h){l.push(h)}}}return Yg++,s.then(oS,oS),s}function oS(){if(--Yg===0&&Vl!==null){hc!==null&&(hc.status="fulfilled");var o=Vl;Vl=null,fc=0,hc=null;for(var s=0;s<o.length;s++)(0,o[s])()}}function V3(o,s){var l=[],h={status:"pending",value:null,reason:null,then:function(v){l.push(v)}};return o.then(function(){h.status="fulfilled",h.value=s;for(var v=0;v<l.length;v++)(0,l[v])(s)},function(v){for(h.status="rejected",h.reason=v,v=0;v<l.length;v++)(0,l[v])(void 0)}),h}var aS=F.S;F.S=function(o,s){FE=Se(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&z3(o,s),aS!==null&&aS(o,s)};var ui=D(null);function Qg(){var o=ui.current;return o!==null?o:Xt.pooledCache}function rf(o,s){s===null?B(ui,ui.current):B(ui,s.pool)}function sS(){var o=Qg();return o===null?null:{parent:Tn._currentValue,pool:o}}var pc=Error(r(460)),Xg=Error(r(474)),of=Error(r(542)),af={then:function(){}};function iS(o){return o=o.status,o==="fulfilled"||o==="rejected"}function cS(o,s,l){switch(l=o[l],l===void 0?o.push(s):l!==s&&(s.then(_a,_a),s=l),s.status){case"fulfilled":return s.value;case"rejected":throw o=s.reason,uS(o),o;default:if(typeof s.status=="string")s.then(_a,_a);else{if(o=Xt,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=s,o.status="pending",o.then(function(h){if(s.status==="pending"){var v=s;v.status="fulfilled",v.value=h}},function(h){if(s.status==="pending"){var v=s;v.status="rejected",v.reason=h}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw o=s.reason,uS(o),o}throw fi=s,pc}}function di(o){try{var s=o._init;return s(o._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(fi=l,pc):l}}var fi=null;function lS(){if(fi===null)throw Error(r(459));var o=fi;return fi=null,o}function uS(o){if(o===pc||o===of)throw Error(r(483))}var mc=null,Fl=0;function sf(o){var s=Fl;return Fl+=1,mc===null&&(mc=[]),cS(mc,o,s)}function Bl(o,s){s=s.props.ref,o.ref=s!==void 0?s:null}function cf(o,s){throw s.$$typeof===g?Error(r(525)):(o=Object.prototype.toString.call(s),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":o)))}function dS(o){function s(ce,ne){if(o){var de=ce.deletions;de===null?(ce.deletions=[ne],ce.flags|=16):de.push(ne)}}function l(ce,ne){if(!o)return null;for(;ne!==null;)s(ce,ne),ne=ne.sibling;return null}function h(ce){for(var ne=new Map;ce!==null;)ce.key!==null?ne.set(ce.key,ce):ne.set(ce.index,ce),ce=ce.sibling;return ne}function v(ce,ne){return ce=wa(ce,ne),ce.index=0,ce.sibling=null,ce}function _(ce,ne,de){return ce.index=de,o?(de=ce.alternate,de!==null?(de=de.index,de<ne?(ce.flags|=67108866,ne):de):(ce.flags|=67108866,ne)):(ce.flags|=1048576,ne)}function k(ce){return o&&ce.alternate===null&&(ce.flags|=67108866),ce}function j(ce,ne,de,Ee){return ne===null||ne.tag!==6?(ne=zg(de,ce.mode,Ee),ne.return=ce,ne):(ne=v(ne,de),ne.return=ce,ne)}function X(ce,ne,de,Ee){var We=de.type;return We===S?we(ce,ne,de.props.children,Ee,de.key):ne!==null&&(ne.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===P&&di(We)===ne.type)?(ne=v(ne,de.props),Bl(ne,de),ne.return=ce,ne):(ne=Jd(de.type,de.key,de.props,null,ce.mode,Ee),Bl(ne,de),ne.return=ce,ne)}function he(ce,ne,de,Ee){return ne===null||ne.tag!==4||ne.stateNode.containerInfo!==de.containerInfo||ne.stateNode.implementation!==de.implementation?(ne=Vg(de,ce.mode,Ee),ne.return=ce,ne):(ne=v(ne,de.children||[]),ne.return=ce,ne)}function we(ce,ne,de,Ee,We){return ne===null||ne.tag!==7?(ne=si(de,ce.mode,Ee,We),ne.return=ce,ne):(ne=v(ne,de),ne.return=ce,ne)}function Te(ce,ne,de){if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return ne=zg(""+ne,ce.mode,de),ne.return=ce,ne;if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case y:return de=Jd(ne.type,ne.key,ne.props,null,ce.mode,de),Bl(de,ne),de.return=ce,de;case w:return ne=Vg(ne,ce.mode,de),ne.return=ce,ne;case P:return ne=di(ne),Te(ce,ne,de)}if(le(ne)||G(ne))return ne=si(ne,ce.mode,de,null),ne.return=ce,ne;if(typeof ne.then=="function")return Te(ce,sf(ne),de);if(ne.$$typeof===T)return Te(ce,nf(ce,ne),de);cf(ce,ne)}return null}function pe(ce,ne,de,Ee){var We=ne!==null?ne.key:null;if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return We!==null?null:j(ce,ne,""+de,Ee);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case y:return de.key===We?X(ce,ne,de,Ee):null;case w:return de.key===We?he(ce,ne,de,Ee):null;case P:return de=di(de),pe(ce,ne,de,Ee)}if(le(de)||G(de))return We!==null?null:we(ce,ne,de,Ee,null);if(typeof de.then=="function")return pe(ce,ne,sf(de),Ee);if(de.$$typeof===T)return pe(ce,ne,nf(ce,de),Ee);cf(ce,de)}return null}function ge(ce,ne,de,Ee,We){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint")return ce=ce.get(de)||null,j(ne,ce,""+Ee,We);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case y:return ce=ce.get(Ee.key===null?de:Ee.key)||null,X(ne,ce,Ee,We);case w:return ce=ce.get(Ee.key===null?de:Ee.key)||null,he(ne,ce,Ee,We);case P:return Ee=di(Ee),ge(ce,ne,de,Ee,We)}if(le(Ee)||G(Ee))return ce=ce.get(de)||null,we(ne,ce,Ee,We,null);if(typeof Ee.then=="function")return ge(ce,ne,de,sf(Ee),We);if(Ee.$$typeof===T)return ge(ce,ne,de,nf(ne,Ee),We);cf(ne,Ee)}return null}function Ue(ce,ne,de,Ee){for(var We=null,Dt=null,Ge=ne,ct=ne=0,Rt=null;Ge!==null&&ct<de.length;ct++){Ge.index>ct?(Rt=Ge,Ge=null):Rt=Ge.sibling;var Lt=pe(ce,Ge,de[ct],Ee);if(Lt===null){Ge===null&&(Ge=Rt);break}o&&Ge&&Lt.alternate===null&&s(ce,Ge),ne=_(Lt,ne,ct),Dt===null?We=Lt:Dt.sibling=Lt,Dt=Lt,Ge=Rt}if(ct===de.length)return l(ce,Ge),xt&&Sa(ce,ct),We;if(Ge===null){for(;ct<de.length;ct++)Ge=Te(ce,de[ct],Ee),Ge!==null&&(ne=_(Ge,ne,ct),Dt===null?We=Ge:Dt.sibling=Ge,Dt=Ge);return xt&&Sa(ce,ct),We}for(Ge=h(Ge);ct<de.length;ct++)Rt=ge(Ge,ce,ct,de[ct],Ee),Rt!==null&&(o&&Rt.alternate!==null&&Ge.delete(Rt.key===null?ct:Rt.key),ne=_(Rt,ne,ct),Dt===null?We=Rt:Dt.sibling=Rt,Dt=Rt);return o&&Ge.forEach(function(ws){return s(ce,ws)}),xt&&Sa(ce,ct),We}function Ye(ce,ne,de,Ee){if(de==null)throw Error(r(151));for(var We=null,Dt=null,Ge=ne,ct=ne=0,Rt=null,Lt=de.next();Ge!==null&&!Lt.done;ct++,Lt=de.next()){Ge.index>ct?(Rt=Ge,Ge=null):Rt=Ge.sibling;var ws=pe(ce,Ge,Lt.value,Ee);if(ws===null){Ge===null&&(Ge=Rt);break}o&&Ge&&ws.alternate===null&&s(ce,Ge),ne=_(ws,ne,ct),Dt===null?We=ws:Dt.sibling=ws,Dt=ws,Ge=Rt}if(Lt.done)return l(ce,Ge),xt&&Sa(ce,ct),We;if(Ge===null){for(;!Lt.done;ct++,Lt=de.next())Lt=Te(ce,Lt.value,Ee),Lt!==null&&(ne=_(Lt,ne,ct),Dt===null?We=Lt:Dt.sibling=Lt,Dt=Lt);return xt&&Sa(ce,ct),We}for(Ge=h(Ge);!Lt.done;ct++,Lt=de.next())Lt=ge(Ge,ce,ct,Lt.value,Ee),Lt!==null&&(o&&Lt.alternate!==null&&Ge.delete(Lt.key===null?ct:Lt.key),ne=_(Lt,ne,ct),Dt===null?We=Lt:Dt.sibling=Lt,Dt=Lt);return o&&Ge.forEach(function(XD){return s(ce,XD)}),xt&&Sa(ce,ct),We}function Kt(ce,ne,de,Ee){if(typeof de=="object"&&de!==null&&de.type===S&&de.key===null&&(de=de.props.children),typeof de=="object"&&de!==null){switch(de.$$typeof){case y:e:{for(var We=de.key;ne!==null;){if(ne.key===We){if(We=de.type,We===S){if(ne.tag===7){l(ce,ne.sibling),Ee=v(ne,de.props.children),Ee.return=ce,ce=Ee;break e}}else if(ne.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===P&&di(We)===ne.type){l(ce,ne.sibling),Ee=v(ne,de.props),Bl(Ee,de),Ee.return=ce,ce=Ee;break e}l(ce,ne);break}else s(ce,ne);ne=ne.sibling}de.type===S?(Ee=si(de.props.children,ce.mode,Ee,de.key),Ee.return=ce,ce=Ee):(Ee=Jd(de.type,de.key,de.props,null,ce.mode,Ee),Bl(Ee,de),Ee.return=ce,ce=Ee)}return k(ce);case w:e:{for(We=de.key;ne!==null;){if(ne.key===We)if(ne.tag===4&&ne.stateNode.containerInfo===de.containerInfo&&ne.stateNode.implementation===de.implementation){l(ce,ne.sibling),Ee=v(ne,de.children||[]),Ee.return=ce,ce=Ee;break e}else{l(ce,ne);break}else s(ce,ne);ne=ne.sibling}Ee=Vg(de,ce.mode,Ee),Ee.return=ce,ce=Ee}return k(ce);case P:return de=di(de),Kt(ce,ne,de,Ee)}if(le(de))return Ue(ce,ne,de,Ee);if(G(de)){if(We=G(de),typeof We!="function")throw Error(r(150));return de=We.call(de),Ye(ce,ne,de,Ee)}if(typeof de.then=="function")return Kt(ce,ne,sf(de),Ee);if(de.$$typeof===T)return Kt(ce,ne,nf(ce,de),Ee);cf(ce,de)}return typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint"?(de=""+de,ne!==null&&ne.tag===6?(l(ce,ne.sibling),Ee=v(ne,de),Ee.return=ce,ce=Ee):(l(ce,ne),Ee=zg(de,ce.mode,Ee),Ee.return=ce,ce=Ee),k(ce)):l(ce,ne)}return function(ce,ne,de,Ee){try{Fl=0;var We=Kt(ce,ne,de,Ee);return mc=null,We}catch(Ge){if(Ge===pc||Ge===of)throw Ge;var Dt=Vr(29,Ge,null,ce.mode);return Dt.lanes=Ee,Dt.return=ce,Dt}}}var hi=dS(!0),fS=dS(!1),os=!1;function Jg(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ev(o,s){o=o.updateQueue,s.updateQueue===o&&(s.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function as(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function ss(o,s,l){var h=o.updateQueue;if(h===null)return null;if(h=h.shared,($t&2)!==0){var v=h.pending;return v===null?s.next=s:(s.next=v.next,v.next=s),h.pending=s,s=Xd(o),Kw(o,null,l),s}return Qd(o,h,s,l),Xd(o)}function ql(o,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194048)!==0)){var h=s.lanes;h&=o.pendingLanes,l|=h,s.lanes=l,Yn(o,l)}}function tv(o,s){var l=o.updateQueue,h=o.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var v=null,_=null;if(l=l.firstBaseUpdate,l!==null){do{var k={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};_===null?v=_=k:_=_.next=k,l=l.next}while(l!==null);_===null?v=_=s:_=_.next=s}else v=_=s;l={baseState:h.baseState,firstBaseUpdate:v,lastBaseUpdate:_,shared:h.shared,callbacks:h.callbacks},o.updateQueue=l;return}o=l.lastBaseUpdate,o===null?l.firstBaseUpdate=s:o.next=s,l.lastBaseUpdate=s}var nv=!1;function Hl(){if(nv){var o=hc;if(o!==null)throw o}}function Gl(o,s,l,h){nv=!1;var v=o.updateQueue;os=!1;var _=v.firstBaseUpdate,k=v.lastBaseUpdate,j=v.shared.pending;if(j!==null){v.shared.pending=null;var X=j,he=X.next;X.next=null,k===null?_=he:k.next=he,k=X;var we=o.alternate;we!==null&&(we=we.updateQueue,j=we.lastBaseUpdate,j!==k&&(j===null?we.firstBaseUpdate=he:j.next=he,we.lastBaseUpdate=X))}if(_!==null){var Te=v.baseState;k=0,we=he=X=null,j=_;do{var pe=j.lane&-536870913,ge=pe!==j.lane;if(ge?(Et&pe)===pe:(h&pe)===pe){pe!==0&&pe===fc&&(nv=!0),we!==null&&(we=we.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var Ue=o,Ye=j;pe=s;var Kt=l;switch(Ye.tag){case 1:if(Ue=Ye.payload,typeof Ue=="function"){Te=Ue.call(Kt,Te,pe);break e}Te=Ue;break e;case 3:Ue.flags=Ue.flags&-65537|128;case 0:if(Ue=Ye.payload,pe=typeof Ue=="function"?Ue.call(Kt,Te,pe):Ue,pe==null)break e;Te=p({},Te,pe);break e;case 2:os=!0}}pe=j.callback,pe!==null&&(o.flags|=64,ge&&(o.flags|=8192),ge=v.callbacks,ge===null?v.callbacks=[pe]:ge.push(pe))}else ge={lane:pe,tag:j.tag,payload:j.payload,callback:j.callback,next:null},we===null?(he=we=ge,X=Te):we=we.next=ge,k|=pe;if(j=j.next,j===null){if(j=v.shared.pending,j===null)break;ge=j,j=ge.next,ge.next=null,v.lastBaseUpdate=ge,v.shared.pending=null}}while(!0);we===null&&(X=Te),v.baseState=X,v.firstBaseUpdate=he,v.lastBaseUpdate=we,_===null&&(v.shared.lanes=0),ds|=k,o.lanes=k,o.memoizedState=Te}}function hS(o,s){if(typeof o!="function")throw Error(r(191,o));o.call(s)}function pS(o,s){var l=o.callbacks;if(l!==null)for(o.callbacks=null,o=0;o<l.length;o++)hS(l[o],s)}var gc=D(null),lf=D(0);function mS(o,s){o=Ma,B(lf,o),B(gc,s),Ma=o|s.baseLanes}function rv(){B(lf,Ma),B(gc,gc.current)}function ov(){Ma=lf.current,q(gc),q(lf)}var Fr=D(null),po=null;function is(o){var s=o.alternate;B(yn,yn.current&1),B(Fr,o),po===null&&(s===null||gc.current!==null||s.memoizedState!==null)&&(po=o)}function av(o){B(yn,yn.current),B(Fr,o),po===null&&(po=o)}function gS(o){o.tag===22?(B(yn,yn.current),B(Fr,o),po===null&&(po=o)):cs()}function cs(){B(yn,yn.current),B(Fr,Fr.current)}function Br(o){q(Fr),po===o&&(po=null),q(yn)}var yn=D(0);function uf(o){for(var s=o;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||dy(l)||fy(l)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break;for(;s.sibling===null;){if(s.return===null||s.return===o)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var xa=0,it=null,Zt=null,On=null,df=!1,vc=!1,pi=!1,ff=0,Zl=0,yc=null,F3=0;function mn(){throw Error(r(321))}function sv(o,s){if(s===null)return!1;for(var l=0;l<s.length&&l<o.length;l++)if(!zr(o[l],s[l]))return!1;return!0}function iv(o,s,l,h,v,_){return xa=_,it=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,F.H=o===null||o.memoizedState===null?JS:Sv,pi=!1,_=l(h,v),pi=!1,vc&&(_=yS(s,l,h,v)),vS(o),_}function vS(o){F.H=Yl;var s=Zt!==null&&Zt.next!==null;if(xa=0,On=Zt=it=null,df=!1,Zl=0,yc=null,s)throw Error(r(300));o===null||Cn||(o=o.dependencies,o!==null&&tf(o)&&(Cn=!0))}function yS(o,s,l,h){it=o;var v=0;do{if(vc&&(yc=null),Zl=0,vc=!1,25<=v)throw Error(r(301));if(v+=1,On=Zt=null,o.updateQueue!=null){var _=o.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}F.H=eE,_=s(l,h)}while(vc);return _}function B3(){var o=F.H,s=o.useState()[0];return s=typeof s.then=="function"?Wl(s):s,o=o.useState()[0],(Zt!==null?Zt.memoizedState:null)!==o&&(it.flags|=1024),s}function cv(){var o=ff!==0;return ff=0,o}function lv(o,s,l){s.updateQueue=o.updateQueue,s.flags&=-2053,o.lanes&=~l}function uv(o){if(df){for(o=o.memoizedState;o!==null;){var s=o.queue;s!==null&&(s.pending=null),o=o.next}df=!1}xa=0,On=Zt=it=null,vc=!1,Zl=ff=0,yc=null}function _r(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return On===null?it.memoizedState=On=o:On=On.next=o,On}function _n(){if(Zt===null){var o=it.alternate;o=o!==null?o.memoizedState:null}else o=Zt.next;var s=On===null?it.memoizedState:On.next;if(s!==null)On=s,Zt=o;else{if(o===null)throw it.alternate===null?Error(r(467)):Error(r(310));Zt=o,o={memoizedState:Zt.memoizedState,baseState:Zt.baseState,baseQueue:Zt.baseQueue,queue:Zt.queue,next:null},On===null?it.memoizedState=On=o:On=On.next=o}return On}function hf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Wl(o){var s=Zl;return Zl+=1,yc===null&&(yc=[]),o=cS(yc,o,s),s=it,(On===null?s.memoizedState:On.next)===null&&(s=s.alternate,F.H=s===null||s.memoizedState===null?JS:Sv),o}function pf(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Wl(o);if(o.$$typeof===T)return Jn(o)}throw Error(r(438,String(o)))}function dv(o){var s=null,l=it.updateQueue;if(l!==null&&(s=l.memoCache),s==null){var h=it.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(s={data:h.data.map(function(v){return v.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),l===null&&(l=hf(),it.updateQueue=l),l.memoCache=s,l=s.data[s.index],l===void 0)for(l=s.data[s.index]=Array(o),h=0;h<o;h++)l[h]=W;return s.index++,l}function Ta(o,s){return typeof s=="function"?s(o):s}function mf(o){var s=_n();return fv(s,Zt,o)}function fv(o,s,l){var h=o.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=l;var v=o.baseQueue,_=h.pending;if(_!==null){if(v!==null){var k=v.next;v.next=_.next,_.next=k}s.baseQueue=v=_,h.pending=null}if(_=o.baseState,v===null)o.memoizedState=_;else{s=v.next;var j=k=null,X=null,he=s,we=!1;do{var Te=he.lane&-536870913;if(Te!==he.lane?(Et&Te)===Te:(xa&Te)===Te){var pe=he.revertLane;if(pe===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null}),Te===fc&&(we=!0);else if((xa&pe)===pe){he=he.next,pe===fc&&(we=!0);continue}else Te={lane:0,revertLane:he.revertLane,gesture:null,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null},X===null?(j=X=Te,k=_):X=X.next=Te,it.lanes|=pe,ds|=pe;Te=he.action,pi&&l(_,Te),_=he.hasEagerState?he.eagerState:l(_,Te)}else pe={lane:Te,revertLane:he.revertLane,gesture:he.gesture,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null},X===null?(j=X=pe,k=_):X=X.next=pe,it.lanes|=Te,ds|=Te;he=he.next}while(he!==null&&he!==s);if(X===null?k=_:X.next=j,!zr(_,o.memoizedState)&&(Cn=!0,we&&(l=hc,l!==null)))throw l;o.memoizedState=_,o.baseState=k,o.baseQueue=X,h.lastRenderedState=_}return v===null&&(h.lanes=0),[o.memoizedState,h.dispatch]}function hv(o){var s=_n(),l=s.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=o;var h=l.dispatch,v=l.pending,_=s.memoizedState;if(v!==null){l.pending=null;var k=v=v.next;do _=o(_,k.action),k=k.next;while(k!==v);zr(_,s.memoizedState)||(Cn=!0),s.memoizedState=_,s.baseQueue===null&&(s.baseState=_),l.lastRenderedState=_}return[_,h]}function _S(o,s,l){var h=it,v=_n(),_=xt;if(_){if(l===void 0)throw Error(r(407));l=l()}else l=s();var k=!zr((Zt||v).memoizedState,l);if(k&&(v.memoizedState=l,Cn=!0),v=v.queue,gv(SS.bind(null,h,v,o),[o]),v.getSnapshot!==s||k||On!==null&&On.memoizedState.tag&1){if(h.flags|=2048,_c(9,{destroy:void 0},wS.bind(null,h,v,l,s),null),Xt===null)throw Error(r(349));_||(xa&127)!==0||bS(h,s,l)}return l}function bS(o,s,l){o.flags|=16384,o={getSnapshot:s,value:l},s=it.updateQueue,s===null?(s=hf(),it.updateQueue=s,s.stores=[o]):(l=s.stores,l===null?s.stores=[o]:l.push(o))}function wS(o,s,l,h){s.value=l,s.getSnapshot=h,ES(s)&&RS(o)}function SS(o,s,l){return l(function(){ES(s)&&RS(o)})}function ES(o){var s=o.getSnapshot;o=o.value;try{var l=s();return!zr(o,l)}catch{return!0}}function RS(o){var s=ai(o,2);s!==null&&kr(s,o,2)}function pv(o){var s=_r();if(typeof o=="function"){var l=o;if(o=l(),pi){jn(!0);try{l()}finally{jn(!1)}}}return s.memoizedState=s.baseState=o,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:o},s}function xS(o,s,l,h){return o.baseState=l,fv(o,Zt,typeof h=="function"?h:Ta)}function q3(o,s,l,h,v){if(yf(o))throw Error(r(485));if(o=s.action,o!==null){var _={payload:v,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){_.listeners.push(k)}};F.T!==null?l(!0):_.isTransition=!1,h(_),l=s.pending,l===null?(_.next=s.pending=_,TS(s,_)):(_.next=l.next,s.pending=l.next=_)}}function TS(o,s){var l=s.action,h=s.payload,v=o.state;if(s.isTransition){var _=F.T,k={};F.T=k;try{var j=l(v,h),X=F.S;X!==null&&X(k,j),OS(o,s,j)}catch(he){mv(o,s,he)}finally{_!==null&&k.types!==null&&(_.types=k.types),F.T=_}}else try{_=l(v,h),OS(o,s,_)}catch(he){mv(o,s,he)}}function OS(o,s,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(h){CS(o,s,h)},function(h){return mv(o,s,h)}):CS(o,s,l)}function CS(o,s,l){s.status="fulfilled",s.value=l,AS(s),o.state=l,s=o.pending,s!==null&&(l=s.next,l===s?o.pending=null:(l=l.next,s.next=l,TS(o,l)))}function mv(o,s,l){var h=o.pending;if(o.pending=null,h!==null){h=h.next;do s.status="rejected",s.reason=l,AS(s),s=s.next;while(s!==h)}o.action=null}function AS(o){o=o.listeners;for(var s=0;s<o.length;s++)(0,o[s])()}function IS(o,s){return s}function NS(o,s){if(xt){var l=Xt.formState;if(l!==null){e:{var h=it;if(xt){if(an){t:{for(var v=an,_=ho;v.nodeType!==8;){if(!_){v=null;break t}if(v=mo(v.nextSibling),v===null){v=null;break t}}_=v.data,v=_==="F!"||_==="F"?v:null}if(v){an=mo(v.nextSibling),h=v.data==="F!";break e}}ns(h)}h=!1}h&&(s=l[0])}}return l=_r(),l.memoizedState=l.baseState=s,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:IS,lastRenderedState:s},l.queue=h,l=YS.bind(null,it,h),h.dispatch=l,h=pv(!1),_=wv.bind(null,it,!1,h.queue),h=_r(),v={state:s,dispatch:null,action:o,pending:null},h.queue=v,l=q3.bind(null,it,v,_,l),v.dispatch=l,h.memoizedState=o,[s,l,!1]}function kS(o){var s=_n();return MS(s,Zt,o)}function MS(o,s,l){if(s=fv(o,s,IS)[0],o=mf(Ta)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var h=Wl(s)}catch(k){throw k===pc?of:k}else h=s;s=_n();var v=s.queue,_=v.dispatch;return l!==s.memoizedState&&(it.flags|=2048,_c(9,{destroy:void 0},H3.bind(null,v,l),null)),[h,_,o]}function H3(o,s){o.action=s}function PS(o){var s=_n(),l=Zt;if(l!==null)return MS(s,l,o);_n(),s=s.memoizedState,l=_n();var h=l.queue.dispatch;return l.memoizedState=o,[s,h,!1]}function _c(o,s,l,h){return o={tag:o,create:l,deps:h,inst:s,next:null},s=it.updateQueue,s===null&&(s=hf(),it.updateQueue=s),l=s.lastEffect,l===null?s.lastEffect=o.next=o:(h=l.next,l.next=o,o.next=h,s.lastEffect=o),o}function DS(){return _n().memoizedState}function gf(o,s,l,h){var v=_r();it.flags|=o,v.memoizedState=_c(1|s,{destroy:void 0},l,h===void 0?null:h)}function vf(o,s,l,h){var v=_n();h=h===void 0?null:h;var _=v.memoizedState.inst;Zt!==null&&h!==null&&sv(h,Zt.memoizedState.deps)?v.memoizedState=_c(s,_,l,h):(it.flags|=o,v.memoizedState=_c(1|s,_,l,h))}function LS(o,s){gf(8390656,8,o,s)}function gv(o,s){vf(2048,8,o,s)}function G3(o){it.flags|=4;var s=it.updateQueue;if(s===null)s=hf(),it.updateQueue=s,s.events=[o];else{var l=s.events;l===null?s.events=[o]:l.push(o)}}function jS(o){var s=_n().memoizedState;return G3({ref:s,nextImpl:o}),function(){if(($t&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function $S(o,s){return vf(4,2,o,s)}function US(o,s){return vf(4,4,o,s)}function zS(o,s){if(typeof s=="function"){o=o();var l=s(o);return function(){typeof l=="function"?l():s(null)}}if(s!=null)return o=o(),s.current=o,function(){s.current=null}}function VS(o,s,l){l=l!=null?l.concat([o]):null,vf(4,4,zS.bind(null,s,o),l)}function vv(){}function FS(o,s){var l=_n();s=s===void 0?null:s;var h=l.memoizedState;return s!==null&&sv(s,h[1])?h[0]:(l.memoizedState=[o,s],o)}function BS(o,s){var l=_n();s=s===void 0?null:s;var h=l.memoizedState;if(s!==null&&sv(s,h[1]))return h[0];if(h=o(),pi){jn(!0);try{o()}finally{jn(!1)}}return l.memoizedState=[h,s],h}function yv(o,s,l){return l===void 0||(xa&1073741824)!==0&&(Et&261930)===0?o.memoizedState=s:(o.memoizedState=l,o=qE(),it.lanes|=o,ds|=o,l)}function qS(o,s,l,h){return zr(l,s)?l:gc.current!==null?(o=yv(o,l,h),zr(o,s)||(Cn=!0),o):(xa&42)===0||(xa&1073741824)!==0&&(Et&261930)===0?(Cn=!0,o.memoizedState=l):(o=qE(),it.lanes|=o,ds|=o,s)}function HS(o,s,l,h,v){var _=Y.p;Y.p=_!==0&&8>_?_:8;var k=F.T,j={};F.T=j,wv(o,!1,s,l);try{var X=v(),he=F.S;if(he!==null&&he(j,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var we=V3(X,h);Kl(o,s,we,Gr(o))}else Kl(o,s,h,Gr(o))}catch(Te){Kl(o,s,{then:function(){},status:"rejected",reason:Te},Gr())}finally{Y.p=_,k!==null&&j.types!==null&&(k.types=j.types),F.T=k}}function Z3(){}function _v(o,s,l,h){if(o.tag!==5)throw Error(r(476));var v=GS(o).queue;HS(o,v,s,ie,l===null?Z3:function(){return ZS(o),l(h)})}function GS(o){var s=o.memoizedState;if(s!==null)return s;s={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:ie},next:null};var l={};return s.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:l},next:null},o.memoizedState=s,o=o.alternate,o!==null&&(o.memoizedState=s),s}function ZS(o){var s=GS(o);s.next===null&&(s=o.alternate.memoizedState),Kl(o,s.next.queue,{},Gr())}function bv(){return Jn(fu)}function WS(){return _n().memoizedState}function KS(){return _n().memoizedState}function W3(o){for(var s=o.return;s!==null;){switch(s.tag){case 24:case 3:var l=Gr();o=as(l);var h=ss(s,o,l);h!==null&&(kr(h,s,l),ql(h,s,l)),s={cache:Kg()},o.payload=s;return}s=s.return}}function K3(o,s,l){var h=Gr();l={lane:h,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},yf(o)?QS(s,l):(l=$g(o,s,l,h),l!==null&&(kr(l,o,h),XS(l,s,h)))}function YS(o,s,l){var h=Gr();Kl(o,s,l,h)}function Kl(o,s,l,h){var v={lane:h,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(yf(o))QS(s,v);else{var _=o.alternate;if(o.lanes===0&&(_===null||_.lanes===0)&&(_=s.lastRenderedReducer,_!==null))try{var k=s.lastRenderedState,j=_(k,l);if(v.hasEagerState=!0,v.eagerState=j,zr(j,k))return Qd(o,s,v,0),Xt===null&&Yd(),!1}catch{}if(l=$g(o,s,v,h),l!==null)return kr(l,o,h),XS(l,s,h),!0}return!1}function wv(o,s,l,h){if(h={lane:2,revertLane:Jv(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},yf(o)){if(s)throw Error(r(479))}else s=$g(o,l,h,2),s!==null&&kr(s,o,2)}function yf(o){var s=o.alternate;return o===it||s!==null&&s===it}function QS(o,s){vc=df=!0;var l=o.pending;l===null?s.next=s:(s.next=l.next,l.next=s),o.pending=s}function XS(o,s,l){if((l&4194048)!==0){var h=s.lanes;h&=o.pendingLanes,l|=h,s.lanes=l,Yn(o,l)}}var Yl={readContext:Jn,use:pf,useCallback:mn,useContext:mn,useEffect:mn,useImperativeHandle:mn,useLayoutEffect:mn,useInsertionEffect:mn,useMemo:mn,useReducer:mn,useRef:mn,useState:mn,useDebugValue:mn,useDeferredValue:mn,useTransition:mn,useSyncExternalStore:mn,useId:mn,useHostTransitionStatus:mn,useFormState:mn,useActionState:mn,useOptimistic:mn,useMemoCache:mn,useCacheRefresh:mn};Yl.useEffectEvent=mn;var JS={readContext:Jn,use:pf,useCallback:function(o,s){return _r().memoizedState=[o,s===void 0?null:s],o},useContext:Jn,useEffect:LS,useImperativeHandle:function(o,s,l){l=l!=null?l.concat([o]):null,gf(4194308,4,zS.bind(null,s,o),l)},useLayoutEffect:function(o,s){return gf(4194308,4,o,s)},useInsertionEffect:function(o,s){gf(4,2,o,s)},useMemo:function(o,s){var l=_r();s=s===void 0?null:s;var h=o();if(pi){jn(!0);try{o()}finally{jn(!1)}}return l.memoizedState=[h,s],h},useReducer:function(o,s,l){var h=_r();if(l!==void 0){var v=l(s);if(pi){jn(!0);try{l(s)}finally{jn(!1)}}}else v=s;return h.memoizedState=h.baseState=v,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:v},h.queue=o,o=o.dispatch=K3.bind(null,it,o),[h.memoizedState,o]},useRef:function(o){var s=_r();return o={current:o},s.memoizedState=o},useState:function(o){o=pv(o);var s=o.queue,l=YS.bind(null,it,s);return s.dispatch=l,[o.memoizedState,l]},useDebugValue:vv,useDeferredValue:function(o,s){var l=_r();return yv(l,o,s)},useTransition:function(){var o=pv(!1);return o=HS.bind(null,it,o.queue,!0,!1),_r().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,s,l){var h=it,v=_r();if(xt){if(l===void 0)throw Error(r(407));l=l()}else{if(l=s(),Xt===null)throw Error(r(349));(Et&127)!==0||bS(h,s,l)}v.memoizedState=l;var _={value:l,getSnapshot:s};return v.queue=_,LS(SS.bind(null,h,_,o),[o]),h.flags|=2048,_c(9,{destroy:void 0},wS.bind(null,h,_,l,s),null),l},useId:function(){var o=_r(),s=Xt.identifierPrefix;if(xt){var l=Xo,h=Qo;l=(h&~(1<<32-xn(h)-1)).toString(32)+l,s="_"+s+"R_"+l,l=ff++,0<l&&(s+="H"+l.toString(32)),s+="_"}else l=F3++,s="_"+s+"r_"+l.toString(32)+"_";return o.memoizedState=s},useHostTransitionStatus:bv,useFormState:NS,useActionState:NS,useOptimistic:function(o){var s=_r();s.memoizedState=s.baseState=o;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=l,s=wv.bind(null,it,!0,l),l.dispatch=s,[o,s]},useMemoCache:dv,useCacheRefresh:function(){return _r().memoizedState=W3.bind(null,it)},useEffectEvent:function(o){var s=_r(),l={impl:o};return s.memoizedState=l,function(){if(($t&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},Sv={readContext:Jn,use:pf,useCallback:FS,useContext:Jn,useEffect:gv,useImperativeHandle:VS,useInsertionEffect:$S,useLayoutEffect:US,useMemo:BS,useReducer:mf,useRef:DS,useState:function(){return mf(Ta)},useDebugValue:vv,useDeferredValue:function(o,s){var l=_n();return qS(l,Zt.memoizedState,o,s)},useTransition:function(){var o=mf(Ta)[0],s=_n().memoizedState;return[typeof o=="boolean"?o:Wl(o),s]},useSyncExternalStore:_S,useId:WS,useHostTransitionStatus:bv,useFormState:kS,useActionState:kS,useOptimistic:function(o,s){var l=_n();return xS(l,Zt,o,s)},useMemoCache:dv,useCacheRefresh:KS};Sv.useEffectEvent=jS;var eE={readContext:Jn,use:pf,useCallback:FS,useContext:Jn,useEffect:gv,useImperativeHandle:VS,useInsertionEffect:$S,useLayoutEffect:US,useMemo:BS,useReducer:hv,useRef:DS,useState:function(){return hv(Ta)},useDebugValue:vv,useDeferredValue:function(o,s){var l=_n();return Zt===null?yv(l,o,s):qS(l,Zt.memoizedState,o,s)},useTransition:function(){var o=hv(Ta)[0],s=_n().memoizedState;return[typeof o=="boolean"?o:Wl(o),s]},useSyncExternalStore:_S,useId:WS,useHostTransitionStatus:bv,useFormState:PS,useActionState:PS,useOptimistic:function(o,s){var l=_n();return Zt!==null?xS(l,Zt,o,s):(l.baseState=o,[o,l.queue.dispatch])},useMemoCache:dv,useCacheRefresh:KS};eE.useEffectEvent=jS;function Ev(o,s,l,h){s=o.memoizedState,l=l(h,s),l=l==null?s:p({},s,l),o.memoizedState=l,o.lanes===0&&(o.updateQueue.baseState=l)}var Rv={enqueueSetState:function(o,s,l){o=o._reactInternals;var h=Gr(),v=as(h);v.payload=s,l!=null&&(v.callback=l),s=ss(o,v,h),s!==null&&(kr(s,o,h),ql(s,o,h))},enqueueReplaceState:function(o,s,l){o=o._reactInternals;var h=Gr(),v=as(h);v.tag=1,v.payload=s,l!=null&&(v.callback=l),s=ss(o,v,h),s!==null&&(kr(s,o,h),ql(s,o,h))},enqueueForceUpdate:function(o,s){o=o._reactInternals;var l=Gr(),h=as(l);h.tag=2,s!=null&&(h.callback=s),s=ss(o,h,l),s!==null&&(kr(s,o,l),ql(s,o,l))}};function tE(o,s,l,h,v,_,k){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(h,_,k):s.prototype&&s.prototype.isPureReactComponent?!Ll(l,h)||!Ll(v,_):!0}function nE(o,s,l,h){o=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,h),s.state!==o&&Rv.enqueueReplaceState(s,s.state,null)}function mi(o,s){var l=s;if("ref"in s){l={};for(var h in s)h!=="ref"&&(l[h]=s[h])}if(o=o.defaultProps){l===s&&(l=p({},l));for(var v in o)l[v]===void 0&&(l[v]=o[v])}return l}function rE(o){Kd(o)}function oE(o){console.error(o)}function aE(o){Kd(o)}function _f(o,s){try{var l=o.onUncaughtError;l(s.value,{componentStack:s.stack})}catch(h){setTimeout(function(){throw h})}}function sE(o,s,l){try{var h=o.onCaughtError;h(l.value,{componentStack:l.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function xv(o,s,l){return l=as(l),l.tag=3,l.payload={element:null},l.callback=function(){_f(o,s)},l}function iE(o){return o=as(o),o.tag=3,o}function cE(o,s,l,h){var v=l.type.getDerivedStateFromError;if(typeof v=="function"){var _=h.value;o.payload=function(){return v(_)},o.callback=function(){sE(s,l,h)}}var k=l.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(o.callback=function(){sE(s,l,h),typeof v!="function"&&(fs===null?fs=new Set([this]):fs.add(this));var j=h.stack;this.componentDidCatch(h.value,{componentStack:j!==null?j:""})})}function Y3(o,s,l,h,v){if(l.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(s=l.alternate,s!==null&&dc(s,l,v,!0),l=Fr.current,l!==null){switch(l.tag){case 31:case 13:return po===null?Nf():l.alternate===null&&gn===0&&(gn=3),l.flags&=-257,l.flags|=65536,l.lanes=v,h===af?l.flags|=16384:(s=l.updateQueue,s===null?l.updateQueue=new Set([h]):s.add(h),Yv(o,h,v)),!1;case 22:return l.flags|=65536,h===af?l.flags|=16384:(s=l.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([h])},l.updateQueue=s):(l=s.retryQueue,l===null?s.retryQueue=new Set([h]):l.add(h)),Yv(o,h,v)),!1}throw Error(r(435,l.tag))}return Yv(o,h,v),Nf(),!1}if(xt)return s=Fr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=v,h!==qg&&(o=Error(r(422),{cause:h}),Ul(lo(o,l)))):(h!==qg&&(s=Error(r(423),{cause:h}),Ul(lo(s,l))),o=o.current.alternate,o.flags|=65536,v&=-v,o.lanes|=v,h=lo(h,l),v=xv(o.stateNode,h,v),tv(o,v),gn!==4&&(gn=2)),!1;var _=Error(r(520),{cause:h});if(_=lo(_,l),ou===null?ou=[_]:ou.push(_),gn!==4&&(gn=2),s===null)return!0;h=lo(h,l),l=s;do{switch(l.tag){case 3:return l.flags|=65536,o=v&-v,l.lanes|=o,o=xv(l.stateNode,h,o),tv(l,o),!1;case 1:if(s=l.type,_=l.stateNode,(l.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(fs===null||!fs.has(_))))return l.flags|=65536,v&=-v,l.lanes|=v,v=iE(v),cE(v,o,l,h),tv(l,v),!1}l=l.return}while(l!==null);return!1}var Tv=Error(r(461)),Cn=!1;function er(o,s,l,h){s.child=o===null?fS(s,null,l,h):hi(s,o.child,l,h)}function lE(o,s,l,h,v){l=l.render;var _=s.ref;if("ref"in h){var k={};for(var j in h)j!=="ref"&&(k[j]=h[j])}else k=h;return li(s),h=iv(o,s,l,k,_,v),j=cv(),o!==null&&!Cn?(lv(o,s,v),Oa(o,s,v)):(xt&&j&&Fg(s),s.flags|=1,er(o,s,h,v),s.child)}function uE(o,s,l,h,v){if(o===null){var _=l.type;return typeof _=="function"&&!Ug(_)&&_.defaultProps===void 0&&l.compare===null?(s.tag=15,s.type=_,dE(o,s,_,h,v)):(o=Jd(l.type,null,h,s,s.mode,v),o.ref=s.ref,o.return=s,s.child=o)}if(_=o.child,!Pv(o,v)){var k=_.memoizedProps;if(l=l.compare,l=l!==null?l:Ll,l(k,h)&&o.ref===s.ref)return Oa(o,s,v)}return s.flags|=1,o=wa(_,h),o.ref=s.ref,o.return=s,s.child=o}function dE(o,s,l,h,v){if(o!==null){var _=o.memoizedProps;if(Ll(_,h)&&o.ref===s.ref)if(Cn=!1,s.pendingProps=h=_,Pv(o,v))(o.flags&131072)!==0&&(Cn=!0);else return s.lanes=o.lanes,Oa(o,s,v)}return Ov(o,s,l,h,v)}function fE(o,s,l,h){var v=h.children,_=o!==null?o.memoizedState:null;if(o===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((s.flags&128)!==0){if(_=_!==null?_.baseLanes|l:l,o!==null){for(h=s.child=o.child,v=0;h!==null;)v=v|h.lanes|h.childLanes,h=h.sibling;h=v&~_}else h=0,s.child=null;return hE(o,s,_,l,h)}if((l&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},o!==null&&rf(s,_!==null?_.cachePool:null),_!==null?mS(s,_):rv(),gS(s);else return h=s.lanes=536870912,hE(o,s,_!==null?_.baseLanes|l:l,l,h)}else _!==null?(rf(s,_.cachePool),mS(s,_),cs(),s.memoizedState=null):(o!==null&&rf(s,null),rv(),cs());return er(o,s,v,l),s.child}function Ql(o,s){return o!==null&&o.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function hE(o,s,l,h,v){var _=Qg();return _=_===null?null:{parent:Tn._currentValue,pool:_},s.memoizedState={baseLanes:l,cachePool:_},o!==null&&rf(s,null),rv(),gS(s),o!==null&&dc(o,s,h,!0),s.childLanes=v,null}function bf(o,s){return s=Sf({mode:s.mode,children:s.children},o.mode),s.ref=o.ref,o.child=s,s.return=o,s}function pE(o,s,l){return hi(s,o.child,null,l),o=bf(s,s.pendingProps),o.flags|=2,Br(s),s.memoizedState=null,o}function Q3(o,s,l){var h=s.pendingProps,v=(s.flags&128)!==0;if(s.flags&=-129,o===null){if(xt){if(h.mode==="hidden")return o=bf(s,h),s.lanes=536870912,Ql(null,o);if(av(s),(o=an)?(o=TR(o,ho),o=o!==null&&o.data==="&"?o:null,o!==null&&(s.memoizedState={dehydrated:o,treeContext:es!==null?{id:Qo,overflow:Xo}:null,retryLane:536870912,hydrationErrors:null},l=Qw(o),l.return=s,s.child=l,Xn=s,an=null)):o=null,o===null)throw ns(s);return s.lanes=536870912,null}return bf(s,h)}var _=o.memoizedState;if(_!==null){var k=_.dehydrated;if(av(s),v)if(s.flags&256)s.flags&=-257,s=pE(o,s,l);else if(s.memoizedState!==null)s.child=o.child,s.flags|=128,s=null;else throw Error(r(558));else if(Cn||dc(o,s,l,!1),v=(l&o.childLanes)!==0,Cn||v){if(h=Xt,h!==null&&(k=xr(h,l),k!==0&&k!==_.retryLane))throw _.retryLane=k,ai(o,k),kr(h,o,k),Tv;Nf(),s=pE(o,s,l)}else o=_.treeContext,an=mo(k.nextSibling),Xn=s,xt=!0,ts=null,ho=!1,o!==null&&eS(s,o),s=bf(s,h),s.flags|=4096;return s}return o=wa(o.child,{mode:h.mode,children:h.children}),o.ref=s.ref,s.child=o,o.return=s,o}function wf(o,s){var l=s.ref;if(l===null)o!==null&&o.ref!==null&&(s.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(o===null||o.ref!==l)&&(s.flags|=4194816)}}function Ov(o,s,l,h,v){return li(s),l=iv(o,s,l,h,void 0,v),h=cv(),o!==null&&!Cn?(lv(o,s,v),Oa(o,s,v)):(xt&&h&&Fg(s),s.flags|=1,er(o,s,l,v),s.child)}function mE(o,s,l,h,v,_){return li(s),s.updateQueue=null,l=yS(s,h,l,v),vS(o),h=cv(),o!==null&&!Cn?(lv(o,s,_),Oa(o,s,_)):(xt&&h&&Fg(s),s.flags|=1,er(o,s,l,_),s.child)}function gE(o,s,l,h,v){if(li(s),s.stateNode===null){var _=ic,k=l.contextType;typeof k=="object"&&k!==null&&(_=Jn(k)),_=new l(h,_),s.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=Rv,s.stateNode=_,_._reactInternals=s,_=s.stateNode,_.props=h,_.state=s.memoizedState,_.refs={},Jg(s),k=l.contextType,_.context=typeof k=="object"&&k!==null?Jn(k):ic,_.state=s.memoizedState,k=l.getDerivedStateFromProps,typeof k=="function"&&(Ev(s,l,k,h),_.state=s.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(k=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),k!==_.state&&Rv.enqueueReplaceState(_,_.state,null),Gl(s,h,_,v),Hl(),_.state=s.memoizedState),typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!0}else if(o===null){_=s.stateNode;var j=s.memoizedProps,X=mi(l,j);_.props=X;var he=_.context,we=l.contextType;k=ic,typeof we=="object"&&we!==null&&(k=Jn(we));var Te=l.getDerivedStateFromProps;we=typeof Te=="function"||typeof _.getSnapshotBeforeUpdate=="function",j=s.pendingProps!==j,we||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(j||he!==k)&&nE(s,_,h,k),os=!1;var pe=s.memoizedState;_.state=pe,Gl(s,h,_,v),Hl(),he=s.memoizedState,j||pe!==he||os?(typeof Te=="function"&&(Ev(s,l,Te,h),he=s.memoizedState),(X=os||tE(s,l,X,h,pe,he,k))?(we||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(s.flags|=4194308)):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=he),_.props=h,_.state=he,_.context=k,h=X):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{_=s.stateNode,ev(o,s),k=s.memoizedProps,we=mi(l,k),_.props=we,Te=s.pendingProps,pe=_.context,he=l.contextType,X=ic,typeof he=="object"&&he!==null&&(X=Jn(he)),j=l.getDerivedStateFromProps,(he=typeof j=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(k!==Te||pe!==X)&&nE(s,_,h,X),os=!1,pe=s.memoizedState,_.state=pe,Gl(s,h,_,v),Hl();var ge=s.memoizedState;k!==Te||pe!==ge||os||o!==null&&o.dependencies!==null&&tf(o.dependencies)?(typeof j=="function"&&(Ev(s,l,j,h),ge=s.memoizedState),(we=os||tE(s,l,we,h,pe,ge,X)||o!==null&&o.dependencies!==null&&tf(o.dependencies))?(he||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(h,ge,X),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(h,ge,X)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||k===o.memoizedProps&&pe===o.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||k===o.memoizedProps&&pe===o.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=ge),_.props=h,_.state=ge,_.context=X,h=we):(typeof _.componentDidUpdate!="function"||k===o.memoizedProps&&pe===o.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||k===o.memoizedProps&&pe===o.memoizedState||(s.flags|=1024),h=!1)}return _=h,wf(o,s),h=(s.flags&128)!==0,_||h?(_=s.stateNode,l=h&&typeof l.getDerivedStateFromError!="function"?null:_.render(),s.flags|=1,o!==null&&h?(s.child=hi(s,o.child,null,v),s.child=hi(s,null,l,v)):er(o,s,l,v),s.memoizedState=_.state,o=s.child):o=Oa(o,s,v),o}function vE(o,s,l,h){return ii(),s.flags|=256,er(o,s,l,h),s.child}var Cv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Av(o){return{baseLanes:o,cachePool:sS()}}function Iv(o,s,l){return o=o!==null?o.childLanes&~l:0,s&&(o|=Hr),o}function yE(o,s,l){var h=s.pendingProps,v=!1,_=(s.flags&128)!==0,k;if((k=_)||(k=o!==null&&o.memoizedState===null?!1:(yn.current&2)!==0),k&&(v=!0,s.flags&=-129),k=(s.flags&32)!==0,s.flags&=-33,o===null){if(xt){if(v?is(s):cs(),(o=an)?(o=TR(o,ho),o=o!==null&&o.data!=="&"?o:null,o!==null&&(s.memoizedState={dehydrated:o,treeContext:es!==null?{id:Qo,overflow:Xo}:null,retryLane:536870912,hydrationErrors:null},l=Qw(o),l.return=s,s.child=l,Xn=s,an=null)):o=null,o===null)throw ns(s);return fy(o)?s.lanes=32:s.lanes=536870912,null}var j=h.children;return h=h.fallback,v?(cs(),v=s.mode,j=Sf({mode:"hidden",children:j},v),h=si(h,v,l,null),j.return=s,h.return=s,j.sibling=h,s.child=j,h=s.child,h.memoizedState=Av(l),h.childLanes=Iv(o,k,l),s.memoizedState=Cv,Ql(null,h)):(is(s),Nv(s,j))}var X=o.memoizedState;if(X!==null&&(j=X.dehydrated,j!==null)){if(_)s.flags&256?(is(s),s.flags&=-257,s=kv(o,s,l)):s.memoizedState!==null?(cs(),s.child=o.child,s.flags|=128,s=null):(cs(),j=h.fallback,v=s.mode,h=Sf({mode:"visible",children:h.children},v),j=si(j,v,l,null),j.flags|=2,h.return=s,j.return=s,h.sibling=j,s.child=h,hi(s,o.child,null,l),h=s.child,h.memoizedState=Av(l),h.childLanes=Iv(o,k,l),s.memoizedState=Cv,s=Ql(null,h));else if(is(s),fy(j)){if(k=j.nextSibling&&j.nextSibling.dataset,k)var he=k.dgst;k=he,h=Error(r(419)),h.stack="",h.digest=k,Ul({value:h,source:null,stack:null}),s=kv(o,s,l)}else if(Cn||dc(o,s,l,!1),k=(l&o.childLanes)!==0,Cn||k){if(k=Xt,k!==null&&(h=xr(k,l),h!==0&&h!==X.retryLane))throw X.retryLane=h,ai(o,h),kr(k,o,h),Tv;dy(j)||Nf(),s=kv(o,s,l)}else dy(j)?(s.flags|=192,s.child=o.child,s=null):(o=X.treeContext,an=mo(j.nextSibling),Xn=s,xt=!0,ts=null,ho=!1,o!==null&&eS(s,o),s=Nv(s,h.children),s.flags|=4096);return s}return v?(cs(),j=h.fallback,v=s.mode,X=o.child,he=X.sibling,h=wa(X,{mode:"hidden",children:h.children}),h.subtreeFlags=X.subtreeFlags&65011712,he!==null?j=wa(he,j):(j=si(j,v,l,null),j.flags|=2),j.return=s,h.return=s,h.sibling=j,s.child=h,Ql(null,h),h=s.child,j=o.child.memoizedState,j===null?j=Av(l):(v=j.cachePool,v!==null?(X=Tn._currentValue,v=v.parent!==X?{parent:X,pool:X}:v):v=sS(),j={baseLanes:j.baseLanes|l,cachePool:v}),h.memoizedState=j,h.childLanes=Iv(o,k,l),s.memoizedState=Cv,Ql(o.child,h)):(is(s),l=o.child,o=l.sibling,l=wa(l,{mode:"visible",children:h.children}),l.return=s,l.sibling=null,o!==null&&(k=s.deletions,k===null?(s.deletions=[o],s.flags|=16):k.push(o)),s.child=l,s.memoizedState=null,l)}function Nv(o,s){return s=Sf({mode:"visible",children:s},o.mode),s.return=o,o.child=s}function Sf(o,s){return o=Vr(22,o,null,s),o.lanes=0,o}function kv(o,s,l){return hi(s,o.child,null,l),o=Nv(s,s.pendingProps.children),o.flags|=2,s.memoizedState=null,o}function _E(o,s,l){o.lanes|=s;var h=o.alternate;h!==null&&(h.lanes|=s),Zg(o.return,s,l)}function Mv(o,s,l,h,v,_){var k=o.memoizedState;k===null?o.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:v,treeForkCount:_}:(k.isBackwards=s,k.rendering=null,k.renderingStartTime=0,k.last=h,k.tail=l,k.tailMode=v,k.treeForkCount=_)}function bE(o,s,l){var h=s.pendingProps,v=h.revealOrder,_=h.tail;h=h.children;var k=yn.current,j=(k&2)!==0;if(j?(k=k&1|2,s.flags|=128):k&=1,B(yn,k),er(o,s,h,l),h=xt?$l:0,!j&&o!==null&&(o.flags&128)!==0)e:for(o=s.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&_E(o,l,s);else if(o.tag===19)_E(o,l,s);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break e;for(;o.sibling===null;){if(o.return===null||o.return===s)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(v){case"forwards":for(l=s.child,v=null;l!==null;)o=l.alternate,o!==null&&uf(o)===null&&(v=l),l=l.sibling;l=v,l===null?(v=s.child,s.child=null):(v=l.sibling,l.sibling=null),Mv(s,!1,v,l,_,h);break;case"backwards":case"unstable_legacy-backwards":for(l=null,v=s.child,s.child=null;v!==null;){if(o=v.alternate,o!==null&&uf(o)===null){s.child=v;break}o=v.sibling,v.sibling=l,l=v,v=o}Mv(s,!0,l,null,_,h);break;case"together":Mv(s,!1,null,null,void 0,h);break;default:s.memoizedState=null}return s.child}function Oa(o,s,l){if(o!==null&&(s.dependencies=o.dependencies),ds|=s.lanes,(l&s.childLanes)===0)if(o!==null){if(dc(o,s,l,!1),(l&s.childLanes)===0)return null}else return null;if(o!==null&&s.child!==o.child)throw Error(r(153));if(s.child!==null){for(o=s.child,l=wa(o,o.pendingProps),s.child=l,l.return=s;o.sibling!==null;)o=o.sibling,l=l.sibling=wa(o,o.pendingProps),l.return=s;l.sibling=null}return s.child}function Pv(o,s){return(o.lanes&s)!==0?!0:(o=o.dependencies,!!(o!==null&&tf(o)))}function X3(o,s,l){switch(s.tag){case 3:ve(s,s.stateNode.containerInfo),rs(s,Tn,o.memoizedState.cache),ii();break;case 27:case 5:Ie(s);break;case 4:ve(s,s.stateNode.containerInfo);break;case 10:rs(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,av(s),null;break;case 13:var h=s.memoizedState;if(h!==null)return h.dehydrated!==null?(is(s),s.flags|=128,null):(l&s.child.childLanes)!==0?yE(o,s,l):(is(s),o=Oa(o,s,l),o!==null?o.sibling:null);is(s);break;case 19:var v=(o.flags&128)!==0;if(h=(l&s.childLanes)!==0,h||(dc(o,s,l,!1),h=(l&s.childLanes)!==0),v){if(h)return bE(o,s,l);s.flags|=128}if(v=s.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),B(yn,yn.current),h)break;return null;case 22:return s.lanes=0,fE(o,s,l,s.pendingProps);case 24:rs(s,Tn,o.memoizedState.cache)}return Oa(o,s,l)}function wE(o,s,l){if(o!==null)if(o.memoizedProps!==s.pendingProps)Cn=!0;else{if(!Pv(o,l)&&(s.flags&128)===0)return Cn=!1,X3(o,s,l);Cn=(o.flags&131072)!==0}else Cn=!1,xt&&(s.flags&1048576)!==0&&Jw(s,$l,s.index);switch(s.lanes=0,s.tag){case 16:e:{var h=s.pendingProps;if(o=di(s.elementType),s.type=o,typeof o=="function")Ug(o)?(h=mi(o,h),s.tag=1,s=gE(null,s,o,h,l)):(s.tag=0,s=Ov(null,s,o,h,l));else{if(o!=null){var v=o.$$typeof;if(v===O){s.tag=11,s=lE(null,s,o,h,l);break e}else if(v===N){s.tag=14,s=uE(null,s,o,h,l);break e}}throw s=J(o)||o,Error(r(306,s,""))}}return s;case 0:return Ov(o,s,s.type,s.pendingProps,l);case 1:return h=s.type,v=mi(h,s.pendingProps),gE(o,s,h,v,l);case 3:e:{if(ve(s,s.stateNode.containerInfo),o===null)throw Error(r(387));h=s.pendingProps;var _=s.memoizedState;v=_.element,ev(o,s),Gl(s,h,null,l);var k=s.memoizedState;if(h=k.cache,rs(s,Tn,h),h!==_.cache&&Wg(s,[Tn],l,!0),Hl(),h=k.element,_.isDehydrated)if(_={element:h,isDehydrated:!1,cache:k.cache},s.updateQueue.baseState=_,s.memoizedState=_,s.flags&256){s=vE(o,s,h,l);break e}else if(h!==v){v=lo(Error(r(424)),s),Ul(v),s=vE(o,s,h,l);break e}else for(o=s.stateNode.containerInfo,o.nodeType===9?o=o.body:o=o.nodeName==="HTML"?o.ownerDocument.body:o,an=mo(o.firstChild),Xn=s,xt=!0,ts=null,ho=!0,l=fS(s,null,h,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ii(),h===v){s=Oa(o,s,l);break e}er(o,s,h,l)}s=s.child}return s;case 26:return wf(o,s),o===null?(l=kR(s.type,null,s.pendingProps,null))?s.memoizedState=l:xt||(l=s.type,o=s.pendingProps,h=$f(Q.current).createElement(l),h[Qn]=s,h[Tr]=o,tr(h,l,o),qn(h),s.stateNode=h):s.memoizedState=kR(s.type,o.memoizedProps,s.pendingProps,o.memoizedState),null;case 27:return Ie(s),o===null&&xt&&(h=s.stateNode=AR(s.type,s.pendingProps,Q.current),Xn=s,ho=!0,v=an,gs(s.type)?(hy=v,an=mo(h.firstChild)):an=v),er(o,s,s.pendingProps.children,l),wf(o,s),o===null&&(s.flags|=4194304),s.child;case 5:return o===null&&xt&&((v=h=an)&&(h=CD(h,s.type,s.pendingProps,ho),h!==null?(s.stateNode=h,Xn=s,an=mo(h.firstChild),ho=!1,v=!0):v=!1),v||ns(s)),Ie(s),v=s.type,_=s.pendingProps,k=o!==null?o.memoizedProps:null,h=_.children,cy(v,_)?h=null:k!==null&&cy(v,k)&&(s.flags|=32),s.memoizedState!==null&&(v=iv(o,s,B3,null,null,l),fu._currentValue=v),wf(o,s),er(o,s,h,l),s.child;case 6:return o===null&&xt&&((o=l=an)&&(l=AD(l,s.pendingProps,ho),l!==null?(s.stateNode=l,Xn=s,an=null,o=!0):o=!1),o||ns(s)),null;case 13:return yE(o,s,l);case 4:return ve(s,s.stateNode.containerInfo),h=s.pendingProps,o===null?s.child=hi(s,null,h,l):er(o,s,h,l),s.child;case 11:return lE(o,s,s.type,s.pendingProps,l);case 7:return er(o,s,s.pendingProps,l),s.child;case 8:return er(o,s,s.pendingProps.children,l),s.child;case 12:return er(o,s,s.pendingProps.children,l),s.child;case 10:return h=s.pendingProps,rs(s,s.type,h.value),er(o,s,h.children,l),s.child;case 9:return v=s.type._context,h=s.pendingProps.children,li(s),v=Jn(v),h=h(v),s.flags|=1,er(o,s,h,l),s.child;case 14:return uE(o,s,s.type,s.pendingProps,l);case 15:return dE(o,s,s.type,s.pendingProps,l);case 19:return bE(o,s,l);case 31:return Q3(o,s,l);case 22:return fE(o,s,l,s.pendingProps);case 24:return li(s),h=Jn(Tn),o===null?(v=Qg(),v===null&&(v=Xt,_=Kg(),v.pooledCache=_,_.refCount++,_!==null&&(v.pooledCacheLanes|=l),v=_),s.memoizedState={parent:h,cache:v},Jg(s),rs(s,Tn,v)):((o.lanes&l)!==0&&(ev(o,s),Gl(s,null,null,l),Hl()),v=o.memoizedState,_=s.memoizedState,v.parent!==h?(v={parent:h,cache:h},s.memoizedState=v,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=v),rs(s,Tn,h)):(h=_.cache,rs(s,Tn,h),h!==v.cache&&Wg(s,[Tn],l,!0))),er(o,s,s.pendingProps.children,l),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function Ca(o){o.flags|=4}function Dv(o,s,l,h,v){if((s=(o.mode&32)!==0)&&(s=!1),s){if(o.flags|=16777216,(v&335544128)===v)if(o.stateNode.complete)o.flags|=8192;else if(WE())o.flags|=8192;else throw fi=af,Xg}else o.flags&=-16777217}function SE(o,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!jR(s))if(WE())o.flags|=8192;else throw fi=af,Xg}function Ef(o,s){s!==null&&(o.flags|=4),o.flags&16384&&(s=o.tag!==22?Gt():536870912,o.lanes|=s,Ec|=s)}function Xl(o,s){if(!xt)switch(o.tailMode){case"hidden":s=o.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?o.tail=null:l.sibling=null;break;case"collapsed":l=o.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?s||o.tail===null?o.tail=null:o.tail.sibling=null:h.sibling=null}}function sn(o){var s=o.alternate!==null&&o.alternate.child===o.child,l=0,h=0;if(s)for(var v=o.child;v!==null;)l|=v.lanes|v.childLanes,h|=v.subtreeFlags&65011712,h|=v.flags&65011712,v.return=o,v=v.sibling;else for(v=o.child;v!==null;)l|=v.lanes|v.childLanes,h|=v.subtreeFlags,h|=v.flags,v.return=o,v=v.sibling;return o.subtreeFlags|=h,o.childLanes=l,s}function J3(o,s,l){var h=s.pendingProps;switch(Bg(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return sn(s),null;case 1:return sn(s),null;case 3:return l=s.stateNode,h=null,o!==null&&(h=o.memoizedState.cache),s.memoizedState.cache!==h&&(s.flags|=2048),Ra(Tn),Ce(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(o===null||o.child===null)&&(uc(s)?Ca(s):o===null||o.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Hg())),sn(s),null;case 26:var v=s.type,_=s.memoizedState;return o===null?(Ca(s),_!==null?(sn(s),SE(s,_)):(sn(s),Dv(s,v,null,h,l))):_?_!==o.memoizedState?(Ca(s),sn(s),SE(s,_)):(sn(s),s.flags&=-16777217):(o=o.memoizedProps,o!==h&&Ca(s),sn(s),Dv(s,v,o,h,l)),null;case 27:if(H(s),l=Q.current,v=s.type,o!==null&&s.stateNode!=null)o.memoizedProps!==h&&Ca(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return sn(s),null}o=L.current,uc(s)?tS(s):(o=AR(v,h,l),s.stateNode=o,Ca(s))}return sn(s),null;case 5:if(H(s),v=s.type,o!==null&&s.stateNode!=null)o.memoizedProps!==h&&Ca(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return sn(s),null}if(_=L.current,uc(s))tS(s);else{var k=$f(Q.current);switch(_){case 1:_=k.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:_=k.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":_=k.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":_=k.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":_=k.createElement("div"),_.innerHTML="<script><\/script>",_=_.removeChild(_.firstChild);break;case"select":_=typeof h.is=="string"?k.createElement("select",{is:h.is}):k.createElement("select"),h.multiple?_.multiple=!0:h.size&&(_.size=h.size);break;default:_=typeof h.is=="string"?k.createElement(v,{is:h.is}):k.createElement(v)}}_[Qn]=s,_[Tr]=h;e:for(k=s.child;k!==null;){if(k.tag===5||k.tag===6)_.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===s)break e;for(;k.sibling===null;){if(k.return===null||k.return===s)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}s.stateNode=_;e:switch(tr(_,v,h),v){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&Ca(s)}}return sn(s),Dv(s,s.type,o===null?null:o.memoizedProps,s.pendingProps,l),null;case 6:if(o&&s.stateNode!=null)o.memoizedProps!==h&&Ca(s);else{if(typeof h!="string"&&s.stateNode===null)throw Error(r(166));if(o=Q.current,uc(s)){if(o=s.stateNode,l=s.memoizedProps,h=null,v=Xn,v!==null)switch(v.tag){case 27:case 5:h=v.memoizedProps}o[Qn]=s,o=!!(o.nodeValue===l||h!==null&&h.suppressHydrationWarning===!0||yR(o.nodeValue,l)),o||ns(s,!0)}else o=$f(o).createTextNode(h),o[Qn]=s,s.stateNode=o}return sn(s),null;case 31:if(l=s.memoizedState,o===null||o.memoizedState!==null){if(h=uc(s),l!==null){if(o===null){if(!h)throw Error(r(318));if(o=s.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[Qn]=s}else ii(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;sn(s),o=!1}else l=Hg(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=l),o=!0;if(!o)return s.flags&256?(Br(s),s):(Br(s),null);if((s.flags&128)!==0)throw Error(r(558))}return sn(s),null;case 13:if(h=s.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(v=uc(s),h!==null&&h.dehydrated!==null){if(o===null){if(!v)throw Error(r(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(r(317));v[Qn]=s}else ii(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;sn(s),v=!1}else v=Hg(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=v),v=!0;if(!v)return s.flags&256?(Br(s),s):(Br(s),null)}return Br(s),(s.flags&128)!==0?(s.lanes=l,s):(l=h!==null,o=o!==null&&o.memoizedState!==null,l&&(h=s.child,v=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(v=h.alternate.memoizedState.cachePool.pool),_=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(_=h.memoizedState.cachePool.pool),_!==v&&(h.flags|=2048)),l!==o&&l&&(s.child.flags|=8192),Ef(s,s.updateQueue),sn(s),null);case 4:return Ce(),o===null&&ry(s.stateNode.containerInfo),sn(s),null;case 10:return Ra(s.type),sn(s),null;case 19:if(q(yn),h=s.memoizedState,h===null)return sn(s),null;if(v=(s.flags&128)!==0,_=h.rendering,_===null)if(v)Xl(h,!1);else{if(gn!==0||o!==null&&(o.flags&128)!==0)for(o=s.child;o!==null;){if(_=uf(o),_!==null){for(s.flags|=128,Xl(h,!1),o=_.updateQueue,s.updateQueue=o,Ef(s,o),s.subtreeFlags=0,o=l,l=s.child;l!==null;)Yw(l,o),l=l.sibling;return B(yn,yn.current&1|2),xt&&Sa(s,h.treeForkCount),s.child}o=o.sibling}h.tail!==null&&Se()>Cf&&(s.flags|=128,v=!0,Xl(h,!1),s.lanes=4194304)}else{if(!v)if(o=uf(_),o!==null){if(s.flags|=128,v=!0,o=o.updateQueue,s.updateQueue=o,Ef(s,o),Xl(h,!0),h.tail===null&&h.tailMode==="hidden"&&!_.alternate&&!xt)return sn(s),null}else 2*Se()-h.renderingStartTime>Cf&&l!==536870912&&(s.flags|=128,v=!0,Xl(h,!1),s.lanes=4194304);h.isBackwards?(_.sibling=s.child,s.child=_):(o=h.last,o!==null?o.sibling=_:s.child=_,h.last=_)}return h.tail!==null?(o=h.tail,h.rendering=o,h.tail=o.sibling,h.renderingStartTime=Se(),o.sibling=null,l=yn.current,B(yn,v?l&1|2:l&1),xt&&Sa(s,h.treeForkCount),o):(sn(s),null);case 22:case 23:return Br(s),ov(),h=s.memoizedState!==null,o!==null?o.memoizedState!==null!==h&&(s.flags|=8192):h&&(s.flags|=8192),h?(l&536870912)!==0&&(s.flags&128)===0&&(sn(s),s.subtreeFlags&6&&(s.flags|=8192)):sn(s),l=s.updateQueue,l!==null&&Ef(s,l.retryQueue),l=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(l=o.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==l&&(s.flags|=2048),o!==null&&q(ui),null;case 24:return l=null,o!==null&&(l=o.memoizedState.cache),s.memoizedState.cache!==l&&(s.flags|=2048),Ra(Tn),sn(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function eD(o,s){switch(Bg(s),s.tag){case 1:return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 3:return Ra(Tn),Ce(),o=s.flags,(o&65536)!==0&&(o&128)===0?(s.flags=o&-65537|128,s):null;case 26:case 27:case 5:return H(s),null;case 31:if(s.memoizedState!==null){if(Br(s),s.alternate===null)throw Error(r(340));ii()}return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 13:if(Br(s),o=s.memoizedState,o!==null&&o.dehydrated!==null){if(s.alternate===null)throw Error(r(340));ii()}return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 19:return q(yn),null;case 4:return Ce(),null;case 10:return Ra(s.type),null;case 22:case 23:return Br(s),ov(),o!==null&&q(ui),o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 24:return Ra(Tn),null;case 25:return null;default:return null}}function EE(o,s){switch(Bg(s),s.tag){case 3:Ra(Tn),Ce();break;case 26:case 27:case 5:H(s);break;case 4:Ce();break;case 31:s.memoizedState!==null&&Br(s);break;case 13:Br(s);break;case 19:q(yn);break;case 10:Ra(s.type);break;case 22:case 23:Br(s),ov(),o!==null&&q(ui);break;case 24:Ra(Tn)}}function Jl(o,s){try{var l=s.updateQueue,h=l!==null?l.lastEffect:null;if(h!==null){var v=h.next;l=v;do{if((l.tag&o)===o){h=void 0;var _=l.create,k=l.inst;h=_(),k.destroy=h}l=l.next}while(l!==v)}}catch(j){Vt(s,s.return,j)}}function ls(o,s,l){try{var h=s.updateQueue,v=h!==null?h.lastEffect:null;if(v!==null){var _=v.next;h=_;do{if((h.tag&o)===o){var k=h.inst,j=k.destroy;if(j!==void 0){k.destroy=void 0,v=s;var X=l,he=j;try{he()}catch(we){Vt(v,X,we)}}}h=h.next}while(h!==_)}}catch(we){Vt(s,s.return,we)}}function RE(o){var s=o.updateQueue;if(s!==null){var l=o.stateNode;try{pS(s,l)}catch(h){Vt(o,o.return,h)}}}function xE(o,s,l){l.props=mi(o.type,o.memoizedProps),l.state=o.memoizedState;try{l.componentWillUnmount()}catch(h){Vt(o,s,h)}}function eu(o,s){try{var l=o.ref;if(l!==null){switch(o.tag){case 26:case 27:case 5:var h=o.stateNode;break;case 30:h=o.stateNode;break;default:h=o.stateNode}typeof l=="function"?o.refCleanup=l(h):l.current=h}}catch(v){Vt(o,s,v)}}function Jo(o,s){var l=o.ref,h=o.refCleanup;if(l!==null)if(typeof h=="function")try{h()}catch(v){Vt(o,s,v)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(v){Vt(o,s,v)}else l.current=null}function TE(o){var s=o.type,l=o.memoizedProps,h=o.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":l.autoFocus&&h.focus();break e;case"img":l.src?h.src=l.src:l.srcSet&&(h.srcset=l.srcSet)}}catch(v){Vt(o,o.return,v)}}function Lv(o,s,l){try{var h=o.stateNode;SD(h,o.type,l,s),h[Tr]=s}catch(v){Vt(o,o.return,v)}}function OE(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&gs(o.type)||o.tag===4}function jv(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||OE(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&gs(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function $v(o,s,l){var h=o.tag;if(h===5||h===6)o=o.stateNode,s?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(o,s):(s=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,s.appendChild(o),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=_a));else if(h!==4&&(h===27&&gs(o.type)&&(l=o.stateNode,s=null),o=o.child,o!==null))for($v(o,s,l),o=o.sibling;o!==null;)$v(o,s,l),o=o.sibling}function Rf(o,s,l){var h=o.tag;if(h===5||h===6)o=o.stateNode,s?l.insertBefore(o,s):l.appendChild(o);else if(h!==4&&(h===27&&gs(o.type)&&(l=o.stateNode),o=o.child,o!==null))for(Rf(o,s,l),o=o.sibling;o!==null;)Rf(o,s,l),o=o.sibling}function CE(o){var s=o.stateNode,l=o.memoizedProps;try{for(var h=o.type,v=s.attributes;v.length;)s.removeAttributeNode(v[0]);tr(s,h,l),s[Qn]=o,s[Tr]=l}catch(_){Vt(o,o.return,_)}}var Aa=!1,An=!1,Uv=!1,AE=typeof WeakSet=="function"?WeakSet:Set,Hn=null;function tD(o,s){if(o=o.containerInfo,sy=Hf,o=Vw(o),kg(o)){if("selectionStart"in o)var l={start:o.selectionStart,end:o.selectionEnd};else e:{l=(l=o.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var v=h.anchorOffset,_=h.focusNode;h=h.focusOffset;try{l.nodeType,_.nodeType}catch{l=null;break e}var k=0,j=-1,X=-1,he=0,we=0,Te=o,pe=null;t:for(;;){for(var ge;Te!==l||v!==0&&Te.nodeType!==3||(j=k+v),Te!==_||h!==0&&Te.nodeType!==3||(X=k+h),Te.nodeType===3&&(k+=Te.nodeValue.length),(ge=Te.firstChild)!==null;)pe=Te,Te=ge;for(;;){if(Te===o)break t;if(pe===l&&++he===v&&(j=k),pe===_&&++we===h&&(X=k),(ge=Te.nextSibling)!==null)break;Te=pe,pe=Te.parentNode}Te=ge}l=j===-1||X===-1?null:{start:j,end:X}}else l=null}l=l||{start:0,end:0}}else l=null;for(iy={focusedElem:o,selectionRange:l},Hf=!1,Hn=s;Hn!==null;)if(s=Hn,o=s.child,(s.subtreeFlags&1028)!==0&&o!==null)o.return=s,Hn=o;else for(;Hn!==null;){switch(s=Hn,_=s.alternate,o=s.flags,s.tag){case 0:if((o&4)!==0&&(o=s.updateQueue,o=o!==null?o.events:null,o!==null))for(l=0;l<o.length;l++)v=o[l],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&_!==null){o=void 0,l=s,v=_.memoizedProps,_=_.memoizedState,h=l.stateNode;try{var Ue=mi(l.type,v);o=h.getSnapshotBeforeUpdate(Ue,_),h.__reactInternalSnapshotBeforeUpdate=o}catch(Ye){Vt(l,l.return,Ye)}}break;case 3:if((o&1024)!==0){if(o=s.stateNode.containerInfo,l=o.nodeType,l===9)uy(o);else if(l===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":uy(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=s.sibling,o!==null){o.return=s.return,Hn=o;break}Hn=s.return}}function IE(o,s,l){var h=l.flags;switch(l.tag){case 0:case 11:case 15:Na(o,l),h&4&&Jl(5,l);break;case 1:if(Na(o,l),h&4)if(o=l.stateNode,s===null)try{o.componentDidMount()}catch(k){Vt(l,l.return,k)}else{var v=mi(l.type,s.memoizedProps);s=s.memoizedState;try{o.componentDidUpdate(v,s,o.__reactInternalSnapshotBeforeUpdate)}catch(k){Vt(l,l.return,k)}}h&64&&RE(l),h&512&&eu(l,l.return);break;case 3:if(Na(o,l),h&64&&(o=l.updateQueue,o!==null)){if(s=null,l.child!==null)switch(l.child.tag){case 27:case 5:s=l.child.stateNode;break;case 1:s=l.child.stateNode}try{pS(o,s)}catch(k){Vt(l,l.return,k)}}break;case 27:s===null&&h&4&&CE(l);case 26:case 5:Na(o,l),s===null&&h&4&&TE(l),h&512&&eu(l,l.return);break;case 12:Na(o,l);break;case 31:Na(o,l),h&4&&ME(o,l);break;case 13:Na(o,l),h&4&&PE(o,l),h&64&&(o=l.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(l=uD.bind(null,l),ID(o,l))));break;case 22:if(h=l.memoizedState!==null||Aa,!h){s=s!==null&&s.memoizedState!==null||An,v=Aa;var _=An;Aa=h,(An=s)&&!_?ka(o,l,(l.subtreeFlags&8772)!==0):Na(o,l),Aa=v,An=_}break;case 30:break;default:Na(o,l)}}function NE(o){var s=o.alternate;s!==null&&(o.alternate=null,NE(s)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(s=o.stateNode,s!==null&&mg(s)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var cn=null,Cr=!1;function Ia(o,s,l){for(l=l.child;l!==null;)kE(o,s,l),l=l.sibling}function kE(o,s,l){if(rn&&typeof rn.onCommitFiberUnmount=="function")try{rn.onCommitFiberUnmount(Rn,l)}catch{}switch(l.tag){case 26:An||Jo(l,s),Ia(o,s,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:An||Jo(l,s);var h=cn,v=Cr;gs(l.type)&&(cn=l.stateNode,Cr=!1),Ia(o,s,l),lu(l.stateNode),cn=h,Cr=v;break;case 5:An||Jo(l,s);case 6:if(h=cn,v=Cr,cn=null,Ia(o,s,l),cn=h,Cr=v,cn!==null)if(Cr)try{(cn.nodeType===9?cn.body:cn.nodeName==="HTML"?cn.ownerDocument.body:cn).removeChild(l.stateNode)}catch(_){Vt(l,s,_)}else try{cn.removeChild(l.stateNode)}catch(_){Vt(l,s,_)}break;case 18:cn!==null&&(Cr?(o=cn,RR(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,l.stateNode),Nc(o)):RR(cn,l.stateNode));break;case 4:h=cn,v=Cr,cn=l.stateNode.containerInfo,Cr=!0,Ia(o,s,l),cn=h,Cr=v;break;case 0:case 11:case 14:case 15:ls(2,l,s),An||ls(4,l,s),Ia(o,s,l);break;case 1:An||(Jo(l,s),h=l.stateNode,typeof h.componentWillUnmount=="function"&&xE(l,s,h)),Ia(o,s,l);break;case 21:Ia(o,s,l);break;case 22:An=(h=An)||l.memoizedState!==null,Ia(o,s,l),An=h;break;default:Ia(o,s,l)}}function ME(o,s){if(s.memoizedState===null&&(o=s.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{Nc(o)}catch(l){Vt(s,s.return,l)}}}function PE(o,s){if(s.memoizedState===null&&(o=s.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{Nc(o)}catch(l){Vt(s,s.return,l)}}function nD(o){switch(o.tag){case 31:case 13:case 19:var s=o.stateNode;return s===null&&(s=o.stateNode=new AE),s;case 22:return o=o.stateNode,s=o._retryCache,s===null&&(s=o._retryCache=new AE),s;default:throw Error(r(435,o.tag))}}function xf(o,s){var l=nD(o);s.forEach(function(h){if(!l.has(h)){l.add(h);var v=dD.bind(null,o,h);h.then(v,v)}})}function Ar(o,s){var l=s.deletions;if(l!==null)for(var h=0;h<l.length;h++){var v=l[h],_=o,k=s,j=k;e:for(;j!==null;){switch(j.tag){case 27:if(gs(j.type)){cn=j.stateNode,Cr=!1;break e}break;case 5:cn=j.stateNode,Cr=!1;break e;case 3:case 4:cn=j.stateNode.containerInfo,Cr=!0;break e}j=j.return}if(cn===null)throw Error(r(160));kE(_,k,v),cn=null,Cr=!1,_=v.alternate,_!==null&&(_.return=null),v.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)DE(s,o),s=s.sibling}var No=null;function DE(o,s){var l=o.alternate,h=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:Ar(s,o),Ir(o),h&4&&(ls(3,o,o.return),Jl(3,o),ls(5,o,o.return));break;case 1:Ar(s,o),Ir(o),h&512&&(An||l===null||Jo(l,l.return)),h&64&&Aa&&(o=o.updateQueue,o!==null&&(h=o.callbacks,h!==null&&(l=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=l===null?h:l.concat(h))));break;case 26:var v=No;if(Ar(s,o),Ir(o),h&512&&(An||l===null||Jo(l,l.return)),h&4){var _=l!==null?l.memoizedState:null;if(h=o.memoizedState,l===null)if(h===null)if(o.stateNode===null){e:{h=o.type,l=o.memoizedProps,v=v.ownerDocument||v;t:switch(h){case"title":_=v.getElementsByTagName("title")[0],(!_||_[Ol]||_[Qn]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=v.createElement(h),v.head.insertBefore(_,v.querySelector("head > title"))),tr(_,h,l),_[Qn]=o,qn(_),h=_;break e;case"link":var k=DR("link","href",v).get(h+(l.href||""));if(k){for(var j=0;j<k.length;j++)if(_=k[j],_.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&_.getAttribute("rel")===(l.rel==null?null:l.rel)&&_.getAttribute("title")===(l.title==null?null:l.title)&&_.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){k.splice(j,1);break t}}_=v.createElement(h),tr(_,h,l),v.head.appendChild(_);break;case"meta":if(k=DR("meta","content",v).get(h+(l.content||""))){for(j=0;j<k.length;j++)if(_=k[j],_.getAttribute("content")===(l.content==null?null:""+l.content)&&_.getAttribute("name")===(l.name==null?null:l.name)&&_.getAttribute("property")===(l.property==null?null:l.property)&&_.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&_.getAttribute("charset")===(l.charSet==null?null:l.charSet)){k.splice(j,1);break t}}_=v.createElement(h),tr(_,h,l),v.head.appendChild(_);break;default:throw Error(r(468,h))}_[Qn]=o,qn(_),h=_}o.stateNode=h}else LR(v,o.type,o.stateNode);else o.stateNode=PR(v,h,o.memoizedProps);else _!==h?(_===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):_.count--,h===null?LR(v,o.type,o.stateNode):PR(v,h,o.memoizedProps)):h===null&&o.stateNode!==null&&Lv(o,o.memoizedProps,l.memoizedProps)}break;case 27:Ar(s,o),Ir(o),h&512&&(An||l===null||Jo(l,l.return)),l!==null&&h&4&&Lv(o,o.memoizedProps,l.memoizedProps);break;case 5:if(Ar(s,o),Ir(o),h&512&&(An||l===null||Jo(l,l.return)),o.flags&32){v=o.stateNode;try{ec(v,"")}catch(Ue){Vt(o,o.return,Ue)}}h&4&&o.stateNode!=null&&(v=o.memoizedProps,Lv(o,v,l!==null?l.memoizedProps:v)),h&1024&&(Uv=!0);break;case 6:if(Ar(s,o),Ir(o),h&4){if(o.stateNode===null)throw Error(r(162));h=o.memoizedProps,l=o.stateNode;try{l.nodeValue=h}catch(Ue){Vt(o,o.return,Ue)}}break;case 3:if(Vf=null,v=No,No=Uf(s.containerInfo),Ar(s,o),No=v,Ir(o),h&4&&l!==null&&l.memoizedState.isDehydrated)try{Nc(s.containerInfo)}catch(Ue){Vt(o,o.return,Ue)}Uv&&(Uv=!1,LE(o));break;case 4:h=No,No=Uf(o.stateNode.containerInfo),Ar(s,o),Ir(o),No=h;break;case 12:Ar(s,o),Ir(o);break;case 31:Ar(s,o),Ir(o),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,xf(o,h)));break;case 13:Ar(s,o),Ir(o),o.child.flags&8192&&o.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Of=Se()),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,xf(o,h)));break;case 22:v=o.memoizedState!==null;var X=l!==null&&l.memoizedState!==null,he=Aa,we=An;if(Aa=he||v,An=we||X,Ar(s,o),An=we,Aa=he,Ir(o),h&8192)e:for(s=o.stateNode,s._visibility=v?s._visibility&-2:s._visibility|1,v&&(l===null||X||Aa||An||gi(o)),l=null,s=o;;){if(s.tag===5||s.tag===26){if(l===null){X=l=s;try{if(_=X.stateNode,v)k=_.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{j=X.stateNode;var Te=X.memoizedProps.style,pe=Te!=null&&Te.hasOwnProperty("display")?Te.display:null;j.style.display=pe==null||typeof pe=="boolean"?"":(""+pe).trim()}}catch(Ue){Vt(X,X.return,Ue)}}}else if(s.tag===6){if(l===null){X=s;try{X.stateNode.nodeValue=v?"":X.memoizedProps}catch(Ue){Vt(X,X.return,Ue)}}}else if(s.tag===18){if(l===null){X=s;try{var ge=X.stateNode;v?xR(ge,!0):xR(X.stateNode,!1)}catch(Ue){Vt(X,X.return,Ue)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===o)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break e;for(;s.sibling===null;){if(s.return===null||s.return===o)break e;l===s&&(l=null),s=s.return}l===s&&(l=null),s.sibling.return=s.return,s=s.sibling}h&4&&(h=o.updateQueue,h!==null&&(l=h.retryQueue,l!==null&&(h.retryQueue=null,xf(o,l))));break;case 19:Ar(s,o),Ir(o),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,xf(o,h)));break;case 30:break;case 21:break;default:Ar(s,o),Ir(o)}}function Ir(o){var s=o.flags;if(s&2){try{for(var l,h=o.return;h!==null;){if(OE(h)){l=h;break}h=h.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var v=l.stateNode,_=jv(o);Rf(o,_,v);break;case 5:var k=l.stateNode;l.flags&32&&(ec(k,""),l.flags&=-33);var j=jv(o);Rf(o,j,k);break;case 3:case 4:var X=l.stateNode.containerInfo,he=jv(o);$v(o,he,X);break;default:throw Error(r(161))}}catch(we){Vt(o,o.return,we)}o.flags&=-3}s&4096&&(o.flags&=-4097)}function LE(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var s=o;LE(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),o=o.sibling}}function Na(o,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)IE(o,s.alternate,s),s=s.sibling}function gi(o){for(o=o.child;o!==null;){var s=o;switch(s.tag){case 0:case 11:case 14:case 15:ls(4,s,s.return),gi(s);break;case 1:Jo(s,s.return);var l=s.stateNode;typeof l.componentWillUnmount=="function"&&xE(s,s.return,l),gi(s);break;case 27:lu(s.stateNode);case 26:case 5:Jo(s,s.return),gi(s);break;case 22:s.memoizedState===null&&gi(s);break;case 30:gi(s);break;default:gi(s)}o=o.sibling}}function ka(o,s,l){for(l=l&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var h=s.alternate,v=o,_=s,k=_.flags;switch(_.tag){case 0:case 11:case 15:ka(v,_,l),Jl(4,_);break;case 1:if(ka(v,_,l),h=_,v=h.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(he){Vt(h,h.return,he)}if(h=_,v=h.updateQueue,v!==null){var j=h.stateNode;try{var X=v.shared.hiddenCallbacks;if(X!==null)for(v.shared.hiddenCallbacks=null,v=0;v<X.length;v++)hS(X[v],j)}catch(he){Vt(h,h.return,he)}}l&&k&64&&RE(_),eu(_,_.return);break;case 27:CE(_);case 26:case 5:ka(v,_,l),l&&h===null&&k&4&&TE(_),eu(_,_.return);break;case 12:ka(v,_,l);break;case 31:ka(v,_,l),l&&k&4&&ME(v,_);break;case 13:ka(v,_,l),l&&k&4&&PE(v,_);break;case 22:_.memoizedState===null&&ka(v,_,l),eu(_,_.return);break;case 30:break;default:ka(v,_,l)}s=s.sibling}}function zv(o,s){var l=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(l=o.memoizedState.cachePool.pool),o=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(o=s.memoizedState.cachePool.pool),o!==l&&(o!=null&&o.refCount++,l!=null&&zl(l))}function Vv(o,s){o=null,s.alternate!==null&&(o=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==o&&(s.refCount++,o!=null&&zl(o))}function ko(o,s,l,h){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)jE(o,s,l,h),s=s.sibling}function jE(o,s,l,h){var v=s.flags;switch(s.tag){case 0:case 11:case 15:ko(o,s,l,h),v&2048&&Jl(9,s);break;case 1:ko(o,s,l,h);break;case 3:ko(o,s,l,h),v&2048&&(o=null,s.alternate!==null&&(o=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==o&&(s.refCount++,o!=null&&zl(o)));break;case 12:if(v&2048){ko(o,s,l,h),o=s.stateNode;try{var _=s.memoizedProps,k=_.id,j=_.onPostCommit;typeof j=="function"&&j(k,s.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(X){Vt(s,s.return,X)}}else ko(o,s,l,h);break;case 31:ko(o,s,l,h);break;case 13:ko(o,s,l,h);break;case 23:break;case 22:_=s.stateNode,k=s.alternate,s.memoizedState!==null?_._visibility&2?ko(o,s,l,h):tu(o,s):_._visibility&2?ko(o,s,l,h):(_._visibility|=2,bc(o,s,l,h,(s.subtreeFlags&10256)!==0||!1)),v&2048&&zv(k,s);break;case 24:ko(o,s,l,h),v&2048&&Vv(s.alternate,s);break;default:ko(o,s,l,h)}}function bc(o,s,l,h,v){for(v=v&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var _=o,k=s,j=l,X=h,he=k.flags;switch(k.tag){case 0:case 11:case 15:bc(_,k,j,X,v),Jl(8,k);break;case 23:break;case 22:var we=k.stateNode;k.memoizedState!==null?we._visibility&2?bc(_,k,j,X,v):tu(_,k):(we._visibility|=2,bc(_,k,j,X,v)),v&&he&2048&&zv(k.alternate,k);break;case 24:bc(_,k,j,X,v),v&&he&2048&&Vv(k.alternate,k);break;default:bc(_,k,j,X,v)}s=s.sibling}}function tu(o,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var l=o,h=s,v=h.flags;switch(h.tag){case 22:tu(l,h),v&2048&&zv(h.alternate,h);break;case 24:tu(l,h),v&2048&&Vv(h.alternate,h);break;default:tu(l,h)}s=s.sibling}}var nu=8192;function wc(o,s,l){if(o.subtreeFlags&nu)for(o=o.child;o!==null;)$E(o,s,l),o=o.sibling}function $E(o,s,l){switch(o.tag){case 26:wc(o,s,l),o.flags&nu&&o.memoizedState!==null&&FD(l,No,o.memoizedState,o.memoizedProps);break;case 5:wc(o,s,l);break;case 3:case 4:var h=No;No=Uf(o.stateNode.containerInfo),wc(o,s,l),No=h;break;case 22:o.memoizedState===null&&(h=o.alternate,h!==null&&h.memoizedState!==null?(h=nu,nu=16777216,wc(o,s,l),nu=h):wc(o,s,l));break;default:wc(o,s,l)}}function UE(o){var s=o.alternate;if(s!==null&&(o=s.child,o!==null)){s.child=null;do s=o.sibling,o.sibling=null,o=s;while(o!==null)}}function ru(o){var s=o.deletions;if((o.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var h=s[l];Hn=h,VE(h,o)}UE(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)zE(o),o=o.sibling}function zE(o){switch(o.tag){case 0:case 11:case 15:ru(o),o.flags&2048&&ls(9,o,o.return);break;case 3:ru(o);break;case 12:ru(o);break;case 22:var s=o.stateNode;o.memoizedState!==null&&s._visibility&2&&(o.return===null||o.return.tag!==13)?(s._visibility&=-3,Tf(o)):ru(o);break;default:ru(o)}}function Tf(o){var s=o.deletions;if((o.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var h=s[l];Hn=h,VE(h,o)}UE(o)}for(o=o.child;o!==null;){switch(s=o,s.tag){case 0:case 11:case 15:ls(8,s,s.return),Tf(s);break;case 22:l=s.stateNode,l._visibility&2&&(l._visibility&=-3,Tf(s));break;default:Tf(s)}o=o.sibling}}function VE(o,s){for(;Hn!==null;){var l=Hn;switch(l.tag){case 0:case 11:case 15:ls(8,l,s);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var h=l.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:zl(l.memoizedState.cache)}if(h=l.child,h!==null)h.return=l,Hn=h;else e:for(l=o;Hn!==null;){h=Hn;var v=h.sibling,_=h.return;if(NE(h),h===l){Hn=null;break e}if(v!==null){v.return=_,Hn=v;break e}Hn=_}}}var rD={getCacheForType:function(o){var s=Jn(Tn),l=s.data.get(o);return l===void 0&&(l=o(),s.data.set(o,l)),l},cacheSignal:function(){return Jn(Tn).controller.signal}},oD=typeof WeakMap=="function"?WeakMap:Map,$t=0,Xt=null,_t=null,Et=0,zt=0,qr=null,us=!1,Sc=!1,Fv=!1,Ma=0,gn=0,ds=0,vi=0,Bv=0,Hr=0,Ec=0,ou=null,Nr=null,qv=!1,Of=0,FE=0,Cf=1/0,Af=null,fs=null,$n=0,hs=null,Rc=null,Pa=0,Hv=0,Gv=null,BE=null,au=0,Zv=null;function Gr(){return($t&2)!==0&&Et!==0?Et&-Et:F.T!==null?Jv():hg()}function qE(){if(Hr===0)if((Et&536870912)===0||xt){var o=Ct;Ct<<=1,(Ct&3932160)===0&&(Ct=262144),Hr=o}else Hr=536870912;return o=Fr.current,o!==null&&(o.flags|=32),Hr}function kr(o,s,l){(o===Xt&&(zt===2||zt===9)||o.cancelPendingCommit!==null)&&(xc(o,0),ps(o,Et,Hr,!1)),Pt(o,l),(($t&2)===0||o!==Xt)&&(o===Xt&&(($t&2)===0&&(vi|=l),gn===4&&ps(o,Et,Hr,!1)),ea(o))}function HE(o,s,l){if(($t&6)!==0)throw Error(r(327));var h=!l&&(s&127)===0&&(s&o.expiredLanes)===0||dt(o,s),v=h?iD(o,s):Kv(o,s,!0),_=h;do{if(v===0){Sc&&!h&&ps(o,s,0,!1);break}else{if(l=o.current.alternate,_&&!aD(l)){v=Kv(o,s,!1),_=!1;continue}if(v===2){if(_=s,o.errorRecoveryDisabledLanes&_)var k=0;else k=o.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){s=k;e:{var j=o;v=ou;var X=j.current.memoizedState.isDehydrated;if(X&&(xc(j,k).flags|=256),k=Kv(j,k,!1),k!==2){if(Fv&&!X){j.errorRecoveryDisabledLanes|=_,vi|=_,v=4;break e}_=Nr,Nr=v,_!==null&&(Nr===null?Nr=_:Nr.push.apply(Nr,_))}v=k}if(_=!1,v!==2)continue}}if(v===1){xc(o,0),ps(o,s,0,!0);break}e:{switch(h=o,_=v,_){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:ps(h,s,Hr,!us);break e;case 2:Nr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(v=Of+300-Se(),10<v)){if(ps(h,s,Hr,!us),He(h,0,!0)!==0)break e;Pa=s,h.timeoutHandle=SR(GE.bind(null,h,l,Nr,Af,qv,s,Hr,vi,Ec,us,_,"Throttled",-0,0),v);break e}GE(h,l,Nr,Af,qv,s,Hr,vi,Ec,us,_,null,-0,0)}}break}while(!0);ea(o)}function GE(o,s,l,h,v,_,k,j,X,he,we,Te,pe,ge){if(o.timeoutHandle=-1,Te=s.subtreeFlags,Te&8192||(Te&16785408)===16785408){Te={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_a},$E(s,_,Te);var Ue=(_&62914560)===_?Of-Se():(_&4194048)===_?FE-Se():0;if(Ue=BD(Te,Ue),Ue!==null){Pa=_,o.cancelPendingCommit=Ue(eR.bind(null,o,s,_,l,h,v,k,j,X,we,Te,null,pe,ge)),ps(o,_,k,!he);return}}eR(o,s,_,l,h,v,k,j,X)}function aD(o){for(var s=o;;){var l=s.tag;if((l===0||l===11||l===15)&&s.flags&16384&&(l=s.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var h=0;h<l.length;h++){var v=l[h],_=v.getSnapshot;v=v.value;try{if(!zr(_(),v))return!1}catch{return!1}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===o)break;for(;s.sibling===null;){if(s.return===null||s.return===o)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function ps(o,s,l,h){s&=~Bv,s&=~vi,o.suspendedLanes|=s,o.pingedLanes&=~s,h&&(o.warmLanes|=s),h=o.expirationTimes;for(var v=s;0<v;){var _=31-xn(v),k=1<<_;h[_]=-1,v&=~k}l!==0&&ao(o,l,s)}function If(){return($t&6)===0?(su(0),!1):!0}function Wv(){if(_t!==null){if(zt===0)var o=_t.return;else o=_t,Ea=ci=null,uv(o),mc=null,Fl=0,o=_t;for(;o!==null;)EE(o.alternate,o),o=o.return;_t=null}}function xc(o,s){var l=o.timeoutHandle;l!==-1&&(o.timeoutHandle=-1,xD(l)),l=o.cancelPendingCommit,l!==null&&(o.cancelPendingCommit=null,l()),Pa=0,Wv(),Xt=o,_t=l=wa(o.current,null),Et=s,zt=0,qr=null,us=!1,Sc=dt(o,s),Fv=!1,Ec=Hr=Bv=vi=ds=gn=0,Nr=ou=null,qv=!1,(s&8)!==0&&(s|=s&32);var h=o.entangledLanes;if(h!==0)for(o=o.entanglements,h&=s;0<h;){var v=31-xn(h),_=1<<v;s|=o[v],h&=~_}return Ma=s,Yd(),l}function ZE(o,s){it=null,F.H=Yl,s===pc||s===of?(s=lS(),zt=3):s===Xg?(s=lS(),zt=4):zt=s===Tv?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,qr=s,_t===null&&(gn=1,_f(o,lo(s,o.current)))}function WE(){var o=Fr.current;return o===null?!0:(Et&4194048)===Et?po===null:(Et&62914560)===Et||(Et&536870912)!==0?o===po:!1}function KE(){var o=F.H;return F.H=Yl,o===null?Yl:o}function YE(){var o=F.A;return F.A=rD,o}function Nf(){gn=4,us||(Et&4194048)!==Et&&Fr.current!==null||(Sc=!0),(ds&134217727)===0&&(vi&134217727)===0||Xt===null||ps(Xt,Et,Hr,!1)}function Kv(o,s,l){var h=$t;$t|=2;var v=KE(),_=YE();(Xt!==o||Et!==s)&&(Af=null,xc(o,s)),s=!1;var k=gn;e:do try{if(zt!==0&&_t!==null){var j=_t,X=qr;switch(zt){case 8:Wv(),k=6;break e;case 3:case 2:case 9:case 6:Fr.current===null&&(s=!0);var he=zt;if(zt=0,qr=null,Tc(o,j,X,he),l&&Sc){k=0;break e}break;default:he=zt,zt=0,qr=null,Tc(o,j,X,he)}}sD(),k=gn;break}catch(we){ZE(o,we)}while(!0);return s&&o.shellSuspendCounter++,Ea=ci=null,$t=h,F.H=v,F.A=_,_t===null&&(Xt=null,Et=0,Yd()),k}function sD(){for(;_t!==null;)QE(_t)}function iD(o,s){var l=$t;$t|=2;var h=KE(),v=YE();Xt!==o||Et!==s?(Af=null,Cf=Se()+500,xc(o,s)):Sc=dt(o,s);e:do try{if(zt!==0&&_t!==null){s=_t;var _=qr;t:switch(zt){case 1:zt=0,qr=null,Tc(o,s,_,1);break;case 2:case 9:if(iS(_)){zt=0,qr=null,XE(s);break}s=function(){zt!==2&&zt!==9||Xt!==o||(zt=7),ea(o)},_.then(s,s);break e;case 3:zt=7;break e;case 4:zt=5;break e;case 7:iS(_)?(zt=0,qr=null,XE(s)):(zt=0,qr=null,Tc(o,s,_,7));break;case 5:var k=null;switch(_t.tag){case 26:k=_t.memoizedState;case 5:case 27:var j=_t;if(k?jR(k):j.stateNode.complete){zt=0,qr=null;var X=j.sibling;if(X!==null)_t=X;else{var he=j.return;he!==null?(_t=he,kf(he)):_t=null}break t}}zt=0,qr=null,Tc(o,s,_,5);break;case 6:zt=0,qr=null,Tc(o,s,_,6);break;case 8:Wv(),gn=6;break e;default:throw Error(r(462))}}cD();break}catch(we){ZE(o,we)}while(!0);return Ea=ci=null,F.H=h,F.A=v,$t=l,_t!==null?0:(Xt=null,Et=0,Yd(),gn)}function cD(){for(;_t!==null&&!te();)QE(_t)}function QE(o){var s=wE(o.alternate,o,Ma);o.memoizedProps=o.pendingProps,s===null?kf(o):_t=s}function XE(o){var s=o,l=s.alternate;switch(s.tag){case 15:case 0:s=mE(l,s,s.pendingProps,s.type,void 0,Et);break;case 11:s=mE(l,s,s.pendingProps,s.type.render,s.ref,Et);break;case 5:uv(s);default:EE(l,s),s=_t=Yw(s,Ma),s=wE(l,s,Ma)}o.memoizedProps=o.pendingProps,s===null?kf(o):_t=s}function Tc(o,s,l,h){Ea=ci=null,uv(s),mc=null,Fl=0;var v=s.return;try{if(Y3(o,v,s,l,Et)){gn=1,_f(o,lo(l,o.current)),_t=null;return}}catch(_){if(v!==null)throw _t=v,_;gn=1,_f(o,lo(l,o.current)),_t=null;return}s.flags&32768?(xt||h===1?o=!0:Sc||(Et&536870912)!==0?o=!1:(us=o=!0,(h===2||h===9||h===3||h===6)&&(h=Fr.current,h!==null&&h.tag===13&&(h.flags|=16384))),JE(s,o)):kf(s)}function kf(o){var s=o;do{if((s.flags&32768)!==0){JE(s,us);return}o=s.return;var l=J3(s.alternate,s,Ma);if(l!==null){_t=l;return}if(s=s.sibling,s!==null){_t=s;return}_t=s=o}while(s!==null);gn===0&&(gn=5)}function JE(o,s){do{var l=eD(o.alternate,o);if(l!==null){l.flags&=32767,_t=l;return}if(l=o.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!s&&(o=o.sibling,o!==null)){_t=o;return}_t=o=l}while(o!==null);gn=6,_t=null}function eR(o,s,l,h,v,_,k,j,X){o.cancelPendingCommit=null;do Mf();while($n!==0);if(($t&6)!==0)throw Error(r(327));if(s!==null){if(s===o.current)throw Error(r(177));if(_=s.lanes|s.childLanes,_|=jg,on(o,l,_,k,j,X),o===Xt&&(_t=Xt=null,Et=0),Rc=s,hs=o,Pa=l,Hv=_,Gv=v,BE=h,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,fD(Je,function(){return aR(),null})):(o.callbackNode=null,o.callbackPriority=0),h=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||h){h=F.T,F.T=null,v=Y.p,Y.p=2,k=$t,$t|=4;try{tD(o,s,l)}finally{$t=k,Y.p=v,F.T=h}}$n=1,tR(),nR(),rR()}}function tR(){if($n===1){$n=0;var o=hs,s=Rc,l=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||l){l=F.T,F.T=null;var h=Y.p;Y.p=2;var v=$t;$t|=4;try{DE(s,o);var _=iy,k=Vw(o.containerInfo),j=_.focusedElem,X=_.selectionRange;if(k!==j&&j&&j.ownerDocument&&zw(j.ownerDocument.documentElement,j)){if(X!==null&&kg(j)){var he=X.start,we=X.end;if(we===void 0&&(we=he),"selectionStart"in j)j.selectionStart=he,j.selectionEnd=Math.min(we,j.value.length);else{var Te=j.ownerDocument||document,pe=Te&&Te.defaultView||window;if(pe.getSelection){var ge=pe.getSelection(),Ue=j.textContent.length,Ye=Math.min(X.start,Ue),Kt=X.end===void 0?Ye:Math.min(X.end,Ue);!ge.extend&&Ye>Kt&&(k=Kt,Kt=Ye,Ye=k);var ce=Uw(j,Ye),ne=Uw(j,Kt);if(ce&&ne&&(ge.rangeCount!==1||ge.anchorNode!==ce.node||ge.anchorOffset!==ce.offset||ge.focusNode!==ne.node||ge.focusOffset!==ne.offset)){var de=Te.createRange();de.setStart(ce.node,ce.offset),ge.removeAllRanges(),Ye>Kt?(ge.addRange(de),ge.extend(ne.node,ne.offset)):(de.setEnd(ne.node,ne.offset),ge.addRange(de))}}}}for(Te=[],ge=j;ge=ge.parentNode;)ge.nodeType===1&&Te.push({element:ge,left:ge.scrollLeft,top:ge.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<Te.length;j++){var Ee=Te[j];Ee.element.scrollLeft=Ee.left,Ee.element.scrollTop=Ee.top}}Hf=!!sy,iy=sy=null}finally{$t=v,Y.p=h,F.T=l}}o.current=s,$n=2}}function nR(){if($n===2){$n=0;var o=hs,s=Rc,l=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||l){l=F.T,F.T=null;var h=Y.p;Y.p=2;var v=$t;$t|=4;try{IE(o,s.alternate,s)}finally{$t=v,Y.p=h,F.T=l}}$n=3}}function rR(){if($n===4||$n===3){$n=0,oe();var o=hs,s=Rc,l=Pa,h=BE;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?$n=5:($n=0,Rc=hs=null,oR(o,o.pendingLanes));var v=o.pendingLanes;if(v===0&&(fs=null),Ao(l),s=s.stateNode,rn&&typeof rn.onCommitFiberRoot=="function")try{rn.onCommitFiberRoot(Rn,s,void 0,(s.current.flags&128)===128)}catch{}if(h!==null){s=F.T,v=Y.p,Y.p=2,F.T=null;try{for(var _=o.onRecoverableError,k=0;k<h.length;k++){var j=h[k];_(j.value,{componentStack:j.stack})}}finally{F.T=s,Y.p=v}}(Pa&3)!==0&&Mf(),ea(o),v=o.pendingLanes,(l&261930)!==0&&(v&42)!==0?o===Zv?au++:(au=0,Zv=o):au=0,su(0)}}function oR(o,s){(o.pooledCacheLanes&=s)===0&&(s=o.pooledCache,s!=null&&(o.pooledCache=null,zl(s)))}function Mf(){return tR(),nR(),rR(),aR()}function aR(){if($n!==5)return!1;var o=hs,s=Hv;Hv=0;var l=Ao(Pa),h=F.T,v=Y.p;try{Y.p=32>l?32:l,F.T=null,l=Gv,Gv=null;var _=hs,k=Pa;if($n=0,Rc=hs=null,Pa=0,($t&6)!==0)throw Error(r(331));var j=$t;if($t|=4,zE(_.current),jE(_,_.current,k,l),$t=j,su(0,!1),rn&&typeof rn.onPostCommitFiberRoot=="function")try{rn.onPostCommitFiberRoot(Rn,_)}catch{}return!0}finally{Y.p=v,F.T=h,oR(o,s)}}function sR(o,s,l){s=lo(l,s),s=xv(o.stateNode,s,2),o=ss(o,s,2),o!==null&&(Pt(o,2),ea(o))}function Vt(o,s,l){if(o.tag===3)sR(o,o,l);else for(;s!==null;){if(s.tag===3){sR(s,o,l);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(fs===null||!fs.has(h))){o=lo(l,o),l=iE(2),h=ss(s,l,2),h!==null&&(cE(l,h,s,o),Pt(h,2),ea(h));break}}s=s.return}}function Yv(o,s,l){var h=o.pingCache;if(h===null){h=o.pingCache=new oD;var v=new Set;h.set(s,v)}else v=h.get(s),v===void 0&&(v=new Set,h.set(s,v));v.has(l)||(Fv=!0,v.add(l),o=lD.bind(null,o,s,l),s.then(o,o))}function lD(o,s,l){var h=o.pingCache;h!==null&&h.delete(s),o.pingedLanes|=o.suspendedLanes&l,o.warmLanes&=~l,Xt===o&&(Et&l)===l&&(gn===4||gn===3&&(Et&62914560)===Et&&300>Se()-Of?($t&2)===0&&xc(o,0):Bv|=l,Ec===Et&&(Ec=0)),ea(o)}function iR(o,s){s===0&&(s=Gt()),o=ai(o,s),o!==null&&(Pt(o,s),ea(o))}function uD(o){var s=o.memoizedState,l=0;s!==null&&(l=s.retryLane),iR(o,l)}function dD(o,s){var l=0;switch(o.tag){case 31:case 13:var h=o.stateNode,v=o.memoizedState;v!==null&&(l=v.retryLane);break;case 19:h=o.stateNode;break;case 22:h=o.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(s),iR(o,l)}function fD(o,s){return Ke(o,s)}var Pf=null,Oc=null,Qv=!1,Df=!1,Xv=!1,ms=0;function ea(o){o!==Oc&&o.next===null&&(Oc===null?Pf=Oc=o:Oc=Oc.next=o),Df=!0,Qv||(Qv=!0,pD())}function su(o,s){if(!Xv&&Df){Xv=!0;do for(var l=!1,h=Pf;h!==null;){if(o!==0){var v=h.pendingLanes;if(v===0)var _=0;else{var k=h.suspendedLanes,j=h.pingedLanes;_=(1<<31-xn(42|o)+1)-1,_&=v&~(k&~j),_=_&201326741?_&201326741|1:_?_|2:0}_!==0&&(l=!0,dR(h,_))}else _=Et,_=He(h,h===Xt?_:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(_&3)===0||dt(h,_)||(l=!0,dR(h,_));h=h.next}while(l);Xv=!1}}function hD(){cR()}function cR(){Df=Qv=!1;var o=0;ms!==0&&RD()&&(o=ms);for(var s=Se(),l=null,h=Pf;h!==null;){var v=h.next,_=lR(h,s);_===0?(h.next=null,l===null?Pf=v:l.next=v,v===null&&(Oc=l)):(l=h,(o!==0||(_&3)!==0)&&(Df=!0)),h=v}$n!==0&&$n!==5||su(o),ms!==0&&(ms=0)}function lR(o,s){for(var l=o.suspendedLanes,h=o.pingedLanes,v=o.expirationTimes,_=o.pendingLanes&-62914561;0<_;){var k=31-xn(_),j=1<<k,X=v[k];X===-1?((j&l)===0||(j&h)!==0)&&(v[k]=Qt(j,s)):X<=s&&(o.expiredLanes|=j),_&=~j}if(s=Xt,l=Et,l=He(o,o===s?l:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),h=o.callbackNode,l===0||o===s&&(zt===2||zt===9)||o.cancelPendingCommit!==null)return h!==null&&h!==null&&Z(h),o.callbackNode=null,o.callbackPriority=0;if((l&3)===0||dt(o,l)){if(s=l&-l,s===o.callbackPriority)return s;switch(h!==null&&Z(h),Ao(l)){case 2:case 8:l=ke;break;case 32:l=Je;break;case 268435456:l=kt;break;default:l=Je}return h=uR.bind(null,o),l=Ke(l,h),o.callbackPriority=s,o.callbackNode=l,s}return h!==null&&h!==null&&Z(h),o.callbackPriority=2,o.callbackNode=null,2}function uR(o,s){if($n!==0&&$n!==5)return o.callbackNode=null,o.callbackPriority=0,null;var l=o.callbackNode;if(Mf()&&o.callbackNode!==l)return null;var h=Et;return h=He(o,o===Xt?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),h===0?null:(HE(o,h,s),lR(o,Se()),o.callbackNode!=null&&o.callbackNode===l?uR.bind(null,o):null)}function dR(o,s){if(Mf())return null;HE(o,s,!0)}function pD(){TD(function(){($t&6)!==0?Ke(Re,hD):cR()})}function Jv(){if(ms===0){var o=fc;o===0&&(o=St,St<<=1,(St&261888)===0&&(St=256)),ms=o}return ms}function fR(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:Fd(""+o)}function hR(o,s){var l=s.ownerDocument.createElement("input");return l.name=s.name,l.value=s.value,o.id&&l.setAttribute("form",o.id),s.parentNode.insertBefore(l,s),o=new FormData(o),l.parentNode.removeChild(l),o}function mD(o,s,l,h,v){if(s==="submit"&&l&&l.stateNode===v){var _=fR((v[Tr]||null).action),k=h.submitter;k&&(s=(s=k[Tr]||null)?fR(s.formAction):k.getAttribute("formAction"),s!==null&&(_=s,k=null));var j=new Gd("action","action",null,h,v);o.push({event:j,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(ms!==0){var X=k?hR(v,k):new FormData(v);_v(l,{pending:!0,data:X,method:v.method,action:_},null,X)}}else typeof _=="function"&&(j.preventDefault(),X=k?hR(v,k):new FormData(v),_v(l,{pending:!0,data:X,method:v.method,action:_},_,X))},currentTarget:v}]})}}for(var ey=0;ey<Lg.length;ey++){var ty=Lg[ey],gD=ty.toLowerCase(),vD=ty[0].toUpperCase()+ty.slice(1);Io(gD,"on"+vD)}Io(qw,"onAnimationEnd"),Io(Hw,"onAnimationIteration"),Io(Gw,"onAnimationStart"),Io("dblclick","onDoubleClick"),Io("focusin","onFocus"),Io("focusout","onBlur"),Io(M3,"onTransitionRun"),Io(P3,"onTransitionStart"),Io(D3,"onTransitionCancel"),Io(Zw,"onTransitionEnd"),Xi("onMouseEnter",["mouseout","mouseover"]),Xi("onMouseLeave",["mouseout","mouseover"]),Xi("onPointerEnter",["pointerout","pointerover"]),Xi("onPointerLeave",["pointerout","pointerover"]),ti("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ti("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ti("onBeforeInput",["compositionend","keypress","textInput","paste"]),ti("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ti("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ti("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var iu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),yD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(iu));function pR(o,s){s=(s&4)!==0;for(var l=0;l<o.length;l++){var h=o[l],v=h.event;h=h.listeners;e:{var _=void 0;if(s)for(var k=h.length-1;0<=k;k--){var j=h[k],X=j.instance,he=j.currentTarget;if(j=j.listener,X!==_&&v.isPropagationStopped())break e;_=j,v.currentTarget=he;try{_(v)}catch(we){Kd(we)}v.currentTarget=null,_=X}else for(k=0;k<h.length;k++){if(j=h[k],X=j.instance,he=j.currentTarget,j=j.listener,X!==_&&v.isPropagationStopped())break e;_=j,v.currentTarget=he;try{_(v)}catch(we){Kd(we)}v.currentTarget=null,_=X}}}}function bt(o,s){var l=s[pg];l===void 0&&(l=s[pg]=new Set);var h=o+"__bubble";l.has(h)||(mR(s,o,2,!1),l.add(h))}function ny(o,s,l){var h=0;s&&(h|=4),mR(l,o,h,s)}var Lf="_reactListening"+Math.random().toString(36).slice(2);function ry(o){if(!o[Lf]){o[Lf]=!0,cw.forEach(function(l){l!=="selectionchange"&&(yD.has(l)||ny(l,!1,o),ny(l,!0,o))});var s=o.nodeType===9?o:o.ownerDocument;s===null||s[Lf]||(s[Lf]=!0,ny("selectionchange",!1,s))}}function mR(o,s,l,h){switch(qR(s)){case 2:var v=GD;break;case 8:v=ZD;break;default:v=yy}l=v.bind(null,s,l,o),v=void 0,!Eg||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(v=!0),h?v!==void 0?o.addEventListener(s,l,{capture:!0,passive:v}):o.addEventListener(s,l,!0):v!==void 0?o.addEventListener(s,l,{passive:v}):o.addEventListener(s,l,!1)}function oy(o,s,l,h,v){var _=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var k=h.tag;if(k===3||k===4){var j=h.stateNode.containerInfo;if(j===v)break;if(k===4)for(k=h.return;k!==null;){var X=k.tag;if((X===3||X===4)&&k.stateNode.containerInfo===v)return;k=k.return}for(;j!==null;){if(k=Ki(j),k===null)return;if(X=k.tag,X===5||X===6||X===26||X===27){h=_=k;continue e}j=j.parentNode}}h=h.return}bw(function(){var he=_,we=wg(l),Te=[];e:{var pe=Ww.get(o);if(pe!==void 0){var ge=Gd,Ue=o;switch(o){case"keypress":if(qd(l)===0)break e;case"keydown":case"keyup":ge=d3;break;case"focusin":Ue="focus",ge=Og;break;case"focusout":Ue="blur",ge=Og;break;case"beforeblur":case"afterblur":ge=Og;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ge=Ew;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=JP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=p3;break;case qw:case Hw:case Gw:ge=n3;break;case Zw:ge=g3;break;case"scroll":case"scrollend":ge=QP;break;case"wheel":ge=y3;break;case"copy":case"cut":case"paste":ge=o3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=xw;break;case"toggle":case"beforetoggle":ge=b3}var Ye=(s&4)!==0,Kt=!Ye&&(o==="scroll"||o==="scrollend"),ce=Ye?pe!==null?pe+"Capture":null:pe;Ye=[];for(var ne=he,de;ne!==null;){var Ee=ne;if(de=Ee.stateNode,Ee=Ee.tag,Ee!==5&&Ee!==26&&Ee!==27||de===null||ce===null||(Ee=Al(ne,ce),Ee!=null&&Ye.push(cu(ne,Ee,de))),Kt)break;ne=ne.return}0<Ye.length&&(pe=new ge(pe,Ue,null,l,we),Te.push({event:pe,listeners:Ye}))}}if((s&7)===0){e:{if(pe=o==="mouseover"||o==="pointerover",ge=o==="mouseout"||o==="pointerout",pe&&l!==bg&&(Ue=l.relatedTarget||l.fromElement)&&(Ki(Ue)||Ue[Wi]))break e;if((ge||pe)&&(pe=we.window===we?we:(pe=we.ownerDocument)?pe.defaultView||pe.parentWindow:window,ge?(Ue=l.relatedTarget||l.toElement,ge=he,Ue=Ue?Ki(Ue):null,Ue!==null&&(Kt=i(Ue),Ye=Ue.tag,Ue!==Kt||Ye!==5&&Ye!==27&&Ye!==6)&&(Ue=null)):(ge=null,Ue=he),ge!==Ue)){if(Ye=Ew,Ee="onMouseLeave",ce="onMouseEnter",ne="mouse",(o==="pointerout"||o==="pointerover")&&(Ye=xw,Ee="onPointerLeave",ce="onPointerEnter",ne="pointer"),Kt=ge==null?pe:Cl(ge),de=Ue==null?pe:Cl(Ue),pe=new Ye(Ee,ne+"leave",ge,l,we),pe.target=Kt,pe.relatedTarget=de,Ee=null,Ki(we)===he&&(Ye=new Ye(ce,ne+"enter",Ue,l,we),Ye.target=de,Ye.relatedTarget=Kt,Ee=Ye),Kt=Ee,ge&&Ue)t:{for(Ye=_D,ce=ge,ne=Ue,de=0,Ee=ce;Ee;Ee=Ye(Ee))de++;Ee=0;for(var We=ne;We;We=Ye(We))Ee++;for(;0<de-Ee;)ce=Ye(ce),de--;for(;0<Ee-de;)ne=Ye(ne),Ee--;for(;de--;){if(ce===ne||ne!==null&&ce===ne.alternate){Ye=ce;break t}ce=Ye(ce),ne=Ye(ne)}Ye=null}else Ye=null;ge!==null&&gR(Te,pe,ge,Ye,!1),Ue!==null&&Kt!==null&&gR(Te,Kt,Ue,Ye,!0)}}e:{if(pe=he?Cl(he):window,ge=pe.nodeName&&pe.nodeName.toLowerCase(),ge==="select"||ge==="input"&&pe.type==="file")var Dt=Mw;else if(Nw(pe))if(Pw)Dt=I3;else{Dt=C3;var Ge=O3}else ge=pe.nodeName,!ge||ge.toLowerCase()!=="input"||pe.type!=="checkbox"&&pe.type!=="radio"?he&&_g(he.elementType)&&(Dt=Mw):Dt=A3;if(Dt&&(Dt=Dt(o,he))){kw(Te,Dt,l,we);break e}Ge&&Ge(o,pe,he),o==="focusout"&&he&&pe.type==="number"&&he.memoizedProps.value!=null&&yg(pe,"number",pe.value)}switch(Ge=he?Cl(he):window,o){case"focusin":(Nw(Ge)||Ge.contentEditable==="true")&&(oc=Ge,Mg=he,jl=null);break;case"focusout":jl=Mg=oc=null;break;case"mousedown":Pg=!0;break;case"contextmenu":case"mouseup":case"dragend":Pg=!1,Fw(Te,l,we);break;case"selectionchange":if(k3)break;case"keydown":case"keyup":Fw(Te,l,we)}var ct;if(Ag)e:{switch(o){case"compositionstart":var Rt="onCompositionStart";break e;case"compositionend":Rt="onCompositionEnd";break e;case"compositionupdate":Rt="onCompositionUpdate";break e}Rt=void 0}else rc?Aw(o,l)&&(Rt="onCompositionEnd"):o==="keydown"&&l.keyCode===229&&(Rt="onCompositionStart");Rt&&(Tw&&l.locale!=="ko"&&(rc||Rt!=="onCompositionStart"?Rt==="onCompositionEnd"&&rc&&(ct=ww()):(Ja=we,Rg="value"in Ja?Ja.value:Ja.textContent,rc=!0)),Ge=jf(he,Rt),0<Ge.length&&(Rt=new Rw(Rt,o,null,l,we),Te.push({event:Rt,listeners:Ge}),ct?Rt.data=ct:(ct=Iw(l),ct!==null&&(Rt.data=ct)))),(ct=S3?E3(o,l):R3(o,l))&&(Rt=jf(he,"onBeforeInput"),0<Rt.length&&(Ge=new Rw("onBeforeInput","beforeinput",null,l,we),Te.push({event:Ge,listeners:Rt}),Ge.data=ct)),mD(Te,o,he,l,we)}pR(Te,s)})}function cu(o,s,l){return{instance:o,listener:s,currentTarget:l}}function jf(o,s){for(var l=s+"Capture",h=[];o!==null;){var v=o,_=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||_===null||(v=Al(o,l),v!=null&&h.unshift(cu(o,v,_)),v=Al(o,s),v!=null&&h.push(cu(o,v,_))),o.tag===3)return h;o=o.return}return[]}function _D(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function gR(o,s,l,h,v){for(var _=s._reactName,k=[];l!==null&&l!==h;){var j=l,X=j.alternate,he=j.stateNode;if(j=j.tag,X!==null&&X===h)break;j!==5&&j!==26&&j!==27||he===null||(X=he,v?(he=Al(l,_),he!=null&&k.unshift(cu(l,he,X))):v||(he=Al(l,_),he!=null&&k.push(cu(l,he,X)))),l=l.return}k.length!==0&&o.push({event:s,listeners:k})}var bD=/\r\n?/g,wD=/\u0000|\uFFFD/g;function vR(o){return(typeof o=="string"?o:""+o).replace(bD,`
10
- `).replace(wD,"")}function yR(o,s){return s=vR(s),vR(o)===s}function Wt(o,s,l,h,v,_){switch(l){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||ec(o,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&ec(o,""+h);break;case"className":zd(o,"class",h);break;case"tabIndex":zd(o,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":zd(o,l,h);break;case"style":yw(o,h,_);break;case"data":if(s!=="object"){zd(o,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||l!=="href")){o.removeAttribute(l);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(l);break}h=Fd(""+h),o.setAttribute(l,h);break;case"action":case"formAction":if(typeof h=="function"){o.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof _=="function"&&(l==="formAction"?(s!=="input"&&Wt(o,s,"name",v.name,v,null),Wt(o,s,"formEncType",v.formEncType,v,null),Wt(o,s,"formMethod",v.formMethod,v,null),Wt(o,s,"formTarget",v.formTarget,v,null)):(Wt(o,s,"encType",v.encType,v,null),Wt(o,s,"method",v.method,v,null),Wt(o,s,"target",v.target,v,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(l);break}h=Fd(""+h),o.setAttribute(l,h);break;case"onClick":h!=null&&(o.onclick=_a);break;case"onScroll":h!=null&&bt("scroll",o);break;case"onScrollEnd":h!=null&&bt("scrollend",o);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(l=h.__html,l!=null){if(v.children!=null)throw Error(r(60));o.innerHTML=l}}break;case"multiple":o.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":o.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){o.removeAttribute("xlink:href");break}l=Fd(""+h),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(l,""+h):o.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":h&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(l,""):o.removeAttribute(l);break;case"capture":case"download":h===!0?o.setAttribute(l,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(l,h):o.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?o.setAttribute(l,h):o.removeAttribute(l);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?o.removeAttribute(l):o.setAttribute(l,h);break;case"popover":bt("beforetoggle",o),bt("toggle",o),Ud(o,"popover",h);break;case"xlinkActuate":ya(o,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":ya(o,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":ya(o,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":ya(o,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":ya(o,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":ya(o,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":ya(o,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":ya(o,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":ya(o,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Ud(o,"is",h);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=KP.get(l)||l,Ud(o,l,h))}}function ay(o,s,l,h,v,_){switch(l){case"style":yw(o,h,_);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(l=h.__html,l!=null){if(v.children!=null)throw Error(r(60));o.innerHTML=l}}break;case"children":typeof h=="string"?ec(o,h):(typeof h=="number"||typeof h=="bigint")&&ec(o,""+h);break;case"onScroll":h!=null&&bt("scroll",o);break;case"onScrollEnd":h!=null&&bt("scrollend",o);break;case"onClick":h!=null&&(o.onclick=_a);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!lw.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(v=l.endsWith("Capture"),s=l.slice(2,v?l.length-7:void 0),_=o[Tr]||null,_=_!=null?_[l]:null,typeof _=="function"&&o.removeEventListener(s,_,v),typeof h=="function")){typeof _!="function"&&_!==null&&(l in o?o[l]=null:o.hasAttribute(l)&&o.removeAttribute(l)),o.addEventListener(s,h,v);break e}l in o?o[l]=h:h===!0?o.setAttribute(l,""):Ud(o,l,h)}}}function tr(o,s,l){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":bt("error",o),bt("load",o);var h=!1,v=!1,_;for(_ in l)if(l.hasOwnProperty(_)){var k=l[_];if(k!=null)switch(_){case"src":h=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Wt(o,s,_,k,l,null)}}v&&Wt(o,s,"srcSet",l.srcSet,l,null),h&&Wt(o,s,"src",l.src,l,null);return;case"input":bt("invalid",o);var j=_=k=v=null,X=null,he=null;for(h in l)if(l.hasOwnProperty(h)){var we=l[h];if(we!=null)switch(h){case"name":v=we;break;case"type":k=we;break;case"checked":X=we;break;case"defaultChecked":he=we;break;case"value":_=we;break;case"defaultValue":j=we;break;case"children":case"dangerouslySetInnerHTML":if(we!=null)throw Error(r(137,s));break;default:Wt(o,s,h,we,l,null)}}pw(o,_,j,X,he,k,v,!1);return;case"select":bt("invalid",o),h=k=_=null;for(v in l)if(l.hasOwnProperty(v)&&(j=l[v],j!=null))switch(v){case"value":_=j;break;case"defaultValue":k=j;break;case"multiple":h=j;default:Wt(o,s,v,j,l,null)}s=_,l=k,o.multiple=!!h,s!=null?Ji(o,!!h,s,!1):l!=null&&Ji(o,!!h,l,!0);return;case"textarea":bt("invalid",o),_=v=h=null;for(k in l)if(l.hasOwnProperty(k)&&(j=l[k],j!=null))switch(k){case"value":h=j;break;case"defaultValue":v=j;break;case"children":_=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(r(91));break;default:Wt(o,s,k,j,l,null)}gw(o,h,v,_);return;case"option":for(X in l)l.hasOwnProperty(X)&&(h=l[X],h!=null)&&(X==="selected"?o.selected=h&&typeof h!="function"&&typeof h!="symbol":Wt(o,s,X,h,l,null));return;case"dialog":bt("beforetoggle",o),bt("toggle",o),bt("cancel",o),bt("close",o);break;case"iframe":case"object":bt("load",o);break;case"video":case"audio":for(h=0;h<iu.length;h++)bt(iu[h],o);break;case"image":bt("error",o),bt("load",o);break;case"details":bt("toggle",o);break;case"embed":case"source":case"link":bt("error",o),bt("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(he in l)if(l.hasOwnProperty(he)&&(h=l[he],h!=null))switch(he){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Wt(o,s,he,h,l,null)}return;default:if(_g(s)){for(we in l)l.hasOwnProperty(we)&&(h=l[we],h!==void 0&&ay(o,s,we,h,l,void 0));return}}for(j in l)l.hasOwnProperty(j)&&(h=l[j],h!=null&&Wt(o,s,j,h,l,null))}function SD(o,s,l,h){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,_=null,k=null,j=null,X=null,he=null,we=null;for(ge in l){var Te=l[ge];if(l.hasOwnProperty(ge)&&Te!=null)switch(ge){case"checked":break;case"value":break;case"defaultValue":X=Te;default:h.hasOwnProperty(ge)||Wt(o,s,ge,null,h,Te)}}for(var pe in h){var ge=h[pe];if(Te=l[pe],h.hasOwnProperty(pe)&&(ge!=null||Te!=null))switch(pe){case"type":_=ge;break;case"name":v=ge;break;case"checked":he=ge;break;case"defaultChecked":we=ge;break;case"value":k=ge;break;case"defaultValue":j=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(r(137,s));break;default:ge!==Te&&Wt(o,s,pe,ge,h,Te)}}vg(o,k,j,X,he,we,_,v);return;case"select":ge=k=j=pe=null;for(_ in l)if(X=l[_],l.hasOwnProperty(_)&&X!=null)switch(_){case"value":break;case"multiple":ge=X;default:h.hasOwnProperty(_)||Wt(o,s,_,null,h,X)}for(v in h)if(_=h[v],X=l[v],h.hasOwnProperty(v)&&(_!=null||X!=null))switch(v){case"value":pe=_;break;case"defaultValue":j=_;break;case"multiple":k=_;default:_!==X&&Wt(o,s,v,_,h,X)}s=j,l=k,h=ge,pe!=null?Ji(o,!!l,pe,!1):!!h!=!!l&&(s!=null?Ji(o,!!l,s,!0):Ji(o,!!l,l?[]:"",!1));return;case"textarea":ge=pe=null;for(j in l)if(v=l[j],l.hasOwnProperty(j)&&v!=null&&!h.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:Wt(o,s,j,null,h,v)}for(k in h)if(v=h[k],_=l[k],h.hasOwnProperty(k)&&(v!=null||_!=null))switch(k){case"value":pe=v;break;case"defaultValue":ge=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==_&&Wt(o,s,k,v,h,_)}mw(o,pe,ge);return;case"option":for(var Ue in l)pe=l[Ue],l.hasOwnProperty(Ue)&&pe!=null&&!h.hasOwnProperty(Ue)&&(Ue==="selected"?o.selected=!1:Wt(o,s,Ue,null,h,pe));for(X in h)pe=h[X],ge=l[X],h.hasOwnProperty(X)&&pe!==ge&&(pe!=null||ge!=null)&&(X==="selected"?o.selected=pe&&typeof pe!="function"&&typeof pe!="symbol":Wt(o,s,X,pe,h,ge));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ye in l)pe=l[Ye],l.hasOwnProperty(Ye)&&pe!=null&&!h.hasOwnProperty(Ye)&&Wt(o,s,Ye,null,h,pe);for(he in h)if(pe=h[he],ge=l[he],h.hasOwnProperty(he)&&pe!==ge&&(pe!=null||ge!=null))switch(he){case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(r(137,s));break;default:Wt(o,s,he,pe,h,ge)}return;default:if(_g(s)){for(var Kt in l)pe=l[Kt],l.hasOwnProperty(Kt)&&pe!==void 0&&!h.hasOwnProperty(Kt)&&ay(o,s,Kt,void 0,h,pe);for(we in h)pe=h[we],ge=l[we],!h.hasOwnProperty(we)||pe===ge||pe===void 0&&ge===void 0||ay(o,s,we,pe,h,ge);return}}for(var ce in l)pe=l[ce],l.hasOwnProperty(ce)&&pe!=null&&!h.hasOwnProperty(ce)&&Wt(o,s,ce,null,h,pe);for(Te in h)pe=h[Te],ge=l[Te],!h.hasOwnProperty(Te)||pe===ge||pe==null&&ge==null||Wt(o,s,Te,pe,h,ge)}function _R(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ED(){if(typeof performance.getEntriesByType=="function"){for(var o=0,s=0,l=performance.getEntriesByType("resource"),h=0;h<l.length;h++){var v=l[h],_=v.transferSize,k=v.initiatorType,j=v.duration;if(_&&j&&_R(k)){for(k=0,j=v.responseEnd,h+=1;h<l.length;h++){var X=l[h],he=X.startTime;if(he>j)break;var we=X.transferSize,Te=X.initiatorType;we&&_R(Te)&&(X=X.responseEnd,k+=we*(X<j?1:(j-he)/(X-he)))}if(--h,s+=8*(_+k)/(v.duration/1e3),o++,10<o)break}}if(0<o)return s/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var sy=null,iy=null;function $f(o){return o.nodeType===9?o:o.ownerDocument}function bR(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function wR(o,s){if(o===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&s==="foreignObject"?0:o}function cy(o,s){return o==="textarea"||o==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var ly=null;function RD(){var o=window.event;return o&&o.type==="popstate"?o===ly?!1:(ly=o,!0):(ly=null,!1)}var SR=typeof setTimeout=="function"?setTimeout:void 0,xD=typeof clearTimeout=="function"?clearTimeout:void 0,ER=typeof Promise=="function"?Promise:void 0,TD=typeof queueMicrotask=="function"?queueMicrotask:typeof ER<"u"?function(o){return ER.resolve(null).then(o).catch(OD)}:SR;function OD(o){setTimeout(function(){throw o})}function gs(o){return o==="head"}function RR(o,s){var l=s,h=0;do{var v=l.nextSibling;if(o.removeChild(l),v&&v.nodeType===8)if(l=v.data,l==="/$"||l==="/&"){if(h===0){o.removeChild(v),Nc(s);return}h--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")h++;else if(l==="html")lu(o.ownerDocument.documentElement);else if(l==="head"){l=o.ownerDocument.head,lu(l);for(var _=l.firstChild;_;){var k=_.nextSibling,j=_.nodeName;_[Ol]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&_.rel.toLowerCase()==="stylesheet"||l.removeChild(_),_=k}}else l==="body"&&lu(o.ownerDocument.body);l=v}while(l);Nc(s)}function xR(o,s){var l=o;o=0;do{var h=l.nextSibling;if(l.nodeType===1?s?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(s?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),h&&h.nodeType===8)if(l=h.data,l==="/$"){if(o===0)break;o--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||o++;l=h}while(l)}function uy(o){var s=o.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var l=s;switch(s=s.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":uy(l),mg(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}o.removeChild(l)}}function CD(o,s,l,h){for(;o.nodeType===1;){var v=l;if(o.nodeName.toLowerCase()!==s.toLowerCase()){if(!h&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(h){if(!o[Ol])switch(s){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(_=o.getAttribute("rel"),_==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(_!==v.rel||o.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||o.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||o.getAttribute("title")!==(v.title==null?null:v.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(_=o.getAttribute("src"),(_!==(v.src==null?null:v.src)||o.getAttribute("type")!==(v.type==null?null:v.type)||o.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&_&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(s==="input"&&o.type==="hidden"){var _=v.name==null?null:""+v.name;if(v.type==="hidden"&&o.getAttribute("name")===_)return o}else return o;if(o=mo(o.nextSibling),o===null)break}return null}function AD(o,s,l){if(s==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!l||(o=mo(o.nextSibling),o===null))return null;return o}function TR(o,s){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!s||(o=mo(o.nextSibling),o===null))return null;return o}function dy(o){return o.data==="$?"||o.data==="$~"}function fy(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function ID(o,s){var l=o.ownerDocument;if(o.data==="$~")o._reactRetry=s;else if(o.data!=="$?"||l.readyState!=="loading")s();else{var h=function(){s(),l.removeEventListener("DOMContentLoaded",h)};l.addEventListener("DOMContentLoaded",h),o._reactRetry=h}}function mo(o){for(;o!=null;o=o.nextSibling){var s=o.nodeType;if(s===1||s===3)break;if(s===8){if(s=o.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return o}var hy=null;function OR(o){o=o.nextSibling;for(var s=0;o;){if(o.nodeType===8){var l=o.data;if(l==="/$"||l==="/&"){if(s===0)return mo(o.nextSibling);s--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||s++}o=o.nextSibling}return null}function CR(o){o=o.previousSibling;for(var s=0;o;){if(o.nodeType===8){var l=o.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(s===0)return o;s--}else l!=="/$"&&l!=="/&"||s++}o=o.previousSibling}return null}function AR(o,s,l){switch(s=$f(l),o){case"html":if(o=s.documentElement,!o)throw Error(r(452));return o;case"head":if(o=s.head,!o)throw Error(r(453));return o;case"body":if(o=s.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function lu(o){for(var s=o.attributes;s.length;)o.removeAttributeNode(s[0]);mg(o)}var go=new Map,IR=new Set;function Uf(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var Da=Y.d;Y.d={f:ND,r:kD,D:MD,C:PD,L:DD,m:LD,X:$D,S:jD,M:UD};function ND(){var o=Da.f(),s=If();return o||s}function kD(o){var s=Yi(o);s!==null&&s.tag===5&&s.type==="form"?ZS(s):Da.r(o)}var Cc=typeof document>"u"?null:document;function NR(o,s,l){var h=Cc;if(h&&typeof s=="string"&&s){var v=io(s);v='link[rel="'+o+'"][href="'+v+'"]',typeof l=="string"&&(v+='[crossorigin="'+l+'"]'),IR.has(v)||(IR.add(v),o={rel:o,crossOrigin:l,href:s},h.querySelector(v)===null&&(s=h.createElement("link"),tr(s,"link",o),qn(s),h.head.appendChild(s)))}}function MD(o){Da.D(o),NR("dns-prefetch",o,null)}function PD(o,s){Da.C(o,s),NR("preconnect",o,s)}function DD(o,s,l){Da.L(o,s,l);var h=Cc;if(h&&o&&s){var v='link[rel="preload"][as="'+io(s)+'"]';s==="image"&&l&&l.imageSrcSet?(v+='[imagesrcset="'+io(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(v+='[imagesizes="'+io(l.imageSizes)+'"]')):v+='[href="'+io(o)+'"]';var _=v;switch(s){case"style":_=Ac(o);break;case"script":_=Ic(o)}go.has(_)||(o=p({rel:"preload",href:s==="image"&&l&&l.imageSrcSet?void 0:o,as:s},l),go.set(_,o),h.querySelector(v)!==null||s==="style"&&h.querySelector(uu(_))||s==="script"&&h.querySelector(du(_))||(s=h.createElement("link"),tr(s,"link",o),qn(s),h.head.appendChild(s)))}}function LD(o,s){Da.m(o,s);var l=Cc;if(l&&o){var h=s&&typeof s.as=="string"?s.as:"script",v='link[rel="modulepreload"][as="'+io(h)+'"][href="'+io(o)+'"]',_=v;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=Ic(o)}if(!go.has(_)&&(o=p({rel:"modulepreload",href:o},s),go.set(_,o),l.querySelector(v)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(du(_)))return}h=l.createElement("link"),tr(h,"link",o),qn(h),l.head.appendChild(h)}}}function jD(o,s,l){Da.S(o,s,l);var h=Cc;if(h&&o){var v=Qi(h).hoistableStyles,_=Ac(o);s=s||"default";var k=v.get(_);if(!k){var j={loading:0,preload:null};if(k=h.querySelector(uu(_)))j.loading=5;else{o=p({rel:"stylesheet",href:o,"data-precedence":s},l),(l=go.get(_))&&py(o,l);var X=k=h.createElement("link");qn(X),tr(X,"link",o),X._p=new Promise(function(he,we){X.onload=he,X.onerror=we}),X.addEventListener("load",function(){j.loading|=1}),X.addEventListener("error",function(){j.loading|=2}),j.loading|=4,zf(k,s,h)}k={type:"stylesheet",instance:k,count:1,state:j},v.set(_,k)}}}function $D(o,s){Da.X(o,s);var l=Cc;if(l&&o){var h=Qi(l).hoistableScripts,v=Ic(o),_=h.get(v);_||(_=l.querySelector(du(v)),_||(o=p({src:o,async:!0},s),(s=go.get(v))&&my(o,s),_=l.createElement("script"),qn(_),tr(_,"link",o),l.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(v,_))}}function UD(o,s){Da.M(o,s);var l=Cc;if(l&&o){var h=Qi(l).hoistableScripts,v=Ic(o),_=h.get(v);_||(_=l.querySelector(du(v)),_||(o=p({src:o,async:!0,type:"module"},s),(s=go.get(v))&&my(o,s),_=l.createElement("script"),qn(_),tr(_,"link",o),l.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(v,_))}}function kR(o,s,l,h){var v=(v=Q.current)?Uf(v):null;if(!v)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(s=Ac(l.href),l=Qi(v).hoistableStyles,h=l.get(s),h||(h={type:"style",instance:null,count:0,state:null},l.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){o=Ac(l.href);var _=Qi(v).hoistableStyles,k=_.get(o);if(k||(v=v.ownerDocument||v,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(o,k),(_=v.querySelector(uu(o)))&&!_._p&&(k.instance=_,k.state.loading=5),go.has(o)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},go.set(o,l),_||zD(v,o,l,k.state))),s&&h===null)throw Error(r(528,""));return k}if(s&&h!==null)throw Error(r(529,""));return null;case"script":return s=l.async,l=l.src,typeof l=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Ic(l),l=Qi(v).hoistableScripts,h=l.get(s),h||(h={type:"script",instance:null,count:0,state:null},l.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function Ac(o){return'href="'+io(o)+'"'}function uu(o){return'link[rel="stylesheet"]['+o+"]"}function MR(o){return p({},o,{"data-precedence":o.precedence,precedence:null})}function zD(o,s,l,h){o.querySelector('link[rel="preload"][as="style"]['+s+"]")?h.loading=1:(s=o.createElement("link"),h.preload=s,s.addEventListener("load",function(){return h.loading|=1}),s.addEventListener("error",function(){return h.loading|=2}),tr(s,"link",l),qn(s),o.head.appendChild(s))}function Ic(o){return'[src="'+io(o)+'"]'}function du(o){return"script[async]"+o}function PR(o,s,l){if(s.count++,s.instance===null)switch(s.type){case"style":var h=o.querySelector('style[data-href~="'+io(l.href)+'"]');if(h)return s.instance=h,qn(h),h;var v=p({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return h=(o.ownerDocument||o).createElement("style"),qn(h),tr(h,"style",v),zf(h,l.precedence,o),s.instance=h;case"stylesheet":v=Ac(l.href);var _=o.querySelector(uu(v));if(_)return s.state.loading|=4,s.instance=_,qn(_),_;h=MR(l),(v=go.get(v))&&py(h,v),_=(o.ownerDocument||o).createElement("link"),qn(_);var k=_;return k._p=new Promise(function(j,X){k.onload=j,k.onerror=X}),tr(_,"link",h),s.state.loading|=4,zf(_,l.precedence,o),s.instance=_;case"script":return _=Ic(l.src),(v=o.querySelector(du(_)))?(s.instance=v,qn(v),v):(h=l,(v=go.get(_))&&(h=p({},l),my(h,v)),o=o.ownerDocument||o,v=o.createElement("script"),qn(v),tr(v,"link",h),o.head.appendChild(v),s.instance=v);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(h=s.instance,s.state.loading|=4,zf(h,l.precedence,o));return s.instance}function zf(o,s,l){for(var h=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=h.length?h[h.length-1]:null,_=v,k=0;k<h.length;k++){var j=h[k];if(j.dataset.precedence===s)_=j;else if(_!==v)break}_?_.parentNode.insertBefore(o,_.nextSibling):(s=l.nodeType===9?l.head:l,s.insertBefore(o,s.firstChild))}function py(o,s){o.crossOrigin==null&&(o.crossOrigin=s.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=s.referrerPolicy),o.title==null&&(o.title=s.title)}function my(o,s){o.crossOrigin==null&&(o.crossOrigin=s.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=s.referrerPolicy),o.integrity==null&&(o.integrity=s.integrity)}var Vf=null;function DR(o,s,l){if(Vf===null){var h=new Map,v=Vf=new Map;v.set(l,h)}else v=Vf,h=v.get(l),h||(h=new Map,v.set(l,h));if(h.has(o))return h;for(h.set(o,null),l=l.getElementsByTagName(o),v=0;v<l.length;v++){var _=l[v];if(!(_[Ol]||_[Qn]||o==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var k=_.getAttribute(s)||"";k=o+k;var j=h.get(k);j?j.push(_):h.set(k,[_])}}return h}function LR(o,s,l){o=o.ownerDocument||o,o.head.insertBefore(l,s==="title"?o.querySelector("head > title"):null)}function VD(o,s,l){if(l===1||s.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(o=s.disabled,typeof s.precedence=="string"&&o==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function jR(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function FD(o,s,l,h){if(l.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var v=Ac(h.href),_=s.querySelector(uu(v));if(_){s=_._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(o.count++,o=Ff.bind(o),s.then(o,o)),l.state.loading|=4,l.instance=_,qn(_);return}_=s.ownerDocument||s,h=MR(h),(v=go.get(v))&&py(h,v),_=_.createElement("link"),qn(_);var k=_;k._p=new Promise(function(j,X){k.onload=j,k.onerror=X}),tr(_,"link",h),l.instance=_}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(l,s),(s=l.state.preload)&&(l.state.loading&3)===0&&(o.count++,l=Ff.bind(o),s.addEventListener("load",l),s.addEventListener("error",l))}}var gy=0;function BD(o,s){return o.stylesheets&&o.count===0&&qf(o,o.stylesheets),0<o.count||0<o.imgCount?function(l){var h=setTimeout(function(){if(o.stylesheets&&qf(o,o.stylesheets),o.unsuspend){var _=o.unsuspend;o.unsuspend=null,_()}},6e4+s);0<o.imgBytes&&gy===0&&(gy=62500*ED());var v=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&qf(o,o.stylesheets),o.unsuspend)){var _=o.unsuspend;o.unsuspend=null,_()}},(o.imgBytes>gy?50:800)+s);return o.unsuspend=l,function(){o.unsuspend=null,clearTimeout(h),clearTimeout(v)}}:null}function Ff(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qf(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var Bf=null;function qf(o,s){o.stylesheets=null,o.unsuspend!==null&&(o.count++,Bf=new Map,s.forEach(qD,o),Bf=null,Ff.call(o))}function qD(o,s){if(!(s.state.loading&4)){var l=Bf.get(o);if(l)var h=l.get(null);else{l=new Map,Bf.set(o,l);for(var v=o.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<v.length;_++){var k=v[_];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(l.set(k.dataset.precedence,k),h=k)}h&&l.set(null,h)}v=s.instance,k=v.getAttribute("data-precedence"),_=l.get(k)||h,_===h&&l.set(null,v),l.set(k,v),this.count++,h=Ff.bind(this),v.addEventListener("load",h),v.addEventListener("error",h),_?_.parentNode.insertBefore(v,_.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(v,o.firstChild)),s.state.loading|=4}}var fu={$$typeof:T,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function HD(o,s,l,h,v,_,k,j,X){this.tag=1,this.containerInfo=o,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=fr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fr(0),this.hiddenUpdates=fr(null),this.identifierPrefix=h,this.onUncaughtError=v,this.onCaughtError=_,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function $R(o,s,l,h,v,_,k,j,X,he,we,Te){return o=new HD(o,s,l,k,X,he,we,Te,j),s=1,_===!0&&(s|=24),_=Vr(3,null,null,s),o.current=_,_.stateNode=o,s=Kg(),s.refCount++,o.pooledCache=s,s.refCount++,_.memoizedState={element:h,isDehydrated:l,cache:s},Jg(_),o}function UR(o){return o?(o=ic,o):ic}function zR(o,s,l,h,v,_){v=UR(v),h.context===null?h.context=v:h.pendingContext=v,h=as(s),h.payload={element:l},_=_===void 0?null:_,_!==null&&(h.callback=_),l=ss(o,h,s),l!==null&&(kr(l,o,s),ql(l,o,s))}function VR(o,s){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var l=o.retryLane;o.retryLane=l!==0&&l<s?l:s}}function vy(o,s){VR(o,s),(o=o.alternate)&&VR(o,s)}function FR(o){if(o.tag===13||o.tag===31){var s=ai(o,67108864);s!==null&&kr(s,o,67108864),vy(o,67108864)}}function BR(o){if(o.tag===13||o.tag===31){var s=Gr();s=Zi(s);var l=ai(o,s);l!==null&&kr(l,o,s),vy(o,s)}}var Hf=!0;function GD(o,s,l,h){var v=F.T;F.T=null;var _=Y.p;try{Y.p=2,yy(o,s,l,h)}finally{Y.p=_,F.T=v}}function ZD(o,s,l,h){var v=F.T;F.T=null;var _=Y.p;try{Y.p=8,yy(o,s,l,h)}finally{Y.p=_,F.T=v}}function yy(o,s,l,h){if(Hf){var v=_y(h);if(v===null)oy(o,s,h,Gf,l),HR(o,h);else if(KD(v,o,s,l,h))h.stopPropagation();else if(HR(o,h),s&4&&-1<WD.indexOf(o)){for(;v!==null;){var _=Yi(v);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var k=Mt(_.pendingLanes);if(k!==0){var j=_;for(j.pendingLanes|=2,j.entangledLanes|=2;k;){var X=1<<31-xn(k);j.entanglements[1]|=X,k&=~X}ea(_),($t&6)===0&&(Cf=Se()+500,su(0))}}break;case 31:case 13:j=ai(_,2),j!==null&&kr(j,_,2),If(),vy(_,2)}if(_=_y(h),_===null&&oy(o,s,h,Gf,l),_===v)break;v=_}v!==null&&h.stopPropagation()}else oy(o,s,h,null,l)}}function _y(o){return o=wg(o),by(o)}var Gf=null;function by(o){if(Gf=null,o=Ki(o),o!==null){var s=i(o);if(s===null)o=null;else{var l=s.tag;if(l===13){if(o=c(s),o!==null)return o;o=null}else if(l===31){if(o=u(s),o!==null)return o;o=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;o=null}else s!==o&&(o=null)}}return Gf=o,null}function qR(o){switch(o){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(xe()){case Re:return 2;case ke:return 8;case Je:case at:return 32;case kt:return 268435456;default:return 32}default:return 32}}var wy=!1,vs=null,ys=null,_s=null,hu=new Map,pu=new Map,bs=[],WD="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function HR(o,s){switch(o){case"focusin":case"focusout":vs=null;break;case"dragenter":case"dragleave":ys=null;break;case"mouseover":case"mouseout":_s=null;break;case"pointerover":case"pointerout":hu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":pu.delete(s.pointerId)}}function mu(o,s,l,h,v,_){return o===null||o.nativeEvent!==_?(o={blockedOn:s,domEventName:l,eventSystemFlags:h,nativeEvent:_,targetContainers:[v]},s!==null&&(s=Yi(s),s!==null&&FR(s)),o):(o.eventSystemFlags|=h,s=o.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),o)}function KD(o,s,l,h,v){switch(s){case"focusin":return vs=mu(vs,o,s,l,h,v),!0;case"dragenter":return ys=mu(ys,o,s,l,h,v),!0;case"mouseover":return _s=mu(_s,o,s,l,h,v),!0;case"pointerover":var _=v.pointerId;return hu.set(_,mu(hu.get(_)||null,o,s,l,h,v)),!0;case"gotpointercapture":return _=v.pointerId,pu.set(_,mu(pu.get(_)||null,o,s,l,h,v)),!0}return!1}function GR(o){var s=Ki(o.target);if(s!==null){var l=i(s);if(l!==null){if(s=l.tag,s===13){if(s=c(l),s!==null){o.blockedOn=s,sw(o.priority,function(){BR(l)});return}}else if(s===31){if(s=u(l),s!==null){o.blockedOn=s,sw(o.priority,function(){BR(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){o.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Zf(o){if(o.blockedOn!==null)return!1;for(var s=o.targetContainers;0<s.length;){var l=_y(o.nativeEvent);if(l===null){l=o.nativeEvent;var h=new l.constructor(l.type,l);bg=h,l.target.dispatchEvent(h),bg=null}else return s=Yi(l),s!==null&&FR(s),o.blockedOn=l,!1;s.shift()}return!0}function ZR(o,s,l){Zf(o)&&l.delete(s)}function YD(){wy=!1,vs!==null&&Zf(vs)&&(vs=null),ys!==null&&Zf(ys)&&(ys=null),_s!==null&&Zf(_s)&&(_s=null),hu.forEach(ZR),pu.forEach(ZR)}function Wf(o,s){o.blockedOn===s&&(o.blockedOn=null,wy||(wy=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,YD)))}var Kf=null;function WR(o){Kf!==o&&(Kf=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Kf===o&&(Kf=null);for(var s=0;s<o.length;s+=3){var l=o[s],h=o[s+1],v=o[s+2];if(typeof h!="function"){if(by(h||l)===null)continue;break}var _=Yi(l);_!==null&&(o.splice(s,3),s-=3,_v(_,{pending:!0,data:v,method:l.method,action:h},h,v))}}))}function Nc(o){function s(X){return Wf(X,o)}vs!==null&&Wf(vs,o),ys!==null&&Wf(ys,o),_s!==null&&Wf(_s,o),hu.forEach(s),pu.forEach(s);for(var l=0;l<bs.length;l++){var h=bs[l];h.blockedOn===o&&(h.blockedOn=null)}for(;0<bs.length&&(l=bs[0],l.blockedOn===null);)GR(l),l.blockedOn===null&&bs.shift();if(l=(o.ownerDocument||o).$$reactFormReplay,l!=null)for(h=0;h<l.length;h+=3){var v=l[h],_=l[h+1],k=v[Tr]||null;if(typeof _=="function")k||WR(l);else if(k){var j=null;if(_&&_.hasAttribute("formAction")){if(v=_,k=_[Tr]||null)j=k.formAction;else if(by(v)!==null)continue}else j=k.action;typeof j=="function"?l[h+1]=j:(l.splice(h,3),h-=3),WR(l)}}}function KR(){function o(_){_.canIntercept&&_.info==="react-transition"&&_.intercept({handler:function(){return new Promise(function(k){return v=k})},focusReset:"manual",scroll:"manual"})}function s(){v!==null&&(v(),v=null),h||setTimeout(l,20)}function l(){if(!h&&!navigation.transition){var _=navigation.currentEntry;_&&_.url!=null&&navigation.navigate(_.url,{state:_.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,v=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(l,100),function(){h=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),v!==null&&(v(),v=null)}}}function Sy(o){this._internalRoot=o}Yf.prototype.render=Sy.prototype.render=function(o){var s=this._internalRoot;if(s===null)throw Error(r(409));var l=s.current,h=Gr();zR(l,h,o,s,null,null)},Yf.prototype.unmount=Sy.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var s=o.containerInfo;zR(o.current,2,null,o,null,null),If(),s[Wi]=null}};function Yf(o){this._internalRoot=o}Yf.prototype.unstable_scheduleHydration=function(o){if(o){var s=hg();o={blockedOn:null,target:o,priority:s};for(var l=0;l<bs.length&&s!==0&&s<bs[l].priority;l++);bs.splice(l,0,o),l===0&&GR(o)}};var YR=t.version;if(YR!=="19.2.4")throw Error(r(527,YR,"19.2.4"));Y.findDOMNode=function(o){var s=o._reactInternals;if(s===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=f(s),o=o!==null?m(o):null,o=o===null?null:o.stateNode,o};var QD={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qf.isDisabled&&Qf.supportsFiber)try{Rn=Qf.inject(QD),rn=Qf}catch{}}return vu.createRoot=function(o,s){if(!a(o))throw Error(r(299));var l=!1,h="",v=rE,_=oE,k=aE;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(_=s.onCaughtError),s.onRecoverableError!==void 0&&(k=s.onRecoverableError)),s=$R(o,1,!1,null,null,l,h,null,v,_,k,KR),o[Wi]=s.current,ry(o),new Sy(s)},vu.hydrateRoot=function(o,s,l){if(!a(o))throw Error(r(299));var h=!1,v="",_=rE,k=oE,j=aE,X=null;return l!=null&&(l.unstable_strictMode===!0&&(h=!0),l.identifierPrefix!==void 0&&(v=l.identifierPrefix),l.onUncaughtError!==void 0&&(_=l.onUncaughtError),l.onCaughtError!==void 0&&(k=l.onCaughtError),l.onRecoverableError!==void 0&&(j=l.onRecoverableError),l.formState!==void 0&&(X=l.formState)),s=$R(o,1,!0,s,l??null,h,v,X,_,k,j,KR),s.context=UR(null),l=s.current,h=Gr(),h=Zi(h),v=as(h),v.callback=null,ss(l,v,h),l=h,s.current.lanes=l,Pt(s,l),ea(s),o[Wi]=s.current,ry(o),new Yf(s)},vu.version="19.2.4",vu}var ix;function l5(){if(ix)return Ry.exports;ix=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ry.exports=c5(),Ry.exports}var u5=l5(),A=Ws();const ee=Za(A),gb=JD({__proto__:null,default:ee},[A]);var Ay={exports:{}},Iy={};var cx;function d5(){if(cx)return Iy;cx=1;var e=Ws().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Iy.c=function(t){return e.H.useMemoCache(t)},Iy}var lx;function f5(){return lx||(lx=1,Ay.exports=d5()),Ay.exports}var bl=f5(),yd=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(){}},h5={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},p5=class{#e=h5;#t=!1;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)}},Ci=new p5;function m5(e){setTimeout(e,0)}var Li=typeof window>"u"||"Deno"in globalThis;function Lr(){}function g5(e,t){return typeof e=="function"?e(t):e}function Q0(e){return typeof e=="number"&&e>=0&&e!==1/0}function YC(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ls(e,t){return typeof e=="function"?e(t):e}function bo(e,t){return typeof e=="function"?e(t):e}function ux(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:c,stale:u}=e;if(c){if(r){if(t.queryHash!==vb(c,t.options))return!1}else if(!ed(t.queryKey,c))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||a&&a!==t.state.fetchStatus||i&&!i(t))}function dx(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Ju(t.options.mutationKey)!==Ju(i))return!1}else if(!ed(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function vb(e,t){return(t?.queryKeyHashFn||Ju)(e)}function Ju(e){return JSON.stringify(e,(t,n)=>J0(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function ed(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ed(e[n],t[n])):!1}var v5=Object.prototype.hasOwnProperty;function QC(e,t){if(e===t)return e;const n=fx(e)&&fx(t);if(!n&&!(J0(e)&&J0(t)))return t;const a=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),c=i.length,u=n?new Array(c):{};let d=0;for(let f=0;f<c;f++){const m=n?f:i[f],p=e[m],g=t[m];if(p===g){u[m]=p,(n?f<a:v5.call(e,m))&&d++;continue}if(p===null||g===null||typeof p!="object"||typeof g!="object"){u[m]=g;continue}const y=QC(p,g);u[m]=y,y===p&&d++}return a===c&&d===a?e:u}function X0(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function fx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function J0(e){if(!hx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!hx(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function hx(e){return Object.prototype.toString.call(e)==="[object Object]"}function y5(e){return new Promise(t=>{Ci.setTimeout(t,e)})}function e_(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?QC(e,t):t}function $oe(e){return e}function _5(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function b5(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var yb=Symbol();function XC(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===yb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function w5(e,t){return typeof e=="function"?e(...t):!!e}var S5=class extends yd{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Li&&window.addEventListener){const 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(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},_b=new S5;function t_(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var E5=m5;function R5(){let e=[],t=0,n=u=>{u()},r=u=>{u()},a=E5;const i=u=>{t?e.push(u):a(()=>{n(u)})},c=()=>{const u=e;e=[],u.length&&a(()=>{r(()=>{u.forEach(d=>{n(d)})})})};return{batch:u=>{let d;t++;try{d=u()}finally{t--,t||c()}return d},batchCalls:u=>(...d)=>{i(()=>{u(...d)})},schedule:i,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{a=u}}}var or=R5(),x5=class extends yd{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Li&&window.addEventListener){const 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(n=>{n(e)}))}isOnline(){return this.#e}},Cp=new x5;function T5(e){return Math.min(1e3*2**e,3e4)}function JC(e){return(e??"online")==="online"?Cp.isOnline():!0}var n_=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function eA(e){let t=!1,n=0,r;const a=t_(),i=()=>a.status!=="pending",c=S=>{if(!i()){const b=new n_(S);g(b),e.onCancel?.(b)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>_b.isFocused()&&(e.networkMode==="always"||Cp.isOnline())&&e.canRun(),m=()=>JC(e.networkMode)&&e.canRun(),p=S=>{i()||(r?.(),a.resolve(S))},g=S=>{i()||(r?.(),a.reject(S))},y=()=>new Promise(S=>{r=b=>{(i()||f())&&S(b)},e.onPause?.()}).then(()=>{r=void 0,i()||e.onContinue?.()}),w=()=>{if(i())return;let S;const b=n===0?e.initialPromise:void 0;try{S=b??e.fn()}catch(E){S=Promise.reject(E)}Promise.resolve(S).then(p).catch(E=>{if(i())return;const R=e.retry??(Li?0:3),T=e.retryDelay??T5,O=typeof T=="function"?T(n,E):T,C=R===!0||typeof R=="number"&&n<R||typeof R=="function"&&R(n,E);if(t||!C){g(E);return}n++,e.onFail?.(n,E),y5(O).then(()=>f()?void 0:y()).then(()=>{t?g(E):w()})})};return{promise:a,status:()=>a.status,cancel:c,continue:()=>(r?.(),a),cancelRetry:u,continueRetry:d,canStart:m,start:()=>(m()?w():y().then(w),a)}}var tA=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Q0(this.gcTime)&&(this.#e=Ci.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Li?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Ci.clearTimeout(this.#e),this.#e=void 0)}},O5=class extends tA{#e;#t;#n;#o;#r;#i;#s;constructor(e){super(),this.#s=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#n=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=mx(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=mx(this.options);t.data!==void 0&&(this.setState(px(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=e_(this.state.data,e,this.options);return this.#a({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#a({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Lr).catch(Lr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>bo(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===yb||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ls(e.options.staleTime,this)==="static"):!1}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:!YC(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#s?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(d=>d.options.queryFn);u&&this.setOptions(u.options)}const n=new AbortController,r=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},a=()=>{const u=XC(this.options,t),f=(()=>{const m={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(m),m})();return this.#s=!1,this.options.persister?this.options.persister(u,f,this):u(f)},c=(()=>{const u={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:a};return r(u),u})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#a({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=eA({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:u=>{u instanceof n_&&u.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(u,d)=>{this.#a({type:"failed",failureCount:u,error:d})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const u=await this.#r.start();if(u===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(u),this.#n.config.onSuccess?.(u,this),this.#n.config.onSettled?.(u,this.state.error,this),u}catch(u){if(u instanceof n_){if(u.silent)return this.#r.promise;if(u.revert){if(this.state.data===void 0)throw u;return this.state.data}}throw this.#a({type:"error",error:u}),this.#n.config.onError?.(u,this),this.#n.config.onSettled?.(this.state.data,u,this),u}finally{this.scheduleGc()}}#a(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...nA(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...px(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const a=e.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),or.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function nA(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:JC(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function px(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function mx(e){const 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"}}var C5=class extends yd{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#s=t_(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#i;#s;#a;#m;#f;#h;#l;#u;#c;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),gx(this.#t,this.options)?this.#d():this.updateResult(),this.#_())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return r_(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return r_(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof bo(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!X0(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&vx(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||bo(this.options.enabled,this.#t)!==bo(t.enabled,this.#t)||Ls(this.options.staleTime,this.#t)!==Ls(t.staleTime,this.#t))&&this.#g();const a=this.#v();r&&(this.#t!==n||bo(this.options.enabled,this.#t)!==bo(t.enabled,this.#t)||a!==this.#c)&&this.#y(a)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return I5(this,n)&&(this.#o=n,this.#i=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#o}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#d(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Lr)),t}#g(){this.#b();const e=Ls(this.options.staleTime,this.#t);if(Li||this.#o.isStale||!Q0(e))return;const n=YC(this.#o.dataUpdatedAt,e)+1;this.#l=Ci.setTimeout(()=>{this.#o.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#c=e,!(Li||bo(this.options.enabled,this.#t)===!1||!Q0(this.#c)||this.#c===0)&&(this.#u=Ci.setInterval(()=>{(this.options.refetchIntervalInBackground||_b.isFocused())&&this.#d()},this.#c))}#_(){this.#g(),this.#y(this.#v())}#b(){this.#l&&(Ci.clearTimeout(this.#l),this.#l=void 0)}#w(){this.#u&&(Ci.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,a=this.#o,i=this.#r,c=this.#i,d=e!==n?e.state:this.#n,{state:f}=e;let m={...f},p=!1,g;if(t._optimisticResults){const P=this.hasListeners(),$=!P&&gx(e,t),W=P&&vx(e,n,t,r);($||W)&&(m={...m,...nA(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:y,errorUpdatedAt:w,status:S}=m;g=m.data;let b=!1;if(t.placeholderData!==void 0&&g===void 0&&S==="pending"){let P;a?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(P=a.data,b=!0):P=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,P!==void 0&&(S="success",g=e_(a?.data,P,t),p=!0)}if(t.select&&g!==void 0&&!b)if(a&&g===i?.data&&t.select===this.#m)g=this.#f;else try{this.#m=t.select,g=t.select(g),g=e_(a?.data,g,t),this.#f=g,this.#a=null}catch(P){this.#a=P}this.#a&&(y=this.#a,g=this.#f,w=Date.now(),S="error");const E=m.fetchStatus==="fetching",R=S==="pending",T=S==="error",O=R&&E,C=g!==void 0,N={status:S,fetchStatus:m.fetchStatus,isPending:R,isSuccess:S==="success",isError:T,isInitialLoading:O,isLoading:O,data:g,dataUpdatedAt:m.dataUpdatedAt,error:y,errorUpdatedAt:w,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:E,isRefetching:E&&!R,isLoadingError:T&&!C,isPaused:m.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:T&&C,isStale:bb(e,t),refetch:this.refetch,promise:this.#s,isEnabled:bo(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const P=V=>{N.status==="error"?V.reject(N.error):N.data!==void 0&&V.resolve(N.data)},$=()=>{const V=this.#s=N.promise=t_();P(V)},W=this.#s;switch(W.status){case"pending":e.queryHash===n.queryHash&&P(W);break;case"fulfilled":(N.status==="error"||N.data!==W.value)&&$();break;case"rejected":(N.status!=="error"||N.error!==W.reason)&&$();break}}return N}updateResult(){const e=this.#o,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#h=this.#t),X0(t,e))return;this.#o=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,a=typeof r=="function"?r():r;if(a==="all"||!a&&!this.#p.size)return!0;const i=new Set(a??this.#p);return this.options.throwOnError&&i.add("error"),Object.keys(this.#o).some(c=>{const u=c;return this.#o[u]!==e[u]&&i.has(u)})};this.#E({listeners:n()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#_()}#E(e){or.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function A5(e,t){return bo(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function gx(e,t){return A5(e,t)||e.state.data!==void 0&&r_(e,t,t.refetchOnMount)}function r_(e,t,n){if(bo(t.enabled,e)!==!1&&Ls(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&bb(e,t)}return!1}function vx(e,t,n,r){return(e!==t||bo(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&bb(e,n)}function bb(e,t){return bo(t.enabled,e)!==!1&&e.isStaleByTime(Ls(t.staleTime,e))}function I5(e,t){return!X0(e.getCurrentResult(),t)}function yx(e){return{onFetch:(t,n)=>{const r=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},d=0;const f=async()=>{let m=!1;const p=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},g=XC(t.options,t.fetchOptions),y=async(w,S,b)=>{if(m)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const R=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:S,direction:b?"backward":"forward",meta:t.options.meta};return p(I),I})(),T=await g(R),{maxPages:O}=t.options,C=b?b5:_5;return{pages:C(w.pages,T,O),pageParams:C(w.pageParams,S,O)}};if(a&&i.length){const w=a==="backward",S=w?rA:o_,b={pages:i,pageParams:c},E=S(r,b);u=await y(b,E,w)}else{const w=e??i.length;do{const S=d===0?c[0]??r.initialPageParam:o_(r,u);if(d>0&&S==null)break;u=await y(u,S),d++}while(d<w)}return u};t.options.persister?t.fetchFn=()=>t.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=f}}}function o_(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function rA(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Uoe(e,t){return t?o_(e,t)!=null:!1}function zoe(e,t){return!t||!e.getPreviousPageParam?!1:rA(e,t)!=null}var N5=class extends tA{#e;#t;#n;#o;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||k5(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=eA({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,c)=>{this.#r({type:"failed",failureCount:i,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",a=!this.#o.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:a}),await this.#n.config.onMutate?.(e,this,n);const c=await this.options.onMutate?.(e,n);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:a})}const i=await this.#o.start();return await this.#n.config.onSuccess?.(i,e,this.state.context,this,n),await this.options.onSuccess?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(i,null,e,this.state.context,n),this.#r({type:"success",data:i}),i}catch(i){try{throw await this.#n.config.onError?.(i,e,this.state.context,this,n),await this.options.onError?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,i,e,this.state.context,n),i}finally{this.#r({type:"error",error:i})}}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),or.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function k5(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var M5=class extends yd{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new N5({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=Xf(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Xf(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Xf(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(a=>a.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Xf(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){or.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>dx(t,n))}findAll(e={}){return this.getAll().filter(t=>dx(e,t))}notify(e){or.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return or.batch(()=>Promise.all(e.map(t=>t.continue().catch(Lr))))}};function Xf(e){return e.options.scope?.id}var P5=class extends yd{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,a=t.queryHash??vb(r,t);let i=this.get(a);return i||(i=new O5({client:e,queryKey:r,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(i)),i}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){or.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>ux(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>ux(e,n)):t}notify(e){or.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){or.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){or.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},D5=class{#e;#t;#n;#o;#r;#i;#s;#a;constructor(e={}){this.#e=e.queryCache||new P5,this.#t=e.mutationCache||new M5,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#s=_b.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Cp.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#s?.(),this.#s=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ls(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,c=g5(t,i);if(c!==void 0)return this.#e.build(this,r).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return or.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;or.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return or.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=or.batch(()=>this.#e.findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(Lr).catch(Lr)}invalidateQueries(e,t={}){return or.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=or.batch(()=>this.#e.findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(Lr)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Lr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Ls(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Lr).catch(Lr)}fetchInfiniteQuery(e){return e.behavior=yx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Lr).catch(Lr)}ensureInfiniteQueryData(e){return e.behavior=yx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Cp.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#o.set(Ju(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{ed(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Ju(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{ed(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=vb(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===yb&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},oA=A.createContext(void 0),L5=e=>{const t=A.useContext(oA);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},j5=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(oA.Provider,{value:e,children:t})),aA=A.createContext(!1),$5=()=>A.useContext(aA);aA.Provider;function U5(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var z5=A.createContext(U5()),V5=()=>A.useContext(z5),F5=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},B5=e=>{A.useEffect(()=>{e.clearReset()},[e])},q5=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||w5(n,[e.error,r])),H5=(e,t)=>t.state.data===void 0,G5=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>n(r(...a)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Z5=(e,t)=>e.isLoading&&e.isFetching&&!t,W5=(e,t)=>e?.suspense&&t.isPending,_x=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function K5(e,t,n){const r=$5(),a=V5(),i=L5(n),c=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(c),c._optimisticResults=r?"isRestoring":"optimistic",G5(c),F5(c,a),B5(a);const u=!i.getQueryCache().get(c.queryHash),[d]=A.useState(()=>new t(i,c)),f=d.getOptimisticResult(c),m=!r&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(p=>{const g=m?d.subscribe(or.batchCalls(p)):Lr;return d.updateResult(),g},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),A.useEffect(()=>{d.setOptions(c)},[c,d]),W5(c,f))throw _x(c,d,a);if(q5({result:f,errorResetBoundary:a,throwOnError:c.throwOnError,query:i.getQueryCache().get(c.queryHash),suspense:c.suspense}))throw f.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(c,f),c.experimental_prefetchInRender&&!Li&&Z5(f,r)&&(u?_x(c,d,a):i.getQueryCache().get(c.queryHash)?.promise)?.catch(Lr).finally(()=>{d.updateResult()}),c.notifyOnChangeProps?f:d.trackResult(f)}function sA(e,t){return K5({...e,enabled:!0,suspense:!0,throwOnError:H5,placeholderData:void 0},C5,t)}const iA={publicConfig:()=>["publicConfig"],authConfig:()=>["authConfig"],session:()=>["session"],threads:e=>["threads",e],taskThreads:e=>["task-threads",e],virtualMcpThreads:(e,t)=>["threads",e,"virtual-mcp",t],thread:(e,t)=>["thread",e,t],threadMessages:(e,t)=>["thread-messages",e,t],messages:e=>["messages",e],organizations:()=>["organizations"],members:e=>[e,"members"],invitations:e=>[e,"invitations"],organizationRoles:e=>[e,"organization-roles"],connections:e=>[e,"connections"],connectionsByBinding:(e,t)=>[e,"connections",`binding:${t}`],connection:(e,t)=>[e,"connection",t],isMCPAuthenticated:(e,t)=>["is-mcp-authenticated",e,t],mcpTools:(e,t)=>["mcp","tools",e,t],organizationSettings:e=>["organization-settings",e],activeOrganization:e=>["activeOrganization",e],modelsList:e=>["models-list",e],allowedModels:e=>[e,"allowed-models"],connectionCollections:e=>[e,"collections","discovery"],toolCall:(e,t,n)=>["tool-call",e,t,n],collectionItems:(e,t)=>["collection",e,t],collection:(e,t,n)=>[e,t,"collection",n],collectionItem:(e,t,n,r,a)=>[e,t,n,"collection",r,a],collectionList:(e,t,n,r,a)=>[e,t,n,"collection",r,"list",a],collectionListInfinite:(e,t,n,r,a)=>[e,t,n,"collection",r,"list-infinite",a],githubReadme:(e,t)=>["github-readme",e,t],monitoringStats:()=>["monitoring","stats"],monitoringLogs:e=>["monitoring","logs",e],monitoringLogsInfinite:(e,t)=>["monitoring","logs-infinite",e,t],monitoringDashboards:e=>["monitoring","dashboards",e],monitoringDashboardDetails:(e,t)=>["monitoring","dashboard",e,t],monitoringDashboardQuery:(e,t,n,r,a)=>["monitoringDashboardQuery",e,t,n,r,a??""],virtualMcpPrompts:(e,t)=>["virtual-mcp",t,e??"default","prompts"],virtualMcpResources:(e,t)=>["virtual-mcp",t,e??"default","resources"],suggestionItems:(e,t,n)=>[...e,t,n],connectionPrompts:e=>["connection",e,"prompts"],connectionResources:e=>["connection",e,"resources"],user:e=>["user",e],storeReadmeUrl:e=>["store-readme-url",e],remoteMcpTools:e=>["remote-mcp-tools",e],tags:e=>[e,"tags"],memberTags:(e,t)=>[e,"member-tags",t],projects:e=>["projects",e],project:(e,t)=>["project",e,t],projectById:e=>["project","byId",e],projectPluginConfigs:e=>["project-plugin-configs",e],projectPluginConfig:(e,t)=>["project-plugin-config",e,t]},cA=A.createContext(void 0);async function Y5(){const e=await fetch("/api/auth/custom/config");if(!e.ok)throw new Error("Failed to load auth configuration");const t=await e.json();if(!t.success)throw new Error(t.error||"Failed to load auth configuration");return t.config}function Q5(e){const t=bl.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:iA.authConfig(),queryFn:Y5,staleTime:1/0},t[0]=r):r=t[0];const{data:a}=sA(r);let i;return t[1]!==a||t[2]!==n?(i=x.jsx(cA.Provider,{value:a,children:n}),t[1]=a,t[2]=n,t[3]=i):i=t[3],i}function Voe(){const e=A.useContext(cA);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}const Jc=new WeakMap,pp=new WeakMap,Ap={current:[]};let Ny=!1,Fu=0;const ku=new Set,Jf=new Map;function lA(e){const t=Array.from(e).sort((n,r)=>n instanceof el&&n.options.deps.includes(r)?1:r instanceof el&&r.options.deps.includes(n)?-1:0);for(const n of t){if(Ap.current.includes(n))continue;Ap.current.push(n),n.recompute();const r=pp.get(n);if(r)for(const a of r){const i=Jc.get(a);i&&lA(i)}}}function X5(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function J5(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function uA(e){if(Fu>0&&!Jf.has(e)&&Jf.set(e,e.prevState),ku.add(e),!(Fu>0)&&!Ny)try{for(Ny=!0;ku.size>0;){const t=Array.from(ku);ku.clear();for(const n of t){const r=Jf.get(n)??n.prevState;n.prevState=r,X5(n)}for(const n of t){const r=Jc.get(n);r&&(Ap.current.push(n),lA(r))}for(const n of t){const r=Jc.get(n);if(r)for(const a of r)J5(a)}}}finally{Ny=!1,Ap.current=[],Jf.clear()}}function Bu(e){Fu++;try{e()}finally{if(Fu--,Fu===0){const t=ku.values().next().value;t&&uA(t)}}}function e6(e){return typeof e=="function"}class a_{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var a,i;this.listeners.add(r);const c=(i=(a=this.options)==null?void 0:a.onSubscribe)==null?void 0:i.call(a,r,this);return()=>{this.listeners.delete(r),c?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,a;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):e6(t)?this.state=t(this.prevState):this.state=t,(a=(r=this.options)==null?void 0:r.onUpdate)==null||a.call(r),uA(this)}}class el{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const n=this.options.deps.length,r=new Array(n),a=new Array(n);for(let i=0;i<n;i++){const c=this.options.deps[i];r[i]=c.prevState,a[i]=c.state}return this.lastSeenDepValues=a,{prevDepVals:r,currDepVals:a,prevVal:this.prevState??void 0}},this.recompute=()=>{var n,r;this.prevState=this.state;const a=this.getDepVals();this.state=this.options.fn(a),(r=(n=this.options).onUpdate)==null||r.call(n)},this.checkIfRecalculationNeededDeeply=()=>{for(const i of this.options.deps)i instanceof el&&i.checkIfRecalculationNeededDeeply();let n=!1;const r=this.lastSeenDepValues,{currDepVals:a}=this.getDepVals();for(let i=0;i<a.length;i++)if(a[i]!==r[i]){n=!0;break}n&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=>{var r,a;this.listeners.add(n);const i=(a=(r=this.options).onSubscribe)==null?void 0:a.call(r,n,this);return()=>{this.listeners.delete(n),i?.()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const n of t)if(n instanceof el)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof a_){let r=Jc.get(n);r||(r=new Set,Jc.set(n,r)),r.add(this);let a=pp.get(this);a||(a=new Set,pp.set(this,a)),a.add(n)}}unregisterFromGraph(t=this.options.deps){for(const n of t)if(n instanceof el)this.unregisterFromGraph(n.options.deps);else if(n instanceof a_){const r=Jc.get(n);r&&r.delete(this);const a=pp.get(this);a&&a.delete(n)}}}const js="__TSR_index",bx="popstate",wx="beforeunload";function t6(e){let t=e.getLocation();const n=new Set,r=c=>{t=e.getLocation(),n.forEach(u=>u({location:t,action:c}))},a=c=>{e.notifyOnIndexChange??!0?r(c):t=e.getLocation()},i=async({task:c,navigateOpts:u,...d})=>{if(u?.ignoreBlocker??!1){c();return}const m=e.getBlockers?.()??[],p=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&m.length&&p)for(const g of m){const y=Ip(d.path,d.state);if(await g.blockerFn({currentLocation:t,nextLocation:y,action:d.type})){e.onBlocked?.();return}}c()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:c=>(n.add(c),()=>{n.delete(c)}),push:(c,u,d)=>{const f=t.state[js];u=Sx(f+1,u),i({task:()=>{e.pushState(c,u),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:c,state:u})},replace:(c,u,d)=>{const f=t.state[js];u=Sx(f,u),i({task:()=>{e.replaceState(c,u),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:c,state:u})},go:(c,u)=>{i({task:()=>{e.go(c),a({type:"GO",index:c})},navigateOpts:u,type:"GO"})},back:c=>{i({task:()=>{e.back(c?.ignoreBlocker??!1),a({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{i({task:()=>{e.forward(c?.ignoreBlocker??!1),a({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>t.state[js]!==0,createHref:c=>e.createHref(c),block:c=>{if(!e.setBlockers)return()=>{};const u=e.getBlockers?.()??[];return e.setBlockers([...u,c]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(f=>f!==c))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function Sx(e,t){t||(t={});const n=wb();return{...t,key:n,__TSR_key:n,[js]:e}}function n6(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let a=[];const i=()=>a,c=P=>a=P,u=(P=>P),d=(()=>Ip(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const P=wb();t.history.replaceState({[js]:0,key:P,__TSR_key:P},"")}let f=d(),m,p=!1,g=!1,y=!1,w=!1;const S=()=>f;let b,E;const R=()=>{b&&(N._ignoreSubscribers=!0,(b.isPush?t.history.pushState:t.history.replaceState)(b.state,"",b.href),N._ignoreSubscribers=!1,b=void 0,E=void 0,m=void 0)},T=(P,$,W)=>{const V=u($);E||(m=f),f=Ip($,W),b={href:V,state:W,isPush:b?.isPush||P==="push"},E||(E=Promise.resolve().then(()=>R()))},O=P=>{f=d(),N.notify({type:P})},C=async()=>{if(g){g=!1;return}const P=d(),$=P.state[js]-f.state[js],W=$===1,V=$===-1,G=!W&&!V||p;p=!1;const U=G?"GO":V?"BACK":"FORWARD",J=G?{type:"GO",index:$}:{type:V?"BACK":"FORWARD"};if(y)y=!1;else{const le=i();if(typeof document<"u"&&le.length){for(const F of le)if(await F.blockerFn({currentLocation:f,nextLocation:P,action:U})){g=!0,t.history.go(1),N.notify(J);return}}}f=d(),N.notify(J)},I=P=>{if(w){w=!1;return}let $=!1;const W=i();if(typeof document<"u"&&W.length)for(const V of W){const G=V.enableBeforeUnload??!0;if(G===!0){$=!0;break}if(typeof G=="function"&&G()===!0){$=!0;break}}if($)return P.preventDefault(),P.returnValue=""},N=t6({getLocation:S,getLength:()=>t.history.length,pushState:(P,$)=>T("push",P,$),replaceState:(P,$)=>T("replace",P,$),back:P=>(P&&(y=!0),w=!0,t.history.back()),forward:P=>{P&&(y=!0),w=!0,t.history.forward()},go:P=>{p=!0,t.history.go(P)},createHref:P=>u(P),flush:R,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(wx,I,{capture:!0}),t.removeEventListener(bx,C)},onBlocked:()=>{m&&f!==m&&(f=m)},getBlockers:i,setBlockers:c,notifyOnIndexChange:!1});return t.addEventListener(wx,I,{capture:!0}),t.addEventListener(bx,C),t.history.pushState=function(...P){const $=n.apply(t.history,P);return N._ignoreSubscribers||O("PUSH"),$},t.history.replaceState=function(...P){const $=r.apply(t.history,P);return N._ignoreSubscribers||O("REPLACE"),$},N}function Ip(e,t){const n=e.indexOf("#"),r=e.indexOf("?"),a=wb();return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):"",search:r>-1?e.slice(r,n===-1?void 0:n):"",state:t||{[js]:0,key:a,__TSR_key:a}}}function wb(){return(Math.random()+1).toString(36).substring(7)}function Np(e){return e[e.length-1]}function r6(e){return typeof e=="function"}function ki(e,t){return r6(e)?e(t):e}const o6=Object.prototype.hasOwnProperty;function _o(e,t){if(e===t)return e;const n=t,r=xx(e)&&xx(n);if(!r&&!(kp(e)&&kp(n)))return n;const a=r?e:Ex(e);if(!a)return n;const i=r?n:Ex(n);if(!i)return n;const c=a.length,u=i.length,d=r?new Array(u):{};let f=0;for(let m=0;m<u;m++){const p=r?m:i[m],g=e[p],y=n[p];if(g===y){d[p]=g,(r?m<c:o6.call(e,p))&&f++;continue}if(g===null||y===null||typeof g!="object"||typeof y!="object"){d[p]=y;continue}const w=_o(g,y);d[p]=w,w===g&&f++}return c===u&&f===c?e:d}function Ex(e){const t=[],n=Object.getOwnPropertyNames(e);for(const a of n){if(!Object.prototype.propertyIsEnumerable.call(e,a))return!1;t.push(a)}const r=Object.getOwnPropertySymbols(e);for(const a of r){if(!Object.prototype.propertyIsEnumerable.call(e,a))return!1;t.push(a)}return t}function kp(e){if(!Rx(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Rx(n)||!n.hasOwnProperty("isPrototypeOf"))}function Rx(e){return Object.prototype.toString.call(e)==="[object Object]"}function xx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Mi(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,a=e.length;r<a;r++)if(!Mi(e[r],t[r],n))return!1;return!0}if(kp(e)&&kp(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const c in t)if((!r||t[c]!==void 0)&&!Mi(e[c],t[c],n))return!1;return!0}let a=0;if(!r)a=Object.keys(e).length;else for(const c in e)e[c]!==void 0&&a++;let i=0;for(const c in t)if((!r||t[c]!==void 0)&&(i++,i>a||!Mi(e[c],t[c],n)))return!1;return a===i}return!1}function cl(e){let t,n;const r=new Promise((a,i)=>{t=a,n=i});return r.status="pending",r.resolve=a=>{r.status="resolved",r.value=a,t(a),e?.(a)},r.reject=a=>{r.status="rejected",n(a)},r}function a6(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function $s(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function Tx(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function Ox(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,a="",i;for(;(i=n.exec(e))!==null;)a+=Tx(e.slice(r,i.index))+i[0],r=n.lastIndex;return a+Tx(r?e.slice(r):e)}var s6="Invariant failed";function Ba(e,t){if(!e)throw new Error(s6)}function Mp(e){const t=new Map;let n,r;const a=i=>{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,r&&(r.next=i,i.prev=r)):(i.next.prev=void 0,n=i.next,i.next=void 0,r&&(i.prev=r,r.next=i)),r=i)};return{get(i){const c=t.get(i);if(c)return a(c),c.value},set(i,c){if(t.size>=e&&n){const d=n;t.delete(d.key),d.next&&(n=d.next,d.next.prev=void 0),d===r&&(r=void 0)}const u=t.get(i);if(u)u.value=c,a(u);else{const d={key:i,value:c,prev:r};r&&(r.next=d),r=d,n||(n=d),t.set(i,d)}},clear(){t.clear(),n=void 0,r=void 0}}}const ll=0,ji=1,$i=2,td=3,i6=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,c6=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,l6=/^([^{]*)\{\$\}([^}]*)$/;function Sb(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),a=r===-1?e.length:r,i=e.substring(t,a);if(!i||!i.includes("$"))return n[0]=ll,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n;if(i==="$"){const f=e.length;return n[0]=$i,n[1]=t,n[2]=t,n[3]=f,n[4]=f,n[5]=f,n}if(i.charCodeAt(0)===36)return n[0]=ji,n[1]=t,n[2]=t+1,n[3]=a,n[4]=a,n[5]=a,n;const c=i.match(l6);if(c){const m=c[1].length;return n[0]=$i,n[1]=t+m,n[2]=t+m+1,n[3]=t+m+2,n[4]=t+m+3,n[5]=e.length,n}const u=i.match(c6);if(u){const f=u[1],m=u[2],p=u[3],g=f.length;return n[0]=td,n[1]=t+g,n[2]=t+g+3,n[3]=t+g+3+m.length,n[4]=a-p.length,n[5]=a,n}const d=i.match(i6);if(d){const f=d[1],m=d[2],p=d[3],g=f.length;return n[0]=ji,n[1]=t+g,n[2]=t+g+2,n[3]=t+g+2+m.length,n[4]=a-p.length,n[5]=a,n}return n[0]=ll,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n}function Tm(e,t,n,r,a,i,c){c?.(n);let u=r;{const d=n.fullPath??n.from,f=d.length,m=n.options?.caseSensitive??e;for(;u<f;){const p=Sb(d,u,t);let g;const y=u,w=p[5];switch(u=w+1,i++,p[0]){case ll:{const b=d.substring(p[2],p[3]);if(m){const E=a.static?.get(b);if(E)g=E;else{a.static??=new Map;const R=nd(n.fullPath??n.from);R.parent=a,R.depth=i,g=R,a.static.set(b,R)}}else{const E=b.toLowerCase(),R=a.staticInsensitive?.get(E);if(R)g=R;else{a.staticInsensitive??=new Map;const T=nd(n.fullPath??n.from);T.parent=a,T.depth=i,g=T,a.staticInsensitive.set(E,T)}}break}case ji:{const b=d.substring(y,p[1]),E=d.substring(p[4],w),R=m&&!!(b||E),T=b?R?b:b.toLowerCase():void 0,O=E?R?E:E.toLowerCase():void 0,C=a.dynamic?.find(I=>I.caseSensitive===R&&I.prefix===T&&I.suffix===O);if(C)g=C;else{const I=My(ji,n.fullPath??n.from,R,T,O);g=I,I.depth=i,I.parent=a,a.dynamic??=[],a.dynamic.push(I)}break}case td:{const b=d.substring(y,p[1]),E=d.substring(p[4],w),R=m&&!!(b||E),T=b?R?b:b.toLowerCase():void 0,O=E?R?E:E.toLowerCase():void 0,C=a.optional?.find(I=>I.caseSensitive===R&&I.prefix===T&&I.suffix===O);if(C)g=C;else{const I=My(td,n.fullPath??n.from,R,T,O);g=I,I.parent=a,I.depth=i,a.optional??=[],a.optional.push(I)}break}case $i:{const b=d.substring(y,p[1]),E=d.substring(p[4],w),R=m&&!!(b||E),T=b?R?b:b.toLowerCase():void 0,O=E?R?E:E.toLowerCase():void 0,C=My($i,n.fullPath??n.from,R,T,O);g=C,C.parent=a,C.depth=i,a.wildcard??=[],a.wildcard.push(C)}}a=g}if((n.path||!n.children)&&!n.isRoot){const p=d.endsWith("/");p||(a.notFound=n),(!a.route||!a.isIndex&&p)&&(a.route=n),a.isIndex||=p}}if(n.children)for(const d of n.children)Tm(e,t,d,u,a,i,c)}function ky(e,t){if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Ti(e){if(e.static)for(const t of e.static.values())Ti(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Ti(t);if(e.dynamic?.length){e.dynamic.sort(ky);for(const t of e.dynamic)Ti(t)}if(e.optional?.length){e.optional.sort(ky);for(const t of e.optional)Ti(t)}if(e.wildcard?.length){e.wildcard.sort(ky);for(const t of e.wildcard)Ti(t)}}function nd(e){return{kind:ll,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null}}function My(e,t,n,r,a){return{kind:e,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,isIndex:!1,notFound:null,caseSensitive:n,prefix:r,suffix:a}}function u6(e,t){const n=nd("/"),r=new Uint16Array(6);for(const a of e)Tm(!1,r,a,1,n,0);Ti(n),t.masksTree=n,t.flatCache=Mp(1e3)}function d6(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=Eb(e,t.masksTree);return t.flatCache.set(e,r),r}function f6(e,t,n,r,a){e||="/",r||="/";const i=t?`case\0${e}`:e;let c=a.singleCache.get(i);if(!c){c=nd("/");const u=new Uint16Array(6);Tm(t,u,{from:e},1,c,0),a.singleCache.set(i,c)}return Eb(r,c,n)}function h6(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,a=t.matchCache.get(r);if(a!==void 0)return a;e||="/";const i=Eb(e,t.segmentTree,n);return i&&(i.branch=v6(i.route)),t.matchCache.set(r,i),i}function p6(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function m6(e,t=!1,n){const r=nd(e.fullPath),a=new Uint16Array(6),i={},c={};let u=0;return Tm(t,a,e,1,r,0,f=>{if(n?.(f,u),Ba(!(f.id in i),`Duplicate routes found with id: ${String(f.id)}`),i[f.id]=f,u!==0&&f.path){const m=p6(f.fullPath);(!c[m]||f.fullPath.endsWith("/"))&&(c[m]=f)}u++}),Ti(r),{processedTree:{segmentTree:r,singleCache:Mp(1e3),matchCache:Mp(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:c}}function Eb(e,t,n=!1){const r=e.split("/"),a=_6(e,r,t,n);if(!a)return null;const i=g6(e,r,a),c="**"in a;return c&&(i["**"]=a["**"]),{route:c?a.node.notFound??a.node.route:a.node.route,params:i}}function g6(e,t,n){const r=y6(n.node);let a=null;const i={};for(let c=0,u=0,d=0;u<r.length;c++,u++,d++){const f=r[u],m=t[c],p=d;if(m&&(d+=m.length),f.kind===ji){a??=n.node.fullPath.split("/");const g=a[u],y=f.prefix?.length??0;if(g.charCodeAt(y)===123){const S=f.suffix?.length??0,b=g.substring(y+2,g.length-S-1),E=m.substring(y,m.length-S);i[b]=decodeURIComponent(E)}else{const S=g.substring(1);i[S]=decodeURIComponent(m)}}else if(f.kind===td){if(n.skipped&1<<u){c--;continue}a??=n.node.fullPath.split("/");const g=a[u],y=f.prefix?.length??0,w=f.suffix?.length??0,S=g.substring(y+3,g.length-w-1),b=f.suffix||f.prefix?m.substring(y,m.length-w):m;b&&(i[S]=decodeURIComponent(b))}else if(f.kind===$i){const g=f,y=e.substring(p+(g.prefix?.length??0),e.length-(g.suffix?.length??0)),w=decodeURIComponent(y);i["*"]=w,i._splat=w;break}}return i}function v6(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function y6(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function _6(e,t,n,r){const a=!Np(t),i=a&&e!=="/",c=t.length-(a?1:0),u=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let d=null,f=null,m=null;for(;u.length;){const p=u.pop();let{node:g,index:y,skipped:w,depth:S,statics:b,dynamics:E,optionals:R}=p;r&&g.notFound&&eh(f,p)&&(f=p);const T=y===c;if(T){if(g.route&&(!i||g.isIndex)&&(eh(m,p)&&(m=p),b===c&&g.isIndex))return m;if(!g.optional&&!g.wildcard)continue}const O=T?void 0:t[y];let C;if(g.wildcard&&eh(d,p))for(const I of g.wildcard){const{prefix:N,suffix:P}=I;if(!(N&&(T||!(I.caseSensitive?O:C??=O.toLowerCase()).startsWith(N)))){if(P){if(T)continue;const $=t.slice(y).join("/").slice(-P.length);if((I.caseSensitive?$:$.toLowerCase())!==P)continue}d={node:I,index:y,skipped:w,depth:S,statics:b,dynamics:E,optionals:R};break}}if(g.optional){const I=w|1<<S,N=S+1;for(let P=g.optional.length-1;P>=0;P--){const $=g.optional[P];u.push({node:$,index:y,skipped:I,depth:N,statics:b,dynamics:E,optionals:R})}if(!T)for(let P=g.optional.length-1;P>=0;P--){const $=g.optional[P],{prefix:W,suffix:V}=$;if(W||V){const G=$.caseSensitive?O:C??=O.toLowerCase();if(W&&!G.startsWith(W)||V&&!G.endsWith(V))continue}u.push({node:$,index:y+1,skipped:w,depth:N,statics:b,dynamics:E,optionals:R+1})}}if(!T&&g.dynamic&&O)for(let I=g.dynamic.length-1;I>=0;I--){const N=g.dynamic[I],{prefix:P,suffix:$}=N;if(P||$){const W=N.caseSensitive?O:C??=O.toLowerCase();if(P&&!W.startsWith(P)||$&&!W.endsWith($))continue}u.push({node:N,index:y+1,skipped:w,depth:S+1,statics:b,dynamics:E+1,optionals:R})}if(!T&&g.staticInsensitive){const I=g.staticInsensitive.get(C??=O.toLowerCase());I&&u.push({node:I,index:y+1,skipped:w,depth:S+1,statics:b+1,dynamics:E,optionals:R})}if(!T&&g.static){const I=g.static.get(O);I&&u.push({node:I,index:y+1,skipped:w,depth:S+1,statics:b+1,dynamics:E,optionals:R})}}if(m&&d)return eh(d,m)?m:d;if(m)return m;if(d)return d;if(r&&f){let p=f.index;for(let y=0;y<f.index;y++)p+=t[y].length;const g=p===e.length?"/":e.slice(p);return{node:f.node,skipped:f.skipped,"**":decodeURIComponent(g)}}return null}function eh(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&(t.node.isIndex>e.node.isIndex||t.node.isIndex===e.node.isIndex&&t.depth>e.depth))):!0}function mp(e){return Rb(e.filter(t=>t!==void 0).join("/"))}function Rb(e){return e.replace(/\/{2,}/g,"/")}function dA(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Pi(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function gp(e){return Pi(dA(e))}function Pp(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function b6(e,t,n){return Pp(e,n)===Pp(t,n)}function w6({base:e,to:t,trailingSlash:n="never",cache:r}){const a=t.startsWith("/"),i=!a&&t===".";let c;if(r){c=a?t:i?e:e+"\0"+t;const p=r.get(c);if(p)return p}let u;if(i)u=e.split("/");else if(a)u=t.split("/");else{for(u=e.split("/");u.length>1&&Np(u)==="";)u.pop();const p=t.split("/");for(let g=0,y=p.length;g<y;g++){const w=p[g];w===""?g?g===y-1&&u.push(w):u=[w]:w===".."?u.pop():w==="."||u.push(w)}}u.length>1&&(Np(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));let d,f="";for(let p=0;p<u.length;p++){p>0&&(f+="/");const g=u[p];if(!g)continue;d=Sb(g,0,d);const y=d[0];if(y===ll){f+=g;continue}const w=d[5],S=g.substring(0,d[1]),b=g.substring(d[4],w),E=g.substring(d[2],d[3]);y===ji?f+=S||b?`${S}{$${E}}${b}`:`$${E}`:y===$i?f+=S||b?`${S}{$}${b}`:"$":f+=`${S}{-$${E}}${b}`}f=Rb(f);const m=f||"/";return c&&r&&r.set(c,m),m}function Py(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):S6(r,n)}function Dy({path:e,params:t,decodeCharMap:n}){let r=!1;const a={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:a,isMissingParams:r};if(!e.includes("$"))return{interpolatedPath:e,usedParams:a,isMissingParams:r};const i=e.length;let c=0,u,d="";for(;c<i;){const m=c;u=Sb(e,m,u);const p=u[5];if(c=p+1,m===p)continue;const g=u[0];if(g===ll){d+="/"+e.substring(m,p);continue}if(g===$i){const y=t._splat;a._splat=y,a["*"]=y;const w=e.substring(m,u[1]),S=e.substring(u[4],p);if(!y){r=!0,(w||S)&&(d+="/"+w+S);continue}const b=Py("_splat",t,n);d+="/"+w+b+S;continue}if(g===ji){const y=e.substring(u[2],u[3]);!r&&!(y in t)&&(r=!0),a[y]=t[y];const w=e.substring(m,u[1]),S=e.substring(u[4],p),b=Py(y,t,n)??"undefined";d+="/"+w+b+S;continue}if(g===td){const y=e.substring(u[2],u[3]),w=t[y];if(w==null)continue;a[y]=w;const S=e.substring(m,u[1]),b=e.substring(u[4],p),E=Py(y,t,n)??"";d+="/"+S+E+b;continue}}return e.endsWith("/")&&(d+="/"),{usedParams:a,interpolatedPath:d||"/",isMissingParams:r}}function S6(e,t){let n=encodeURIComponent(e);if(t)for(const[r,a]of t)n=n.replaceAll(r,a);return n}function So(e){return!!e?.isNotFound}function E6(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Dp="tsr-scroll-restoration-v1_3",R6=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function x6(){const e=E6();if(!e)return null;const t=e.getItem(Dp);let n=t?JSON.parse(t):{};return{state:n,set:r=>(n=ki(r,n)||n,e.setItem(Dp,JSON.stringify(n)))}}const th=x6(),s_=e=>e.state.__TSR_key||e.href;function T6(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let Lp=!1;function fA({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:a,location:i}){let c;try{c=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(f){console.error(f);return}const u=t||window.history.state?.__TSR_key,d=c[u];Lp=!0;e:{if(r&&d&&Object.keys(d).length>0){for(const p in d){const g=d[p];if(p==="window")window.scrollTo({top:g.scrollY,left:g.scrollX,behavior:n});else if(p){const y=document.querySelector(p);y&&(y.scrollLeft=g.scrollX,y.scrollTop=g.scrollY)}}break e}const f=(i??window.location).hash.split("#",2)[1];if(f){const p=window.history.state?.__hashScrollIntoViewOptions??!0;if(p){const g=document.getElementById(f);g&&g.scrollIntoView(p)}break e}const m={top:0,left:0,behavior:n};if(window.scrollTo(m),a)for(const p of a){if(p==="window")continue;const g=typeof p=="function"?p():document.querySelector(p);g&&g.scrollTo(m)}}Lp=!1}function O6(e,t){if(!th&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!th))return;e.isScrollRestorationSetup=!0,Lp=!1;const r=e.options.getScrollRestorationKey||s_;window.history.scrollRestoration="manual";const a=i=>{if(Lp||!e.isScrollRestoring)return;let c="";if(i.target===document||i.target===window)c="window";else{const d=i.target.getAttribute("data-scroll-restoration-id");d?c=`[data-scroll-restoration-id="${d}"]`:c=T6(i.target)}const u=r(e.state.location);th.set(d=>{const f=d[u]||={},m=f[c]||={};if(c==="window")m.scrollX=window.scrollX||0,m.scrollY=window.scrollY||0;else if(c){const p=document.querySelector(c);p&&(m.scrollX=p.scrollLeft||0,m.scrollY=p.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",R6(a,100),!0),e.subscribe("onRendered",i=>{const c=r(i.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(fA({storageKey:Dp,key:c,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&th.set(u=>(u[c]||={},u)))})}function C6(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function A6(e,t=String){const n=new URLSearchParams;for(const r in e){const a=e[r];a!==void 0&&n.set(r,t(a))}return n.toString()}function Ly(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function I6(e){const t=new URLSearchParams(e),n={};for(const[r,a]of t.entries()){const i=n[r];i==null?n[r]=Ly(a):Array.isArray(i)?i.push(Ly(a)):n[r]=[i,Ly(a)]}return n}const N6=M6(JSON.parse),k6=P6(JSON.stringify,JSON.parse);function M6(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=I6(t);for(const r in n){const a=n[r];if(typeof a=="string")try{n[r]=e(a)}catch{}}return n}}function P6(e,t){const n=typeof t=="function";function r(a){if(typeof a=="object"&&a!==null)try{return e(a)}catch{}else if(n&&typeof a=="string")try{return t(a),e(a)}catch{}return a}return a=>{const i=A6(a,r);return i?`?${i}`:""}}const Yr="__root__";function xb(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Bo(e){return e instanceof Response&&!!e.options}const vp=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Om=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),hA=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Ba(n.options.notFoundComponent);const r=e.matches.find(a=>a.routeId===n.id);Ba(r,"Could not find match for route: "+n.id),e.updateMatch(r.id,a=>({...a,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,hA(e,t))},Ps=(e,t,n)=>{if(!(!Bo(n)&&!So(n))){if(Bo(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const r=Bo(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,a=>({...a,status:r,isFetching:!1,error:n})),So(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw Bo(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(hA(e,n),n)}},pA=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},yu=(e,t,n,r)=>{const{id:a,routeId:i}=e.matches[t],c=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,Ps(e,e.router.getMatch(a),n);try{c.options.onError?.(n)}catch(u){n=u,Ps(e,e.router.getMatch(a),n)}e.updateMatch(a,u=>(u._nonReactive.beforeLoadPromise?.resolve(),u._nonReactive.beforeLoadPromise=void 0,u._nonReactive.loadPromise?.resolve(),{...u,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},D6=(e,t,n,r)=>{const a=e.router.getMatch(t),i=e.matches[n-1]?.id,c=i?e.router.getMatch(i):void 0;if(e.router.isShell()){a.ssr=r.id===Yr;return}if(c?.ssr===!1){a.ssr=!1;return}const u=y=>y===!0&&c?.ssr==="data-only"?"data-only":y,d=e.router.options.defaultSsr??!0;if(r.options.ssr===void 0){a.ssr=u(d);return}if(typeof r.options.ssr!="function"){a.ssr=u(r.options.ssr);return}const{search:f,params:m}=a,p={search:nh(f,a.searchError),params:nh(m,a.paramsError),location:e.location,matches:e.matches.map(y=>({index:y.index,pathname:y.pathname,fullPath:y.fullPath,staticData:y.staticData,id:y.id,routeId:y.routeId,search:nh(y.search,y.searchError),params:nh(y.params,y.paramsError),ssr:y.ssr}))},g=r.options.ssr(p);if($s(g))return g.then(y=>{a.ssr=u(y??d)});a.ssr=u(g??d)},mA=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const a=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!Om(e,t)&&(n.options.loader||n.options.beforeLoad||yA(n))&&typeof a=="number"&&a!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const c=setTimeout(()=>{vp(e)},a);r._nonReactive.pendingTimeout=c}},L6=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;mA(e,t,n,r);const a=()=>{const i=e.router.getMatch(t);i.preload&&(i.status==="redirected"||i.status==="notFound")&&Ps(e,i,i.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(a):a()},j6=(e,t,n,r)=>{const a=e.router.getMatch(t),i=a._nonReactive.loadPromise;a._nonReactive.loadPromise=cl(()=>{i?.resolve()});const{paramsError:c,searchError:u}=a;c&&yu(e,n,c,"PARSE_PARAMS"),u&&yu(e,n,u,"VALIDATE_SEARCH"),mA(e,t,r,a);const d=new AbortController,f=e.matches[n-1]?.id,g={...(f?e.router.getMatch(f):void 0)?.context??e.router.options.context??void 0,...a.__routeContext};let y=!1;const w=()=>{y||(y=!0,e.updateMatch(t,N=>({...N,isFetching:"beforeLoad",fetchCount:N.fetchCount+1,abortController:d,context:g})))},S=()=>{a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,N=>({...N,isFetching:!1}))};if(!r.options.beforeLoad){Bu(()=>{w(),S()});return}a._nonReactive.beforeLoadPromise=cl();const{search:b,params:E,cause:R}=a,T=Om(e,t),O={search:b,abortController:d,params:E,preload:T,context:g,location:e.location,navigate:N=>e.router.navigate({...N,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:T?"preload":R,matches:e.matches,...e.router.options.additionalContext},C=N=>{if(N===void 0){Bu(()=>{w(),S()});return}(Bo(N)||So(N))&&(w(),yu(e,n,N,"BEFORE_LOAD")),Bu(()=>{w(),e.updateMatch(t,P=>({...P,__beforeLoadContext:N,context:{...P.context,...N}})),S()})};let I;try{if(I=r.options.beforeLoad(O),$s(I))return w(),I.catch(N=>{yu(e,n,N,"BEFORE_LOAD")}).then(C)}catch(N){w(),yu(e,n,N,"BEFORE_LOAD")}C(I)},$6=(e,t)=>{const{id:n,routeId:r}=e.matches[t],a=e.router.looseRoutesById[r],i=()=>{if(e.router.isServer){const d=D6(e,n,t,a);if($s(d))return d.then(u)}return u()},c=()=>j6(e,n,t,a),u=()=>{if(pA(e,n))return;const d=L6(e,n,a);return $s(d)?d.then(c):c()};return i()},qu=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const a={matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(a),n.options.scripts?.(a),n.options.headers?.(a)]).then(([i,c,u])=>{const d=i?.meta,f=i?.links,m=i?.scripts,p=i?.styles;return{meta:d,links:f,headScripts:m,headers:u,scripts:c,styles:p}})},gA=(e,t,n,r)=>{const a=e.matchPromises[n-1],{params:i,loaderDeps:c,abortController:u,cause:d}=e.router.getMatch(t);let f=e.router.options.context??{};for(let p=0;p<=n;p++){const g=e.matches[p];if(!g)continue;const y=e.router.getMatch(g.id);y&&(f={...f,...y.__routeContext??{},...y.__beforeLoadContext??{}})}const m=Om(e,t);return{params:i,deps:c,preload:!!m,parentMatchPromise:a,abortController:u,context:f,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:m?"preload":d,route:r,...e.router.options.additionalContext}},Cx=async(e,t,n,r)=>{try{const a=e.router.getMatch(t);try{(!e.router.isServer||a.ssr===!0)&&vA(r);const i=r.options.loader?.(gA(e,t,n,r)),c=r.options.loader&&$s(i);if((c||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(t,p=>({...p,isFetching:"loader"})),r.options.loader){const p=c?await i:i;Ps(e,e.router.getMatch(t),p),p!==void 0&&e.updateMatch(t,g=>({...g,loaderData:p}))}r._lazyPromise&&await r._lazyPromise;const d=qu(e,t,r),f=d?await d:void 0,m=a._nonReactive.minPendingPromise;m&&await m,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,p=>({...p,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...f}))}catch(i){let c=i;const u=a._nonReactive.minPendingPromise;u&&await u,So(i)&&await r.options.notFoundComponent?.preload?.(),Ps(e,e.router.getMatch(t),i);try{r.options.onError?.(i)}catch(m){c=m,Ps(e,e.router.getMatch(t),m)}const d=qu(e,t,r),f=d?await d:void 0;e.updateMatch(t,m=>({...m,error:c,status:"error",isFetching:!1,...f}))}}catch(a){const i=e.router.getMatch(t);if(i){const c=qu(e,t,r);if(c){const u=await c;e.updateMatch(t,d=>({...d,...u}))}i._nonReactive.loaderPromise=void 0}Ps(e,i,a)}},U6=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let a=!1,i=!1;const c=e.router.looseRoutesById[r];if(pA(e,n)){if(e.router.isServer){const f=qu(e,n,c);if(f){const m=await f;e.updateMatch(n,p=>({...p,...m}))}return e.router.getMatch(n)}}else{const f=e.router.getMatch(n);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!e.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;const m=e.router.getMatch(n),p=m._nonReactive.error||m.error;p&&Ps(e,m,p)}else{const m=Date.now()-f.updatedAt,p=Om(e,n),g=p?c.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.router.options.defaultStaleTime??0,y=c.options.shouldReload,w=typeof y=="function"?y(gA(e,n,t,c)):y,S=!!p&&!e.router.state.matches.some(T=>T.id===n),b=e.router.getMatch(n);b._nonReactive.loaderPromise=cl(),S!==b.preload&&e.updateMatch(n,T=>({...T,preload:S}));const{status:E,invalid:R}=b;if(a=E==="success"&&(R||(w??m>g)),!(p&&c.options.preload===!1))if(a&&!e.sync)i=!0,(async()=>{try{await Cx(e,n,t,c);const T=e.router.getMatch(n);T._nonReactive.loaderPromise?.resolve(),T._nonReactive.loadPromise?.resolve(),T._nonReactive.loaderPromise=void 0}catch(T){Bo(T)&&await e.router.navigate(T.options)}})();else if(E!=="success"||a&&e.sync)await Cx(e,n,t,c);else{const T=qu(e,n,c);if(T){const O=await T;e.updateMatch(n,C=>({...C,...O}))}}}}const u=e.router.getMatch(n);i||(u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loadPromise?.resolve()),clearTimeout(u._nonReactive.pendingTimeout),u._nonReactive.pendingTimeout=void 0,i||(u._nonReactive.loaderPromise=void 0),u._nonReactive.dehydrated=void 0;const d=i?u.isFetching:!1;return d!==u.isFetching||u.invalid!==!1?(e.updateMatch(n,f=>({...f,isFetching:d,invalid:!1})),e.router.getMatch(n)):u};async function Ax(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&vp(t);try{for(let a=0;a<t.matches.length;a++){const i=$6(t,a);$s(i)&&await i}const n=t.firstBadMatchIndex??t.matches.length;for(let a=0;a<n;a++)t.matchPromises.push(U6(t,a));await Promise.all(t.matchPromises);const r=vp(t);$s(r)&&await r}catch(n){if(So(n)&&!t.preload){const r=vp(t);throw $s(r)&&await r,n}if(Bo(n))throw n}return t.matches}async function vA(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const r of _A){const a=e.options[r]?.preload;a&&n.push(a())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function nh(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function yA(e){for(const t of _A)if(e.options[t]?.preload)return!0;return!1}const _A=["component","errorComponent","pendingComponent","notFoundComponent"];function z6(e){return{input:({url:t})=>{for(const n of e)t=bA(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=wA(e[n],t);return t}}}function V6(e){const t=gp(e.basepath),n=`/${t}`,r=`${n}/`,a=e.caseSensitive?n:n.toLowerCase(),i=e.caseSensitive?r:r.toLowerCase();return{input:({url:c})=>{const u=e.caseSensitive?c.pathname:c.pathname.toLowerCase();return u===a?c.pathname="/":u.startsWith(i)&&(c.pathname=c.pathname.slice(n.length)),c},output:({url:c})=>(c.pathname=mp(["/",t,c.pathname]),c)}}function bA(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function wA(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Di(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,a=t?.href!==n.href,i=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:a,hashChanged:i}}class F6{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options,a=this.basepath??r?.basepath??"/",i=this.basepath===void 0,c=r?.rewrite;this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(g=>[encodeURIComponent(g),g])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=n6())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new a_(q6(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(g=>!["redirected"].includes(g.status))}}}),O6(this));let u=!1;const d=this.options.basepath??"/",f=this.options.rewrite;if(i||a!==d||c!==f){this.basepath=d;const g=[];gp(d)!==""&&g.push(V6({basepath:d})),f&&g.push(f),this.rewrite=g.length===0?void 0:g.length===1?g[0]:z6(g),this.history&&this.updateLatestLocation(),u=!0}u&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:r,processedTree:a}=m6(this.routeTree,this.options.caseSensitive,(c,u)=>{c.init({originalIndex:u})});this.options.routeMasks&&u6(this.options.routeMasks,a),this.routesById=n,this.routesByPath=r,this.processedTree=a;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)},this.subscribe=(n,r)=>{const a={eventType:n,fn:r};return this.subscribers.add(a),()=>{this.subscribers.delete(a)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const a=({href:d,state:f})=>{const m=new URL(d,this.origin),p=bA(this.rewrite,m),g=this.options.parseSearch(p.search),y=this.options.stringifySearch(g);p.search=y;const w=p.href.replace(p.origin,""),{pathname:S,hash:b}=p;return{href:w,publicHref:d,url:p.href,pathname:Ox(S),searchStr:y,search:_o(r?.search,g),hash:b.split("#").reverse()[0]??"",state:_o(r?.state,f)}},i=a(n),{__tempLocation:c,__tempKey:u}=i.state;if(c&&(!u||u===this.tempLocationKey)){const d=a(c);return d.state.key=i.state.key,d.state.__TSR_key=i.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:i}}return i},this.resolvePathCache=Mp(1e3),this.resolvePathWithBase=(n,r)=>w6({base:n,to:Rb(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,a)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},a):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>H6({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(i=>i.status==="pending"),r=this.state.matches.filter(i=>i.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(i=>{this.cancelMatch(i.id)})},this.buildLocation=n=>{const r=(i={})=>{const c=i._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutes(c,{_buildLocation:!0}),d=Np(u);i.from;const f=i.unsafeRelative==="path"?c.pathname:i.from??d.fullPath,m=this.resolvePathWithBase(f,"."),p=d.search,g={...d.params},y=i.to?this.resolvePathWithBase(m,`${i.to}`):this.resolvePathWithBase(m,"."),w=i.params===!1||i.params===null?{}:(i.params??!0)===!0?g:Object.assign(g,ki(i.params,g)),S=Dy({path:y,params:w}).interpolatedPath,b=this.matchRoutes(S,void 0,{_buildLocation:!0}).map(W=>this.looseRoutesById[W.routeId]);if(Object.keys(w).length>0)for(const W of b){const V=W.options.params?.stringify??W.options.stringifyParams;V&&Object.assign(w,V(w))}const E=n.leaveParams?y:Ox(Dy({path:y,params:w,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let R=p;if(n._includeValidateSearch&&this.options.search?.strict){const W={};b.forEach(V=>{if(V.options.validateSearch)try{Object.assign(W,i_(V.options.validateSearch,{...W,...R}))}catch{}}),R=W}R=G6({search:R,dest:i,destRoutes:b,_includeValidateSearch:n._includeValidateSearch}),R=_o(p,R);const T=this.options.stringifySearch(R),O=i.hash===!0?c.hash:i.hash?ki(i.hash,c.hash):void 0,C=O?`#${O}`:"";let I=i.state===!0?c.state:i.state?ki(i.state,c.state):{};I=_o(c.state,I);const N=`${E}${T}${C}`,P=new URL(N,this.origin),$=wA(this.rewrite,P);return{publicHref:$.pathname+$.search+$.hash,href:N,url:$.href,pathname:E,search:R,searchStr:T,state:I,hash:O??"",unmaskOnReload:i.unmaskOnReload}},a=(i={},c)=>{const u=r(i);let d=c?r(c):void 0;if(!d){const f={};if(this.options.routeMasks){const m=d6(u.pathname,this.processedTree);if(m){Object.assign(f,m.params);const{from:p,...g}=m.route;c={from:n.from,...g,params:f},d=r(c)}}}return d&&(u.maskedLocation=d),u};return n.mask?a(n,{from:n.from,...n.mask}):a(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:r,...a})=>{const i=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(m=>{a.state[m]=this.latestLocation.state[m]});const f=Mi(a.state,this.latestLocation.state);return d.forEach(m=>{delete a.state[m]}),f},c=Pi(this.latestLocation.href)===Pi(a.href),u=this.commitLocationPromise;if(this.commitLocationPromise=cl(()=>{u?.resolve()}),c&&i())this.load();else{let{maskedLocation:d,hashScrollIntoView:f,...m}=a;d&&(m={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...m,search:m.searchStr,state:{...m.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(m.unmaskOnReload??this.options.unmaskOnReload??!1)&&(m.state.__tempKey=this.tempLocationKey)),m.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[a.replace?"replace":"push"](m.publicHref,m.state,{ignoreBlocker:r})}return this.resetNextScroll=a.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:a,viewTransition:i,ignoreBlocker:c,href:u,...d}={})=>{if(u){const p=this.history.location.state.__TSR_index,g=Ip(u,{__TSR_index:n?p:p+1});d.to=g.pathname,d.search=this.options.parseSearch(g.search),d.hash=g.hash.slice(1)}const f=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const m=this.commitLocation({...f,viewTransition:i,replace:n,resetScroll:r,hashScrollIntoView:a,ignoreBlocker:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),m},this.navigate=async({to:n,reloadDocument:r,href:a,...i})=>{if(!r&&a)try{new URL(`${a}`),r=!0}catch{}if(r){if(a||(a=this.buildLocation({to:n,...i}).url),!i.ignoreBlocker){const u=this.history.getBlockers?.()??[];for(const d of u)if(d?.blockerFn&&await d.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return i.replace?window.location.replace(a):window.location.href=a,Promise.resolve()}return this.buildAndCommitLocation({...i,href:a,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),a=i=>{try{return encodeURI(decodeURI(i))}catch{return i}};if(gp(a(this.latestLocation.href))!==gp(a(r.href))){let i=r.url;throw this.origin&&i.startsWith(this.origin)&&(i=i.replace(this.origin,"")||"/"),xb({href:i})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(a=>!n.some(i=>i.id===a.id))}))},this.load=async n=>{let r,a,i;for(i=new Promise(u=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,f=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Di({resolvedLocation:f,location:d})}),this.emit({type:"onBeforeLoad",...Di({resolvedLocation:f,location:d})}),await Ax({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let m=[],p=[],g=[];Bu(()=>{this.__store.setState(y=>{const w=y.matches,S=y.pendingMatches||y.matches;return m=w.filter(b=>!S.some(E=>E.id===b.id)),p=S.filter(b=>!w.some(E=>E.id===b.id)),g=S.filter(b=>w.some(E=>E.id===b.id)),{...y,isLoading:!1,loadedAt:Date.now(),matches:S,pendingMatches:void 0,cachedMatches:[...y.cachedMatches,...m.filter(b=>b.status!=="error"&&b.status!=="notFound")]}}),this.clearExpiredCache()}),[[m,"onLeave"],[p,"onEnter"],[g,"onStay"]].forEach(([y,w])=>{y.forEach(S=>{this.looseRoutesById[S.routeId].options[w]?.(S)})})})})}})}catch(d){Bo(d)?(r=d,this.isServer||this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):So(d)&&(a=d),this.__store.setState(f=>({...f,statusCode:r?r.status:a?404:f.matches.some(m=>m.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),u()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.__store.state.matches.some(u=>u.status==="error")&&(c=500),c!==void 0&&this.__store.setState(u=>({...u,statusCode:c}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let a;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const i=this.latestLocation,c=this.state.resolvedLocation,u=typeof r.types=="function"?r.types(Di({resolvedLocation:c,location:i})):r.types;if(u===!1){n();return}a={update:n,types:u}}else a=n;document.startViewTransition(a)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const a=this.state.pendingMatches?.some(i=>i.id===n)?"pendingMatches":this.state.matches.some(i=>i.id===n)?"matches":this.state.cachedMatches.some(i=>i.id===n)?"cachedMatches":"";a&&this.__store.setState(i=>({...i,[a]:i[a]?.map(c=>c.id===n?r(c):c)}))})},this.getMatch=n=>{const r=a=>a.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=a=>n?.filter?.(a)??!0?{...a,invalid:!0,...n?.forcePending||a.status==="error"||a.status==="notFound"?{status:"pending",error:void 0}:void 0}:a;return this.__store.setState(a=>({...a,matches:a.matches.map(r),cachedMatches:a.cachedMatches.map(r),pendingMatches:a.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.resolveRedirect=n=>{if(!n.options.href){const r=this.buildLocation(n.options);let a=r.url;this.origin&&a.startsWith(this.origin)&&(a=a.replace(this.origin,"")||"/"),n.options.href=r.href,n.headers.set("Location",a)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(a=>({...a,cachedMatches:a.cachedMatches.filter(i=>!r(i))})):this.__store.setState(a=>({...a,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const a=this.looseRoutesById[r.routeId];if(!a.options.loader)return!0;const i=(r.preload?a.options.preloadGcTime??this.options.defaultPreloadGcTime:a.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=i};this.clearCache({filter:n})},this.loadRouteChunk=vA,this.preloadRoute=async n=>{const r=this.buildLocation(n);let a=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const i=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(u=>u.id)),c=new Set([...i,...this.state.cachedMatches.map(u=>u.id)]);Bu(()=>{a.forEach(u=>{c.has(u.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,u]}))})});try{return a=await Ax({router:this,matches:a,location:r,preload:!0,updateMatch:(u,d)=>{i.has(u)?a=a.map(f=>f.id===u?d(f):f):this.updateMatch(u,d)}}),a}catch(u){if(Bo(u))return u.options.reloadDocument?void 0:await this.preloadRoute({...u.options,_fromLocation:r});So(u)||console.error(u);return}},this.matchRoute=(n,r)=>{const a={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},i=this.buildLocation(a);if(r?.pending&&this.state.status!=="pending")return!1;const u=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,d=f6(i.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,u.pathname,this.processedTree);return!d||n.params&&!Mi(d.params,n.params,{partial:!0})?!1:r?.includeSearch??!0?Mi(u.search,i.search,{partial:!0})?d.params:!1:d.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??k6,parseSearch:t.parseSearch??N6}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:a,routeParams:i}=r;let{matchedRoutes:c}=r,u=!1;(a?a.path!=="/"&&i["**"]:Pi(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:u=!0);const d=(()=>{if(u){if(this.options.notFoundMode!=="root")for(let p=c.length-1;p>=0;p--){const g=c[p];if(g.children)return g.id}return Yr}})(),f=[],m=p=>p?.id?p.context??this.options.context??void 0:this.options.context??void 0;return c.forEach((p,g)=>{const y=f[g-1],[w,S,b]=(()=>{const U=y?.search??t.search,J=y?._strictSearch??void 0;try{const le=i_(p.options.validateSearch,{...U})??void 0;return[{...U,...le},{...J,...le},void 0]}catch(le){let F=le;if(le instanceof jp||(F=new jp(le.message,{cause:le})),n?.throwOnError)throw F;return[U,{},F]}})(),E=p.options.loaderDeps?.({search:w})??"",R=E?JSON.stringify(E):"",{interpolatedPath:T,usedParams:O}=Dy({path:p.fullPath,params:i,decodeCharMap:this.pathParamsDecodeCharMap}),C=p.id+T+R,I=this.getMatch(C),N=this.state.matches.find(U=>U.routeId===p.id),P=I?._strictParams??O;let $;if(!I){const U=p.options.params?.parse??p.options.parseParams;if(U)try{Object.assign(P,U(P))}catch(J){if(So(J)||Bo(J)?$=J:$=new B6(J.message,{cause:J}),n?.throwOnError)throw $}}Object.assign(i,P);const W=N?"stay":"enter";let V;if(I)V={...I,cause:W,params:N?_o(N.params,i):i,_strictParams:P,search:_o(N?N.search:I.search,w),_strictSearch:S};else{const U=p.options.loader||p.options.beforeLoad||p.lazyFn||yA(p)?"pending":"success";V={id:C,ssr:this.isServer?void 0:p.options.ssr,index:g,routeId:p.id,params:N?_o(N.params,i):i,_strictParams:P,pathname:T,updatedAt:Date.now(),search:N?_o(N.search,w):w,_strictSearch:S,searchError:void 0,status:U,isFetching:!1,error:void 0,paramsError:$,__routeContext:void 0,_nonReactive:{loadPromise:cl()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:W,loaderDeps:N?_o(N.loaderDeps,E):E,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:p.options.staticData||{},fullPath:p.fullPath}}n?.preload||(V.globalNotFound=d===p.id),V.searchError=b;const G=m(y);V.context={...G,...V.__routeContext,...V.__beforeLoadContext},f.push(V)}),f.forEach((p,g)=>{const y=this.looseRoutesById[p.routeId];if(!this.getMatch(p.id)&&n?._buildLocation!==!0){const S=f[g-1],b=m(S);if(y.options.context){const E={deps:p.loaderDeps,params:p.params,context:b??{},location:t,navigate:R=>this.navigate({...R,_fromLocation:t}),buildLocation:this.buildLocation,cause:p.cause,abortController:p.abortController,preload:!!p.preload,matches:f};p.__routeContext=y.options.context(E)??void 0}p.context={...b,...p.__routeContext,...p.__beforeLoadContext}}}),f}}class jp extends Error{}class B6 extends Error{}function q6(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function i_(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new jp("Async validation not supported");if(n.issues)throw new jp(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function H6({pathname:e,routesById:t,processedTree:n}){const r={},a=Pi(e);let i;const c=h6(a,n,!0);return c&&(i=c.route,Object.assign(r,c.params)),{matchedRoutes:c?.branch||[t[Yr]],routeParams:r,foundRoute:i}}function G6({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){const a=n.reduce((u,d)=>{const f=[];if("search"in d.options)d.options.search?.middlewares&&f.push(...d.options.search.middlewares);else if(d.options.preSearchFilters||d.options.postSearchFilters){const m=({search:p,next:g})=>{let y=p;"preSearchFilters"in d.options&&d.options.preSearchFilters&&(y=d.options.preSearchFilters.reduce((S,b)=>b(S),p));const w=g(y);return"postSearchFilters"in d.options&&d.options.postSearchFilters?d.options.postSearchFilters.reduce((S,b)=>b(S),w):w};f.push(m)}if(r&&d.options.validateSearch){const m=({search:p,next:g})=>{const y=g(p);try{return{...y,...i_(d.options.validateSearch,y)??void 0}}catch{return y}};f.push(m)}return u.concat(f)},[])??[],i=({search:u})=>t.search?t.search===!0?u:ki(t.search,u):{};a.push(i);const c=(u,d)=>{if(u>=a.length)return d;const f=a[u];return f({search:d,next:p=>c(u+1,p)})};return c(0,e)}const Z6="Error preloading route! ☝️";class SA{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,a=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=Yr:this.parentRoute||Ba(!1);let i=a?Yr:r?.path;i&&i!=="/"&&(i=dA(i));const c=r?.id||i;let u=a?Yr:mp([this.parentRoute.id===Yr?"":this.parentRoute.id,c]);i===Yr&&(i="/"),u!==Yr&&(u=mp(["/",u]));const d=u===Yr?"/":mp([this.parentRoute.fullPath,i]);this._path=i,this._id=u,this._fullPath=d,this._to=d},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class W6 extends SA{constructor(t){super(t)}}function Tb(e){const t=e.errorComponent??Cm;return x.jsx(K6,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?A.createElement(t,{error:n,reset:r}):e.children})}class K6 extends A.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Cm({error:e}){const[t,n]=A.useState(!1);return x.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[x.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[x.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),x.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),x.jsx("div",{style:{height:".25rem"}}),t?x.jsx("div",{children:x.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?x.jsx("code",{children:e.message}):null})}):null]})}function Y6({children:e,fallback:t=null}){return Q6()?x.jsx(ee.Fragment,{children:e}):x.jsx(ee.Fragment,{children:t})}function Q6(){return ee.useSyncExternalStore(X6,()=>!0,()=>!1)}function X6(){return()=>{}}var jy={exports:{}},$y={},Uy={exports:{}},zy={};var Ix;function J6(){if(Ix)return zy;Ix=1;var e=Ws();function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,i=e.useLayoutEffect,c=e.useDebugValue;function u(p,g){var y=g(),w=r({inst:{value:y,getSnapshot:g}}),S=w[0].inst,b=w[1];return i(function(){S.value=y,S.getSnapshot=g,d(S)&&b({inst:S})},[p,y,g]),a(function(){return d(S)&&b({inst:S}),p(function(){d(S)&&b({inst:S})})},[p]),c(y),y}function d(p){var g=p.getSnapshot;p=p.value;try{var y=g();return!n(p,y)}catch{return!0}}function f(p,g){return g()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return zy.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,zy}var Nx;function EA(){return Nx||(Nx=1,Uy.exports=J6()),Uy.exports}var kx;function eL(){if(kx)return $y;kx=1;var e=Ws(),t=EA();function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var r=typeof Object.is=="function"?Object.is:n,a=t.useSyncExternalStore,i=e.useRef,c=e.useEffect,u=e.useMemo,d=e.useDebugValue;return $y.useSyncExternalStoreWithSelector=function(f,m,p,g,y){var w=i(null);if(w.current===null){var S={hasValue:!1,value:null};w.current=S}else S=w.current;w=u(function(){function E(I){if(!R){if(R=!0,T=I,I=g(I),y!==void 0&&S.hasValue){var N=S.value;if(y(N,I))return O=N}return O=I}if(N=O,r(T,I))return N;var P=g(I);return y!==void 0&&y(N,P)?(T=I,N):(T=I,O=P)}var R=!1,T,O,C=p===void 0?null:p;return[function(){return E(m())},C===null?void 0:function(){return E(C())}]},[m,p,g,y]);var b=a(f,w[0],w[1]);return c(function(){S.hasValue=!0,S.value=b},[b]),d(b),b},$y}var Mx;function tL(){return Mx||(Mx=1,jy.exports=eL()),jy.exports}var RA=tL();const Foe=Za(RA);function nL(e,t=r=>r,n={}){const r=n.equal??rL;return RA.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function rL(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,a]of e)if(!t.has(r)||!Object.is(a,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Px(e);if(n.length!==Px(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function Px(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const Vy=A.createContext(null);function xA(){return typeof document>"u"?Vy:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Vy,Vy)}function Ur(e){const t=A.useContext(xA());return e?.warn,t}function Rr(e){const t=Ur({warn:e?.router===void 0}),n=e?.router||t,r=A.useRef(void 0);return nL(n.__store,a=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const i=_o(r.current,e.select(a));return r.current=i,i}return e.select(a)}return a})}const Am=A.createContext(void 0),oL=A.createContext(void 0);function ua(e){const t=A.useContext(e.from?oL:Am);return Rr({select:r=>{const a=r.matches.find(i=>e.from?e.from===i.routeId:i.id===t);if(Ba(!((e.shouldThrow??!0)&&!a),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),a!==void 0)return e.select?e.select(a):a},structuralSharing:e.structuralSharing})}function Ob(e){return ua({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Cb(e){const{select:t,...n}=e;return ua({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function tl(e){return ua({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Im(e){return ua({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const Mu=typeof window<"u"?A.useLayoutEffect:A.useEffect;function Fy(e){const t=A.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function aL(e,t,n={},r={}){A.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const a=new IntersectionObserver(([i])=>{t(i)},n);return a.observe(e.current),()=>{a.disconnect()}},[t,n,r.disabled,e])}function sL(e){const t=A.useRef(null);return A.useImperativeHandle(e,()=>t.current,[]),t}function wl(e){const t=Ur();return A.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Boe(e){const t=Ur(),n=wl(),r=A.useRef(null);return Mu(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}var Nm=KC();const TA=Za(Nm);function iL(e,t){const n=Ur(),[r,a]=A.useState(!1),i=A.useRef(!1),c=sL(t),{activeProps:u,inactiveProps:d,activeOptions:f,to:m,preload:p,preloadDelay:g,hashScrollIntoView:y,replace:w,startTransition:S,resetScroll:b,viewTransition:E,children:R,target:T,disabled:O,style:C,className:I,onClick:N,onFocus:P,onMouseEnter:$,onMouseLeave:W,onTouchStart:V,ignoreBlocker:G,params:U,search:J,hash:le,state:F,mask:Y,reloadDocument:ie,unsafeRelative:fe,from:K,_fromLocation:D,...q}=e,B=Rr({select:oe=>oe.location.search,structuralSharing:!0}),L=e.from,z=A.useMemo(()=>({...e,from:L}),[n,B,L,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),Q=A.useMemo(()=>n.buildLocation({...z}),[n,z]),me=A.useMemo(()=>{if(O)return;let oe=Q.maskedLocation?Q.maskedLocation.url:Q.url,Se=!1;return n.origin&&(oe.startsWith(n.origin)?oe=n.history.createHref(oe.replace(n.origin,""))||"/":Se=!0),{href:oe,external:Se}},[O,Q.maskedLocation,Q.url,n.origin,n.history]),ve=A.useMemo(()=>{if(me?.external)return me.href;try{return new URL(m),m}catch{}},[m,me]),Ce=e.reloadDocument||ve?!1:p??n.options.defaultPreload,Ie=g??n.options.defaultPreloadDelay??0,H=Rr({select:oe=>{if(ve)return!1;if(f?.exact){if(!b6(oe.location.pathname,Q.pathname,n.basepath))return!1}else{const Se=Pp(oe.location.pathname,n.basepath),xe=Pp(Q.pathname,n.basepath);if(!(Se.startsWith(xe)&&(Se.length===xe.length||Se[xe.length]==="/")))return!1}return(f?.includeSearch??!0)&&!Mi(oe.location.search,Q.search,{partial:!f?.exact,ignoreUndefined:!f?.explicitUndefined})?!1:f?.includeHash?oe.location.hash===Q.hash:!0}}),re=A.useCallback(()=>{n.preloadRoute({...z}).catch(oe=>{console.warn(oe),console.warn(Z6)})},[n,z]),be=A.useCallback(oe=>{oe?.isIntersecting&&re()},[re]);aL(c,be,fL,{disabled:!!O||Ce!=="viewport"}),A.useEffect(()=>{i.current||!O&&Ce==="render"&&(re(),i.current=!0)},[O,re,Ce]);const se=oe=>{const Se=oe.currentTarget.getAttribute("target"),xe=T!==void 0?T:Se;if(!O&&!hL(oe)&&!oe.defaultPrevented&&(!xe||xe==="_self")&&oe.button===0){oe.preventDefault(),Nm.flushSync(()=>{a(!0)});const Re=n.subscribe("onResolved",()=>{Re(),a(!1)});n.navigate({...z,replace:w,resetScroll:b,hashScrollIntoView:y,startTransition:S,viewTransition:E,ignoreBlocker:G})}};if(ve)return{...q,ref:c,href:ve,...R&&{children:R},...T&&{target:T},...O&&{disabled:O},...C&&{style:C},...I&&{className:I},...N&&{onClick:N},...P&&{onFocus:P},...$&&{onMouseEnter:$},...W&&{onMouseLeave:W},...V&&{onTouchStart:V}};const ue=oe=>{O||Ce&&re()},Oe=ue,Le=oe=>{if(!(O||!Ce))if(!Ie)re();else{const Se=oe.target;if(_u.has(Se))return;const xe=setTimeout(()=>{_u.delete(Se),re()},Ie);_u.set(Se,xe)}},Xe=oe=>{if(O||!Ce||!Ie)return;const Se=oe.target,xe=_u.get(Se);xe&&(clearTimeout(xe),_u.delete(Se))},Be=H?ki(u,{})??cL:By,Ke=H?By:ki(d,{})??By,Z=[I,Be.className,Ke.className].filter(Boolean).join(" "),te=(C||Be.style||Ke.style)&&{...C,...Be.style,...Ke.style};return{...q,...Be,...Ke,href:me?.href,ref:c,onClick:bu([N,se]),onFocus:bu([P,ue]),onMouseEnter:bu([$,Le]),onMouseLeave:bu([W,Xe]),onTouchStart:bu([V,Oe]),disabled:!!O,target:T,...te&&{style:te},...Z&&{className:Z},...O&&lL,...H&&uL,...r&&dL}}const By={},cL={className:"active"},lL={role:"link","aria-disabled":!0},uL={"data-status":"active","aria-current":"page"},dL={"data-transitioning":"transitioning"},_u=new WeakMap,fL={rootMargin:"100px"},bu=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},km=A.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:a,ref:i,...c}=iL(r,t),u=typeof r.children=="function"?r.children({isActive:c["data-status"]==="active"}):r.children;return n===void 0&&delete c.disabled,A.createElement(n||"a",{...c,ref:i},u)});function hL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class pL extends SA{constructor(t){super(t),this.useMatch=n=>ua({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ua({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Im({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>tl({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Cb({...n,from:this.id}),this.useLoaderData=n=>Ob({...n,from:this.id}),this.useNavigate=()=>wl({from:this.fullPath}),this.Link=ee.forwardRef((n,r)=>x.jsx(km,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function qt(e){return new pL(e)}class mL extends W6{constructor(t){super(t),this.useMatch=n=>ua({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ua({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Im({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>tl({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Cb({...n,from:this.id}),this.useLoaderData=n=>Ob({...n,from:this.id}),this.useNavigate=()=>wl({from:this.fullPath}),this.Link=ee.forwardRef((n,r)=>x.jsx(km,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function gL(e){return new mL(e)}function Dx(e){return typeof e=="object"?new Lx(e,{silent:!0}).createRoute(e):new Lx(e,{silent:!0}).createRoute}class Lx{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const a=qt(r);return a.isRoot=!1,a},this.silent=n?.silent}}class jx{constructor(t){this.useMatch=n=>ua({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ua({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Im({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>tl({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>Cb({...n,from:this.options.id}),this.useLoaderData=n=>Ob({...n,from:this.options.id}),this.useNavigate=()=>{const n=Ur();return wl({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function $x(e){return typeof e=="object"?new jx(e):t=>new jx({id:e,...t})}function Jt(e,t){let n,r,a,i;const c=()=>(n||(n=e().then(d=>{n=void 0,r=d[t??"default"]}).catch(d=>{if(a=d,a6(a)&&a instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const f=`tanstack_router_reload:${a.message}`;sessionStorage.getItem(f)||(sessionStorage.setItem(f,"1"),i=!0)}})),n),u=function(f){if(i)throw window.location.reload(),new Promise(()=>{});if(a)throw a;if(!r)throw c();return A.createElement(r,f)};return u.preload=c,u}function vL(){const e=Ur(),t=A.useRef({router:e,mounted:!1}),[n,r]=A.useState(!1),{hasPendingMatches:a,isLoading:i}=Rr({select:p=>({isLoading:p.isLoading,hasPendingMatches:p.matches.some(g=>g.status==="pending")}),structuralSharing:!0}),c=Fy(i),u=i||n||a,d=Fy(u),f=i||a,m=Fy(f);return e.startTransition=p=>{r(!0),A.startTransition(()=>{p(),r(!1)})},A.useEffect(()=>{const p=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Pi(e.latestLocation.href)!==Pi(g.href)&&e.commitLocation({...g,replace:!0}),()=>{p()}},[e,e.history]),Mu(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(g){console.error(g)}})()},[e]),Mu(()=>{c&&!i&&e.emit({type:"onLoad",...Di(e.state)})},[c,e,i]),Mu(()=>{m&&!f&&e.emit({type:"onBeforeRouteMount",...Di(e.state)})},[f,m,e]),Mu(()=>{if(d&&!u){const p=Di(e.state);e.emit({type:"onResolved",...p}),e.__store.setState(g=>({...g,status:"idle",resolvedLocation:g.location})),p.hrefChanged&&C6(e)}},[u,d,e]),null}function yL(e){const t=Rr({select:n=>`not-found-${n.location.pathname}-${n.status}`});return x.jsx(Tb,{getResetKey:()=>t,onCatch:(n,r)=>{if(So(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(So(n))return e.fallback?.(n);throw n},children:e.children})}function _L(){return x.jsx("p",{children:"Not Found"})}function Bc(e){return x.jsx(x.Fragment,{children:e.children})}function OA(e,t,n){return t.options.notFoundComponent?x.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?x.jsx(e.options.defaultNotFoundComponent,{...n}):x.jsx(_L,{})}function bL({children:e}){const t=Ur();return t.isServer?x.jsx("script",{nonce:t.options.ssr?.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:e+';typeof $_TSR !== "undefined" && $_TSR.c()'}}):null}function wL(){const e=Ur();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||s_)(e.latestLocation),r=n!==s_(e.latestLocation)?n:void 0,a={storageKey:Dp,shouldScrollRestoration:!0};return r&&(a.key=r),x.jsx(bL,{children:`(${fA.toString()})(${JSON.stringify(a)})`})}const CA=A.memo(function({matchId:t}){const n=Ur(),r=Rr({select:E=>{const R=E.matches.find(T=>T.id===t);return Ba(R),{routeId:R.routeId,ssr:R.ssr,_displayPending:R._displayPending}},structuralSharing:!0}),a=n.routesById[r.routeId],i=a.options.pendingComponent??n.options.defaultPendingComponent,c=i?x.jsx(i,{}):null,u=a.options.errorComponent??n.options.defaultErrorComponent,d=a.options.onCatch??n.options.defaultOnCatch,f=a.isRoot?a.options.notFoundComponent??n.options.notFoundRoute?.options.component:a.options.notFoundComponent,m=r.ssr===!1||r.ssr==="data-only",p=(!a.isRoot||a.options.wrapInSuspense||m)&&(a.options.wrapInSuspense??i??(a.options.errorComponent?.preload||m))?A.Suspense:Bc,g=u?Tb:Bc,y=f?yL:Bc,w=Rr({select:E=>E.loadedAt}),S=Rr({select:E=>{const R=E.matches.findIndex(T=>T.id===t);return E.matches[R-1]?.routeId}}),b=a.isRoot?a.options.shellComponent??Bc:Bc;return x.jsxs(b,{children:[x.jsx(Am.Provider,{value:t,children:x.jsx(p,{fallback:c,children:x.jsx(g,{getResetKey:()=>w,errorComponent:u||Cm,onCatch:(E,R)=>{if(So(E))throw E;d?.(E,R)},children:x.jsx(y,{fallback:E=>{if(!f||E.routeId&&E.routeId!==r.routeId||!E.routeId&&!a.isRoot)throw E;return A.createElement(f,E)},children:m||r._displayPending?x.jsx(Y6,{fallback:c,children:x.jsx(Ux,{matchId:t})}):x.jsx(Ux,{matchId:t})})})})}),S===Yr&&n.options.scrollRestoration?x.jsxs(x.Fragment,{children:[x.jsx(SL,{}),x.jsx(wL,{})]}):null]})});function SL(){const e=Ur(),t=A.useRef(void 0);return x.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Di(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const Ux=A.memo(function({matchId:t}){const n=Ur(),{match:r,key:a,routeId:i}=Rr({select:d=>{const f=d.matches.find(w=>w.id===t),m=f.routeId,g=(n.routesById[m].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:m,loaderDeps:f.loaderDeps,params:f._strictParams,search:f._strictSearch});return{key:g?JSON.stringify(g):void 0,routeId:m,match:{id:f.id,status:f.status,error:f.error,_forcePending:f._forcePending,_displayPending:f._displayPending}}},structuralSharing:!0}),c=n.routesById[i],u=A.useMemo(()=>{const d=c.options.component??n.options.defaultComponent;return d?x.jsx(d,{},a):x.jsx(AA,{})},[a,c.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const d=c.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const f=n.getMatch(r.id);if(f&&!f._nonReactive.minPendingPromise&&!n.isServer){const m=cl();f._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),f._nonReactive.minPendingPromise=void 0},d)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return Ba(So(r.error)),OA(n,c,r.error);if(r.status==="redirected")throw Ba(Bo(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error"){if(n.isServer){const d=(c.options.errorComponent??n.options.defaultErrorComponent)||Cm;return x.jsx(d,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return u}),AA=A.memo(function(){const t=Ur(),n=A.useContext(Am),r=Rr({select:f=>f.matches.find(m=>m.id===n)?.routeId}),a=t.routesById[r],i=Rr({select:f=>{const p=f.matches.find(g=>g.id===n);return Ba(p),p.globalNotFound}}),c=Rr({select:f=>{const m=f.matches,p=m.findIndex(g=>g.id===n);return m[p+1]?.id}}),u=t.options.defaultPendingComponent?x.jsx(t.options.defaultPendingComponent,{}):null;if(i)return OA(t,a,void 0);if(!c)return null;const d=x.jsx(CA,{matchId:c});return r===Yr?x.jsx(A.Suspense,{fallback:u,children:d}):d});function EL(){const e=Ur(),n=e.routesById[Yr].options.pendingComponent??e.options.defaultPendingComponent,r=n?x.jsx(n,{}):null,a=e.isServer||typeof document<"u"&&e.ssr?Bc:A.Suspense,i=x.jsxs(a,{fallback:r,children:[!e.isServer&&x.jsx(vL,{}),x.jsx(RL,{})]});return e.options.InnerWrap?x.jsx(e.options.InnerWrap,{children:i}):i}function RL(){const e=Ur(),t=Rr({select:a=>a.matches[0]?.id}),n=Rr({select:a=>a.loadedAt}),r=t?x.jsx(CA,{matchId:t}):null;return x.jsx(Am.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:x.jsx(Tb,{getResetKey:()=>n,errorComponent:Cm,onCatch:a=>{a.message||a.toString()},children:r})})}const xL=e=>new TL(e);class TL extends F6{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=Dx,globalThis.createLazyFileRoute=$x):typeof window<"u"&&(window.createFileRoute=Dx,window.createLazyFileRoute=$x);function OL({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=xA(),a=x.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?x.jsx(e.options.Wrap,{children:a}):a}function CL({router:e,...t}){return x.jsx(OL,{router:e,...t,children:x.jsx(EL,{})})}function AL(e){return Rr({select:t=>t.location})}var IL={},zx={};const yp=Object.create(null),wu=e=>IL||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?yp:globalThis),wo=new Proxy(yp,{get(e,t){return wu()[t]??yp[t]},has(e,t){return t in wu()||t in yp},set(e,t,n){const r=wu(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=wu(!0);return delete n[t],!0},ownKeys(){const e=wu(!0);return Object.keys(e)}});function In(e,t){return typeof process<"u"&&zx?zx[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const Su=1,Zn=4,oa=8,Xr=24,Vx={eterm:Zn,cons25:Zn,console:Zn,cygwin:Zn,dtterm:Zn,gnome:Zn,hurd:Zn,jfbterm:Zn,konsole:Zn,kterm:Zn,mlterm:Zn,mosh:Xr,putty:Zn,st:Zn,"rxvt-unicode-24bit":Xr,terminator:Xr,"xterm-kitty":Xr},NL=new Map(Object.entries({APPVEYOR:oa,BUILDKITE:oa,CIRCLECI:Xr,DRONE:oa,GITEA_ACTIONS:Xr,GITHUB_ACTIONS:Xr,GITLAB_CI:oa,TRAVIS:oa})),kL=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function ML(){if(In("FORCE_COLOR")!==void 0)switch(In("FORCE_COLOR")){case"":case"1":case"true":return Zn;case"2":return oa;case"3":return Xr;default:return Su}if(In("NODE_DISABLE_COLORS")!==void 0&&In("NODE_DISABLE_COLORS")!==""||In("NO_COLOR")!==void 0&&In("NO_COLOR")!==""||In("TERM")==="dumb")return Su;if(In("TMUX"))return Xr;if("TF_BUILD"in wo&&"AGENT_NAME"in wo)return Zn;if("CI"in wo){for(const{0:e,1:t}of NL)if(e in wo)return t;return In("CI_NAME")==="codeship"?oa:Su}if("TEAMCITY_VERSION"in wo)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(In("TEAMCITY_VERSION"))!==null?Zn:Su;switch(In("TERM_PROGRAM")){case"iTerm.app":return!In("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(In("TERM_PROGRAM_VERSION"))!==null?oa:Xr;case"HyperTerm":case"MacTerm":return Xr;case"Apple_Terminal":return oa}if(In("COLORTERM")==="truecolor"||In("COLORTERM")==="24bit")return Xr;if(In("TERM")){if(/truecolor/.exec(In("TERM"))!==null)return Xr;if(/^xterm-256/.exec(In("TERM"))!==null)return oa;const e=In("TERM").toLowerCase();if(Vx[e])return Vx[e];if(kL.some(t=>t.exec(e)!==null))return Zn}return In("COLORTERM")?Zn:Su}const aa={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",fg:{red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m"}},c_=["debug","info","success","warn","error"];function PL(e,t){return c_.indexOf(t)>=c_.indexOf(e)}const DL={info:aa.fg.blue,success:aa.fg.green,warn:aa.fg.yellow,error:aa.fg.red,debug:aa.fg.magenta},LL=(e,t,n)=>{const r=new Date().toISOString();return n?`${aa.dim}${r}${aa.reset} ${DL[e]}${e.toUpperCase()}${aa.reset} ${aa.bright}[Better Auth]:${aa.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`},jL=e=>{const t="error",n=ML()!==1,r=(a,i,c=[])=>{if(!PL(t,a))return;const u=LL(a,i,n);{a==="error"?console.error(u,...c):a==="warn"?console.warn(u,...c):console.log(u,...c);return}};return{...Object.fromEntries(c_.map(a=>[a,(...[i,...c])=>r(a,i,c)])),get level(){return t}}};jL();var Hu=class extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}};function $L(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new Hu(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function UL(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Hu(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Hu?t:new Hu(`Invalid base URL: ${e}. Please provide a valid base URL.`,String(t))}}function qy(e,t="/api/auth"){if(UL(e),$L(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function zL(e,t,n,r,a){if(e)return qy(e,t);{const i=wo.BETTER_AUTH_URL||wo.NEXT_PUBLIC_BETTER_AUTH_URL||wo.PUBLIC_BETTER_AUTH_URL||wo.NUXT_PUBLIC_BETTER_AUTH_URL||wo.NUXT_PUBLIC_AUTH_URL||(wo.BASE_URL!=="/"?wo.BASE_URL:void 0);if(i)return qy(i,t)}if(typeof window<"u"&&window.location)return qy(window.location.origin,t)}const VL={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},FL=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,Fx={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},BL=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function qL(e){return e instanceof Date&&!isNaN(e.getTime())}function HL(e){const t=BL.exec(e);if(!t)return null;const[,n,r,a,i,c,u,d,f,m,p]=t;let g=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(a,10),parseInt(i,10),parseInt(c,10),parseInt(u,10),d?parseInt(d.padEnd(3,"0"),10):0));if(f){const y=(parseInt(m,10)*60+parseInt(p,10))*(f==="+"?-1:1);g.setUTCMinutes(g.getUTCMinutes()+y)}return qL(g)?g:null}function GL(e,t={}){const{strict:n=!1,warnings:r=!1,reviver:a,parseDates:i=!0}=t;if(typeof e!="string")return e;const c=e.trim();if(c.length>0&&c[0]==='"'&&c.endsWith('"')&&!c.slice(1,-1).includes('"'))return c.slice(1,-1);const u=c.toLowerCase();if(u.length<=9&&u in Fx)return Fx[u];if(!FL.test(c)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(VL).some(([d,f])=>{const m=f.test(c);return m&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${d} pattern`),m})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(c,(f,m)=>{if(f==="__proto__"||f==="constructor"&&m&&typeof m=="object"&&"prototype"in m){r&&console.warn(`[better-json] Dropping "${f}" key to prevent prototype pollution`);return}if(i&&typeof m=="string"){const p=HL(m);if(p)return p}return a?a(f,m):m})}catch(d){if(n)throw d;return e}}function ZL(e,t={strict:!0}){return GL(e,t)}let Mo=[],Ss=0;const rh=4,Kc=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},lc:0,listen(r){return n.lc=t.push(r),()=>{for(let i=Ss+rh;i<Mo.length;)Mo[i]===r?Mo.splice(i,rh):i+=rh;let a=t.indexOf(r);~a&&(t.splice(a,1),--n.lc||n.off())}},notify(r,a){let i=!Mo.length;for(let c of t)Mo.push(c,n.value,r,a);if(i){for(Ss=0;Ss<Mo.length;Ss+=rh)Mo[Ss](Mo[Ss+1],Mo[Ss+2],Mo[Ss+3]);Mo.length=0}},off(){},set(r){let a=n.value;a!==r&&(n.value=r,n.notify(a))},subscribe(r){let a=n.listen(r);return r(n.value),a},value:e};return n},WL=5,oh=6,ah=10;let KL=(e,t,n,r)=>(e.events=e.events||{},e.events[n+ah]||(e.events[n+ah]=r(a=>{e.events[n].reduceRight((i,c)=>(c(i),i),{shared:{},...a})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let a=e.events[n],i=a.indexOf(t);a.splice(i,1),a.length||(delete e.events[n],e.events[n+ah](),delete e.events[n+ah])}),YL=1e3,IA=(e,t)=>KL(e,r=>{let a=t(r);a&&e.events[oh].push(a)},WL,r=>{let a=e.listen;e.listen=(...c)=>(!e.lc&&!e.active&&(e.active=!0,r()),a(...c));let i=e.off;return e.events[oh]=[],e.off=()=>{i(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let c of e.events[oh])c();e.events[oh]=[]}},YL)},()=>{e.listen=a,e.off=i}});function QL(e,t,n){let r=new Set(t).add(void 0);return e.listen((a,i,c)=>{r.has(c)&&n(a,i,c)})}var XL=Object.defineProperty,JL=Object.defineProperties,ej=Object.getOwnPropertyDescriptors,Bx=Object.getOwnPropertySymbols,tj=Object.prototype.hasOwnProperty,nj=Object.prototype.propertyIsEnumerable,qx=(e,t,n)=>t in e?XL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$o=(e,t)=>{for(var n in t||(t={}))tj.call(t,n)&&qx(e,n,t[n]);if(Bx)for(var n of Bx(t))nj.call(t,n)&&qx(e,n,t[n]);return e},ra=(e,t)=>JL(e,ej(t)),rj=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},oj=async(e,t)=>{var n,r,a,i,c,u;let d=t||{};const f={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:d,hooks:f};for(const m of t?.plugins||[]){if(m.init){const p=await((n=m.init)==null?void 0:n.call(m,e.toString(),t));d=p.options||d,e=p.url}f.onRequest.push((r=m.hooks)==null?void 0:r.onRequest),f.onResponse.push((a=m.hooks)==null?void 0:a.onResponse),f.onSuccess.push((i=m.hooks)==null?void 0:i.onSuccess),f.onError.push((c=m.hooks)==null?void 0:c.onError),f.onRetry.push((u=m.hooks)==null?void 0:u.onRetry)}return{url:e,options:d,hooks:f}},Hx=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},aj=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function sj(e){if(typeof e=="number")return new Hx({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new Hx(e);case"exponential":return new aj(e);default:throw new Error("Invalid retry strategy")}}var ij=async e=>{const t={},n=async r=>typeof r=="function"?await r():r;if(e?.auth){if(e.auth.type==="Bearer"){const r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type==="Basic"){const r=n(e.auth.username),a=n(e.auth.password);if(!r||!a)return t;t.authorization=`Basic ${btoa(`${r}:${a}`)}`}else if(e.auth.type==="Custom"){const r=n(e.auth.value);if(!r)return t;t.authorization=`${n(e.auth.prefix)} ${r}`}}return t},cj=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function lj(e){const t=e.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";const r=t.split(";").shift()||"";return cj.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function uj(e){try{return JSON.parse(e),!0}catch{return!1}}function NA(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}function Gx(e){try{return JSON.parse(e)}catch{return e}}function Zx(e){return typeof e=="function"}function dj(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&Zx(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&Zx(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function fj(e){const t=new Headers(e?.headers),n=await ij(e);for(const[r,a]of Object.entries(n||{}))t.set(r,a);if(!t.has("content-type")){const r=hj(e?.body);r&&t.set("content-type",r)}return t}function hj(e){return NA(e)?"application/json":null}function pj(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(NA(e.body)&&!t.has("content-type")){for(const[n,r]of Object.entries(e?.body))r instanceof Date&&(e.body[n]=r.toISOString());return JSON.stringify(e.body)}return e.body}function mj(e,t){var n;if(t?.method)return t.method.toUpperCase();if(e.startsWith("@")){const r=(n=e.split("@")[1])==null?void 0:n.split("/")[0];return MA.includes(r)?r.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function gj(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var vj=class kA extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,kA.prototype)}};async function _p(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new vj(n.issues);return n.value}var MA=["get","post","put","patch","delete"],yj=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var r,a,i,c;const u=((a=(r=e.plugins)==null?void 0:r.find(d=>{var f;return(f=d.schema)!=null&&f.config?t.startsWith(d.schema.config.baseURL||"")||t.startsWith(d.schema.config.prefix||""):!1}))==null?void 0:a.schema)||e.schema;if(u){let d=t;(i=u.config)!=null&&i.prefix&&d.startsWith(u.config.prefix)&&(d=d.replace(u.config.prefix,""),u.config.baseURL&&(t=t.replace(u.config.prefix,u.config.baseURL))),(c=u.config)!=null&&c.baseURL&&d.startsWith(u.config.baseURL)&&(d=d.replace(u.config.baseURL,""));const f=u.schema[d];if(f){let m=ra($o({},n),{method:f.method,output:f.output});return n?.disableValidation||(m=ra($o({},m),{body:f.input?await _p(f.input,n?.body):n?.body,params:f.params?await _p(f.params,n?.params):n?.params,query:f.query?await _p(f.query,n?.query):n?.query})),{url:t,options:m}}}return{url:t,options:n}}}),_j=e=>{async function t(n,r){const a=ra($o($o({},e),r),{plugins:[...e?.plugins||[],yj(e||{})]});if(e?.catchAllError)try{return await l_(n,a)}catch(i){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:i}}}return await l_(n,a)}return t};function bj(e,t){let{baseURL:n,params:r,query:a}=t||{query:{},params:{},baseURL:""},i=e.startsWith("http")?e.split("/").slice(0,3).join("/"):n||"";if(e.startsWith("@")){const p=e.toString().split("@")[1].split("/")[0];MA.includes(p)&&(e=e.replace(`@${p}/`,"/"))}i.endsWith("/")||(i+="/");let[c,u]=e.replace(i,"").split("?");const d=new URLSearchParams(u);for(const[p,g]of Object.entries(a||{}))g!=null&&d.set(p,String(g));if(r)if(Array.isArray(r)){const p=c.split("/").filter(g=>g.startsWith(":"));for(const[g,y]of p.entries()){const w=r[g];c=c.replace(y,w)}}else for(const[p,g]of Object.entries(r))c=c.replace(`:${p}`,String(g));c=c.split("/").map(encodeURIComponent).join("/"),c.startsWith("/")&&(c=c.slice(1));let f=d.toString();return f=f.length>0?`?${f}`.replace(/\+/g,"%20"):"",i.startsWith("http")?new URL(`${c}${f}`,i):`${i}${c}${f}`}var l_=async(e,t)=>{var n,r,a,i,c,u,d,f;const{hooks:m,url:p,options:g}=await oj(e,t),y=dj(g),w=new AbortController,S=(n=g.signal)!=null?n:w.signal,b=bj(p,g),E=pj(g),R=await fj(g),T=mj(p,g);let O=ra($o({},g),{url:b,headers:R,body:E,method:T,signal:S});for(const U of m.onRequest)if(U){const J=await U(O);J instanceof Object&&(O=J)}("pipeTo"in O&&typeof O.pipeTo=="function"||typeof((r=t?.body)==null?void 0:r.pipe)=="function")&&("duplex"in O||(O.duplex="half"));const{clearTimeout:C}=gj(g,w);let I=await y(O.url,O);C();const N={response:I,request:O};for(const U of m.onResponse)if(U){const J=await U(ra($o({},N),{response:(a=t?.hookOptions)!=null&&a.cloneResponse?I.clone():I}));J instanceof Response?I=J:J instanceof Object&&(I=J.response)}if(I.ok){if(!(O.method!=="HEAD"))return{data:"",error:null};const J=lj(I),le={data:"",response:I,request:O};if(J==="json"||J==="text"){const F=await I.text(),ie=await((i=O.jsonParser)!=null?i:Gx)(F);le.data=ie}else le.data=await I[J]();O?.output&&O.output&&!O.disableValidation&&(le.data=await _p(O.output,le.data));for(const F of m.onSuccess)F&&await F(ra($o({},le),{response:(c=t?.hookOptions)!=null&&c.cloneResponse?I.clone():I}));return t?.throw?le.data:{data:le.data,error:null}}const P=(u=t?.jsonParser)!=null?u:Gx,$=await I.text(),W=uj($),V=W?await P($):null,G={response:I,responseText:$,request:O,error:ra($o({},V),{status:I.status,statusText:I.statusText})};for(const U of m.onError)U&&await U(ra($o({},G),{response:(d=t?.hookOptions)!=null&&d.cloneResponse?I.clone():I}));if(t?.retry){const U=sj(t.retry),J=(f=t.retryAttempt)!=null?f:0;if(await U.shouldAttemptRetry(J,I)){for(const F of m.onRetry)F&&await F(N);const le=U.getDelay(J);return await new Promise(F=>setTimeout(F,le)),await l_(e,ra($o({},t),{retryAttempt:J+1}))}}if(t?.throw)throw new rj(I.status,I.statusText,W?V:$);return{data:null,error:ra($o({},V),{status:I.status,statusText:I.statusText})}};const Hy=Symbol.for("better-auth:broadcast-channel"),wj=()=>Math.floor(Date.now()/1e3);var Sj=class{listeners=new Set;name;constructor(e="better-auth.message"){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:wj()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=t=>{if(t.key!==this.name)return;const n=JSON.parse(t.newValue??"{}");n?.event!=="session"||!n?.data||this.listeners.forEach(r=>r(n))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function Gy(e="better-auth.message"){return globalThis[Hy]||(globalThis[Hy]=new Sj(e)),globalThis[Hy]}const Zy=Symbol.for("better-auth:focus-manager");var Ej=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e,!1)}}};function Wx(){return globalThis[Zy]||(globalThis[Zy]=new Ej),globalThis[Zy]}const Wy=Symbol.for("better-auth:online-manager");var Rj=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e,!1),window.removeEventListener("offline",t,!1)}}};function Ky(){return globalThis[Wy]||(globalThis[Wy]=new Rj),globalThis[Wy]}const xj=()=>typeof window>"u",Pu=(e,t,n,r)=>{const a=Kc({data:null,error:null,isPending:!0,isRefetching:!1,refetch:u=>i(u)}),i=async u=>new Promise(d=>{const f=typeof r=="function"?r({data:a.get().data,error:a.get().error,isPending:a.get().isPending}):r;n(t,{...f,query:{...f?.query,...u?.query},async onSuccess(m){a.set({data:m.data,error:null,isPending:!1,isRefetching:!1,refetch:a.value.refetch}),await f?.onSuccess?.(m)},async onError(m){const{request:p}=m,g=typeof p.retry=="number"?p.retry:p.retry?.attempts,y=p.retryAttempt||0;g&&y<g||(a.set({error:m.error,data:null,isPending:!1,isRefetching:!1,refetch:a.value.refetch}),await f?.onError?.(m))},async onRequest(m){const p=a.get();a.set({isPending:p.data===null,data:p.data,error:null,isRefetching:!0,refetch:a.value.refetch}),await f?.onRequest?.(m)}}).catch(m=>{a.set({error:m,data:null,isPending:!1,isRefetching:!1,refetch:a.value.refetch})}).finally(()=>{d(void 0)})});e=Array.isArray(e)?e:[e];let c=!1;for(const u of e)u.subscribe(async()=>{xj()||(c?await i():IA(a,()=>{const d=setTimeout(async()=>{c||(await i(),c=!0)},0);return()=>{a.off(),u.off(),clearTimeout(d)}}))});return a},kc=()=>Math.floor(Date.now()/1e3),Tj=5;function Oj(e){const{sessionAtom:t,sessionSignal:n,$fetch:r,options:a={}}=e,i=a.sessionOptions?.refetchInterval??0,c=a.sessionOptions?.refetchOnWindowFocus??!0,u=a.sessionOptions?.refetchWhenOffline??!1,d={lastSync:0,lastSessionRequest:0,cachedSession:void 0},f=()=>u||Ky().isOnline,m=R=>{if(!f())return;if(R?.event==="storage"){d.lastSync=kc(),n.set(!n.get());return}const T=t.get();if(R?.event==="poll"){d.lastSessionRequest=kc(),r("/get-session").then(O=>{t.set({...T,data:O.data,error:O.error||null}),d.lastSync=kc(),n.set(!n.get())}).catch(()=>{});return}R?.event==="visibilitychange"&&kc()-d.lastSessionRequest<Tj&&T?.data!==null&&T?.data!==void 0||(T?.data===null||T?.data===void 0||R?.event==="visibilitychange")&&(R?.event==="visibilitychange"&&(d.lastSessionRequest=kc()),d.lastSync=kc(),n.set(!n.get()))},p=R=>{Gy().post({event:"session",data:{trigger:R},clientId:Math.random().toString(36).substring(7)})},g=()=>{i&&i>0&&(d.pollInterval=setInterval(()=>{t.get()?.data&&m({event:"poll"})},i*1e3))},y=()=>{d.unsubscribeBroadcast=Gy().subscribe(()=>{m({event:"storage"})})},w=()=>{c&&(d.unsubscribeFocus=Wx().subscribe(()=>{m({event:"visibilitychange"})}))},S=()=>{d.unsubscribeOnline=Ky().subscribe(R=>{R&&m({event:"visibilitychange"})})};return{init:()=>{g(),y(),w(),S(),Gy().setup(),Wx().setup(),Ky().setup()},cleanup:()=>{d.pollInterval&&(clearInterval(d.pollInterval),d.pollInterval=void 0),d.unsubscribeBroadcast&&(d.unsubscribeBroadcast(),d.unsubscribeBroadcast=void 0),d.unsubscribeFocus&&(d.unsubscribeFocus(),d.unsubscribeFocus=void 0),d.unsubscribeOnline&&(d.unsubscribeOnline(),d.unsubscribeOnline=void 0),d.lastSync=0,d.lastSessionRequest=0,d.cachedSession=void 0},triggerRefetch:m,broadcastSessionUpdate:p}}const Cj={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function Aj(e,t){const n=Kc(!1),r=Pu(n,"/get-session",e,{method:"GET"});return IA(r,()=>{const a=Oj({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return a.init(),()=>{a.cleanup()}}),{session:r,$sessionSignal:n}}const Ij=(e,t)=>{const n="credentials"in Request.prototype,r=zL(e?.baseURL,e?.basePath)??"/api/auth",a=e?.plugins?.flatMap(O=>O.fetchPlugins).filter(O=>O!==void 0)||[],i={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:c,onError:u,onRequest:d,onResponse:f,...m}=e?.fetchOptions||{},p=_j({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(O){return O?ZL(O,{strict:!1}):null},customFetchImpl:fetch,...m,plugins:[i,...m.plugins||[],...e?.disableDefaultFetchPlugins?[]:[Cj],...a]}),{$sessionSignal:g,session:y}=Aj(p,e),w=e?.plugins||[];let S={},b={$sessionSignal:g,session:y},E={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"};const R=[{signal:"$sessionSignal",matcher(O){return O==="/sign-out"||O==="/update-user"||O==="/sign-up/email"||O==="/sign-in/email"||O==="/delete-user"||O==="/verify-email"||O==="/revoke-sessions"||O==="/revoke-session"||O==="/change-email"}}];for(const O of w)O.getAtoms&&Object.assign(b,O.getAtoms?.(p)),O.pathMethods&&Object.assign(E,O.pathMethods),O.atomListeners&&R.push(...O.atomListeners);const T={notify:O=>{b[O].set(!b[O].get())},listen:(O,C)=>{b[O].subscribe(C)},atoms:b};for(const O of w)O.getActions&&Object.assign(S,O.getActions?.(p,T,e));return{get baseURL(){return r},pluginsActions:S,pluginsAtoms:b,pluginPathMethods:E,atomListeners:R,$fetch:p,$store:T}};function Nj(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function kj(e,t,n){const r=t[e],{fetchOptions:a,query:i,...c}=n||{};return r||(a?.method?a.method:c&&Object.keys(c).length>0?"POST":"GET")}function Mj(e,t,n,r,a){function i(c=[]){return new Proxy(function(){},{get(u,d){if(typeof d!="string"||d==="then"||d==="catch"||d==="finally")return;const f=[...c,d];let m=e;for(const p of f)if(m&&typeof m=="object"&&p in m)m=m[p];else{m=void 0;break}return typeof m=="function"||Nj(m)?m:i(f)},apply:async(u,d,f)=>{const m="/"+c.map(R=>R.replace(/[A-Z]/g,T=>`-${T.toLowerCase()}`)).join("/"),p=f[0]||{},g=f[1]||{},{query:y,fetchOptions:w,...S}=p,b={...g,...w},E=kj(m,n,p);return await t(m,{...b,body:E==="GET"?void 0:{...S,...b?.body||{}},query:y||b?.query,method:E,async onSuccess(R){if(await b?.onSuccess?.(R),!a||b.disableSignal)return;const T=a.filter(O=>O.matcher(m));if(T.length)for(const O of T){const C=r[O.signal];if(!C)return;const I=C.get();setTimeout(()=>{C.set(!I)},10)}}})}})}return i()}function Pj(e,t={}){let n=A.useRef(e.get());const{keys:r,deps:a=[e,r]}=t;let i=A.useCallback(u=>{const d=f=>{n.current!==f&&(n.current=f,u())};return d(e.value),r?.length?QL(e,r,d):e.listen(d)},a),c=()=>n.current;return A.useSyncExternalStore(i,c,c)}function Dj(e){return`use${Lj(e)}`}function Lj(e){return e.charAt(0).toUpperCase()+e.slice(1)}function jj(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:a,$store:i,atomListeners:c}=Ij(e);let u={};for(const[d,f]of Object.entries(r))u[Dj(d)]=()=>Pj(f);return Mj({...n,...u,$fetch:a,$store:i},a,t,r,c)}function $j(e){return{authorize(t,n="AND"){let r=!1;for(const[a,i]of Object.entries(t)){const c=e[a];if(!c)return{success:!1,error:`You are not allowed to access resource: ${a}`};if(Array.isArray(i))r=i.every(u=>c.includes(u));else if(typeof i=="object"){const u=i;u.connector==="OR"?r=u.actions.some(d=>c.includes(d)):r=u.actions.every(d=>c.includes(d))}else throw new Hu("Invalid access control request");if(r&&n==="OR")return{success:r};if(!r&&n==="AND")return{success:!1,error:`unauthorized to access resource "${a}"`}}return r?{success:r}:{success:!1,error:"Not authorized"}},statements:e}}function PA(e){return{newRole(t){return $j(t)},statements:e}}const Uj={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},DA=PA(Uj),LA=DA.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),jA=DA.newRole({user:[],session:[]}),zj={admin:LA,user:jA},Vj=e=>{if(e.userId&&e.options?.adminUserIds?.includes(e.userId))return!0;if(!e.permissions&&!e.permission)return!1;const t=(e.role||e.options?.defaultRole||"user").split(","),n=e.options?.roles||zj;for(const r of t)if(n[r]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},Fj={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},Ab=PA(Fj),$A=Ab.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),UA=Ab.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),zA=Ab.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),Bj={admin:$A,owner:UA,member:zA},qj=(e,t)=>{if(!e.permissions&&!e.permission)return!1;const n=e.role.split(","),r=e.options.creatorRole||"owner",a=n.includes(r),i=e.allowCreatorAllPermissions||!1;if(a&&i)return!0;for(const c of n)if(t[c]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},Hj=e=>{const t={admin:LA,user:jA,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>Vj({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},Gj=()=>({id:"magic-link",$InferServerPlugin:{}}),Zj=e=>qj(e,e.options.roles||Bj),Wj=e=>{const t=Kc(!1),n=Kc(!1),r=Kc(!1),a=Kc(!1),i={admin:$A,member:zA,owner:UA,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(c,u,d)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:f=>Zj({role:f.role,options:{ac:e?.ac,roles:i},permissions:f.permissions??f.permission})}}),getAtoms:c=>{const u=Pu(t,"/organization/list",c,{method:"GET"});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:r,$activeMemberRoleSignal:a,activeOrganization:Pu([n],"/organization/get-full-organization",c,()=>({method:"GET"})),listOrganizations:u,activeMember:Pu([r],"/organization/get-active-member",c,{method:"GET"}),activeMemberRole:Pu([a],"/organization/get-active-member-role",c,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(c){return c==="/organization/create"||c==="/organization/delete"||c==="/organization/update"},signal:"$listOrg"},{matcher(c){return c.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(c){return c.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(c){return c.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(c){return c.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},Kj=e=>({id:"sso-client",$InferServerPlugin:{}}),Yj=jj({plugins:[Wj({}),Hj(),Kj(),Gj()]});function VA(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=VA(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function FA(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=VA(e))&&(r&&(r+=" "),r+=t);return r}const Qj=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Xj=(e,t)=>({classGroupId:e,validator:t}),BA=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),$p="-",Kx=[],Jj="arbitrary..",e$=e=>{const t=n$(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return t$(c);const u=c.split($p),d=u[0]===""&&u.length>1?1:0;return qA(u,d,t)},getConflictingClassGroupIds:(c,u)=>{if(u){const d=r[c],f=n[c];return d?f?Qj(f,d):d:f||Kx}return n[c]||Kx}}},qA=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],i=n.nextPart.get(a);if(i){const f=qA(e,t+1,i);if(f)return f}const c=n.validators;if(c===null)return;const u=t===0?e.join($p):e.slice(t).join($p),d=c.length;for(let f=0;f<d;f++){const m=c[f];if(m.validator(u))return m.classGroupId}},t$=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Jj+r:void 0})(),n$=e=>{const{theme:t,classGroups:n}=e;return r$(n,t)},r$=(e,t)=>{const n=BA();for(const r in e){const a=e[r];Ib(a,n,r,t)}return n},Ib=(e,t,n,r)=>{const a=e.length;for(let i=0;i<a;i++){const c=e[i];o$(c,t,n,r)}},o$=(e,t,n,r)=>{if(typeof e=="string"){a$(e,t,n);return}if(typeof e=="function"){s$(e,t,n,r);return}i$(e,t,n,r)},a$=(e,t,n)=>{const r=e===""?t:HA(t,e);r.classGroupId=n},s$=(e,t,n,r)=>{if(c$(e)){Ib(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Xj(n,e))},i$=(e,t,n,r)=>{const a=Object.entries(e),i=a.length;for(let c=0;c<i;c++){const[u,d]=a[c];Ib(d,HA(t,u),n,r)}},HA=(e,t)=>{let n=e;const r=t.split($p),a=r.length;for(let i=0;i<a;i++){const c=r[i];let u=n.nextPart.get(c);u||(u=BA(),n.nextPart.set(c,u)),n=u}return n},c$=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,l$=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(i,c)=>{n[i]=c,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let c=n[i];if(c!==void 0)return c;if((c=r[i])!==void 0)return a(i,c),c},set(i,c){i in n?n[i]=c:a(i,c)}}},u_="!",Yx=":",u$=[],Qx=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),d$=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const i=[];let c=0,u=0,d=0,f;const m=a.length;for(let S=0;S<m;S++){const b=a[S];if(c===0&&u===0){if(b===Yx){i.push(a.slice(d,S)),d=S+1;continue}if(b==="/"){f=S;continue}}b==="["?c++:b==="]"?c--:b==="("?u++:b===")"&&u--}const p=i.length===0?a:a.slice(d);let g=p,y=!1;p.endsWith(u_)?(g=p.slice(0,-1),y=!0):p.startsWith(u_)&&(g=p.slice(1),y=!0);const w=f&&f>d?f-d:void 0;return Qx(i,y,g,w)};if(t){const a=t+Yx,i=r;r=c=>c.startsWith(a)?i(c.slice(a.length)):Qx(u$,!1,c,void 0,!0)}if(n){const a=r;r=i=>n({className:i,parseClassName:a})}return r},f$=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let i=0;i<n.length;i++){const c=n[i],u=c[0]==="[",d=t.has(c);u||d?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(c)):a.push(c)}return a.length>0&&(a.sort(),r.push(...a)),r}},h$=e=>({cache:l$(e.cacheSize),parseClassName:d$(e),sortModifiers:f$(e),...e$(e)}),p$=/\s+/,m$=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:i}=t,c=[],u=e.trim().split(p$);let d="";for(let f=u.length-1;f>=0;f-=1){const m=u[f],{isExternal:p,modifiers:g,hasImportantModifier:y,baseClassName:w,maybePostfixModifierPosition:S}=n(m);if(p){d=m+(d.length>0?" "+d:d);continue}let b=!!S,E=r(b?w.substring(0,S):w);if(!E){if(!b){d=m+(d.length>0?" "+d:d);continue}if(E=r(w),!E){d=m+(d.length>0?" "+d:d);continue}b=!1}const R=g.length===0?"":g.length===1?g[0]:i(g).join(":"),T=y?R+u_:R,O=T+E;if(c.indexOf(O)>-1)continue;c.push(O);const C=a(E,b);for(let I=0;I<C.length;++I){const N=C[I];c.push(T+N)}d=m+(d.length>0?" "+d:d)}return d},g$=(...e)=>{let t=0,n,r,a="";for(;t<e.length;)(n=e[t++])&&(r=GA(n))&&(a&&(a+=" "),a+=r);return a},GA=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=GA(e[r]))&&(n&&(n+=" "),n+=t);return n},v$=(e,...t)=>{let n,r,a,i;const c=d=>{const f=t.reduce((m,p)=>p(m),e());return n=h$(f),r=n.cache.get,a=n.cache.set,i=u,u(d)},u=d=>{const f=r(d);if(f)return f;const m=m$(d,n);return a(d,m),m};return i=c,(...d)=>i(g$(...d))},y$=[],Un=e=>{const t=n=>n[e]||y$;return t.isThemeGetter=!0,t},ZA=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,WA=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_$=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,b$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,w$=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,S$=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,E$=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,R$=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Es=e=>_$.test(e),pt=e=>!!e&&!Number.isNaN(Number(e)),Rs=e=>!!e&&Number.isInteger(Number(e)),Yy=e=>e.endsWith("%")&&pt(e.slice(0,-1)),La=e=>b$.test(e),KA=()=>!0,x$=e=>w$.test(e)&&!S$.test(e),Nb=()=>!1,T$=e=>E$.test(e),O$=e=>R$.test(e),C$=e=>!ze(e)&&!Ve(e),A$=e=>Ks(e,XA,Nb),ze=e=>ZA.test(e),yi=e=>Ks(e,JA,x$),Xx=e=>Ks(e,j$,pt),I$=e=>Ks(e,tI,KA),N$=e=>Ks(e,eI,Nb),Jx=e=>Ks(e,YA,Nb),k$=e=>Ks(e,QA,O$),sh=e=>Ks(e,nI,T$),Ve=e=>WA.test(e),Eu=e=>Fi(e,JA),M$=e=>Fi(e,eI),eT=e=>Fi(e,YA),P$=e=>Fi(e,XA),D$=e=>Fi(e,QA),ih=e=>Fi(e,nI,!0),L$=e=>Fi(e,tI,!0),Ks=(e,t,n)=>{const r=ZA.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Fi=(e,t,n=!1)=>{const r=WA.exec(e);return r?r[1]?t(r[1]):n:!1},YA=e=>e==="position"||e==="percentage",QA=e=>e==="image"||e==="url",XA=e=>e==="length"||e==="size"||e==="bg-size",JA=e=>e==="length",j$=e=>e==="number",eI=e=>e==="family-name",tI=e=>e==="number"||e==="weight",nI=e=>e==="shadow",$$=()=>{const e=Un("color"),t=Un("font"),n=Un("text"),r=Un("font-weight"),a=Un("tracking"),i=Un("leading"),c=Un("breakpoint"),u=Un("container"),d=Un("spacing"),f=Un("radius"),m=Un("shadow"),p=Un("inset-shadow"),g=Un("text-shadow"),y=Un("drop-shadow"),w=Un("blur"),S=Un("perspective"),b=Un("aspect"),E=Un("ease"),R=Un("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...O(),Ve,ze],I=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],P=()=>[Ve,ze,d],$=()=>[Es,"full","auto",...P()],W=()=>[Rs,"none","subgrid",Ve,ze],V=()=>["auto",{span:["full",Rs,Ve,ze]},Rs,Ve,ze],G=()=>[Rs,"auto",Ve,ze],U=()=>["auto","min","max","fr",Ve,ze],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],le=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...P()],Y=()=>[Es,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],ie=()=>[Es,"screen","full","dvw","lvw","svw","min","max","fit",...P()],fe=()=>[Es,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],K=()=>[e,Ve,ze],D=()=>[...O(),eT,Jx,{position:[Ve,ze]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",P$,A$,{size:[Ve,ze]}],L=()=>[Yy,Eu,yi],z=()=>["","none","full",f,Ve,ze],Q=()=>["",pt,Eu,yi],me=()=>["solid","dashed","dotted","double"],ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ce=()=>[pt,Yy,eT,Jx],Ie=()=>["","none",w,Ve,ze],H=()=>["none",pt,Ve,ze],re=()=>["none",pt,Ve,ze],be=()=>[pt,Ve,ze],se=()=>[Es,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[La],breakpoint:[La],color:[KA],container:[La],"drop-shadow":[La],ease:["in","out","in-out"],font:[C$],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[La],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[La],shadow:[La],spacing:["px",pt],text:[La],"text-shadow":[La],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Es,ze,Ve,b]}],container:["container"],columns:[{columns:[pt,ze,Ve,u]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{"inset-s":$(),start:$()}],end:[{"inset-e":$(),end:$()}],"inset-bs":[{"inset-bs":$()}],"inset-be":[{"inset-be":$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[Rs,"auto",Ve,ze]}],basis:[{basis:[Es,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[pt,Es,"auto","initial","none",ze]}],grow:[{grow:["",pt,Ve,ze]}],shrink:[{shrink:["",pt,Ve,ze]}],order:[{order:[Rs,"first","last","none",Ve,ze]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...le(),"normal"]}],"justify-self":[{"justify-self":["auto",...le()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...le(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...le(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...le(),"baseline"]}],"place-self":[{"place-self":["auto",...le()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],"inline-size":[{inline:["auto",...ie()]}],"min-inline-size":[{"min-inline":["auto",...ie()]}],"max-inline-size":[{"max-inline":["none",...ie()]}],"block-size":[{block:["auto",...fe()]}],"min-block-size":[{"min-block":["auto",...fe()]}],"max-block-size":[{"max-block":["none",...fe()]}],w:[{w:[u,"screen",...Y()]}],"min-w":[{"min-w":[u,"screen","none",...Y()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[c]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",n,Eu,yi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,L$,I$]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Yy,ze]}],"font-family":[{font:[M$,N$,t]}],"font-features":[{"font-features":[ze]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,Ve,ze]}],"line-clamp":[{"line-clamp":[pt,"none",Ve,Xx]}],leading:[{leading:[i,...P()]}],"list-image":[{"list-image":["none",Ve,ze]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ve,ze]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:[pt,"from-font","auto",Ve,yi]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[pt,"auto",Ve,ze]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ve,ze]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ve,ze]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Rs,Ve,ze],radial:["",Ve,ze],conic:[Rs,Ve,ze]},D$,k$]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-bs":[{"border-bs":Q()}],"border-w-be":[{"border-be":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...me(),"hidden","none"]}],"divide-style":[{divide:[...me(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-bs":[{"border-bs":K()}],"border-color-be":[{"border-be":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[pt,Ve,ze]}],"outline-w":[{outline:["",pt,Eu,yi]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",m,ih,sh]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",p,ih,sh]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[pt,yi]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",g,ih,sh]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[pt,Ve,ze]}],"mix-blend":[{"mix-blend":[...ve(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ve()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[pt]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ce()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":Ce()}],"mask-image-t-to-pos":[{"mask-t-to":Ce()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":Ce()}],"mask-image-r-to-pos":[{"mask-r-to":Ce()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":Ce()}],"mask-image-b-to-pos":[{"mask-b-to":Ce()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":Ce()}],"mask-image-l-to-pos":[{"mask-l-to":Ce()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":Ce()}],"mask-image-x-to-pos":[{"mask-x-to":Ce()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":Ce()}],"mask-image-y-to-pos":[{"mask-y-to":Ce()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[Ve,ze]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ce()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[pt]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ce()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ve,ze]}],filter:[{filter:["","none",Ve,ze]}],blur:[{blur:Ie()}],brightness:[{brightness:[pt,Ve,ze]}],contrast:[{contrast:[pt,Ve,ze]}],"drop-shadow":[{"drop-shadow":["","none",y,ih,sh]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",pt,Ve,ze]}],"hue-rotate":[{"hue-rotate":[pt,Ve,ze]}],invert:[{invert:["",pt,Ve,ze]}],saturate:[{saturate:[pt,Ve,ze]}],sepia:[{sepia:["",pt,Ve,ze]}],"backdrop-filter":[{"backdrop-filter":["","none",Ve,ze]}],"backdrop-blur":[{"backdrop-blur":Ie()}],"backdrop-brightness":[{"backdrop-brightness":[pt,Ve,ze]}],"backdrop-contrast":[{"backdrop-contrast":[pt,Ve,ze]}],"backdrop-grayscale":[{"backdrop-grayscale":["",pt,Ve,ze]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[pt,Ve,ze]}],"backdrop-invert":[{"backdrop-invert":["",pt,Ve,ze]}],"backdrop-opacity":[{"backdrop-opacity":[pt,Ve,ze]}],"backdrop-saturate":[{"backdrop-saturate":[pt,Ve,ze]}],"backdrop-sepia":[{"backdrop-sepia":["",pt,Ve,ze]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ve,ze]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[pt,"initial",Ve,ze]}],ease:[{ease:["linear","initial",E,Ve,ze]}],delay:[{delay:[pt,Ve,ze]}],animate:[{animate:["none",R,Ve,ze]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Ve,ze]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:H()}],"rotate-x":[{"rotate-x":H()}],"rotate-y":[{"rotate-y":H()}],"rotate-z":[{"rotate-z":H()}],scale:[{scale:re()}],"scale-x":[{"scale-x":re()}],"scale-y":[{"scale-y":re()}],"scale-z":[{"scale-z":re()}],"scale-3d":["scale-3d"],skew:[{skew:be()}],"skew-x":[{"skew-x":be()}],"skew-y":[{"skew-y":be()}],transform:[{transform:[Ve,ze,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":["translate-none"],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ve,ze]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ve,ze]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[pt,Eu,yi,Xx]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},U$=v$($$),z$=Object.freeze({status:"aborted"});function _e(e,t,n){function r(u,d){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:d,constr:c,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,d);const f=c.prototype,m=Object.keys(f);for(let p=0;p<m.length;p++){const g=m[p];g in u||(u[g]=f[g].bind(u))}}const a=n?.Parent??Object;class i extends a{}Object.defineProperty(i,"name",{value:e});function c(u){var d;const f=n?.Parent?new i:this;r(f,u),(d=f._zod).deferred??(d.deferred=[]);for(const m of f._zod.deferred)m();return f}return Object.defineProperty(c,"init",{value:r}),Object.defineProperty(c,Symbol.hasInstance,{value:u=>n?.Parent&&u instanceof n.Parent?!0:u?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}class nl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class rI extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const oI={};function Fs(e){return oI}function aI(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,a])=>t.indexOf(+r)===-1).map(([r,a])=>a)}function d_(e,t){return typeof t=="bigint"?t.toString():t}function Mm(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function _d(e){return e==null}function kb(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function V$(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let a=(r.split(".")[1]||"").length;if(a===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d?.[1]&&(a=Number.parseInt(d[1]))}const i=n>a?n:a,c=Number.parseInt(e.toFixed(i).replace(".","")),u=Number.parseInt(t.toFixed(i).replace(".",""));return c%u/10**i}const tT=Symbol("evaluating");function Tt(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==tT)return r===void 0&&(r=tT,r=n()),r},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function Bi(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ys(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function nT(e){return JSON.stringify(e)}function F$(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const sI="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function rd(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const B$=Mm(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function ul(e){if(rd(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(rd(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function iI(e){return ul(e)?{...e}:Array.isArray(e)?[...e]:e}const q$=new Set(["string","number","symbol"]);function dl(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Qs(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function $e(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function H$(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const G$={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Z$(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=Ys(e._zod.def,{get shape(){const c={};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(c[u]=n.shape[u])}return Bi(this,"shape",c),c},checks:[]});return Qs(e,i)}function W$(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=Ys(e._zod.def,{get shape(){const c={...e._zod.def.shape};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete c[u]}return Bi(this,"shape",c),c},checks:[]});return Qs(e,i)}function K$(e,t){if(!ul(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const c in t)if(Object.getOwnPropertyDescriptor(i,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=Ys(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Bi(this,"shape",i),i}});return Qs(e,a)}function Y$(e,t){if(!ul(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Ys(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Bi(this,"shape",r),r}});return Qs(e,n)}function Q$(e,t){const n=Ys(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Bi(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Qs(e,n)}function X$(e,t,n){const a=t._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const c=Ys(t._zod.def,{get shape(){const u=t._zod.def.shape,d={...u};if(n)for(const f in n){if(!(f in u))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(d[f]=e?new e({type:"optional",innerType:u[f]}):u[f])}else for(const f in u)d[f]=e?new e({type:"optional",innerType:u[f]}):u[f];return Bi(this,"shape",d),d},checks:[]});return Qs(t,c)}function J$(e,t,n){const r=Ys(t._zod.def,{get shape(){const a=t._zod.def.shape,i={...a};if(n)for(const c in n){if(!(c in i))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(i[c]=new e({type:"nonoptional",innerType:a[c]}))}else for(const c in a)i[c]=new e({type:"nonoptional",innerType:a[c]});return Bi(this,"shape",i),i}});return Qs(t,r)}function Yc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Ai(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function ch(e){return typeof e=="string"?e:e?.message}function Bs(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const a=ch(e.inst?._zod.def?.error?.(e))??ch(t?.error?.(e))??ch(n.customError?.(e))??ch(n.localeError?.(e))??"Invalid input";r.message=a}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function cI(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Mb(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function od(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const lI=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,d_,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Pb=_e("$ZodError",lI),Pm=_e("$ZodError",lI,{Parent:Error});function e8(e,t=n=>n.message){const n={},r=[];for(const a of e.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}}function t8(e,t=n=>n.message){const n={_errors:[]},r=a=>{for(const i of a.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(c=>r({issues:c}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let c=n,u=0;for(;u<i.path.length;){const d=i.path[u];u===i.path.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(t(i))):c[d]=c[d]||{_errors:[]},c=c[d],u++}}};return r(e),n}const Dm=e=>(t,n,r,a)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},c=t._zod.run({value:n,issues:[]},i);if(c instanceof Promise)throw new nl;if(c.issues.length){const u=new(a?.Err??e)(c.issues.map(d=>Bs(d,i,Fs())));throw sI(u,a?.callee),u}return c.value},n8=Dm(Pm),Lm=e=>async(t,n,r,a)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let c=t._zod.run({value:n,issues:[]},i);if(c instanceof Promise&&(c=await c),c.issues.length){const u=new(a?.Err??e)(c.issues.map(d=>Bs(d,i,Fs())));throw sI(u,a?.callee),u}return c.value},r8=Lm(Pm),jm=e=>(t,n,r)=>{const a=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},a);if(i instanceof Promise)throw new nl;return i.issues.length?{success:!1,error:new(e??Pb)(i.issues.map(c=>Bs(c,a,Fs())))}:{success:!0,data:i.value}},uI=jm(Pm),$m=e=>async(t,n,r)=>{const a=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},a);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(c=>Bs(c,a,Fs())))}:{success:!0,data:i.value}},o8=$m(Pm),a8=e=>(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Dm(e)(t,n,a)},s8=e=>(t,n,r)=>Dm(e)(t,n,r),i8=e=>async(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Lm(e)(t,n,a)},c8=e=>async(t,n,r)=>Lm(e)(t,n,r),l8=e=>(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return jm(e)(t,n,a)},u8=e=>(t,n,r)=>jm(e)(t,n,r),d8=e=>async(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return $m(e)(t,n,a)},f8=e=>async(t,n,r)=>$m(e)(t,n,r),h8=/^[cC][^\s-]{8,}$/,p8=/^[0-9a-z]+$/,m8=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,g8=/^[0-9a-vA-V]{20}$/,v8=/^[A-Za-z0-9]{27}$/,y8=/^[a-zA-Z0-9_-]{21}$/,_8=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,b8=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,rT=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,w8=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,S8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function E8(){return new RegExp(S8,"u")}const R8=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,x8=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,T8=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,O8=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,C8=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,dI=/^[A-Za-z0-9_-]*$/,A8=/^\+[1-9]\d{6,14}$/,fI="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",I8=new RegExp(`^${fI}$`);function hI(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function N8(e){return new RegExp(`^${hI(e)}$`)}function k8(e){const t=hI({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${fI}T(?:${r})$`)}const M8=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},P8=/^-?\d+$/,pI=/^-?\d+(?:\.\d+)?$/,D8=/^(?:true|false)$/i,L8=/^null$/i,j8=/^[^A-Z]*$/,$8=/^[^a-z]*$/,ir=_e("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),mI={number:"number",bigint:"bigint",object:"date"},gI=_e("$ZodCheckLessThan",(e,t)=>{ir.init(e,t);const n=mI[typeof t.value];e._zod.onattach.push(r=>{const a=r._zod.bag,i=(t.inclusive?a.maximum:a.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?a.maximum=t.value:a.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vI=_e("$ZodCheckGreaterThan",(e,t)=>{ir.init(e,t);const n=mI[typeof t.value];e._zod.onattach.push(r=>{const a=r._zod.bag,i=(t.inclusive?a.minimum:a.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?a.minimum=t.value:a.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),U8=_e("$ZodCheckMultipleOf",(e,t)=>{ir.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):V$(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),z8=_e("$ZodCheckNumberFormat",(e,t)=>{ir.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[a,i]=G$[t.format];e._zod.onattach.push(c=>{const u=c._zod.bag;u.format=t.format,u.minimum=a,u.maximum=i,n&&(u.pattern=P8)}),e._zod.check=c=>{const u=c.value;if(n){if(!Number.isInteger(u)){c.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?c.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):c.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}u<a&&c.issues.push({origin:"number",input:u,code:"too_small",minimum:a,inclusive:!0,inst:e,continue:!t.abort}),u>i&&c.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),V8=_e("$ZodCheckMaxSize",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!_d(a)&&a.size!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const a=r.value;a.size<=t.maximum||r.issues.push({origin:cI(a),code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),F8=_e("$ZodCheckMinSize",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!_d(a)&&a.size!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const a=r.value;a.size>=t.minimum||r.issues.push({origin:cI(a),code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),B8=_e("$ZodCheckMaxLength",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!_d(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const a=r.value;if(a.length<=t.maximum)return;const c=Mb(a);r.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),q8=_e("$ZodCheckMinLength",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!_d(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const a=r.value;if(a.length>=t.minimum)return;const c=Mb(a);r.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),H8=_e("$ZodCheckLengthEquals",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!_d(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=r=>{const a=r.value,i=a.length;if(i===t.length)return;const c=Mb(a),u=i>t.length;r.issues.push({origin:c,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Um=_e("$ZodCheckStringFormat",(e,t)=>{var n,r;ir.init(e,t),e._zod.onattach.push(a=>{const i=a._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),G8=_e("$ZodCheckRegex",(e,t)=>{Um.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Z8=_e("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=j8),Um.init(e,t)}),W8=_e("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=$8),Um.init(e,t)}),K8=_e("$ZodCheckIncludes",(e,t)=>{ir.init(e,t);const n=dl(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(a=>{const i=a._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),Y8=_e("$ZodCheckStartsWith",(e,t)=>{ir.init(e,t);const n=new RegExp(`^${dl(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Q8=_e("$ZodCheckEndsWith",(e,t)=>{ir.init(e,t);const n=new RegExp(`.*${dl(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),X8=_e("$ZodCheckMimeType",(e,t)=>{ir.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(r=>{r._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),J8=_e("$ZodCheckOverwrite",(e,t)=>{ir.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class e9{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
11
- `).filter(c=>c),a=Math.min(...r.map(c=>c.length-c.trimStart().length)),i=r.map(c=>c.slice(a)).map(c=>" ".repeat(this.indent*2)+c);for(const c of i)this.content.push(c)}compile(){const t=Function,n=this?.args,a=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,a.join(`
12
- `))}}const t9={major:4,minor:3,patch:6},Ht=_e("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=t9;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const a of r)for(const i of a._zod.onattach)i(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const a=(c,u,d)=>{let f=Yc(c),m;for(const p of u){if(p._zod.def.when){if(!p._zod.def.when(c))continue}else if(f)continue;const g=c.issues.length,y=p._zod.check(c);if(y instanceof Promise&&d?.async===!1)throw new nl;if(m||y instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await y,c.issues.length!==g&&(f||(f=Yc(c,g)))});else{if(c.issues.length===g)continue;f||(f=Yc(c,g))}}return m?m.then(()=>c):c},i=(c,u,d)=>{if(Yc(c))return c.aborted=!0,c;const f=a(u,r,d);if(f instanceof Promise){if(d.async===!1)throw new nl;return f.then(m=>e._zod.parse(m,d))}return e._zod.parse(f,d)};e._zod.run=(c,u)=>{if(u.skipChecks)return e._zod.parse(c,u);if(u.direction==="backward"){const f=e._zod.parse({value:c.value,issues:[]},{...u,skipChecks:!0});return f instanceof Promise?f.then(m=>i(m,c,u)):i(f,c,u)}const d=e._zod.parse(c,u);if(d instanceof Promise){if(u.async===!1)throw new nl;return d.then(f=>a(f,r,u))}return a(d,r,u)}}Tt(e,"~standard",()=>({validate:a=>{try{const i=uI(e,a);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return o8(e,a).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},vendor:"zod",version:1}))}),Db=_e("$ZodString",(e,t)=>{Ht.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??M8(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),dn=_e("$ZodStringFormat",(e,t)=>{Um.init(e,t),Db.init(e,t)}),n9=_e("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=b8),dn.init(e,t)}),r9=_e("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=rT(r))}else t.pattern??(t.pattern=rT());dn.init(e,t)}),o9=_e("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=w8),dn.init(e,t)}),a9=_e("$ZodURL",(e,t)=>{dn.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),a=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(a.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=a.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),s9=_e("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=E8()),dn.init(e,t)}),i9=_e("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=y8),dn.init(e,t)}),c9=_e("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=h8),dn.init(e,t)}),l9=_e("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=p8),dn.init(e,t)}),u9=_e("$ZodULID",(e,t)=>{t.pattern??(t.pattern=m8),dn.init(e,t)}),d9=_e("$ZodXID",(e,t)=>{t.pattern??(t.pattern=g8),dn.init(e,t)}),f9=_e("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=v8),dn.init(e,t)}),h9=_e("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=k8(t)),dn.init(e,t)}),p9=_e("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=I8),dn.init(e,t)}),m9=_e("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=N8(t)),dn.init(e,t)}),g9=_e("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=_8),dn.init(e,t)}),v9=_e("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=R8),dn.init(e,t),e._zod.bag.format="ipv4"}),y9=_e("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=x8),dn.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),_9=_e("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=T8),dn.init(e,t)}),b9=_e("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=O8),dn.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[a,i]=r;if(!i)throw new Error;const c=Number(i);if(`${c}`!==i)throw new Error;if(c<0||c>128)throw new Error;new URL(`http://[${a}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function yI(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const w9=_e("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=C8),dn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{yI(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function S9(e){if(!dI.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return yI(n)}const E9=_e("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=dI),dn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{S9(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),R9=_e("$ZodE164",(e,t)=>{t.pattern??(t.pattern=A8),dn.init(e,t)});function x9(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const a=JSON.parse(atob(r));return!("typ"in a&&a?.typ!=="JWT"||!a.alg||t&&(!("alg"in a)||a.alg!==t))}catch{return!1}}const T9=_e("$ZodJWT",(e,t)=>{dn.init(e,t),e._zod.check=n=>{x9(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),_I=_e("$ZodNumber",(e,t)=>{Ht.init(e,t),e._zod.pattern=e._zod.bag.pattern??pI,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const a=n.value;if(typeof a=="number"&&!Number.isNaN(a)&&Number.isFinite(a))return n;const i=typeof a=="number"?Number.isNaN(a)?"NaN":Number.isFinite(a)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:a,inst:e,...i?{received:i}:{}}),n}}),O9=_e("$ZodNumberFormat",(e,t)=>{z8.init(e,t),_I.init(e,t)}),C9=_e("$ZodBoolean",(e,t)=>{Ht.init(e,t),e._zod.pattern=D8,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const a=n.value;return typeof a=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:e}),n}}),A9=_e("$ZodNull",(e,t)=>{Ht.init(e,t),e._zod.pattern=L8,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const a=n.value;return a===null||n.issues.push({expected:"null",code:"invalid_type",input:a,inst:e}),n}}),I9=_e("$ZodAny",(e,t)=>{Ht.init(e,t),e._zod.parse=n=>n}),N9=_e("$ZodUnknown",(e,t)=>{Ht.init(e,t),e._zod.parse=n=>n}),k9=_e("$ZodNever",(e,t)=>{Ht.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function oT(e,t,n){e.issues.length&&t.issues.push(...Ai(n,e.issues)),t.value[n]=e.value}const M9=_e("$ZodArray",(e,t)=>{Ht.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;if(!Array.isArray(a))return n.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),n;n.value=Array(a.length);const i=[];for(let c=0;c<a.length;c++){const u=a[c],d=t.element._zod.run({value:u,issues:[]},r);d instanceof Promise?i.push(d.then(f=>oT(f,n,c))):oT(d,n,c)}return i.length?Promise.all(i).then(()=>n):n}});function Up(e,t,n,r,a){if(e.issues.length){if(a&&!(n in r))return;t.issues.push(...Ai(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function bI(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=H$(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function wI(e,t,n,r,a,i){const c=[],u=a.keySet,d=a.catchall._zod,f=d.def.type,m=d.optout==="optional";for(const p in t){if(u.has(p))continue;if(f==="never"){c.push(p);continue}const g=d.run({value:t[p],issues:[]},r);g instanceof Promise?e.push(g.then(y=>Up(y,n,p,t,m))):Up(g,n,p,t,m)}return c.length&&n.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const P9=_e("$ZodObject",(e,t)=>{if(Ht.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const u=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...u};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=Mm(()=>bI(t));Tt(e._zod,"propValues",()=>{const u=t.shape,d={};for(const f in u){const m=u[f]._zod;if(m.values){d[f]??(d[f]=new Set);for(const p of m.values)d[f].add(p)}}return d});const a=rd,i=t.catchall;let c;e._zod.parse=(u,d)=>{c??(c=r.value);const f=u.value;if(!a(f))return u.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),u;u.value={};const m=[],p=c.shape;for(const g of c.keys){const y=p[g],w=y._zod.optout==="optional",S=y._zod.run({value:f[g],issues:[]},d);S instanceof Promise?m.push(S.then(b=>Up(b,u,g,f,w))):Up(S,u,g,f,w)}return i?wI(m,f,u,d,r.value,e):m.length?Promise.all(m).then(()=>u):u}}),D9=_e("$ZodObjectJIT",(e,t)=>{P9.init(e,t);const n=e._zod.parse,r=Mm(()=>bI(t)),a=g=>{const y=new e9(["shape","payload","ctx"]),w=r.value,S=T=>{const O=nT(T);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};y.write("const input = payload.value;");const b=Object.create(null);let E=0;for(const T of w.keys)b[T]=`key_${E++}`;y.write("const newResult = {};");for(const T of w.keys){const O=b[T],C=nT(T),N=g[T]?._zod?.optout==="optional";y.write(`const ${O} = ${S(T)};`),N?y.write(`
13
- if (${O}.issues.length) {
14
- if (${C} in input) {
15
- payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
16
- ...iss,
17
- path: iss.path ? [${C}, ...iss.path] : [${C}]
18
- })));
19
- }
20
- }
21
-
22
- if (${O}.value === undefined) {
23
- if (${C} in input) {
24
- newResult[${C}] = undefined;
25
- }
26
- } else {
27
- newResult[${C}] = ${O}.value;
28
- }
29
-
30
- `):y.write(`
31
- if (${O}.issues.length) {
32
- payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
33
- ...iss,
34
- path: iss.path ? [${C}, ...iss.path] : [${C}]
35
- })));
36
- }
37
-
38
- if (${O}.value === undefined) {
39
- if (${C} in input) {
40
- newResult[${C}] = undefined;
41
- }
42
- } else {
43
- newResult[${C}] = ${O}.value;
44
- }
45
-
46
- `)}y.write("payload.value = newResult;"),y.write("return payload;");const R=y.compile();return(T,O)=>R(g,T,O)};let i;const c=rd,u=!oI.jitless,f=u&&B$.value,m=t.catchall;let p;e._zod.parse=(g,y)=>{p??(p=r.value);const w=g.value;return c(w)?u&&f&&y?.async===!1&&y.jitless!==!0?(i||(i=a(t.shape)),g=i(g,y),m?wI([],w,g,y,p,e):g):n(g,y):(g.issues.push({expected:"object",code:"invalid_type",input:w,inst:e}),g)}});function aT(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const a=e.filter(i=>!Yc(i));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(c=>Bs(c,r,Fs())))}),t)}const SI=_e("$ZodUnion",(e,t)=>{Ht.init(e,t),Tt(e._zod,"optin",()=>t.options.some(a=>a._zod.optin==="optional")?"optional":void 0),Tt(e._zod,"optout",()=>t.options.some(a=>a._zod.optout==="optional")?"optional":void 0),Tt(e._zod,"values",()=>{if(t.options.every(a=>a._zod.values))return new Set(t.options.flatMap(a=>Array.from(a._zod.values)))}),Tt(e._zod,"pattern",()=>{if(t.options.every(a=>a._zod.pattern)){const a=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${a.map(i=>kb(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(a,i)=>{if(n)return r(a,i);let c=!1;const u=[];for(const d of t.options){const f=d._zod.run({value:a.value,issues:[]},i);if(f instanceof Promise)u.push(f),c=!0;else{if(f.issues.length===0)return f;u.push(f)}}return c?Promise.all(u).then(d=>aT(d,a,e,i)):aT(u,a,e,i)}}),L9=_e("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,SI.init(e,t);const n=e._zod.parse;Tt(e._zod,"propValues",()=>{const a={};for(const i of t.options){const c=i._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[u,d]of Object.entries(c)){a[u]||(a[u]=new Set);for(const f of d)a[u].add(f)}}return a});const r=Mm(()=>{const a=t.options,i=new Map;for(const c of a){const u=c._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(const d of u){if(i.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);i.set(d,c)}}return i});e._zod.parse=(a,i)=>{const c=a.value;if(!rd(c))return a.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),a;const u=r.value.get(c?.[t.discriminator]);return u?u._zod.run(a,i):t.unionFallback?n(a,i):(a.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),a)}}),j9=_e("$ZodIntersection",(e,t)=>{Ht.init(e,t),e._zod.parse=(n,r)=>{const a=n.value,i=t.left._zod.run({value:a,issues:[]},r),c=t.right._zod.run({value:a,issues:[]},r);return i instanceof Promise||c instanceof Promise?Promise.all([i,c]).then(([d,f])=>sT(n,d,f)):sT(n,i,c)}});function f_(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ul(e)&&ul(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),a={...e,...t};for(const i of r){const c=f_(e[i],t[i]);if(!c.valid)return{valid:!1,mergeErrorPath:[i,...c.mergeErrorPath]};a[i]=c.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const a=e[r],i=t[r],c=f_(a,i);if(!c.valid)return{valid:!1,mergeErrorPath:[r,...c.mergeErrorPath]};n.push(c.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function sT(e,t,n){const r=new Map;let a;for(const u of t.issues)if(u.code==="unrecognized_keys"){a??(a=u);for(const d of u.keys)r.has(d)||r.set(d,{}),r.get(d).l=!0}else e.issues.push(u);for(const u of n.issues)if(u.code==="unrecognized_keys")for(const d of u.keys)r.has(d)||r.set(d,{}),r.get(d).r=!0;else e.issues.push(u);const i=[...r].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(i.length&&a&&e.issues.push({...a,keys:i}),Yc(e))return e;const c=f_(t.value,n.value);if(!c.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);return e.value=c.data,e}const $9=_e("$ZodTuple",(e,t)=>{Ht.init(e,t);const n=t.items;e._zod.parse=(r,a)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];const c=[],u=[...n].reverse().findIndex(m=>m._zod.optin!=="optional"),d=u===-1?0:n.length-u;if(!t.rest){const m=i.length>n.length,p=i.length<d-1;if(m||p)return r.issues.push({...m?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:i,inst:e,origin:"array"}),r}let f=-1;for(const m of n){if(f++,f>=i.length&&f>=d)continue;const p=m._zod.run({value:i[f],issues:[]},a);p instanceof Promise?c.push(p.then(g=>lh(g,r,f))):lh(p,r,f)}if(t.rest){const m=i.slice(n.length);for(const p of m){f++;const g=t.rest._zod.run({value:p,issues:[]},a);g instanceof Promise?c.push(g.then(y=>lh(y,r,f))):lh(g,r,f)}}return c.length?Promise.all(c).then(()=>r):r}});function lh(e,t,n){e.issues.length&&t.issues.push(...Ai(n,e.issues)),t.value[n]=e.value}const U9=_e("$ZodRecord",(e,t)=>{Ht.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;if(!ul(a))return n.issues.push({expected:"record",code:"invalid_type",input:a,inst:e}),n;const i=[],c=t.keyType._zod.values;if(c){n.value={};const u=new Set;for(const f of c)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){u.add(typeof f=="number"?f.toString():f);const m=t.valueType._zod.run({value:a[f],issues:[]},r);m instanceof Promise?i.push(m.then(p=>{p.issues.length&&n.issues.push(...Ai(f,p.issues)),n.value[f]=p.value})):(m.issues.length&&n.issues.push(...Ai(f,m.issues)),n.value[f]=m.value)}let d;for(const f in a)u.has(f)||(d=d??[],d.push(f));d&&d.length>0&&n.issues.push({code:"unrecognized_keys",input:a,inst:e,keys:d})}else{n.value={};for(const u of Reflect.ownKeys(a)){if(u==="__proto__")continue;let d=t.keyType._zod.run({value:u,issues:[]},r);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&pI.test(u)&&d.issues.length){const p=t.keyType._zod.run({value:Number(u),issues:[]},r);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(d=p)}if(d.issues.length){t.mode==="loose"?n.value[u]=a[u]:n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(p=>Bs(p,r,Fs())),input:u,path:[u],inst:e});continue}const m=t.valueType._zod.run({value:a[u],issues:[]},r);m instanceof Promise?i.push(m.then(p=>{p.issues.length&&n.issues.push(...Ai(u,p.issues)),n.value[d.value]=p.value})):(m.issues.length&&n.issues.push(...Ai(u,m.issues)),n.value[d.value]=m.value)}}return i.length?Promise.all(i).then(()=>n):n}}),z9=_e("$ZodEnum",(e,t)=>{Ht.init(e,t);const n=aI(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(a=>q$.has(typeof a)).map(a=>typeof a=="string"?dl(a):a.toString()).join("|")})$`),e._zod.parse=(a,i)=>{const c=a.value;return r.has(c)||a.issues.push({code:"invalid_value",values:n,input:c,inst:e}),a}}),V9=_e("$ZodLiteral",(e,t)=>{if(Ht.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?dl(r):r?dl(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,a)=>{const i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),F9=_e("$ZodFile",(e,t)=>{Ht.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;return a instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:a,inst:e}),n}}),B9=_e("$ZodTransform",(e,t)=>{Ht.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new rI(e.constructor.name);const a=t.transform(n.value,n);if(r.async)return(a instanceof Promise?a:Promise.resolve(a)).then(c=>(n.value=c,n));if(a instanceof Promise)throw new nl;return n.value=a,n}});function iT(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const EI=_e("$ZodOptional",(e,t)=>{Ht.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Tt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Tt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${kb(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>iT(i,n.value)):iT(a,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),q9=_e("$ZodExactOptional",(e,t)=>{EI.init(e,t),Tt(e._zod,"values",()=>t.innerType._zod.values),Tt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),H9=_e("$ZodNullable",(e,t)=>{Ht.init(e,t),Tt(e._zod,"optin",()=>t.innerType._zod.optin),Tt(e._zod,"optout",()=>t.innerType._zod.optout),Tt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${kb(n.source)}|null)$`):void 0}),Tt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),G9=_e("$ZodDefault",(e,t)=>{Ht.init(e,t),e._zod.optin="optional",Tt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>cT(i,t)):cT(a,t)}});function cT(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Z9=_e("$ZodPrefault",(e,t)=>{Ht.init(e,t),e._zod.optin="optional",Tt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),W9=_e("$ZodNonOptional",(e,t)=>{Ht.init(e,t),Tt(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>lT(i,e)):lT(a,e)}});function lT(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const K9=_e("$ZodCatch",(e,t)=>{Ht.init(e,t),Tt(e._zod,"optin",()=>t.innerType._zod.optin),Tt(e._zod,"optout",()=>t.innerType._zod.optout),Tt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(c=>Bs(c,r,Fs()))},input:n.value}),n.issues=[]),n)):(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(i=>Bs(i,r,Fs()))},input:n.value}),n.issues=[]),n)}}),Y9=_e("$ZodPipe",(e,t)=>{Ht.init(e,t),Tt(e._zod,"values",()=>t.in._zod.values),Tt(e._zod,"optin",()=>t.in._zod.optin),Tt(e._zod,"optout",()=>t.out._zod.optout),Tt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(c=>uh(c,t.in,r)):uh(i,t.in,r)}const a=t.in._zod.run(n,r);return a instanceof Promise?a.then(i=>uh(i,t.out,r)):uh(a,t.out,r)}});function uh(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Q9=_e("$ZodReadonly",(e,t)=>{Ht.init(e,t),Tt(e._zod,"propValues",()=>t.innerType._zod.propValues),Tt(e._zod,"values",()=>t.innerType._zod.values),Tt(e._zod,"optin",()=>t.innerType?._zod?.optin),Tt(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(uT):uT(a)}});function uT(e){return e.value=Object.freeze(e.value),e}const X9=_e("$ZodLazy",(e,t)=>{Ht.init(e,t),Tt(e._zod,"innerType",()=>t.getter()),Tt(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Tt(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Tt(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Tt(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),J9=_e("$ZodCustom",(e,t)=>{ir.init(e,t),Ht.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,a=t.fn(r);if(a instanceof Promise)return a.then(i=>dT(i,n,r,e));dT(a,n,r,e)}});function dT(e,t,n,r){if(!e){const a={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(a.params=r._zod.def.params),t.issues.push(od(a))}}var fT;class e7{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const a={...r,...this._map.get(t)};return Object.keys(a).length?a:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function t7(){return new e7}(fT=globalThis).__zod_globalRegistry??(fT.__zod_globalRegistry=t7());const Du=globalThis.__zod_globalRegistry;function n7(e,t){return new e({type:"string",...$e(t)})}function r7(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...$e(t)})}function hT(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...$e(t)})}function o7(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...$e(t)})}function a7(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...$e(t)})}function s7(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...$e(t)})}function i7(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...$e(t)})}function RI(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...$e(t)})}function c7(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...$e(t)})}function l7(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...$e(t)})}function u7(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...$e(t)})}function d7(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...$e(t)})}function f7(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...$e(t)})}function h7(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...$e(t)})}function p7(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...$e(t)})}function m7(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...$e(t)})}function g7(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...$e(t)})}function v7(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...$e(t)})}function y7(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...$e(t)})}function _7(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...$e(t)})}function b7(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...$e(t)})}function w7(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...$e(t)})}function S7(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...$e(t)})}function E7(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...$e(t)})}function R7(e,t){return new e({type:"string",format:"date",check:"string_format",...$e(t)})}function x7(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...$e(t)})}function T7(e,t){return new e({type:"string",format:"duration",check:"string_format",...$e(t)})}function O7(e,t){return new e({type:"number",checks:[],...$e(t)})}function C7(e,t){return new e({type:"number",coerce:!0,checks:[],...$e(t)})}function A7(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...$e(t)})}function I7(e,t){return new e({type:"boolean",...$e(t)})}function N7(e,t){return new e({type:"boolean",coerce:!0,...$e(t)})}function k7(e,t){return new e({type:"null",...$e(t)})}function M7(e){return new e({type:"any"})}function P7(e){return new e({type:"unknown"})}function D7(e,t){return new e({type:"never",...$e(t)})}function pT(e,t){return new gI({check:"less_than",...$e(t),value:e,inclusive:!1})}function Qy(e,t){return new gI({check:"less_than",...$e(t),value:e,inclusive:!0})}function mT(e,t){return new vI({check:"greater_than",...$e(t),value:e,inclusive:!1})}function Xy(e,t){return new vI({check:"greater_than",...$e(t),value:e,inclusive:!0})}function gT(e,t){return new U8({check:"multiple_of",...$e(t),value:e})}function L7(e,t){return new V8({check:"max_size",...$e(t),maximum:e})}function j7(e,t){return new F8({check:"min_size",...$e(t),minimum:e})}function xI(e,t){return new B8({check:"max_length",...$e(t),maximum:e})}function zp(e,t){return new q8({check:"min_length",...$e(t),minimum:e})}function TI(e,t){return new H8({check:"length_equals",...$e(t),length:e})}function $7(e,t){return new G8({check:"string_format",format:"regex",...$e(t),pattern:e})}function U7(e){return new Z8({check:"string_format",format:"lowercase",...$e(e)})}function z7(e){return new W8({check:"string_format",format:"uppercase",...$e(e)})}function V7(e,t){return new K8({check:"string_format",format:"includes",...$e(t),includes:e})}function F7(e,t){return new Y8({check:"string_format",format:"starts_with",...$e(t),prefix:e})}function B7(e,t){return new Q8({check:"string_format",format:"ends_with",...$e(t),suffix:e})}function q7(e,t){return new X8({check:"mime_type",mime:e,...$e(t)})}function Sl(e){return new J8({check:"overwrite",tx:e})}function H7(e){return Sl(t=>t.normalize(e))}function G7(){return Sl(e=>e.trim())}function Z7(){return Sl(e=>e.toLowerCase())}function W7(){return Sl(e=>e.toUpperCase())}function K7(){return Sl(e=>F$(e))}function Y7(e,t,n){return new e({type:"array",element:t,...$e(n)})}function Q7(e,t){return new e({type:"file",...$e(t)})}function X7(e,t,n){const r=$e(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function J7(e,t,n){return new e({type:"custom",check:"custom",fn:t,...$e(n)})}function eU(e){const t=tU(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(od(r,n.value,t._zod.def));else{const a=r;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=t),a.continue??(a.continue=!t._zod.def.abort),n.issues.push(od(a))}},e(n.value,n)));return t}function tU(e,t){const n=new ir({check:"custom",...$e(t)});return n._zod.check=e,n}function Vp(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Du,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function tn(e,t,n={path:[],schemaPath:[]}){var r;const a=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const c={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,c);const u=e._zod.toJSONSchema?.();if(u)c.schema=u;else{const m={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,c.schema,m);else{const g=c.schema,y=t.processors[a.type];if(!y)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);y(e,t,g,m)}const p=e._zod.parent;p&&(c.ref||(c.ref=p),tn(p,t,m),t.seen.get(p).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(c.schema,d),t.io==="input"&&wr(e)&&(delete c.schema.examples,delete c.schema.default),t.io==="input"&&c.schema._prefault&&((r=c.schema).default??(r.default=c.schema._prefault)),delete c.schema._prefault,t.seen.get(e).schema}function Fp(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const c of e.seen.entries()){const u=e.metadataRegistry.get(c[0])?.id;if(u){const d=r.get(u);if(d&&d!==c[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(u,c[0])}}const a=c=>{const u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(c[0])?.id,g=e.external.uri??(w=>w);if(p)return{ref:g(p)};const y=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=y,{defId:y,ref:`${g("__shared")}#/${u}/${y}`}}if(c[1]===n)return{ref:"#"};const f=`#/${u}/`,m=c[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:f+m}},i=c=>{if(c[1].schema.$ref)return;const u=c[1],{ref:d,defId:f}=a(c);u.def={...u.schema},f&&(u.defId=f);const m=u.schema;for(const p in m)delete m[p];m.$ref=d};if(e.cycles==="throw")for(const c of e.seen.entries()){const u=c[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
47
-
48
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of e.seen.entries()){const u=c[1];if(t===c[0]){i(c);continue}if(e.external){const f=e.external.registry.get(c[0])?.id;if(t!==c[0]&&f){i(c);continue}}if(e.metadataRegistry.get(c[0])?.id){i(c);continue}if(u.cycle){i(c);continue}if(u.count>1&&e.reused==="ref"){i(c);continue}}}function Bp(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=c=>{const u=e.seen.get(c);if(u.ref===null)return;const d=u.def??u.schema,f={...d},m=u.ref;if(u.ref=null,m){r(m);const g=e.seen.get(m),y=g.schema;if(y.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(y)):Object.assign(d,y),Object.assign(d,f),c._zod.parent===m)for(const S in d)S==="$ref"||S==="allOf"||S in f||delete d[S];if(y.$ref&&g.def)for(const S in d)S==="$ref"||S==="allOf"||S in g.def&&JSON.stringify(d[S])===JSON.stringify(g.def[S])&&delete d[S]}const p=c._zod.parent;if(p&&p!==m){r(p);const g=e.seen.get(p);if(g?.schema.$ref&&(d.$ref=g.schema.$ref,g.def))for(const y in d)y==="$ref"||y==="allOf"||y in g.def&&JSON.stringify(d[y])===JSON.stringify(g.def[y])&&delete d[y]}e.override({zodSchema:c,jsonSchema:d,path:u.path??[]})};for(const c of[...e.seen.entries()].reverse())r(c[0]);const a={};if(e.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(c)}Object.assign(a,n.def??n.schema);const i=e.external?.defs??{};for(const c of e.seen.entries()){const u=c[1];u.def&&u.defId&&(i[u.defId]=u.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?a.$defs=i:a.definitions=i);try{const c=JSON.parse(JSON.stringify(a));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:qp(t,"input",e.processors),output:qp(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function wr(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return wr(r.element,n);if(r.type==="set")return wr(r.valueType,n);if(r.type==="lazy")return wr(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return wr(r.innerType,n);if(r.type==="intersection")return wr(r.left,n)||wr(r.right,n);if(r.type==="record"||r.type==="map")return wr(r.keyType,n)||wr(r.valueType,n);if(r.type==="pipe")return wr(r.in,n)||wr(r.out,n);if(r.type==="object"){for(const a in r.shape)if(wr(r.shape[a],n))return!0;return!1}if(r.type==="union"){for(const a of r.options)if(wr(a,n))return!0;return!1}if(r.type==="tuple"){for(const a of r.items)if(wr(a,n))return!0;return!!(r.rest&&wr(r.rest,n))}return!1}const nU=(e,t={})=>n=>{const r=Vp({...n,processors:t});return tn(e,r),Fp(r,e),Bp(r,e)},qp=(e,t,n={})=>r=>{const{libraryOptions:a,target:i}=r??{},c=Vp({...a??{},target:i,io:t,processors:n});return tn(e,c),Fp(c,e),Bp(c,e)},rU={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},OI=(e,t,n,r)=>{const a=n;a.type="string";const{minimum:i,maximum:c,format:u,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof i=="number"&&(a.minLength=i),typeof c=="number"&&(a.maxLength=c),u&&(a.format=rU[u]??u,a.format===""&&delete a.format,u==="time"&&delete a.format),f&&(a.contentEncoding=f),d&&d.size>0){const m=[...d];m.length===1?a.pattern=m[0].source:m.length>1&&(a.allOf=[...m.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},CI=(e,t,n,r)=>{const a=n,{minimum:i,maximum:c,format:u,multipleOf:d,exclusiveMaximum:f,exclusiveMinimum:m}=e._zod.bag;typeof u=="string"&&u.includes("int")?a.type="integer":a.type="number",typeof m=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(a.minimum=m,a.exclusiveMinimum=!0):a.exclusiveMinimum=m),typeof i=="number"&&(a.minimum=i,typeof m=="number"&&t.target!=="draft-04"&&(m>=i?delete a.minimum:delete a.exclusiveMinimum)),typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(a.maximum=f,a.exclusiveMaximum=!0):a.exclusiveMaximum=f),typeof c=="number"&&(a.maximum=c,typeof f=="number"&&t.target!=="draft-04"&&(f<=c?delete a.maximum:delete a.exclusiveMaximum)),typeof d=="number"&&(a.multipleOf=d)},AI=(e,t,n,r)=>{n.type="boolean"},oU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},aU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},II=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},sU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},iU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},NI=(e,t,n,r)=>{n.not={}},kI=(e,t,n,r)=>{},MI=(e,t,n,r)=>{},cU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},PI=(e,t,n,r)=>{const a=e._zod.def,i=aI(a.entries);i.every(c=>typeof c=="number")&&(n.type="number"),i.every(c=>typeof c=="string")&&(n.type="string"),n.enum=i},DI=(e,t,n,r)=>{const a=e._zod.def,i=[];for(const c of a.values)if(c===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof c=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(c))}else i.push(c);if(i.length!==0)if(i.length===1){const c=i[0];n.type=c===null?"null":typeof c,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[c]:n.const=c}else i.every(c=>typeof c=="number")&&(n.type="number"),i.every(c=>typeof c=="string")&&(n.type="string"),i.every(c=>typeof c=="boolean")&&(n.type="boolean"),i.every(c=>c===null)&&(n.type="null"),n.enum=i},lU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},uU=(e,t,n,r)=>{const a=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");a.type="string",a.pattern=i.source},LI=(e,t,n,r)=>{const a=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:c,maximum:u,mime:d}=e._zod.bag;c!==void 0&&(i.minLength=c),u!==void 0&&(i.maxLength=u),d?d.length===1?(i.contentMediaType=d[0],Object.assign(a,i)):(Object.assign(a,i),a.anyOf=d.map(f=>({contentMediaType:f}))):Object.assign(a,i)},dU=(e,t,n,r)=>{n.type="boolean"},jI=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},fU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},$I=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},hU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},pU=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},UI=(e,t,n,r)=>{const a=n,i=e._zod.def,{minimum:c,maximum:u}=e._zod.bag;typeof c=="number"&&(a.minItems=c),typeof u=="number"&&(a.maxItems=u),a.type="array",a.items=tn(i.element,t,{...r,path:[...r.path,"items"]})},zI=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="object",a.properties={};const c=i.shape;for(const f in c)a.properties[f]=tn(c[f],t,{...r,path:[...r.path,"properties",f]});const u=new Set(Object.keys(c)),d=new Set([...u].filter(f=>{const m=i.shape[f]._zod;return t.io==="input"?m.optin===void 0:m.optout===void 0}));d.size>0&&(a.required=Array.from(d)),i.catchall?._zod.def.type==="never"?a.additionalProperties=!1:i.catchall?i.catchall&&(a.additionalProperties=tn(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},VI=(e,t,n,r)=>{const a=e._zod.def,i=a.inclusive===!1,c=a.options.map((u,d)=>tn(u,t,{...r,path:[...r.path,i?"oneOf":"anyOf",d]}));i?n.oneOf=c:n.anyOf=c},FI=(e,t,n,r)=>{const a=e._zod.def,i=tn(a.left,t,{...r,path:[...r.path,"allOf",0]}),c=tn(a.right,t,{...r,path:[...r.path,"allOf",1]}),u=f=>"allOf"in f&&Object.keys(f).length===1,d=[...u(i)?i.allOf:[i],...u(c)?c.allOf:[c]];n.allOf=d},BI=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="array";const c=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=i.items.map((g,y)=>tn(g,t,{...r,path:[...r.path,c,y]})),f=i.rest?tn(i.rest,t,{...r,path:[...r.path,u,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(a.prefixItems=d,f&&(a.items=f)):t.target==="openapi-3.0"?(a.items={anyOf:d},f&&a.items.anyOf.push(f),a.minItems=d.length,f||(a.maxItems=d.length)):(a.items=d,f&&(a.additionalItems=f));const{minimum:m,maximum:p}=e._zod.bag;typeof m=="number"&&(a.minItems=m),typeof p=="number"&&(a.maxItems=p)},qI=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="object";const c=i.keyType,d=c._zod.bag?.patterns;if(i.mode==="loose"&&d&&d.size>0){const m=tn(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});a.patternProperties={};for(const p of d)a.patternProperties[p.source]=m}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(a.propertyNames=tn(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),a.additionalProperties=tn(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const f=c._zod.values;if(f){const m=[...f].filter(p=>typeof p=="string"||typeof p=="number");m.length>0&&(a.required=m)}},HI=(e,t,n,r)=>{const a=e._zod.def,i=tn(a.innerType,t,r),c=t.seen.get(e);t.target==="openapi-3.0"?(c.ref=a.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},GI=(e,t,n,r)=>{const a=e._zod.def;tn(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},ZI=(e,t,n,r)=>{const a=e._zod.def;tn(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,n.default=JSON.parse(JSON.stringify(a.defaultValue))},WI=(e,t,n,r)=>{const a=e._zod.def;tn(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(a.defaultValue)))},KI=(e,t,n,r)=>{const a=e._zod.def;tn(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType;let c;try{c=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=c},YI=(e,t,n,r)=>{const a=e._zod.def,i=t.io==="input"?a.in._zod.def.type==="transform"?a.out:a.in:a.out;tn(i,t,r);const c=t.seen.get(e);c.ref=i},QI=(e,t,n,r)=>{const a=e._zod.def;tn(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,n.readOnly=!0},mU=(e,t,n,r)=>{const a=e._zod.def;tn(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},Lb=(e,t,n,r)=>{const a=e._zod.def;tn(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},XI=(e,t,n,r)=>{const a=e._zod.innerType;tn(a,t,r);const i=t.seen.get(e);i.ref=a},vT={string:OI,number:CI,boolean:AI,bigint:oU,symbol:aU,null:II,undefined:sU,void:iU,never:NI,any:kI,unknown:MI,date:cU,enum:PI,literal:DI,nan:lU,template_literal:uU,file:LI,success:dU,custom:jI,function:fU,transform:$I,map:hU,set:pU,array:UI,object:zI,union:VI,intersection:FI,tuple:BI,record:qI,nullable:HI,nonoptional:GI,default:ZI,prefault:WI,catch:KI,pipe:YI,readonly:QI,promise:mU,optional:Lb,lazy:XI};function qoe(e,t){if("_idmap"in e){const r=e,a=Vp({...t,processors:vT}),i={};for(const d of r._idmap.entries()){const[f,m]=d;tn(m,a)}const c={},u={registry:r,uri:t?.uri,defs:i};a.external=u;for(const d of r._idmap.entries()){const[f,m]=d;Fp(a,m),c[f]=Bp(a,m)}if(Object.keys(i).length>0){const d=a.target==="draft-2020-12"?"$defs":"definitions";c.__shared={[d]:i}}return{schemas:c}}const n=Vp({...t,processors:vT});return tn(e,n),Fp(n,e),Bp(n,e)}const gU=_e("ZodISODateTime",(e,t)=>{h9.init(e,t),hn.init(e,t)});function JI(e){return E7(gU,e)}const vU=_e("ZodISODate",(e,t)=>{p9.init(e,t),hn.init(e,t)});function yU(e){return R7(vU,e)}const _U=_e("ZodISOTime",(e,t)=>{m9.init(e,t),hn.init(e,t)});function bU(e){return x7(_U,e)}const wU=_e("ZodISODuration",(e,t)=>{g9.init(e,t),hn.init(e,t)});function SU(e){return T7(wU,e)}const EU=(e,t)=>{Pb.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>t8(e,n)},flatten:{value:n=>e8(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,d_,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,d_,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ro=_e("ZodError",EU,{Parent:Error}),RU=Dm(Ro),xU=Lm(Ro),TU=jm(Ro),OU=$m(Ro),CU=a8(Ro),AU=s8(Ro),IU=i8(Ro),NU=c8(Ro),kU=l8(Ro),MU=u8(Ro),PU=d8(Ro),DU=f8(Ro),Yt=_e("ZodType",(e,t)=>(Ht.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:qp(e,"input"),output:qp(e,"output")}}),e.toJSONSchema=nU(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Ys(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>Qs(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>RU(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>TU(e,n,r),e.parseAsync=async(n,r)=>xU(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>OU(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>CU(e,n,r),e.decode=(n,r)=>AU(e,n,r),e.encodeAsync=async(n,r)=>IU(e,n,r),e.decodeAsync=async(n,r)=>NU(e,n,r),e.safeEncode=(n,r)=>kU(e,n,r),e.safeDecode=(n,r)=>MU(e,n,r),e.safeEncodeAsync=async(n,r)=>PU(e,n,r),e.safeDecodeAsync=async(n,r)=>DU(e,n,r),e.refine=(n,r)=>e.check(xz(n,r)),e.superRefine=n=>e.check(Tz(n)),e.overwrite=n=>e.check(Sl(n)),e.optional=()=>vn(e),e.exactOptional=()=>fz(e),e.nullable=()=>wT(e),e.nullish=()=>vn(wT(e)),e.nonoptional=n=>yz(e,n),e.array=()=>ye(e),e.or=n=>yt([e,n]),e.and=n=>bd(e,n),e.transform=n=>p_(e,sN(n)),e.default=n=>mz(e,n),e.prefault=n=>vz(e,n),e.catch=n=>bz(e,n),e.pipe=n=>p_(e,n),e.readonly=()=>Ez(e),e.describe=n=>{const r=e.clone();return Du.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return Du.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Du.get(e);const r=e.clone();return Du.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),eN=_e("_ZodString",(e,t)=>{Db.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(r,a,i)=>OI(e,r,a);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check($7(...r)),e.includes=(...r)=>e.check(V7(...r)),e.startsWith=(...r)=>e.check(F7(...r)),e.endsWith=(...r)=>e.check(B7(...r)),e.min=(...r)=>e.check(zp(...r)),e.max=(...r)=>e.check(xI(...r)),e.length=(...r)=>e.check(TI(...r)),e.nonempty=(...r)=>e.check(zp(1,...r)),e.lowercase=r=>e.check(U7(r)),e.uppercase=r=>e.check(z7(r)),e.trim=()=>e.check(G7()),e.normalize=(...r)=>e.check(H7(...r)),e.toLowerCase=()=>e.check(Z7()),e.toUpperCase=()=>e.check(W7()),e.slugify=()=>e.check(K7())}),zm=_e("ZodString",(e,t)=>{Db.init(e,t),eN.init(e,t),e.email=n=>e.check(r7(LU,n)),e.url=n=>e.check(RI(tN,n)),e.jwt=n=>e.check(S7(XU,n)),e.emoji=n=>e.check(c7($U,n)),e.guid=n=>e.check(hT(yT,n)),e.uuid=n=>e.check(o7(dh,n)),e.uuidv4=n=>e.check(a7(dh,n)),e.uuidv6=n=>e.check(s7(dh,n)),e.uuidv7=n=>e.check(i7(dh,n)),e.nanoid=n=>e.check(l7(UU,n)),e.guid=n=>e.check(hT(yT,n)),e.cuid=n=>e.check(u7(zU,n)),e.cuid2=n=>e.check(d7(VU,n)),e.ulid=n=>e.check(f7(FU,n)),e.base64=n=>e.check(_7(KU,n)),e.base64url=n=>e.check(b7(YU,n)),e.xid=n=>e.check(h7(BU,n)),e.ksuid=n=>e.check(p7(qU,n)),e.ipv4=n=>e.check(m7(HU,n)),e.ipv6=n=>e.check(g7(GU,n)),e.cidrv4=n=>e.check(v7(ZU,n)),e.cidrv6=n=>e.check(y7(WU,n)),e.e164=n=>e.check(w7(QU,n)),e.datetime=n=>e.check(JI(n)),e.date=n=>e.check(yU(n)),e.time=n=>e.check(bU(n)),e.duration=n=>e.check(SU(n))});function M(e){return n7(zm,e)}const hn=_e("ZodStringFormat",(e,t)=>{dn.init(e,t),eN.init(e,t)}),LU=_e("ZodEmail",(e,t)=>{o9.init(e,t),hn.init(e,t)}),yT=_e("ZodGUID",(e,t)=>{n9.init(e,t),hn.init(e,t)}),dh=_e("ZodUUID",(e,t)=>{r9.init(e,t),hn.init(e,t)}),tN=_e("ZodURL",(e,t)=>{a9.init(e,t),hn.init(e,t)});function jU(e){return RI(tN,e)}const $U=_e("ZodEmoji",(e,t)=>{s9.init(e,t),hn.init(e,t)}),UU=_e("ZodNanoID",(e,t)=>{i9.init(e,t),hn.init(e,t)}),zU=_e("ZodCUID",(e,t)=>{c9.init(e,t),hn.init(e,t)}),VU=_e("ZodCUID2",(e,t)=>{l9.init(e,t),hn.init(e,t)}),FU=_e("ZodULID",(e,t)=>{u9.init(e,t),hn.init(e,t)}),BU=_e("ZodXID",(e,t)=>{d9.init(e,t),hn.init(e,t)}),qU=_e("ZodKSUID",(e,t)=>{f9.init(e,t),hn.init(e,t)}),HU=_e("ZodIPv4",(e,t)=>{v9.init(e,t),hn.init(e,t)}),GU=_e("ZodIPv6",(e,t)=>{y9.init(e,t),hn.init(e,t)}),ZU=_e("ZodCIDRv4",(e,t)=>{_9.init(e,t),hn.init(e,t)}),WU=_e("ZodCIDRv6",(e,t)=>{b9.init(e,t),hn.init(e,t)}),KU=_e("ZodBase64",(e,t)=>{w9.init(e,t),hn.init(e,t)}),YU=_e("ZodBase64URL",(e,t)=>{E9.init(e,t),hn.init(e,t)}),QU=_e("ZodE164",(e,t)=>{R9.init(e,t),hn.init(e,t)}),XU=_e("ZodJWT",(e,t)=>{T9.init(e,t),hn.init(e,t)}),Wa=_e("ZodNumber",(e,t)=>{_I.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(r,a,i)=>CI(e,r,a),e.gt=(r,a)=>e.check(mT(r,a)),e.gte=(r,a)=>e.check(Xy(r,a)),e.min=(r,a)=>e.check(Xy(r,a)),e.lt=(r,a)=>e.check(pT(r,a)),e.lte=(r,a)=>e.check(Qy(r,a)),e.max=(r,a)=>e.check(Qy(r,a)),e.int=r=>e.check(_T(r)),e.safe=r=>e.check(_T(r)),e.positive=r=>e.check(mT(0,r)),e.nonnegative=r=>e.check(Xy(0,r)),e.negative=r=>e.check(pT(0,r)),e.nonpositive=r=>e.check(Qy(0,r)),e.multipleOf=(r,a)=>e.check(gT(r,a)),e.step=(r,a)=>e.check(gT(r,a)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Pe(e){return O7(Wa,e)}const JU=_e("ZodNumberFormat",(e,t)=>{O9.init(e,t),Wa.init(e,t)});function _T(e){return A7(JU,e)}const nN=_e("ZodBoolean",(e,t)=>{C9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>AI(e,n,r)});function et(e){return I7(nN,e)}const ez=_e("ZodNull",(e,t)=>{A9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>II(e,n,r)});function El(e){return k7(ez,e)}const tz=_e("ZodAny",(e,t)=>{I9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>kI()});function eo(){return M7(tz)}const nz=_e("ZodUnknown",(e,t)=>{N9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>MI()});function st(){return P7(nz)}const rz=_e("ZodNever",(e,t)=>{k9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>NI(e,n,r)});function Hp(e){return D7(rz,e)}const rN=_e("ZodArray",(e,t)=>{M9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>UI(e,n,r,a),e.element=t.element,e.min=(n,r)=>e.check(zp(n,r)),e.nonempty=n=>e.check(zp(1,n)),e.max=(n,r)=>e.check(xI(n,r)),e.length=(n,r)=>e.check(TI(n,r)),e.unwrap=()=>e.element});function ye(e,t){return Y7(rN,e,t)}const Vm=_e("ZodObject",(e,t)=>{D9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>zI(e,n,r,a),Tt(e,"shape",()=>t.shape),e.keyof=()=>Ot(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:st()}),e.loose=()=>e.clone({...e._zod.def,catchall:st()}),e.strict=()=>e.clone({...e._zod.def,catchall:Hp()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>K$(e,n),e.safeExtend=n=>Y$(e,n),e.merge=n=>Q$(e,n),e.pick=n=>Z$(e,n),e.omit=n=>W$(e,n),e.partial=(...n)=>X$(iN,e,n[0]),e.required=(...n)=>J$(cN,e,n[0])});function ae(e,t){const n={type:"object",shape:e??{},...$e(t)};return new Vm(n)}function Hoe(e,t){return new Vm({type:"object",shape:e,catchall:Hp(),...$e(t)})}function ar(e,t){return new Vm({type:"object",shape:e,catchall:st(),...$e(t)})}const oN=_e("ZodUnion",(e,t)=>{SI.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>VI(e,n,r,a),e.options=t.options});function yt(e,t){return new oN({type:"union",options:e,...$e(t)})}const oz=_e("ZodDiscriminatedUnion",(e,t)=>{oN.init(e,t),L9.init(e,t)});function jb(e,t,n){return new oz({type:"union",options:t,discriminator:e,...$e(n)})}const az=_e("ZodIntersection",(e,t)=>{j9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>FI(e,n,r,a)});function bd(e,t){return new az({type:"intersection",left:e,right:t})}const sz=_e("ZodTuple",(e,t)=>{$9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>BI(e,n,r,a),e.rest=n=>e.clone({...e._zod.def,rest:n})});function bT(e,t,n){const r=t instanceof Ht,a=r?n:t,i=r?t:null;return new sz({type:"tuple",items:e,rest:i,...$e(a)})}const aN=_e("ZodRecord",(e,t)=>{U9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>qI(e,n,r,a),e.keyType=t.keyType,e.valueType=t.valueType});function ft(e,t,n){return new aN({type:"record",keyType:e,valueType:t,...$e(n)})}const h_=_e("ZodEnum",(e,t)=>{z9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(r,a,i)=>PI(e,r,a),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,a)=>{const i={};for(const c of r)if(n.has(c))i[c]=t.entries[c];else throw new Error(`Key ${c} not found in enum`);return new h_({...t,checks:[],...$e(a),entries:i})},e.exclude=(r,a)=>{const i={...t.entries};for(const c of r)if(n.has(c))delete i[c];else throw new Error(`Key ${c} not found in enum`);return new h_({...t,checks:[],...$e(a),entries:i})}});function Ot(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new h_({type:"enum",entries:n,...$e(t)})}const iz=_e("ZodLiteral",(e,t)=>{V9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>DI(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function De(e,t){return new iz({type:"literal",values:Array.isArray(e)?e:[e],...$e(t)})}const cz=_e("ZodFile",(e,t)=>{F9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>LI(e,n,r),e.min=(n,r)=>e.check(j7(n,r)),e.max=(n,r)=>e.check(L7(n,r)),e.mime=(n,r)=>e.check(q7(Array.isArray(n)?n:[n],r))});function lz(e){return Q7(cz,e)}const uz=_e("ZodTransform",(e,t)=>{B9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>$I(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new rI(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(od(i,n.value,t));else{const c=i;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=n.value),c.inst??(c.inst=e),n.issues.push(od(c))}};const a=t.transform(n.value,n);return a instanceof Promise?a.then(i=>(n.value=i,n)):(n.value=a,n)}});function sN(e){return new uz({type:"transform",transform:e})}const iN=_e("ZodOptional",(e,t)=>{EI.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Lb(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function vn(e){return new iN({type:"optional",innerType:e})}const dz=_e("ZodExactOptional",(e,t)=>{q9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Lb(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function fz(e){return new dz({type:"optional",innerType:e})}const hz=_e("ZodNullable",(e,t)=>{H9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>HI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function wT(e){return new hz({type:"nullable",innerType:e})}const pz=_e("ZodDefault",(e,t)=>{G9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>ZI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function mz(e,t){return new pz({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():iI(t)}})}const gz=_e("ZodPrefault",(e,t)=>{Z9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>WI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function vz(e,t){return new gz({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():iI(t)}})}const cN=_e("ZodNonOptional",(e,t)=>{W9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>GI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function yz(e,t){return new cN({type:"nonoptional",innerType:e,...$e(t)})}const _z=_e("ZodCatch",(e,t)=>{K9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>KI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function bz(e,t){return new _z({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const wz=_e("ZodPipe",(e,t)=>{Y9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>YI(e,n,r,a),e.in=t.in,e.out=t.out});function p_(e,t){return new wz({type:"pipe",in:e,out:t})}const Sz=_e("ZodReadonly",(e,t)=>{Q9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>QI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Ez(e){return new Sz({type:"readonly",innerType:e})}const Rz=_e("ZodLazy",(e,t)=>{X9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>XI(e,n,r,a),e.unwrap=()=>e._zod.def.getter()});function xo(e){return new Rz({type:"lazy",getter:e})}const $b=_e("ZodCustom",(e,t)=>{J9.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>jI(e,n)});function lN(e,t){return X7($b,e??(()=>!0),t)}function xz(e,t={}){return J7($b,e,t)}function Tz(e){return eU(e)}function Goe(e,t={}){const n=new $b({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...$e(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}function Ub(e,t){return p_(sN(e),t)}const Oz={custom:"custom"};function uN(e){return C7(Wa,e)}function ST(e){return N7(nN,e)}function Ae(...e){return U$(FA(e))}function Cz(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function En({error:e,localization:t,localizeErrors:n=!0}){var r;const a="Request failed";if(!n)return e?.message?e.message:(r=e?.error)!=null&&r.message?e.error.message:a;if(typeof e=="string"&&t?.[e])return t[e];if(e?.error){if(e.error.code){const i=e.error.code;if(t?.[i])return t[i]}return e.error.message||e.error.code||e.error.statusText||t?.REQUEST_FAILED}return e?.message||t?.REQUEST_FAILED||a}function qi(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function m_(e,t){for(const n in e)if(e[n]===t)return n}function ad(e,t){let n=M().min(1,{message:t?.PASSWORD_REQUIRED});return e?.minLength&&(n=n.min(e.minLength,{message:t?.PASSWORD_TOO_SHORT})),e?.maxLength&&(n=n.max(e.maxLength,{message:t?.PASSWORD_TOO_LONG})),e?.regex&&(n=n.regex(e.regex,{message:t?.INVALID_PASSWORD})),n}var Az={FAILED_TO_CREATE_USER:"Failed to create user",USER_ALREADY_EXISTS:"User already exists",YOU_CANNOT_BAN_YOURSELF:"You cannot ban yourself",YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:"You are not allowed to change users role",YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:"You are not allowed to create users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:"You are not allowed to list users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:"You are not allowed to list users sessions",YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:"You are not allowed to ban users",YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:"You are not allowed to impersonate users",YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:"You are not allowed to revoke users sessions",YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:"You are not allowed to delete users",YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:"You are not allowed to set users password",BANNED_USER:"You have been banned from this application"},Iz={FAILED_TO_CREATE_USER:"Failed to create user",COULD_NOT_CREATE_SESSION:"Could not create session",ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:"Anonymous users cannot sign in again anonymously"},Nz={INVALID_METADATA_TYPE:"metadata must be an object or undefined",REFILL_AMOUNT_AND_INTERVAL_REQUIRED:"refillAmount is required when refillInterval is provided",REFILL_INTERVAL_AND_AMOUNT_REQUIRED:"refillInterval is required when refillAmount is provided",USER_BANNED:"User is banned",UNAUTHORIZED_SESSION:"Unauthorized or invalid session",KEY_NOT_FOUND:"API Key not found",KEY_DISABLED:"API Key is disabled",KEY_EXPIRED:"API Key has expired",USAGE_EXCEEDED:"API Key has reached its usage limit",KEY_NOT_RECOVERABLE:"API Key is not recoverable",EXPIRES_IN_IS_TOO_SMALL:"The expiresIn is smaller than the predefined minimum value.",EXPIRES_IN_IS_TOO_LARGE:"The expiresIn is larger than the predefined maximum value.",INVALID_REMAINING:"The remaining count is either too large or too small.",INVALID_PREFIX_LENGTH:"The prefix length is either too large or too small.",INVALID_NAME_LENGTH:"The name length is either too large or too small.",METADATA_DISABLED:"Metadata is disabled.",RATE_LIMIT_EXCEEDED:"Rate limit exceeded.",NO_VALUES_TO_UPDATE:"No values to update.",KEY_DISABLED_EXPIRATION:"Custom key expiration values are disabled.",INVALID_API_KEY:"Invalid API key.",INVALID_USER_ID_FROM_API_KEY:"The user id from the API key is invalid.",INVALID_API_KEY_GETTER_RETURN_TYPE:"API Key getter returned an invalid key type. Expected string.",SERVER_ONLY_PROPERTY:"The property you're trying to set can only be set from the server auth instance only."},kz={USER_NOT_FOUND:"User not found",FAILED_TO_CREATE_USER:"Failed to create user",FAILED_TO_CREATE_SESSION:"Failed to create session",FAILED_TO_UPDATE_USER:"Failed to update user",FAILED_TO_GET_SESSION:"Failed to get session",INVALID_PASSWORD:"Invalid password",INVALID_EMAIL:"Invalid email",INVALID_EMAIL_OR_PASSWORD:"Invalid email or password",SOCIAL_ACCOUNT_ALREADY_LINKED:"Social account already linked",PROVIDER_NOT_FOUND:"Provider not found",INVALID_TOKEN:"Invalid token",ID_TOKEN_NOT_SUPPORTED:"id_token not supported",FAILED_TO_GET_USER_INFO:"Failed to get user info",USER_EMAIL_NOT_FOUND:"User email not found",EMAIL_NOT_VERIFIED:"Email not verified",PASSWORD_TOO_SHORT:"Password too short",PASSWORD_TOO_LONG:"Password too long",USER_ALREADY_EXISTS:"User already exists",EMAIL_CAN_NOT_BE_UPDATED:"Email can not be updated",CREDENTIAL_ACCOUNT_NOT_FOUND:"Credential account not found",SESSION_EXPIRED:"Session expired. Re-authenticate to perform this action.",FAILED_TO_UNLINK_LAST_ACCOUNT:"You can't unlink your last account",ACCOUNT_NOT_FOUND:"Account not found",USER_ALREADY_HAS_PASSWORD:"User already has a password. Provide that to delete the account."},Mz={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},Pz={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},Dz={...Mz,...Pz},Lz={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},jz={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},$z={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},Uz={INVALID_SESSION_TOKEN:"Invalid session token"},zz={YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:"You are not allowed to create a new organization",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:"You have reached the maximum number of organizations",ORGANIZATION_ALREADY_EXISTS:"Organization already exists",ORGANIZATION_NOT_FOUND:"Organization not found",USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:"User is not a member of the organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:"You are not allowed to update this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:"You are not allowed to delete this organization",NO_ACTIVE_ORGANIZATION:"No active organization",USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:"User is already a member of this organization",MEMBER_NOT_FOUND:"Member not found",ROLE_NOT_FOUND:"Role not found",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:"You are not allowed to create a new team",TEAM_ALREADY_EXISTS:"Team already exists",TEAM_NOT_FOUND:"Team not found",YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:"You cannot leave the organization as the only owner",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:"You are not allowed to delete this member",YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:"You are not allowed to invite users to this organization",USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:"User is already invited to this organization",INVITATION_NOT_FOUND:"Invitation not found",YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:"You are not the recipient of the invitation",YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:"You are not allowed to cancel this invitation",INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:"Inviter is no longer a member of the organization",YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:"you are not allowed to invite user with this role",FAILED_TO_RETRIEVE_INVITATION:"Failed to retrieve invitation",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:"You have reached the maximum number of teams",UNABLE_TO_REMOVE_LAST_TEAM:"Unable to remove last team",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:"You are not allowed to update this member",ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:"Organization membership limit reached",YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to create teams in this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to delete teams in this organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:"You are not allowed to update this team",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:"You are not allowed to delete this team",INVITATION_LIMIT_REACHED:"Invitation limit reached"},Vz={CHALLENGE_NOT_FOUND:"Challenge not found",YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:"You are not allowed to register this passkey",FAILED_TO_VERIFY_REGISTRATION:"Failed to verify registration",PASSKEY_NOT_FOUND:"Passkey not found",AUTHENTICATION_FAILED:"Authentication failed",UNABLE_TO_CREATE_SESSION:"Unable to create session",FAILED_TO_UPDATE_PASSKEY:"Failed to update passkey"},Fz={INVALID_PHONE_NUMBER:"Invalid phone number",PHONE_NUMBER_EXIST:"Phone number already exists",INVALID_PHONE_NUMBER_OR_PASSWORD:"Invalid phone number or password",UNEXPECTED_ERROR:"Unexpected error",OTP_NOT_FOUND:"OTP not found",OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",PHONE_NUMBER_NOT_VERIFIED:"Phone number not verified"},Bz={SUBSCRIPTION_NOT_FOUND:"Subscription not found",SUBSCRIPTION_PLAN_NOT_FOUND:"Subscription plan not found",ALREADY_SUBSCRIBED_PLAN:"You're already subscribed to this plan",UNABLE_TO_CREATE_CUSTOMER:"Unable to create customer",FAILED_TO_FETCH_PLANS:"Failed to fetch plans",EMAIL_VERIFICATION_REQUIRED:"Email verification is required before you can subscribe to a plan",SUBSCRIPTION_NOT_ACTIVE:"Subscription is not active",SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION:"Subscription is not scheduled for cancellation"},qz={TEAM_LIMIT_REACHED:"Team limit reached for this organization",TEAM_MEMBER_LIMIT_REACHED:"Team member limit reached for this team",TEAM_NOT_FOUND:"Team not found",TEAM_MEMBER_NOT_FOUND:"Team member not found",TEAM_NAME_TOO_LONG:"Team name is too long",CANNOT_REMOVE_LAST_TEAM:"Cannot remove the last team",NOT_ORGANIZATION_MEMBER:"User is not a member of the organization",ALREADY_TEAM_MEMBER:"User is already a member of this team",INSUFFICIENT_TEAM_PERMISSIONS:"Insufficient permissions to perform this action on team"},Hz={OTP_NOT_ENABLED:"OTP not enabled",OTP_HAS_EXPIRED:"OTP has expired",TOTP_NOT_ENABLED:"TOTP not enabled",TWO_FACTOR_NOT_ENABLED:"Two factor isn't enabled",BACKUP_CODES_NOT_ENABLED:"Backup codes aren't enabled",INVALID_BACKUP_CODE:"Invalid backup code",INVALID_CODE:"Invalid code",TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:"Too many attempts. Please request a new code.",INVALID_TWO_FACTOR_COOKIE:"Invalid two factor cookie"},Gz={INVALID_USERNAME_OR_PASSWORD:"invalid username or password",EMAIL_NOT_VERIFIED:"email not verified",UNEXPECTED_ERROR:"unexpected error",USERNAME_IS_ALREADY_TAKEN:"username is already taken. please try another.",USERNAME_TOO_SHORT:"username is too short",USERNAME_TOO_LONG:"username is too long",INVALID_USERNAME:"username is invalid"},Zz={APP:"App",ACCOUNT:"Account",ACCOUNTS:"Accounts",ACCOUNTS_DESCRIPTION:"Switch between your currently signed in accounts.",ACCOUNTS_INSTRUCTIONS:"Sign in to an additional account.",ADD_ACCOUNT:"Add Account",ADD_PASSKEY:"Add Passkey",ALREADY_HAVE_AN_ACCOUNT:"Already have an account?",AVATAR:"Avatar",AVATAR_DESCRIPTION:"Click on the avatar to upload a custom one from your files.",AVATAR_INSTRUCTIONS:"An avatar is optional but strongly recommended.",BACKUP_CODE_REQUIRED:"Backup code is required",BACKUP_CODES:"Backup Codes",BACKUP_CODES_DESCRIPTION:"Save these backup codes in a secure place. You can use them to access your account if you lose your two-factor authentication method.",BACKUP_CODE_PLACEHOLDER:"Backup Code",BACKUP_CODE:"Backup Code",CANCEL:"Cancel",CHANGE_PASSWORD:"Change Password",CHANGE_PASSWORD_DESCRIPTION:"Enter your current password and a new password.",CHANGE_PASSWORD_INSTRUCTIONS:"Please use 8 characters at minimum.",CHANGE_PASSWORD_SUCCESS:"Your password has been changed.",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Confirm Password",CONFIRM_PASSWORD_REQUIRED:"Confirm password is required",CONTINUE_WITH_AUTHENTICATOR:"Continue with Authenticator",COPIED_TO_CLIPBOARD:"Copied to clipboard",COPY_TO_CLIPBOARD:"Copy to clipboard",COPY_ALL_CODES:"Copy all codes",CONTINUE:"Continue",CURRENT_PASSWORD:"Current Password",CURRENT_PASSWORD_PLACEHOLDER:"Current Password",CURRENT_SESSION:"Current Session",UPDATE:"Update",DELETE:"Delete",DELETE_AVATAR:"Delete Avatar",DELETE_ACCOUNT:"Delete Account",DELETE_ACCOUNT_DESCRIPTION:"Permanently remove your account and all of its contents. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_INSTRUCTIONS:"Please confirm the deletion of your account. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_VERIFY:"Please check your email to verify the deletion of your account.",DELETE_ACCOUNT_SUCCESS:"Your account has been deleted.",DISABLE_TWO_FACTOR:"Disable Two-Factor",DISABLED_CREDENTIALS_DESCRIPTION:"Choose a provider to login to your account",DONT_HAVE_AN_ACCOUNT:"Don't have an account?",DONE:"Done",EMAIL:"Email",EMAIL_DESCRIPTION:"Enter the email address you want to use to log in.",EMAIL_INSTRUCTIONS:"Please enter a valid email address.",EMAIL_IS_THE_SAME:"Email is the same",EMAIL_PLACEHOLDER:"m@example.com",EMAIL_REQUIRED:"Email address is required",EMAIL_VERIFY_CHANGE:"Please check your email to verify the change.",EMAIL_VERIFICATION:"Email Verification",EMAIL_VERIFICATION_DESCRIPTION:"Please check your email for the verification code to complete your registration.",EMAIL_VERIFICATION_SUCCESS:"Email verification successful.",ENABLE_TWO_FACTOR:"Enable Two-Factor",IS_INVALID:"is invalid",IS_REQUIRED:"is required",IS_THE_SAME:"is the same",FORGOT_AUTHENTICATOR:"Forgot authenticator?",FORGOT_PASSWORD:"Forgot Password",FORGOT_PASSWORD_ACTION:"Send reset link",FORGOT_PASSWORD_DESCRIPTION:"Enter your email to reset your password",FORGOT_PASSWORD_EMAIL:"Check your email for the password reset link.",FORGOT_PASSWORD_LINK:"Forgot your password?",LINK:"Link",MAGIC_LINK:"Magic Link",MAGIC_LINK_ACTION:"Send magic link",MAGIC_LINK_DESCRIPTION:"Enter your email to receive a magic link",MAGIC_LINK_EMAIL:"Check your email for the magic link",EMAIL_OTP:"Email Code",EMAIL_OTP_SEND_ACTION:"Send code",EMAIL_OTP_VERIFY_ACTION:"Verify code",EMAIL_OTP_DESCRIPTION:"Enter your email to receive a code",EMAIL_OTP_VERIFICATION_SENT:"Please check your email for the verification code.",NAME:"Name",NAME_DESCRIPTION:"Please enter your full name, or a display name.",NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",NAME_PLACEHOLDER:"Name",NEW_PASSWORD:"New Password",NEW_PASSWORD_PLACEHOLDER:"New Password",NEW_PASSWORD_REQUIRED:"New password is required",ONE_TIME_PASSWORD:"One-Time Password",OR_CONTINUE_WITH:"Or continue with",PASSKEY:"Passkey",PASSKEYS:"Passkeys",PASSKEYS_DESCRIPTION:"Manage your passkeys for secure access.",PASSKEYS_INSTRUCTIONS:"Securely access your account without a password.",PERSONAL_ACCOUNT:"Personal Account",API_KEYS:"API Keys",API_KEYS_DESCRIPTION:"Manage your API keys for secure access.",API_KEYS_INSTRUCTIONS:"Generate API keys to access your account programmatically.",CREATE_API_KEY:"Create API Key",CREATE_API_KEY_DESCRIPTION:"Enter a unique name for your API key to differentiate it from other keys.",API_KEY_NAME_PLACEHOLDER:"New API Key",API_KEY_CREATED:"API Key Created",CREATE_API_KEY_SUCCESS:"Please copy your API key and store it in a safe place. For security reasons we cannot show it again.",NEVER_EXPIRES:"Never Expires",EXPIRES:"Expires",NO_EXPIRATION:"No Expiration",CREATE_ORGANIZATION:"Create Organization",ORGANIZATION:"Organization",ORGANIZATION_NAME:"Name",ORGANIZATION_NAME_PLACEHOLDER:"Acme Inc.",ORGANIZATION_NAME_DESCRIPTION:"This is your organization's visible name.",ORGANIZATION_NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",ORGANIZATION_SLUG:"Slug URL",ORGANIZATION_SLUG_DESCRIPTION:"This is your organization's URL namespace.",ORGANIZATION_SLUG_INSTRUCTIONS:"Please use 48 characters at maximum.",ORGANIZATION_SLUG_PLACEHOLDER:"acme-inc",CREATE_ORGANIZATION_SUCCESS:"Organization created successfully",PASSWORD:"Password",PASSWORD_PLACEHOLDER:"Password",PASSWORD_REQUIRED:"Password is required",PASSWORDS_DO_NOT_MATCH:"Passwords do not match",PROVIDERS:"Providers",PROVIDERS_DESCRIPTION:"Connect your account with a third-party service.",RECOVER_ACCOUNT:"Recover Account",RECOVER_ACCOUNT_ACTION:"Recover account",RECOVER_ACCOUNT_DESCRIPTION:"Please enter a backup code to access your account",REMEMBER_ME:"Remember me",RESEND_CODE:"Resend code",RESEND_VERIFICATION_EMAIL:"Resend Verification Email",RESET_PASSWORD:"Reset Password",RESET_PASSWORD_ACTION:"Save new password",RESET_PASSWORD_DESCRIPTION:"Enter your new password below",RESET_PASSWORD_SUCCESS:"Password reset successfully",REQUEST_FAILED:"Request failed",REVOKE:"Revoke",DELETE_API_KEY:"Delete API Key",DELETE_API_KEY_CONFIRM:"Are you sure you want to delete this API key?",API_KEY:"API Key",SIGN_IN:"Sign In",SIGN_IN_ACTION:"Login",SIGN_IN_DESCRIPTION:"Enter your email below to login to your account",SIGN_IN_USERNAME_DESCRIPTION:"Enter your username or email to login to your account",SIGN_IN_WITH:"Sign in with",SIGN_OUT:"Sign Out",SIGN_UP:"Sign Up",SIGN_UP_ACTION:"Create an account",SIGN_UP_DESCRIPTION:"Enter your information to create an account",SIGN_UP_EMAIL:"Check your email for the verification link.",SESSIONS:"Sessions",SESSIONS_DESCRIPTION:"Manage your active sessions and revoke access.",SET_PASSWORD:"Set Password",SET_PASSWORD_DESCRIPTION:"Click the button below to receive an email to set up a password for your account.",SETTINGS:"Settings",SAVE:"Save",SECURITY:"Security",SWITCH_ACCOUNT:"Switch Account",TRUST_DEVICE:"Trust this device",TWO_FACTOR:"Two-Factor",TWO_FACTOR_ACTION:"Verify code",TWO_FACTOR_DESCRIPTION:"Please enter your one-time password to continue",TWO_FACTOR_CARD_DESCRIPTION:"Add an extra layer of security to your account.",TWO_FACTOR_DISABLE_INSTRUCTIONS:"Please enter your password to disable 2FA.",TWO_FACTOR_ENABLE_INSTRUCTIONS:"Please enter your password to enable 2FA.",TWO_FACTOR_ENABLED:"Two-factor authentication has been enabled",TWO_FACTOR_DISABLED:"Two-Factor Authentication has been disabled",TWO_FACTOR_PROMPT:"Two-Factor Authentication",TWO_FACTOR_TOTP_LABEL:"Scan the QR Code with your Authenticator",SEND_VERIFICATION_CODE:"Send verification code",UNLINK:"Unlink",UPDATED_SUCCESSFULLY:"updated successfully",USERNAME:"Username",USERNAME_DESCRIPTION:"Enter the username you want to use to log in.",USERNAME_INSTRUCTIONS:"Please use 32 characters at maximum.",USERNAME_PLACEHOLDER:"Username",OPTIONAL_BRACKETS:"(Optional)",SIGN_IN_USERNAME_PLACEHOLDER:"Username or email",VERIFY_YOUR_EMAIL:"Verify Your Email",VERIFY_YOUR_EMAIL_DESCRIPTION:"Please verify your email address. Check your inbox for the verification email. If you haven't received the email, click the button below to resend.",GO_BACK:"Go back",SESSION_NOT_FRESH:"Your session is not fresh. Please sign in again.",UPLOAD_AVATAR:"Upload Avatar",LOGO:"Logo",LOGO_DESCRIPTION:"Click on the logo to upload a custom one from your files.",LOGO_INSTRUCTIONS:"A logo is optional but strongly recommended.",UPLOAD:"Upload",UPLOAD_LOGO:"Upload Logo",DELETE_LOGO:"Delete Logo",PRIVACY_POLICY:"Privacy Policy",TERMS_OF_SERVICE:"Terms of Service",PROTECTED_BY_RECAPTCHA:"This site is protected by reCAPTCHA.",BY_CONTINUING_YOU_AGREE:"By continuing, you agree to the",USER:"User",ORGANIZATIONS:"Organizations",ORGANIZATIONS_DESCRIPTION:"Manage your organizations and memberships.",ORGANIZATIONS_INSTRUCTIONS:"Create an organization to collaborate with other users.",LEAVE_ORGANIZATION:"Leave Organization",LEAVE_ORGANIZATION_CONFIRM:"Are you sure you want to leave this organization?",LEAVE_ORGANIZATION_SUCCESS:"You have successfully left the organization.",MANAGE_ORGANIZATION:"Manage Organization",REMOVE_MEMBER:"Remove Member",REMOVE_MEMBER_CONFIRM:"Are you sure you want to remove this member from the organization?",REMOVE_MEMBER_SUCCESS:"Member removed successfully",INVITE_MEMBER:"Invite Member",MEMBERS:"Members",MEMBERS_DESCRIPTION:"Add or remove members and manage their roles.",MEMBERS_INSTRUCTIONS:"Invite new members to your organization.",INVITE_MEMBER_DESCRIPTION:"Send an invitation to add a new member to your organization.",ROLE:"Role",SELECT_ROLE:"Select a role",ADMIN:"Admin",MEMBER:"Member",GUEST:"Guest",OWNER:"Owner",UPDATE_ROLE_DESCRIPTION:"Update the role for this member",UPDATE_ROLE:"Update Role",MEMBER_ROLE_UPDATED:"Member role updated successfully",SEND_INVITATION:"Send Invitation",SEND_INVITATION_SUCCESS:"Invitation sent successfully",PENDING_INVITATIONS:"Pending Invitations",PENDING_INVITATIONS_DESCRIPTION:"Manage pending invitations to your organization.",PENDING_USER_INVITATIONS_DESCRIPTION:"Invitations you've received from organizations.",CANCEL_INVITATION:"Cancel Invitation",INVITATION_CANCELLED:"Invitation cancelled successfully",ACCEPT_INVITATION:"Accept Invitation",ACCEPT_INVITATION_DESCRIPTION:"You have been invited to join an organization.",INVITATION_ACCEPTED:"Invitation accepted successfully",INVITATION_REJECTED:"Invitation rejected successfully",ACCEPT:"Accept",REJECT:"Reject",INVITATION_EXPIRED:"This invitation has expired",DELETE_ORGANIZATION:"Delete Organization",DELETE_ORGANIZATION_DESCRIPTION:"Permanently remove your organization and all of its contents. This action is not reversible — please continue with caution.",DELETE_ORGANIZATION_SUCCESS:"Organization deleted successfully",DELETE_ORGANIZATION_INSTRUCTIONS:"Enter the organization slug to continue:",SLUG_REQUIRED:"Organization slug is required",SLUG_DOES_NOT_MATCH:"The slug does not match",TEAM:"Team",TEAMS:"Teams",TEAM_ACTIVE:"Active",TEAM_SET_ACTIVE:"Set Active",CREATE_TEAM:"Create Team",CREATE_TEAM_SUCCESS:"Team created successfully",UPDATE_TEAM:"Update Team",UPDATE_TEAMS:"Update Teams",SELECT_TEAMS:"Select teams",ADD:"Add",REMOVE:"Remove",UPDATE_TEAM_DESCRIPTION:"Update the name for this team",UPDATE_TEAMS_DESCRIPTION:"Add or remove teams for this member",REMOVE_TEAM_CONFIRM:"Are you sure you want to remove this team from the organization?",CREATE_TEAM_INSTRUCTIONS:"Add new team to your organization.",TEAM_NAME:"Team Name",TEAM_NAME_PLACEHOLDER:"Engineering Team",TEAM_NAME_DESCRIPTION:"This is your team's visible name.",TEAM_NAME_INSTRUCTIONS:"Please use 64 characters at maximum.",TEAMS_DESCRIPTION:"Manage your teams within your organization.",USER_TEAMS_DESCRIPTION:"You are a member of the following teams.",DELETE_TEAM:"Delete Team",DELETE_TEAM_DESCRIPTION:"Permanently remove this team and all of its contents.",DELETE_TEAM_SUCCESS:"Team deleted successfully",DELETE_TEAM_INSTRUCTIONS:"Enter the team name to continue:",TEAM_NAME_REQUIRED:"Team name is required",TEAM_NAME_DOES_NOT_MATCH:"The team name does not match",TEAM_MEMBERS:"Team Members",TEAM_MEMBERS_DESCRIPTION:"Manage your team members and their roles.",ADD_TEAM_MEMBER:"Add Team Member",REMOVE_TEAM_MEMBER:"Remove Team Member",REMOVE_TEAM_MEMBER_CONFIRM:"Are you sure you want to remove this member from the team?",REMOVE_TEAM_MEMBER_SUCCESS:"Team member removed successfully",ADD_TEAM_MEMBER_SUCCESS:"Team member added successfully",UPDATE_TEAM_SUCCESS:"Team updated successfully",MANAGE_TEAM_MEMBERS:"Manage Team Members",MANAGE_TEAM_MEMBERS_DESCRIPTION:"Search and add organization members to this team.",NO_TEAMS_FOUND:"No teams found",MEMBER_SINGULAR:"member",MEMBER_PLURAL:"members",UNKNOWN:"Unknown",...kz,...Az,...Iz,...Nz,...Dz,...Lz,...jz,...$z,...Uz,...zz,...Vz,...Fz,...Bz,...qz,...Hz,...Gz},Wz={CALLBACK:"callback",EMAIL_OTP:"email-otp",EMAIL_VERIFICATION:"email-verification",FORGOT_PASSWORD:"forgot-password",MAGIC_LINK:"magic-link",RECOVER_ACCOUNT:"recover-account",RESET_PASSWORD:"reset-password",SIGN_IN:"sign-in",SIGN_OUT:"sign-out",SIGN_UP:"sign-up",TWO_FACTOR:"two-factor",ACCEPT_INVITATION:"accept-invitation"},ET={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},RT={SETTINGS:"settings",MEMBERS:"members",TEAMS:"teams",API_KEYS:"api-keys"};function Kz(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Yz=e=>{switch(e){case"success":return Jz;case"info":return tV;case"warning":return eV;case"error":return nV;default:return null}},Qz=Array(12).fill(0),Xz=({visible:e,className:t})=>ee.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ee.createElement("div",{className:"sonner-spinner"},Qz.map((n,r)=>ee.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Jz=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),eV=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),tV=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),nV=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),rV=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ee.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),oV=()=>{const[e,t]=ee.useState(document.hidden);return ee.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let g_=1;class aV{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...a}=t,i=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:g_++,c=this.toasts.find(d=>d.id===i),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),c?this.toasts=this.toasts.map(d=>d.id===i?(this.publish({...d,...t,id:i,title:r}),{...d,...t,id:i,dismissible:u,title:r}):d):this.addToast({title:r,...a,dismissible:u,id:i}),i},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const a=Promise.resolve(t instanceof Function?t():t);let i=r!==void 0,c;const u=a.then(async f=>{if(c=["resolve",f],ee.isValidElement(f))i=!1,this.create({id:r,type:"default",message:f});else if(iV(f)&&!f.ok){i=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${f.status}`):n.error,g=typeof n.description=="function"?await n.description(`HTTP error! status: ${f.status}`):n.description,w=typeof p=="object"&&!ee.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:g,...w})}else if(f instanceof Error){i=!1;const p=typeof n.error=="function"?await n.error(f):n.error,g=typeof n.description=="function"?await n.description(f):n.description,w=typeof p=="object"&&!ee.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:g,...w})}else if(n.success!==void 0){i=!1;const p=typeof n.success=="function"?await n.success(f):n.success,g=typeof n.description=="function"?await n.description(f):n.description,w=typeof p=="object"&&!ee.isValidElement(p)?p:{message:p};this.create({id:r,type:"success",description:g,...w})}}).catch(async f=>{if(c=["reject",f],n.error!==void 0){i=!1;const m=typeof n.error=="function"?await n.error(f):n.error,p=typeof n.description=="function"?await n.description(f):n.description,y=typeof m=="object"&&!ee.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:p,...y})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),d=()=>new Promise((f,m)=>u.then(()=>c[0]==="reject"?m(c[1]):f(c[1])).catch(m));return typeof r!="string"&&typeof r!="number"?{unwrap:d}:Object.assign(r,{unwrap:d})},this.custom=(t,n)=>{const r=n?.id||g_++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Dr=new aV,sV=(e,t)=>{const n=t?.id||g_++;return Dr.addToast({title:e,...t,id:n}),n},iV=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",cV=sV,lV=()=>Dr.toasts,uV=()=>Dr.getActiveToasts(),xT=Object.assign(cV,{success:Dr.success,info:Dr.info,warning:Dr.warning,error:Dr.error,custom:Dr.custom,message:Dr.message,promise:Dr.promise,dismiss:Dr.dismiss,loading:Dr.loading},{getHistory:lV,getToasts:uV});Kz("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function fh(e){return e.label!==void 0}const dV=3,fV="24px",hV="16px",TT=4e3,pV=356,mV=14,gV=45,vV=200;function ta(...e){return e.filter(Boolean).join(" ")}function yV(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const _V=e=>{var t,n,r,a,i,c,u,d,f;const{invert:m,toast:p,unstyled:g,interacting:y,setHeights:w,visibleToasts:S,heights:b,index:E,toasts:R,expanded:T,removeToast:O,defaultRichColors:C,closeButton:I,style:N,cancelButtonStyle:P,actionButtonStyle:$,className:W="",descriptionClassName:V="",duration:G,position:U,gap:J,expandByDefault:le,classNames:F,icons:Y,closeButtonAriaLabel:ie="Close toast"}=e,[fe,K]=ee.useState(null),[D,q]=ee.useState(null),[B,L]=ee.useState(!1),[z,Q]=ee.useState(!1),[me,ve]=ee.useState(!1),[Ce,Ie]=ee.useState(!1),[H,re]=ee.useState(!1),[be,se]=ee.useState(0),[ue,Oe]=ee.useState(0),Le=ee.useRef(p.duration||G||TT),Xe=ee.useRef(null),Be=ee.useRef(null),Ke=E===0,Z=E+1<=S,te=p.type,oe=p.dismissible!==!1,Se=p.className||"",xe=p.descriptionClassName||"",Re=ee.useMemo(()=>b.findIndex(He=>He.toastId===p.id)||0,[b,p.id]),ke=ee.useMemo(()=>{var He;return(He=p.closeButton)!=null?He:I},[p.closeButton,I]),Je=ee.useMemo(()=>p.duration||G||TT,[p.duration,G]),at=ee.useRef(0),kt=ee.useRef(0),dr=ee.useRef(0),nn=ee.useRef(null),[Rn,rn]=U.split("-"),jn=ee.useMemo(()=>b.reduce((He,dt,Qt)=>Qt>=Re?He:He+dt.height,0),[b,Re]),xn=oV(),Qa=p.invert||m,va=te==="loading";kt.current=ee.useMemo(()=>Re*J+jn,[Re,jn]),ee.useEffect(()=>{Le.current=Je},[Je]),ee.useEffect(()=>{L(!0)},[]),ee.useEffect(()=>{const He=Be.current;if(He){const dt=He.getBoundingClientRect().height;return Oe(dt),w(Qt=>[{toastId:p.id,height:dt,position:p.position},...Qt]),()=>w(Qt=>Qt.filter(Gt=>Gt.toastId!==p.id))}},[w,p.id]),ee.useLayoutEffect(()=>{if(!B)return;const He=Be.current,dt=He.style.height;He.style.height="auto";const Qt=He.getBoundingClientRect().height;He.style.height=dt,Oe(Qt),w(Gt=>Gt.find(Pt=>Pt.toastId===p.id)?Gt.map(Pt=>Pt.toastId===p.id?{...Pt,height:Qt}:Pt):[{toastId:p.id,height:Qt,position:p.position},...Gt])},[B,p.title,p.description,w,p.id,p.jsx,p.action,p.cancel]);const qe=ee.useCallback(()=>{Q(!0),se(kt.current),w(He=>He.filter(dt=>dt.toastId!==p.id)),setTimeout(()=>{O(p)},vV)},[p,O,w,kt]);ee.useEffect(()=>{if(p.promise&&te==="loading"||p.duration===1/0||p.type==="loading")return;let He;return T||y||xn?(()=>{if(dr.current<at.current){const Gt=new Date().getTime()-at.current;Le.current=Le.current-Gt}dr.current=new Date().getTime()})():Le.current!==1/0&&(at.current=new Date().getTime(),He=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),qe()},Le.current)),()=>clearTimeout(He)},[T,y,p,te,xn,qe]),ee.useEffect(()=>{p.delete&&(qe(),p.onDismiss==null||p.onDismiss.call(p,p))},[qe,p.delete]);function St(){var He;if(Y?.loading){var dt;return ee.createElement("div",{className:ta(F?.loader,p==null||(dt=p.classNames)==null?void 0:dt.loader,"sonner-loader"),"data-visible":te==="loading"},Y.loading)}return ee.createElement(Xz,{className:ta(F?.loader,p==null||(He=p.classNames)==null?void 0:He.loader),visible:te==="loading"})}const Ct=p.icon||Y?.[te]||Yz(te);var ut,Mt;return ee.createElement("li",{tabIndex:0,ref:Be,className:ta(W,Se,F?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,F?.default,F?.[te],p==null||(n=p.classNames)==null?void 0:n[te]),"data-sonner-toast":"","data-rich-colors":(ut=p.richColors)!=null?ut:C,"data-styled":!(p.jsx||p.unstyled||g),"data-mounted":B,"data-promise":!!p.promise,"data-swiped":H,"data-removed":z,"data-visible":Z,"data-y-position":Rn,"data-x-position":rn,"data-index":E,"data-front":Ke,"data-swiping":me,"data-dismissible":oe,"data-type":te,"data-invert":Qa,"data-swipe-out":Ce,"data-swipe-direction":D,"data-expanded":!!(T||le&&B),"data-testid":p.testId,style:{"--index":E,"--toasts-before":E,"--z-index":R.length-E,"--offset":`${z?be:kt.current}px`,"--initial-height":le?"auto":`${ue}px`,...N,...p.style},onDragEnd:()=>{ve(!1),K(null),nn.current=null},onPointerDown:He=>{He.button!==2&&(va||!oe||(Xe.current=new Date,se(kt.current),He.target.setPointerCapture(He.pointerId),He.target.tagName!=="BUTTON"&&(ve(!0),nn.current={x:He.clientX,y:He.clientY})))},onPointerUp:()=>{var He,dt,Qt;if(Ce||!oe)return;nn.current=null;const Gt=Number(((He=Be.current)==null?void 0:He.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),fr=Number(((dt=Be.current)==null?void 0:dt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Pt=new Date().getTime()-((Qt=Xe.current)==null?void 0:Qt.getTime()),on=fe==="x"?Gt:fr,ao=Math.abs(on)/Pt;if(Math.abs(on)>=gV||ao>.11){se(kt.current),p.onDismiss==null||p.onDismiss.call(p,p),q(fe==="x"?Gt>0?"right":"left":fr>0?"down":"up"),qe(),Ie(!0);return}else{var Yn,xr;(Yn=Be.current)==null||Yn.style.setProperty("--swipe-amount-x","0px"),(xr=Be.current)==null||xr.style.setProperty("--swipe-amount-y","0px")}re(!1),ve(!1),K(null)},onPointerMove:He=>{var dt,Qt,Gt;if(!nn.current||!oe||((dt=window.getSelection())==null?void 0:dt.toString().length)>0)return;const Pt=He.clientY-nn.current.y,on=He.clientX-nn.current.x;var ao;const Yn=(ao=e.swipeDirections)!=null?ao:yV(U);!fe&&(Math.abs(on)>1||Math.abs(Pt)>1)&&K(Math.abs(on)>Math.abs(Pt)?"x":"y");let xr={x:0,y:0};const Zi=Ao=>1/(1.5+Math.abs(Ao)/20);if(fe==="y"){if(Yn.includes("top")||Yn.includes("bottom"))if(Yn.includes("top")&&Pt<0||Yn.includes("bottom")&&Pt>0)xr.y=Pt;else{const Ao=Pt*Zi(Pt);xr.y=Math.abs(Ao)<Math.abs(Pt)?Ao:Pt}}else if(fe==="x"&&(Yn.includes("left")||Yn.includes("right")))if(Yn.includes("left")&&on<0||Yn.includes("right")&&on>0)xr.x=on;else{const Ao=on*Zi(on);xr.x=Math.abs(Ao)<Math.abs(on)?Ao:on}(Math.abs(xr.x)>0||Math.abs(xr.y)>0)&&re(!0),(Qt=Be.current)==null||Qt.style.setProperty("--swipe-amount-x",`${xr.x}px`),(Gt=Be.current)==null||Gt.style.setProperty("--swipe-amount-y",`${xr.y}px`)}},ke&&!p.jsx&&te!=="loading"?ee.createElement("button",{"aria-label":ie,"data-disabled":va,"data-close-button":!0,onClick:va||!oe?()=>{}:()=>{qe(),p.onDismiss==null||p.onDismiss.call(p,p)},className:ta(F?.closeButton,p==null||(r=p.classNames)==null?void 0:r.closeButton)},(Mt=Y?.close)!=null?Mt:rV):null,(te||p.icon||p.promise)&&p.icon!==null&&(Y?.[te]!==null||p.icon)?ee.createElement("div",{"data-icon":"",className:ta(F?.icon,p==null||(a=p.classNames)==null?void 0:a.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||St():null,p.type!=="loading"?Ct:null):null,ee.createElement("div",{"data-content":"",className:ta(F?.content,p==null||(i=p.classNames)==null?void 0:i.content)},ee.createElement("div",{"data-title":"",className:ta(F?.title,p==null||(c=p.classNames)==null?void 0:c.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?ee.createElement("div",{"data-description":"",className:ta(V,xe,F?.description,p==null||(u=p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),ee.isValidElement(p.cancel)?p.cancel:p.cancel&&fh(p.cancel)?ee.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||P,onClick:He=>{fh(p.cancel)&&oe&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,He),qe())},className:ta(F?.cancelButton,p==null||(d=p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,ee.isValidElement(p.action)?p.action:p.action&&fh(p.action)?ee.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||$,onClick:He=>{fh(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,He),!He.defaultPrevented&&qe())},className:ta(F?.actionButton,p==null||(f=p.classNames)==null?void 0:f.actionButton)},p.action.label):null)};function OT(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function bV(e,t){const n={};return[e,t].forEach((r,a)=>{const i=a===1,c=i?"--mobile-offset":"--offset",u=i?hV:fV;function d(f){["top","right","bottom","left"].forEach(m=>{n[`${c}-${m}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?n[`${c}-${f}`]=u:n[`${c}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(u)}),n}const wV=ee.forwardRef(function(t,n){const{id:r,invert:a,position:i="bottom-right",hotkey:c=["altKey","KeyT"],expand:u,closeButton:d,className:f,offset:m,mobileOffset:p,theme:g="light",richColors:y,duration:w,style:S,visibleToasts:b=dV,toastOptions:E,dir:R=OT(),gap:T=mV,icons:O,containerAriaLabel:C="Notifications"}=t,[I,N]=ee.useState([]),P=ee.useMemo(()=>r?I.filter(B=>B.toasterId===r):I.filter(B=>!B.toasterId),[I,r]),$=ee.useMemo(()=>Array.from(new Set([i].concat(P.filter(B=>B.position).map(B=>B.position)))),[P,i]),[W,V]=ee.useState([]),[G,U]=ee.useState(!1),[J,le]=ee.useState(!1),[F,Y]=ee.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ie=ee.useRef(null),fe=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),K=ee.useRef(null),D=ee.useRef(!1),q=ee.useCallback(B=>{N(L=>{var z;return(z=L.find(Q=>Q.id===B.id))!=null&&z.delete||Dr.dismiss(B.id),L.filter(({id:Q})=>Q!==B.id)})},[]);return ee.useEffect(()=>Dr.subscribe(B=>{if(B.dismiss){requestAnimationFrame(()=>{N(L=>L.map(z=>z.id===B.id?{...z,delete:!0}:z))});return}setTimeout(()=>{TA.flushSync(()=>{N(L=>{const z=L.findIndex(Q=>Q.id===B.id);return z!==-1?[...L.slice(0,z),{...L[z],...B},...L.slice(z+1)]:[B,...L]})})})}),[I]),ee.useEffect(()=>{if(g!=="system"){Y(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Y("dark"):Y("light")),typeof window>"u")return;const B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:L})=>{Y(L?"dark":"light")})}catch{B.addListener(({matches:z})=>{try{Y(z?"dark":"light")}catch(Q){console.error(Q)}})}},[g]),ee.useEffect(()=>{I.length<=1&&U(!1)},[I]),ee.useEffect(()=>{const B=L=>{var z;if(c.every(ve=>L[ve]||L.code===ve)){var me;U(!0),(me=ie.current)==null||me.focus()}L.code==="Escape"&&(document.activeElement===ie.current||(z=ie.current)!=null&&z.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[c]),ee.useEffect(()=>{if(ie.current)return()=>{K.current&&(K.current.focus({preventScroll:!0}),K.current=null,D.current=!1)}},[ie.current]),ee.createElement("section",{ref:n,"aria-label":`${C} ${fe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},$.map((B,L)=>{var z;const[Q,me]=B.split("-");return P.length?ee.createElement("ol",{key:B,dir:R==="auto"?OT():R,tabIndex:-1,ref:ie,className:f,"data-sonner-toaster":!0,"data-sonner-theme":F,"data-y-position":Q,"data-x-position":me,style:{"--front-toast-height":`${((z=W[0])==null?void 0:z.height)||0}px`,"--width":`${pV}px`,"--gap":`${T}px`,...S,...bV(m,p)},onBlur:ve=>{D.current&&!ve.currentTarget.contains(ve.relatedTarget)&&(D.current=!1,K.current&&(K.current.focus({preventScroll:!0}),K.current=null))},onFocus:ve=>{ve.target instanceof HTMLElement&&ve.target.dataset.dismissible==="false"||D.current||(D.current=!0,K.current=ve.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{J||U(!1)},onDragEnd:()=>U(!1),onPointerDown:ve=>{ve.target instanceof HTMLElement&&ve.target.dataset.dismissible==="false"||le(!0)},onPointerUp:()=>le(!1)},P.filter(ve=>!ve.position&&L===0||ve.position===B).map((ve,Ce)=>{var Ie,H;return ee.createElement(_V,{key:ve.id,icons:O,index:Ce,toast:ve,defaultRichColors:y,duration:(Ie=E?.duration)!=null?Ie:w,className:E?.className,descriptionClassName:E?.descriptionClassName,invert:a,visibleToasts:b,closeButton:(H=E?.closeButton)!=null?H:d,interacting:J,position:B,style:E?.style,unstyled:E?.unstyled,classNames:E?.classNames,cancelButtonStyle:E?.cancelButtonStyle,actionButtonStyle:E?.actionButtonStyle,closeButtonAriaLabel:E?.closeButtonAriaLabel,removeToast:q,toasts:P.filter(re=>re.position==ve.position),heights:W.filter(re=>re.position==ve.position),setHeights:V,expandByDefault:u,gap:T,expanded:G,swipeDirections:t.swipeDirections})})):null}))}),dN=A.createContext({});function fN(){return A.useContext(dN)}var Jy,CT;function SV(){if(CT)return Jy;CT=1;var e=function(){};return Jy=e,Jy}var EV=SV();const RV=Za(EV);function xV({async:e,appendTo:t,defer:n,id:r,nonce:a,src:i}){const c=document.createElement("script");e!==void 0&&(c.async=e),n!==void 0&&(c.defer=n),r&&(c.id=r),a&&c.setAttribute("nonce",a),c.src=i,(t==="head"?document.head:document.body).appendChild(c)}var TV=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};let Gu=null,sd=!1;const Gp=new Set,Zp=new Set,OV=typeof window<"u",rl="___grecaptcha_cfg",hN=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function CV(){if(!OV)return;function e(n){if(sd)n();else{window[rl]||(window[rl]={});const r=window[rl];r.fns||(r.fns=[]),r.fns.push(n)}}window.grecaptcha||(window.grecaptcha={}),window.grecaptcha.enterprise||(window.grecaptcha.enterprise={}),window.grecaptcha.ready=e,window.grecaptcha.enterprise.ready=e;function t(){sd=!0;for(const n of Zp)n();Zp.clear()}window[hN]=t}function AV({language:e,onLoadCallbackName:t,render:n,useEnterprise:r=!1,useRecaptchaNet:a=!1}){const i=a?"recaptcha.net":"google.com",c=r?"enterprise.js":"api.js",u=new URLSearchParams({render:n});return t&&u.set("onload",t),e&&u.set("hl",e),`https://www.${i}/recaptcha/${c}?${u.toString()}`}function IV({language:e,render:t,scriptProps:n,useEnterprise:r,useRecaptchaNet:a}){const i={id:"google-recaptcha-v3"},c=AV({language:e,onLoadCallbackName:hN,render:t,useEnterprise:r,useRecaptchaNet:a});if(Gu){if(Gu!==c)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}Gu=c,xV(Object.assign(Object.assign(Object.assign({},i),n),{src:c}))}function NV(e){if(!window[rl])return;const t=window[rl];t.clients&&delete t.clients[e]}function kV(e,t){var{onLoadCallback:n,onLoadCallbackName:r}=t,a=TV(t,["onLoadCallback","onLoadCallbackName"]);if(Gp.size===0&&CV(),IV(a),Gp.add(e),n&&(sd?n():Zp.add(n)),r){let i=function(){if(!r)return;const c=window[r];typeof c=="function"&&c()};sd?i():Zp.add(i)}}function MV(e){var t,n,r;Gp.delete(e),Gp.size===0&&(window.grecaptcha=void 0,window[rl]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(n=document.querySelector(`script[src="${Gu}"]`))===null||n===void 0||n.remove(),(r=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||r===void 0||r.remove(),Gu=null,sd=!1)}let AT=!1;function PV({container:e,children:t,language:n,reCaptchaKey:r,scriptProps:a,useEnterprise:i,useRecaptchaNet:c}){var u,d,f,m,p,g,y;const w=A.useId(),[S,b]=A.useState(null),[E,R]=A.useState(null),T=A.useRef(!1);A.useEffect(()=>{function N(){var P;const $=i?(P=window.grecaptcha)===null||P===void 0?void 0:P.enterprise:window.grecaptcha;if(!$)throw new Error("reCAPTCHA not found");if(!$.ready)throw new Error("reCAPTCHA ready callback not found");$.ready(()=>{b($)})}return kV(w,{language:n,onLoadCallback:N,onLoadCallbackName:a?.onLoadCallbackName,render:e?.element?"explicit":r,scriptProps:{appendTo:a?.appendTo,async:a?.async,defer:a?.defer,id:a?.id,nonce:a?.nonce},useEnterprise:i,useRecaptchaNet:c}),()=>{MV(w),b(null)}},[e?.element,w,n,r,a?.appendTo,a?.async,a?.defer,a?.id,a?.nonce,a?.onLoadCallbackName,i,c]),A.useEffect(()=>{var N,P,$;if(!e?.element||!S?.render)return;const W={"error-callback":e.parameters.errorCallback,"expired-callback":e.parameters.expiredCallback,badge:((N=e.parameters)===null||N===void 0?void 0:N.badge)||"inline",callback:e.parameters.callback,sitekey:r,size:"invisible",tabindex:e.parameters.tabindex,theme:e.parameters.theme},V=typeof e?.element=="string"?document.getElementById(e.element):e?.element;if(!V)throw new Error("reCAPTCHA container element not found");const G=S.render(V,W);return!((P=e?.parameters)===null||P===void 0)&&P.hidden&&(AT||(RV(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),AT=!0),($=V.querySelector(".grecaptcha-badge"))===null||$===void 0||$.style.setProperty("display","none")),R(G),T.current=!0,()=>{R(null),T.current=!1,NV(G),V.innerHTML=""}},[e?.element,(u=e?.parameters)===null||u===void 0?void 0:u.badge,(d=e?.parameters)===null||d===void 0?void 0:d.hidden,(f=e?.parameters)===null||f===void 0?void 0:f.callback,(m=e?.parameters)===null||m===void 0?void 0:m.errorCallback,(p=e?.parameters)===null||p===void 0?void 0:p.expiredCallback,(g=e?.parameters)===null||g===void 0?void 0:g.tabindex,(y=e?.parameters)===null||y===void 0?void 0:y.theme,S,r]);const O=!!e?.element,C=O?E:r,I=A.useMemo(()=>C!==null&&S?.execute?N=>{if(C===null||!S?.execute)throw new Error("reCAPTCHA has not been loaded");return O&&!T.current?(console.warn("Client ID not mounted"),null):S.execute(C,{action:N})}:void 0,[C,S,O]);return x.jsx(dN.Provider,{value:{container:e?.element,executeRecaptcha:I,reCaptchaInstance:S},children:t})}var DV=class{cache=new Map;listeners=new Map;inFlightRequests=new Map;get(e){return this.cache.get(e)}set(e,t){const n={data:t,timestamp:Date.now(),isRefetching:!1};this.cache.set(e,n),this.notify(e)}setRefetching(e,t){const n=this.cache.get(e);n&&(n.isRefetching=t,this.notify(e))}clear(e){if(e)this.cache.delete(e),this.inFlightRequests.delete(e),this.notify(e);else{this.cache.clear(),this.inFlightRequests.clear();const t=Array.from(this.listeners.keys());for(const n of t)this.notify(n)}}getInFlightRequest(e){return this.inFlightRequests.get(e)}setInFlightRequest(e,t){this.inFlightRequests.set(e,t)}removeInFlightRequest(e){this.inFlightRequests.delete(e)}subscribe(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>{const n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}}notify(e){const t=this.listeners.get(e);if(t){const n=Array.from(t);for(const r of n)r()}}},vo=new DV;function LV(){return()=>{}}function Ka(){return A.useSyncExternalStore(LV,()=>!0,()=>!1)}function pN(){const[e,t]=A.useState();return A.useEffect(()=>{const n=()=>{const a=document.documentElement.getAttribute("lang");t(a??void 0)};n();const r=new MutationObserver(a=>{for(const i of a)i.attributeName==="lang"&&n()});return r.observe(document.documentElement,{attributes:!0}),()=>{r.disconnect()}},[]),{lang:e}}function zb(){const[e,t]=A.useState("light");return A.useEffect(()=>{const n=()=>{var a;const i=document.documentElement.classList.contains("dark")||((a=document.documentElement.getAttribute("style"))==null?void 0:a.includes("color-scheme: dark"));t(i?"dark":"light")};n();const r=new MutationObserver(a=>{for(const i of a)(i.attributeName==="style"||i.attributeName==="class")&&n()});return r.observe(document.documentElement,{attributes:!0}),()=>{r.disconnect()}},[]),{theme:e}}function jV({children:e}){const t=Ka(),{captcha:n}=A.useContext(mt);return n?.provider!=="google-recaptcha-v3"?e:x.jsxs(PV,{reCaptchaKey:n.siteKey,useEnterprise:n.enterprise,useRecaptchaNet:n.recaptchaNet,children:[t&&x.jsx("style",{children:`
49
- .grecaptcha-badge {
50
- visibility: hidden;
51
- border-radius: var(--radius) !important;
52
- --tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, #0000000d);
53
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
54
- border-style: var(--tw-border-style) !important;
55
- border-width: 1px;
56
- }
57
-
58
- .dark .grecaptcha-badge {
59
- border-color: var(--input) !important;
60
- }
61
- `}),x.jsx($V,{}),e]})}function $V(){const{executeRecaptcha:e}=fN(),{theme:t}=zb(),{lang:n}=pN();return A.useEffect(()=>{if(!e)return;(async()=>{const a=document.querySelector("iframe[title='reCAPTCHA']");if(a){const i=new URL(a.src);i.searchParams.set("theme",t),n&&i.searchParams.set("hl",n),a.src=i.toString()}})()},[e,t,n]),null}function UV({slug:e}={}){const{organization:t,hooks:{useActiveOrganization:n,useListOrganizations:r}}=A.useContext(mt),{pathMode:a,slug:i}=t||{};let c,u,d,f;const{data:m,isPending:p,isRefetching:g}=r();if(a==="slug"){const y=e||i;c=m?.find(w=>w.slug===y),u=p,d=g}else{const{data:y,isPending:w,isRefetching:S,refetch:b}=n();f=b,c=y,u=w,d=S}return A.useMemo(()=>({data:c,isPending:u,isRefetching:d,refetch:f}),[c,u,d,f])}var zV=()=>{const{hooks:{useListOrganizations:e,useSession:t},organization:n,navigate:r,redirectTo:a}=A.useContext(mt),{slug:i,pathMode:c,personalPath:u}=n||{},{data:d}=t(),{data:f,isPending:m,isRefetching:p,refetch:g}=UV(),{refetch:y}=e(),{data:w}=e();return A.useEffect(()=>{d?.user.id&&(f||w)&&(g?.(),y?.())},[d?.user.id]),A.useEffect(()=>{p||m||i&&c==="slug"&&!f&&r(u||a)},[f,p,m,i,c,u,r,a]),null},VV=({href:e,className:t,children:n})=>x.jsx("a",{className:t,href:e,children:n}),FV=e=>{window.location.href=e},BV=e=>{window.location.replace(e)},qV=({variant:e="default",message:t})=>{e==="default"?xT(t):xT[e](t)},mt=A.createContext({}),HV=({children:e,authClient:t,account:n,avatar:r,deleteUser:a,social:i,genericOAuth:c,basePath:u="/auth",baseURL:d="",captcha:f,redirectTo:m="/",credentials:p,changeEmail:g=!0,freshAge:y=3600*24,hooks:w,mutators:S,localization:b,localizeErrors:E=!0,nameRequired:R=!0,organization:T,teams:O,signUp:C=!0,toast:I=qV,viewPaths:N,navigate:P,replace:$,Link:W=VV,emailVerification:V,...G})=>{const U=t,J=A.useMemo(()=>{if(r)return r===!0?{extension:"png",size:128}:{upload:r.upload,delete:r.delete,extension:r.extension||"png",size:r.size||(r.upload?256:128),Image:r.Image}},[r]),le=A.useMemo(()=>{if(V)return V===!0?{otp:!1}:{otp:V.otp??!1}},[V]),F=A.useMemo(()=>{var H;return n===!1?void 0:n===!0||n===void 0?{basePath:"/account",fields:["image","name"],viewPaths:ET}:{basePath:((H=n.basePath)!=null&&H.endsWith("/")?n.basePath.slice(0,-1):n.basePath)??"/account",fields:n.fields||["image","name"],viewPaths:{...ET,...n.viewPaths}}},[n]),Y=A.useMemo(()=>{if(a)return a===!0?{}:a},[a]),ie=A.useMemo(()=>{if(i)return i},[i]),fe=A.useMemo(()=>{if(c)return c},[c]),K=A.useMemo(()=>{if(p!==!1)return p===!0?{forgotPassword:!0,usernameRequired:!0}:{...p,forgotPassword:p?.forgotPassword??!0,usernameRequired:p?.usernameRequired??!0}},[p]),D=A.useMemo(()=>{if(C!==!1)return C===!0||C===void 0?{fields:["name"]}:{fields:C.fields||["name"]}},[C]),q=A.useMemo(()=>{var H;if(!T)return;if(T===!0)return{basePath:"/organization",viewPaths:RT,customRoles:[]};let re;T.logo===!0?re={extension:"png",size:128}:T.logo&&(re={upload:T.logo.upload,delete:T.logo.delete,extension:T.logo.extension||"png",size:T.logo.size||(T.logo.upload?256:128)});const be=(H=T.basePath)!=null&&H.endsWith("/")?T.basePath.slice(0,-1):T.basePath;return{...T,logo:re,basePath:be??"/organization",customRoles:T.customRoles||[],viewPaths:{...RT,...T.viewPaths}}},[T]),B=A.useMemo(()=>{var H,re;if(!(!O||!q))return O===!0?{enabled:!0,customRoles:[],colors:{count:5,prefix:"team"}}:{enabled:O.enabled??!0,customRoles:O.customRoles||[],colors:{count:((H=O.colors)==null?void 0:H.count)??5,prefix:((re=O.colors)==null?void 0:re.prefix)??"team"}}},[O,q]),L=A.useMemo(()=>({deleteApiKey:H=>U.apiKey.delete({...H,fetchOptions:{throw:!0}}),deletePasskey:H=>U.passkey.deletePasskey({...H,fetchOptions:{throw:!0}}),revokeDeviceSession:H=>U.multiSession.revoke({...H,fetchOptions:{throw:!0}}),revokeSession:H=>U.revokeSession({...H,fetchOptions:{throw:!0}}),setActiveSession:H=>U.multiSession.setActive({...H,fetchOptions:{throw:!0}}),updateOrganization:H=>U.organization.update({...H,fetchOptions:{throw:!0}}),updateTeam:H=>U.$fetch("/organization/update-team",{method:"POST",body:H,throw:!0}),updateUser:H=>U.updateUser({...H,fetchOptions:{throw:!0}}),unlinkAccount:H=>U.unlinkAccount({...H,fetchOptions:{throw:!0}})}),[U]),z=A.useMemo(()=>({useSession:U.useSession,useListAccounts:()=>Zr({queryFn:U.listAccounts,cacheKey:"listAccounts"}),useAccountInfo:H=>Zr({queryFn:()=>U.accountInfo(H),cacheKey:`accountInfo:${JSON.stringify(H)}`}),useListDeviceSessions:()=>Zr({queryFn:U.multiSession.listDeviceSessions,cacheKey:"listDeviceSessions"}),useListSessions:()=>Zr({queryFn:U.listSessions,cacheKey:"listSessions"}),useListPasskeys:U.useListPasskeys,useListApiKeys:()=>Zr({queryFn:U.apiKey.list,cacheKey:"listApiKeys"}),useActiveOrganization:U.useActiveOrganization,useListOrganizations:U.useListOrganizations,useHasPermission:H=>Zr({queryFn:()=>U.$fetch("/organization/has-permission",{method:"POST",body:H}),cacheKey:`hasPermission:${JSON.stringify(H)}`}),useInvitation:H=>Zr({queryFn:()=>U.organization.getInvitation(H),cacheKey:`invitation:${JSON.stringify(H)}`}),useListInvitations:H=>Zr({queryFn:()=>{var re;return U.$fetch(`/organization/list-invitations?organizationId=${((re=H?.query)==null?void 0:re.organizationId)||""}`)},cacheKey:`listInvitations:${JSON.stringify(H)}`}),useListUserInvitations:()=>Zr({queryFn:()=>U.$fetch("/organization/list-user-invitations"),cacheKey:"listUserInvitations"}),useListMembers:H=>Zr({queryFn:()=>{var re;return U.$fetch(`/organization/list-members?organizationId=${((re=H?.query)==null?void 0:re.organizationId)||""}`)},cacheKey:`listMembers:${JSON.stringify(H)}`}),useListTeams:H=>Zr({queryFn:()=>U.$fetch(`/organization/list-teams?organizationId=${H?.organizationId||""}`),cacheKey:`listTeams:${JSON.stringify(H)}`}),useListTeamMembers:H=>Zr({queryFn:()=>U.$fetch("/organization/list-team-members",{method:"POST",body:H?.teamId?{query:{teamId:H.teamId}}:void 0}),cacheKey:`listTeamMembers:${JSON.stringify(H)}`}),useListUserTeams:()=>Zr({queryFn:()=>U.$fetch("/organization/list-user-teams"),cacheKey:"listUserTeams"})}),[U]),Q=A.useMemo(()=>({...Wz,...N}),[N]),me=A.useMemo(()=>({...Zz,...b}),[b]),ve=A.useMemo(()=>({...z,...w}),[z,w]),Ce=A.useMemo(()=>({...L,...S}),[L,S]);d=d.endsWith("/")?d.slice(0,-1):d,u=u.endsWith("/")?u.slice(0,-1):u;const{data:Ie}=ve.useSession();return x.jsxs(mt.Provider,{value:{authClient:U,avatar:J,basePath:u==="/"?"":u,baseURL:d,captcha:f,redirectTo:m,changeEmail:g,credentials:K,deleteUser:Y,emailVerification:le,freshAge:y,genericOAuth:fe,hooks:ve,mutators:Ce,localization:me,localizeErrors:E,nameRequired:R,organization:q,teams:B,account:F,signUp:D,social:ie,toast:I,navigate:P||FV,replace:$||P||BV,viewPaths:Q,Link:W,...G},children:[Ie&&q&&x.jsx(zV,{}),f?.provider==="google-recaptcha-v3"?x.jsx(jV,{children:e}):e]})};function Zr({queryFn:e,cacheKey:t,staleTime:n=1e4}){var r;const{hooks:{useSession:a},toast:i,localization:c,localizeErrors:u}=A.useContext(mt),{data:d,isPending:f}=a(),m=A.useRef(e);m.current=e;const p=t||e.toString(),g=A.useSyncExternalStore(A.useCallback(T=>vo.subscribe(p,T),[p]),A.useCallback(()=>vo.get(p),[p]),A.useCallback(()=>vo.get(p),[p])),y=A.useRef(!1),w=A.useRef(void 0),[S,b]=A.useState(null),E=A.useCallback(async()=>{const T=vo.getInFlightRequest(p);if(T){try{const C=await T;C.error?b(C.error):b(null)}catch(C){b(C)}return}g?.data!==void 0&&vo.setRefetching(p,!0);const O=m.current();vo.setInFlightRequest(p,O);try{const{data:C,error:I}=await O;I?(b(I),i({variant:"error",message:En({error:I,localization:c,localizeErrors:u})})):b(null),vo.set(p,C)}catch(C){const I=C;b(I),i({variant:"error",message:En({error:I,localization:c,localizeErrors:u})})}finally{vo.setRefetching(p,!1),vo.removeInFlightRequest(p)}},[p,i,c,u,g]);A.useEffect(()=>{var T;const O=(T=d?.user)==null?void 0:T.id;if(!d){vo.setRefetching(p,!1),vo.clear(p),y.current=!1,w.current=void 0;return}const C=w.current!==void 0&&w.current!==O;C&&vo.clear(p);const I=g?.data!==void 0,N=!g||Date.now()-g.timestamp>n;(!y.current||!I||C||I&&N)&&(!I||N)&&(y.current=!0,E()),w.current=O},[d,(r=d?.user)==null?void 0:r.id,p,E,g,n]);const R=f||g?.data===void 0&&!S;return{data:g?.data??null,isPending:R,isRefetching:g?.isRefetching??!1,error:S,refetch:E}}const GV=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mN=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();var ZV={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const WV=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:c,...u},d)=>A.createElement("svg",{ref:d,...ZV,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:mN("lucide",a),...u},[...c.map(([f,m])=>A.createElement(f,m)),...Array.isArray(i)?i:[i]]));const vr=(e,t)=>{const n=A.forwardRef(({className:r,...a},i)=>A.createElement(WV,{ref:i,iconNode:t,className:mN(`lucide-${GV(e)}`,r),...a}));return n.displayName=`${e}`,n};const KV=vr("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const YV=vr("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);const gN=vr("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const QV=vr("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);const XV=vr("EyeOff",[["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"}]]);const JV=vr("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"}]]);const eF=vr("Fingerprint",[["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"}]]);const gr=vr("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const vN=vr("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const yN=vr("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);const tF=vr("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const nF=vr("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);const IT=vr("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const rF=vr("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const oF=vr("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);const aF=vr("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var wd=e=>e.type==="checkbox",Ii=e=>e instanceof Date,jr=e=>e==null;const _N=e=>typeof e=="object";var Ln=e=>!jr(e)&&!Array.isArray(e)&&_N(e)&&!Ii(e),bN=e=>Ln(e)&&e.target?wd(e.target)?e.target.checked:e.target.value:e,sF=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,wN=(e,t)=>e.has(sF(t)),iF=e=>{const t=e.constructor&&e.constructor.prototype;return Ln(t)&&t.hasOwnProperty("isPrototypeOf")},Vb=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Nn(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Vb&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(Ln(e)&&iF(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=Nn(e[a]));return r}var Fm=e=>/^\w*$/.test(e),un=e=>e===void 0,Fb=e=>Array.isArray(e)?e.filter(Boolean):[],Bb=e=>Fb(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Me=(e,t,n)=>{if(!t||!Ln(e))return n;const r=(Fm(t)?[t]:Bb(t)).reduce((a,i)=>jr(a)?a:a[i],e);return un(r)||r===e?un(e[t])?n:e[t]:r},Qr=e=>typeof e=="boolean",Er=e=>typeof e=="function",Bt=(e,t,n)=>{let r=-1;const a=Fm(t)?[t]:Bb(t),i=a.length,c=i-1;for(;++r<i;){const u=a[r];let d=n;if(r!==c){const f=e[u];d=Ln(f)||Array.isArray(f)?f:isNaN(+a[r+1])?{}:[]}if(u==="__proto__"||u==="constructor"||u==="prototype")return;e[u]=d,e=e[u]}};const Wp={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},zo={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ja={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},qb=ee.createContext(null);qb.displayName="HookFormControlContext";const Hb=()=>ee.useContext(qb);var SN=(e,t,n,r=!0)=>{const a={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(a,i,{get:()=>{const c=i;return t._proxyFormState[c]!==zo.all&&(t._proxyFormState[c]=!r||zo.all),n&&(n[c]=!0),e[c]}});return a};const Gb=typeof window<"u"?ee.useLayoutEffect:ee.useEffect;function EN(e){const t=Hb(),{control:n=t,disabled:r,name:a,exact:i}=e||{},[c,u]=ee.useState(n._formState),d=ee.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Gb(()=>n._subscribe({name:a,formState:d.current,exact:i,callback:f=>{!r&&u({...n._formState,...f})}}),[a,r,i]),ee.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),ee.useMemo(()=>SN(c,n,d.current,!1),[c,n])}var to=e=>typeof e=="string",v_=(e,t,n,r,a)=>to(e)?(r&&t.watch.add(e),Me(n,e,a)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),Me(n,i))):(r&&(t.watchAll=!0),n),y_=e=>jr(e)||!_N(e);function Vo(e,t,n=new WeakSet){if(y_(e)||y_(t))return Object.is(e,t);if(Ii(e)&&Ii(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const i of r){const c=e[i];if(!a.includes(i))return!1;if(i!=="ref"){const u=t[i];if(Ii(c)&&Ii(u)||Ln(c)&&Ln(u)||Array.isArray(c)&&Array.isArray(u)?!Vo(c,u,n):!Object.is(c,u))return!1}}return!0}function cF(e){const t=Hb(),{control:n=t,name:r,defaultValue:a,disabled:i,exact:c,compute:u}=e||{},d=ee.useRef(a),f=ee.useRef(u),m=ee.useRef(void 0),p=ee.useRef(n),g=ee.useRef(r);f.current=u;const[y,w]=ee.useState(()=>{const O=n._getWatch(r,d.current);return f.current?f.current(O):O}),S=ee.useCallback(O=>{const C=v_(r,n._names,O||n._formValues,!1,d.current);return f.current?f.current(C):C},[n._formValues,n._names,r]),b=ee.useCallback(O=>{if(!i){const C=v_(r,n._names,O||n._formValues,!1,d.current);if(f.current){const I=f.current(C);Vo(I,m.current)||(w(I),m.current=I)}else w(C)}},[n._formValues,n._names,i,r]);Gb(()=>((p.current!==n||!Vo(g.current,r))&&(p.current=n,g.current=r,b()),n._subscribe({name:r,formState:{values:!0},exact:c,callback:O=>{b(O.values)}})),[n,c,r,b]),ee.useEffect(()=>n._removeUnmounted());const E=p.current!==n,R=g.current,T=ee.useMemo(()=>{if(i)return null;const O=!E&&!Vo(R,r);return E||O?S():null},[i,E,r,R,S]);return T!==null?T:y}function lF(e){const t=Hb(),{name:n,disabled:r,control:a=t,shouldUnregister:i,defaultValue:c,exact:u=!0}=e,d=wN(a._names.array,n),f=ee.useMemo(()=>Me(a._formValues,n,Me(a._defaultValues,n,c)),[a,n,c]),m=cF({control:a,name:n,defaultValue:f,exact:u}),p=EN({control:a,name:n,exact:u}),g=ee.useRef(e),y=ee.useRef(void 0),w=ee.useRef(a.register(n,{...e.rules,value:m,...Qr(e.disabled)?{disabled:e.disabled}:{}}));g.current=e;const S=ee.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Me(p.errors,n)},isDirty:{enumerable:!0,get:()=>!!Me(p.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Me(p.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Me(p.validatingFields,n)},error:{enumerable:!0,get:()=>Me(p.errors,n)}}),[p,n]),b=ee.useCallback(O=>w.current.onChange({target:{value:bN(O),name:n},type:Wp.CHANGE}),[n]),E=ee.useCallback(()=>w.current.onBlur({target:{value:Me(a._formValues,n),name:n},type:Wp.BLUR}),[n,a._formValues]),R=ee.useCallback(O=>{const C=Me(a._fields,n);C&&C._f&&O&&(C._f.ref={focus:()=>Er(O.focus)&&O.focus(),select:()=>Er(O.select)&&O.select(),setCustomValidity:I=>Er(O.setCustomValidity)&&O.setCustomValidity(I),reportValidity:()=>Er(O.reportValidity)&&O.reportValidity()})},[a._fields,n]),T=ee.useMemo(()=>({name:n,value:m,...Qr(r)||p.disabled?{disabled:p.disabled||r}:{},onChange:b,onBlur:E,ref:R}),[n,r,p.disabled,b,E,R,m]);return ee.useEffect(()=>{const O=a._options.shouldUnregister||i,C=y.current;C&&C!==n&&!d&&a.unregister(C),a.register(n,{...g.current.rules,...Qr(g.current.disabled)?{disabled:g.current.disabled}:{}});const I=(N,P)=>{const $=Me(a._fields,N);$&&$._f&&($._f.mount=P)};if(I(n,!0),O){const N=Nn(Me(a._options.defaultValues,n,g.current.defaultValue));Bt(a._defaultValues,n,N),un(Me(a._formValues,n))&&Bt(a._formValues,n,N)}return!d&&a.register(n),y.current=n,()=>{(d?O&&!a._state.action:O)?a.unregister(n):I(n,!1)}},[n,a,d,i]),ee.useEffect(()=>{a._setDisabledField({disabled:r,name:n})},[r,n,a]),ee.useMemo(()=>({field:T,formState:p,fieldState:S}),[T,p,S])}const uF=e=>e.render(lF(e)),Zb=ee.createContext(null);Zb.displayName="HookFormContext";const dF=()=>ee.useContext(Zb),fF=e=>{const{children:t,watch:n,getValues:r,getFieldState:a,setError:i,clearErrors:c,setValue:u,trigger:d,formState:f,resetField:m,reset:p,handleSubmit:g,unregister:y,control:w,register:S,setFocus:b,subscribe:E}=e;return ee.createElement(Zb.Provider,{value:ee.useMemo(()=>({watch:n,getValues:r,getFieldState:a,setError:i,clearErrors:c,setValue:u,trigger:d,formState:f,resetField:m,reset:p,handleSubmit:g,unregister:y,control:w,register:S,setFocus:b,subscribe:E}),[c,w,f,a,r,g,S,p,m,i,b,u,E,d,y,n])},ee.createElement(qb.Provider,{value:w},t))};var Wb=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{},Zu=e=>Array.isArray(e)?e:[e],NT=()=>{let e=[];return{get observers(){return e},next:a=>{for(const i of e)i.next&&i.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(i=>i!==a)}}),unsubscribe:()=>{e=[]}}};function RN(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const a=e[r],i=t[r];if(a&&Ln(a)&&i){const c=RN(a,i);Ln(c)&&(n[r]=c)}else e[r]&&(n[r]=i)}return n}var Sr=e=>Ln(e)&&!Object.keys(e).length,Kb=e=>e.type==="file",Kp=e=>{if(!Vb)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},xN=e=>e.type==="select-multiple",Yb=e=>e.type==="radio",hF=e=>Yb(e)||wd(e),e0=e=>Kp(e)&&e.isConnected;function pF(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=un(e)?r++:e[t[r++]];return e}function mF(e){for(const t in e)if(e.hasOwnProperty(t)&&!un(e[t]))return!1;return!0}function kn(e,t){const n=Array.isArray(t)?t:Fm(t)?[t]:Bb(t),r=n.length===1?e:pF(e,n),a=n.length-1,i=n[a];return r&&delete r[i],a!==0&&(Ln(r)&&Sr(r)||Array.isArray(r)&&mF(r))&&kn(e,n.slice(0,-1)),e}var gF=e=>{for(const t in e)if(Er(e[t]))return!0;return!1};function TN(e){return Array.isArray(e)||Ln(e)&&!gF(e)}function __(e,t={}){for(const n in e){const r=e[n];TN(r)?(t[n]=Array.isArray(r)?[]:{},__(r,t[n])):un(r)||(t[n]=!0)}return t}function qc(e,t,n){n||(n=__(t));for(const r in e){const a=e[r];if(TN(a))un(t)||y_(n[r])?n[r]=__(a,Array.isArray(a)?[]:{}):qc(a,jr(t)?{}:t[r],n[r]);else{const i=t[r];n[r]=!Vo(a,i)}}return n}const kT={value:!1,isValid:!1},MT={value:!0,isValid:!0};var ON=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!un(e[0].attributes.value)?un(e[0].value)||e[0].value===""?MT:{value:e[0].value,isValid:!0}:MT:kT}return kT},CN=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>un(e)?e:t?e===""?NaN:e&&+e:n&&to(e)?new Date(e):r?r(e):e;const PT={isValid:!1,value:null};var AN=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,PT):PT;function DT(e){const t=e.ref;return Kb(t)?t.files:Yb(t)?AN(e.refs).value:xN(t)?[...t.selectedOptions].map(({value:n})=>n):wd(t)?ON(e.refs).value:CN(un(t.value)?e.ref.value:t.value,e)}var vF=(e,t,n,r)=>{const a={};for(const i of e){const c=Me(t,i);c&&Bt(a,i,c._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}},Yp=e=>e instanceof RegExp,Ru=e=>un(e)?e:Yp(e)?e.source:Ln(e)?Yp(e.value)?e.value.source:e.value:e,LT=e=>({isOnSubmit:!e||e===zo.onSubmit,isOnBlur:e===zo.onBlur,isOnChange:e===zo.onChange,isOnAll:e===zo.all,isOnTouch:e===zo.onTouched});const jT="AsyncFunction";var yF=e=>!!e&&!!e.validate&&!!(Er(e.validate)&&e.validate.constructor.name===jT||Ln(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===jT)),_F=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),$T=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Wu=(e,t,n,r)=>{for(const a of n||Object.keys(e)){const i=Me(e,a);if(i){const{_f:c,...u}=i;if(c){if(c.refs&&c.refs[0]&&t(c.refs[0],a)&&!r)return!0;if(c.ref&&t(c.ref,c.name)&&!r)return!0;if(Wu(u,t))break}else if(Ln(u)&&Wu(u,t))break}}};function UT(e,t,n){const r=Me(e,n);if(r||Fm(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const i=a.join("."),c=Me(t,i),u=Me(e,i);if(c&&!Array.isArray(c)&&n!==i)return{name:n};if(u&&u.type)return{name:i,error:u};if(u&&u.root&&u.root.type)return{name:`${i}.root`,error:u.root};a.pop()}return{name:n}}var bF=(e,t,n,r)=>{n(e);const{name:a,...i}=e;return Sr(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(c=>t[c]===(!r||zo.all))},wF=(e,t,n)=>!e||!t||e===t||Zu(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),SF=(e,t,n,r,a)=>a.isOnAll?!1:!n&&a.isOnTouch?!(t||e):(n?r.isOnBlur:a.isOnBlur)?!e:(n?r.isOnChange:a.isOnChange)?e:!0,EF=(e,t)=>!Fb(Me(e,t)).length&&kn(e,t),RF=(e,t,n)=>{const r=Zu(Me(e,n));return Bt(r,"root",t[n]),Bt(e,n,r),e};function zT(e,t,n="validate"){if(to(e)||Array.isArray(e)&&e.every(to)||Qr(e)&&!e)return{type:n,message:to(e)?e:"",ref:t}}var Mc=e=>Ln(e)&&!Yp(e)?e:{value:e,message:""},VT=async(e,t,n,r,a,i)=>{const{ref:c,refs:u,required:d,maxLength:f,minLength:m,min:p,max:g,pattern:y,validate:w,name:S,valueAsNumber:b,mount:E}=e._f,R=Me(n,S);if(!E||t.has(S))return{};const T=u?u[0]:c,O=G=>{a&&T.reportValidity&&(T.setCustomValidity(Qr(G)?"":G||""),T.reportValidity())},C={},I=Yb(c),N=wd(c),P=I||N,$=(b||Kb(c))&&un(c.value)&&un(R)||Kp(c)&&c.value===""||R===""||Array.isArray(R)&&!R.length,W=Wb.bind(null,S,r,C),V=(G,U,J,le=ja.maxLength,F=ja.minLength)=>{const Y=G?U:J;C[S]={type:G?le:F,message:Y,ref:c,...W(G?le:F,Y)}};if(i?!Array.isArray(R)||!R.length:d&&(!P&&($||jr(R))||Qr(R)&&!R||N&&!ON(u).isValid||I&&!AN(u).isValid)){const{value:G,message:U}=to(d)?{value:!!d,message:d}:Mc(d);if(G&&(C[S]={type:ja.required,message:U,ref:T,...W(ja.required,U)},!r))return O(U),C}if(!$&&(!jr(p)||!jr(g))){let G,U;const J=Mc(g),le=Mc(p);if(!jr(R)&&!isNaN(R)){const F=c.valueAsNumber||R&&+R;jr(J.value)||(G=F>J.value),jr(le.value)||(U=F<le.value)}else{const F=c.valueAsDate||new Date(R),Y=K=>new Date(new Date().toDateString()+" "+K),ie=c.type=="time",fe=c.type=="week";to(J.value)&&R&&(G=ie?Y(R)>Y(J.value):fe?R>J.value:F>new Date(J.value)),to(le.value)&&R&&(U=ie?Y(R)<Y(le.value):fe?R<le.value:F<new Date(le.value))}if((G||U)&&(V(!!G,J.message,le.message,ja.max,ja.min),!r))return O(C[S].message),C}if((f||m)&&!$&&(to(R)||i&&Array.isArray(R))){const G=Mc(f),U=Mc(m),J=!jr(G.value)&&R.length>+G.value,le=!jr(U.value)&&R.length<+U.value;if((J||le)&&(V(J,G.message,U.message),!r))return O(C[S].message),C}if(y&&!$&&to(R)){const{value:G,message:U}=Mc(y);if(Yp(G)&&!R.match(G)&&(C[S]={type:ja.pattern,message:U,ref:c,...W(ja.pattern,U)},!r))return O(U),C}if(w){if(Er(w)){const G=await w(R,n),U=zT(G,T);if(U&&(C[S]={...U,...W(ja.validate,U.message)},!r))return O(U.message),C}else if(Ln(w)){let G={};for(const U in w){if(!Sr(G)&&!r)break;const J=zT(await w[U](R,n),T,U);J&&(G={...J,...W(U,J.message)},O(J.message),r&&(C[S]=G))}if(!Sr(G)&&(C[S]={ref:T,...G},!r))return C}}return O(!0),C};const xF={mode:zo.onSubmit,reValidateMode:zo.onChange,shouldFocusError:!0};function TF(e={}){let t={...xF,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Er(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},a=Ln(t.defaultValues)||Ln(t.values)?Nn(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:Nn(a),c={action:!1,mount:!1,watch:!1,keepIsValid:!1},u={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={...m};let g={...p};const y={array:NT(),state:NT()},w=t.criteriaMode===zo.all,S=Z=>te=>{clearTimeout(f),f=setTimeout(Z,te)},b=async Z=>{if(!c.keepIsValid&&!t.disabled&&(p.isValid||g.isValid||Z)){let te;t.resolver?(te=Sr((await P()).errors),E()):te=await W(r,!0),te!==n.isValid&&y.state.next({isValid:te})}},E=(Z,te)=>{!t.disabled&&(p.isValidating||p.validatingFields||g.isValidating||g.validatingFields)&&((Z||Array.from(u.mount)).forEach(oe=>{oe&&(te?Bt(n.validatingFields,oe,te):kn(n.validatingFields,oe))}),y.state.next({validatingFields:n.validatingFields,isValidating:!Sr(n.validatingFields)}))},R=(Z,te=[],oe,Se,xe=!0,Re=!0)=>{if(Se&&oe&&!t.disabled){if(c.action=!0,Re&&Array.isArray(Me(r,Z))){const ke=oe(Me(r,Z),Se.argA,Se.argB);xe&&Bt(r,Z,ke)}if(Re&&Array.isArray(Me(n.errors,Z))){const ke=oe(Me(n.errors,Z),Se.argA,Se.argB);xe&&Bt(n.errors,Z,ke),EF(n.errors,Z)}if((p.touchedFields||g.touchedFields)&&Re&&Array.isArray(Me(n.touchedFields,Z))){const ke=oe(Me(n.touchedFields,Z),Se.argA,Se.argB);xe&&Bt(n.touchedFields,Z,ke)}(p.dirtyFields||g.dirtyFields)&&(n.dirtyFields=qc(a,i)),y.state.next({name:Z,isDirty:G(Z,te),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Bt(i,Z,te)},T=(Z,te)=>{Bt(n.errors,Z,te),y.state.next({errors:n.errors})},O=Z=>{n.errors=Z,y.state.next({errors:n.errors,isValid:!1})},C=(Z,te,oe,Se)=>{const xe=Me(r,Z);if(xe){const Re=Me(i,Z,un(oe)?Me(a,Z):oe);un(Re)||Se&&Se.defaultChecked||te?Bt(i,Z,te?Re:DT(xe._f)):le(Z,Re),c.mount&&!c.action&&b()}},I=(Z,te,oe,Se,xe)=>{let Re=!1,ke=!1;const Je={name:Z};if(!t.disabled){if(!oe||Se){(p.isDirty||g.isDirty)&&(ke=n.isDirty,n.isDirty=Je.isDirty=G(),Re=ke!==Je.isDirty);const at=Vo(Me(a,Z),te);ke=!!Me(n.dirtyFields,Z),at?kn(n.dirtyFields,Z):Bt(n.dirtyFields,Z,!0),Je.dirtyFields=n.dirtyFields,Re=Re||(p.dirtyFields||g.dirtyFields)&&ke!==!at}if(oe){const at=Me(n.touchedFields,Z);at||(Bt(n.touchedFields,Z,oe),Je.touchedFields=n.touchedFields,Re=Re||(p.touchedFields||g.touchedFields)&&at!==oe)}Re&&xe&&y.state.next(Je)}return Re?Je:{}},N=(Z,te,oe,Se)=>{const xe=Me(n.errors,Z),Re=(p.isValid||g.isValid)&&Qr(te)&&n.isValid!==te;if(t.delayError&&oe?(d=S(()=>T(Z,oe)),d(t.delayError)):(clearTimeout(f),d=null,oe?Bt(n.errors,Z,oe):kn(n.errors,Z)),(oe?!Vo(xe,oe):xe)||!Sr(Se)||Re){const ke={...Se,...Re&&Qr(te)?{isValid:te}:{},errors:n.errors,name:Z};n={...n,...ke},y.state.next(ke)}},P=async Z=>(E(Z,!0),await t.resolver(i,t.context,vF(Z||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),$=async Z=>{const{errors:te}=await P(Z);if(E(Z),Z)for(const oe of Z){const Se=Me(te,oe);Se?Bt(n.errors,oe,Se):kn(n.errors,oe)}else n.errors=te;return te},W=async(Z,te,oe={valid:!0})=>{for(const Se in Z){const xe=Z[Se];if(xe){const{_f:Re,...ke}=xe;if(Re){const Je=u.array.has(Re.name),at=xe._f&&yF(xe._f);at&&p.validatingFields&&E([Re.name],!0);const kt=await VT(xe,u.disabled,i,w,t.shouldUseNativeValidation&&!te,Je);if(at&&p.validatingFields&&E([Re.name]),kt[Re.name]&&(oe.valid=!1,te||e.shouldUseNativeValidation))break;!te&&(Me(kt,Re.name)?Je?RF(n.errors,kt,Re.name):Bt(n.errors,Re.name,kt[Re.name]):kn(n.errors,Re.name))}!Sr(ke)&&await W(ke,te,oe)}}return oe.valid},V=()=>{for(const Z of u.unMount){const te=Me(r,Z);te&&(te._f.refs?te._f.refs.every(oe=>!e0(oe)):!e0(te._f.ref))&&ve(Z)}u.unMount=new Set},G=(Z,te)=>!t.disabled&&(Z&&te&&Bt(i,Z,te),!Vo(D(),a)),U=(Z,te,oe)=>v_(Z,u,{...c.mount?i:un(te)?a:to(Z)?{[Z]:te}:te},oe,te),J=Z=>Fb(Me(c.mount?i:a,Z,t.shouldUnregister?Me(a,Z,[]):[])),le=(Z,te,oe={})=>{const Se=Me(r,Z);let xe=te;if(Se){const Re=Se._f;Re&&(!Re.disabled&&Bt(i,Z,CN(te,Re)),xe=Kp(Re.ref)&&jr(te)?"":te,xN(Re.ref)?[...Re.ref.options].forEach(ke=>ke.selected=xe.includes(ke.value)):Re.refs?wd(Re.ref)?Re.refs.forEach(ke=>{(!ke.defaultChecked||!ke.disabled)&&(Array.isArray(xe)?ke.checked=!!xe.find(Je=>Je===ke.value):ke.checked=xe===ke.value||!!xe)}):Re.refs.forEach(ke=>ke.checked=ke.value===xe):Kb(Re.ref)?Re.ref.value="":(Re.ref.value=xe,Re.ref.type||y.state.next({name:Z,values:Nn(i)})))}(oe.shouldDirty||oe.shouldTouch)&&I(Z,xe,oe.shouldTouch,oe.shouldDirty,!0),oe.shouldValidate&&K(Z)},F=(Z,te,oe)=>{for(const Se in te){if(!te.hasOwnProperty(Se))return;const xe=te[Se],Re=Z+"."+Se,ke=Me(r,Re);(u.array.has(Z)||Ln(xe)||ke&&!ke._f)&&!Ii(xe)?F(Re,xe,oe):le(Re,xe,oe)}},Y=(Z,te,oe={})=>{const Se=Me(r,Z),xe=u.array.has(Z),Re=Nn(te);Bt(i,Z,Re),xe?(y.array.next({name:Z,values:Nn(i)}),(p.isDirty||p.dirtyFields||g.isDirty||g.dirtyFields)&&oe.shouldDirty&&y.state.next({name:Z,dirtyFields:qc(a,i),isDirty:G(Z,Re)})):Se&&!Se._f&&!jr(Re)?F(Z,Re,oe):le(Z,Re,oe),$T(Z,u)?y.state.next({...n,name:Z,values:Nn(i)}):y.state.next({name:c.mount?Z:void 0,values:Nn(i)})},ie=async Z=>{c.mount=!0;const te=Z.target;let oe=te.name,Se=!0;const xe=Me(r,oe),Re=at=>{Se=Number.isNaN(at)||Ii(at)&&isNaN(at.getTime())||Vo(at,Me(i,oe,at))},ke=LT(t.mode),Je=LT(t.reValidateMode);if(xe){let at,kt;const dr=te.type?DT(xe._f):bN(Z),nn=Z.type===Wp.BLUR||Z.type===Wp.FOCUS_OUT,Rn=!_F(xe._f)&&!t.resolver&&!Me(n.errors,oe)&&!xe._f.deps||SF(nn,Me(n.touchedFields,oe),n.isSubmitted,Je,ke),rn=$T(oe,u,nn);Bt(i,oe,dr),nn?(!te||!te.readOnly)&&(xe._f.onBlur&&xe._f.onBlur(Z),d&&d(0)):xe._f.onChange&&xe._f.onChange(Z);const jn=I(oe,dr,nn),xn=!Sr(jn)||rn;if(!nn&&y.state.next({name:oe,type:Z.type,values:Nn(i)}),Rn)return(p.isValid||g.isValid)&&(t.mode==="onBlur"?nn&&b():nn||b()),xn&&y.state.next({name:oe,...rn?{}:jn});if(!nn&&rn&&y.state.next({...n}),t.resolver){const{errors:Qa}=await P([oe]);if(E([oe]),Re(dr),Se){const va=UT(n.errors,r,oe),qe=UT(Qa,r,va.name||oe);at=qe.error,oe=qe.name,kt=Sr(Qa)}}else E([oe],!0),at=(await VT(xe,u.disabled,i,w,t.shouldUseNativeValidation))[oe],E([oe]),Re(dr),Se&&(at?kt=!1:(p.isValid||g.isValid)&&(kt=await W(r,!0)));Se&&(xe._f.deps&&(!Array.isArray(xe._f.deps)||xe._f.deps.length>0)&&K(xe._f.deps),N(oe,kt,at,jn))}},fe=(Z,te)=>{if(Me(n.errors,te)&&Z.focus)return Z.focus(),1},K=async(Z,te={})=>{let oe,Se;const xe=Zu(Z);if(t.resolver){const Re=await $(un(Z)?Z:xe);oe=Sr(Re),Se=Z?!xe.some(ke=>Me(Re,ke)):oe}else Z?(Se=(await Promise.all(xe.map(async Re=>{const ke=Me(r,Re);return await W(ke&&ke._f?{[Re]:ke}:ke)}))).every(Boolean),!(!Se&&!n.isValid)&&b()):Se=oe=await W(r);return y.state.next({...!to(Z)||(p.isValid||g.isValid)&&oe!==n.isValid?{}:{name:Z},...t.resolver||!Z?{isValid:oe}:{},errors:n.errors}),te.shouldFocus&&!Se&&Wu(r,fe,Z?xe:u.mount),Se},D=(Z,te)=>{let oe={...c.mount?i:a};return te&&(oe=RN(te.dirtyFields?n.dirtyFields:n.touchedFields,oe)),un(Z)?oe:to(Z)?Me(oe,Z):Z.map(Se=>Me(oe,Se))},q=(Z,te)=>({invalid:!!Me((te||n).errors,Z),isDirty:!!Me((te||n).dirtyFields,Z),error:Me((te||n).errors,Z),isValidating:!!Me(n.validatingFields,Z),isTouched:!!Me((te||n).touchedFields,Z)}),B=Z=>{const te=Z?Zu(Z):void 0;te?.forEach(oe=>kn(n.errors,oe)),te?te.forEach(oe=>{y.state.next({name:oe,errors:n.errors})}):y.state.next({errors:{}})},L=(Z,te,oe)=>{const Se=(Me(r,Z,{_f:{}})._f||{}).ref,xe=Me(n.errors,Z)||{},{ref:Re,message:ke,type:Je,...at}=xe;Bt(n.errors,Z,{...at,...te,ref:Se}),y.state.next({name:Z,errors:n.errors,isValid:!1}),oe&&oe.shouldFocus&&Se&&Se.focus&&Se.focus()},z=(Z,te)=>Er(Z)?y.state.subscribe({next:oe=>"values"in oe&&Z(U(void 0,te),oe)}):U(Z,te,!0),Q=Z=>y.state.subscribe({next:te=>{wF(Z.name,te.name,Z.exact)&&bF(te,Z.formState||p,Xe,Z.reRenderRoot)&&Z.callback({values:{...i},...n,...te,defaultValues:a})}}).unsubscribe,me=Z=>(c.mount=!0,g={...g,...Z.formState},Q({...Z,formState:{...m,...Z.formState}})),ve=(Z,te={})=>{for(const oe of Z?Zu(Z):u.mount)u.mount.delete(oe),u.array.delete(oe),te.keepValue||(kn(r,oe),kn(i,oe)),!te.keepError&&kn(n.errors,oe),!te.keepDirty&&kn(n.dirtyFields,oe),!te.keepTouched&&kn(n.touchedFields,oe),!te.keepIsValidating&&kn(n.validatingFields,oe),!t.shouldUnregister&&!te.keepDefaultValue&&kn(a,oe);y.state.next({values:Nn(i)}),y.state.next({...n,...te.keepDirty?{isDirty:G()}:{}}),!te.keepIsValid&&b()},Ce=({disabled:Z,name:te})=>{if(Qr(Z)&&c.mount||Z||u.disabled.has(te)){const xe=u.disabled.has(te)!==!!Z;Z?u.disabled.add(te):u.disabled.delete(te),xe&&c.mount&&!c.action&&b()}},Ie=(Z,te={})=>{let oe=Me(r,Z);const Se=Qr(te.disabled)||Qr(t.disabled);return Bt(r,Z,{...oe||{},_f:{...oe&&oe._f?oe._f:{ref:{name:Z}},name:Z,mount:!0,...te}}),u.mount.add(Z),oe?Ce({disabled:Qr(te.disabled)?te.disabled:t.disabled,name:Z}):C(Z,!0,te.value),{...Se?{disabled:te.disabled||t.disabled}:{},...t.progressive?{required:!!te.required,min:Ru(te.min),max:Ru(te.max),minLength:Ru(te.minLength),maxLength:Ru(te.maxLength),pattern:Ru(te.pattern)}:{},name:Z,onChange:ie,onBlur:ie,ref:xe=>{if(xe){Ie(Z,te),oe=Me(r,Z);const Re=un(xe.value)&&xe.querySelectorAll&&xe.querySelectorAll("input,select,textarea")[0]||xe,ke=hF(Re),Je=oe._f.refs||[];if(ke?Je.find(at=>at===Re):Re===oe._f.ref)return;Bt(r,Z,{_f:{...oe._f,...ke?{refs:[...Je.filter(e0),Re,...Array.isArray(Me(a,Z))?[{}]:[]],ref:{type:Re.type,name:Z}}:{ref:Re}}}),C(Z,!1,void 0,Re)}else oe=Me(r,Z,{}),oe._f&&(oe._f.mount=!1),(t.shouldUnregister||te.shouldUnregister)&&!(wN(u.array,Z)&&c.action)&&u.unMount.add(Z)}}},H=()=>t.shouldFocusError&&Wu(r,fe,u.mount),re=Z=>{Qr(Z)&&(y.state.next({disabled:Z}),Wu(r,(te,oe)=>{const Se=Me(r,oe);Se&&(te.disabled=Se._f.disabled||Z,Array.isArray(Se._f.refs)&&Se._f.refs.forEach(xe=>{xe.disabled=Se._f.disabled||Z}))},0,!1))},be=(Z,te)=>async oe=>{let Se;oe&&(oe.preventDefault&&oe.preventDefault(),oe.persist&&oe.persist());let xe=Nn(i);if(y.state.next({isSubmitting:!0}),t.resolver){const{errors:Re,values:ke}=await P();E(),n.errors=Re,xe=Nn(ke)}else await W(r);if(u.disabled.size)for(const Re of u.disabled)kn(xe,Re);if(kn(n.errors,"root"),Sr(n.errors)){y.state.next({errors:{}});try{await Z(xe,oe)}catch(Re){Se=Re}}else te&&await te({...n.errors},oe),H(),setTimeout(H);if(y.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Sr(n.errors)&&!Se,submitCount:n.submitCount+1,errors:n.errors}),Se)throw Se},se=(Z,te={})=>{Me(r,Z)&&(un(te.defaultValue)?Y(Z,Nn(Me(a,Z))):(Y(Z,te.defaultValue),Bt(a,Z,Nn(te.defaultValue))),te.keepTouched||kn(n.touchedFields,Z),te.keepDirty||(kn(n.dirtyFields,Z),n.isDirty=te.defaultValue?G(Z,Nn(Me(a,Z))):G()),te.keepError||(kn(n.errors,Z),p.isValid&&b()),y.state.next({...n}))},ue=(Z,te={})=>{const oe=Z?Nn(Z):a,Se=Nn(oe),xe=Sr(Z),Re=xe?a:Se;if(te.keepDefaultValues||(a=oe),!te.keepValues){if(te.keepDirtyValues){const ke=new Set([...u.mount,...Object.keys(qc(a,i))]);for(const Je of Array.from(ke)){const at=Me(n.dirtyFields,Je),kt=Me(i,Je),dr=Me(Re,Je);at&&!un(kt)?Bt(Re,Je,kt):!at&&!un(dr)&&Y(Je,dr)}}else{if(Vb&&un(Z))for(const ke of u.mount){const Je=Me(r,ke);if(Je&&Je._f){const at=Array.isArray(Je._f.refs)?Je._f.refs[0]:Je._f.ref;if(Kp(at)){const kt=at.closest("form");if(kt){kt.reset();break}}}}if(te.keepFieldsRef)for(const ke of u.mount)Y(ke,Me(Re,ke));else r={}}i=t.shouldUnregister?te.keepDefaultValues?Nn(a):{}:Nn(Re),y.array.next({values:{...Re}}),y.state.next({values:{...Re}})}u={mount:te.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},c.mount=!p.isValid||!!te.keepIsValid||!!te.keepDirtyValues||!t.shouldUnregister&&!Sr(Re),c.watch=!!t.shouldUnregister,c.keepIsValid=!!te.keepIsValid,c.action=!1,te.keepErrors||(n.errors={}),y.state.next({submitCount:te.keepSubmitCount?n.submitCount:0,isDirty:xe?!1:te.keepDirty?n.isDirty:!!(te.keepDefaultValues&&!Vo(Z,a)),isSubmitted:te.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:xe?{}:te.keepDirtyValues?te.keepDefaultValues&&i?qc(a,i):n.dirtyFields:te.keepDefaultValues&&Z?qc(a,Z):te.keepDirty?n.dirtyFields:{},touchedFields:te.keepTouched?n.touchedFields:{},errors:te.keepErrors?n.errors:{},isSubmitSuccessful:te.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:a})},Oe=(Z,te)=>ue(Er(Z)?Z(i):Z,{...t.resetOptions,...te}),Le=(Z,te={})=>{const oe=Me(r,Z),Se=oe&&oe._f;if(Se){const xe=Se.refs?Se.refs[0]:Se.ref;xe.focus&&setTimeout(()=>{xe.focus(),te.shouldSelect&&Er(xe.select)&&xe.select()})}},Xe=Z=>{n={...n,...Z}},Ke={control:{register:Ie,unregister:ve,getFieldState:q,handleSubmit:be,setError:L,_subscribe:Q,_runSchema:P,_updateIsValidating:E,_focusError:H,_getWatch:U,_getDirty:G,_setValid:b,_setFieldArray:R,_setDisabledField:Ce,_setErrors:O,_getFieldArray:J,_reset:ue,_resetDefaultValues:()=>Er(t.defaultValues)&&t.defaultValues().then(Z=>{Oe(Z,t.resetOptions),y.state.next({isLoading:!1})}),_removeUnmounted:V,_disableForm:re,_subjects:y,_proxyFormState:p,get _fields(){return r},get _formValues(){return i},get _state(){return c},set _state(Z){c=Z},get _defaultValues(){return a},get _names(){return u},set _names(Z){u=Z},get _formState(){return n},get _options(){return t},set _options(Z){t={...t,...Z}}},subscribe:me,trigger:K,register:Ie,handleSubmit:be,watch:z,setValue:Y,getValues:D,reset:Oe,resetField:se,clearErrors:B,unregister:ve,setError:L,setFocus:Le,getFieldState:q};return{...Ke,formControl:Ke}}function fa(e={}){const t=ee.useRef(void 0),n=ee.useRef(void 0),[r,a]=ee.useState({isDirty:!1,isValidating:!1,isLoading:Er(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Er(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Er(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:c,...u}=TF(e);t.current={...u,formState:r}}const i=t.current.control;return i._options=e,Gb(()=>{const c=i._subscribe({formState:i._proxyFormState,callback:()=>a({...i._formState}),reRenderRoot:!0});return a(u=>({...u,isReady:!0})),i._formState.isReady=!0,c},[i]),ee.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),ee.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),ee.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),ee.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),ee.useEffect(()=>{if(i._proxyFormState.isDirty){const c=i._getDirty();c!==r.isDirty&&i._subjects.state.next({isDirty:c})}},[i,r.isDirty]),ee.useEffect(()=>{var c;e.values&&!Vo(e.values,n.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((c=i._options.resetOptions)===null||c===void 0)&&c.keepIsValid||i._setValid(),n.current=e.values,a(u=>({...u}))):i._resetDefaultValues()},[i,e.values]),ee.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=ee.useMemo(()=>SN(r,i),[i,r]),t.current}function FT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Sd(...e){return t=>{let n=!1;const r=e.map(a=>{const i=FT(a,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let a=0;a<r.length;a++){const i=r[a];typeof i=="function"?i():FT(e[a],null)}}}}function Bn(...e){return A.useCallback(Sd(...e),e)}var OF=Symbol.for("react.lazy"),Qp=gb[" use ".trim().toString()];function CF(e){return typeof e=="object"&&e!==null&&"then"in e}function IN(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===OF&&"_payload"in e&&CF(e._payload)}function NN(e){const t=AF(e),n=A.forwardRef((r,a)=>{let{children:i,...c}=r;IN(i)&&typeof Qp=="function"&&(i=Qp(i._payload));const u=A.Children.toArray(i),d=u.find(NF);if(d){const f=d.props.children,m=u.map(p=>p===d?A.Children.count(f)>1?A.Children.only(null):A.isValidElement(f)?f.props.children:null:p);return x.jsx(t,{...c,ref:a,children:A.isValidElement(f)?A.cloneElement(f,void 0,m):null})}return x.jsx(t,{...c,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}var kN=NN("Slot");function AF(e){const t=A.forwardRef((n,r)=>{let{children:a,...i}=n;if(IN(a)&&typeof Qp=="function"&&(a=Qp(a._payload)),A.isValidElement(a)){const c=MF(a),u=kF(i,a.props);return a.type!==A.Fragment&&(u.ref=r?Sd(r,c):c),A.cloneElement(a,u)}return A.Children.count(a)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var IF=Symbol("radix.slottable");function NF(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===IF}function kF(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...u)=>{const d=i(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function MF(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const BT=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,qT=FA,PF=(e,t)=>n=>{var r;if(t?.variants==null)return qT(e,n?.class,n?.className);const{variants:a,defaultVariants:i}=t,c=Object.keys(a).map(f=>{const m=n?.[f],p=i?.[f];if(m===null)return null;const g=BT(m)||BT(p);return a[f][g]}),u=n&&Object.entries(n).reduce((f,m)=>{let[p,g]=m;return g===void 0||(f[p]=g),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,m)=>{let{class:p,className:g,...y}=m;return Object.entries(y).every(w=>{let[S,b]=w;return Array.isArray(b)?b.includes({...i,...u}[S]):{...i,...u}[S]===b})?[...f,p,g]:f},[]);return qT(e,c,d,n?.class,n?.className)},HT=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Me(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},b_=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?HT(r.ref,n,e):r&&r.refs&&r.refs.forEach(a=>HT(a,n,e))}},GT=(e,t)=>{t.shouldUseNativeValidation&&b_(e,t);const n={};for(const r in e){const a=Me(t.fields,r),i=Object.assign(e[r]||{},{ref:a&&a.ref});if(DF(t.names||Object.keys(e),r)){const c=Object.assign({},Me(n,r));Bt(c,"root",i),Bt(n,r,c)}else Bt(n,r,i)}return n},DF=(e,t)=>{const n=ZT(t);return e.some(r=>ZT(r).match(`^${n}\\.\\d+`))};function ZT(e){return e.replace(/\]|\[/g,"")}function WT(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function LF(e,t){for(var n={};e.length;){var r=e[0],a=r.code,i=r.message,c=r.path.join(".");if(!n[c])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];n[c]={message:u.message,type:u.code}}else n[c]={message:i,type:a};if("unionErrors"in r&&r.unionErrors.forEach(function(m){return m.errors.forEach(function(p){return e.push(p)})}),t){var d=n[c].types,f=d&&d[r.code];n[c]=Wb(c,t,n,a,f?[].concat(f,r.message):r.message)}e.shift()}return n}function jF(e,t){for(var n={};e.length;){var r=e[0],a=r.code,i=r.message,c=r.path.join(".");if(!n[c])if(r.code==="invalid_union"&&r.errors.length>0){var u=r.errors[0][0];n[c]={message:u.message,type:u.code}}else n[c]={message:i,type:a};if(r.code==="invalid_union"&&r.errors.forEach(function(m){return m.forEach(function(p){return e.push(p)})}),t){var d=n[c].types,f=d&&d[r.code];n[c]=Wb(c,t,n,a,f?[].concat(f,r.message):r.message)}e.shift()}return n}function ha(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,a,i){try{return Promise.resolve(WT(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(c){return i.shouldUseNativeValidation&&b_({},i),{errors:{},values:n.raw?Object.assign({},r):c}})},function(c){if((function(u){return Array.isArray(u?.issues)})(c))return{values:{},errors:GT(LF(c.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw c}))}catch(c){return Promise.reject(c)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,a,i){try{return Promise.resolve(WT(function(){return Promise.resolve((n.mode==="sync"?n8:r8)(e,r,t)).then(function(c){return i.shouldUseNativeValidation&&b_({},i),{errors:{},values:n.raw?Object.assign({},r):c}})},function(c){if((function(u){return u instanceof Pb})(c))return{values:{},errors:GT(jF(c.issues,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw c}))}catch(c){return Promise.reject(c)}};throw new Error("Invalid input: not a Zod schema")}function lt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e?.(a),n===!1||!a.defaultPrevented)return t?.(a)}}function $F(e,t){const n=A.createContext(t),r=i=>{const{children:c,...u}=i,d=A.useMemo(()=>u,Object.values(u));return x.jsx(n.Provider,{value:d,children:c})};r.displayName=e+"Provider";function a(i){const c=A.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,a]}function Hi(e,t=[]){let n=[];function r(i,c){const u=A.createContext(c),d=n.length;n=[...n,c];const f=p=>{const{scope:g,children:y,...w}=p,S=g?.[e]?.[d]||u,b=A.useMemo(()=>w,Object.values(w));return x.jsx(S.Provider,{value:b,children:y})};f.displayName=i+"Provider";function m(p,g){const y=g?.[e]?.[d]||u,w=A.useContext(y);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[f,m]}const a=()=>{const i=n.map(c=>A.createContext(c));return function(u){const d=u?.[e]||i;return A.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,UF(a,...t)]}function UF(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const c=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(i)[`__scope${f}`];return{...u,...p}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var qo=globalThis?.document?A.useLayoutEffect:()=>{},zF=gb[" useId ".trim().toString()]||(()=>{}),VF=0;function Us(e){const[t,n]=A.useState(zF());return qo(()=>{n(r=>r??String(VF++))},[e]),e||(t?`radix-${t}`:"")}var FF=gb[" useInsertionEffect ".trim().toString()]||qo;function Ed({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,i,c]=BF({defaultProp:t,onChange:n}),u=e!==void 0,d=u?e:a;{const m=A.useRef(e!==void 0);A.useEffect(()=>{const p=m.current;p!==u&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=u},[u,r])}const f=A.useCallback(m=>{if(u){const p=qF(m)?m(e):m;p!==e&&c.current?.(p)}else i(m)},[u,e,i,c]);return[d,f]}function BF({defaultProp:e,onChange:t}){const[n,r]=A.useState(e),a=A.useRef(n),i=A.useRef(t);return FF(()=>{i.current=t},[t]),A.useEffect(()=>{a.current!==n&&(i.current?.(n),a.current=n)},[n,a]),[n,r,i]}function qF(e){return typeof e=="function"}function id(e){const t=HF(e),n=A.forwardRef((r,a)=>{const{children:i,...c}=r,u=A.Children.toArray(i),d=u.find(GF);if(d){const f=d.props.children,m=u.map(p=>p===d?A.Children.count(f)>1?A.Children.only(null):A.isValidElement(f)?f.props.children:null:p);return x.jsx(t,{...c,ref:a,children:A.isValidElement(f)?A.cloneElement(f,void 0,m):null})}return x.jsx(t,{...c,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function HF(e){const t=A.forwardRef((n,r)=>{const{children:a,...i}=n;if(A.isValidElement(a)){const c=WF(a),u=ZF(i,a.props);return a.type!==A.Fragment&&(u.ref=r?Sd(r,c):c),A.cloneElement(a,u)}return A.Children.count(a)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var MN=Symbol("radix.slottable");function Zoe(e){const t=({children:n})=>x.jsx(x.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=MN,t}function GF(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===MN}function ZF(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...u)=>{const d=i(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function WF(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var KF=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pn=KF.reduce((e,t)=>{const n=id(`Primitive.${t}`),r=A.forwardRef((a,i)=>{const{asChild:c,...u}=a,d=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(d,{...u,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function PN(e,t){e&&Nm.flushSync(()=>e.dispatchEvent(t))}function Ho(e){const t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>(...n)=>t.current?.(...n),[])}function YF(e,t=globalThis?.document){const n=Ho(e);A.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var QF="DismissableLayer",w_="dismissableLayer.update",XF="dismissableLayer.pointerDownOutside",JF="dismissableLayer.focusOutside",KT,DN=A.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qb=A.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:c,onDismiss:u,...d}=e,f=A.useContext(DN),[m,p]=A.useState(null),g=m?.ownerDocument??globalThis?.document,[,y]=A.useState({}),w=Bn(t,N=>p(N)),S=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),E=S.indexOf(b),R=m?S.indexOf(m):-1,T=f.layersWithOutsidePointerEventsDisabled.size>0,O=R>=E,C=nB(N=>{const P=N.target,$=[...f.branches].some(W=>W.contains(P));!O||$||(a?.(N),c?.(N),N.defaultPrevented||u?.())},g),I=rB(N=>{const P=N.target;[...f.branches].some(W=>W.contains(P))||(i?.(N),c?.(N),N.defaultPrevented||u?.())},g);return YF(N=>{R===f.layers.size-1&&(r?.(N),!N.defaultPrevented&&u&&(N.preventDefault(),u()))},g),A.useEffect(()=>{if(m)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(KT=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),YT(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=KT)}},[m,g,n,f]),A.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),YT())},[m,f]),A.useEffect(()=>{const N=()=>y({});return document.addEventListener(w_,N),()=>document.removeEventListener(w_,N)},[]),x.jsx(pn.div,{...d,ref:w,style:{pointerEvents:T?O?"auto":"none":void 0,...e.style},onFocusCapture:lt(e.onFocusCapture,I.onFocusCapture),onBlurCapture:lt(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:lt(e.onPointerDownCapture,C.onPointerDownCapture)})});Qb.displayName=QF;var eB="DismissableLayerBranch",tB=A.forwardRef((e,t)=>{const n=A.useContext(DN),r=A.useRef(null),a=Bn(t,r);return A.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx(pn.div,{...e,ref:a})});tB.displayName=eB;function nB(e,t=globalThis?.document){const n=Ho(e),r=A.useRef(!1),a=A.useRef(()=>{});return A.useEffect(()=>{const i=u=>{if(u.target&&!r.current){let d=function(){LN(XF,n,f,{discrete:!0})};const f={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=d,t.addEventListener("click",a.current,{once:!0})):d()}else t.removeEventListener("click",a.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function rB(e,t=globalThis?.document){const n=Ho(e),r=A.useRef(!1);return A.useEffect(()=>{const a=i=>{i.target&&!r.current&&LN(JF,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function YT(){const e=new CustomEvent(w_);document.dispatchEvent(e)}function LN(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?PN(a,i):a.dispatchEvent(i)}var t0="focusScope.autoFocusOnMount",n0="focusScope.autoFocusOnUnmount",QT={bubbles:!1,cancelable:!0},oB="FocusScope",Xb=A.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...c}=e,[u,d]=A.useState(null),f=Ho(a),m=Ho(i),p=A.useRef(null),g=Bn(t,S=>d(S)),y=A.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;A.useEffect(()=>{if(r){let S=function(T){if(y.paused||!u)return;const O=T.target;u.contains(O)?p.current=O:Cs(p.current,{select:!0})},b=function(T){if(y.paused||!u)return;const O=T.relatedTarget;O!==null&&(u.contains(O)||Cs(p.current,{select:!0}))},E=function(T){if(document.activeElement===document.body)for(const C of T)C.removedNodes.length>0&&Cs(u)};document.addEventListener("focusin",S),document.addEventListener("focusout",b);const R=new MutationObserver(E);return u&&R.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",b),R.disconnect()}}},[r,u,y.paused]),A.useEffect(()=>{if(u){JT.add(y);const S=document.activeElement;if(!u.contains(S)){const E=new CustomEvent(t0,QT);u.addEventListener(t0,f),u.dispatchEvent(E),E.defaultPrevented||(aB(uB(jN(u)),{select:!0}),document.activeElement===S&&Cs(u))}return()=>{u.removeEventListener(t0,f),setTimeout(()=>{const E=new CustomEvent(n0,QT);u.addEventListener(n0,m),u.dispatchEvent(E),E.defaultPrevented||Cs(S??document.body,{select:!0}),u.removeEventListener(n0,m),JT.remove(y)},0)}}},[u,f,m,y]);const w=A.useCallback(S=>{if(!n&&!r||y.paused)return;const b=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,E=document.activeElement;if(b&&E){const R=S.currentTarget,[T,O]=sB(R);T&&O?!S.shiftKey&&E===O?(S.preventDefault(),n&&Cs(T,{select:!0})):S.shiftKey&&E===T&&(S.preventDefault(),n&&Cs(O,{select:!0})):E===R&&S.preventDefault()}},[n,r,y.paused]);return x.jsx(pn.div,{tabIndex:-1,...c,ref:g,onKeyDown:w})});Xb.displayName=oB;function aB(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Cs(r,{select:t}),document.activeElement!==n)return}function sB(e){const t=jN(e),n=XT(t,e),r=XT(t.reverse(),e);return[n,r]}function jN(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function XT(e,t){for(const n of e)if(!iB(n,{upTo:t}))return n}function iB(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function cB(e){return e instanceof HTMLInputElement&&"select"in e}function Cs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&cB(e)&&t&&e.select()}}var JT=lB();function lB(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=eO(e,t),e.unshift(t)},remove(t){e=eO(e,t),e[0]?.resume()}}}function eO(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function uB(e){return e.filter(t=>t.tagName!=="A")}var dB="Portal",Jb=A.forwardRef((e,t)=>{const{container:n,...r}=e,[a,i]=A.useState(!1);qo(()=>i(!0),[]);const c=n||a&&globalThis?.document?.body;return c?TA.createPortal(x.jsx(pn.div,{...r,ref:t}),c):null});Jb.displayName=dB;function fB(e,t){return A.useReducer((n,r)=>t[n][r]??n,e)}var Ya=e=>{const{present:t,children:n}=e,r=hB(t),a=typeof n=="function"?n({present:r.isPresent}):A.Children.only(n),i=Bn(r.ref,pB(a));return typeof n=="function"||r.isPresent?A.cloneElement(a,{ref:i}):null};Ya.displayName="Presence";function hB(e){const[t,n]=A.useState(),r=A.useRef(null),a=A.useRef(e),i=A.useRef("none"),c=e?"mounted":"unmounted",[u,d]=fB(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return A.useEffect(()=>{const f=hh(r.current);i.current=u==="mounted"?f:"none"},[u]),qo(()=>{const f=r.current,m=a.current;if(m!==e){const g=i.current,y=hh(f);e?d("MOUNT"):y==="none"||f?.display==="none"?d("UNMOUNT"):d(m&&g!==y?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,d]),qo(()=>{if(t){let f;const m=t.ownerDocument.defaultView??window,p=y=>{const S=hh(r.current).includes(CSS.escape(y.animationName));if(y.target===t&&S&&(d("ANIMATION_END"),!a.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",f=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},g=y=>{y.target===t&&(i.current=hh(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{m.clearTimeout(f),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:A.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function hh(e){return e?.animationName||"none"}function pB(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var r0=0;function $N(){A.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??tO()),document.body.insertAdjacentElement("beforeend",e[1]??tO()),r0++,()=>{r0===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),r0--}},[])}function tO(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var sa=function(){return sa=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},sa.apply(this,arguments)};function UN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function mB(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,i;r<a;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var bp="right-scroll-bar-position",wp="width-before-scroll-bar",gB="with-scroll-bars-hidden",vB="--removed-body-scroll-bar-size";function o0(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function yB(e,t){var n=A.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var _B=typeof window<"u"?A.useLayoutEffect:A.useEffect,nO=new WeakMap;function bB(e,t){var n=yB(null,function(r){return e.forEach(function(a){return o0(a,r)})});return _B(function(){var r=nO.get(n);if(r){var a=new Set(r),i=new Set(e),c=n.current;a.forEach(function(u){i.has(u)||o0(u,null)}),i.forEach(function(u){a.has(u)||o0(u,c)})}nO.set(n,e)},[e]),n}function wB(e){return e}function SB(e,t){t===void 0&&(t=wB);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var c=t(i,r);return n.push(c),function(){n=n.filter(function(u){return u!==c})}},assignSyncMedium:function(i){for(r=!0;n.length;){var c=n;n=[],c.forEach(i)}n={push:function(u){return i(u)},filter:function(){return n}}},assignMedium:function(i){r=!0;var c=[];if(n.length){var u=n;n=[],u.forEach(i),c=n}var d=function(){var m=c;c=[],m.forEach(i)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(m){c.push(m),f()},filter:function(m){return c=c.filter(m),n}}}};return a}function EB(e){e===void 0&&(e={});var t=SB(null);return t.options=sa({async:!0,ssr:!1},e),t}var zN=function(e){var t=e.sideCar,n=UN(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return A.createElement(r,sa({},n))};zN.isSideCarExport=!0;function RB(e,t){return e.useMedium(t),zN}var VN=EB(),a0=function(){},Bm=A.forwardRef(function(e,t){var n=A.useRef(null),r=A.useState({onScrollCapture:a0,onWheelCapture:a0,onTouchMoveCapture:a0}),a=r[0],i=r[1],c=e.forwardProps,u=e.children,d=e.className,f=e.removeScrollBar,m=e.enabled,p=e.shards,g=e.sideCar,y=e.noRelative,w=e.noIsolation,S=e.inert,b=e.allowPinchZoom,E=e.as,R=E===void 0?"div":E,T=e.gapMode,O=UN(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=g,I=bB([n,t]),N=sa(sa({},O),a);return A.createElement(A.Fragment,null,m&&A.createElement(C,{sideCar:VN,removeScrollBar:f,shards:p,noRelative:y,noIsolation:w,inert:S,setCallbacks:i,allowPinchZoom:!!b,lockRef:n,gapMode:T}),c?A.cloneElement(A.Children.only(u),sa(sa({},N),{ref:I})):A.createElement(R,sa({},N,{className:d,ref:I}),u))});Bm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Bm.classNames={fullWidth:wp,zeroRight:bp};var xB=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function TB(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=xB();return t&&e.setAttribute("nonce",t),e}function OB(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function CB(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var AB=function(){var e=0,t=null;return{add:function(n){e==0&&(t=TB())&&(OB(t,n),CB(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},IB=function(){var e=AB();return function(t,n){A.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},FN=function(){var e=IB(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},NB={left:0,top:0,right:0,gap:0},s0=function(e){return parseInt(e||"",10)||0},kB=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[s0(n),s0(r),s0(a)]},MB=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return NB;var t=kB(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},PB=FN(),ol="data-scroll-locked",DB=function(e,t,n,r){var a=e.left,i=e.top,c=e.right,u=e.gap;return n===void 0&&(n="margin"),`
62
- .`.concat(gB,` {
63
- overflow: hidden `).concat(r,`;
64
- padding-right: `).concat(u,"px ").concat(r,`;
65
- }
66
- body[`).concat(ol,`] {
67
- overflow: hidden `).concat(r,`;
68
- overscroll-behavior: contain;
69
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
70
- padding-left: `.concat(a,`px;
71
- padding-top: `).concat(i,`px;
72
- padding-right: `).concat(c,`px;
73
- margin-left:0;
74
- margin-top:0;
75
- margin-right: `).concat(u,"px ").concat(r,`;
76
- `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
77
- }
78
-
79
- .`).concat(bp,` {
80
- right: `).concat(u,"px ").concat(r,`;
81
- }
82
-
83
- .`).concat(wp,` {
84
- margin-right: `).concat(u,"px ").concat(r,`;
85
- }
86
-
87
- .`).concat(bp," .").concat(bp,` {
88
- right: 0 `).concat(r,`;
89
- }
90
-
91
- .`).concat(wp," .").concat(wp,` {
92
- margin-right: 0 `).concat(r,`;
93
- }
94
-
95
- body[`).concat(ol,`] {
96
- `).concat(vB,": ").concat(u,`px;
97
- }
98
- `)},rO=function(){var e=parseInt(document.body.getAttribute(ol)||"0",10);return isFinite(e)?e:0},LB=function(){A.useEffect(function(){return document.body.setAttribute(ol,(rO()+1).toString()),function(){var e=rO()-1;e<=0?document.body.removeAttribute(ol):document.body.setAttribute(ol,e.toString())}},[])},jB=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;LB();var i=A.useMemo(function(){return MB(a)},[a]);return A.createElement(PB,{styles:DB(i,!t,a,n?"":"!important")})},S_=!1;if(typeof window<"u")try{var ph=Object.defineProperty({},"passive",{get:function(){return S_=!0,!0}});window.addEventListener("test",ph,ph),window.removeEventListener("test",ph,ph)}catch{S_=!1}var Pc=S_?{passive:!1}:!1,$B=function(e){return e.tagName==="TEXTAREA"},BN=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!$B(e)&&n[t]==="visible")},UB=function(e){return BN(e,"overflowY")},zB=function(e){return BN(e,"overflowX")},oO=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=qN(e,r);if(a){var i=HN(e,r),c=i[1],u=i[2];if(c>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},VB=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},FB=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},qN=function(e,t){return e==="v"?UB(t):zB(t)},HN=function(e,t){return e==="v"?VB(t):FB(t)},BB=function(e,t){return e==="h"&&t==="rtl"?-1:1},qB=function(e,t,n,r,a){var i=BB(e,window.getComputedStyle(t).direction),c=i*r,u=n.target,d=t.contains(u),f=!1,m=c>0,p=0,g=0;do{if(!u)break;var y=HN(e,u),w=y[0],S=y[1],b=y[2],E=S-b-i*w;(w||E)&&qN(e,u)&&(p+=E,g+=w);var R=u.parentNode;u=R&&R.nodeType===Node.DOCUMENT_FRAGMENT_NODE?R.host:R}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(m&&Math.abs(p)<1||!m&&Math.abs(g)<1)&&(f=!0),f},mh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},aO=function(e){return[e.deltaX,e.deltaY]},sO=function(e){return e&&"current"in e?e.current:e},HB=function(e,t){return e[0]===t[0]&&e[1]===t[1]},GB=function(e){return`
99
- .block-interactivity-`.concat(e,` {pointer-events: none;}
100
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
101
- `)},ZB=0,Dc=[];function WB(e){var t=A.useRef([]),n=A.useRef([0,0]),r=A.useRef(),a=A.useState(ZB++)[0],i=A.useState(FN)[0],c=A.useRef(e);A.useEffect(function(){c.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var S=mB([e.lockRef.current],(e.shards||[]).map(sO),!0).filter(Boolean);return S.forEach(function(b){return b.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),S.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var u=A.useCallback(function(S,b){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!c.current.allowPinchZoom;var E=mh(S),R=n.current,T="deltaX"in S?S.deltaX:R[0]-E[0],O="deltaY"in S?S.deltaY:R[1]-E[1],C,I=S.target,N=Math.abs(T)>Math.abs(O)?"h":"v";if("touches"in S&&N==="h"&&I.type==="range")return!1;var P=window.getSelection(),$=P&&P.anchorNode,W=$?$===I||$.contains(I):!1;if(W)return!1;var V=oO(N,I);if(!V)return!0;if(V?C=N:(C=N==="v"?"h":"v",V=oO(N,I)),!V)return!1;if(!r.current&&"changedTouches"in S&&(T||O)&&(r.current=C),!C)return!0;var G=r.current||C;return qB(G,b,S,G==="h"?T:O)},[]),d=A.useCallback(function(S){var b=S;if(!(!Dc.length||Dc[Dc.length-1]!==i)){var E="deltaY"in b?aO(b):mh(b),R=t.current.filter(function(C){return C.name===b.type&&(C.target===b.target||b.target===C.shadowParent)&&HB(C.delta,E)})[0];if(R&&R.should){b.cancelable&&b.preventDefault();return}if(!R){var T=(c.current.shards||[]).map(sO).filter(Boolean).filter(function(C){return C.contains(b.target)}),O=T.length>0?u(b,T[0]):!c.current.noIsolation;O&&b.cancelable&&b.preventDefault()}}},[]),f=A.useCallback(function(S,b,E,R){var T={name:S,delta:b,target:E,should:R,shadowParent:KB(E)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(O){return O!==T})},1)},[]),m=A.useCallback(function(S){n.current=mh(S),r.current=void 0},[]),p=A.useCallback(function(S){f(S.type,aO(S),S.target,u(S,e.lockRef.current))},[]),g=A.useCallback(function(S){f(S.type,mh(S),S.target,u(S,e.lockRef.current))},[]);A.useEffect(function(){return Dc.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",d,Pc),document.addEventListener("touchmove",d,Pc),document.addEventListener("touchstart",m,Pc),function(){Dc=Dc.filter(function(S){return S!==i}),document.removeEventListener("wheel",d,Pc),document.removeEventListener("touchmove",d,Pc),document.removeEventListener("touchstart",m,Pc)}},[]);var y=e.removeScrollBar,w=e.inert;return A.createElement(A.Fragment,null,w?A.createElement(i,{styles:GB(a)}):null,y?A.createElement(jB,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function KB(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const YB=RB(VN,WB);var e1=A.forwardRef(function(e,t){return A.createElement(Bm,sa({},e,{ref:t,sideCar:YB}))});e1.classNames=Bm.classNames;var QB=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Lc=new WeakMap,gh=new WeakMap,vh={},i0=0,GN=function(e){return e&&(e.host||GN(e.parentNode))},XB=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=GN(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},JB=function(e,t,n,r){var a=XB(t,Array.isArray(e)?e:[e]);vh[n]||(vh[n]=new WeakMap);var i=vh[n],c=[],u=new Set,d=new Set(a),f=function(p){!p||u.has(p)||(u.add(p),f(p.parentNode))};a.forEach(f);var m=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(g){if(u.has(g))m(g);else try{var y=g.getAttribute(r),w=y!==null&&y!=="false",S=(Lc.get(g)||0)+1,b=(i.get(g)||0)+1;Lc.set(g,S),i.set(g,b),c.push(g),S===1&&w&&gh.set(g,!0),b===1&&g.setAttribute(n,"true"),w||g.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",g,E)}})};return m(t),u.clear(),i0++,function(){c.forEach(function(p){var g=Lc.get(p)-1,y=i.get(p)-1;Lc.set(p,g),i.set(p,y),g||(gh.has(p)||p.removeAttribute(r),gh.delete(p)),y||p.removeAttribute(n)}),i0--,i0||(Lc=new WeakMap,Lc=new WeakMap,gh=new WeakMap,vh={})}},ZN=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=QB(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),JB(r,a,n,"aria-hidden")):function(){return null}},qm="Dialog",[WN,Woe]=Hi(qm),[eq,Wo]=WN(qm),KN=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:c=!0}=e,u=A.useRef(null),d=A.useRef(null),[f,m]=Ed({prop:r,defaultProp:a??!1,onChange:i,caller:qm});return x.jsx(eq,{scope:t,triggerRef:u,contentRef:d,contentId:Us(),titleId:Us(),descriptionId:Us(),open:f,onOpenChange:m,onOpenToggle:A.useCallback(()=>m(p=>!p),[m]),modal:c,children:n})};KN.displayName=qm;var YN="DialogTrigger",QN=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Wo(YN,n),i=Bn(t,a.triggerRef);return x.jsx(pn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":r1(a.open),...r,ref:i,onClick:lt(e.onClick,a.onOpenToggle)})});QN.displayName=YN;var t1="DialogPortal",[tq,XN]=WN(t1,{forceMount:void 0}),JN=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,i=Wo(t1,t);return x.jsx(tq,{scope:t,forceMount:n,children:A.Children.map(r,c=>x.jsx(Ya,{present:n||i.open,children:x.jsx(Jb,{asChild:!0,container:a,children:c})}))})};JN.displayName=t1;var Xp="DialogOverlay",ek=A.forwardRef((e,t)=>{const n=XN(Xp,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=Wo(Xp,e.__scopeDialog);return i.modal?x.jsx(Ya,{present:r||i.open,children:x.jsx(rq,{...a,ref:t})}):null});ek.displayName=Xp;var nq=id("DialogOverlay.RemoveScroll"),rq=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Wo(Xp,n);return x.jsx(e1,{as:nq,allowPinchZoom:!0,shards:[a.contentRef],children:x.jsx(pn.div,{"data-state":r1(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ui="DialogContent",tk=A.forwardRef((e,t)=>{const n=XN(Ui,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=Wo(Ui,e.__scopeDialog);return x.jsx(Ya,{present:r||i.open,children:i.modal?x.jsx(oq,{...a,ref:t}):x.jsx(aq,{...a,ref:t})})});tk.displayName=Ui;var oq=A.forwardRef((e,t)=>{const n=Wo(Ui,e.__scopeDialog),r=A.useRef(null),a=Bn(t,n.contentRef,r);return A.useEffect(()=>{const i=r.current;if(i)return ZN(i)},[]),x.jsx(nk,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:lt(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:lt(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0;(c.button===2||u)&&i.preventDefault()}),onFocusOutside:lt(e.onFocusOutside,i=>i.preventDefault())})}),aq=A.forwardRef((e,t)=>{const n=Wo(Ui,e.__scopeDialog),r=A.useRef(!1),a=A.useRef(!1);return x.jsx(nk,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const c=i.target;n.triggerRef.current?.contains(c)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),nk=A.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,...c}=e,u=Wo(Ui,n),d=A.useRef(null),f=Bn(t,d);return $N(),x.jsxs(x.Fragment,{children:[x.jsx(Xb,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:x.jsx(Qb,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":r1(u.open),...c,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),x.jsxs(x.Fragment,{children:[x.jsx(sq,{titleId:u.titleId}),x.jsx(cq,{contentRef:d,descriptionId:u.descriptionId})]})]})}),n1="DialogTitle",rk=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Wo(n1,n);return x.jsx(pn.h2,{id:a.titleId,...r,ref:t})});rk.displayName=n1;var ok="DialogDescription",ak=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Wo(ok,n);return x.jsx(pn.p,{id:a.descriptionId,...r,ref:t})});ak.displayName=ok;var sk="DialogClose",ik=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Wo(sk,n);return x.jsx(pn.button,{type:"button",...r,ref:t,onClick:lt(e.onClick,()=>a.onOpenChange(!1))})});ik.displayName=sk;function r1(e){return e?"open":"closed"}var ck="DialogTitleWarning",[Koe,lk]=$F(ck,{contentName:Ui,titleName:n1,docsSlug:"dialog"}),sq=({titleId:e})=>{const t=lk(ck),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
102
-
103
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
104
-
105
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return A.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},iq="DialogDescriptionWarning",cq=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lk(iq).contentName}}.`;return A.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},lq=KN,uq=QN,dq=JN,fq=ek,hq=tk,pq=rk,Yoe=ak,Qoe=ik;function uk(e){const t=e+"CollectionProvider",[n,r]=Hi(t),[a,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=S=>{const{scope:b,children:E}=S,R=ee.useRef(null),T=ee.useRef(new Map).current;return x.jsx(a,{scope:b,itemMap:T,collectionRef:R,children:E})};c.displayName=t;const u=e+"CollectionSlot",d=id(u),f=ee.forwardRef((S,b)=>{const{scope:E,children:R}=S,T=i(u,E),O=Bn(b,T.collectionRef);return x.jsx(d,{ref:O,children:R})});f.displayName=u;const m=e+"CollectionItemSlot",p="data-radix-collection-item",g=id(m),y=ee.forwardRef((S,b)=>{const{scope:E,children:R,...T}=S,O=ee.useRef(null),C=Bn(b,O),I=i(m,E);return ee.useEffect(()=>(I.itemMap.set(O,{ref:O,...T}),()=>{I.itemMap.delete(O)})),x.jsx(g,{[p]:"",ref:C,children:R})});y.displayName=m;function w(S){const b=i(e+"CollectionConsumer",S);return ee.useCallback(()=>{const R=b.collectionRef.current;if(!R)return[];const T=Array.from(R.querySelectorAll(`[${p}]`));return Array.from(b.itemMap.values()).sort((I,N)=>T.indexOf(I.ref.current)-T.indexOf(N.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:c,Slot:f,ItemSlot:y},w,r]}var mq=A.createContext(void 0);function dk(e){const t=A.useContext(mq);return e||t||"ltr"}const gq=["top","right","bottom","left"],qs=Math.min,Jr=Math.max,Jp=Math.round,yh=Math.floor,ca=e=>({x:e,y:e}),vq={left:"right",right:"left",bottom:"top",top:"bottom"},yq={start:"end",end:"start"};function E_(e,t,n){return Jr(e,qs(t,n))}function qa(e,t){return typeof e=="function"?e(t):e}function Ha(e){return e.split("-")[0]}function Rl(e){return e.split("-")[1]}function o1(e){return e==="x"?"y":"x"}function a1(e){return e==="y"?"height":"width"}const _q=new Set(["top","bottom"]);function ia(e){return _q.has(Ha(e))?"y":"x"}function s1(e){return o1(ia(e))}function bq(e,t,n){n===void 0&&(n=!1);const r=Rl(e),a=s1(e),i=a1(a);let c=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(c=em(c)),[c,em(c)]}function wq(e){const t=em(e);return[R_(e),t,R_(t)]}function R_(e){return e.replace(/start|end/g,t=>yq[t])}const iO=["left","right"],cO=["right","left"],Sq=["top","bottom"],Eq=["bottom","top"];function Rq(e,t,n){switch(e){case"top":case"bottom":return n?t?cO:iO:t?iO:cO;case"left":case"right":return t?Sq:Eq;default:return[]}}function xq(e,t,n,r){const a=Rl(e);let i=Rq(Ha(e),n==="start",r);return a&&(i=i.map(c=>c+"-"+a),t&&(i=i.concat(i.map(R_)))),i}function em(e){return e.replace(/left|right|bottom|top/g,t=>vq[t])}function Tq(e){return{top:0,right:0,bottom:0,left:0,...e}}function fk(e){return typeof e!="number"?Tq(e):{top:e,right:e,bottom:e,left:e}}function tm(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function lO(e,t,n){let{reference:r,floating:a}=e;const i=ia(t),c=s1(t),u=a1(c),d=Ha(t),f=i==="y",m=r.x+r.width/2-a.width/2,p=r.y+r.height/2-a.height/2,g=r[u]/2-a[u]/2;let y;switch(d){case"top":y={x:m,y:r.y-a.height};break;case"bottom":y={x:m,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-a.width,y:p};break;default:y={x:r.x,y:r.y}}switch(Rl(t)){case"start":y[c]-=g*(n&&f?-1:1);break;case"end":y[c]+=g*(n&&f?-1:1);break}return y}async function Oq(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:i,rects:c,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:g=!1,padding:y=0}=qa(t,e),w=fk(y),b=u[g?p==="floating"?"reference":"floating":p],E=tm(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(u.floating)),boundary:f,rootBoundary:m,strategy:d})),R=p==="floating"?{x:r,y:a,width:c.floating.width,height:c.floating.height}:c.reference,T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u.floating)),O=await(i.isElement==null?void 0:i.isElement(T))?await(i.getScale==null?void 0:i.getScale(T))||{x:1,y:1}:{x:1,y:1},C=tm(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:R,offsetParent:T,strategy:d}):R);return{top:(E.top-C.top+w.top)/O.y,bottom:(C.bottom-E.bottom+w.bottom)/O.y,left:(E.left-C.left+w.left)/O.x,right:(C.right-E.right+w.right)/O.x}}const Cq=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:c}=n,u=i.filter(Boolean),d=await(c.isRTL==null?void 0:c.isRTL(t));let f=await c.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:p}=lO(f,r,d),g=r,y={},w=0;for(let b=0;b<u.length;b++){var S;const{name:E,fn:R}=u[b],{x:T,y:O,data:C,reset:I}=await R({x:m,y:p,initialPlacement:r,placement:g,strategy:a,middlewareData:y,rects:f,platform:{...c,detectOverflow:(S=c.detectOverflow)!=null?S:Oq},elements:{reference:e,floating:t}});m=T??m,p=O??p,y={...y,[E]:{...y[E],...C}},I&&w<=50&&(w++,typeof I=="object"&&(I.placement&&(g=I.placement),I.rects&&(f=I.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:a}):I.rects),{x:m,y:p}=lO(f,g,d)),b=-1)}return{x:m,y:p,placement:g,strategy:a,middlewareData:y}},Aq=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:i,platform:c,elements:u,middlewareData:d}=t,{element:f,padding:m=0}=qa(e,t)||{};if(f==null)return{};const p=fk(m),g={x:n,y:r},y=s1(a),w=a1(y),S=await c.getDimensions(f),b=y==="y",E=b?"top":"left",R=b?"bottom":"right",T=b?"clientHeight":"clientWidth",O=i.reference[w]+i.reference[y]-g[y]-i.floating[w],C=g[y]-i.reference[y],I=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f));let N=I?I[T]:0;(!N||!await(c.isElement==null?void 0:c.isElement(I)))&&(N=u.floating[T]||i.floating[w]);const P=O/2-C/2,$=N/2-S[w]/2-1,W=qs(p[E],$),V=qs(p[R],$),G=W,U=N-S[w]-V,J=N/2-S[w]/2+P,le=E_(G,J,U),F=!d.arrow&&Rl(a)!=null&&J!==le&&i.reference[w]/2-(J<G?W:V)-S[w]/2<0,Y=F?J<G?J-G:J-U:0;return{[y]:g[y]+Y,data:{[y]:le,centerOffset:J-le-Y,...F&&{alignmentOffset:Y}},reset:F}}}),Iq=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:i,rects:c,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...b}=qa(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const E=Ha(a),R=ia(u),T=Ha(u)===u,O=await(d.isRTL==null?void 0:d.isRTL(f.floating)),C=g||(T||!S?[em(u)]:wq(u)),I=w!=="none";!g&&I&&C.push(...xq(u,S,w,O));const N=[u,...C],P=await d.detectOverflow(t,b),$=[];let W=((r=i.flip)==null?void 0:r.overflows)||[];if(m&&$.push(P[E]),p){const J=bq(a,c,O);$.push(P[J[0]],P[J[1]])}if(W=[...W,{placement:a,overflows:$}],!$.every(J=>J<=0)){var V,G;const J=(((V=i.flip)==null?void 0:V.index)||0)+1,le=N[J];if(le&&(!(p==="alignment"?R!==ia(le):!1)||W.every(ie=>ia(ie.placement)===R?ie.overflows[0]>0:!0)))return{data:{index:J,overflows:W},reset:{placement:le}};let F=(G=W.filter(Y=>Y.overflows[0]<=0).sort((Y,ie)=>Y.overflows[1]-ie.overflows[1])[0])==null?void 0:G.placement;if(!F)switch(y){case"bestFit":{var U;const Y=(U=W.filter(ie=>{if(I){const fe=ia(ie.placement);return fe===R||fe==="y"}return!0}).map(ie=>[ie.placement,ie.overflows.filter(fe=>fe>0).reduce((fe,K)=>fe+K,0)]).sort((ie,fe)=>ie[1]-fe[1])[0])==null?void 0:U[0];Y&&(F=Y);break}case"initialPlacement":F=u;break}if(a!==F)return{reset:{placement:F}}}return{}}}};function uO(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function dO(e){return gq.some(t=>e[t]>=0)}const Nq=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...i}=qa(e,t);switch(a){case"referenceHidden":{const c=await r.detectOverflow(t,{...i,elementContext:"reference"}),u=uO(c,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:dO(u)}}}case"escaped":{const c=await r.detectOverflow(t,{...i,altBoundary:!0}),u=uO(c,n.floating);return{data:{escapedOffsets:u,escaped:dO(u)}}}default:return{}}}}},hk=new Set(["left","top"]);async function kq(e,t){const{placement:n,platform:r,elements:a}=e,i=await(r.isRTL==null?void 0:r.isRTL(a.floating)),c=Ha(n),u=Rl(n),d=ia(n)==="y",f=hk.has(c)?-1:1,m=i&&d?-1:1,p=qa(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof w=="number"&&(y=u==="end"?w*-1:w),d?{x:y*m,y:g*f}:{x:g*f,y:y*m}}const Mq=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:i,placement:c,middlewareData:u}=t,d=await kq(t,e);return c===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:a+d.x,y:i+d.y,data:{...d,placement:c}}}}},Pq=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:i}=t,{mainAxis:c=!0,crossAxis:u=!1,limiter:d={fn:E=>{let{x:R,y:T}=E;return{x:R,y:T}}},...f}=qa(e,t),m={x:n,y:r},p=await i.detectOverflow(t,f),g=ia(Ha(a)),y=o1(g);let w=m[y],S=m[g];if(c){const E=y==="y"?"top":"left",R=y==="y"?"bottom":"right",T=w+p[E],O=w-p[R];w=E_(T,w,O)}if(u){const E=g==="y"?"top":"left",R=g==="y"?"bottom":"right",T=S+p[E],O=S-p[R];S=E_(T,S,O)}const b=d.fn({...t,[y]:w,[g]:S});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[y]:c,[g]:u}}}}}},Dq=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:i,middlewareData:c}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=qa(e,t),m={x:n,y:r},p=ia(a),g=o1(p);let y=m[g],w=m[p];const S=qa(u,t),b=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const T=g==="y"?"height":"width",O=i.reference[g]-i.floating[T]+b.mainAxis,C=i.reference[g]+i.reference[T]-b.mainAxis;y<O?y=O:y>C&&(y=C)}if(f){var E,R;const T=g==="y"?"width":"height",O=hk.has(Ha(a)),C=i.reference[p]-i.floating[T]+(O&&((E=c.offset)==null?void 0:E[p])||0)+(O?0:b.crossAxis),I=i.reference[p]+i.reference[T]+(O?0:((R=c.offset)==null?void 0:R[p])||0)-(O?b.crossAxis:0);w<C?w=C:w>I&&(w=I)}return{[g]:y,[p]:w}}}},Lq=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:i,platform:c,elements:u}=t,{apply:d=()=>{},...f}=qa(e,t),m=await c.detectOverflow(t,f),p=Ha(a),g=Rl(a),y=ia(a)==="y",{width:w,height:S}=i.floating;let b,E;p==="top"||p==="bottom"?(b=p,E=g===(await(c.isRTL==null?void 0:c.isRTL(u.floating))?"start":"end")?"left":"right"):(E=p,b=g==="end"?"top":"bottom");const R=S-m.top-m.bottom,T=w-m.left-m.right,O=qs(S-m[b],R),C=qs(w-m[E],T),I=!t.middlewareData.shift;let N=O,P=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=T),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=R),I&&!g){const W=Jr(m.left,0),V=Jr(m.right,0),G=Jr(m.top,0),U=Jr(m.bottom,0);y?P=w-2*(W!==0||V!==0?W+V:Jr(m.left,m.right)):N=S-2*(G!==0||U!==0?G+U:Jr(m.top,m.bottom))}await d({...t,availableWidth:P,availableHeight:N});const $=await c.getDimensions(u.floating);return w!==$.width||S!==$.height?{reset:{rects:!0}}:{}}}};function Hm(){return typeof window<"u"}function xl(e){return pk(e)?(e.nodeName||"").toLowerCase():"#document"}function no(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pa(e){var t;return(t=(pk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pk(e){return Hm()?e instanceof Node||e instanceof no(e).Node:!1}function Go(e){return Hm()?e instanceof Element||e instanceof no(e).Element:!1}function da(e){return Hm()?e instanceof HTMLElement||e instanceof no(e).HTMLElement:!1}function fO(e){return!Hm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof no(e).ShadowRoot}const jq=new Set(["inline","contents"]);function Rd(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Zo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!jq.has(a)}const $q=new Set(["table","td","th"]);function Uq(e){return $q.has(xl(e))}const zq=[":popover-open",":modal"];function Gm(e){return zq.some(t=>{try{return e.matches(t)}catch{return!1}})}const Vq=["transform","translate","scale","rotate","perspective"],Fq=["transform","translate","scale","rotate","perspective","filter"],Bq=["paint","layout","strict","content"];function i1(e){const t=c1(),n=Go(e)?Zo(e):e;return Vq.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Fq.some(r=>(n.willChange||"").includes(r))||Bq.some(r=>(n.contain||"").includes(r))}function qq(e){let t=Hs(e);for(;da(t)&&!fl(t);){if(i1(t))return t;if(Gm(t))return null;t=Hs(t)}return null}function c1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Hq=new Set(["html","body","#document"]);function fl(e){return Hq.has(xl(e))}function Zo(e){return no(e).getComputedStyle(e)}function Zm(e){return Go(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hs(e){if(xl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fO(e)&&e.host||pa(e);return fO(t)?t.host:t}function mk(e){const t=Hs(e);return fl(t)?e.ownerDocument?e.ownerDocument.body:e.body:da(t)&&Rd(t)?t:mk(t)}function cd(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=mk(e),i=a===((r=e.ownerDocument)==null?void 0:r.body),c=no(a);if(i){const u=x_(c);return t.concat(c,c.visualViewport||[],Rd(a)?a:[],u&&n?cd(u):[])}return t.concat(a,cd(a,[],n))}function x_(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gk(e){const t=Zo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=da(e),i=a?e.offsetWidth:n,c=a?e.offsetHeight:r,u=Jp(n)!==i||Jp(r)!==c;return u&&(n=i,r=c),{width:n,height:r,$:u}}function l1(e){return Go(e)?e:e.contextElement}function al(e){const t=l1(e);if(!da(t))return ca(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:i}=gk(t);let c=(i?Jp(n.width):n.width)/r,u=(i?Jp(n.height):n.height)/a;return(!c||!Number.isFinite(c))&&(c=1),(!u||!Number.isFinite(u))&&(u=1),{x:c,y:u}}const Gq=ca(0);function vk(e){const t=no(e);return!c1()||!t.visualViewport?Gq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Zq(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==no(e)?!1:t}function zi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),i=l1(e);let c=ca(1);t&&(r?Go(r)&&(c=al(r)):c=al(e));const u=Zq(i,n,r)?vk(i):ca(0);let d=(a.left+u.x)/c.x,f=(a.top+u.y)/c.y,m=a.width/c.x,p=a.height/c.y;if(i){const g=no(i),y=r&&Go(r)?no(r):r;let w=g,S=x_(w);for(;S&&r&&y!==w;){const b=al(S),E=S.getBoundingClientRect(),R=Zo(S),T=E.left+(S.clientLeft+parseFloat(R.paddingLeft))*b.x,O=E.top+(S.clientTop+parseFloat(R.paddingTop))*b.y;d*=b.x,f*=b.y,m*=b.x,p*=b.y,d+=T,f+=O,w=no(S),S=x_(w)}}return tm({width:m,height:p,x:d,y:f})}function Wm(e,t){const n=Zm(e).scrollLeft;return t?t.left+n:zi(pa(e)).left+n}function yk(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Wm(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function Wq(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const i=a==="fixed",c=pa(r),u=t?Gm(t.floating):!1;if(r===c||u&&i)return n;let d={scrollLeft:0,scrollTop:0},f=ca(1);const m=ca(0),p=da(r);if((p||!p&&!i)&&((xl(r)!=="body"||Rd(c))&&(d=Zm(r)),da(r))){const y=zi(r);f=al(r),m.x=y.x+r.clientLeft,m.y=y.y+r.clientTop}const g=c&&!p&&!i?yk(c,d):ca(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+m.x+g.x,y:n.y*f.y-d.scrollTop*f.y+m.y+g.y}}function Kq(e){return Array.from(e.getClientRects())}function Yq(e){const t=pa(e),n=Zm(e),r=e.ownerDocument.body,a=Jr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Jr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let c=-n.scrollLeft+Wm(e);const u=-n.scrollTop;return Zo(r).direction==="rtl"&&(c+=Jr(t.clientWidth,r.clientWidth)-a),{width:a,height:i,x:c,y:u}}const hO=25;function Qq(e,t){const n=no(e),r=pa(e),a=n.visualViewport;let i=r.clientWidth,c=r.clientHeight,u=0,d=0;if(a){i=a.width,c=a.height;const m=c1();(!m||m&&t==="fixed")&&(u=a.offsetLeft,d=a.offsetTop)}const f=Wm(r);if(f<=0){const m=r.ownerDocument,p=m.body,g=getComputedStyle(p),y=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,w=Math.abs(r.clientWidth-p.clientWidth-y);w<=hO&&(i-=w)}else f<=hO&&(i+=f);return{width:i,height:c,x:u,y:d}}const Xq=new Set(["absolute","fixed"]);function Jq(e,t){const n=zi(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,i=da(e)?al(e):ca(1),c=e.clientWidth*i.x,u=e.clientHeight*i.y,d=a*i.x,f=r*i.y;return{width:c,height:u,x:d,y:f}}function pO(e,t,n){let r;if(t==="viewport")r=Qq(e,n);else if(t==="document")r=Yq(pa(e));else if(Go(t))r=Jq(t,n);else{const a=vk(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return tm(r)}function _k(e,t){const n=Hs(e);return n===t||!Go(n)||fl(n)?!1:Zo(n).position==="fixed"||_k(n,t)}function eH(e,t){const n=t.get(e);if(n)return n;let r=cd(e,[],!1).filter(u=>Go(u)&&xl(u)!=="body"),a=null;const i=Zo(e).position==="fixed";let c=i?Hs(e):e;for(;Go(c)&&!fl(c);){const u=Zo(c),d=i1(c);!d&&u.position==="fixed"&&(a=null),(i?!d&&!a:!d&&u.position==="static"&&!!a&&Xq.has(a.position)||Rd(c)&&!d&&_k(e,c))?r=r.filter(m=>m!==c):a=u,c=Hs(c)}return t.set(e,r),r}function tH(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const c=[...n==="clippingAncestors"?Gm(t)?[]:eH(t,this._c):[].concat(n),r],u=c[0],d=c.reduce((f,m)=>{const p=pO(t,m,a);return f.top=Jr(p.top,f.top),f.right=qs(p.right,f.right),f.bottom=qs(p.bottom,f.bottom),f.left=Jr(p.left,f.left),f},pO(t,u,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function nH(e){const{width:t,height:n}=gk(e);return{width:t,height:n}}function rH(e,t,n){const r=da(t),a=pa(t),i=n==="fixed",c=zi(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const d=ca(0);function f(){d.x=Wm(a)}if(r||!r&&!i)if((xl(t)!=="body"||Rd(a))&&(u=Zm(t)),r){const y=zi(t,!0,i,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else a&&f();i&&!r&&a&&f();const m=a&&!r&&!i?yk(a,u):ca(0),p=c.left+u.scrollLeft-d.x-m.x,g=c.top+u.scrollTop-d.y-m.y;return{x:p,y:g,width:c.width,height:c.height}}function c0(e){return Zo(e).position==="static"}function mO(e,t){if(!da(e)||Zo(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return pa(e)===n&&(n=n.ownerDocument.body),n}function bk(e,t){const n=no(e);if(Gm(e))return n;if(!da(e)){let a=Hs(e);for(;a&&!fl(a);){if(Go(a)&&!c0(a))return a;a=Hs(a)}return n}let r=mO(e,t);for(;r&&Uq(r)&&c0(r);)r=mO(r,t);return r&&fl(r)&&c0(r)&&!i1(r)?n:r||qq(e)||n}const oH=async function(e){const t=this.getOffsetParent||bk,n=this.getDimensions,r=await n(e.floating);return{reference:rH(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function aH(e){return Zo(e).direction==="rtl"}const sH={convertOffsetParentRelativeRectToViewportRelativeRect:Wq,getDocumentElement:pa,getClippingRect:tH,getOffsetParent:bk,getElementRects:oH,getClientRects:Kq,getDimensions:nH,getScale:al,isElement:Go,isRTL:aH};function wk(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function iH(e,t){let n=null,r;const a=pa(e);function i(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function c(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),i();const f=e.getBoundingClientRect(),{left:m,top:p,width:g,height:y}=f;if(u||t(),!g||!y)return;const w=yh(p),S=yh(a.clientWidth-(m+g)),b=yh(a.clientHeight-(p+y)),E=yh(m),T={rootMargin:-w+"px "+-S+"px "+-b+"px "+-E+"px",threshold:Jr(0,qs(1,d))||1};let O=!0;function C(I){const N=I[0].intersectionRatio;if(N!==d){if(!O)return c();N?c(!1,N):r=setTimeout(()=>{c(!1,1e-7)},1e3)}N===1&&!wk(f,e.getBoundingClientRect())&&c(),O=!1}try{n=new IntersectionObserver(C,{...T,root:a.ownerDocument})}catch{n=new IntersectionObserver(C,T)}n.observe(e)}return c(!0),i}function cH(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=l1(e),m=a||i?[...f?cd(f):[],...cd(t)]:[];m.forEach(E=>{a&&E.addEventListener("scroll",n,{passive:!0}),i&&E.addEventListener("resize",n)});const p=f&&u?iH(f,n):null;let g=-1,y=null;c&&(y=new ResizeObserver(E=>{let[R]=E;R&&R.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var T;(T=y)==null||T.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let w,S=d?zi(e):null;d&&b();function b(){const E=zi(e);S&&!wk(S,E)&&n(),S=E,w=requestAnimationFrame(b)}return n(),()=>{var E;m.forEach(R=>{a&&R.removeEventListener("scroll",n),i&&R.removeEventListener("resize",n)}),p?.(),(E=y)==null||E.disconnect(),y=null,d&&cancelAnimationFrame(w)}}const lH=Mq,uH=Pq,dH=Iq,fH=Lq,hH=Nq,gO=Aq,pH=Dq,mH=(e,t,n)=>{const r=new Map,a={platform:sH,...n},i={...a.platform,_c:r};return Cq(e,t,{...a,platform:i})};var gH=typeof document<"u",vH=function(){},Sp=gH?A.useLayoutEffect:vH;function nm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!nm(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const i=a[r];if(!(i==="_owner"&&e.$$typeof)&&!nm(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Sk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vO(e,t){const n=Sk(e);return Math.round(t*n)/n}function l0(e){const t=A.useRef(e);return Sp(()=>{t.current=e}),t}function yH(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:i,floating:c}={},transform:u=!0,whileElementsMounted:d,open:f}=e,[m,p]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=A.useState(r);nm(g,r)||y(r);const[w,S]=A.useState(null),[b,E]=A.useState(null),R=A.useCallback(ie=>{ie!==I.current&&(I.current=ie,S(ie))},[]),T=A.useCallback(ie=>{ie!==N.current&&(N.current=ie,E(ie))},[]),O=i||w,C=c||b,I=A.useRef(null),N=A.useRef(null),P=A.useRef(m),$=d!=null,W=l0(d),V=l0(a),G=l0(f),U=A.useCallback(()=>{if(!I.current||!N.current)return;const ie={placement:t,strategy:n,middleware:g};V.current&&(ie.platform=V.current),mH(I.current,N.current,ie).then(fe=>{const K={...fe,isPositioned:G.current!==!1};J.current&&!nm(P.current,K)&&(P.current=K,Nm.flushSync(()=>{p(K)}))})},[g,t,n,V,G]);Sp(()=>{f===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(ie=>({...ie,isPositioned:!1})))},[f]);const J=A.useRef(!1);Sp(()=>(J.current=!0,()=>{J.current=!1}),[]),Sp(()=>{if(O&&(I.current=O),C&&(N.current=C),O&&C){if(W.current)return W.current(O,C,U);U()}},[O,C,U,W,$]);const le=A.useMemo(()=>({reference:I,floating:N,setReference:R,setFloating:T}),[R,T]),F=A.useMemo(()=>({reference:O,floating:C}),[O,C]),Y=A.useMemo(()=>{const ie={position:n,left:0,top:0};if(!F.floating)return ie;const fe=vO(F.floating,m.x),K=vO(F.floating,m.y);return u?{...ie,transform:"translate("+fe+"px, "+K+"px)",...Sk(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:fe,top:K}},[n,u,F.floating,m.x,m.y]);return A.useMemo(()=>({...m,update:U,refs:le,elements:F,floatingStyles:Y}),[m,U,le,F,Y])}const _H=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?gO({element:r.current,padding:a}).fn(n):{}:r?gO({element:r,padding:a}).fn(n):{}}}},bH=(e,t)=>({...lH(e),options:[e,t]}),wH=(e,t)=>({...uH(e),options:[e,t]}),SH=(e,t)=>({...pH(e),options:[e,t]}),EH=(e,t)=>({...dH(e),options:[e,t]}),RH=(e,t)=>({...fH(e),options:[e,t]}),xH=(e,t)=>({...hH(e),options:[e,t]}),TH=(e,t)=>({..._H(e),options:[e,t]});var OH="Arrow",Ek=A.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...i}=e;return x.jsx(pn.svg,{...i,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ek.displayName=OH;var CH=Ek;function Rk(e){const[t,n]=A.useState(void 0);return qo(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let c,u;if("borderBoxSize"in i){const d=i.borderBoxSize,f=Array.isArray(d)?d[0]:d;c=f.inlineSize,u=f.blockSize}else c=e.offsetWidth,u=e.offsetHeight;n({width:c,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var u1="Popper",[xk,Tk]=Hi(u1),[AH,Ok]=xk(u1),Ck=e=>{const{__scopePopper:t,children:n}=e,[r,a]=A.useState(null);return x.jsx(AH,{scope:t,anchor:r,onAnchorChange:a,children:n})};Ck.displayName=u1;var Ak="PopperAnchor",Ik=A.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,i=Ok(Ak,n),c=A.useRef(null),u=Bn(t,c),d=A.useRef(null);return A.useEffect(()=>{const f=d.current;d.current=r?.current||c.current,f!==d.current&&i.onAnchorChange(d.current)}),r?null:x.jsx(pn.div,{...a,ref:u})});Ik.displayName=Ak;var d1="PopperContent",[IH,NH]=xk(d1),Nk=A.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:i="center",alignOffset:c=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:m=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:w,...S}=e,b=Ok(d1,n),[E,R]=A.useState(null),T=Bn(t,me=>R(me)),[O,C]=A.useState(null),I=Rk(O),N=I?.width??0,P=I?.height??0,$=r+(i!=="center"?"-"+i:""),W=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},V=Array.isArray(f)?f:[f],G=V.length>0,U={padding:W,boundary:V.filter(MH),altBoundary:G},{refs:J,floatingStyles:le,placement:F,isPositioned:Y,middlewareData:ie}=yH({strategy:"fixed",placement:$,whileElementsMounted:(...me)=>cH(...me,{animationFrame:y==="always"}),elements:{reference:b.anchor},middleware:[bH({mainAxis:a+P,alignmentAxis:c}),d&&wH({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?SH():void 0,...U}),d&&EH({...U}),RH({...U,apply:({elements:me,rects:ve,availableWidth:Ce,availableHeight:Ie})=>{const{width:H,height:re}=ve.reference,be=me.floating.style;be.setProperty("--radix-popper-available-width",`${Ce}px`),be.setProperty("--radix-popper-available-height",`${Ie}px`),be.setProperty("--radix-popper-anchor-width",`${H}px`),be.setProperty("--radix-popper-anchor-height",`${re}px`)}}),O&&TH({element:O,padding:u}),PH({arrowWidth:N,arrowHeight:P}),g&&xH({strategy:"referenceHidden",...U})]}),[fe,K]=Pk(F),D=Ho(w);qo(()=>{Y&&D?.()},[Y,D]);const q=ie.arrow?.x,B=ie.arrow?.y,L=ie.arrow?.centerOffset!==0,[z,Q]=A.useState();return qo(()=>{E&&Q(window.getComputedStyle(E).zIndex)},[E]),x.jsx("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...le,transform:Y?le.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[ie.transformOrigin?.x,ie.transformOrigin?.y].join(" "),...ie.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(IH,{scope:n,placedSide:fe,onArrowChange:C,arrowX:q,arrowY:B,shouldHideArrow:L,children:x.jsx(pn.div,{"data-side":fe,"data-align":K,...S,ref:T,style:{...S.style,animation:Y?void 0:"none"}})})})});Nk.displayName=d1;var kk="PopperArrow",kH={top:"bottom",right:"left",bottom:"top",left:"right"},Mk=A.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,i=NH(kk,r),c=kH[i.placedSide];return x.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:x.jsx(CH,{...a,ref:n,style:{...a.style,display:"block"}})})});Mk.displayName=kk;function MH(e){return e!==null}var PH=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:a}=t,c=a.arrow?.centerOffset!==0,u=c?0:e.arrowWidth,d=c?0:e.arrowHeight,[f,m]=Pk(n),p={start:"0%",center:"50%",end:"100%"}[m],g=(a.arrow?.x??0)+u/2,y=(a.arrow?.y??0)+d/2;let w="",S="";return f==="bottom"?(w=c?p:`${g}px`,S=`${-d}px`):f==="top"?(w=c?p:`${g}px`,S=`${r.floating.height+d}px`):f==="right"?(w=`${-d}px`,S=c?p:`${y}px`):f==="left"&&(w=`${r.floating.width+d}px`,S=c?p:`${y}px`),{data:{x:w,y:S}}}});function Pk(e){const[t,n="center"]=e.split("-");return[t,n]}var Dk=Ck,DH=Ik,LH=Nk,jH=Mk,u0="rovingFocusGroup.onEntryFocus",$H={bubbles:!1,cancelable:!0},xd="RovingFocusGroup",[T_,Lk,UH]=uk(xd),[zH,jk]=Hi(xd,[UH]),[VH,FH]=zH(xd),$k=A.forwardRef((e,t)=>x.jsx(T_.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsx(T_.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsx(BH,{...e,ref:t})})}));$k.displayName=xd;var BH=A.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:i,currentTabStopId:c,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:m=!1,...p}=e,g=A.useRef(null),y=Bn(t,g),w=dk(i),[S,b]=Ed({prop:c,defaultProp:u??null,onChange:d,caller:xd}),[E,R]=A.useState(!1),T=Ho(f),O=Lk(n),C=A.useRef(!1),[I,N]=A.useState(0);return A.useEffect(()=>{const P=g.current;if(P)return P.addEventListener(u0,T),()=>P.removeEventListener(u0,T)},[T]),x.jsx(VH,{scope:n,orientation:r,dir:w,loop:a,currentTabStopId:S,onItemFocus:A.useCallback(P=>b(P),[b]),onItemShiftTab:A.useCallback(()=>R(!0),[]),onFocusableItemAdd:A.useCallback(()=>N(P=>P+1),[]),onFocusableItemRemove:A.useCallback(()=>N(P=>P-1),[]),children:x.jsx(pn.div,{tabIndex:E||I===0?-1:0,"data-orientation":r,...p,ref:y,style:{outline:"none",...e.style},onMouseDown:lt(e.onMouseDown,()=>{C.current=!0}),onFocus:lt(e.onFocus,P=>{const $=!C.current;if(P.target===P.currentTarget&&$&&!E){const W=new CustomEvent(u0,$H);if(P.currentTarget.dispatchEvent(W),!W.defaultPrevented){const V=O().filter(F=>F.focusable),G=V.find(F=>F.active),U=V.find(F=>F.id===S),le=[G,U,...V].filter(Boolean).map(F=>F.ref.current);Vk(le,m)}}C.current=!1}),onBlur:lt(e.onBlur,()=>R(!1))})})}),Uk="RovingFocusGroupItem",zk=A.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:i,children:c,...u}=e,d=Us(),f=i||d,m=FH(Uk,n),p=m.currentTabStopId===f,g=Lk(n),{onFocusableItemAdd:y,onFocusableItemRemove:w,currentTabStopId:S}=m;return A.useEffect(()=>{if(r)return y(),()=>w()},[r,y,w]),x.jsx(T_.ItemSlot,{scope:n,id:f,focusable:r,active:a,children:x.jsx(pn.span,{tabIndex:p?0:-1,"data-orientation":m.orientation,...u,ref:t,onMouseDown:lt(e.onMouseDown,b=>{r?m.onItemFocus(f):b.preventDefault()}),onFocus:lt(e.onFocus,()=>m.onItemFocus(f)),onKeyDown:lt(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){m.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const E=GH(b,m.orientation,m.dir);if(E!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let T=g().filter(O=>O.focusable).map(O=>O.ref.current);if(E==="last")T.reverse();else if(E==="prev"||E==="next"){E==="prev"&&T.reverse();const O=T.indexOf(b.currentTarget);T=m.loop?ZH(T,O+1):T.slice(O+1)}setTimeout(()=>Vk(T))}}),children:typeof c=="function"?c({isCurrentTabStop:p,hasTabStop:S!=null}):c})})});zk.displayName=Uk;var qH={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function HH(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function GH(e,t,n){const r=HH(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return qH[r]}function Vk(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function ZH(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var WH=$k,KH=zk,O_=["Enter"," "],YH=["ArrowDown","PageUp","Home"],Fk=["ArrowUp","PageDown","End"],QH=[...YH,...Fk],XH={ltr:[...O_,"ArrowRight"],rtl:[...O_,"ArrowLeft"]},JH={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Td="Menu",[ld,eG,tG]=uk(Td),[Gi,Bk]=Hi(Td,[tG,Tk,jk]),Od=Tk(),qk=jk(),[Hk,Xs]=Gi(Td),[nG,Cd]=Gi(Td),Gk=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:i,modal:c=!0}=e,u=Od(t),[d,f]=A.useState(null),m=A.useRef(!1),p=Ho(i),g=dk(a);return A.useEffect(()=>{const y=()=>{m.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>m.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),x.jsx(Dk,{...u,children:x.jsx(Hk,{scope:t,open:n,onOpenChange:p,content:d,onContentChange:f,children:x.jsx(nG,{scope:t,onClose:A.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:m,dir:g,modal:c,children:r})})})};Gk.displayName=Td;var rG="MenuAnchor",f1=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=Od(n);return x.jsx(DH,{...a,...r,ref:t})});f1.displayName=rG;var h1="MenuPortal",[oG,Zk]=Gi(h1,{forceMount:void 0}),Wk=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,i=Xs(h1,t);return x.jsx(oG,{scope:t,forceMount:n,children:x.jsx(Ya,{present:n||i.open,children:x.jsx(Jb,{asChild:!0,container:a,children:r})})})};Wk.displayName=h1;var Eo="MenuContent",[aG,p1]=Gi(Eo),Kk=A.forwardRef((e,t)=>{const n=Zk(Eo,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=Xs(Eo,e.__scopeMenu),c=Cd(Eo,e.__scopeMenu);return x.jsx(ld.Provider,{scope:e.__scopeMenu,children:x.jsx(Ya,{present:r||i.open,children:x.jsx(ld.Slot,{scope:e.__scopeMenu,children:c.modal?x.jsx(sG,{...a,ref:t}):x.jsx(iG,{...a,ref:t})})})})}),sG=A.forwardRef((e,t)=>{const n=Xs(Eo,e.__scopeMenu),r=A.useRef(null),a=Bn(t,r);return A.useEffect(()=>{const i=r.current;if(i)return ZN(i)},[]),x.jsx(m1,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:lt(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),iG=A.forwardRef((e,t)=>{const n=Xs(Eo,e.__scopeMenu);return x.jsx(m1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),cG=id("MenuContent.ScrollLock"),m1=A.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:y,disableOutsideScroll:w,...S}=e,b=Xs(Eo,n),E=Cd(Eo,n),R=Od(n),T=qk(n),O=eG(n),[C,I]=A.useState(null),N=A.useRef(null),P=Bn(t,N,b.onContentChange),$=A.useRef(0),W=A.useRef(""),V=A.useRef(0),G=A.useRef(null),U=A.useRef("right"),J=A.useRef(0),le=w?e1:A.Fragment,F=w?{as:cG,allowPinchZoom:!0}:void 0,Y=fe=>{const K=W.current+fe,D=O().filter(me=>!me.disabled),q=document.activeElement,B=D.find(me=>me.ref.current===q)?.textValue,L=D.map(me=>me.textValue),z=bG(L,K,B),Q=D.find(me=>me.textValue===z)?.ref.current;(function me(ve){W.current=ve,window.clearTimeout($.current),ve!==""&&($.current=window.setTimeout(()=>me(""),1e3))})(K),Q&&setTimeout(()=>Q.focus())};A.useEffect(()=>()=>window.clearTimeout($.current),[]),$N();const ie=A.useCallback(fe=>U.current===G.current?.side&&SG(fe,G.current?.area),[]);return x.jsx(aG,{scope:n,searchRef:W,onItemEnter:A.useCallback(fe=>{ie(fe)&&fe.preventDefault()},[ie]),onItemLeave:A.useCallback(fe=>{ie(fe)||(N.current?.focus(),I(null))},[ie]),onTriggerLeave:A.useCallback(fe=>{ie(fe)&&fe.preventDefault()},[ie]),pointerGraceTimerRef:V,onPointerGraceIntentChange:A.useCallback(fe=>{G.current=fe},[]),children:x.jsx(le,{...F,children:x.jsx(Xb,{asChild:!0,trapped:a,onMountAutoFocus:lt(i,fe=>{fe.preventDefault(),N.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:x.jsx(Qb,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:y,children:x.jsx(WH,{asChild:!0,...T,dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:I,onEntryFocus:lt(d,fe=>{E.isUsingKeyboardRef.current||fe.preventDefault()}),preventScrollOnEntryFocus:!0,children:x.jsx(LH,{role:"menu","aria-orientation":"vertical","data-state":f4(b.open),"data-radix-menu-content":"",dir:E.dir,...R,...S,ref:P,style:{outline:"none",...S.style},onKeyDown:lt(S.onKeyDown,fe=>{const D=fe.target.closest("[data-radix-menu-content]")===fe.currentTarget,q=fe.ctrlKey||fe.altKey||fe.metaKey,B=fe.key.length===1;D&&(fe.key==="Tab"&&fe.preventDefault(),!q&&B&&Y(fe.key));const L=N.current;if(fe.target!==L||!QH.includes(fe.key))return;fe.preventDefault();const Q=O().filter(me=>!me.disabled).map(me=>me.ref.current);Fk.includes(fe.key)&&Q.reverse(),yG(Q)}),onBlur:lt(e.onBlur,fe=>{fe.currentTarget.contains(fe.target)||(window.clearTimeout($.current),W.current="")}),onPointerMove:lt(e.onPointerMove,ud(fe=>{const K=fe.target,D=J.current!==fe.clientX;if(fe.currentTarget.contains(K)&&D){const q=fe.clientX>J.current?"right":"left";U.current=q,J.current=fe.clientX}}))})})})})})})});Kk.displayName=Eo;var lG="MenuGroup",g1=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(pn.div,{role:"group",...r,ref:t})});g1.displayName=lG;var uG="MenuLabel",Yk=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(pn.div,{...r,ref:t})});Yk.displayName=uG;var rm="MenuItem",yO="menu.itemSelect",Km=A.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,i=A.useRef(null),c=Cd(rm,e.__scopeMenu),u=p1(rm,e.__scopeMenu),d=Bn(t,i),f=A.useRef(!1),m=()=>{const p=i.current;if(!n&&p){const g=new CustomEvent(yO,{bubbles:!0,cancelable:!0});p.addEventListener(yO,y=>r?.(y),{once:!0}),PN(p,g),g.defaultPrevented?f.current=!1:c.onClose()}};return x.jsx(Qk,{...a,ref:d,disabled:n,onClick:lt(e.onClick,m),onPointerDown:p=>{e.onPointerDown?.(p),f.current=!0},onPointerUp:lt(e.onPointerUp,p=>{f.current||p.currentTarget?.click()}),onKeyDown:lt(e.onKeyDown,p=>{const g=u.searchRef.current!=="";n||g&&p.key===" "||O_.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Km.displayName=rm;var Qk=A.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...i}=e,c=p1(rm,n),u=qk(n),d=A.useRef(null),f=Bn(t,d),[m,p]=A.useState(!1),[g,y]=A.useState("");return A.useEffect(()=>{const w=d.current;w&&y((w.textContent??"").trim())},[i.children]),x.jsx(ld.ItemSlot,{scope:n,disabled:r,textValue:a??g,children:x.jsx(KH,{asChild:!0,...u,focusable:!r,children:x.jsx(pn.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:f,onPointerMove:lt(e.onPointerMove,ud(w=>{r?c.onItemLeave(w):(c.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:lt(e.onPointerLeave,ud(w=>c.onItemLeave(w))),onFocus:lt(e.onFocus,()=>p(!0)),onBlur:lt(e.onBlur,()=>p(!1))})})})}),dG="MenuCheckboxItem",Xk=A.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return x.jsx(r4,{scope:e.__scopeMenu,checked:n,children:x.jsx(Km,{role:"menuitemcheckbox","aria-checked":om(n)?"mixed":n,...a,ref:t,"data-state":_1(n),onSelect:lt(a.onSelect,()=>r?.(om(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Xk.displayName=dG;var Jk="MenuRadioGroup",[fG,hG]=Gi(Jk,{value:void 0,onValueChange:()=>{}}),e4=A.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,i=Ho(r);return x.jsx(fG,{scope:e.__scopeMenu,value:n,onValueChange:i,children:x.jsx(g1,{...a,ref:t})})});e4.displayName=Jk;var t4="MenuRadioItem",n4=A.forwardRef((e,t)=>{const{value:n,...r}=e,a=hG(t4,e.__scopeMenu),i=n===a.value;return x.jsx(r4,{scope:e.__scopeMenu,checked:i,children:x.jsx(Km,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":_1(i),onSelect:lt(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});n4.displayName=t4;var v1="MenuItemIndicator",[r4,pG]=Gi(v1,{checked:!1}),o4=A.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,i=pG(v1,n);return x.jsx(Ya,{present:r||om(i.checked)||i.checked===!0,children:x.jsx(pn.span,{...a,ref:t,"data-state":_1(i.checked)})})});o4.displayName=v1;var mG="MenuSeparator",a4=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(pn.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});a4.displayName=mG;var gG="MenuArrow",s4=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=Od(n);return x.jsx(jH,{...a,...r,ref:t})});s4.displayName=gG;var y1="MenuSub",[vG,i4]=Gi(y1),c4=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:a}=e,i=Xs(y1,t),c=Od(t),[u,d]=A.useState(null),[f,m]=A.useState(null),p=Ho(a);return A.useEffect(()=>(i.open===!1&&p(!1),()=>p(!1)),[i.open,p]),x.jsx(Dk,{...c,children:x.jsx(Hk,{scope:t,open:r,onOpenChange:p,content:f,onContentChange:m,children:x.jsx(vG,{scope:t,contentId:Us(),triggerId:Us(),trigger:u,onTriggerChange:d,children:n})})})};c4.displayName=y1;var Lu="MenuSubTrigger",l4=A.forwardRef((e,t)=>{const n=Xs(Lu,e.__scopeMenu),r=Cd(Lu,e.__scopeMenu),a=i4(Lu,e.__scopeMenu),i=p1(Lu,e.__scopeMenu),c=A.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=i,f={__scopeMenu:e.__scopeMenu},m=A.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return A.useEffect(()=>m,[m]),A.useEffect(()=>{const p=u.current;return()=>{window.clearTimeout(p),d(null)}},[u,d]),x.jsx(f1,{asChild:!0,...f,children:x.jsx(Qk,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":f4(n.open),...e,ref:Sd(t,a.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:lt(e.onPointerMove,ud(p=>{i.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(i.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:lt(e.onPointerLeave,ud(p=>{m();const g=n.content?.getBoundingClientRect();if(g){const y=n.content?.dataset.side,w=y==="right",S=w?-5:5,b=g[w?"left":"right"],E=g[w?"right":"left"];i.onPointerGraceIntentChange({area:[{x:p.clientX+S,y:p.clientY},{x:b,y:g.top},{x:E,y:g.top},{x:E,y:g.bottom},{x:b,y:g.bottom}],side:y}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(p),p.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:lt(e.onKeyDown,p=>{const g=i.searchRef.current!=="";e.disabled||g&&p.key===" "||XH[r.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});l4.displayName=Lu;var u4="MenuSubContent",d4=A.forwardRef((e,t)=>{const n=Zk(Eo,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=Xs(Eo,e.__scopeMenu),c=Cd(Eo,e.__scopeMenu),u=i4(u4,e.__scopeMenu),d=A.useRef(null),f=Bn(t,d);return x.jsx(ld.Provider,{scope:e.__scopeMenu,children:x.jsx(Ya,{present:r||i.open,children:x.jsx(ld.Slot,{scope:e.__scopeMenu,children:x.jsx(m1,{id:u.contentId,"aria-labelledby":u.triggerId,...a,ref:f,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{c.isUsingKeyboardRef.current&&d.current?.focus(),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:lt(e.onFocusOutside,m=>{m.target!==u.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:lt(e.onEscapeKeyDown,m=>{c.onClose(),m.preventDefault()}),onKeyDown:lt(e.onKeyDown,m=>{const p=m.currentTarget.contains(m.target),g=JH[c.dir].includes(m.key);p&&g&&(i.onOpenChange(!1),u.trigger?.focus(),m.preventDefault())})})})})})});d4.displayName=u4;function f4(e){return e?"open":"closed"}function om(e){return e==="indeterminate"}function _1(e){return om(e)?"indeterminate":e?"checked":"unchecked"}function yG(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function _G(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function bG(e,t,n){const a=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let c=_G(e,Math.max(i,0));a.length===1&&(c=c.filter(f=>f!==n));const d=c.find(f=>f.toLowerCase().startsWith(a.toLowerCase()));return d!==n?d:void 0}function wG(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,c=t.length-1;i<t.length;c=i++){const u=t[i],d=t[c],f=u.x,m=u.y,p=d.x,g=d.y;m>r!=g>r&&n<(p-f)*(r-m)/(g-m)+f&&(a=!a)}return a}function SG(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return wG(n,t)}function ud(e){return t=>t.pointerType==="mouse"?e(t):void 0}var EG=Gk,RG=f1,xG=Wk,TG=Kk,OG=g1,CG=Yk,AG=Km,IG=Xk,NG=e4,kG=n4,MG=o4,PG=a4,DG=s4,LG=c4,jG=l4,$G=d4,Ym="DropdownMenu",[UG]=Hi(Ym,[Bk]),yr=Bk(),[zG,h4]=UG(Ym),p4=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:i,onOpenChange:c,modal:u=!0}=e,d=yr(t),f=A.useRef(null),[m,p]=Ed({prop:a,defaultProp:i??!1,onChange:c,caller:Ym});return x.jsx(zG,{scope:t,triggerId:Us(),triggerRef:f,contentId:Us(),open:m,onOpenChange:p,onOpenToggle:A.useCallback(()=>p(g=>!g),[p]),modal:u,children:x.jsx(EG,{...d,open:m,onOpenChange:p,dir:r,modal:u,children:n})})};p4.displayName=Ym;var m4="DropdownMenuTrigger",g4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,i=h4(m4,n),c=yr(n);return x.jsx(RG,{asChild:!0,...c,children:x.jsx(pn.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:Sd(t,i.triggerRef),onPointerDown:lt(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(i.onOpenToggle(),i.open||u.preventDefault())}),onKeyDown:lt(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&i.onOpenToggle(),u.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});g4.displayName=m4;var VG="DropdownMenuPortal",v4=e=>{const{__scopeDropdownMenu:t,...n}=e,r=yr(t);return x.jsx(xG,{...r,...n})};v4.displayName=VG;var y4="DropdownMenuContent",_4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=h4(y4,n),i=yr(n),c=A.useRef(!1);return x.jsx(TG,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...r,ref:t,onCloseAutoFocus:lt(e.onCloseAutoFocus,u=>{c.current||a.triggerRef.current?.focus(),c.current=!1,u.preventDefault()}),onInteractOutside:lt(e.onInteractOutside,u=>{const d=u.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0,m=d.button===2||f;(!a.modal||m)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});_4.displayName=y4;var FG="DropdownMenuGroup",BG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(OG,{...a,...r,ref:t})});BG.displayName=FG;var qG="DropdownMenuLabel",b4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(CG,{...a,...r,ref:t})});b4.displayName=qG;var HG="DropdownMenuItem",w4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(AG,{...a,...r,ref:t})});w4.displayName=HG;var GG="DropdownMenuCheckboxItem",S4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(IG,{...a,...r,ref:t})});S4.displayName=GG;var ZG="DropdownMenuRadioGroup",WG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(NG,{...a,...r,ref:t})});WG.displayName=ZG;var KG="DropdownMenuRadioItem",YG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(kG,{...a,...r,ref:t})});YG.displayName=KG;var QG="DropdownMenuItemIndicator",E4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(MG,{...a,...r,ref:t})});E4.displayName=QG;var XG="DropdownMenuSeparator",R4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(PG,{...a,...r,ref:t})});R4.displayName=XG;var JG="DropdownMenuArrow",eZ=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(DG,{...a,...r,ref:t})});eZ.displayName=JG;var tZ=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:a,defaultOpen:i}=e,c=yr(t),[u,d]=Ed({prop:r,defaultProp:i??!1,onChange:a,caller:"DropdownMenuSub"});return x.jsx(LG,{...c,open:u,onOpenChange:d,children:n})},nZ="DropdownMenuSubTrigger",x4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(jG,{...a,...r,ref:t})});x4.displayName=nZ;var rZ="DropdownMenuSubContent",T4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx($G,{...a,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});T4.displayName=rZ;var oZ=p4,aZ=g4,sZ=v4,iZ=_4,Xoe=b4,cZ=w4,Joe=S4,eae=E4,tae=R4,nae=tZ,rae=x4,oae=T4,lZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ad=lZ.reduce((e,t)=>{const n=NN(`Primitive.${t}`),r=A.forwardRef((a,i)=>{const{asChild:c,...u}=a,d=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(d,{...u,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),uZ="Label",O4=A.forwardRef((e,t)=>x.jsx(Ad.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));O4.displayName=uZ;var dZ=O4;function fZ(e,t=[]){let n=[];function r(i,c){const u=A.createContext(c);u.displayName=i+"Context";const d=n.length;n=[...n,c];const f=p=>{const{scope:g,children:y,...w}=p,S=g?.[e]?.[d]||u,b=A.useMemo(()=>w,Object.values(w));return x.jsx(S.Provider,{value:b,children:y})};f.displayName=i+"Provider";function m(p,g){const y=g?.[e]?.[d]||u,w=A.useContext(y);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[f,m]}const a=()=>{const i=n.map(c=>A.createContext(c));return function(u){const d=u?.[e]||i;return A.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,hZ(a,...t)]}function hZ(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const c=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(i)[`__scope${f}`];return{...u,...p}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var pZ=EA();function mZ(){return pZ.useSyncExternalStore(gZ,()=>!0,()=>!1)}function gZ(){return()=>{}}var b1="Avatar",[vZ]=fZ(b1),[yZ,C4]=vZ(b1),A4=A.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,i]=A.useState("idle");return x.jsx(yZ,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:i,children:x.jsx(Ad.span,{...r,ref:t})})});A4.displayName=b1;var I4="AvatarImage",N4=A.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...i}=e,c=C4(I4,n),u=_Z(r,i),d=Ho(f=>{a(f),c.onImageLoadingStatusChange(f)});return qo(()=>{u!=="idle"&&d(u)},[u,d]),u==="loaded"?x.jsx(Ad.img,{...i,ref:t,src:r}):null});N4.displayName=I4;var k4="AvatarFallback",M4=A.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,i=C4(k4,n),[c,u]=A.useState(r===void 0);return A.useEffect(()=>{if(r!==void 0){const d=window.setTimeout(()=>u(!0),r);return()=>window.clearTimeout(d)}},[r]),c&&i.imageLoadingStatus!=="loaded"?x.jsx(Ad.span,{...a,ref:t}):null});M4.displayName=k4;function _O(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function _Z(e,{referrerPolicy:t,crossOrigin:n}){const r=mZ(),a=A.useRef(null),i=r?(a.current||(a.current=new window.Image),a.current):null,[c,u]=A.useState(()=>_O(i,e));return qo(()=>{u(_O(i,e))},[i,e]),qo(()=>{const d=p=>()=>{u(p)};if(!i)return;const f=d("loaded"),m=d("error");return i.addEventListener("load",f),i.addEventListener("error",m),t&&(i.referrerPolicy=t),typeof n=="string"&&(i.crossOrigin=n),()=>{i.removeEventListener("load",f),i.removeEventListener("error",m)}},[i,n,t]),c}var bZ=A4,wZ=N4,SZ=M4;function EZ(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function w1(e,t,n=""){const r=EZ(e),a=e?.length;if(!r||t!==void 0){const c=n&&`"${n}" `,u="",d=r?`length=${a}`:`type=${typeof e}`;throw new Error(c+"expected Uint8Array"+u+", got "+d)}return e}function bO(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function RZ(e,t){w1(e,void 0,"digestInto() output");const n=t.outputLen;if(e.length<n)throw new Error('"digestInto() output" expected to be of length >='+n)}function C_(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function d0(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function na(e,t){return e<<32-t|e>>>t}const xZ=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",TZ=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function OZ(e){if(w1(e),xZ)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=TZ[e[n]];return t}function CZ(e,t={}){const n=(a,i)=>e(i).update(a).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.create=a=>e(a),Object.assign(n,t),Object.freeze(n)}const AZ=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function IZ(e,t,n){return e&t^~e&n}function NZ(e,t,n){return e&t^e&n^t&n}class kZ{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(t,n,r,a){this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=a,this.buffer=new Uint8Array(t),this.view=d0(this.buffer)}update(t){bO(this),w1(t);const{view:n,buffer:r,blockLen:a}=this,i=t.length;for(let c=0;c<i;){const u=Math.min(a-this.pos,i-c);if(u===a){const d=d0(t);for(;a<=i-c;c+=a)this.process(d,c);continue}r.set(t.subarray(c,c+u),this.pos),this.pos+=u,c+=u,this.pos===a&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){bO(this),RZ(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:a,isLE:i}=this;let{pos:c}=this;n[c++]=128,C_(this.buffer.subarray(c)),this.padOffset>a-c&&(this.process(r,0),c=0);for(let p=c;p<a;p++)n[p]=0;r.setBigUint64(a-8,BigInt(this.length*8),i),this.process(r,0);const u=d0(t),d=this.outputLen;if(d%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const f=d/4,m=this.get();if(f>m.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<f;p++)u.setUint32(4*p,m[p],i)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||=new this.constructor,t.set(...this.get());const{blockLen:n,buffer:r,length:a,finished:i,destroyed:c,pos:u}=this;return t.destroyed=c,t.finished=i,t.length=a,t.pos=u,a%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const xs=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),MZ=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ts=new Uint32Array(64);class PZ extends kZ{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:n,C:r,D:a,E:i,F:c,G:u,H:d}=this;return[t,n,r,a,i,c,u,d]}set(t,n,r,a,i,c,u,d){this.A=t|0,this.B=n|0,this.C=r|0,this.D=a|0,this.E=i|0,this.F=c|0,this.G=u|0,this.H=d|0}process(t,n){for(let p=0;p<16;p++,n+=4)Ts[p]=t.getUint32(n,!1);for(let p=16;p<64;p++){const g=Ts[p-15],y=Ts[p-2],w=na(g,7)^na(g,18)^g>>>3,S=na(y,17)^na(y,19)^y>>>10;Ts[p]=S+Ts[p-7]+w+Ts[p-16]|0}let{A:r,B:a,C:i,D:c,E:u,F:d,G:f,H:m}=this;for(let p=0;p<64;p++){const g=na(u,6)^na(u,11)^na(u,25),y=m+g+IZ(u,d,f)+MZ[p]+Ts[p]|0,S=(na(r,2)^na(r,13)^na(r,22))+NZ(r,a,i)|0;m=f,f=d,d=u,u=c+y|0,c=i,i=a,a=r,r=y+S|0}r=r+this.A|0,a=a+this.B|0,i=i+this.C|0,c=c+this.D|0,u=u+this.E|0,d=d+this.F|0,f=f+this.G|0,m=m+this.H|0,this.set(r,a,i,c,u,d,f,m)}roundClean(){C_(Ts)}destroy(){this.set(0,0,0,0,0,0,0,0),C_(this.buffer)}}class DZ extends PZ{A=xs[0]|0;B=xs[1]|0;C=xs[2]|0;D=xs[3]|0;E=xs[4]|0;F=xs[5]|0;G=xs[6]|0;H=xs[7]|0;constructor(){super(32)}}const LZ=CZ(()=>new DZ,AZ(1));function jZ(e){const t=A.useRef({value:e,previous:e});return A.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Qm="Checkbox",[$Z]=Hi(Qm),[UZ,S1]=$Z(Qm);function zZ(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:a,disabled:i,form:c,name:u,onCheckedChange:d,required:f,value:m="on",internal_do_not_use_render:p}=e,[g,y]=Ed({prop:n,defaultProp:a??!1,onChange:d,caller:Qm}),[w,S]=A.useState(null),[b,E]=A.useState(null),R=A.useRef(!1),T=w?!!c||!!w.closest("form"):!0,O={checked:g,disabled:i,setChecked:y,control:w,setControl:S,name:u,form:c,value:m,hasConsumerStoppedPropagationRef:R,required:f,defaultChecked:zs(a)?!1:a,isFormControl:T,bubbleInput:b,setBubbleInput:E};return x.jsx(UZ,{scope:t,...O,children:VZ(p)?p(O):r})}var P4="CheckboxTrigger",D4=A.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},a)=>{const{control:i,value:c,disabled:u,checked:d,required:f,setControl:m,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:y,bubbleInput:w}=S1(P4,e),S=Bn(a,m),b=A.useRef(d);return A.useEffect(()=>{const E=i?.form;if(E){const R=()=>p(b.current);return E.addEventListener("reset",R),()=>E.removeEventListener("reset",R)}},[i,p]),x.jsx(pn.button,{type:"button",role:"checkbox","aria-checked":zs(d)?"mixed":d,"aria-required":f,"data-state":V4(d),"data-disabled":u?"":void 0,disabled:u,value:c,...r,ref:S,onKeyDown:lt(t,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:lt(n,E=>{p(R=>zs(R)?!0:!R),w&&y&&(g.current=E.isPropagationStopped(),g.current||E.stopPropagation())})})});D4.displayName=P4;var L4=A.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:i,required:c,disabled:u,value:d,onCheckedChange:f,form:m,...p}=e;return x.jsx(zZ,{__scopeCheckbox:n,checked:a,defaultChecked:i,disabled:u,required:c,onCheckedChange:f,name:r,form:m,value:d,internal_do_not_use_render:({isFormControl:g})=>x.jsxs(x.Fragment,{children:[x.jsx(D4,{...p,ref:t,__scopeCheckbox:n}),g&&x.jsx(z4,{__scopeCheckbox:n})]})})});L4.displayName=Qm;var j4="CheckboxIndicator",$4=A.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,i=S1(j4,n);return x.jsx(Ya,{present:r||zs(i.checked)||i.checked===!0,children:x.jsx(pn.span,{"data-state":V4(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});$4.displayName=j4;var U4="CheckboxBubbleInput",z4=A.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:c,required:u,disabled:d,name:f,value:m,form:p,bubbleInput:g,setBubbleInput:y}=S1(U4,e),w=Bn(n,y),S=jZ(i),b=Rk(r);A.useEffect(()=>{const R=g;if(!R)return;const T=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(T,"checked").set,I=!a.current;if(S!==i&&C){const N=new Event("click",{bubbles:I});R.indeterminate=zs(i),C.call(R,zs(i)?!1:i),R.dispatchEvent(N)}},[g,S,i,a]);const E=A.useRef(zs(i)?!1:i);return x.jsx(pn.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??E.current,required:u,disabled:d,name:f,value:m,form:p,...t,tabIndex:-1,ref:w,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});z4.displayName=U4;function VZ(e){return typeof e=="function"}function zs(e){return e==="indeterminate"}function V4(e){return zs(e)?"indeterminate":e?"checked":"unchecked"}var F4={OBJECT:"object",UNDEFINED:"undefined"},_h="browser",wO="cpu",SO="device",f0="engine",bh="os",As="name",am="type",A_="vendor",Lo="version",I_="architecture",N_="major",k_="model",FZ="console",BZ="mobile",qZ="tablet",HZ="smarttv",GZ="wearable",ZZ="embedded",WZ=typeof window!==F4.UNDEFINED,h0=WZ&&window.navigator?window.navigator:void 0;h0&&h0.userAgentData&&h0.userAgentData;var Xm=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},wh=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==F4.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this};(function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return wh.call(e.init,[[_h,[As,Lo,N_,am]],[wO,[I_]],[SO,[am,k_,A_]],[f0,[As,Lo]],[bh,[As,Lo]]]),wh.call(e.isIgnore,[[_h,[Lo,N_]],[f0,[Lo]],[bh,[Lo]]]),wh.call(e.isIgnoreRgx,[[_h,/ ?browser$/i],[bh,/ ?os$/i]]),wh.call(e.toString,[[_h,[As,Lo]],[wO,[I_]],[SO,[A_,k_]],[f0,[As,Lo]],[bh,[As,Lo]]]),e})();Xm([As,Lo,N_,am]);Xm([I_]);Xm([k_,A_,am,FZ,BZ,HZ,qZ,GZ,ZZ]);Xm([As,Lo]);function KZ(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const B4=ee.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Id=()=>{const e=ee.useContext(B4);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};KZ(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
106
- [data-state=closed]
107
- ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function YZ(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function QZ(){return E1(/^Mac/)}function XZ(){return E1(/^iPhone/)}function EO(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function JZ(){return E1(/^iPad/)||QZ()&&navigator.maxTouchPoints>1}function q4(){return XZ()||JZ()}function E1(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const eW=24,tW=typeof window<"u"?A.useLayoutEffect:A.useEffect;function RO(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const p0=typeof document<"u"&&window.visualViewport;function xO(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function H4(e){for(xO(e)&&(e=e.parentElement);e&&!xO(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const nW=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Sh=0,m0;function rW(e={}){let{isDisabled:t}=e;tW(()=>{if(!t)return Sh++,Sh===1&&q4()&&(m0=oW()),()=>{Sh--,Sh===0&&m0?.()}},[t])}function oW(){let e,t=0,n=p=>{e=H4(p.target),!(e===document.documentElement&&e===document.body)&&(t=p.changedTouches[0].pageY)},r=p=>{if(!e||e===document.documentElement||e===document.body){p.preventDefault();return}let g=p.changedTouches[0].pageY,y=e.scrollTop,w=e.scrollHeight-e.clientHeight;w!==0&&((y<=0&&g>t||y>=w&&g<t)&&p.preventDefault(),t=g)},a=p=>{let g=p.target;M_(g)&&g!==document.activeElement&&(p.preventDefault(),g.style.transform="translateY(-2000px)",g.focus(),requestAnimationFrame(()=>{g.style.transform=""}))},i=p=>{let g=p.target;M_(g)&&(g.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{g.style.transform="",p0&&(p0.height<window.innerHeight?requestAnimationFrame(()=>{TO(g)}):p0.addEventListener("resize",()=>TO(g),{once:!0}))}))},c=()=>{window.scrollTo(0,0)},u=window.pageXOffset,d=window.pageYOffset,f=RO(aW(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let m=RO(xu(document,"touchstart",n,{passive:!1,capture:!0}),xu(document,"touchmove",r,{passive:!1,capture:!0}),xu(document,"touchend",a,{passive:!1,capture:!0}),xu(document,"focus",i,!0),xu(window,"scroll",c));return()=>{f(),m(),window.scrollTo(u,d)}}function aW(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function xu(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function TO(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=H4(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,a=e.getBoundingClientRect().top,i=e.getBoundingClientRect().bottom;const c=n.getBoundingClientRect().bottom+eW;i>c&&(n.scrollTop+=a-r)}e=n.parentElement}}function M_(e){return e instanceof HTMLInputElement&&!nW.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function sW(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function iW(...e){return t=>e.forEach(n=>sW(n,t))}function G4(...e){return A.useCallback(iW(...e),e)}const Z4=new WeakMap;function Vn(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([a,i])=>{if(a.startsWith("--")){e.style.setProperty(a,i);return}r[a]=e.style[a],e.style[a]=i}),!n&&Z4.set(e,r)}function cW(e,t){if(!e||!(e instanceof HTMLElement))return;let n=Z4.get(e);n&&(e.style[t]=n[t])}const Mn=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Eh(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let a=r.match(/^matrix3d\((.+)\)$/);return a?parseFloat(a[1].split(", ")[Mn(t)?13:12]):(a=r.match(/^matrix\((.+)\)$/),a?parseFloat(a[1].split(", ")[Mn(t)?5:4]):null)}function lW(e){return 8*(Math.log(e+1)-2)}function g0(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function uW(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const fn={DURATION:.5,EASE:[.32,.72,0,1]},W4=.4,dW=.25,fW=100,K4=8,_i=16,P_=26,v0="vaul-dragging";function Y4(e){const t=ee.useRef(e);return ee.useEffect(()=>{t.current=e}),ee.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function hW({defaultProp:e,onChange:t}){const n=ee.useState(e),[r]=n,a=ee.useRef(r),i=Y4(t);return ee.useEffect(()=>{a.current!==r&&(i(r),a.current=r)},[r,a,i]),n}function Q4({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=hW({defaultProp:t,onChange:n}),i=e!==void 0,c=i?e:r,u=Y4(n),d=ee.useCallback(f=>{if(i){const p=typeof f=="function"?f(e):f;p!==e&&u(p)}else a(f)},[i,e,a,u]);return[c,d]}function pW({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:a,fadeFromIndex:i,onSnapPointChange:c,direction:u="bottom",container:d,snapToSequentialPoint:f}){const[m,p]=Q4({prop:e,defaultProp:n?.[0],onChange:t}),[g,y]=ee.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);ee.useEffect(()=>{function N(){y({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[]);const w=ee.useMemo(()=>m===n?.[n.length-1]||null,[n,m]),S=ee.useMemo(()=>{var N;return(N=n?.findIndex(P=>P===m))!=null?N:null},[n,m]),b=n&&n.length>0&&(i||i===0)&&!Number.isNaN(i)&&n[i]===m||!n,E=ee.useMemo(()=>{const N=d?{width:d.getBoundingClientRect().width,height:d.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var P;return(P=n?.map($=>{const W=typeof $=="string";let V=0;if(W&&(V=parseInt($,10)),Mn(u)){const U=W?V:g?$*N.height:0;return g?u==="bottom"?N.height-U:-N.height+U:U}const G=W?V:g?$*N.width:0;return g?u==="right"?N.width-G:-N.width+G:G}))!=null?P:[]},[n,g,d]),R=ee.useMemo(()=>S!==null?E?.[S]:null,[E,S]),T=ee.useCallback(N=>{var P;const $=(P=E?.findIndex(W=>W===N))!=null?P:null;c($),Vn(r.current,{transition:`transform ${fn.DURATION}s cubic-bezier(${fn.EASE.join(",")})`,transform:Mn(u)?`translate3d(0, ${N}px, 0)`:`translate3d(${N}px, 0, 0)`}),E&&$!==E.length-1&&i!==void 0&&$!==i&&$<i?Vn(a.current,{transition:`opacity ${fn.DURATION}s cubic-bezier(${fn.EASE.join(",")})`,opacity:"0"}):Vn(a.current,{transition:`opacity ${fn.DURATION}s cubic-bezier(${fn.EASE.join(",")})`,opacity:"1"}),p(n?.[Math.max($,0)])},[r.current,n,E,i,a,p]);ee.useEffect(()=>{if(m||e){var N;const P=(N=n?.findIndex($=>$===e||$===m))!=null?N:-1;E&&P!==-1&&typeof E[P]=="number"&&T(E[P])}},[m,e,n,E,T]);function O({draggedDistance:N,closeDrawer:P,velocity:$,dismissible:W}){if(i===void 0)return;const V=u==="bottom"||u==="right"?(R??0)-N:(R??0)+N,G=S===i-1,U=S===0,J=N>0;if(G&&Vn(a.current,{transition:`opacity ${fn.DURATION}s cubic-bezier(${fn.EASE.join(",")})`}),!f&&$>2&&!J){W?P():T(E[0]);return}if(!f&&$>2&&J&&E&&n){T(E[n.length-1]);return}const le=E?.reduce((Y,ie)=>typeof Y!="number"||typeof ie!="number"?Y:Math.abs(ie-V)<Math.abs(Y-V)?ie:Y),F=Mn(u)?window.innerHeight:window.innerWidth;if($>W4&&Math.abs(N)<F*.4){const Y=J?1:-1;if(Y>0&&w&&n){T(E[n.length-1]);return}if(U&&Y<0&&W&&P(),S===null)return;T(E[S+Y]);return}T(le)}function C({draggedDistance:N}){if(R===null)return;const P=u==="bottom"||u==="right"?R-N:R+N;(u==="bottom"||u==="right")&&P<E[E.length-1]||(u==="top"||u==="left")&&P>E[E.length-1]||Vn(r.current,{transform:Mn(u)?`translate3d(0, ${P}px, 0)`:`translate3d(${P}px, 0, 0)`})}function I(N,P){if(!n||typeof S!="number"||!E||i===void 0)return null;const $=S===i-1;if(S>=i&&P)return 0;if($&&!P)return 1;if(!b&&!$)return null;const V=$?S+1:S-1,G=$?E[V]-E[V-1]:E[V+1]-E[V],U=N/Math.abs(G);return $?1-U:U}return{isLastSnapPoint:w,activeSnapPoint:m,shouldFade:b,getPercentageDragged:I,setActiveSnapPoint:p,activeSnapPointIndex:S,onRelease:O,onDrag:C,snapPointsOffset:E}}const mW=()=>()=>{};function gW(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:a}=Id(),i=ee.useRef(null),c=A.useMemo(()=>document.body.style.backgroundColor,[]);function u(){return(window.innerWidth-P_)/window.innerWidth}ee.useEffect(()=>{if(t&&n){i.current&&clearTimeout(i.current);const d=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!d)return;uW(r&&!a?g0(document.body,{background:"black"}):mW,g0(d,{transformOrigin:Mn(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${fn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${fn.EASE.join(",")})`}));const f=g0(d,{borderRadius:`${K4}px`,overflow:"hidden",...Mn(e)?{transform:`scale(${u()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${u()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{f(),i.current=window.setTimeout(()=>{c?document.body.style.background=c:document.body.style.removeProperty("background")},fn.DURATION*1e3)}}},[t,n,c])}let Tu=null;function vW({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:a,noBodyStyles:i}){const[c,u]=ee.useState(()=>typeof window<"u"?window.location.href:""),d=ee.useRef(0),f=ee.useCallback(()=>{if(EO()&&Tu===null&&e&&!i){Tu={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:p,innerHeight:g}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-d.current}px`,left:`${-p}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const y=g-window.innerHeight;y&&d.current>=g&&(document.body.style.top=`${-(d.current+y)}px`)}),300)}},[e]),m=ee.useCallback(()=>{if(EO()&&Tu!==null&&!i){const p=-parseInt(document.body.style.top,10),g=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Tu),window.requestAnimationFrame(()=>{if(a&&c!==window.location.href){u(window.location.href);return}window.scrollTo(g,p)}),Tu=null}},[c]);return ee.useEffect(()=>{function p(){d.current=window.scrollY}return p(),window.addEventListener("scroll",p),()=>{window.removeEventListener("scroll",p)}},[]),ee.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||m()}},[t,m]),ee.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&f(),t||window.setTimeout(()=>{m()},500)):m())},[e,r,c,t,n,f,m]),{restorePositionSetting:m}}function yW({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:a,snapPoints:i,shouldScaleBackground:c=!1,setBackgroundColorOnScale:u=!0,closeThreshold:d=dW,scrollLockTimeout:f=fW,dismissible:m=!0,handleOnly:p=!1,fadeFromIndex:g=i&&i.length-1,activeSnapPoint:y,setActiveSnapPoint:w,fixed:S,modal:b=!0,onClose:E,nested:R,noBodyStyles:T=!1,direction:O="bottom",defaultOpen:C=!1,disablePreventScroll:I=!0,snapToSequentialPoint:N=!1,preventScrollRestoration:P=!1,repositionInputs:$=!0,onAnimationEnd:W,container:V,autoFocus:G=!1}){var U,J;const[le=!1,F]=Q4({defaultProp:C,prop:e,onChange:qe=>{t?.(qe),!qe&&!R&&ke(),setTimeout(()=>{W?.(qe)},fn.DURATION*1e3),qe&&!b&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),qe||(document.body.style.pointerEvents="auto")}}),[Y,ie]=ee.useState(!1),[fe,K]=ee.useState(!1),[D,q]=ee.useState(!1),B=ee.useRef(null),L=ee.useRef(null),z=ee.useRef(null),Q=ee.useRef(null),me=ee.useRef(null),ve=ee.useRef(!1),Ce=ee.useRef(null),Ie=ee.useRef(0),H=ee.useRef(!1),re=ee.useRef(!C),be=ee.useRef(0),se=ee.useRef(null),ue=ee.useRef(((U=se.current)==null?void 0:U.getBoundingClientRect().height)||0),Oe=ee.useRef(((J=se.current)==null?void 0:J.getBoundingClientRect().width)||0),Le=ee.useRef(0),Xe=ee.useCallback(qe=>{i&&qe===oe.length-1&&(L.current=new Date)},[]),{activeSnapPoint:Be,activeSnapPointIndex:Ke,setActiveSnapPoint:Z,onRelease:te,snapPointsOffset:oe,onDrag:Se,shouldFade:xe,getPercentageDragged:Re}=pW({snapPoints:i,activeSnapPointProp:y,setActiveSnapPointProp:w,drawerRef:se,fadeFromIndex:g,overlayRef:B,onSnapPointChange:Xe,direction:O,container:V,snapToSequentialPoint:N});rW({isDisabled:!le||fe||!b||D||!Y||!$||!I});const{restorePositionSetting:ke}=vW({isOpen:le,modal:b,nested:R??!1,hasBeenOpened:Y,preventScrollRestoration:P,noBodyStyles:T});function Je(){return(window.innerWidth-P_)/window.innerWidth}function at(qe){var St,Ct;!m&&!i||se.current&&!se.current.contains(qe.target)||(ue.current=((St=se.current)==null?void 0:St.getBoundingClientRect().height)||0,Oe.current=((Ct=se.current)==null?void 0:Ct.getBoundingClientRect().width)||0,K(!0),z.current=new Date,q4()&&window.addEventListener("touchend",()=>ve.current=!1,{once:!0}),qe.target.setPointerCapture(qe.pointerId),Ie.current=Mn(O)?qe.pageY:qe.pageX)}function kt(qe,St){var Ct;let ut=qe;const Mt=(Ct=window.getSelection())==null?void 0:Ct.toString(),He=se.current?Eh(se.current,O):null,dt=new Date;if(ut.tagName==="SELECT"||ut.hasAttribute("data-vaul-no-drag")||ut.closest("[data-vaul-no-drag]"))return!1;if(O==="right"||O==="left")return!0;if(L.current&&dt.getTime()-L.current.getTime()<500)return!1;if(He!==null&&(O==="bottom"?He>0:He<0))return!0;if(Mt&&Mt.length>0)return!1;if(me.current&&dt.getTime()-me.current.getTime()<f&&He===0||St)return me.current=dt,!1;for(;ut;){if(ut.scrollHeight>ut.clientHeight){if(ut.scrollTop!==0)return me.current=new Date,!1;if(ut.getAttribute("role")==="dialog")return!0}ut=ut.parentNode}return!0}function dr(qe){if(se.current&&fe){const St=O==="bottom"||O==="right"?1:-1,Ct=(Ie.current-(Mn(O)?qe.pageY:qe.pageX))*St,ut=Ct>0,Mt=i&&!m&&!ut;if(Mt&&Ke===0)return;const He=Math.abs(Ct),dt=document.querySelector("[data-vaul-drawer-wrapper]"),Qt=O==="bottom"||O==="top"?ue.current:Oe.current;let Gt=He/Qt;const fr=Re(He,ut);if(fr!==null&&(Gt=fr),Mt&&Gt>=1||!ve.current&&!kt(qe.target,ut))return;if(se.current.classList.add(v0),ve.current=!0,Vn(se.current,{transition:"none"}),Vn(B.current,{transition:"none"}),i&&Se({draggedDistance:Ct}),ut&&!i){const on=lW(Ct),ao=Math.min(on*-1,0)*St;Vn(se.current,{transform:Mn(O)?`translate3d(0, ${ao}px, 0)`:`translate3d(${ao}px, 0, 0)`});return}const Pt=1-Gt;if((xe||g&&Ke===g-1)&&(r?.(qe,Gt),Vn(B.current,{opacity:`${Pt}`,transition:"none"},!0)),dt&&B.current&&c){const on=Math.min(Je()+Gt*(1-Je()),1),ao=8-Gt*8,Yn=Math.max(0,14-Gt*14);Vn(dt,{borderRadius:`${ao}px`,transform:Mn(O)?`scale(${on}) translate3d(0, ${Yn}px, 0)`:`scale(${on}) translate3d(${Yn}px, 0, 0)`,transition:"none"},!0)}if(!i){const on=He*St;Vn(se.current,{transform:Mn(O)?`translate3d(0, ${on}px, 0)`:`translate3d(${on}px, 0, 0)`})}}}ee.useEffect(()=>{window.requestAnimationFrame(()=>{re.current=!0})},[]),ee.useEffect(()=>{var qe;function St(){if(!se.current||!$)return;const Ct=document.activeElement;if(M_(Ct)||H.current){var ut;const Mt=((ut=window.visualViewport)==null?void 0:ut.height)||0,He=window.innerHeight;let dt=He-Mt;const Qt=se.current.getBoundingClientRect().height||0,Gt=Qt>He*.8;Le.current||(Le.current=Qt);const fr=se.current.getBoundingClientRect().top;if(Math.abs(be.current-dt)>60&&(H.current=!H.current),i&&i.length>0&&oe&&Ke){const Pt=oe[Ke]||0;dt+=Pt}if(be.current=dt,Qt>Mt||H.current){const Pt=se.current.getBoundingClientRect().height;let on=Pt;Pt>Mt&&(on=Mt-(Gt?fr:P_)),S?se.current.style.height=`${Pt-Math.max(dt,0)}px`:se.current.style.height=`${Math.max(on,Mt-fr)}px`}else YZ()||(se.current.style.height=`${Le.current}px`);i&&i.length>0&&!H.current?se.current.style.bottom="0px":se.current.style.bottom=`${Math.max(dt,0)}px`}}return(qe=window.visualViewport)==null||qe.addEventListener("resize",St),()=>{var Ct;return(Ct=window.visualViewport)==null?void 0:Ct.removeEventListener("resize",St)}},[Ke,i,oe]);function nn(qe){rn(),E?.(),qe||F(!1),setTimeout(()=>{i&&Z(i[0])},fn.DURATION*1e3)}function Rn(){if(!se.current)return;const qe=document.querySelector("[data-vaul-drawer-wrapper]"),St=Eh(se.current,O);Vn(se.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${fn.DURATION}s cubic-bezier(${fn.EASE.join(",")})`}),Vn(B.current,{transition:`opacity ${fn.DURATION}s cubic-bezier(${fn.EASE.join(",")})`,opacity:"1"}),c&&St&&St>0&&le&&Vn(qe,{borderRadius:`${K4}px`,overflow:"hidden",...Mn(O)?{transform:`scale(${Je()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Je()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${fn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${fn.EASE.join(",")})`},!0)}function rn(){!fe||!se.current||(se.current.classList.remove(v0),ve.current=!1,K(!1),Q.current=new Date)}function jn(qe){if(!fe||!se.current)return;se.current.classList.remove(v0),ve.current=!1,K(!1),Q.current=new Date;const St=Eh(se.current,O);if(!qe||!kt(qe.target,!1)||!St||Number.isNaN(St)||z.current===null)return;const Ct=Q.current.getTime()-z.current.getTime(),ut=Ie.current-(Mn(O)?qe.pageY:qe.pageX),Mt=Math.abs(ut)/Ct;if(Mt>.05&&(q(!0),setTimeout(()=>{q(!1)},200)),i){te({draggedDistance:ut*(O==="bottom"||O==="right"?1:-1),closeDrawer:nn,velocity:Mt,dismissible:m}),a?.(qe,!0);return}if(O==="bottom"||O==="right"?ut>0:ut<0){Rn(),a?.(qe,!0);return}if(Mt>W4){nn(),a?.(qe,!1);return}var He;const dt=Math.min((He=se.current.getBoundingClientRect().height)!=null?He:0,window.innerHeight);var Qt;const Gt=Math.min((Qt=se.current.getBoundingClientRect().width)!=null?Qt:0,window.innerWidth),fr=O==="left"||O==="right";if(Math.abs(St)>=(fr?Gt:dt)*d){nn(),a?.(qe,!1);return}a?.(qe,!0),Rn()}ee.useEffect(()=>(le&&(Vn(document.documentElement,{scrollBehavior:"auto"}),L.current=new Date),()=>{cW(document.documentElement,"scrollBehavior")}),[le]);function xn(qe){const St=qe?(window.innerWidth-_i)/window.innerWidth:1,Ct=qe?-_i:0;Ce.current&&window.clearTimeout(Ce.current),Vn(se.current,{transition:`transform ${fn.DURATION}s cubic-bezier(${fn.EASE.join(",")})`,transform:Mn(O)?`scale(${St}) translate3d(0, ${Ct}px, 0)`:`scale(${St}) translate3d(${Ct}px, 0, 0)`}),!qe&&se.current&&(Ce.current=setTimeout(()=>{const ut=Eh(se.current,O);Vn(se.current,{transition:"none",transform:Mn(O)?`translate3d(0, ${ut}px, 0)`:`translate3d(${ut}px, 0, 0)`})},500))}function Qa(qe,St){if(St<0)return;const Ct=(window.innerWidth-_i)/window.innerWidth,ut=Ct+St*(1-Ct),Mt=-_i+St*_i;Vn(se.current,{transform:Mn(O)?`scale(${ut}) translate3d(0, ${Mt}px, 0)`:`scale(${ut}) translate3d(${Mt}px, 0, 0)`,transition:"none"})}function va(qe,St){const Ct=Mn(O)?window.innerHeight:window.innerWidth,ut=St?(Ct-_i)/Ct:1,Mt=St?-_i:0;St&&Vn(se.current,{transition:`transform ${fn.DURATION}s cubic-bezier(${fn.EASE.join(",")})`,transform:Mn(O)?`scale(${ut}) translate3d(0, ${Mt}px, 0)`:`scale(${ut}) translate3d(${Mt}px, 0, 0)`})}return ee.useEffect(()=>{b||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[b]),ee.createElement(lq,{defaultOpen:C,onOpenChange:qe=>{!m&&!qe||(qe?ie(!0):nn(!0),F(qe))},open:le},ee.createElement(B4.Provider,{value:{activeSnapPoint:Be,snapPoints:i,setActiveSnapPoint:Z,drawerRef:se,overlayRef:B,onOpenChange:t,onPress:at,onRelease:jn,onDrag:dr,dismissible:m,shouldAnimate:re,handleOnly:p,isOpen:le,isDragging:fe,shouldFade:xe,closeDrawer:nn,onNestedDrag:Qa,onNestedOpenChange:xn,onNestedRelease:va,keyboardIsOpen:H,modal:b,snapPointsOffset:oe,activeSnapPointIndex:Ke,direction:O,shouldScaleBackground:c,setBackgroundColorOnScale:u,noBodyStyles:T,container:V,autoFocus:G}},n))}const X4=ee.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:a,shouldFade:i,isOpen:c,modal:u,shouldAnimate:d}=Id(),f=G4(t,n),m=r&&r.length>0;if(!u)return null;const p=ee.useCallback(g=>a(g),[a]);return ee.createElement(fq,{onMouseUp:p,ref:f,"data-vaul-overlay":"","data-vaul-snap-points":c&&m?"true":"false","data-vaul-snap-points-overlay":c&&i?"true":"false","data-vaul-animate":d?.current?"true":"false",...e})});X4.displayName="Drawer.Overlay";const J4=ee.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},a){const{drawerRef:i,onPress:c,onRelease:u,onDrag:d,keyboardIsOpen:f,snapPointsOffset:m,activeSnapPointIndex:p,modal:g,isOpen:y,direction:w,snapPoints:S,container:b,handleOnly:E,shouldAnimate:R,autoFocus:T}=Id(),[O,C]=ee.useState(!1),I=G4(a,i),N=ee.useRef(null),P=ee.useRef(null),$=ee.useRef(!1),W=S&&S.length>0;gW();const V=(U,J,le=0)=>{if($.current)return!0;const F=Math.abs(U.y),Y=Math.abs(U.x),ie=Y>F,fe=["bottom","right"].includes(J)?1:-1;if(J==="left"||J==="right"){if(!(U.x*fe<0)&&Y>=0&&Y<=le)return ie}else if(!(U.y*fe<0)&&F>=0&&F<=le)return!ie;return $.current=!0,!0};ee.useEffect(()=>{W&&window.requestAnimationFrame(()=>{C(!0)})},[]);function G(U){N.current=null,$.current=!1,u(U)}return ee.createElement(hq,{"data-vaul-drawer-direction":w,"data-vaul-drawer":"","data-vaul-delayed-snap-points":O?"true":"false","data-vaul-snap-points":y&&W?"true":"false","data-vaul-custom-container":b?"true":"false","data-vaul-animate":R?.current?"true":"false",...r,ref:I,style:m&&m.length>0?{"--snap-point-height":`${m[p??0]}px`,...t}:t,onPointerDown:U=>{E||(r.onPointerDown==null||r.onPointerDown.call(r,U),N.current={x:U.pageX,y:U.pageY},c(U))},onOpenAutoFocus:U=>{n?.(U),T||U.preventDefault()},onPointerDownOutside:U=>{if(e?.(U),!g||U.defaultPrevented){U.preventDefault();return}f.current&&(f.current=!1)},onFocusOutside:U=>{if(!g){U.preventDefault();return}},onPointerMove:U=>{if(P.current=U,E||(r.onPointerMove==null||r.onPointerMove.call(r,U),!N.current))return;const J=U.pageY-N.current.y,le=U.pageX-N.current.x,F=U.pointerType==="touch"?10:2;V({x:le,y:J},w,F)?d(U):(Math.abs(le)>F||Math.abs(J)>F)&&(N.current=null)},onPointerUp:U=>{r.onPointerUp==null||r.onPointerUp.call(r,U),N.current=null,$.current=!1,u(U)},onPointerOut:U=>{r.onPointerOut==null||r.onPointerOut.call(r,U),G(P.current)},onContextMenu:U=>{r.onContextMenu==null||r.onContextMenu.call(r,U),P.current&&G(P.current)}})});J4.displayName="Drawer.Content";const _W=250,bW=120,wW=ee.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:a,isDragging:i,snapPoints:c,activeSnapPoint:u,setActiveSnapPoint:d,dismissible:f,handleOnly:m,isOpen:p,onPress:g,onDrag:y}=Id(),w=ee.useRef(null),S=ee.useRef(!1);function b(){if(S.current){T();return}window.setTimeout(()=>{E()},bW)}function E(){if(i||e||S.current){T();return}if(T(),!c||c.length===0){f||a();return}if(u===c[c.length-1]&&f){a();return}const C=c.findIndex(N=>N===u);if(C===-1)return;const I=c[C+1];d(I)}function R(){w.current=window.setTimeout(()=>{S.current=!0},_W)}function T(){w.current&&window.clearTimeout(w.current),S.current=!1}return ee.createElement("div",{onClick:b,onPointerCancel:T,onPointerDown:O=>{m&&g(O),R()},onPointerMove:O=>{m&&y(O)},ref:r,"data-vaul-drawer-visible":p?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},ee.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});wW.displayName="Drawer.Handle";function SW(e){const t=Id(),{container:n=t.container,...r}=e;return ee.createElement(dq,{container:n,...r})}const aae={Root:yW,Content:J4,Overlay:X4,Trigger:uq,Portal:SW,Title:pq};var sl=(e,t,n)=>new Promise((r,a)=>{var i=d=>{try{u(n.next(d))}catch(f){a(f)}},c=d=>{try{u(n.throw(d))}catch(f){a(f)}},u=d=>d.done?r(d.value):Promise.resolve(d.value).then(i,c);u((n=n.apply(e,t)).next())}),Ep=class extends Error{},EW=class extends Error{},RW=e=>Math.exp(e)*150,xW=(e,...t)=>sl(void 0,[e,...t],function*(n,{attempts:r=4}={}){var a;let i;for(let c=0;c<r;c++)try{return yield n()}catch(u){i=u,yield new Promise(d=>setTimeout(d,RW(c)))}throw new Ep((a=i?.message)!=null?a:"Exhausted all retries")}),Ou,eM="captchaFoxOnLoad",OO=`https://cdn.captchafox.com/api.js?render=explicit&onload=${eM}`;function TW(){return sl(this,arguments,function*({nonce:e}={}){return Ou&&document.querySelector(`script[src="${OO}"]`)||(Ou=new Promise((t,n)=>{window[eM]=t;const r=document.createElement("script");r.src=OO,r.async=!0,r.defer=!0,r.onerror=a=>{r.remove(),Ou=void 0,n(a)},e&&(r.nonce=e),document.body.appendChild(r)})),Ou})}function OW(){return sl(this,arguments,function*(e={}){return xW(()=>TW(e))})}var jc=()=>typeof window?.captchafox<"u",tM=A.forwardRef(({executeTimeoutSeconds:e=30,sitekey:t,lang:n,mode:r,theme:a,className:i,nonce:c,i18n:u,onError:d,onVerify:f,onLoad:m,onFail:p,onClose:g,onChallengeChange:y,onChallengeOpen:w},S)=>{const[b,E]=A.useState(),[R,T]=A.useState(),O=A.useRef(!1),C=A.useRef(),I=A.useRef(),N=A.useRef(),P=A.useRef(!1);A.useImperativeHandle(S,()=>({getResponse(){return!jc()||!R?(console.warn("[CaptchaFox] Widget has not been loaded"),""):window.captchafox.getResponse(R)},reset(){if(!jc()||!R){console.warn("[CaptchaFox] Widget has not been loaded");return}window.captchafox.reset(R)},remove(){if(!jc()||!R){console.warn("[CaptchaFox] Widget has not been loaded");return}T(void 0),window.captchafox.remove(R)},execute:()=>sl(void 0,null,function*(){if(P.current)return Promise.reject(new Ep);if(!jc()||!R)return W();try{return yield window.captchafox.execute(R)}catch(U){const J=V(U);return Promise.reject(J)}})}),[R]),A.useEffect(()=>{R&&m?.()},[R]),A.useEffect(()=>()=>{$()},[]),A.useEffect(()=>{b&&(O.current?jc()&&G():OW({nonce:c}).then(()=>sl(void 0,null,function*(){jc()&&(O.current=!0,yield G())})).catch(U=>{var J;d?.(U),P.current=!0,(J=N.current)==null||J.call(N),console.error("[CaptchaFox] Could not load script:",U)}))},[b,t,n,r]);const $=()=>{clearTimeout(I.current)},W=()=>new Promise((U,J)=>{N.current=()=>{$(),J(new Ep)},I.current=setTimeout(()=>{J(new EW("Execute timed out"))},e*1e3),C.current=le=>{$(),window.captchafox.execute(le).then(U).catch(F=>{const Y=V(F);J(Y)})}}),V=U=>U!=="challenge-aborted"&&U!=="rate-limited"?new Ep:U,G=()=>sl(void 0,null,function*(){var U,J,le;if((U=window.captchafox)==null||U.remove(R),!b||((J=b?.children)==null?void 0:J.length)===1)return;const F=yield(le=window.captchafox)==null?void 0:le.render(b,{lang:n,sitekey:t,mode:r,theme:a,i18n:u,onError:d,onFail:p,onClose:g,onVerify:f,onChallengeChange:y,onChallengeOpen:w});F&&(T(F),C.current&&(C.current(F),C.current=void 0))});return ee.createElement("div",{ref:E,id:R,className:i})});tM.displayName="CaptchaFox";function yo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function D_(e,t){return D_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},D_(e,t)}function CW(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,D_(e,t)}var AW=Object.defineProperty,IW=Object.defineProperties,NW=Object.getOwnPropertyDescriptors,sm=Object.getOwnPropertySymbols,nM=Object.prototype.hasOwnProperty,rM=Object.prototype.propertyIsEnumerable,L_=(e,t,n)=>t in e?AW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kr=(e,t)=>{for(var n in t||(t={}))nM.call(t,n)&&L_(e,n,t[n]);if(sm)for(var n of sm(t))rM.call(t,n)&&L_(e,n,t[n]);return e},oM=(e,t)=>IW(e,NW(t)),kW=(e,t)=>{var n={};for(var r in e)nM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sm)for(var r of sm(e))t.indexOf(r)<0&&rM.call(e,r)&&(n[r]=e[r]);return n},Wn=(e,t,n)=>(L_(e,typeof t!="symbol"?t+"":t,n),n),hl=(e,t,n)=>new Promise((r,a)=>{var i=d=>{try{u(n.next(d))}catch(f){a(f)}},c=d=>{try{u(n.throw(d))}catch(f){a(f)}},u=d=>d.done?r(d.value):Promise.resolve(d.value).then(i,c);u((n=n.apply(e,t)).next())}),MW="hCaptcha-script",Rp="hCaptchaOnLoad",CO="script-error",ks="@hCaptcha/loader";function PW(e){return Object.entries(e).filter(([,t])=>t||t===!1).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(String(n))}`).join("&")}function aM(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function sM(e){return e||document.head}function DW(e){var t;e.setTag("source",ks),e.setTag("url",document.URL),e.setContext("os",{UA:navigator.userAgent}),e.setContext("browser",Kr({},LW())),e.setContext("device",oM(Kr({},$W()),{screen_width_pixels:screen.width,screen_height_pixels:screen.height,language:navigator.language,orientation:((t=screen.orientation)==null?void 0:t.type)||"Unknown",processor_count:navigator.hardwareConcurrency,platform:navigator.platform}))}function LW(){var e,t,n,r,a,i;let c=navigator.userAgent,u,d;return c.indexOf("Firefox")!==-1?(u="Firefox",d=(e=c.match(/Firefox\/([\d.]+)/))==null?void 0:e[1]):c.indexOf("Edg")!==-1?(u="Microsoft Edge",d=(t=c.match(/Edg\/([\d.]+)/))==null?void 0:t[1]):c.indexOf("Chrome")!==-1&&c.indexOf("Safari")!==-1?(u="Chrome",d=(n=c.match(/Chrome\/([\d.]+)/))==null?void 0:n[1]):c.indexOf("Safari")!==-1&&c.indexOf("Chrome")===-1?(u="Safari",d=(r=c.match(/Version\/([\d.]+)/))==null?void 0:r[1]):c.indexOf("Opera")!==-1||c.indexOf("OPR")!==-1?(u="Opera",d=(a=c.match(/(Opera|OPR)\/([\d.]+)/))==null?void 0:a[2]):c.indexOf("MSIE")!==-1||c.indexOf("Trident")!==-1?(u="Internet Explorer",d=(i=c.match(/(MSIE |rv:)([\d.]+)/))==null?void 0:i[2]):(u="Unknown",d="Unknown"),{name:u,version:d}}function jW(e){return new Promise(t=>setTimeout(t,e))}function $W(){let e=navigator.userAgent,t;e.indexOf("Win")!==-1?t="Windows":e.indexOf("Mac")!==-1?t="Mac":e.indexOf("Linux")!==-1?t="Linux":e.indexOf("Android")!==-1?t="Android":e.indexOf("like Mac")!==-1||e.indexOf("iPhone")!==-1||e.indexOf("iPad")!==-1?t="iOS":t="Unknown";let n;return/Mobile|iPhone|iPod|Android/i.test(e)?n="Mobile":/Tablet|iPad/i.test(e)?n="Tablet":n="Desktop",{model:t,family:t,device:n}}var UW=class iM{constructor(t){Wn(this,"_parent"),Wn(this,"breadcrumbs",[]),Wn(this,"context",{}),Wn(this,"extra",{}),Wn(this,"tags",{}),Wn(this,"request"),Wn(this,"user"),this._parent=t}get parent(){return this._parent}child(){return new iM(this)}setRequest(t){return this.request=t,this}removeRequest(){return this.request=void 0,this}addBreadcrumb(t){return typeof t.timestamp>"u"&&(t.timestamp=new Date().toISOString()),this.breadcrumbs.push(t),this}setExtra(t,n){return this.extra[t]=n,this}removeExtra(t){return delete this.extra[t],this}setContext(t,n){return typeof n.type>"u"&&(n.type=t),this.context[t]=n,this}removeContext(t){return delete this.context[t],this}setTags(t){return this.tags=Kr(Kr({},this.tags),t),this}setTag(t,n){return this.tags[t]=n,this}removeTag(t){return delete this.tags[t],this}setUser(t){return this.user=t,this}removeUser(){return this.user=void 0,this}toBody(){let t=[],n=this;for(;n;)t.push(n),n=n.parent;return t.reverse().reduce((r,a)=>{var i;return r.breadcrumbs=[...(i=r.breadcrumbs)!=null?i:[],...a.breadcrumbs],r.extra=Kr(Kr({},r.extra),a.extra),r.contexts=Kr(Kr({},r.contexts),a.context),r.tags=Kr(Kr({},r.tags),a.tags),a.user&&(r.user=a.user),a.request&&(r.request=a.request),r},{breadcrumbs:[],extra:{},contexts:{},tags:{},request:void 0,user:void 0})}clear(){this.breadcrumbs=[],this.context={},this.tags={},this.user=void 0}},zW=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,VW=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,FW=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,BW=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,Rh="?",AO="An unknown error occurred",qW="0.0.4";function HW(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}function pr(e){return(e+256).toString(16).substring(1)}function GW(){let e=HW(new Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,pr(e[0])+pr(e[1])+pr(e[2])+pr(e[3])+"-"+pr(e[4])+pr(e[5])+"-"+pr(e[6])+pr(e[7])+"-"+pr(e[8])+pr(e[9])+"-"+pr(e[10])+pr(e[11])+pr(e[12])+pr(e[13])+pr(e[14])+pr(e[15])}var ZW=[[zW,"chrome"],[FW,"winjs"],[VW,"gecko"]];function WW(e){var t,n,r,a;if(!e.stack)return null;let i=[],c=(r=(n=(t=e.stack).split)==null?void 0:n.call(t,`
108
- `))!=null?r:[];for(let u=0;u<c.length;++u){let d=null,f=null,m=null;for(let[p,g]of ZW)if(f=p.exec(c[u]),f){m=g;break}if(!(!f||!m)){if(m==="chrome")d={filename:(a=f[2])!=null&&a.startsWith("address at ")?f[2].substring(11):f[2],function:f[1]||Rh,lineno:f[3]?+f[3]:null,colno:f[4]?+f[4]:null};else if(m==="winjs")d={filename:f[2],function:f[1]||Rh,lineno:+f[3],colno:f[4]?+f[4]:null};else if(m==="gecko")u===0&&!f[5]&&e.columnNumber!==void 0&&i.length>0&&(i[0].column=e.columnNumber+1),d={filename:f[3],function:f[1]||Rh,lineno:f[4]?+f[4]:null,colno:f[5]?+f[5]:null};else continue;!d.function&&d.lineno&&(d.function=Rh),i.push(d)}}return i.length?i.reverse():null}function KW(e){let t=WW(e);return{type:e.name,value:e.message,stacktrace:{frames:t??[]}}}function YW(e){let t=BW.exec(e),n=t?t.slice(1):[];if(n.length!==6)throw new Error("Invalid DSN");let r=n[5].split("/"),a=r.slice(0,-1).join("/");return n[0]+"://"+n[3]+(n[4]?":"+n[4]:"")+(a?"/"+a:"")+"/api/"+r.pop()+"/envelope/?sentry_version=7&sentry_key="+n[1]+(n[2]?"&sentry_secret="+n[2]:"")}function QW(e,t,n){var r,a;let i=Kr({event_id:GW().replaceAll("-",""),platform:"javascript",sdk:{name:"@hcaptcha/sentry",version:qW},environment:t,release:n,timestamp:Date.now()/1e3},e.scope.toBody());if(e.type==="exception"){i.message=(a=(r=e.error)==null?void 0:r.message)!=null?a:"Unknown error",i.fingerprint=[i.message];let c=[],u=e.error;for(let d=0;d<5&&u&&(c.push(KW(u)),!(!u.cause||!(u.cause instanceof Error)));d++)u=u.cause;i.exception={values:c.reverse()}}return e.type==="message"&&(i.message=e.message,i.level=e.level),i}function XW(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let n=e,{message:r}=n,a=kW(n,["message"]),i=new Error(typeof r=="string"?r:AO);return Object.assign(i,a)}let t=new Error(AO);return Object.assign(t,{cause:e})}function JW(e,t,n){return hl(this,null,function*(){var r,a;try{if(typeof fetch<"u"&&typeof AbortSignal<"u"){let i;if(n){let d=new AbortController;i=d.signal,setTimeout(()=>d.abort(),n)}let c=yield fetch(e,oM(Kr({},t),{signal:i})),u=yield c.text();return{status:c.status,body:u}}return yield new Promise((i,c)=>{var u,d;let f=new XMLHttpRequest;if(f.open((u=t?.method)!=null?u:"GET",e),f.onload=()=>i({status:f.status,body:f.responseText}),f.onerror=()=>c(new Error("XHR Network Error")),t?.headers)for(let[m,p]of Object.entries(t.headers))f.setRequestHeader(m,p);if(n){let m=setTimeout(()=>{f.abort(),c(new Error("Request timed out"))},n);f.onloadend=()=>{clearTimeout(m)}}f.send((d=t?.body)==null?void 0:d.toString())})}catch(i){return{status:0,body:(a=(r=i?.toString)==null?void 0:r.call(i))!=null?a:"Unknown error"}}})}var Mr,j_=(Mr=class{constructor(e){Wn(this,"apiURL"),Wn(this,"dsn"),Wn(this,"environment"),Wn(this,"release"),Wn(this,"sampleRate"),Wn(this,"debug"),Wn(this,"_scope"),Wn(this,"shouldBuffer",!1),Wn(this,"bufferlimit",20),Wn(this,"buffer",[]);var t,n,r,a,i;this.environment=e.environment,this.release=e.release,this.sampleRate=(t=e.sampleRate)!=null?t:1,this.debug=(n=e.debug)!=null?n:!1,this._scope=(r=e.scope)!=null?r:new UW,this.apiURL=YW(e.dsn),this.dsn=e.dsn,this.shouldBuffer=(a=e.buffer)!=null?a:!1,this.bufferlimit=(i=e.bufferLimit)!=null?i:20}static init(e){Mr._instance||(Mr._instance=new Mr(e))}static get instance(){if(!Mr._instance)throw new Error("Sentry has not been initialized");return Mr._instance}log(...e){this.debug&&console.log(...e)}get scope(){return this._scope}static get scope(){return Mr.instance.scope}withScope(e){let t=this._scope.child();e(t)}static withScope(e){Mr.instance.withScope(e)}captureException(e,t){this.captureEvent({type:"exception",level:"error",error:XW(e),scope:t??this._scope})}static captureException(e,t){Mr.instance.captureException(e,t)}captureMessage(e,t="info",n){this.captureEvent({type:"message",level:t,message:e,scope:n??this._scope})}static captureMessage(e,t="info",n){Mr.instance.captureMessage(e,t,n)}captureEvent(e){if(Math.random()>=this.sampleRate){this.log("Dropped event due to sample rate");return}if(this.shouldBuffer){if(this.buffer.length>=this.bufferlimit)return;this.buffer.push(e)}else this.sendEvent(e)}sendEvent(e,t=5e3){return hl(this,null,function*(){try{this.log("Sending sentry event",e);let n=QW(e,this.environment,this.release),r={event_id:n.event_id,dsn:this.dsn},a={type:"event"},i=JSON.stringify(r)+`
109
- `+JSON.stringify(a)+`
110
- `+JSON.stringify(n),c=yield JW(this.apiURL,{method:"POST",headers:{"Content-Type":"application/x-sentry-envelope"},body:i},t);this.log("Sentry response",c.status),c.status!==200&&(console.log(c.body),console.error("Failed to send event to Sentry",c))}catch(n){console.error("Failed to send event",n)}})}flush(e=5e3){return hl(this,null,function*(){try{this.log("Flushing sentry events",this.buffer.length);let t=this.buffer.splice(0,this.buffer.length).map(n=>this.sendEvent(n,e));yield Promise.all(t),this.log("Flushed all events")}catch(t){console.error("Failed to flush events",t)}})}static flush(e=5e3){return Mr.instance.flush(e)}static reset(){Mr._instance=void 0}},Wn(Mr,"_instance"),Mr),eK="https://d233059272824702afc8c43834c4912d@sentry.hcaptcha.com/6",tK="2.3.0",nK="production";function rK(e=!0){if(!e)return IO();j_.init({dsn:eK,release:tK,environment:nK});let t=j_.scope;return DW(t),IO(t)}function IO(e=null){return{addBreadcrumb:t=>{e&&e.addBreadcrumb(t)},captureRequest:t=>{e&&e.setRequest(t)},captureException:t=>{e&&j_.captureException(t,e)}}}function oK({scriptLocation:e,query:t,loadAsync:n=!0,crossOrigin:r="anonymous",apihost:a="https://js.hcaptcha.com",cleanup:i=!1,secureApi:c=!1,scriptSource:u=""}={},d){let f=sM(e),m=aM(f);return new Promise((p,g)=>{let y=m.document.createElement("script");y.id=MW,u?y.src=`${u}?onload=${Rp}`:c?y.src=`${a}/1/secure-api.js?onload=${Rp}`:y.src=`${a}/1/api.js?onload=${Rp}`,y.crossOrigin=r,y.async=n;let w=(S,b)=>{try{!c&&i&&f.removeChild(y),b(S)}catch(E){g(E)}};y.onload=S=>w(S,p),y.onerror=S=>{d&&d(y.src),w(S,g)},y.src+=t!==""?`&${t}`:"",f.appendChild(y)})}var xh=[];function aK(e={cleanup:!1},t){try{t.addBreadcrumb({category:ks,message:"hCaptcha loader params",data:e});let n=sM(e.scriptLocation),r=aM(n),a=xh.find(({scope:c})=>c===r.window);if(a)return t.addBreadcrumb({category:ks,message:"hCaptcha already loaded"}),a.promise;let i=new Promise((c,u)=>hl(this,null,function*(){try{r.window[Rp]=()=>{t.addBreadcrumb({category:ks,message:"hCaptcha script called onload function"}),c(r.window.hcaptcha)};let d=PW({custom:e.custom,render:e.render,sentry:e.sentry,assethost:e.assethost,imghost:e.imghost,reportapi:e.reportapi,endpoint:e.endpoint,host:e.host,recaptchacompat:e.recaptchacompat,hl:e.hl,uj:e.uj});yield oK(Kr({query:d},e),f=>{t.captureRequest({url:f,method:"GET"})}),t.addBreadcrumb({category:ks,message:"hCaptcha loaded",data:a})}catch{t.addBreadcrumb({category:ks,message:"hCaptcha failed to load"});let f=xh.findIndex(m=>m.scope===r.window);f!==-1&&xh.splice(f,1),u(new Error(CO))}}));return xh.push({promise:i,scope:r.window}),i}catch(n){return t.captureException(n),Promise.reject(new Error(CO))}}function cM(e,t,n=0){return hl(this,null,function*(){var r,a;let i=(r=e.maxRetries)!=null?r:2,c=(a=e.retryDelay)!=null?a:1e3,u=n<i?"Retry loading hCaptcha Api":"Exceeded maximum retries";try{return yield aK(e,t)}catch(d){return t.addBreadcrumb({category:ks,message:u}),n>=i?(t.captureException(d),Promise.reject(d)):(t.addBreadcrumb({category:ks,message:`Waiting ${c}ms before retry attempt ${n+1}`}),yield jW(c),n+=1,cM(e,t,n))}})}function sK(){return hl(this,arguments,function*(e={}){let t=rK(e.sentry);return yield cM(e,t)})}function NO(e){var t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function kO(e){return e||document.head}var iK=(function(e){CW(t,e);function t(r){var a;return a=e.call(this,r)||this,a._hcaptcha=void 0,a.renderCaptcha=a.renderCaptcha.bind(yo(a)),a.resetCaptcha=a.resetCaptcha.bind(yo(a)),a.removeCaptcha=a.removeCaptcha.bind(yo(a)),a.isReady=a.isReady.bind(yo(a)),a._onReady=null,a.loadCaptcha=a.loadCaptcha.bind(yo(a)),a.handleOnLoad=a.handleOnLoad.bind(yo(a)),a.handleSubmit=a.handleSubmit.bind(yo(a)),a.handleExpire=a.handleExpire.bind(yo(a)),a.handleError=a.handleError.bind(yo(a)),a.handleOpen=a.handleOpen.bind(yo(a)),a.handleClose=a.handleClose.bind(yo(a)),a.handleChallengeExpired=a.handleChallengeExpired.bind(yo(a)),a.ref=A.createRef(),a.apiScriptRequested=!1,a.sentryHub=null,a.captchaId="",a._pendingExecute=null,a.state={isApiReady:!1,isRemoved:!1,elementId:r.id},a}var n=t.prototype;return n.componentDidMount=function(){var a=this,i=kO(this.props.scriptLocation),c=NO(i);this._hcaptcha=c.window.hcaptcha||void 0;var u=typeof this._hcaptcha<"u";if(u){this.setState({isApiReady:!0},function(){a.renderCaptcha()});return}this.loadCaptcha()},n.componentWillUnmount=function(){var a=this._hcaptcha,i=this.captchaId;this._cancelPendingExecute("react-component-unmounted"),this.isReady()&&(a.reset(i),a.remove(i))},n.shouldComponentUpdate=function(a,i){return!(this.state.isApiReady!==i.isApiReady||this.state.isRemoved!==i.isRemoved)},n.componentDidUpdate=function(a){var i=this,c=["sitekey","size","theme","tabindex","languageOverride","endpoint"],u=c.every(function(d){return a[d]===i.props[d]});u||this.removeCaptcha(function(){i.renderCaptcha()})},n.loadCaptcha=function(){if(!this.apiScriptRequested){var a=this.props,i=a.apihost,c=a.assethost,u=a.endpoint,d=a.host,f=a.imghost,m=a.languageOverride,p=a.reCaptchaCompat,g=a.reportapi,y=a.sentry,w=a.custom,S=a.loadAsync,b=a.scriptLocation,E=a.scriptSource,R=a.secureApi,T=a.cleanup,O=T===void 0?!0:T,C=a.userJourneys,I={render:"explicit",apihost:i,assethost:c,endpoint:u,hl:m,host:d,imghost:f,recaptchacompat:p===!1?"off":null,reportapi:g,sentry:y,custom:w,loadAsync:S,scriptLocation:b,scriptSource:E,secureApi:R,cleanup:O,uj:C!==void 0?C:!1};sK(I).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}},n.renderCaptcha=function(a){var i=this,c=this.props.onReady,u=this.state.isApiReady,d=this.captchaId;if(!(!u||d)){var f=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),m=this._hcaptcha,p=m.render(this.ref.current,f);this.captchaId=p,this.setState({isRemoved:!1},function(){a&&a(),c&&c(),i._onReady&&i._onReady(p)})}},n.resetCaptcha=function(){var a=this._hcaptcha,i=this.captchaId;this.isReady()&&(a.reset(i),this._cancelPendingExecute("hcaptcha-reset"))},n.removeCaptcha=function(a){var i=this,c=this._hcaptcha,u=this.captchaId;this._cancelPendingExecute("hcaptcha-removed"),this.isReady()&&this.setState({isRemoved:!0},function(){i.captchaId="",c.remove(u),a&&a()})},n.handleOnLoad=function(){var a=this;this.setState({isApiReady:!0},function(){var i=kO(a.props.scriptLocation),c=NO(i);a._hcaptcha=c.window.hcaptcha,a.renderCaptcha(function(){var u=a.props.onLoad;u&&u()})})},n.handleSubmit=function(a){var i=this.props.onVerify,c=this.state.isRemoved,u=this._hcaptcha,d=this.captchaId;if(!(typeof u>"u"||c)){var f=u.getResponse(d),m=u.getRespKey(d);i&&i(f,m)}},n.handleExpire=function(){var a=this.props.onExpire,i=this._hcaptcha,c=this.captchaId;this.isReady()&&(i.reset(c),a&&a())},n.handleError=function(a){var i=this.props.onError,c=this._hcaptcha,u=this.captchaId;this.isReady()&&c.reset(u),i&&i(a)},n.isReady=function(){var a=this.state,i=a.isApiReady,c=a.isRemoved;return i&&!c},n._cancelPendingExecute=function(a){if(this._pendingExecute){var i=this._pendingExecute;this._pendingExecute=null;var c=new Error(a);i.reject(c)}},n.handleOpen=function(){!this.isReady()||!this.props.onOpen||this.props.onOpen()},n.handleClose=function(){!this.isReady()||!this.props.onClose||this.props.onClose()},n.handleChallengeExpired=function(){!this.isReady()||!this.props.onChalExpired||this.props.onChalExpired()},n.execute=function(a){var i=this;a===void 0&&(a=null),a=typeof a=="object"?a:null;try{var c=this._hcaptcha,u=this.captchaId;if(a&&a.async&&this._pendingExecute&&this._cancelPendingExecute("hcaptcha-execute-replaced"),!this.isReady())return a&&a.async?new Promise(function(f,m){i._pendingExecute={resolve:f,reject:m},i._onReady=function(p){if(i._pendingExecute)try{var g=c.execute(p,a);g&&typeof g.then=="function"?g.then(function(y){i._pendingExecute=null,f(y)}).catch(function(y){i._pendingExecute=null,m(y)}):(i._pendingExecute=null,m(new Error("hcaptcha-execute-no-promise")))}catch(y){i._pendingExecute=null,m(y)}}}):(this._onReady=function(f){c.execute(f,a)},null);var d=c.execute(u,a);return a&&a.async&&d&&typeof d.then=="function"?new Promise(function(f,m){i._pendingExecute={resolve:f,reject:m},d.then(function(p){i._pendingExecute=null,f(p)}).catch(function(p){i._pendingExecute=null,m(p)})}):d}catch(f){return a&&a.async?Promise.reject(f):null}},n.close=function(){var a=this._hcaptcha,i=this.captchaId;if(this._cancelPendingExecute("hcaptcha-closed"),!!this.isReady())return a.close(i)},n.setData=function(a){var i=this._hcaptcha,c=this.captchaId;this.isReady()&&(a&&typeof a!="object"&&(a=null),i.setData(c,a))},n.getResponse=function(){var a=this._hcaptcha;return a.getResponse(this.captchaId)},n.getRespKey=function(){var a=this._hcaptcha;return a.getRespKey(this.captchaId)},n.render=function(){var a=this.state.elementId;return A.createElement("div",{ref:this.ref,id:a})},t})(A.Component),cK=({as:e="div",...t},n)=>x.jsx(e,{...t,ref:n}),lK=A.forwardRef(cK),uK="https://challenges.cloudflare.com/turnstile/v0/api.js",R1="cf-turnstile-script",dK="cf-turnstile",x1="onloadTurnstileCallback",lM=e=>!!document.getElementById(e),fK=({render:e="explicit",onLoadCallbackName:t=x1,scriptOptions:{nonce:n="",defer:r=!0,async:a=!0,id:i="",appendTo:c,onError:u,crossOrigin:d=""}={}})=>{let f=i||R1;if(lM(f))return;let m=document.createElement("script");m.id=f,m.src=`${uK}?onload=${t}&render=${e}`,!document.querySelector(`script[src="${m.src}"]`)&&(m.defer=!!r,m.async=!!a,n&&(m.nonce=n),d&&(m.crossOrigin=d),u&&(m.onerror=u,delete window[t]),(c==="body"?document.body:document.getElementsByTagName("head")[0]).appendChild(m))},bi={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:"hidden"},flexible:{minWidth:300,width:"100%",height:65},interactionOnly:{width:"fit-content",height:"auto",display:"flex"}};function hK(e){if(e!=="invisible"&&e!=="interactionOnly")return e}function pK(e=R1){let[t,n]=A.useState(!1);return A.useEffect(()=>{let r=()=>{lM(e)&&n(!0)},a=new MutationObserver(r);return a.observe(document,{childList:!0,subtree:!0}),r(),()=>{a.disconnect()}},[e]),t}var Ku="unloaded",uM,mK=new Promise((e,t)=>{uM={resolve:e,reject:t},Ku==="ready"&&e(void 0)}),MO=(e=x1)=>(Ku==="unloaded"&&(Ku="loading",window[e]=()=>{uM.resolve(),Ku="ready",delete window[e]}),mK),dM=A.forwardRef((e,t)=>{let{scriptOptions:n,options:r={},siteKey:a,onWidgetLoad:i,onSuccess:c,onExpire:u,onError:d,onBeforeInteractive:f,onAfterInteractive:m,onUnsupported:p,onTimeout:g,onLoadScript:y,id:w,style:S,as:b="div",injectScript:E=!0,rerenderOnCallbackChange:R=!1,...T}=e,O=r.size,C=A.useCallback(()=>typeof O>"u"?{}:r.execution==="execute"?bi.invisible:r.appearance==="interaction-only"?bi.interactionOnly:bi[O],[r.execution,O,r.appearance]),[I,N]=A.useState(C()),P=A.useRef(null),[$,W]=A.useState(!1),V=A.useRef(void 0),G=A.useRef(!1),U=w||dK,J=A.useRef({onSuccess:c,onError:d,onExpire:u,onBeforeInteractive:f,onAfterInteractive:m,onUnsupported:p,onTimeout:g});A.useEffect(()=>{R||(J.current={onSuccess:c,onError:d,onExpire:u,onBeforeInteractive:f,onAfterInteractive:m,onUnsupported:p,onTimeout:g})});let le=n?.id||R1,F=pK(le),Y=n?.onLoadCallbackName||x1,ie=r.appearance||"always",fe=A.useMemo(()=>({sitekey:a,action:r.action,cData:r.cData,theme:r.theme||"auto",language:r.language||"auto",tabindex:r.tabIndex,"response-field":r.responseField,"response-field-name":r.responseFieldName,size:hK(O),retry:r.retry||"auto","retry-interval":r.retryInterval||8e3,"refresh-expired":r.refreshExpired||"auto","refresh-timeout":r.refreshTimeout||"auto",execution:r.execution||"render",appearance:r.appearance||"always","feedback-enabled":r.feedbackEnabled??!0,callback:D=>{G.current=!0,R?c?.(D):J.current.onSuccess?.(D)},"error-callback":R?d:(...D)=>J.current.onError?.(...D),"expired-callback":R?u:(...D)=>J.current.onExpire?.(...D),"before-interactive-callback":R?f:(...D)=>J.current.onBeforeInteractive?.(...D),"after-interactive-callback":R?m:(...D)=>J.current.onAfterInteractive?.(...D),"unsupported-callback":R?p:(...D)=>J.current.onUnsupported?.(...D),"timeout-callback":R?g:(...D)=>J.current.onTimeout?.(...D)}),[r.action,r.appearance,r.cData,r.execution,r.language,r.refreshExpired,r.responseField,r.responseFieldName,r.retry,r.retryInterval,r.tabIndex,r.theme,r.feedbackEnabled,r.refreshTimeout,a,O,R,R?c:null,R?d:null,R?u:null,R?f:null,R?m:null,R?p:null,R?g:null]),K=A.useCallback(()=>typeof window<"u"&&!!window.turnstile,[]);return A.useEffect(function(){E&&!$&&(MO(Y),fK({onLoadCallbackName:Y,scriptOptions:{...n,id:le}}))},[E,$,n,le,Y]),A.useEffect(function(){Ku!=="ready"&&MO(Y).then(()=>W(!0)).catch(console.error)},[Y]),A.useEffect(function(){if(!P.current||!$)return;let D=!1;return(async()=>{if(D||!P.current)return;let q=window.turnstile.render(P.current,fe);V.current=q,V.current&&i?.(V.current)})(),()=>{D=!0,V.current&&(window.turnstile.remove(V.current),G.current=!1)}},[U,$,fe]),A.useImperativeHandle(t,()=>{let{turnstile:D}=window;return{getResponse(){if(!D?.getResponse||!V.current||!K()){console.warn("Turnstile has not been loaded");return}return D.getResponse(V.current)},async getResponsePromise(q=3e4,B=100){return new Promise((L,z)=>{let Q,me=async()=>{if(G.current&&window.turnstile&&V.current)try{let ve=window.turnstile.getResponse(V.current);return Q&&clearTimeout(Q),ve?L(ve):z(new Error("No response received"))}catch(ve){return Q&&clearTimeout(Q),console.warn("Failed to get response",ve),z(new Error("Failed to get response"))}Q||(Q=setTimeout(()=>{Q&&clearTimeout(Q),z(new Error("Timeout"))},q)),await new Promise(ve=>setTimeout(ve,B)),await me()};me()})},reset(){if(!D?.reset||!V.current||!K()){console.warn("Turnstile has not been loaded");return}r.execution==="execute"&&N(bi.invisible);try{G.current=!1,D.reset(V.current)}catch(q){console.warn(`Failed to reset Turnstile widget ${V}`,q)}},remove(){if(!D?.remove||!V.current||!K()){console.warn("Turnstile has not been loaded");return}N(bi.invisible),G.current=!1,D.remove(V.current),V.current=null},render(){if(!D?.render||!P.current||!K()||V.current){console.warn("Turnstile has not been loaded or container not found");return}let q=D.render(P.current,fe);return V.current=q,V.current&&i?.(V.current),r.execution!=="execute"&&N(O?bi[O]:{}),q},execute(){if(r.execution!=="execute"){console.warn('Execution mode is not set to "execute"');return}if(!D?.execute||!P.current||!V.current||!K()){console.warn("Turnstile has not been loaded or container not found");return}D.execute(P.current,fe),N(O?bi[O]:{})},isExpired(){return!D?.isExpired||!V.current||!K()?(console.warn("Turnstile has not been loaded"),!1):D.isExpired(V.current)}}},[V,r.execution,O,fe,P,K,$,i]),A.useEffect(()=>{if($||!F)return;if(window.turnstile){W(!0);return}let D=setInterval(()=>{window.turnstile&&(W(!0),clearInterval(D))},50);return()=>{clearInterval(D)}},[$,F]),A.useEffect(()=>{N(C())},[r.execution,O,ie]),A.useEffect(()=>{!F||typeof y!="function"||y()},[F]),x.jsx(lK,{ref:P,as:b,id:U,style:{...I,...S},...T})});dM.displayName="Turnstile";var y0={exports:{}},_0,PO;function gK(){if(PO)return _0;PO=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return _0=e,_0}var b0,DO;function vK(){if(DO)return b0;DO=1;var e=gK();function t(){}function n(){}return n.resetWarningCache=t,b0=function(){function r(c,u,d,f,m,p){if(p!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}r.isRequired=r;function a(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},b0}var LO;function T1(){return LO||(LO=1,y0.exports=vK()()),y0.exports}var yK=T1();const Pr=Za(yK);var _K=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function $_(){return $_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$_.apply(this,arguments)}function bK(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Th(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,U_(e,t)}function U_(e,t){return U_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},U_(e,t)}var Jm=(function(e){wK(t,e);function t(){var r;return r=e.call(this)||this,r.handleExpired=r.handleExpired.bind(Th(r)),r.handleErrored=r.handleErrored.bind(Th(r)),r.handleChange=r.handleChange.bind(Th(r)),r.handleRecaptchaRef=r.handleRecaptchaRef.bind(Th(r)),r}var n=t.prototype;return n.getCaptchaFunction=function(a){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[a]:this.props.grecaptcha[a]:null},n.getValue=function(){var a=this.getCaptchaFunction("getResponse");return a&&this._widgetId!==void 0?a(this._widgetId):null},n.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},n.execute=function(){var a=this.getCaptchaFunction("execute");if(a&&this._widgetId!==void 0)return a(this._widgetId);this._executeRequested=!0},n.executeAsync=function(){var a=this;return new Promise(function(i,c){a.executionResolve=i,a.executionReject=c,a.execute()})},n.reset=function(){var a=this.getCaptchaFunction("reset");a&&this._widgetId!==void 0&&a(this._widgetId)},n.forceReset=function(){var a=this.getCaptchaFunction("reset");a&&a()},n.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},n.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},n.handleChange=function(a){this.props.onChange&&this.props.onChange(a),this.executionResolve&&(this.executionResolve(a),delete this.executionReject,delete this.executionResolve)},n.explicitRender=function(){var a=this.getCaptchaFunction("render");if(a&&this._widgetId===void 0){var i=document.createElement("div");this._widgetId=a(i,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(i)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},n.componentDidMount=function(){this.explicitRender()},n.componentDidUpdate=function(){this.explicitRender()},n.handleRecaptchaRef=function(a){this.captcha=a},n.render=function(){var a=this.props;a.sitekey,a.onChange,a.theme,a.type,a.tabindex,a.onExpired,a.onErrored,a.size,a.stoken,a.grecaptcha,a.badge,a.hl,a.isolated;var i=bK(a,_K);return A.createElement("div",$_({},i,{ref:this.handleRecaptchaRef}))},t})(A.Component);Jm.displayName="ReCAPTCHA";Jm.propTypes={sitekey:Pr.string.isRequired,onChange:Pr.func,grecaptcha:Pr.object,theme:Pr.oneOf(["dark","light"]),type:Pr.oneOf(["image","audio"]),tabindex:Pr.number,onExpired:Pr.func,onErrored:Pr.func,size:Pr.oneOf(["compact","normal","invisible"]),stoken:Pr.string,hl:Pr.string,badge:Pr.oneOf(["bottomright","bottomleft","inline"]),isolated:Pr.bool};Jm.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var w0={exports:{}},Ut={};var jO;function SK(){if(jO)return Ut;jO=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,w=e?Symbol.for("react.lazy"):60116,S=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,R=e?Symbol.for("react.scope"):60119;function T(C){if(typeof C=="object"&&C!==null){var I=C.$$typeof;switch(I){case t:switch(C=C.type,C){case d:case f:case r:case i:case a:case p:return C;default:switch(C=C&&C.$$typeof,C){case u:case m:case w:case y:case c:return C;default:return I}}case n:return I}}}function O(C){return T(C)===f}return Ut.AsyncMode=d,Ut.ConcurrentMode=f,Ut.ContextConsumer=u,Ut.ContextProvider=c,Ut.Element=t,Ut.ForwardRef=m,Ut.Fragment=r,Ut.Lazy=w,Ut.Memo=y,Ut.Portal=n,Ut.Profiler=i,Ut.StrictMode=a,Ut.Suspense=p,Ut.isAsyncMode=function(C){return O(C)||T(C)===d},Ut.isConcurrentMode=O,Ut.isContextConsumer=function(C){return T(C)===u},Ut.isContextProvider=function(C){return T(C)===c},Ut.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===t},Ut.isForwardRef=function(C){return T(C)===m},Ut.isFragment=function(C){return T(C)===r},Ut.isLazy=function(C){return T(C)===w},Ut.isMemo=function(C){return T(C)===y},Ut.isPortal=function(C){return T(C)===n},Ut.isProfiler=function(C){return T(C)===i},Ut.isStrictMode=function(C){return T(C)===a},Ut.isSuspense=function(C){return T(C)===p},Ut.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===r||C===f||C===i||C===a||C===p||C===g||typeof C=="object"&&C!==null&&(C.$$typeof===w||C.$$typeof===y||C.$$typeof===c||C.$$typeof===u||C.$$typeof===m||C.$$typeof===b||C.$$typeof===E||C.$$typeof===R||C.$$typeof===S)},Ut.typeOf=T,Ut}var $O;function EK(){return $O||($O=1,w0.exports=SK()),w0.exports}var S0,UO;function RK(){if(UO)return S0;UO=1;var e=EK(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[e.ForwardRef]=r,i[e.Memo]=a;function c(w){return e.isMemo(w)?a:i[w.$$typeof]||t}var u=Object.defineProperty,d=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,m=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,g=Object.prototype;function y(w,S,b){if(typeof S!="string"){if(g){var E=p(S);E&&E!==g&&y(w,E,b)}var R=d(S);f&&(R=R.concat(f(S)));for(var T=c(w),O=c(S),C=0;C<R.length;++C){var I=R[C];if(!n[I]&&!(b&&b[I])&&!(O&&O[I])&&!(T&&T[I])){var N=m(S,I);try{u(w,I,N)}catch{}}}}return w}return S0=y,S0}var xK=RK();const TK=Za(xK);function z_(){return z_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z_.apply(this,arguments)}function OK(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function CK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Po={},AK=0;function IK(e,t){return t=t||{},function(r){var a=r.displayName||r.name||"Component",i=(function(u){CK(d,u);function d(m,p){var g;return g=u.call(this,m,p)||this,g.state={},g.__scriptURL="",g}var f=d.prototype;return f.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+AK++),this.__scriptLoaderID},f.setupScriptURL=function(){return this.__scriptURL=typeof e=="function"?e():e,this.__scriptURL},f.asyncScriptLoaderHandleLoad=function(p){var g=this;this.setState(p,function(){return g.props.asyncScriptOnLoad&&g.props.asyncScriptOnLoad(g.state)})},f.asyncScriptLoaderTriggerOnScriptLoaded=function(){var p=Po[this.__scriptURL];if(!p||!p.loaded)throw new Error("Script is not loaded.");for(var g in p.observers)p.observers[g](p);delete window[t.callbackName]},f.componentDidMount=function(){var p=this,g=this.setupScriptURL(),y=this.asyncScriptLoaderGetScriptLoaderID(),w=t,S=w.globalName,b=w.callbackName,E=w.scriptId;if(S&&typeof window[S]<"u"&&(Po[g]={loaded:!0,observers:{}}),Po[g]){var R=Po[g];if(R&&(R.loaded||R.errored)){this.asyncScriptLoaderHandleLoad(R);return}R.observers[y]=function(N){return p.asyncScriptLoaderHandleLoad(N)};return}var T={};T[y]=function(N){return p.asyncScriptLoaderHandleLoad(N)},Po[g]={loaded:!1,observers:T};var O=document.createElement("script");O.src=g,O.async=!0;for(var C in t.attributes)O.setAttribute(C,t.attributes[C]);E&&(O.id=E);var I=function(P){if(Po[g]){var $=Po[g],W=$.observers;for(var V in W)P(W[V])&&delete W[V]}};b&&typeof window<"u"&&(window[b]=function(){return p.asyncScriptLoaderTriggerOnScriptLoaded()}),O.onload=function(){var N=Po[g];N&&(N.loaded=!0,I(function(P){return b?!1:(P(N),!0)}))},O.onerror=function(){var N=Po[g];N&&(N.errored=!0,I(function(P){return P(N),!0}))},document.body.appendChild(O)},f.componentWillUnmount=function(){var p=this.__scriptURL;if(t.removeOnUnmount===!0)for(var g=document.getElementsByTagName("script"),y=0;y<g.length;y+=1)g[y].src.indexOf(p)>-1&&g[y].parentNode&&g[y].parentNode.removeChild(g[y]);var w=Po[p];w&&(delete w.observers[this.asyncScriptLoaderGetScriptLoaderID()],t.removeOnUnmount===!0&&delete Po[p])},f.render=function(){var p=t.globalName,g=this.props;g.asyncScriptOnLoad;var y=g.forwardedRef,w=OK(g,["asyncScriptOnLoad","forwardedRef"]);return p&&typeof window<"u"&&(w[p]=typeof window[p]<"u"?window[p]:void 0),w.ref=y,A.createElement(r,w)},d})(A.Component),c=A.forwardRef(function(u,d){return A.createElement(i,z_({},u,{forwardedRef:d}))});return c.displayName="AsyncScriptLoader("+a+")",c.propTypes={asyncScriptOnLoad:Pr.func},TK(c,r)}}var V_="onloadcallback",NK="grecaptcha";function F_(){return typeof window<"u"&&window.recaptchaOptions||{}}function kK(){var e=F_(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+V_+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+V_+"&render=explicit"}const MK=IK(kK,{callbackName:V_,globalName:NK,attributes:F_().nonce?{nonce:F_().nonce}:{}})(Jm);var PK=Object.defineProperty,DK=Object.defineProperties,LK=Object.getOwnPropertyDescriptors,im=Object.getOwnPropertySymbols,fM=Object.prototype.hasOwnProperty,hM=Object.prototype.propertyIsEnumerable,zO=(e,t,n)=>t in e?PK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jK=(e,t)=>{for(var n in t||(t={}))fM.call(t,n)&&zO(e,n,t[n]);if(im)for(var n of im(t))hM.call(t,n)&&zO(e,n,t[n]);return e},$K=(e,t)=>DK(e,LK(t)),UK=(e,t)=>{var n={};for(var r in e)fM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&im)for(var r of im(e))t.indexOf(r)<0&&hM.call(e,r)&&(n[r]=e[r]);return n};function zK(e){let t=setTimeout(e,0),n=setTimeout(e,10),r=setTimeout(e,50);return[t,n,r]}function VK(e){let t=A.useRef();return A.useEffect(()=>{t.current=e}),t.current}var FK=18,pM=40,BK=`${pM}px`,qK=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function HK({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[a,i]=A.useState(!1),[c,u]=A.useState(!1),[d,f]=A.useState(!1),m=A.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&a&&c,[a,c,n]),p=A.useCallback(()=>{let g=e.current,y=t.current;if(!g||!y||d||n==="none")return;let w=g,S=w.getBoundingClientRect().left+w.offsetWidth,b=w.getBoundingClientRect().top+w.offsetHeight/2,E=S-FK,R=b;document.querySelectorAll(qK).length===0&&document.elementFromPoint(E,R)===g||(i(!0),f(!0))},[e,t,d,n]);return A.useEffect(()=>{let g=e.current;if(!g||n==="none")return;function y(){let S=window.innerWidth-g.getBoundingClientRect().right;u(S>=pM)}y();let w=setInterval(y,1e3);return()=>{clearInterval(w)}},[e,n]),A.useEffect(()=>{let g=r||document.activeElement===t.current;if(n==="none"||!g)return;let y=setTimeout(p,0),w=setTimeout(p,2e3),S=setTimeout(p,5e3),b=setTimeout(()=>{f(!0)},6e3);return()=>{clearTimeout(y),clearTimeout(w),clearTimeout(S),clearTimeout(b)}},[t,r,n,p]),{hasPWMBadge:a,willPushPWMBadge:m,PWM_BADGE_SPACE_WIDTH:BK}}var mM=A.createContext({}),gM=A.forwardRef((e,t)=>{var n=e,{value:r,onChange:a,maxLength:i,textAlign:c="left",pattern:u,placeholder:d,inputMode:f="numeric",onComplete:m,pushPasswordManagerStrategy:p="increase-width",pasteTransformer:g,containerClassName:y,noScriptCSSFallback:w=GK,render:S,children:b}=n,E=UK(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),R,T,O,C,I;let[N,P]=A.useState(typeof E.defaultValue=="string"?E.defaultValue:""),$=r??N,W=VK($),V=A.useCallback(se=>{a?.(se),P(se)},[a]),G=A.useMemo(()=>u?typeof u=="string"?new RegExp(u):u:null,[u]),U=A.useRef(null),J=A.useRef(null),le=A.useRef({value:$,onChange:V,isIOS:typeof window<"u"&&((T=(R=window?.CSS)==null?void 0:R.supports)==null?void 0:T.call(R,"-webkit-touch-callout","none"))}),F=A.useRef({prev:[(O=U.current)==null?void 0:O.selectionStart,(C=U.current)==null?void 0:C.selectionEnd,(I=U.current)==null?void 0:I.selectionDirection]});A.useImperativeHandle(t,()=>U.current,[]),A.useEffect(()=>{let se=U.current,ue=J.current;if(!se||!ue)return;le.current.value!==se.value&&le.current.onChange(se.value),F.current.prev=[se.selectionStart,se.selectionEnd,se.selectionDirection];function Oe(){if(document.activeElement!==se){q(null),L(null);return}let Be=se.selectionStart,Ke=se.selectionEnd,Z=se.selectionDirection,te=se.maxLength,oe=se.value,Se=F.current.prev,xe=-1,Re=-1,ke;if(oe.length!==0&&Be!==null&&Ke!==null){let dr=Be===Ke,nn=Be===oe.length&&oe.length<te;if(dr&&!nn){let Rn=Be;if(Rn===0)xe=0,Re=1,ke="forward";else if(Rn===te)xe=Rn-1,Re=Rn,ke="backward";else if(te>1&&oe.length>1){let rn=0;if(Se[0]!==null&&Se[1]!==null){ke=Rn<Se[1]?"backward":"forward";let jn=Se[0]===Se[1]&&Se[0]<te;ke==="backward"&&!jn&&(rn=-1)}xe=rn+Rn,Re=rn+Rn+1}}xe!==-1&&Re!==-1&&xe!==Re&&U.current.setSelectionRange(xe,Re,ke)}let Je=xe!==-1?xe:Be,at=Re!==-1?Re:Ke,kt=ke??Z;q(Je),L(at),F.current.prev=[Je,at,kt]}if(document.addEventListener("selectionchange",Oe,{capture:!0}),Oe(),document.activeElement===se&&K(!0),!document.getElementById("input-otp-style")){let Be=document.createElement("style");if(Be.id="input-otp-style",document.head.appendChild(Be),Be.sheet){let Ke="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Cu(Be.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Cu(Be.sheet,`[data-input-otp]:autofill { ${Ke} }`),Cu(Be.sheet,`[data-input-otp]:-webkit-autofill { ${Ke} }`),Cu(Be.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Cu(Be.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Le=()=>{ue&&ue.style.setProperty("--root-height",`${se.clientHeight}px`)};Le();let Xe=new ResizeObserver(Le);return Xe.observe(se),()=>{document.removeEventListener("selectionchange",Oe,{capture:!0}),Xe.disconnect()}},[]);let[Y,ie]=A.useState(!1),[fe,K]=A.useState(!1),[D,q]=A.useState(null),[B,L]=A.useState(null);A.useEffect(()=>{zK(()=>{var se,ue,Oe,Le;(se=U.current)==null||se.dispatchEvent(new Event("input"));let Xe=(ue=U.current)==null?void 0:ue.selectionStart,Be=(Oe=U.current)==null?void 0:Oe.selectionEnd,Ke=(Le=U.current)==null?void 0:Le.selectionDirection;Xe!==null&&Be!==null&&(q(Xe),L(Be),F.current.prev=[Xe,Be,Ke])})},[$,fe]),A.useEffect(()=>{W!==void 0&&$!==W&&W.length<i&&$.length===i&&m?.($)},[i,m,W,$]);let z=HK({containerRef:J,inputRef:U,pushPasswordManagerStrategy:p,isFocused:fe}),Q=A.useCallback(se=>{let ue=se.currentTarget.value.slice(0,i);if(ue.length>0&&G&&!G.test(ue)){se.preventDefault();return}typeof W=="string"&&ue.length<W.length&&document.dispatchEvent(new Event("selectionchange")),V(ue)},[i,V,W,G]),me=A.useCallback(()=>{var se;if(U.current){let ue=Math.min(U.current.value.length,i-1),Oe=U.current.value.length;(se=U.current)==null||se.setSelectionRange(ue,Oe),q(ue),L(Oe)}K(!0)},[i]),ve=A.useCallback(se=>{var ue,Oe;let Le=U.current;if(!g&&(!le.current.isIOS||!se.clipboardData||!Le))return;let Xe=se.clipboardData.getData("text/plain"),Be=g?g(Xe):Xe;se.preventDefault();let Ke=(ue=U.current)==null?void 0:ue.selectionStart,Z=(Oe=U.current)==null?void 0:Oe.selectionEnd,te=(Ke!==Z?$.slice(0,Ke)+Be+$.slice(Z):$.slice(0,Ke)+Be+$.slice(Ke)).slice(0,i);if(te.length>0&&G&&!G.test(te))return;Le.value=te,V(te);let oe=Math.min(te.length,i-1),Se=te.length;Le.setSelectionRange(oe,Se),q(oe),L(Se)},[i,V,G,$]),Ce=A.useMemo(()=>({position:"relative",cursor:E.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[E.disabled]),Ie=A.useMemo(()=>({position:"absolute",inset:0,width:z.willPushPWMBadge?`calc(100% + ${z.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:z.willPushPWMBadge?`inset(0 ${z.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:c,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[z.PWM_BADGE_SPACE_WIDTH,z.willPushPWMBadge,c]),H=A.useMemo(()=>A.createElement("input",$K(jK({autoComplete:E.autoComplete||"one-time-code"},E),{"data-input-otp":!0,"data-input-otp-placeholder-shown":$.length===0||void 0,"data-input-otp-mss":D,"data-input-otp-mse":B,inputMode:f,pattern:G?.source,"aria-placeholder":d,style:Ie,maxLength:i,value:$,ref:U,onPaste:se=>{var ue;ve(se),(ue=E.onPaste)==null||ue.call(E,se)},onChange:Q,onMouseOver:se=>{var ue;ie(!0),(ue=E.onMouseOver)==null||ue.call(E,se)},onMouseLeave:se=>{var ue;ie(!1),(ue=E.onMouseLeave)==null||ue.call(E,se)},onFocus:se=>{var ue;me(),(ue=E.onFocus)==null||ue.call(E,se)},onBlur:se=>{var ue;K(!1),(ue=E.onBlur)==null||ue.call(E,se)}})),[Q,me,ve,f,Ie,i,B,D,E,G?.source,$]),re=A.useMemo(()=>({slots:Array.from({length:i}).map((se,ue)=>{var Oe;let Le=fe&&D!==null&&B!==null&&(D===B&&ue===D||ue>=D&&ue<B),Xe=$[ue]!==void 0?$[ue]:null,Be=$[0]!==void 0?null:(Oe=d?.[ue])!=null?Oe:null;return{char:Xe,placeholderChar:Be,isActive:Le,hasFakeCaret:Le&&Xe===null}}),isFocused:fe,isHovering:!E.disabled&&Y}),[fe,Y,i,B,D,E.disabled,$]),be=A.useMemo(()=>S?S(re):A.createElement(mM.Provider,{value:re},b),[b,re,S]);return A.createElement(A.Fragment,null,w!==null&&A.createElement("noscript",null,A.createElement("style",null,w)),A.createElement("div",{ref:J,"data-input-otp-container":!0,style:Ce,className:y},be,A.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},H)))});gM.displayName="Input";function Cu(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var GK=`
111
- [data-input-otp] {
112
- --nojs-bg: white !important;
113
- --nojs-fg: black !important;
114
-
115
- background-color: var(--nojs-bg) !important;
116
- color: var(--nojs-fg) !important;
117
- caret-color: var(--nojs-fg) !important;
118
- letter-spacing: .25em !important;
119
- text-align: center !important;
120
- border: 1px solid var(--nojs-fg) !important;
121
- border-radius: 4px !important;
122
- width: 100% !important;
123
- }
124
- @media (prefers-color-scheme: dark) {
125
- [data-input-otp] {
126
- --nojs-bg: black !important;
127
- --nojs-fg: white !important;
128
- }
129
- }`,$c={},E0,VO;function vM(){return VO||(VO=1,E0={L:1,M:0,Q:3,H:2}),E0}var R0,FO;function yM(){return FO||(FO=1,R0={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),R0}var x0,BO;function ZK(){if(BO)return x0;BO=1;var e=yM();function t(n){this.mode=e.MODE_8BIT_BYTE,this.data=n}return t.prototype={getLength:function(n){return this.data.length},write:function(n){for(var r=0;r<this.data.length;r++)n.put(this.data.charCodeAt(r),8)}},x0=t,x0}var T0,qO;function WK(){if(qO)return T0;qO=1;var e=vM();function t(n,r){this.totalCount=n,this.dataCount=r}return t.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t.getRSBlocks=function(n,r){var a=t.getRsBlockTable(n,r);if(a==null)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+r);for(var i=a.length/3,c=new Array,u=0;u<i;u++)for(var d=a[u*3+0],f=a[u*3+1],m=a[u*3+2],p=0;p<d;p++)c.push(new t(f,m));return c},t.getRsBlockTable=function(n,r){switch(r){case e.L:return t.RS_BLOCK_TABLE[(n-1)*4+0];case e.M:return t.RS_BLOCK_TABLE[(n-1)*4+1];case e.Q:return t.RS_BLOCK_TABLE[(n-1)*4+2];case e.H:return t.RS_BLOCK_TABLE[(n-1)*4+3];default:return}},T0=t,T0}var O0,HO;function KK(){if(HO)return O0;HO=1;function e(){this.buffer=new Array,this.length=0}return e.prototype={get:function(t){var n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)==1},put:function(t,n){for(var r=0;r<n;r++)this.putBit((t>>>n-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(t){var n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},O0=e,O0}var C0,GO;function _M(){if(GO)return C0;GO=1;for(var e={glog:function(n){if(n<1)throw new Error("glog("+n+")");return e.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return e.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},t=0;t<8;t++)e.EXP_TABLE[t]=1<<t;for(var t=8;t<256;t++)e.EXP_TABLE[t]=e.EXP_TABLE[t-4]^e.EXP_TABLE[t-5]^e.EXP_TABLE[t-6]^e.EXP_TABLE[t-8];for(var t=0;t<255;t++)e.LOG_TABLE[e.EXP_TABLE[t]]=t;return C0=e,C0}var A0,ZO;function bM(){if(ZO)return A0;ZO=1;var e=_M();function t(n,r){if(n.length==null)throw new Error(n.length+"/"+r);for(var a=0;a<n.length&&n[a]==0;)a++;this.num=new Array(n.length-a+r);for(var i=0;i<n.length-a;i++)this.num[i]=n[i+a]}return t.prototype={get:function(n){return this.num[n]},getLength:function(){return this.num.length},multiply:function(n){for(var r=new Array(this.getLength()+n.getLength()-1),a=0;a<this.getLength();a++)for(var i=0;i<n.getLength();i++)r[a+i]^=e.gexp(e.glog(this.get(a))+e.glog(n.get(i)));return new t(r,0)},mod:function(n){if(this.getLength()-n.getLength()<0)return this;for(var r=e.glog(this.get(0))-e.glog(n.get(0)),a=new Array(this.getLength()),i=0;i<this.getLength();i++)a[i]=this.get(i);for(var i=0;i<n.getLength();i++)a[i]^=e.gexp(e.glog(n.get(i))+r);return new t(a,0).mod(n)}},A0=t,A0}var I0,WO;function YK(){if(WO)return I0;WO=1;var e=yM(),t=bM(),n=_M(),r={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},a={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(i){for(var c=i<<10;a.getBCHDigit(c)-a.getBCHDigit(a.G15)>=0;)c^=a.G15<<a.getBCHDigit(c)-a.getBCHDigit(a.G15);return(i<<10|c)^a.G15_MASK},getBCHTypeNumber:function(i){for(var c=i<<12;a.getBCHDigit(c)-a.getBCHDigit(a.G18)>=0;)c^=a.G18<<a.getBCHDigit(c)-a.getBCHDigit(a.G18);return i<<12|c},getBCHDigit:function(i){for(var c=0;i!=0;)c++,i>>>=1;return c},getPatternPosition:function(i){return a.PATTERN_POSITION_TABLE[i-1]},getMask:function(i,c,u){switch(i){case r.PATTERN000:return(c+u)%2==0;case r.PATTERN001:return c%2==0;case r.PATTERN010:return u%3==0;case r.PATTERN011:return(c+u)%3==0;case r.PATTERN100:return(Math.floor(c/2)+Math.floor(u/3))%2==0;case r.PATTERN101:return c*u%2+c*u%3==0;case r.PATTERN110:return(c*u%2+c*u%3)%2==0;case r.PATTERN111:return(c*u%3+(c+u)%2)%2==0;default:throw new Error("bad maskPattern:"+i)}},getErrorCorrectPolynomial:function(i){for(var c=new t([1],0),u=0;u<i;u++)c=c.multiply(new t([1,n.gexp(u)],0));return c},getLengthInBits:function(i,c){if(1<=c&&c<10)switch(i){case e.MODE_NUMBER:return 10;case e.MODE_ALPHA_NUM:return 9;case e.MODE_8BIT_BYTE:return 8;case e.MODE_KANJI:return 8;default:throw new Error("mode:"+i)}else if(c<27)switch(i){case e.MODE_NUMBER:return 12;case e.MODE_ALPHA_NUM:return 11;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 10;default:throw new Error("mode:"+i)}else if(c<41)switch(i){case e.MODE_NUMBER:return 14;case e.MODE_ALPHA_NUM:return 13;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 12;default:throw new Error("mode:"+i)}else throw new Error("type:"+c)},getLostPoint:function(i){for(var c=i.getModuleCount(),u=0,d=0;d<c;d++)for(var f=0;f<c;f++){for(var m=0,p=i.isDark(d,f),g=-1;g<=1;g++)if(!(d+g<0||c<=d+g))for(var y=-1;y<=1;y++)f+y<0||c<=f+y||g==0&&y==0||p==i.isDark(d+g,f+y)&&m++;m>5&&(u+=3+m-5)}for(var d=0;d<c-1;d++)for(var f=0;f<c-1;f++){var w=0;i.isDark(d,f)&&w++,i.isDark(d+1,f)&&w++,i.isDark(d,f+1)&&w++,i.isDark(d+1,f+1)&&w++,(w==0||w==4)&&(u+=3)}for(var d=0;d<c;d++)for(var f=0;f<c-6;f++)i.isDark(d,f)&&!i.isDark(d,f+1)&&i.isDark(d,f+2)&&i.isDark(d,f+3)&&i.isDark(d,f+4)&&!i.isDark(d,f+5)&&i.isDark(d,f+6)&&(u+=40);for(var f=0;f<c;f++)for(var d=0;d<c-6;d++)i.isDark(d,f)&&!i.isDark(d+1,f)&&i.isDark(d+2,f)&&i.isDark(d+3,f)&&i.isDark(d+4,f)&&!i.isDark(d+5,f)&&i.isDark(d+6,f)&&(u+=40);for(var S=0,f=0;f<c;f++)for(var d=0;d<c;d++)i.isDark(d,f)&&S++;var b=Math.abs(100*S/c/c-50)/5;return u+=b*10,u}};return I0=a,I0}var N0,KO;function QK(){if(KO)return N0;KO=1;var e=ZK(),t=WK(),n=KK(),r=YK(),a=bM();function i(u,d){this.typeNumber=u,this.errorCorrectLevel=d,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var c=i.prototype;return c.addData=function(u){var d=new e(u);this.dataList.push(d),this.dataCache=null},c.isDark=function(u,d){if(u<0||this.moduleCount<=u||d<0||this.moduleCount<=d)throw new Error(u+","+d);return this.modules[u][d]},c.getModuleCount=function(){return this.moduleCount},c.make=function(){if(this.typeNumber<1){var u=1;for(u=1;u<40;u++){for(var d=t.getRSBlocks(u,this.errorCorrectLevel),f=new n,m=0,p=0;p<d.length;p++)m+=d[p].dataCount;for(var p=0;p<this.dataList.length;p++){var g=this.dataList[p];f.put(g.mode,4),f.put(g.getLength(),r.getLengthInBits(g.mode,u)),g.write(f)}if(f.getLengthInBits()<=m*8)break}this.typeNumber=u}this.makeImpl(!1,this.getBestMaskPattern())},c.makeImpl=function(u,d){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var f=0;f<this.moduleCount;f++){this.modules[f]=new Array(this.moduleCount);for(var m=0;m<this.moduleCount;m++)this.modules[f][m]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(u,d),this.typeNumber>=7&&this.setupTypeNumber(u),this.dataCache==null&&(this.dataCache=i.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,d)},c.setupPositionProbePattern=function(u,d){for(var f=-1;f<=7;f++)if(!(u+f<=-1||this.moduleCount<=u+f))for(var m=-1;m<=7;m++)d+m<=-1||this.moduleCount<=d+m||(0<=f&&f<=6&&(m==0||m==6)||0<=m&&m<=6&&(f==0||f==6)||2<=f&&f<=4&&2<=m&&m<=4?this.modules[u+f][d+m]=!0:this.modules[u+f][d+m]=!1)},c.getBestMaskPattern=function(){for(var u=0,d=0,f=0;f<8;f++){this.makeImpl(!0,f);var m=r.getLostPoint(this);(f==0||u>m)&&(u=m,d=f)}return d},c.createMovieClip=function(u,d,f){var m=u.createEmptyMovieClip(d,f),p=1;this.make();for(var g=0;g<this.modules.length;g++)for(var y=g*p,w=0;w<this.modules[g].length;w++){var S=w*p,b=this.modules[g][w];b&&(m.beginFill(0,100),m.moveTo(S,y),m.lineTo(S+p,y),m.lineTo(S+p,y+p),m.lineTo(S,y+p),m.endFill())}return m},c.setupTimingPattern=function(){for(var u=8;u<this.moduleCount-8;u++)this.modules[u][6]==null&&(this.modules[u][6]=u%2==0);for(var d=8;d<this.moduleCount-8;d++)this.modules[6][d]==null&&(this.modules[6][d]=d%2==0)},c.setupPositionAdjustPattern=function(){for(var u=r.getPatternPosition(this.typeNumber),d=0;d<u.length;d++)for(var f=0;f<u.length;f++){var m=u[d],p=u[f];if(this.modules[m][p]==null)for(var g=-2;g<=2;g++)for(var y=-2;y<=2;y++)g==-2||g==2||y==-2||y==2||g==0&&y==0?this.modules[m+g][p+y]=!0:this.modules[m+g][p+y]=!1}},c.setupTypeNumber=function(u){for(var d=r.getBCHTypeNumber(this.typeNumber),f=0;f<18;f++){var m=!u&&(d>>f&1)==1;this.modules[Math.floor(f/3)][f%3+this.moduleCount-8-3]=m}for(var f=0;f<18;f++){var m=!u&&(d>>f&1)==1;this.modules[f%3+this.moduleCount-8-3][Math.floor(f/3)]=m}},c.setupTypeInfo=function(u,d){for(var f=this.errorCorrectLevel<<3|d,m=r.getBCHTypeInfo(f),p=0;p<15;p++){var g=!u&&(m>>p&1)==1;p<6?this.modules[p][8]=g:p<8?this.modules[p+1][8]=g:this.modules[this.moduleCount-15+p][8]=g}for(var p=0;p<15;p++){var g=!u&&(m>>p&1)==1;p<8?this.modules[8][this.moduleCount-p-1]=g:p<9?this.modules[8][15-p-1+1]=g:this.modules[8][15-p-1]=g}this.modules[this.moduleCount-8][8]=!u},c.mapData=function(u,d){for(var f=-1,m=this.moduleCount-1,p=7,g=0,y=this.moduleCount-1;y>0;y-=2)for(y==6&&y--;;){for(var w=0;w<2;w++)if(this.modules[m][y-w]==null){var S=!1;g<u.length&&(S=(u[g]>>>p&1)==1);var b=r.getMask(d,m,y-w);b&&(S=!S),this.modules[m][y-w]=S,p--,p==-1&&(g++,p=7)}if(m+=f,m<0||this.moduleCount<=m){m-=f,f=-f;break}}},i.PAD0=236,i.PAD1=17,i.createData=function(u,d,f){for(var m=t.getRSBlocks(u,d),p=new n,g=0;g<f.length;g++){var y=f[g];p.put(y.mode,4),p.put(y.getLength(),r.getLengthInBits(y.mode,u)),y.write(p)}for(var w=0,g=0;g<m.length;g++)w+=m[g].dataCount;if(p.getLengthInBits()>w*8)throw new Error("code length overflow. ("+p.getLengthInBits()+">"+w*8+")");for(p.getLengthInBits()+4<=w*8&&p.put(0,4);p.getLengthInBits()%8!=0;)p.putBit(!1);for(;!(p.getLengthInBits()>=w*8||(p.put(i.PAD0,8),p.getLengthInBits()>=w*8));)p.put(i.PAD1,8);return i.createBytes(p,m)},i.createBytes=function(u,d){for(var f=0,m=0,p=0,g=new Array(d.length),y=new Array(d.length),w=0;w<d.length;w++){var S=d[w].dataCount,b=d[w].totalCount-S;m=Math.max(m,S),p=Math.max(p,b),g[w]=new Array(S);for(var E=0;E<g[w].length;E++)g[w][E]=255&u.buffer[E+f];f+=S;var R=r.getErrorCorrectPolynomial(b),T=new a(g[w],R.getLength()-1),O=T.mod(R);y[w]=new Array(R.getLength()-1);for(var E=0;E<y[w].length;E++){var C=E+O.getLength()-y[w].length;y[w][E]=C>=0?O.get(C):0}}for(var I=0,E=0;E<d.length;E++)I+=d[E].totalCount;for(var N=new Array(I),P=0,E=0;E<m;E++)for(var w=0;w<d.length;w++)E<g[w].length&&(N[P++]=g[w][E]);for(var E=0;E<p;E++)for(var w=0;w<d.length;w++)E<y[w].length&&(N[P++]=y[w][E]);return N},N0=i,N0}var Oh={},YO;function XK(){if(YO)return Oh;YO=1,Object.defineProperty(Oh,"__esModule",{value:!0});var e=Object.assign||function(f){for(var m=1;m<arguments.length;m++){var p=arguments[m];for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(f[g]=p[g])}return f},t=T1(),n=i(t),r=Ws(),a=i(r);function i(f){return f&&f.__esModule?f:{default:f}}function c(f,m){var p={};for(var g in f)m.indexOf(g)>=0||Object.prototype.hasOwnProperty.call(f,g)&&(p[g]=f[g]);return p}var u={bgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,bgD:n.default.string.isRequired,fgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,fgD:n.default.string.isRequired,size:n.default.number.isRequired,title:n.default.string,viewBoxSize:n.default.number.isRequired,xmlns:n.default.string},d=(0,r.forwardRef)(function(f,m){var p=f.bgColor,g=f.bgD,y=f.fgD,w=f.fgColor,S=f.size,b=f.title,E=f.viewBoxSize,R=f.xmlns,T=R===void 0?"http://www.w3.org/2000/svg":R,O=c(f,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return a.default.createElement("svg",e({},O,{height:S,ref:m,viewBox:"0 0 "+E+" "+E,width:S,xmlns:T}),b?a.default.createElement("title",null,b):null,a.default.createElement("path",{d:g,fill:p}),a.default.createElement("path",{d:y,fill:w}))});return d.displayName="QRCodeSvg",d.propTypes=u,Oh.default=d,Oh}var QO;function JK(){if(QO)return $c;QO=1,Object.defineProperty($c,"__esModule",{value:!0}),$c.QRCode=void 0;var e=Object.assign||function(S){for(var b=1;b<arguments.length;b++){var E=arguments[b];for(var R in E)Object.prototype.hasOwnProperty.call(E,R)&&(S[R]=E[R])}return S},t=T1(),n=p(t),r=vM(),a=p(r),i=QK(),c=p(i),u=Ws(),d=p(u),f=XK(),m=p(f);function p(S){return S&&S.__esModule?S:{default:S}}function g(S,b){var E={};for(var R in S)b.indexOf(R)>=0||Object.prototype.hasOwnProperty.call(S,R)&&(E[R]=S[R]);return E}var y={bgColor:n.default.oneOfType([n.default.object,n.default.string]),fgColor:n.default.oneOfType([n.default.object,n.default.string]),level:n.default.string,size:n.default.number,value:n.default.string.isRequired},w=(0,u.forwardRef)(function(S,b){var E=S.bgColor,R=E===void 0?"#FFFFFF":E,T=S.fgColor,O=T===void 0?"#000000":T,C=S.level,I=C===void 0?"L":C,N=S.size,P=N===void 0?256:N,$=S.value,W=g(S,["bgColor","fgColor","level","size","value"]),V=new c.default(-1,a.default[I]);V.addData($),V.make();var G=V.modules;return d.default.createElement(m.default,e({},W,{bgColor:R,bgD:G.map(function(U,J){return U.map(function(le,F){return le?"":"M "+F+" "+J+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:O,fgD:G.map(function(U,J){return U.map(function(le,F){return le?"M "+F+" "+J+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:b,size:P,viewBoxSize:G.length}))});return $c.QRCode=w,w.displayName="QRCode",w.propTypes=y,$c.default=w,$c}var eY=JK();const tY=Za(eY);var nY="Separator",XO="horizontal",rY=["horizontal","vertical"],wM=A.forwardRef((e,t)=>{const{decorative:n,orientation:r=XO,...a}=e,i=oY(r)?r:XO,u=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return x.jsx(Ad.div,{"data-orientation":i,...u,...a,ref:t})});wM.displayName=nY;function oY(e){return rY.includes(e)}var aY=wM;function sY(e){const{authView:t="SIGN_IN",enabled:n=!0}={},{hooks:{useSession:r},basePath:a,viewPaths:i,replace:c}=A.useContext(mt),{data:u,isPending:d,error:f,refetch:m}=r(),p=u;return A.useEffect(()=>{if(!n||d||p)return;const y=new URLSearchParams(window.location.search).get("redirectTo")||window.location.pathname+window.location.search;c(`${a}/${i[t]}?redirectTo=${encodeURIComponent(y)}`)},[d,p,a,i,c,t,n]),{data:p,user:p?.user,isPending:d,error:f,refetch:m}}function dd({className:e,...t}){return x.jsx("div",{"data-slot":"card",className:Ae("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function O1({className:e,...t}){return x.jsx("div",{"data-slot":"card-header",className:Ae("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function SM({className:e,...t}){return x.jsx("div",{"data-slot":"card-title",className:Ae("leading-none font-semibold",e),...t})}function EM({className:e,...t}){return x.jsx("div",{"data-slot":"card-description",className:Ae("text-muted-foreground text-sm",e),...t})}function C1({className:e,...t}){return x.jsx("div",{"data-slot":"card-content",className:Ae("px-6",e),...t})}function JO({className:e,...t}){return x.jsx("div",{"data-slot":"card-footer",className:Ae("flex items-center px-6 [.border-t]:pt-6",e),...t})}function Fa({className:e,...t}){return x.jsx("div",{"data-slot":"skeleton",className:Ae("bg-accent animate-pulse rounded-md",e),...t})}var iY=PF("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function en({className:e,variant:t,size:n,asChild:r=!1,...a}){const i=r?kN:"button";return x.jsx(i,{"data-slot":"button",className:Ae(iY({variant:t,size:n,className:e})),...a})}async function cY(e,t,n,r){const a=await lY(e),i=document.createElement("canvas");i.width=i.height=n;const c=i.getContext("2d"),u=Math.min(a.width,a.height),d=(a.width-u)/2,f=(a.height-u)/2,m=u,p=u;c?.drawImage(a,d,f,m,p,0,0,n,n);const g=await new Promise(y=>i.toBlob(y,`image/${r}`));return new File([g],`${t}.${r}`,{type:`image/${r}`})}async function lY(e){return new Promise((t,n)=>{const r=new Image,a=new FileReader;a.onload=i=>{var c;r.src=(c=i.target)==null?void 0:c.result},r.onload=()=>t(r),r.onerror=i=>n(i),a.readAsDataURL(e)})}async function uY(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>t(r.result),r.onerror=n,r.readAsDataURL(e)})}function dY({...e}){return x.jsx(oZ,{"data-slot":"dropdown-menu",...e})}function fY({...e}){return x.jsx(aZ,{"data-slot":"dropdown-menu-trigger",...e})}function hY({className:e,sideOffset:t=4,...n}){return x.jsx(sZ,{children:x.jsx(iZ,{"data-slot":"dropdown-menu-content",sideOffset:t,className:Ae("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function e2({className:e,inset:t,variant:n="default",...r}){return x.jsx(cZ,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:Ae("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function RM({className:e,...t}){return x.jsx(dZ,{"data-slot":"label",className:Ae("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}var ma=fF,xM=A.createContext({}),bn=({...e})=>x.jsx(xM.Provider,{value:{name:e.name},children:x.jsx(uF,{...e})}),A1=()=>{const e=A.useContext(xM),t=A.useContext(TM),{getFieldState:n}=dF(),r=EN({name:e.name}),a=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...a}},TM=A.createContext({});function wn({className:e,...t}){const n=A.useId();return x.jsx(TM.Provider,{value:{id:n},children:x.jsx("div",{"data-slot":"form-item",className:Ae("grid gap-2",e),...t})})}function Sn({className:e,...t}){const{error:n,formItemId:r}=A1();return x.jsx(RM,{"data-slot":"form-label","data-error":!!n,className:Ae("data-[error=true]:text-destructive",e),htmlFor:r,...t})}function Dn({...e}){const{error:t,formItemId:n,formDescriptionId:r,formMessageId:a}=A1();return x.jsx(kN,{"data-slot":"form-control",id:n,"aria-describedby":t?`${r} ${a}`:`${r}`,"aria-invalid":!!t,...e})}function Fn({className:e,...t}){const{error:n,formMessageId:r}=A1(),a=n?String(n?.message??""):t.children;return a?x.jsx("p",{"data-slot":"form-message",id:r,className:Ae("text-destructive text-sm",e),...t,children:a}):null}function Fo({className:e,type:t,...n}){return x.jsx("input",{type:t,"data-slot":"input",className:Ae("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function OM({className:e,...t}){return x.jsx(bZ,{"data-slot":"avatar",className:Ae("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function CM({className:e,...t}){return x.jsx(wZ,{"data-slot":"avatar-image",className:Ae("aspect-square size-full",e),...t})}function AM({className:e,...t}){return x.jsx(SZ,{"data-slot":"avatar-fallback",className:Ae("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function pY({className:e,classNames:t,isPending:n,size:r,organization:a,localization:i,...c}){const{localization:u,avatar:d}=A.useContext(mt),f=A.useMemo(()=>({...u,...i}),[u,i]),m=a?.name,p=a?.logo;return n?x.jsx(Fa,{className:Ae("shrink-0 rounded-full",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):x.jsxs(OM,{className:Ae("bg-muted",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base),...c,children:[d?.Image?x.jsx(d.Image,{alt:m||f?.ORGANIZATION,className:t?.image,src:p||""}):x.jsx(CM,{alt:m||f?.ORGANIZATION,className:t?.image,src:p||void 0}),x.jsx(AM,{className:Ae("text-foreground",t?.fallback),delayMs:p?600:void 0,children:x.jsx(YV,{className:Ae("size-[50%]",t?.fallbackIcon)})})]})}function IM({className:e,classNames:t,isPending:n,size:r,organization:a,localization:i}){const{localization:c}=A.useContext(mt),u={...c,...i};return x.jsxs("div",{className:Ae("flex items-center gap-2 truncate",e,t?.base),children:[x.jsx(pY,{className:Ae(r!=="sm"&&"my-0.5"),classNames:t?.avatar,isPending:n,localization:u,organization:a,size:r}),x.jsx("div",{className:Ae("flex flex-col truncate text-left leading-tight",t?.content),children:n?x.jsxs(x.Fragment,{children:[x.jsx(Fa,{className:Ae("max-w-full",r==="lg"?"h-4.5 w-32":"h-3.5 w-24",t?.title,t?.skeleton)}),r!=="sm"&&x.jsx(Fa,{className:Ae("mt-1.5 max-w-full",r==="lg"?"h-3.5 w-24":"h-3 w-16",t?.subtitle,t?.skeleton)})]}):x.jsxs(x.Fragment,{children:[x.jsx("span",{className:Ae("truncate font-semibold",r==="lg"?"text-base":"text-sm",t?.title),children:a?.name||u?.ORGANIZATION}),r!=="sm"&&a?.slug&&x.jsx("span",{className:Ae("truncate opacity-70",r==="lg"?"text-sm":"text-xs",t?.subtitle),children:a.slug})]})})]})}function mY(e,t){if(!e)return null;try{const n=e.trim().toLowerCase(),a=new TextEncoder().encode(n),i=OZ(LZ(a)),c=t?.jpg?".jpg":"";let u=`https://gravatar.com/avatar/${i}${c}`;const d=new URLSearchParams;t?.size&&d.append("s",Math.min(Math.max(t.size,1),2048).toString()),t?.d&&d.append("d",t.d),t?.forceDefault&&d.append("f","y");const f=d.toString();return f&&(u+=`?${f}`),u}catch(n){return console.error("Error generating Gravatar URL:",n),null}}function gY({className:e,classNames:t,isPending:n,size:r,user:a,localization:i,...c}){const{localization:u,gravatar:d,avatar:f}=A.useContext(mt),m={...u,...i},p=a?.displayName||a?.name||a?.fullName||a?.firstName||a?.displayUsername||a?.username||a?.email,g=a?.image||a?.avatar||a?.avatarUrl,y=d&&a?.email?mY(a.email,d===!0?void 0:d):null,w=d?y:g;return n?x.jsx(Fa,{className:Ae("shrink-0 rounded-full",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):x.jsxs(OM,{className:Ae("bg-muted",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base),...c,children:[f?.Image?x.jsx(f.Image,{alt:p||m?.USER,className:t?.image,src:w||""}):x.jsx(CM,{alt:p||m?.USER,className:t?.image,src:w||void 0}),x.jsx(AM,{className:Ae("text-foreground uppercase",t?.fallback),delayMs:w?600:void 0,children:vY(p)||x.jsx(oF,{className:Ae("size-[50%]",t?.fallbackIcon)})})]})}var vY=e=>e?.slice(0,2);function I1({className:e,...t}){return x.jsx(L4,{"data-slot":"checkbox",className:Ae("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:x.jsx($4,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:x.jsx(gN,{className:"size-3.5"})})})}function yY({className:e,...t}){return x.jsx("textarea",{"data-slot":"textarea",className:Ae("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}var _Y=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M9.438 31.401a7 7 0 0 1-1.656-1.536a20 20 0 0 1-1.422-1.938a18.9 18.9 0 0 1-2.375-4.849c-.667-2-.99-3.917-.99-5.792c0-2.094.453-3.922 1.339-5.458a7.7 7.7 0 0 1 2.797-2.906a7.45 7.45 0 0 1 3.786-1.12q.705.002 1.51.198c.385.109.854.281 1.427.495c.729.281 1.13.453 1.266.495c.427.156.786.224 1.068.224c.214 0 .516-.068.859-.172c.193-.068.557-.188 1.078-.411c.516-.188.922-.349 1.245-.469c.495-.146.974-.281 1.401-.349a6.7 6.7 0 0 1 1.531-.063a9 9 0 0 1 2.589.557c1.359.547 2.458 1.401 3.276 2.615a6.4 6.4 0 0 0-.969.734a8.2 8.2 0 0 0-1.641 2.005a6.8 6.8 0 0 0-.859 3.359c.021 1.443.391 2.714 1.12 3.813a7.2 7.2 0 0 0 2.047 2.047c.417.281.776.474 1.12.604c-.161.5-.333.984-.536 1.464a19 19 0 0 1-1.667 3.083c-.578.839-1.031 1.464-1.375 1.88c-.536.635-1.052 1.12-1.573 1.458c-.573.38-1.25.583-1.938.583a4.4 4.4 0 0 1-1.38-.167c-.385-.13-.766-.271-1.141-.432a9 9 0 0 0-1.203-.453a6.3 6.3 0 0 0-3.099-.005c-.417.12-.818.26-1.214.432c-.557.234-.927.391-1.141.458c-.427.125-.87.203-1.318.229c-.693 0-1.339-.198-1.979-.599zm9.14-24.615c-.906.453-1.771.646-2.63.583c-.135-.865 0-1.75.359-2.719a7.3 7.3 0 0 1 1.333-2.24A7.1 7.1 0 0 1 19.812.733q1.319-.68 2.521-.734c.104.906 0 1.797-.333 2.76a8 8 0 0 1-1.333 2.344a6.8 6.8 0 0 1-2.115 1.682z",fill:"currentColor"})}),bY=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 256 199",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M216.856 16.597A208.5 208.5 0 0 0 164.042 0c-2.275 4.113-4.933 9.645-6.766 14.046q-29.538-4.442-58.533 0c-1.832-4.4-4.55-9.933-6.846-14.046a207.8 207.8 0 0 0-52.855 16.638C5.618 67.147-3.443 116.4 1.087 164.956c22.169 16.555 43.653 26.612 64.775 33.193A161 161 0 0 0 79.735 175.3a136.4 136.4 0 0 1-21.846-10.632a109 109 0 0 0 5.356-4.237c42.122 19.702 87.89 19.702 129.51 0a132 132 0 0 0 5.355 4.237a136 136 0 0 1-21.886 10.653c4.006 8.02 8.638 15.67 13.873 22.848c21.142-6.58 42.646-16.637 64.815-33.213c5.316-56.288-9.08-105.09-38.056-148.36M85.474 135.095c-12.645 0-23.015-11.805-23.015-26.18s10.149-26.2 23.015-26.2s23.236 11.804 23.015 26.2c.02 14.375-10.148 26.18-23.015 26.18m85.051 0c-12.645 0-23.014-11.805-23.014-26.18s10.148-26.2 23.014-26.2c12.867 0 23.236 11.804 23.015 26.2c0 14.375-10.148 26.18-23.015 26.18",fill:"#5865f2"})}),wY=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 256 218",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M63.995 0L0 40.771l63.995 40.772L128 40.771zM192 0l-64 40.775l64 40.775l64.001-40.775zM0 122.321l63.995 40.772L128 122.321L63.995 81.55zM192 81.55l-64 40.775l64 40.774l64-40.774zM64 176.771l64.005 40.772L192 176.771L128.005 136z",fill:"#0061ff"})}),SY=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{d:"M256 128C256 57.308 198.692 0 128 0S0 57.308 0 128c0 63.888 46.808 116.843 108 126.445V165H75.5v-37H108V99.8c0-32.08 19.11-49.8 48.348-49.8C170.352 50 185 52.5 185 52.5V84h-16.14C152.959 84 148 93.867 148 103.99V128h35.5l-5.675 37H148v89.445c61.192-9.602 108-62.556 108-126.445",fill:"#1877f2"}),x.jsx("path",{d:"m177.825 165l5.675-37H148v-24.01C148 93.866 152.959 84 168.86 84H185V52.5S170.352 50 156.347 50C127.11 50 108 67.72 108 99.8V128H75.5v37H108v89.445A129 129 0 0 0 128 256a129 129 0 0 0 20-1.555V165z",fill:"#fff"})]}),EY=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",fill:"currentColor"})}),RY=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 256 236",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{d:"m128.075 236.075l47.104-144.97H80.97z",fill:"#e24329"}),x.jsx("path",{d:"M128.075 236.074L80.97 91.104H14.956z",fill:"#fc6d26"}),x.jsx("path",{d:"M14.956 91.104L.642 135.16a9.75 9.75 0 0 0 3.542 10.903l123.891 90.012z",fill:"#fca326"}),x.jsx("path",{d:"M14.956 91.105H80.97L52.601 3.79c-1.46-4.493-7.816-4.492-9.275 0z",fill:"#e24329"}),x.jsx("path",{d:"m128.075 236.074l47.104-144.97h66.015z",fill:"#fc6d26"}),x.jsx("path",{d:"m241.194 91.104l14.314 44.056a9.75 9.75 0 0 1-3.543 10.903l-123.89 90.012z",fill:"#fca326"}),x.jsx("path",{d:"M241.194 91.105h-66.015l28.37-87.315c1.46-4.493 7.816-4.492 9.275 0z",fill:"#e24329"})]}),xY=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285f4"}),x.jsx("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34a853"}),x.jsx("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z",fill:"#fbbc05"}),x.jsx("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#eb4335"})]}),TY=({className:e})=>x.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"currentColor",d:"M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378c0 1.112.178 2.181.503 3.185c.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284c.278.173.48.408.71.694c.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542c.01.026.653 1.552 1.657 2.54c.616.605 1.01 1.223 1.082 1.912c.055.537-.096 1.059-.38 1.572c.637.121 1.294.187 1.967.187c.657 0 1.298-.063 1.921-.178c-.287-.517-.44-1.041-.384-1.581c.07-.69.465-1.307 1.081-1.913c1.004-.987 1.647-2.513 1.657-2.539c.021-.074.083-.285.233-.542c.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952c.23-.286.432-.52.71-.694c.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174a1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094c-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71c-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013a1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921a.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92a.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164c1.607-.007 2.984-1.155 3.572-1.164c.196-.003.305.12.305.454c0 .886-.424 2.328-1.563 3.202c-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026l-.01.008l-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116a1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243a1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444c-.034-.016-.104-.008-.2.022q-.094.03-.216.087q-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096a3 3 0 0 0-.26.219a2 2 0 0 0-.12.121a2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203c0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194c-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858s-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64c-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647s2.822 2.813 2.562 3.244s-1.176-.506-1.176-.506s-2.866-2.567-3.49-1.898s.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405c-.238.839-2.71-1.587-3.216-.642c-.506.946 3.49 2.056 3.522 2.064c1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194c1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858s.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64c.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647s-2.822 2.813-2.562 3.244s1.176-.506 1.176-.506s2.866-2.567 3.49-1.898s-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405c.238.839 2.71-1.587 3.216-.642c.506.946-3.49 2.056-3.522 2.064c-1.29.33-4.568 1.028-5.713-.624"})}),OY=({className:e})=>x.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",children:x.jsx("path",{fill:"currentColor",d:"M1.333 0h8v5.333H12V2.667h2.667V0h8v8H20v2.667h-2.667v2.666H20V16h2.667v8h-8v-2.667H12v-2.666H9.333V24h-8Z"})}),CY=({className:e})=>x.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"currentColor",d:"M2.886 4.18A11.98 11.98 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556q-.787.496-1.65.866L.951 7.277q.371-.863.866-1.65ZM.322 9.163l14.515 14.515q-1.066.26-2.195.322L0 11.358a12 12 0 0 1 .322-2.195m-.17 4.862l9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z"})}),AY=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 128 128",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{d:"M116 3H12a8.91 8.91 0 0 0-9 8.8v104.42a8.91 8.91 0 0 0 9 8.78h104a8.93 8.93 0 0 0 9-8.81V11.77A8.93 8.93 0 0 0 116 3",fill:"#0076b2"}),x.jsx("path",{d:"M21.06 48.73h18.11V107H21.06zm9.06-29a10.5 10.5 0 1 1-10.5 10.49a10.5 10.5 0 0 1 10.5-10.49m20.41 29h17.36v8h.24c2.42-4.58 8.32-9.41 17.13-9.41C103.6 47.28 107 59.35 107 75v32H88.89V78.65c0-6.75-.12-15.44-9.41-15.44s-10.87 7.36-10.87 15V107H50.53z",fill:"#fff"})]}),IY=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{d:"M121.666 121.666H0V0h121.666z",fill:"#f1511b"}),x.jsx("path",{d:"M256 121.666H134.335V0H256z",fill:"#80cc28"}),x.jsx("path",{d:"M121.663 256.002H0V134.336h121.663z",fill:"#00adef"}),x.jsx("path",{d:"M256 256.002H134.335V134.336H256z",fill:"#fbbc09"})]}),NY=({className:e})=>x.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"currentColor",d:"M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514c-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233l4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632"})}),kY=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("circle",{cx:"128",cy:"128",fill:"#ff4500",r:"128"}),x.jsx("path",{d:"M213.15 129.22c0-10.376-8.391-18.617-18.617-18.617a18.74 18.74 0 0 0-12.97 5.189c-12.818-9.157-30.368-15.107-49.9-15.87l8.544-39.981l27.773 5.95c.307 7.02 6.104 12.667 13.278 12.667c7.324 0 13.275-5.95 13.275-13.278c0-7.324-5.95-13.275-13.275-13.275c-5.188 0-9.768 3.052-11.904 7.478l-30.976-6.562c-.916-.154-1.832 0-2.443.458c-.763.458-1.22 1.22-1.371 2.136l-9.464 44.558c-19.837.612-37.692 6.562-50.662 15.872a18.74 18.74 0 0 0-12.971-5.188c-10.377 0-18.617 8.391-18.617 18.617c0 7.629 4.577 14.037 10.988 16.939a33.6 33.6 0 0 0-.458 5.646c0 28.686 33.42 52.036 74.621 52.036c41.202 0 74.622-23.196 74.622-52.036a35 35 0 0 0-.458-5.646c6.408-2.902 10.985-9.464 10.985-17.093M85.272 142.495c0-7.324 5.95-13.275 13.278-13.275c7.324 0 13.275 5.95 13.275 13.275s-5.95 13.278-13.275 13.278c-7.327.15-13.278-5.953-13.278-13.278m74.317 35.251c-9.156 9.157-26.553 9.768-31.588 9.768c-5.188 0-22.584-.765-31.59-9.768c-1.371-1.373-1.371-3.51 0-4.883c1.374-1.371 3.51-1.371 4.884 0c5.8 5.8 18.008 7.782 26.706 7.782s21.058-1.983 26.704-7.782c1.374-1.371 3.51-1.371 4.884 0c1.22 1.373 1.22 3.51 0 4.883m-2.443-21.822c-7.325 0-13.275-5.95-13.275-13.275s5.95-13.275 13.275-13.275c7.327 0 13.277 5.95 13.277 13.275c0 7.17-5.95 13.275-13.277 13.275",fill:"#fff"})]}),MY=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M18.926 23.998L0 18.892L5.075.002L24 5.108ZM15.348 10.09l-5.282-1.453l-1.414 5.273l5.282 1.453z",fill:"currentColor"})}),PY=({className:e})=>x.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"currentColor",d:"M6 15a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2h2zm1 0a2 2 0 0 1 2-2a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2a2 2 0 0 1-2-2zm2-8a2 2 0 0 1-2-2a2 2 0 0 1 2-2a2 2 0 0 1 2 2v2zm0 1a2 2 0 0 1 2 2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2a2 2 0 0 1 2-2zm8 2a2 2 0 0 1 2-2a2 2 0 0 1 2 2a2 2 0 0 1-2 2h-2zm-1 0a2 2 0 0 1-2 2a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2a2 2 0 0 1 2 2zm-2 8a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2v-2zm0-1a2 2 0 0 1-2-2a2 2 0 0 1 2-2h5a2 2 0 0 1 2 2a2 2 0 0 1-2 2z"})}),DY=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M128 0C57.308 0 0 57.309 0 128c0 70.696 57.309 128 128 128c70.697 0 128-57.304 128-128C256 57.314 198.697.007 127.998.007zm58.699 184.614c-2.293 3.76-7.215 4.952-10.975 2.644c-30.053-18.357-67.885-22.515-112.44-12.335a7.98 7.98 0 0 1-9.552-6.007a7.97 7.97 0 0 1 6-9.553c48.76-11.14 90.583-6.344 124.323 14.276c3.76 2.308 4.952 7.215 2.644 10.975m15.667-34.853c-2.89 4.695-9.034 6.178-13.726 3.289c-34.406-21.148-86.853-27.273-127.548-14.92c-5.278 1.594-10.852-1.38-12.454-6.649c-1.59-5.278 1.386-10.842 6.655-12.446c46.485-14.106 104.275-7.273 143.787 17.007c4.692 2.89 6.175 9.034 3.286 13.72zm1.345-36.293C162.457 88.964 94.394 86.71 55.007 98.666c-6.325 1.918-13.014-1.653-14.93-7.978c-1.917-6.328 1.65-13.012 7.98-14.935C93.27 62.027 168.434 64.68 215.929 92.876c5.702 3.376 7.566 10.724 4.188 16.405c-3.362 5.69-10.73 7.565-16.4 4.187z",fill:"#1ed760"})}),LY=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 256 290",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{d:"M189.72 104.421c18.678 13.345 41.56 21.197 66.273 21.197v-47.53a67 67 0 0 1-13.918-1.456v37.413c-24.711 0-47.59-7.851-66.272-21.195v96.996c0 48.523-39.356 87.855-87.9 87.855c-18.113 0-34.949-5.473-48.934-14.86c15.962 16.313 38.222 26.432 62.848 26.432c48.548 0 87.905-39.332 87.905-87.857v-96.995zm17.17-47.952c-9.546-10.423-15.814-23.893-17.17-38.785v-6.113h-13.189c3.32 18.927 14.644 35.097 30.358 44.898M69.673 225.607a40 40 0 0 1-8.203-24.33c0-22.192 18.001-40.186 40.21-40.186a40.3 40.3 0 0 1 12.197 1.883v-48.593c-4.61-.631-9.262-.9-13.912-.801v37.822a40.3 40.3 0 0 0-12.203-1.882c-22.208 0-40.208 17.992-40.208 40.187c0 15.694 8.997 29.281 22.119 35.9",fill:"#ff004f"}),x.jsx("path",{d:"M175.803 92.849c18.683 13.344 41.56 21.195 66.272 21.195V76.631c-13.794-2.937-26.005-10.141-35.186-20.162c-15.715-9.802-27.038-25.972-30.358-44.898h-34.643v189.843c-.079 22.132-18.049 40.052-40.21 40.052c-13.058 0-24.66-6.221-32.007-15.86c-13.12-6.618-22.118-20.206-22.118-35.898c0-22.193 18-40.187 40.208-40.187c4.255 0 8.356.662 12.203 1.882v-37.822c-47.692.985-86.047 39.933-86.047 87.834c0 23.912 9.551 45.589 25.053 61.428c13.985 9.385 30.82 14.86 48.934 14.86c48.545 0 87.9-39.335 87.9-87.857z"}),x.jsx("path",{d:"M242.075 76.63V66.516a66.3 66.3 0 0 1-35.186-10.047a66.47 66.47 0 0 0 35.186 20.163M176.53 11.57a68 68 0 0 1-.728-5.457V0h-47.834v189.845c-.076 22.13-18.046 40.05-40.208 40.05a40.06 40.06 0 0 1-18.09-4.287c7.347 9.637 18.949 15.857 32.007 15.857c22.16 0 40.132-17.918 40.21-40.05V11.571zM99.966 113.58v-10.769a89 89 0 0 0-12.061-.818C39.355 101.993 0 141.327 0 189.845c0 30.419 15.467 57.227 38.971 72.996c-15.502-15.838-25.053-37.516-25.053-61.427c0-47.9 38.354-86.848 86.048-87.833",fill:"#00f2ea"})]}),jY=({className:e})=>x.jsxs("svg",{className:e,version:"1.1",viewBox:"0 0 2400 2800",x:"0px",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",y:"0px",children:[x.jsx("style",{type:"text/css",children:`
130
- .st0{fill:#FFFFFF}
131
- .st1{fill:#9146FF}
132
- `}),x.jsx("title",{children:"Asset 2"}),x.jsxs("g",{children:[x.jsx("polygon",{className:"st0",points:"2200,1300 1800,1700 1400,1700 1050,2050 1050,1700 600,1700 600,200 2200,200"}),x.jsx("g",{children:x.jsxs("g",{children:[x.jsx("path",{className:"st1",d:"M500,0L0,500v1800h600v500l500-500h400l900-900V0H500z M2200,1300l-400,400h-400l-350,350v-350H600V200h1600V1300z"}),x.jsx("rect",{className:"st1",height:"600",width:"200",x:"1700",y:"550"}),x.jsx("rect",{className:"st1",height:"600",width:"200",x:"1150",y:"550"})]})})]})]}),$Y=({className:e})=>x.jsx("svg",{"data-testid":"geist-icon",height:"16","stroke-linejoin":"round",viewBox:"0 0 16 16",width:"16",className:e,style:{color:"currentcolor"},children:x.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 1L16 15H0L8 1Z",fill:"currentColor"})}),UY=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 576 512",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M545 117.7c3.7-12.5 0-21.7-17.8-21.7h-58.9c-15 0-21.9 7.9-25.6 16.7c0 0-30 73.1-72.4 120.5c-13.7 13.7-20 18.1-27.5 18.1c-3.7 0-9.4-4.4-9.4-16.9V117.7c0-15-4.2-21.7-16.6-21.7h-92.6c-9.4 0-15 7-15 13.5c0 14.2 21.2 17.5 23.4 57.5v86.8c0 19-3.4 22.5-10.9 22.5c-20 0-68.6-73.4-97.4-157.4c-5.8-16.3-11.5-22.9-26.6-22.9H38.8c-16.8 0-20.2 7.9-20.2 16.7c0 15.6 20 93.1 93.1 195.5C160.4 378.1 229 416 291.4 416c37.5 0 42.1-8.4 42.1-22.9c0-66.8-3.4-73.1 15.4-73.1c8.7 0 23.7 4.4 58.7 38.1c40 40 46.6 57.9 69 57.9h58.9c16.8 0 25.3-8.4 20.4-25c-11.2-34.9-86.9-106.7-90.3-111.5c-8.7-11.2-6.2-16.2 0-26.2c.1-.1 72-101.3 79.4-135.6",fill:"currentColor"})}),zY=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M389.2 48h70.6L305.6 224.2L487 464H345L233.7 318.6L106.5 464H35.8l164.9-188.5L26.8 48h145.6l100.5 132.9zm-24.8 373.8h39.1L151.1 88h-42z",fill:"currentColor"})}),VY=({className:e})=>x.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:512,height:117,viewBox:"0 0 512 117",children:x.jsx("path",{fill:"#0b5cff",d:"M107.472 114.706H16.348c-5.968 0-11.791-3.203-14.557-8.589C-1.41 99.858-.247 92.434 4.702 87.63L68.17 24.164H22.607C10.088 24.164.044 13.974.044 1.6h83.992c5.968 0 11.79 3.203 14.556 8.589c3.203 6.259 2.038 13.683-2.911 18.486L32.214 92.143h52.55c12.518 0 22.708 10.19 22.708 22.563M468.183 0c-13.1 0-24.746 5.677-32.898 14.702C427.134 5.677 415.488 0 402.388 0c-24.164 0-43.961 20.67-43.961 44.834v69.872c12.518 0 22.562-10.19 22.562-22.563V44.689c0-11.646 9.025-21.544 20.67-21.98c12.228-.437 22.272 9.315 22.272 21.397v48.037c0 12.519 10.19 22.563 22.563 22.563V44.543c0-11.645 9.025-21.544 20.67-21.98c12.228-.437 22.272 9.316 22.272 21.398v48.036c0 12.52 10.19 22.563 22.563 22.563V44.69C512.144 20.67 492.347 0 468.183 0M221.595 58.226c0 32.17-26.056 58.226-58.226 58.226s-58.226-26.056-58.226-58.226S131.199 0 163.369 0s58.226 26.056 58.226 58.226m-22.563 0c0-19.651-16.012-35.663-35.663-35.663s-35.664 16.012-35.664 35.663c0 19.652 16.013 35.664 35.664 35.664s35.663-16.012 35.663-35.664m148.04 0c0 32.17-26.056 58.226-58.226 58.226S230.62 90.396 230.62 58.226S256.676 0 288.846 0s58.227 26.056 58.227 58.226m-22.562 0c0-19.651-16.012-35.663-35.664-35.663c-19.65 0-35.663 16.012-35.663 35.663c0 19.652 16.012 35.664 35.663 35.664c19.652 0 35.664-16.012 35.664-35.664"})}),FY=[{provider:"apple",name:"Apple",icon:_Y},{provider:"discord",name:"Discord",icon:bY},{provider:"dropbox",name:"Dropbox",icon:wY},{provider:"facebook",name:"Facebook",icon:SY},{provider:"github",name:"GitHub",icon:EY},{provider:"gitlab",name:"GitLab",icon:RY},{provider:"google",name:"Google",icon:xY},{provider:"huggingface",name:"Hugging Face",icon:TY},{provider:"kick",name:"Kick",icon:OY},{provider:"linear",name:"Linear",icon:CY},{provider:"linkedin",name:"LinkedIn",icon:AY},{provider:"microsoft",name:"Microsoft",icon:IY},{provider:"notion",name:"Notion",icon:NY},{provider:"reddit",name:"Reddit",icon:kY},{provider:"roblox",name:"Roblox",icon:MY},{provider:"slack",name:"Slack",icon:PY},{provider:"spotify",name:"Spotify",icon:DY},{provider:"tiktok",name:"TikTok",icon:LY},{provider:"twitch",name:"Twitch",icon:jY},{provider:"vercel",name:"Vercel",icon:$Y},{provider:"vk",name:"VK",icon:UY},{provider:"twitter",name:"X",icon:zY},{provider:"zoom",name:"Zoom",icon:VY}];function fd({className:e,enableToggle:t,onChange:n,...r}){const[a,i]=A.useState(!0),[c,u]=A.useState(!1);return x.jsxs("div",{className:"relative",children:[x.jsx(Fo,{className:Ae(t&&"pr-10",e),...r,type:c&&t?"text":"password",onChange:d=>{i(!d.target.value),n?.(d)}}),t&&x.jsxs(x.Fragment,{children:[x.jsx(en,{className:"!bg-transparent absolute top-0 right-0",disabled:a,size:"icon",type:"button",variant:"ghost",onClick:()=>u(!c),children:c?x.jsx(JV,{}):x.jsx(XV,{})}),x.jsx("style",{children:`
133
- .hide-password-toggle::-ms-reveal,
134
- .hide-password-toggle::-ms-clear {
135
- visibility: hidden;
136
- pointer-events: none;
137
- display: none;
138
- }
139
- `})]})]})}function ga({redirectTo:e}){const{redirectTo:t}=A.useContext(mt),n=A.useCallback(()=>e||qi("redirectTo")||t,[e,t]),[r,a]=A.useState(!1),{navigate:i,hooks:{useSession:c},onSessionChange:u}=A.useContext(mt),{refetch:d}=c();return{onSuccess:A.useCallback(async()=>{a(!0),await d?.(),u&&await u(),a(!1),i(n())},[d,u,i,n]),isPending:r}}function NM({redirectTo:e}){const{hooks:{useIsRestoring:t},persistClient:n}=A.useContext(mt),r=t?.(),a=A.useRef(!1),{onSuccess:i}=ga({redirectTo:e});return A.useEffect(()=>{if(!a.current){if(!n){a.current=!0,i();return}r||(a.current=!0,i())}},[r,n,i]),x.jsx(gr,{className:"animate-spin"})}var BY=["/sign-up/email","/sign-in/email","/forget-password"],qY=e=>{let t=e.startsWith("/")?e.substring(1):e;return t=t.replace(/-([a-z])/g,(n,r)=>r.toUpperCase()).replace(/\/([a-z])/g,(n,r)=>r.toUpperCase()).replace(/\//g,"").replace(/[^A-Za-z0-9_]/g,""),t};function Nd({localization:e}){const{captcha:t,localization:n}=A.useContext(mt);e={...n,...e};const r=A.useRef(null),{executeRecaptcha:a}=fN(),i=async d=>{if(!t)throw new Error(e.MISSING_RESPONSE);let f;switch(t.provider){case"google-recaptcha-v3":{const m=qY(d);f=await a?.(m);break}case"google-recaptcha-v2-checkbox":{f=r.current.getValue();break}case"google-recaptcha-v2-invisible":{f=await r.current.executeAsync();break}case"cloudflare-turnstile":{f=r.current.getResponse();break}case"hcaptcha":{f=r.current.getResponse();break}case"captchafox":{f=r.current.getResponse();break}}if(!f)throw new Error(e.MISSING_RESPONSE);return f};return{captchaRef:r,getCaptchaHeaders:async d=>{if(!t)return;if((t.endpoints||BY).includes(d))return{"x-captcha-response":await i(d)}},resetCaptcha:()=>{var d,f,m,p,g,y,w,S;if(t)switch(t.provider){case"google-recaptcha-v3":break;case"google-recaptcha-v2-checkbox":case"google-recaptcha-v2-invisible":{(f=(d=r.current)==null?void 0:d.reset)==null||f.call(d);break}case"cloudflare-turnstile":{(p=(m=r.current)==null?void 0:m.reset)==null||p.call(m);break}case"hcaptcha":{(y=(g=r.current)==null?void 0:g.resetCaptcha)==null||y.call(g);break}case"captchafox":{(S=(w=r.current)==null?void 0:w.reset)==null||S.call(w);break}}}}}function HY({className:e,localization:t}){const n=Ka(),{captcha:r,localization:a}=A.useContext(mt),i={...a,...t};return r?r.hideBadge?x.jsxs(x.Fragment,{children:[x.jsx("style",{children:`
140
- .grecaptcha-badge { visibility: hidden; }
141
- `}),x.jsxs("p",{className:Ae("text-muted-foreground text-xs",e),children:[i.PROTECTED_BY_RECAPTCHA," ",i.BY_CONTINUING_YOU_AGREE," Google"," ",x.jsx("a",{className:"text-foreground hover:underline",href:"https://policies.google.com/privacy",target:"_blank",rel:"noreferrer",children:i.PRIVACY_POLICY})," ","&"," ",x.jsx("a",{className:"text-foreground hover:underline",href:"https://policies.google.com/terms",target:"_blank",rel:"noreferrer",children:i.TERMS_OF_SERVICE}),"."]})]}):n?x.jsx("style",{children:`
142
- .grecaptcha-badge { visibility: visible !important; }
143
- `}):null:null}function GY({ref:e}){const{captcha:t}=A.useContext(mt),{theme:n}=zb(),{lang:r}=pN();return A.useEffect(()=>{window.recaptchaOptions={useRecaptchaNet:t?.recaptchaNet,enterprise:t?.enterprise}},[t]),t?x.jsxs(x.Fragment,{children:[x.jsx("style",{children:`
144
- .grecaptcha-badge {
145
- border-radius: var(--radius) !important;
146
- --tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, #0000000d);
147
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
148
- border-style: var(--tw-border-style) !important;
149
- border-width: 1px;
150
- }
151
-
152
- .dark .grecaptcha-badge {
153
- border-color: var(--input) !important;
154
- }
155
- `}),x.jsx(MK,{ref:e,sitekey:t.siteKey,theme:n,hl:r,size:t.provider==="google-recaptcha-v2-invisible"?"invisible":"normal",className:Ae(t.provider==="google-recaptcha-v2-invisible"?"absolute":"mx-auto h-[76px] w-[302px] overflow-hidden rounded bg-muted")},`${n}-${r}-${t.provider}`)]}):null}var ZY=["/sign-up/email","/sign-in/email","/forget-password"];function kd({ref:e,localization:t,action:n}){const{captcha:r}=A.useContext(mt);if(!r||n&&!(r.endpoints||ZY).includes(n))return null;const{theme:a}=zb(),i=r.provider==="google-recaptcha-v2-checkbox"||r.provider==="google-recaptcha-v2-invisible",c=r.provider==="google-recaptcha-v3"||r.provider==="google-recaptcha-v2-invisible",u=r.provider==="cloudflare-turnstile",d=r.provider==="hcaptcha",f=r.provider==="captchafox";return x.jsxs(x.Fragment,{children:[i&&x.jsx(GY,{ref:e}),c&&x.jsx(HY,{localization:t}),u&&x.jsx(dM,{className:"mx-auto",ref:e,siteKey:r.siteKey,options:{theme:a,size:"flexible"}}),d&&x.jsx("div",{className:"mx-auto",children:x.jsx(iK,{ref:e,sitekey:r.siteKey,theme:a})}),f&&x.jsx("div",{className:"mx-auto",children:x.jsx(tM,{ref:e,sitekey:r.siteKey,theme:a})})]})}function N1({className:e,containerClassName:t,...n}){return x.jsx(gM,{"data-slot":"input-otp",containerClassName:Ae("flex items-center gap-2 has-disabled:opacity-50",t),className:Ae("disabled:cursor-not-allowed",e),...n})}function Uc({className:e,...t}){return x.jsx("div",{"data-slot":"input-otp-group",className:Ae("flex items-center",e),...t})}function Gn({index:e,className:t,...n}){const r=A.useContext(mM),{char:a,hasFakeCaret:i,isActive:c}=r?.slots[e]??{};return x.jsxs("div",{"data-slot":"input-otp-slot","data-active":c,className:Ae("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...n,children:[a,i&&x.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:x.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function k0({...e}){return x.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:x.jsx(tF,{})})}function k1({otpSeparators:e=0}){return e===0?x.jsxs(Uc,{children:[x.jsx(Gn,{index:0}),x.jsx(Gn,{index:1}),x.jsx(Gn,{index:2}),x.jsx(Gn,{index:3}),x.jsx(Gn,{index:4}),x.jsx(Gn,{index:5})]}):e===1?x.jsxs(x.Fragment,{children:[x.jsxs(Uc,{children:[x.jsx(Gn,{index:0}),x.jsx(Gn,{index:1}),x.jsx(Gn,{index:2})]}),x.jsx(k0,{}),x.jsxs(Uc,{children:[x.jsx(Gn,{index:3}),x.jsx(Gn,{index:4}),x.jsx(Gn,{index:5})]})]}):x.jsxs(x.Fragment,{children:[x.jsxs(Uc,{children:[x.jsx(Gn,{index:0}),x.jsx(Gn,{index:1})]}),x.jsx(k0,{}),x.jsxs(Uc,{children:[x.jsx(Gn,{index:2}),x.jsx(Gn,{index:3})]}),x.jsx(k0,{}),x.jsxs(Uc,{children:[x.jsx(Gn,{index:4}),x.jsx(Gn,{index:5})]})]})}function t2(e){const[t,n]=A.useState();return t?x.jsx(KY,{...e,email:t}):x.jsx(WY,{...e,setEmail:n})}function WY({className:e,classNames:t,isSubmitting:n,localization:r,setIsSubmitting:a,setEmail:i}){const c=Ka(),{captchaRef:u,getCaptchaHeaders:d}=Nd({localization:r}),{authClient:f,localization:m,toast:p,localizeErrors:g}=A.useContext(mt);r={...m,...r};const y=ae({email:M().email({message:`${r.EMAIL} ${r.IS_INVALID}`})}),w=fa({resolver:ha(y),defaultValues:{email:""}});n=n||w.formState.isSubmitting,A.useEffect(()=>{a?.(w.formState.isSubmitting)},[w.formState.isSubmitting,a]);async function S({email:b}){const E={throw:!0,headers:await d("/email-otp/send-verification-otp")};try{await f.emailOtp.sendVerificationOtp({email:b,type:"sign-in",fetchOptions:E}),p({variant:"success",message:r.EMAIL_OTP_VERIFICATION_SENT}),i(b)}catch(R){p({variant:"error",message:En({error:R,localization:r,localizeErrors:g})})}}return x.jsx(ma,{...w,children:x.jsxs("form",{onSubmit:w.handleSubmit(S),noValidate:c,className:Ae("grid w-full gap-6",e,t?.base),children:[x.jsx(bn,{control:w.control,name:"email",render:({field:b})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:r.EMAIL}),x.jsx(Dn,{children:x.jsx(Fo,{className:t?.input,type:"email",placeholder:r.EMAIL_PLACEHOLDER,disabled:n,...b})}),x.jsx(Fn,{className:t?.error})]})}),x.jsx(kd,{ref:u,localization:r,action:"/email-otp/send-verification-otp"}),x.jsx(en,{type:"submit",disabled:n,className:Ae("w-full",t?.button,t?.primaryButton),children:n?x.jsx(gr,{className:"animate-spin"}):r.EMAIL_OTP_SEND_ACTION})]})})}function KY({className:e,classNames:t,isSubmitting:n,localization:r,otpSeparators:a=0,redirectTo:i,setIsSubmitting:c,email:u}){const{authClient:d,localization:f,toast:m,localizeErrors:p}=A.useContext(mt);r={...f,...r};const{onSuccess:g,isPending:y}=ga({redirectTo:i}),w=ae({code:M().min(1,{message:`${r.EMAIL_OTP} ${r.IS_REQUIRED}`}).min(6,{message:`${r.EMAIL_OTP} ${r.IS_INVALID}`})}),S=fa({resolver:ha(w),defaultValues:{code:""}});n=n||S.formState.isSubmitting||y,A.useEffect(()=>{c?.(S.formState.isSubmitting||y)},[S.formState.isSubmitting,y,c]);async function b({code:E}){try{await d.signIn.emailOtp({email:u,otp:E,fetchOptions:{throw:!0}}),await g()}catch(R){m({variant:"error",message:En({error:R,localization:r,localizeErrors:p})}),S.reset()}}return x.jsx(ma,{...S,children:x.jsxs("form",{onSubmit:S.handleSubmit(b),className:Ae("grid w-full gap-6",e,t?.base),children:[x.jsx(bn,{control:S.control,name:"code",render:({field:E})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:r.EMAIL_OTP}),x.jsx(Dn,{children:x.jsx(N1,{...E,maxLength:6,onChange:R=>{E.onChange(R),R.length===6&&S.handleSubmit(b)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:x.jsx(k1,{otpSeparators:a})})}),x.jsx(Fn,{className:t?.error})]})}),x.jsx("div",{className:"grid gap-4",children:x.jsxs(en,{type:"submit",disabled:n,className:Ae(t?.button,t?.primaryButton),children:[n&&x.jsx(gr,{className:"animate-spin"}),r.EMAIL_OTP_VERIFY_ACTION]})})]})})}function YY({onCancel:e,localization:t,className:n,classNames:r,otpSeparators:a,callbackURL:i,isSubmitting:c,redirectTo:u,setIsSubmitting:d}){const[f,m]=A.useState(!0),[p,g]=A.useState(30),{authClient:y,localization:w,toast:S,localizeErrors:b,navigate:E,basePath:R,viewPaths:T}=A.useContext(mt);t={...w,...t};const O=typeof window<"u"&&new URLSearchParams(window.location.search).get("email")||"",{onSuccess:C,isPending:I}=ga({redirectTo:u}),N=ae({code:M().min(1,{message:`${t.EMAIL_OTP} ${t.IS_REQUIRED}`}).min(6,{message:`${t.EMAIL_OTP} ${t.IS_INVALID}`})}),P=fa({resolver:ha(N),defaultValues:{code:""}}),$=c||P.formState.isSubmitting||I;A.useEffect(()=>{d?.(P.formState.isSubmitting||I)},[P.formState.isSubmitting,I,d]),A.useEffect(()=>{if(p>0){const G=setTimeout(()=>g(p-1),1e3);return()=>clearTimeout(G)}else m(!1)},[p]);async function W({code:G}){try{const U=await y.emailOtp.verifyEmail({email:O,otp:G,fetchOptions:{throw:!0}});"token"in U&&U.token?await C():(E(`${R}/${T.SIGN_IN}${window.location.search}`),S({variant:"success",message:t.EMAIL_VERIFICATION_SUCCESS}))}catch(U){S({variant:"error",message:En({error:U,localization:t,localizeErrors:b})}),P.reset()}}async function V(){if(!f){m(!0),g(30);try{await y.emailOtp.sendVerificationOtp({email:O,type:"email-verification",fetchOptions:{throw:!0}}),S({variant:"success",message:t.EMAIL_OTP_VERIFICATION_SENT})}catch(G){S({variant:"error",message:En({error:G,localization:t,localizeErrors:b})}),m(!1),g(0)}}}return O?x.jsx(ma,{...P,children:x.jsxs("form",{onSubmit:P.handleSubmit(W),className:Ae("grid w-full gap-6",n,r?.base),children:[x.jsx(bn,{control:P.control,name:"code",render:({field:G})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:r?.label,children:t.EMAIL_OTP}),x.jsx(Dn,{children:x.jsx(N1,{...G,maxLength:6,onChange:U=>{G.onChange(U),U.length===6&&P.handleSubmit(W)()},containerClassName:r?.otpInputContainer,className:r?.otpInput,disabled:$,children:x.jsx(k1,{otpSeparators:a})})}),x.jsx(Fn,{className:r?.error})]})}),x.jsxs("div",{className:"grid gap-4",children:[x.jsxs(en,{type:"submit",disabled:$,className:Ae(r?.button,r?.primaryButton),children:[$&&x.jsx(gr,{className:"animate-spin"}),t.EMAIL_OTP_VERIFY_ACTION]}),x.jsx(en,{type:"button",variant:"outline",onClick:V,disabled:f||$,className:Ae("w-full",r?.button),children:f?`${t.RESEND_VERIFICATION_EMAIL} (${p}s)`:t.RESEND_VERIFICATION_EMAIL}),e&&x.jsx(en,{type:"button",variant:"ghost",onClick:e,disabled:$,className:"w-full",children:t.CANCEL})]})]})}):x.jsx("div",{className:Ae("grid w-full gap-6",n),children:x.jsxs("div",{className:"text-center",children:[x.jsx("h2",{className:"font-semibold text-destructive text-lg",children:"Invalid Request"}),x.jsx("p",{className:"text-muted-foreground text-sm",children:t.EMAIL_REQUIRED||"Email address is required"})]})})}function QY({className:e,classNames:t,isSubmitting:n,localization:r,setIsSubmitting:a}){const i=Ka(),{captchaRef:c,getCaptchaHeaders:u,resetCaptcha:d}=Nd({localization:r}),{authClient:f,basePath:m,baseURL:p,localization:g,navigate:y,toast:w,viewPaths:S,localizeErrors:b}=A.useContext(mt);r={...g,...r};const E=ae({email:M().email({message:`${r.EMAIL} ${r.IS_INVALID}`}).min(1,{message:`${r.EMAIL} ${r.IS_REQUIRED}`})}),R=fa({resolver:ha(E),defaultValues:{email:""}});n=n||R.formState.isSubmitting,A.useEffect(()=>{a?.(R.formState.isSubmitting)},[R.formState.isSubmitting,a]);async function T({email:O}){try{const C={throw:!0,headers:await u("/forget-password")};await f.requestPasswordReset({email:O,redirectTo:`${p}${m}/${S.RESET_PASSWORD}`,fetchOptions:C}),w({variant:"success",message:r.FORGOT_PASSWORD_EMAIL}),y(`${m}/${S.SIGN_IN}${window.location.search}`)}catch(C){w({variant:"error",message:En({error:C,localization:r,localizeErrors:b})}),d()}}return x.jsx(ma,{...R,children:x.jsxs("form",{onSubmit:R.handleSubmit(T),noValidate:i,className:Ae("grid w-full gap-6",e,t?.base),children:[x.jsx(bn,{control:R.control,name:"email",render:({field:O})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:r.EMAIL}),x.jsx(Dn,{children:x.jsx(Fo,{className:t?.input,type:"email",placeholder:r.EMAIL_PLACEHOLDER,disabled:n,...O})}),x.jsx(Fn,{className:t?.error})]})}),x.jsx(kd,{ref:c,localization:r,action:"/forget-password"}),x.jsx(en,{type:"submit",disabled:n,className:Ae("w-full",t?.button,t?.primaryButton),children:n?x.jsx(gr,{className:"animate-spin"}):r.FORGOT_PASSWORD_ACTION})]})})}function n2({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:a,redirectTo:i,setIsSubmitting:c}){const u=Ka(),{captchaRef:d,getCaptchaHeaders:f,resetCaptcha:m}=Nd({localization:a}),{authClient:p,basePath:g,baseURL:y,persistClient:w,localization:S,redirectTo:b,viewPaths:E,toast:R,localizeErrors:T}=A.useContext(mt);a={...S,...a};const O=A.useCallback(()=>i||qi("redirectTo")||b,[i,b]),C=A.useCallback(()=>`${y}${n||(w?`${g}/${E.CALLBACK}?redirectTo=${encodeURIComponent(O())}`:O())}`,[n,w,g,E,y,O]),I=ae({email:M().email({message:`${a.EMAIL} ${a.IS_INVALID}`})}),N=fa({resolver:ha(I),defaultValues:{email:""}});r=r||N.formState.isSubmitting,A.useEffect(()=>{c?.(N.formState.isSubmitting)},[N.formState.isSubmitting,c]);async function P({email:$}){try{const W={throw:!0,headers:await f("/sign-in/magic-link")};await p.signIn.magicLink({email:$,callbackURL:C(),fetchOptions:W}),R({variant:"success",message:a.MAGIC_LINK_EMAIL}),N.reset()}catch(W){R({variant:"error",message:En({error:W,localization:a,localizeErrors:T})}),m()}}return x.jsx(ma,{...N,children:x.jsxs("form",{onSubmit:N.handleSubmit(P),noValidate:u,className:Ae("grid w-full gap-6",e,t?.base),children:[x.jsx(bn,{control:N.control,name:"email",render:({field:$})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:a.EMAIL}),x.jsx(Dn,{children:x.jsx(Fo,{className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:r,...$})}),x.jsx(Fn,{className:t?.error})]})}),x.jsx(kd,{ref:d,localization:a,action:"/sign-in/magic-link"}),x.jsx(en,{type:"submit",disabled:r,className:Ae("w-full",t?.button,t?.primaryButton),children:r?x.jsx(gr,{className:"animate-spin"}):a.MAGIC_LINK_ACTION})]})})}function XY({className:e,classNames:t,isSubmitting:n,localization:r,redirectTo:a,setIsSubmitting:i}){const{authClient:c,localization:u,toast:d,localizeErrors:f}=A.useContext(mt);r={...u,...r};const{onSuccess:m,isPending:p}=ga({redirectTo:a}),g=ae({code:M().min(1,{message:r.BACKUP_CODE_REQUIRED})}),y=fa({resolver:ha(g),defaultValues:{code:""}});n=n||y.formState.isSubmitting||p,A.useEffect(()=>{i?.(y.formState.isSubmitting||p)},[y.formState.isSubmitting,p,i]);async function w({code:S}){try{await c.twoFactor.verifyBackupCode({code:S,fetchOptions:{throw:!0}}),await m()}catch(b){d({variant:"error",message:En({error:b,localization:r,localizeErrors:f})}),y.reset()}}return x.jsx(ma,{...y,children:x.jsxs("form",{onSubmit:y.handleSubmit(w),className:Ae("grid gap-6",e,t?.base),children:[x.jsx(bn,{control:y.control,name:"code",render:({field:S})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:r.BACKUP_CODE}),x.jsx(Dn,{children:x.jsx(Fo,{placeholder:r.BACKUP_CODE_PLACEHOLDER,autoComplete:"off",className:t?.input,disabled:n,...S})}),x.jsx(Fn,{className:t?.error})]})}),x.jsx(en,{type:"submit",disabled:n,className:Ae(t?.button,t?.primaryButton),children:n?x.jsx(gr,{className:"animate-spin"}):r.RECOVER_ACCOUNT_ACTION})]})})}function JY({className:e,classNames:t,localization:n,passwordValidation:r}){const a=A.useRef(!1),{authClient:i,basePath:c,credentials:u,localization:d,viewPaths:f,navigate:m,toast:p,localizeErrors:g}=A.useContext(mt),y=u?.confirmPassword,w=u?.passwordValidation;n={...d,...n},r={...w,...r};const S=ae({newPassword:ad(r,{PASSWORD_REQUIRED:n.NEW_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}),confirmPassword:y?ad(r,{PASSWORD_REQUIRED:n.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}):M().optional()}).refine(T=>!y||T.newPassword===T.confirmPassword,{message:n.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),b=fa({resolver:ha(S),defaultValues:{newPassword:"",confirmPassword:""}}),E=b.formState.isSubmitting;A.useEffect(()=>{if(a.current)return;a.current=!0;const O=new URLSearchParams(window.location.search).get("token");(!O||O==="INVALID_TOKEN")&&(m(`${c}/${f.SIGN_IN}${window.location.search}`),p({variant:"error",message:n.INVALID_TOKEN}))},[c,m,p,f,n]);async function R({newPassword:T}){try{const C=new URLSearchParams(window.location.search).get("token");await i.resetPassword({newPassword:T,token:C,fetchOptions:{throw:!0}}),p({variant:"success",message:n.RESET_PASSWORD_SUCCESS}),m(`${c}/${f.SIGN_IN}${window.location.search}`)}catch(O){p({variant:"error",message:En({error:O,localization:n,localizeErrors:g})}),b.reset()}}return x.jsx(ma,{...b,children:x.jsxs("form",{onSubmit:b.handleSubmit(R),className:Ae("grid w-full gap-6",e,t?.base),children:[x.jsx(bn,{control:b.control,name:"newPassword",render:({field:T})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:n.NEW_PASSWORD}),x.jsx(Dn,{children:x.jsx(fd,{autoComplete:"new-password",className:t?.input,placeholder:n.NEW_PASSWORD_PLACEHOLDER,disabled:E,...T})}),x.jsx(Fn,{className:t?.error})]})}),y&&x.jsx(bn,{control:b.control,name:"confirmPassword",render:({field:T})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:n.CONFIRM_PASSWORD}),x.jsx(Dn,{children:x.jsx(fd,{autoComplete:"new-password",className:t?.input,placeholder:n.CONFIRM_PASSWORD_PLACEHOLDER,disabled:E,...T})}),x.jsx(Fn,{className:t?.error})]})}),x.jsx(en,{type:"submit",disabled:E,className:Ae("w-full",t?.button,t?.primaryButton),children:E?x.jsx(gr,{className:"animate-spin"}):n.RESET_PASSWORD_ACTION})]})})}function eQ({className:e,classNames:t,isSubmitting:n,localization:r,redirectTo:a,setIsSubmitting:i,passwordValidation:c}){const u=Ka(),{captchaRef:d,getCaptchaHeaders:f,resetCaptcha:m}=Nd({localization:r}),{authClient:p,basePath:g,credentials:y,localization:w,viewPaths:S,navigate:b,toast:E,Link:R,localizeErrors:T,emailVerification:O}=A.useContext(mt),C=y?.rememberMe,I=y?.username,N=y?.passwordValidation;r={...w,...r},c={...N,...c};const{onSuccess:P,isPending:$}=ga({redirectTo:a}),W=ae({email:I?M().min(1,{message:`${r.USERNAME} ${r.IS_REQUIRED}`}):M().email({message:`${r.EMAIL} ${r.IS_INVALID}`}),password:ad(c,r),rememberMe:et().optional()}),V=fa({resolver:ha(W),defaultValues:{email:"",password:"",rememberMe:!C}});n=n||V.formState.isSubmitting||$,A.useEffect(()=>{i?.(V.formState.isSubmitting||$)},[V.formState.isSubmitting,$,i]);async function G({email:U,password:J,rememberMe:le}){var F;try{let Y={};if(I&&!Cz(U)){const ie={throw:!0,headers:await f("/sign-in/username")};Y=await p.signIn.username({username:U,password:J,rememberMe:le,fetchOptions:ie})}else{const ie={throw:!0,headers:await f("/sign-in/email")};Y=await p.signIn.email({email:U,password:J,rememberMe:le,fetchOptions:ie})}Y.twoFactorRedirect?b(`${g}/${S.TWO_FACTOR}${window.location.search}`):await P()}catch(Y){V.resetField("password"),m(),E({variant:"error",message:En({error:Y,localization:r,localizeErrors:T})}),O?.otp&&((F=Y?.error)==null?void 0:F.code)==="EMAIL_NOT_VERIFIED"&&b(`${g}/${S.EMAIL_VERIFICATION}?email=${encodeURIComponent(U)}`)}}return x.jsx(ma,{...V,children:x.jsxs("form",{onSubmit:V.handleSubmit(G),noValidate:u,className:Ae("grid w-full gap-6",e,t?.base),children:[x.jsx(bn,{control:V.control,name:"email",render:({field:U})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:I?r.USERNAME:r.EMAIL}),x.jsx(Dn,{children:x.jsx(Fo,{autoComplete:I?"username":"email",className:t?.input,type:I?"text":"email",placeholder:I?r.SIGN_IN_USERNAME_PLACEHOLDER:r.EMAIL_PLACEHOLDER,disabled:n,...U})}),x.jsx(Fn,{className:t?.error})]})}),x.jsx(bn,{control:V.control,name:"password",render:({field:U})=>x.jsxs(wn,{children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx(Sn,{className:t?.label,children:r.PASSWORD}),y?.forgotPassword&&x.jsx(R,{className:Ae("text-sm hover:underline",t?.forgotPasswordLink),href:`${g}/${S.FORGOT_PASSWORD}${u?window.location.search:""}`,children:r.FORGOT_PASSWORD_LINK})]}),x.jsx(Dn,{children:x.jsx(fd,{autoComplete:"current-password",className:t?.input,placeholder:r.PASSWORD_PLACEHOLDER,disabled:n,...U})}),x.jsx(Fn,{className:t?.error})]})}),C&&x.jsx(bn,{control:V.control,name:"rememberMe",render:({field:U})=>x.jsxs(wn,{className:"flex",children:[x.jsx(Dn,{children:x.jsx(I1,{checked:U.value,onCheckedChange:U.onChange,disabled:n})}),x.jsx(Sn,{children:r.REMEMBER_ME})]})}),x.jsx(kd,{ref:d,localization:r,action:"/sign-in/email"}),x.jsx(en,{type:"submit",disabled:n,className:Ae("w-full",t?.button,t?.primaryButton),children:n?x.jsx(gr,{className:"animate-spin"}):r.SIGN_IN_ACTION})]})})}function tQ({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:a,redirectTo:i,setIsSubmitting:c,passwordValidation:u}){const d=Ka(),{captchaRef:f,getCaptchaHeaders:m,resetCaptcha:p}=Nd({localization:a}),{additionalFields:g,authClient:y,basePath:w,baseURL:S,credentials:b,localization:E,nameRequired:R,persistClient:T,redirectTo:O,signUp:C,viewPaths:I,navigate:N,toast:P,avatar:$,localizeErrors:W,emailVerification:V}=A.useContext(mt),G=b?.confirmPassword,U=b?.username,J=b?.usernameRequired??!0,le=b?.passwordValidation,F=C?.fields;a={...E,...a},u={...le,...u};const Y=A.useRef(null),[ie,fe]=A.useState(null),[K,D]=A.useState(!1),q=A.useCallback(()=>i||qi("redirectTo")||O,[i,O]),B=A.useCallback(()=>`${S}${n||(T?`${w}/${I.CALLBACK}?redirectTo=${encodeURIComponent(q())}`:q())}`,[n,T,w,I,S,q]),{onSuccess:L,isPending:z}=ga({redirectTo:i}),Q={email:M().email({message:`${a.EMAIL} ${a.IS_INVALID}`}),password:ad(u,a),name:F?.includes("name")&&R?M().min(1,{message:`${a.NAME} ${a.IS_REQUIRED}`}):M().optional(),image:M().optional(),username:U&&J?M().min(1,{message:`${a.USERNAME} ${a.IS_REQUIRED}`}):M().optional(),confirmPassword:G?ad(u,{PASSWORD_REQUIRED:a.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:a.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:a.PASSWORD_TOO_LONG,INVALID_PASSWORD:a.INVALID_PASSWORD}):M().optional()},me={};if(F)for(const ue of F){if(ue==="name"||ue==="image")continue;const Oe=g?.[ue];if(!Oe)continue;let Le;Oe.type==="number"?Le=Oe.required?Ub(Xe=>Xe?Number(Xe):void 0,Pe({message:`${Oe.label} ${a.IS_INVALID}`})):uN({message:`${Oe.label} ${a.IS_INVALID}`}).optional():Oe.type==="boolean"?Le=Oe.required?ST({message:`${Oe.label} ${a.IS_INVALID}`}).refine(Xe=>Xe===!0,{message:`${Oe.label} ${a.IS_REQUIRED}`}):ST({message:`${Oe.label} ${a.IS_INVALID}`}).optional():Le=Oe.required?M().min(1,`${Oe.label} ${a.IS_REQUIRED}`):M().optional(),me[ue]=Le}const ve=ae(Q).extend(me).refine(ue=>G?ue.password===ue.confirmPassword:!0,{message:a.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),Ce={email:"",password:"",...G&&{confirmPassword:""},...F?.includes("name")?{name:""}:{},...U?{username:""}:{},...F?.includes("image")&&$?{image:""}:{}};if(F)for(const ue of F){if(ue==="name"||ue==="image")continue;const Oe=g?.[ue];Oe&&(Ce[ue]=Oe.type==="boolean"?!1:"")}const Ie=fa({resolver:ha(ve),defaultValues:Ce});r=r||Ie.formState.isSubmitting||z,A.useEffect(()=>{c?.(Ie.formState.isSubmitting||z)},[Ie.formState.isSubmitting,z,c]);const H=async ue=>{if($){D(!0);try{const Oe=await cY(ue,crypto.randomUUID(),$.size,$.extension);let Le;$.upload?Le=await $.upload(Oe):Le=await uY(Oe),Le?(fe(Le),Ie.setValue("image",Le)):(fe(null),Ie.setValue("image",""))}catch(Oe){console.error(Oe),P({variant:"error",message:En({error:Oe,localization:a,localizeErrors:W})})}D(!1)}},re=()=>{fe(null),Ie.setValue("image","")},be=()=>{var ue;return(ue=Y.current)==null?void 0:ue.click()};async function se({email:ue,password:Oe,name:Le,username:Xe,confirmPassword:Be,image:Ke,...Z}){try{for(const[xe,Re]of Object.entries(Z)){const ke=g?.[xe];if(ke?.validate&&typeof Re=="string"&&!await ke.validate(Re)){Ie.setError(xe,{message:`${ke.label} ${a.IS_INVALID}`});return}}const te={throw:!0,headers:await m("/sign-up/email")},oe={};Xe!==void 0&&(!J&&(Xe===null||Xe===""||typeof Xe=="string"&&Xe.trim()==="")||(oe.username=Xe)),Ke!==void 0&&(oe.image=Ke);const Se=await y.signUp.email({email:ue,password:Oe,name:Le||"",...oe,...Z,callbackURL:B(),fetchOptions:te});"token"in Se&&Se.token?await L():V?.otp?N(`${w}/${I.EMAIL_VERIFICATION}?email=${encodeURIComponent(ue)}`):(N(`${w}/${I.SIGN_IN}${window.location.search}`),P({variant:"success",message:a.SIGN_UP_EMAIL}))}catch(te){P({variant:"error",message:En({error:te,localization:a,localizeErrors:W})}),Ie.resetField("password"),Ie.resetField("confirmPassword"),p()}}return x.jsx(ma,{...Ie,children:x.jsxs("form",{onSubmit:Ie.handleSubmit(se),noValidate:d,className:Ae("grid w-full gap-6",e,t?.base),children:[F?.includes("image")&&$&&x.jsxs(x.Fragment,{children:[x.jsx("input",{ref:Y,accept:"image/*",disabled:K,hidden:!0,type:"file",onChange:ue=>{var Oe;const Le=(Oe=ue.target.files)==null?void 0:Oe.item(0);Le&&H(Le),ue.target.value=""}}),x.jsx(bn,{control:Ie.control,name:"image",render:()=>x.jsxs(wn,{children:[x.jsx(Sn,{children:a.AVATAR}),x.jsxs("div",{className:"flex items-center gap-4",children:[x.jsxs(dY,{children:[x.jsx(fY,{asChild:!0,children:x.jsx(en,{className:"size-fit rounded-full",size:"icon",variant:"ghost",type:"button",children:x.jsx(gY,{isPending:K,className:"size-16",user:ie?{name:Ie.watch("name"),email:Ie.watch("email"),image:ie}:null,localization:a})})}),x.jsxs(hY,{align:"start",onCloseAutoFocus:ue=>ue.preventDefault(),children:[x.jsxs(e2,{onClick:be,disabled:K,children:[x.jsx(QV,{}),a.UPLOAD_AVATAR]}),ie&&x.jsxs(e2,{onClick:re,disabled:K,variant:"destructive",children:[x.jsx(rF,{}),a.DELETE_AVATAR]})]})]}),x.jsxs(en,{type:"button",variant:"outline",onClick:be,disabled:K,children:[K&&x.jsx(gr,{className:"animate-spin"}),a.UPLOAD]})]}),x.jsx(Fn,{})]})})]}),F?.includes("name")&&x.jsx(bn,{control:Ie.control,name:"name",render:({field:ue})=>x.jsxs(wn,{children:[x.jsxs(Sn,{className:t?.label,children:[a.NAME,!R&&x.jsx("span",{className:"ml-1 text-muted-foreground",children:a.OPTIONAL_BRACKETS})]}),x.jsx(Dn,{children:x.jsx(Fo,{autoComplete:"name",className:t?.input,placeholder:a.NAME_PLACEHOLDER,disabled:r,...ue,value:ue.value})}),x.jsx(Fn,{className:t?.error})]})}),U&&x.jsx(bn,{control:Ie.control,name:"username",render:({field:ue})=>x.jsxs(wn,{children:[x.jsxs(Sn,{className:t?.label,children:[a.USERNAME,!J&&x.jsx("span",{className:"ml-1 text-muted-foreground",children:a.OPTIONAL_BRACKETS})]}),x.jsx(Dn,{children:x.jsx(Fo,{autoComplete:"username",className:t?.input,placeholder:a.USERNAME_PLACEHOLDER,disabled:r,...ue,value:ue.value})}),x.jsx(Fn,{className:t?.error})]})}),x.jsx(bn,{control:Ie.control,name:"email",render:({field:ue})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:a.EMAIL}),x.jsx(Dn,{children:x.jsx(Fo,{autoComplete:"email",className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:r,...ue,value:ue.value})}),x.jsx(Fn,{className:t?.error})]})}),x.jsx(bn,{control:Ie.control,name:"password",render:({field:ue})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:a.PASSWORD}),x.jsx(Dn,{children:x.jsx(fd,{autoComplete:"new-password",className:t?.input,placeholder:a.PASSWORD_PLACEHOLDER,disabled:r,enableToggle:!0,...ue,value:ue.value})}),x.jsx(Fn,{className:t?.error})]})}),G&&x.jsx(bn,{control:Ie.control,name:"confirmPassword",render:({field:ue})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:a.CONFIRM_PASSWORD}),x.jsx(Dn,{children:x.jsx(fd,{autoComplete:"new-password",className:t?.input,placeholder:a.CONFIRM_PASSWORD_PLACEHOLDER,disabled:r,enableToggle:!0,...ue,value:ue.value})}),x.jsx(Fn,{className:t?.error})]})}),F?.filter(ue=>ue!=="name"&&ue!=="image").map(ue=>{const Oe=g?.[ue];return Oe?Oe.type==="boolean"?x.jsx(bn,{control:Ie.control,name:ue,render:({field:Le})=>x.jsxs(wn,{className:"flex",children:[x.jsx(Dn,{children:x.jsx(I1,{checked:Le.value,onCheckedChange:Le.onChange,disabled:r})}),x.jsx(Sn,{className:t?.label,children:Oe.label}),x.jsx(Fn,{className:t?.error})]})},ue):x.jsx(bn,{control:Ie.control,name:ue,render:({field:Le})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:Oe.label}),x.jsx(Dn,{children:Oe.type==="number"?x.jsx(Fo,{className:t?.input,type:"number",placeholder:Oe.placeholder||(typeof Oe.label=="string"?Oe.label:""),disabled:r,...Le,value:Le.value}):Oe.multiline?x.jsx(yY,{className:t?.input,placeholder:Oe.placeholder||(typeof Oe.label=="string"?Oe.label:""),disabled:r,...Le,value:Le.value}):x.jsx(Fo,{className:t?.input,type:"text",placeholder:Oe.placeholder||(typeof Oe.label=="string"?Oe.label:""),disabled:r,...Le,value:Le.value})}),x.jsx(Fn,{className:t?.error})]})},ue):(console.error(`Additional field ${ue} not found`),null)}),x.jsx(kd,{ref:f,localization:a,action:"/sign-up/email"}),x.jsx(en,{type:"submit",disabled:r,className:Ae("w-full",t?.button,t?.primaryButton),children:r?x.jsx(gr,{className:"animate-spin"}):a.SIGN_UP_ACTION})]})})}function nQ({className:e,classNames:t,isSubmitting:n,localization:r,otpSeparators:a=0,redirectTo:i,setIsSubmitting:c}){var u;const d=Ka(),f=d?qi("totpURI"):null,m=A.useRef(!1),{authClient:p,basePath:g,hooks:{useSession:y},localization:w,twoFactor:S,viewPaths:b,toast:E,Link:R,localizeErrors:T}=A.useContext(mt);r={...w,...r};const{onSuccess:O,isPending:C}=ga({redirectTo:i}),{data:I}=y(),N=(u=I?.user)==null?void 0:u.twoFactorEnabled,[P,$]=A.useState(S?.length===1?S[0]:null),[W,V]=A.useState(!1),[G,U]=A.useState(0),J=ae({code:M().min(1,{message:`${r.ONE_TIME_PASSWORD} ${r.IS_REQUIRED}`}).min(6,{message:`${r.ONE_TIME_PASSWORD} ${r.IS_INVALID}`}),trustDevice:et().optional()}),le=fa({resolver:ha(J),defaultValues:{code:""}});n=n||le.formState.isSubmitting||C,A.useEffect(()=>{c?.(le.formState.isSubmitting||C)},[le.formState.isSubmitting,C,c]),A.useEffect(()=>{P==="otp"&&G<=0&&!m.current&&(m.current=!0,F())},[P]),A.useEffect(()=>{if(G<=0)return;const ie=setTimeout(()=>{U(fe=>fe-1)},1e3);return()=>clearTimeout(ie)},[G]);const F=async()=>{if(!(W||G>0)){try{V(!0),await p.twoFactor.sendOtp({fetchOptions:{throw:!0}}),U(60)}catch(ie){E({variant:"error",message:En({error:ie,localization:r,localizeErrors:T})}),ie.error.code==="INVALID_TWO_FACTOR_COOKIE"&&history.back()}m.current=!1,V(!1)}};async function Y({code:ie,trustDevice:fe}){try{await(P==="totp"?p.twoFactor.verifyTotp:p.twoFactor.verifyOtp)({code:ie,trustDevice:fe,fetchOptions:{throw:!0}}),await O(),I&&!N&&E({variant:"success",message:r?.TWO_FACTOR_ENABLED})}catch(K){E({variant:"error",message:En({error:K,localization:r,localizeErrors:T})}),le.reset()}}return x.jsx(ma,{...le,children:x.jsxs("form",{onSubmit:le.handleSubmit(Y),className:Ae("grid w-full gap-6",e,t?.base),children:[S?.includes("totp")&&f&&P==="totp"&&x.jsxs("div",{className:"space-y-3",children:[x.jsx(RM,{className:t?.label,children:r.TWO_FACTOR_TOTP_LABEL}),x.jsx(tY,{className:Ae("border shadow-xs",t?.qrCode),value:f})]}),P!==null&&x.jsxs(x.Fragment,{children:[x.jsx(bn,{control:le.control,name:"code",render:({field:ie})=>x.jsxs(wn,{children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx(Sn,{className:t?.label,children:r.ONE_TIME_PASSWORD}),x.jsx(R,{className:Ae("text-sm hover:underline",t?.forgotPasswordLink),href:`${g}/${b.RECOVER_ACCOUNT}${d?window.location.search:""}`,children:r.FORGOT_AUTHENTICATOR})]}),x.jsx(Dn,{children:x.jsx(N1,{...ie,maxLength:6,onChange:fe=>{ie.onChange(fe),fe.length===6&&le.handleSubmit(Y)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:x.jsx(k1,{otpSeparators:a})})}),x.jsx(Fn,{className:t?.error})]})}),x.jsx(bn,{control:le.control,name:"trustDevice",render:({field:ie})=>x.jsxs(wn,{className:"flex",children:[x.jsx(Dn,{children:x.jsx(I1,{checked:ie.value,onCheckedChange:ie.onChange,disabled:n,className:t?.checkbox})}),x.jsx(Sn,{className:t?.label,children:r.TRUST_DEVICE})]})})]}),x.jsxs("div",{className:"grid gap-4",children:[P!==null&&x.jsxs(en,{type:"submit",disabled:n,className:Ae(t?.button,t?.primaryButton),children:[n&&x.jsx(gr,{className:"animate-spin"}),r.TWO_FACTOR_ACTION]}),P==="otp"&&S?.includes("otp")&&x.jsxs(en,{type:"button",variant:"outline",onClick:F,disabled:G>0||W||n,className:Ae(t?.button,t?.outlineButton),children:[W?x.jsx(gr,{className:"animate-spin"}):x.jsx(IT,{className:t?.icon}),r.RESEND_CODE,G>0&&` (${G})`]}),P!=="otp"&&S?.includes("otp")&&x.jsxs(en,{type:"button",variant:"secondary",className:Ae(t?.button,t?.secondaryButton),onClick:()=>$("otp"),disabled:n,children:[x.jsx(IT,{className:t?.icon}),r.SEND_VERIFICATION_CODE]}),P!=="totp"&&S?.includes("totp")&&x.jsxs(en,{type:"button",variant:"secondary",className:Ae(t?.button,t?.secondaryButton),onClick:()=>$("totp"),disabled:n,children:[x.jsx(nF,{className:t?.icon}),r.CONTINUE_WITH_AUTHENTICATOR]})]})]})})}function kM({redirectTo:e}){const t=A.useRef(!1),{authClient:n,basePath:r,viewPaths:a}=A.useContext(mt),{onSuccess:i}=ga({redirectTo:e||`${r}/${a.SIGN_IN}`});return A.useEffect(()=>{t.current||(t.current=!0,n.signOut().finally(i))},[n,i]),x.jsx(gr,{className:"animate-spin"})}function rQ({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:a,pathname:i,redirectTo:c,view:u,otpSeparators:d=0,setIsSubmitting:f}){const{basePath:m,credentials:p,localization:g,magicLink:y,emailOTP:w,signUp:S,twoFactor:b,viewPaths:E,replace:R}=A.useContext(mt),T=!!S;if(a={...g,...a},A.useEffect(()=>{i&&!m_(E,i)&&(console.error(`Invalid auth view: ${i}`),R(`${m}/${E.SIGN_IN}${window.location.search}`))},[i,E,m,R]),u=u||m_(E,i)||"SIGN_IN",A.useEffect(()=>{let O=!1;u==="MAGIC_LINK"&&(!y||!p&&!w)&&(O=!0),u==="EMAIL_OTP"&&(!w||!p&&!y)&&(O=!0),u==="SIGN_UP"&&!T&&(O=!0),!p&&["SIGN_UP","FORGOT_PASSWORD","RESET_PASSWORD","TWO_FACTOR","RECOVER_ACCOUNT"].includes(u)&&(O=!0),["TWO_FACTOR","RECOVER_ACCOUNT"].includes(u)&&!b&&(O=!0),O&&R(`${m}/${E.SIGN_IN}${window.location.search}`)},[m,u,E,p,R,w,T,y,b]),u==="SIGN_OUT")return x.jsx(kM,{redirectTo:c});if(u==="CALLBACK")return x.jsx(NM,{redirectTo:c});if(u==="SIGN_IN")return p?x.jsx(eQ,{className:e,classNames:t,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f}):y?x.jsx(n2,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f}):w?x.jsx(t2,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f}):null;if(u==="TWO_FACTOR")return x.jsx(nQ,{className:e,classNames:t,localization:a,otpSeparators:d,redirectTo:c,isSubmitting:r,setIsSubmitting:f});if(u==="RECOVER_ACCOUNT")return x.jsx(XY,{className:e,classNames:t,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f});if(u==="MAGIC_LINK")return x.jsx(n2,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f});if(u==="EMAIL_OTP")return x.jsx(t2,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f});if(u==="EMAIL_VERIFICATION")return x.jsx(YY,{className:e,classNames:t,callbackURL:n,localization:a,otpSeparators:d,redirectTo:c,isSubmitting:r,setIsSubmitting:f});if(u==="FORGOT_PASSWORD")return x.jsx(QY,{className:e,classNames:t,localization:a,isSubmitting:r,setIsSubmitting:f});if(u==="RESET_PASSWORD")return x.jsx(JY,{className:e,classNames:t,localization:a});if(u==="SIGN_UP")return T&&x.jsx(tQ,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f})}function oQ({className:e,classNames:t,localization:n}){const{localization:r,redirectTo:a,replace:i,toast:c}=A.useContext(mt),u=A.useMemo(()=>({...r,...n}),[r,n]),{data:d}=sY(),[f,m]=A.useState(null);return A.useEffect(()=>{const p=qi("invitationId");if(!p){c({variant:"error",message:u.INVITATION_NOT_FOUND}),i(a);return}m(p)},[u.INVITATION_NOT_FOUND,c,i,a]),!d||!f?x.jsx(MM,{className:e,classNames:t}):x.jsx(aQ,{className:e,classNames:t,localization:u,invitationId:f})}function aQ({className:e,classNames:t,localization:n,invitationId:r}){var a;const{authClient:i,hooks:{useInvitation:c},localization:u,organization:d,redirectTo:f,replace:m,toast:p,localizeErrors:g}=A.useContext(mt),y=A.useMemo(()=>({...u,...n}),[u,n]),[w,S]=A.useState(!1),[b,E]=A.useState(!1),R=w||b,{data:T,isPending:O}=c({query:{id:r}}),C=A.useCallback(()=>qi("redirectTo")||f,[f]);A.useEffect(()=>{if(!(O||!r)){if(!T){p({variant:"error",message:y.INVITATION_NOT_FOUND}),m(f);return}(T.status!=="pending"||new Date(T.expiresAt)<new Date)&&(p({variant:"error",message:new Date(T.expiresAt)<new Date?y.INVITATION_EXPIRED:y.INVITATION_NOT_FOUND}),m(f))}},[T,O,r,y,p,m,f]);const I=async()=>{E(!0);try{await i.organization.acceptInvitation({invitationId:r,fetchOptions:{throw:!0}}),p({variant:"success",message:y.INVITATION_ACCEPTED||"Invitation accepted"}),m(C())}catch(V){p({variant:"error",message:En({error:V,localization:y,localizeErrors:g})}),E(!1)}},N=async()=>{S(!0);try{await i.organization.rejectInvitation({invitationId:r,fetchOptions:{throw:!0}}),p({variant:"success",message:y.INVITATION_REJECTED}),m(f)}catch(V){p({variant:"error",message:En({error:V,localization:y,localizeErrors:g})}),S(!1)}},W=((a=[...[{role:"owner",label:y.OWNER},{role:"admin",label:y.ADMIN},{role:"member",label:y.MEMBER}],...d?.customRoles||[]].find(V=>V.role===T?.role))==null?void 0:a.label)||T?.role;return T?x.jsxs(dd,{className:Ae("w-full max-w-sm",e,t?.base),children:[x.jsxs(O1,{className:Ae("justify-items-center text-center",t?.header),children:[x.jsx(SM,{className:Ae("text-lg md:text-xl",t?.title),children:y.ACCEPT_INVITATION}),x.jsx(EM,{className:Ae("text-xs md:text-sm",t?.description),children:y.ACCEPT_INVITATION_DESCRIPTION})]}),x.jsxs(C1,{className:Ae("flex flex-col gap-6 truncate",t?.content),children:[x.jsxs(dd,{className:Ae("flex-row items-center p-4"),children:[x.jsx(IM,{organization:{id:T.organizationId,name:T.organizationName,slug:T.organizationSlug,logo:T.organizationLogo,createdAt:new Date},localization:y}),x.jsx("p",{className:"ml-auto text-muted-foreground text-sm",children:W})]}),x.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[x.jsxs(en,{variant:"outline",className:Ae(t?.button,t?.outlineButton),onClick:N,disabled:R,children:[w?x.jsx(gr,{className:"animate-spin"}):x.jsx(aF,{}),y.REJECT]}),x.jsxs(en,{className:Ae(t?.button,t?.primaryButton),onClick:I,disabled:R,children:[b?x.jsx(gr,{className:"animate-spin"}):x.jsx(gN,{}),y.ACCEPT]})]})]})]}):x.jsx(MM,{className:e,classNames:t})}var MM=({className:e,classNames:t,localization:n})=>x.jsxs(dd,{className:Ae("w-full max-w-sm",e,t?.base),children:[x.jsxs(O1,{className:Ae("justify-items-center",t?.header),children:[x.jsx(Fa,{className:Ae("my-1 h-5 w-full max-w-32 md:h-5.5 md:w-40",t?.skeleton)}),x.jsx(Fa,{className:Ae("my-0.5 h-3 w-full max-w-56 md:h-3.5 md:w-64",t?.skeleton)})]}),x.jsxs(C1,{className:Ae("flex flex-col gap-6 truncate",t?.content),children:[x.jsxs(dd,{className:Ae("flex-row items-center p-4"),children:[x.jsx(IM,{isPending:!0,localization:n}),x.jsx(Fa,{className:"mt-0.5 ml-auto h-4 w-full max-w-14 shrink-2"})]}),x.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[x.jsx(Fa,{className:"h-9 w-full"}),x.jsx(Fa,{className:"h-9 w-full"})]})]})]});function r2({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return x.jsx(aY,{"data-slot":"separator",decorative:n,orientation:t,className:Ae("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function sQ({classNames:e,isSubmitting:t,localization:n,view:r}){var a,i,c,u;const{viewPaths:d,navigate:f,basePath:m}=A.useContext(mt);return x.jsxs(en,{className:Ae("w-full",(a=e?.form)==null?void 0:a.button,(i=e?.form)==null?void 0:i.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>f(`${m}/${r==="EMAIL_OTP"?d.SIGN_IN:d.EMAIL_OTP}${window.location.search}`),children:[r==="EMAIL_OTP"?x.jsx(vN,{className:(c=e?.form)==null?void 0:c.icon}):x.jsx(yN,{className:(u=e?.form)==null?void 0:u.icon}),n.SIGN_IN_WITH," ",r==="EMAIL_OTP"?n.PASSWORD:n.EMAIL_OTP]})}function iQ({classNames:e,isSubmitting:t,localization:n,view:r}){var a,i,c,u;const{viewPaths:d,navigate:f,basePath:m,credentials:p}=A.useContext(mt);return x.jsxs(en,{className:Ae("w-full",(a=e?.form)==null?void 0:a.button,(i=e?.form)==null?void 0:i.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>f(`${m}/${r==="MAGIC_LINK"||!p?d.SIGN_IN:d.MAGIC_LINK}${window.location.search}`),children:[r==="MAGIC_LINK"?x.jsx(vN,{className:(c=e?.form)==null?void 0:c.icon}):x.jsx(yN,{className:(u=e?.form)==null?void 0:u.icon}),n.SIGN_IN_WITH," ",r==="MAGIC_LINK"?n.PASSWORD:n.MAGIC_LINK]})}function cQ({localization:e,redirectTo:t}){const{authClient:n,localization:r,toast:a,localizeErrors:i}=A.useContext(mt),c=A.useRef(!1);e=A.useMemo(()=>({...r,...e}),[r,e]);const{onSuccess:u}=ga({redirectTo:t});return A.useEffect(()=>{if(!c.current){c.current=!0;try{n.oneTap({fetchOptions:{throw:!0,onSuccess:u}})}catch(d){a({variant:"error",message:En({error:d,localization:e,localizeErrors:i})})}}},[n,e,i,u,a]),null}function lQ({classNames:e,isSubmitting:t,localization:n,redirectTo:r,setIsSubmitting:a}){var i,c;const{authClient:u,localization:d,toast:f,localizeErrors:m}=A.useContext(mt);n={...d,...n};const{onSuccess:p}=ga({redirectTo:r}),g=async()=>{a?.(!0);try{const y=await u.signIn.passkey({fetchOptions:{throw:!0}});y?.error?(f({variant:"error",message:En({error:y.error,localization:n,localizeErrors:m})}),a?.(!1)):p()}catch(y){f({variant:"error",message:En({error:y,localization:n,localizeErrors:m})}),a?.(!1)}};return x.jsxs(en,{className:Ae("w-full",(i=e?.form)==null?void 0:i.button,(c=e?.form)==null?void 0:c.secondaryButton),disabled:t,formNoValidate:!0,name:"passkey",value:"true",variant:"secondary",onClick:g,children:[x.jsx(eF,{}),n.SIGN_IN_WITH," ",n.PASSKEY]})}function o2({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:a,other:i,provider:c,redirectTo:u,socialLayout:d,setIsSubmitting:f}){var m,p,g,y;const{authClient:w,basePath:S,baseURL:b,persistClient:E,redirectTo:R,viewPaths:T,social:O,genericOAuth:C,toast:I,localizeErrors:N}=A.useContext(mt),P=A.useCallback(()=>u||qi("redirectTo")||R,[u,R]),$=A.useCallback(()=>`${b}${n||(E?`${S}/${T.CALLBACK}?redirectTo=${encodeURIComponent(P())}`:P())}`,[n,E,S,T,b,P]),W=async()=>{f(!0);try{if(i){const V={providerId:c.provider,callbackURL:$(),fetchOptions:{throw:!0}};C?.signIn?(await C.signIn(V),setTimeout(()=>{f(!1)},1e4)):await w.signIn.oauth2(V)}else{const V={provider:c.provider,callbackURL:$(),fetchOptions:{throw:!0}};O?.signIn?(await O.signIn(V),setTimeout(()=>{f(!1)},1e4)):await w.signIn.social(V)}}catch(V){I({variant:"error",message:En({error:V,localization:a,localizeErrors:N})}),f(!1)}};return x.jsxs(en,{className:Ae(d==="vertical"?"w-full":"grow",e,(m=t?.form)==null?void 0:m.button,(p=t?.form)==null?void 0:p.outlineButton,(g=t?.form)==null?void 0:g.providerButton),disabled:r,variant:"outline",onClick:W,children:[c.icon&&x.jsx(c.icon,{className:(y=t?.form)==null?void 0:y.icon}),d==="grid"&&c.name,d==="vertical"&&`${a.SIGN_IN_WITH} ${c.name}`]})}function sae({className:e,classNames:t,callbackURL:n,cardHeader:r,cardFooter:a,localization:i,path:c,pathname:u,redirectTo:d,socialLayout:f="auto",view:m,otpSeparators:p=0}){var g,y,w,S,b,E;const R=Ka(),{basePath:T,credentials:O,localization:C,magicLink:I,emailOTP:N,oneTap:P,passkey:$,signUp:W,social:V,genericOAuth:G,viewPaths:U,Link:J}=A.useContext(mt);i={...C,...i};let le=f;le==="auto"&&(le=O&&V?.providers&&V.providers.length>2?"horizontal":"vertical");const F=c??u?.split("/").pop(),Y=m||m_(U,F)||"SIGN_IN",[ie,fe]=A.useState(!1);if(A.useEffect(()=>{const D=()=>fe(!1);return window.addEventListener("pagehide",D),()=>{fe(!1),window.removeEventListener("pagehide",D)}},[]),Y==="CALLBACK")return x.jsx(NM,{redirectTo:d});if(Y==="SIGN_OUT")return x.jsx(kM,{redirectTo:d});if(Y==="ACCEPT_INVITATION")return x.jsx(oQ,{className:e,classNames:t});const K=!O&&!I&&!N?i.DISABLED_CREDENTIALS_DESCRIPTION:i[`${Y}_DESCRIPTION`];return x.jsxs(dd,{className:Ae("w-full max-w-sm",e,t?.base),children:[x.jsx(O1,{className:t?.header,children:r||x.jsxs(x.Fragment,{children:[x.jsx(SM,{className:Ae("text-lg md:text-xl",t?.title),children:i[Y]}),K&&x.jsx(EM,{className:Ae("text-xs md:text-sm",t?.description),children:K})]})}),x.jsxs(C1,{className:Ae("grid gap-6",t?.content),children:[P&&["SIGN_IN","SIGN_UP","MAGIC_LINK","EMAIL_OTP"].includes(Y)&&x.jsx(cQ,{localization:i,redirectTo:d}),(O||I||N)&&x.jsxs("div",{className:"grid gap-4",children:[x.jsx(rQ,{classNames:t?.form,callbackURL:n,isSubmitting:ie,localization:i,otpSeparators:p,view:Y,redirectTo:d,setIsSubmitting:fe}),I&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(Y)||N&&Y==="EMAIL_OTP")&&x.jsx(iQ,{classNames:t,localization:i,view:Y,isSubmitting:ie}),N&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(Y)||I&&["SIGN_IN","MAGIC_LINK"].includes(Y))&&x.jsx(sQ,{classNames:t,localization:i,view:Y,isSubmitting:ie})]}),Y!=="RESET_PASSWORD"&&Y!=="EMAIL_VERIFICATION"&&(((g=V?.providers)==null?void 0:g.length)||((y=G?.providers)==null?void 0:y.length)||Y==="SIGN_IN"&&$)&&x.jsxs(x.Fragment,{children:[(O||I||N)&&x.jsxs("div",{className:Ae("flex items-center gap-2",t?.continueWith),children:[x.jsx(r2,{className:Ae("!w-auto grow",t?.separator)}),x.jsx("span",{className:"flex-shrink-0 text-muted-foreground text-sm",children:i.OR_CONTINUE_WITH}),x.jsx(r2,{className:Ae("!w-auto grow",t?.separator)})]}),x.jsxs("div",{className:"grid gap-4",children:[(((w=V?.providers)==null?void 0:w.length)||((S=G?.providers)==null?void 0:S.length))&&x.jsxs("div",{className:Ae("flex w-full items-center justify-between gap-4",le==="horizontal"&&"flex-wrap",le==="vertical"&&"flex-col",le==="grid"&&"grid grid-cols-2"),children:[(b=V?.providers)==null?void 0:b.map(D=>{const q=FY.find(B=>B.provider===D);return q?x.jsx(o2,{classNames:t,callbackURL:n,isSubmitting:ie,localization:i,provider:q,redirectTo:d,setIsSubmitting:fe,socialLayout:le},D):null}),(E=G?.providers)==null?void 0:E.map(D=>x.jsx(o2,{classNames:t,callbackURL:n,isSubmitting:ie,localization:i,provider:D,redirectTo:d,setIsSubmitting:fe,socialLayout:le,other:!0},D.provider))]}),$&&["SIGN_IN","MAGIC_LINK","EMAIL_OTP","RECOVER_ACCOUNT","TWO_FACTOR","FORGOT_PASSWORD"].includes(Y)&&x.jsx(lQ,{classNames:t,isSubmitting:ie,localization:i,redirectTo:d,setIsSubmitting:fe})]})]})]}),a&&x.jsx(JO,{className:t?.footer,children:a}),O&&W&&x.jsxs(JO,{className:Ae("justify-center gap-1.5 text-muted-foreground text-sm",t?.footer),children:[Y==="SIGN_IN"||Y==="MAGIC_LINK"||Y==="EMAIL_OTP"?i.DONT_HAVE_AN_ACCOUNT:Y==="SIGN_UP"?i.ALREADY_HAVE_AN_ACCOUNT:x.jsx(KV,{className:"size-3"}),Y==="SIGN_IN"||Y==="MAGIC_LINK"||Y==="EMAIL_OTP"||Y==="SIGN_UP"?x.jsx(J,{className:Ae("text-foreground underline",t?.footerLink),href:`${T}/${U[Y==="SIGN_IN"||Y==="MAGIC_LINK"||Y==="EMAIL_OTP"?"SIGN_UP":"SIGN_IN"]}${R?window.location.search:""}`,children:x.jsx(en,{variant:"link",size:"sm",className:Ae("px-0 text-foreground underline",t?.footerLink),children:Y==="SIGN_IN"||Y==="MAGIC_LINK"||Y==="EMAIL_OTP"?i.SIGN_UP:i.SIGN_IN})}):x.jsx(en,{variant:"link",size:"sm",className:Ae("px-0 text-foreground underline",t?.footerLink),onClick:()=>window.history.back(),children:i.GO_BACK})]})]})}function iae({children:e}){const{hooks:{useSession:t}}=A.useContext(mt),{isPending:n}=t();return n?e:null}function cae({children:e}){const{hooks:{useSession:t}}=A.useContext(mt),{data:n}=t();return n?e:null}function lae({children:e}){const{hooks:{useSession:t}}=A.useContext(mt),{data:n,isPending:r}=t();return!n&&!r?e:null}function uQ(e){const t=bl.c(8),{children:n}=e,r=wl();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={basePath:"/",pathMode:"slug"},t[0]=a):a=t[0];let i,c;t[1]!==r?(i=d=>r({to:d}),c=d=>r({to:d,replace:!0}),t[1]=r,t[2]=i,t[3]=c):(i=t[2],c=t[3]);let u;return t[4]!==n||t[5]!==i||t[6]!==c?(u=x.jsx(HV,{authClient:Yj,redirectTo:"/",organization:a,navigate:i,replace:c,Link:dQ,children:n}),t[4]=n,t[5]=i,t[6]=c,t[7]=u):u=t[7],u}function dQ(e){const{href:t,className:n,children:r,...a}=e;return x.jsx(km,{to:t,className:n,...a,children:r})}async function fQ(){const e=await fetch("/api/config");if(!e.ok)throw new Error("Failed to load public configuration");const t=await e.json();if(!t.success)throw new Error(t.error||"Failed to load public configuration");return t.config}function hQ(e){if(!e)return;const t=document.getElementById("mesh-theme-overrides");t&&t.remove();const n=[];if(e.light&&Object.keys(e.light).length>0){const r=Object.entries(e.light).map(([a,i])=>` ${a}: ${i};`).join(`
156
- `);n.push(`:root {
157
- ${r}
158
- }`)}if(e.dark&&Object.keys(e.dark).length>0){const r=Object.entries(e.dark).map(([a,i])=>` ${a}: ${i};`).join(`
159
- `);n.push(`.dark {
160
- ${r}
161
- }`)}if(n.length>0){const r=document.createElement("style");r.id="mesh-theme-overrides",r.textContent=n.join(`
162
-
163
- `),document.head.appendChild(r)}}function pQ(e){const t=bl.c(6),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:iA.publicConfig(),queryFn:fQ,staleTime:1/0},t[0]=r):r=t[0];const{data:a}=sA(r);let i,c;t[1]!==a.theme?(i=()=>{hQ(a.theme)},c=[a.theme],t[1]=a.theme,t[2]=i,t[3]=c):(i=t[2],c=t[3]),A.useLayoutEffect(i,c);let u;return t[4]!==n?(u=x.jsx(x.Fragment,{children:n}),t[4]=n,t[5]=u):u=t[5],u}function PM(){const e=bl.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=x.jsx("div",{className:"flex items-center justify-center min-h-screen",children:x.jsx("div",{className:"text-gray-500",children:"Loading..."})}),e[0]=t):t=e[0],t}const mQ=new D5({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:1,gcTime:300*1e3}}});function gQ(e){const t=bl.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=x.jsx(wV,{}),t[0]=r):r=t[0];let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a=x.jsx(PM,{}),t[1]=a):a=t[1];let i;return t[2]!==n?(i=x.jsxs(j5,{client:mQ,children:[r,x.jsx(A.Suspense,{fallback:a,children:x.jsx(pQ,{children:x.jsx(Q5,{children:x.jsx(uQ,{children:n})})})})]}),t[2]=n,t[3]=i):i=t[3],i}var vQ=class{apply(e,t){if(!t.type)return;const n=Array.isArray(t.type)?t.type:[t.type],r=new Set(n);if(r.has("string")||(e.string=!1),!r.has("number")&&!r.has("integer")&&(e.number=!1),r.has("boolean")||(e.boolean=!1),r.has("null")||(e.null=!1),r.has("array")||(e.array=!1),r.has("object")||(e.object=!1),r.has("integer")&&e.number!==!1){const a=e.number||Pe();a instanceof Wa&&(e.number=a.int())}}},yQ=class{apply(e,t){if(t.const===void 0)return;const n=t.const;e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1,typeof n=="string"?e.string=De(n):typeof n=="number"?e.number=De(n):typeof n=="boolean"?e.boolean=De(n):n===null?e.null=El():Array.isArray(n)?e.array=void 0:typeof n=="object"&&(e.object=void 0)}},_Q=class{apply(e,t){if(!t.enum)return;if(t.enum.length===0){t.type||(e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1);return}const n={string:t.enum.filter(r=>typeof r=="string"),number:t.enum.filter(r=>typeof r=="number"),boolean:t.enum.filter(r=>typeof r=="boolean"),null:t.enum.filter(r=>r===null),array:t.enum.filter(r=>Array.isArray(r)),object:t.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};e.string=this.createTypeSchema(n.string,"string"),e.number=this.createTypeSchema(n.number,"number"),e.boolean=this.createTypeSchema(n.boolean,"boolean"),e.null=n.null.length>0?El():!1,e.array=n.array.length>0?void 0:!1,e.object=n.object.length>0?void 0:!1}createTypeSchema(e,t){if(e.length===0)return!1;if(e.length===1)return De(e[0]);if(t==="string")return Ot(e);if(t==="number"){const[n,r,...a]=e;return yt([De(n),De(r),...a.map(i=>De(i))])}return t==="boolean"?yt([De(!0),De(!1)]):!1}},bQ=class{apply(e,t){const n=t;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=lz();n.minLength!==void 0&&(r=r.min(n.minLength)),n.maxLength!==void 0&&(r=r.max(n.maxLength)),n.contentMediaType!==void 0&&(r=r.mime(n.contentMediaType)),e.file=r,e.string=!1}}},wQ=class{apply(e,t){const n=t;t.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&e.string===void 0&&(e.string=M())}},SQ=class{apply(e,t){const n=t;if(n.minLength!==void 0&&e.string!==!1){const r=e.string||M();r instanceof zm&&(e.string=r.refine(a=>Array.from(a).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},EQ=class{apply(e,t){const n=t;if(n.maxLength!==void 0&&e.string!==!1){const r=e.string||M();r instanceof zm&&(e.string=r.refine(a=>Array.from(a).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},RQ=class{apply(e,t){const n=t;if(n.pattern&&e.string!==!1){const r=e.string||M();if(r instanceof zm){const a=new RegExp(n.pattern);e.string=r.regex(a)}}}},xQ=class{apply(e,t){const n=t;if(n.minimum!==void 0&&e.number!==!1){const r=e.number||Pe();r instanceof Wa&&(e.number=r.min(n.minimum))}}},TQ=class{apply(e,t){const n=t;if(n.maximum!==void 0&&e.number!==!1){const r=e.number||Pe();r instanceof Wa&&(e.number=r.max(n.maximum))}}},OQ=class{apply(e,t){const n=t;if(n.exclusiveMinimum!==void 0&&e.number!==!1){const r=e.number||Pe();r instanceof Wa&&(typeof n.exclusiveMinimum=="number"?e.number=r.gt(n.exclusiveMinimum):e.number=!1)}}},CQ=class{apply(e,t){const n=t;if(n.exclusiveMaximum!==void 0&&e.number!==!1){const r=e.number||Pe();r instanceof Wa&&(typeof n.exclusiveMaximum=="number"?e.number=r.lt(n.exclusiveMaximum):e.number=!1)}}},AQ=class{apply(e,t){const n=t;if(n.multipleOf!==void 0&&e.number!==!1){const r=e.number||Pe();r instanceof Wa&&(e.number=r.refine(a=>{if(n.multipleOf===0)return!1;const i=a/n.multipleOf,c=Math.round(i),u=Math.min(Math.abs(a)*Number.EPSILON*10,Math.abs(n.multipleOf)*Number.EPSILON*10);return Math.abs(i-c)<=u/Math.abs(n.multipleOf)},{message:`Must be a multiple of ${n.multipleOf}`}))}}},IQ=class{apply(e,t){const n=t;t.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&e.array===void 0&&(e.array=ye(eo()))}},NQ=class{apply(e,t){const n=t;n.minItems!==void 0&&e.array!==!1&&(e.array=(e.array||ye(eo())).min(n.minItems))}},kQ=class{apply(e,t){const n=t;n.maxItems!==void 0&&e.array!==!1&&(e.array=(e.array||ye(eo())).max(n.maxItems))}},MQ=class{apply(e,t){const n=t;if(e.array!==!1)if(Array.isArray(n.items))e.array=e.array||ye(eo());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=mr(n.items);let a=ye(r);if(e.array&&e.array instanceof rN){const i=e.array._def;i.checks&&i.checks.forEach(c=>{if(c._zod&&c._zod.def){const u=c._zod.def;u.check==="min_length"&&u.minimum!==void 0?a=a.min(u.minimum):u.check==="max_length"&&u.maximum!==void 0&&(a=a.max(u.maximum))}})}e.array=a}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?e.array=e.array||ye(eo()):e.array=ye(eo()).max(0):(typeof n.items=="boolean"&&n.items===!0||n.prefixItems)&&(e.array=e.array||ye(eo()))}},PQ=class{apply(e,t){if(t.type!=="array")return;const n=t;if(!Array.isArray(n.items)||e.array===!1)return;const r=n.items.map(i=>mr(i));let a;r.length===0?a=bT([]):a=bT(r),n.minItems!==void 0&&n.minItems>r.length&&(a=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(a=!1),e.tuple=a,e.array=!1}},DQ=class{apply(e,t){const n=t;e.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(e.object=e.object||ae({}).passthrough())}},LQ=class{apply(e,t){const n=t;t.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&e.object===void 0&&(e.object=ae({}).passthrough())}},jQ=class{apply(e,t){const n=t;if(n.maxProperties!==void 0&&e.object!==!1){const r=e.object||ae({}).passthrough();e.object=r.refine(a=>Object.keys(a).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},$Q=class{apply(e,t){const n=t;if(n.minProperties!==void 0&&e.object!==!1){const r=e.object||ae({}).passthrough();e.object=r.refine(a=>Object.keys(a).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function hd(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((n,r)=>hd(n,t[r]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(a=>r.includes(a)&&hd(e[a],t[a]))}return!1}function UQ(){return e=>{if(!Array.isArray(e))return!0;const t=[];return e.every(n=>t.some(a=>hd(n,a))?!1:(t.push(n),!0))}}function cm(e,t){return e.safeParse(t).success}var zQ=class{apply(e,t){if(!t.not)return e;const n=mr(t.not);return e.refine(r=>!cm(n,r),{message:"Value must not match the 'not' schema"})}},VQ=class{apply(e,t){return t.uniqueItems!==!0?e:e.refine(UQ(),{message:"Array items must be unique"})}},FQ=class{apply(e,t){return!t.allOf||t.allOf.length===0?e:t.allOf.map(r=>mr(r)).reduce((r,a)=>bd(r,a),e)}},BQ=class{apply(e,t){if(!t.anyOf||t.anyOf.length===0)return e;const n=t.anyOf.length===1?mr(t.anyOf[0]):yt([mr(t.anyOf[0]),mr(t.anyOf[1]),...t.anyOf.slice(2).map(r=>mr(r))]);return bd(e,n)}},qQ=class{apply(e,t){if(!t.oneOf||t.oneOf.length===0)return e;const n=t.oneOf.map(r=>mr(r));return e.refine(r=>{let a=0;for(const i of n)if(i.safeParse(r).success&&(a++,a>1))return!1;return a===1},{message:"Value must match exactly one of the oneOf schemas"})}},HQ=class{apply(e,t){const n=t;if(n.prefixItems&&Array.isArray(n.prefixItems)){const a=n.prefixItems.map(i=>mr(i));return e.refine(i=>{if(!Array.isArray(i))return!0;for(let c=0;c<Math.min(i.length,a.length);c++)if(!cm(a[c],i[c]))return!1;if(i.length>a.length){if(typeof n.items=="boolean"&&n.items===!1)return!1;if(n.items&&typeof n.items=="object"&&!Array.isArray(n.items)){const c=mr(n.items);for(let u=a.length;u<i.length;u++)if(!cm(c,i[u]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return e}},GQ=class{apply(e,t){const n=t;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return e;if(e instanceof Vm||e instanceof aN){const r={};if(n.properties)for(const[a,i]of Object.entries(n.properties))i!==void 0&&(r[a]=mr(i));if(n.required&&Array.isArray(n.required)){const a=new Set(n.required);for(const i of Object.keys(r))a.has(i)||(r[i]=r[i].optional())}else for(const a of Object.keys(r))r[a]=r[a].optional();return n.additionalProperties===!1?ae(r):ae(r).passthrough()}return e.refine(r=>{if(typeof r!="object"||r===null||Array.isArray(r))return!0;if(n.properties){for(const[a,i]of Object.entries(n.properties))if(i!==void 0&&Object.getOwnPropertyDescriptor(r,a)!==void 0&&!mr(i).safeParse(r[a]).success)return!1}if(n.required&&Array.isArray(n.required)){for(const a of n.required)if(!(Object.getOwnPropertyDescriptor(r,a)!==void 0))return!1}if(n.additionalProperties===!1&&n.properties){const a=new Set(Object.keys(n.properties));for(const i in r)if(!a.has(i))return!1}return!0},{message:"Object constraints validation failed"})}},ZQ=class{apply(e,t){if(!t.enum||t.enum.length===0)return e;const n=t.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?e:e.refine(r=>typeof r!="object"||r===null?!0:n.some(a=>hd(r,a)),{message:"Value must match one of the enum values"})}},WQ=class{apply(e,t){if(t.const===void 0)return e;const n=t.const;return typeof n!="object"||n===null?e:e.refine(r=>hd(r,n),{message:"Value must equal the const value"})}},KQ=class{apply(e,t){return t.description&&(e=e.describe(t.description)),e}},YQ=class{apply(e,t){var n;const r=t;return!((n=r.required)!=null&&n.includes("__proto__"))||t.type!==void 0?e:eo().refine(a=>this.validateRequired(a,r.required),{message:"Missing required properties"})}validateRequired(e,t){return typeof e!="object"||e===null||Array.isArray(e)?!0:t.every(n=>Object.prototype.hasOwnProperty.call(e,n))}},QQ=class{apply(e,t){var n;const r=t;if(r.contains===void 0)return e;const a=mr(r.contains),i=(n=r.minContains)!=null?n:1,c=r.maxContains;return e.refine(u=>{if(!Array.isArray(u))return!0;let d=0;for(const f of u)cm(a,f)&&d++;return!(d<i||c!==void 0&&d>c)},{message:"Array must contain required items matching the schema"})}},XQ=class{apply(e,t){const{default:n}=t;return n===void 0||!e.safeParse(n).success?e:e.default(n)}},JQ=[new yQ,new _Q,new vQ,new bQ,new wQ,new IQ,new LQ,new SQ,new EQ,new RQ,new xQ,new TQ,new OQ,new CQ,new AQ,new PQ,new NQ,new kQ,new MQ,new jQ,new $Q,new DQ],eX=[new YQ,new ZQ,new WQ,new FQ,new BQ,new qQ,new HQ,new GQ,new QQ,new zQ,new VQ,new XQ,new KQ];function mr(e){if(typeof e=="boolean")return e?eo():Hp();const t={};for(const a of JQ)a.apply(t,e);const n=[];if(t.string!==!1&&n.push(t.string||M()),t.number!==!1&&n.push(t.number||Pe()),t.boolean!==!1&&n.push(t.boolean||et()),t.null!==!1&&n.push(t.null||El()),t.array!==!1&&n.push(t.array||ye(eo())),t.tuple!==!1&&t.tuple!==void 0&&n.push(t.tuple),t.object!==!1)if(t.object)n.push(t.object);else{const a=lN(i=>typeof i=="object"&&i!==null&&!Array.isArray(i),"Must be an object, not an array");n.push(a)}t.file!==!1&&t.file!==void 0&&n.push(t.file);let r;n.length===0?r=Hp():n.length===1?r=n[0]:Object.keys(e).some(i=>i!=="$schema"&&i!=="title"&&i!=="description")?r=yt(n):r=eo();for(const a of eX)r=a.apply(r,e);return r}function eg(e){return!!e._zod}function Is(e,t){return eg(e)?uI(e,t):e.safeParse(t)}function DM(e){if(!e)return;let t;if(eg(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function tX(e){if(eg(e)){const i=e._zod?.def;if(i){if(i.value!==void 0)return i.value;if(Array.isArray(i.values)&&i.values.length>0)return i.values[0]}}const n=e._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}const r=e.value;if(r!==void 0)return r}const tg="2025-11-25",nX=[tg,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],xi="io.modelcontextprotocol/related-task",ng="2.0",sr=lN(e=>e!==null&&(typeof e=="object"||typeof e=="function")),LM=yt([M(),Pe().int()]),jM=M();ar({ttl:yt([Pe(),El()]).optional(),pollInterval:Pe().optional()});const rX=ae({ttl:Pe().optional()}),oX=ae({taskId:M()}),M1=ar({progressToken:LM.optional(),[xi]:oX.optional()}),oo=ae({_meta:M1.optional()}),Md=oo.extend({task:rX.optional()}),aX=e=>Md.safeParse(e).success,cr=ae({method:M(),params:oo.loose().optional()}),To=ae({_meta:M1.optional()}),Oo=ae({method:M(),params:To.loose().optional()}),lr=ar({_meta:M1.optional()}),rg=yt([M(),Pe().int()]),$M=ae({jsonrpc:De(ng),id:rg,...cr.shape}).strict(),B_=e=>$M.safeParse(e).success,UM=ae({jsonrpc:De(ng),...Oo.shape}).strict(),sX=e=>UM.safeParse(e).success,P1=ae({jsonrpc:De(ng),id:rg,result:lr}).strict(),ju=e=>P1.safeParse(e).success;var nt;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(nt||(nt={}));const D1=ae({jsonrpc:De(ng),id:rg.optional(),error:ae({code:Pe().int(),message:M(),data:st().optional()})}).strict(),iX=e=>D1.safeParse(e).success,Yu=yt([$M,UM,P1,D1]);yt([P1,D1]);const Qc=lr.strict(),cX=To.extend({requestId:rg.optional(),reason:M().optional()}),L1=Oo.extend({method:De("notifications/cancelled"),params:cX}),lX=ae({src:M(),mimeType:M().optional(),sizes:ye(M()).optional(),theme:Ot(["light","dark"]).optional()}),Pd=ae({icons:ye(lX).optional()}),pl=ae({name:M(),title:M().optional()}),zM=pl.extend({...pl.shape,...Pd.shape,version:M(),websiteUrl:M().optional(),description:M().optional()}),uX=bd(ae({applyDefaults:et().optional()}),ft(M(),st())),dX=Ub(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,bd(ae({form:uX.optional(),url:sr.optional()}),ft(M(),st()).optional())),fX=ar({list:sr.optional(),cancel:sr.optional(),requests:ar({sampling:ar({createMessage:sr.optional()}).optional(),elicitation:ar({create:sr.optional()}).optional()}).optional()}),hX=ar({list:sr.optional(),cancel:sr.optional(),requests:ar({tools:ar({call:sr.optional()}).optional()}).optional()}),pX=ae({experimental:ft(M(),sr).optional(),sampling:ae({context:sr.optional(),tools:sr.optional()}).optional(),elicitation:dX.optional(),roots:ae({listChanged:et().optional()}).optional(),tasks:fX.optional()}),mX=oo.extend({protocolVersion:M(),capabilities:pX,clientInfo:zM}),gX=cr.extend({method:De("initialize"),params:mX}),vX=ae({experimental:ft(M(),sr).optional(),logging:sr.optional(),completions:sr.optional(),prompts:ae({listChanged:et().optional()}).optional(),resources:ae({subscribe:et().optional(),listChanged:et().optional()}).optional(),tools:ae({listChanged:et().optional()}).optional(),tasks:hX.optional()}),VM=lr.extend({protocolVersion:M(),capabilities:vX,serverInfo:zM,instructions:M().optional()}),FM=Oo.extend({method:De("notifications/initialized"),params:To.optional()}),yX=e=>FM.safeParse(e).success,j1=cr.extend({method:De("ping"),params:oo.optional()}),_X=ae({progress:Pe(),total:vn(Pe()),message:vn(M())}),bX=ae({...To.shape,..._X.shape,progressToken:LM}),$1=Oo.extend({method:De("notifications/progress"),params:bX}),wX=oo.extend({cursor:jM.optional()}),Dd=cr.extend({params:wX.optional()}),Ld=lr.extend({nextCursor:jM.optional()}),SX=Ot(["working","input_required","completed","failed","cancelled"]),jd=ae({taskId:M(),status:SX,ttl:yt([Pe(),El()]),createdAt:M(),lastUpdatedAt:M(),pollInterval:vn(Pe()),statusMessage:vn(M())}),pd=lr.extend({task:jd}),EX=To.merge(jd),lm=Oo.extend({method:De("notifications/tasks/status"),params:EX}),U1=cr.extend({method:De("tasks/get"),params:oo.extend({taskId:M()})}),z1=lr.merge(jd),V1=cr.extend({method:De("tasks/result"),params:oo.extend({taskId:M()})});lr.loose();const F1=Dd.extend({method:De("tasks/list")}),B1=Ld.extend({tasks:ye(jd)}),q1=cr.extend({method:De("tasks/cancel"),params:oo.extend({taskId:M()})}),RX=lr.merge(jd),BM=ae({uri:M(),mimeType:vn(M()),_meta:ft(M(),st()).optional()}),qM=BM.extend({text:M()}),H1=M().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),HM=BM.extend({blob:H1}),$d=Ot(["user","assistant"]),Tl=ae({audience:ye($d).optional(),priority:Pe().min(0).max(1).optional(),lastModified:JI({offset:!0}).optional()}),GM=ae({...pl.shape,...Pd.shape,uri:M(),description:vn(M()),mimeType:vn(M()),annotations:Tl.optional(),_meta:vn(ar({}))}),xX=ae({...pl.shape,...Pd.shape,uriTemplate:M(),description:vn(M()),mimeType:vn(M()),annotations:Tl.optional(),_meta:vn(ar({}))}),TX=Dd.extend({method:De("resources/list")}),ZM=Ld.extend({resources:ye(GM)}),OX=Dd.extend({method:De("resources/templates/list")}),WM=Ld.extend({resourceTemplates:ye(xX)}),G1=oo.extend({uri:M()}),CX=G1,AX=cr.extend({method:De("resources/read"),params:CX}),KM=lr.extend({contents:ye(yt([qM,HM]))}),YM=Oo.extend({method:De("notifications/resources/list_changed"),params:To.optional()}),IX=G1,NX=cr.extend({method:De("resources/subscribe"),params:IX}),kX=G1,MX=cr.extend({method:De("resources/unsubscribe"),params:kX}),PX=To.extend({uri:M()}),DX=Oo.extend({method:De("notifications/resources/updated"),params:PX}),LX=ae({name:M(),description:vn(M()),required:vn(et())}),jX=ae({...pl.shape,...Pd.shape,description:vn(M()),arguments:vn(ye(LX)),_meta:vn(ar({}))}),$X=Dd.extend({method:De("prompts/list")}),QM=Ld.extend({prompts:ye(jX)}),UX=oo.extend({name:M(),arguments:ft(M(),M()).optional()}),zX=cr.extend({method:De("prompts/get"),params:UX}),Z1=ae({type:De("text"),text:M(),annotations:Tl.optional(),_meta:ft(M(),st()).optional()}),W1=ae({type:De("image"),data:H1,mimeType:M(),annotations:Tl.optional(),_meta:ft(M(),st()).optional()}),K1=ae({type:De("audio"),data:H1,mimeType:M(),annotations:Tl.optional(),_meta:ft(M(),st()).optional()}),VX=ae({type:De("tool_use"),name:M(),id:M(),input:ft(M(),st()),_meta:ft(M(),st()).optional()}),FX=ae({type:De("resource"),resource:yt([qM,HM]),annotations:Tl.optional(),_meta:ft(M(),st()).optional()}),BX=GM.extend({type:De("resource_link")}),Y1=yt([Z1,W1,K1,BX,FX]),qX=ae({role:$d,content:Y1}),XM=lr.extend({description:M().optional(),messages:ye(qX)}),JM=Oo.extend({method:De("notifications/prompts/list_changed"),params:To.optional()}),HX=ae({title:M().optional(),readOnlyHint:et().optional(),destructiveHint:et().optional(),idempotentHint:et().optional(),openWorldHint:et().optional()}),GX=ae({taskSupport:Ot(["required","optional","forbidden"]).optional()}),eP=ae({...pl.shape,...Pd.shape,description:M().optional(),inputSchema:ae({type:De("object"),properties:ft(M(),sr).optional(),required:ye(M()).optional()}).catchall(st()),outputSchema:ae({type:De("object"),properties:ft(M(),sr).optional(),required:ye(M()).optional()}).catchall(st()).optional(),annotations:HX.optional(),execution:GX.optional(),_meta:ft(M(),st()).optional()}),ZX=Dd.extend({method:De("tools/list")}),Q1=Ld.extend({tools:ye(eP)}),og=lr.extend({content:ye(Y1).default([]),structuredContent:ft(M(),st()).optional(),isError:et().optional()});og.or(lr.extend({toolResult:st()}));const WX=Md.extend({name:M(),arguments:ft(M(),st()).optional()}),KX=cr.extend({method:De("tools/call"),params:WX}),tP=Oo.extend({method:De("notifications/tools/list_changed"),params:To.optional()}),YX=ae({autoRefresh:et().default(!0),debounceMs:Pe().int().nonnegative().default(300)}),nP=Ot(["debug","info","notice","warning","error","critical","alert","emergency"]),QX=oo.extend({level:nP}),XX=cr.extend({method:De("logging/setLevel"),params:QX}),JX=To.extend({level:nP,logger:M().optional(),data:st()}),eJ=Oo.extend({method:De("notifications/message"),params:JX}),tJ=ae({name:M().optional()}),nJ=ae({hints:ye(tJ).optional(),costPriority:Pe().min(0).max(1).optional(),speedPriority:Pe().min(0).max(1).optional(),intelligencePriority:Pe().min(0).max(1).optional()}),rJ=ae({mode:Ot(["auto","required","none"]).optional()}),oJ=ae({type:De("tool_result"),toolUseId:M().describe("The unique identifier for the corresponding tool call."),content:ye(Y1).default([]),structuredContent:ae({}).loose().optional(),isError:et().optional(),_meta:ft(M(),st()).optional()}),aJ=jb("type",[Z1,W1,K1]),um=jb("type",[Z1,W1,K1,VX,oJ]),sJ=ae({role:$d,content:yt([um,ye(um)]),_meta:ft(M(),st()).optional()}),iJ=Md.extend({messages:ye(sJ),modelPreferences:nJ.optional(),systemPrompt:M().optional(),includeContext:Ot(["none","thisServer","allServers"]).optional(),temperature:Pe().optional(),maxTokens:Pe().int(),stopSequences:ye(M()).optional(),metadata:sr.optional(),tools:ye(eP).optional(),toolChoice:rJ.optional()}),rP=cr.extend({method:De("sampling/createMessage"),params:iJ}),oP=lr.extend({model:M(),stopReason:vn(Ot(["endTurn","stopSequence","maxTokens"]).or(M())),role:$d,content:aJ}),aP=lr.extend({model:M(),stopReason:vn(Ot(["endTurn","stopSequence","maxTokens","toolUse"]).or(M())),role:$d,content:yt([um,ye(um)])}),cJ=ae({type:De("boolean"),title:M().optional(),description:M().optional(),default:et().optional()}),lJ=ae({type:De("string"),title:M().optional(),description:M().optional(),minLength:Pe().optional(),maxLength:Pe().optional(),format:Ot(["email","uri","date","date-time"]).optional(),default:M().optional()}),uJ=ae({type:Ot(["number","integer"]),title:M().optional(),description:M().optional(),minimum:Pe().optional(),maximum:Pe().optional(),default:Pe().optional()}),dJ=ae({type:De("string"),title:M().optional(),description:M().optional(),enum:ye(M()),default:M().optional()}),fJ=ae({type:De("string"),title:M().optional(),description:M().optional(),oneOf:ye(ae({const:M(),title:M()})),default:M().optional()}),hJ=ae({type:De("string"),title:M().optional(),description:M().optional(),enum:ye(M()),enumNames:ye(M()).optional(),default:M().optional()}),pJ=yt([dJ,fJ]),mJ=ae({type:De("array"),title:M().optional(),description:M().optional(),minItems:Pe().optional(),maxItems:Pe().optional(),items:ae({type:De("string"),enum:ye(M())}),default:ye(M()).optional()}),gJ=ae({type:De("array"),title:M().optional(),description:M().optional(),minItems:Pe().optional(),maxItems:Pe().optional(),items:ae({anyOf:ye(ae({const:M(),title:M()}))}),default:ye(M()).optional()}),vJ=yt([mJ,gJ]),yJ=yt([hJ,pJ,vJ]),_J=yt([yJ,cJ,lJ,uJ]),bJ=Md.extend({mode:De("form").optional(),message:M(),requestedSchema:ae({type:De("object"),properties:ft(M(),_J),required:ye(M()).optional()})}),wJ=Md.extend({mode:De("url"),message:M(),elicitationId:M(),url:M().url()}),SJ=yt([bJ,wJ]),sP=cr.extend({method:De("elicitation/create"),params:SJ}),EJ=To.extend({elicitationId:M()}),RJ=Oo.extend({method:De("notifications/elicitation/complete"),params:EJ}),iP=lr.extend({action:Ot(["accept","decline","cancel"]),content:Ub(e=>e===null?void 0:e,ft(M(),yt([M(),Pe(),et(),ye(M())])).optional())}),xJ=ae({type:De("ref/resource"),uri:M()}),TJ=ae({type:De("ref/prompt"),name:M()}),OJ=oo.extend({ref:yt([TJ,xJ]),argument:ae({name:M(),value:M()}),context:ae({arguments:ft(M(),M()).optional()}).optional()}),CJ=cr.extend({method:De("completion/complete"),params:OJ}),cP=lr.extend({completion:ar({values:ye(M()).max(100),total:vn(Pe().int()),hasMore:vn(et())})}),AJ=ae({uri:M().startsWith("file://"),name:M().optional(),_meta:ft(M(),st()).optional()}),IJ=cr.extend({method:De("roots/list"),params:oo.optional()}),NJ=lr.extend({roots:ye(AJ)}),kJ=Oo.extend({method:De("notifications/roots/list_changed"),params:To.optional()});yt([j1,gX,CJ,XX,zX,$X,TX,OX,AX,NX,MX,KX,ZX,U1,V1,F1,q1]);yt([L1,$1,FM,kJ,lm]);yt([Qc,oP,aP,iP,NJ,z1,B1,pd]);yt([j1,rP,sP,IJ,U1,V1,F1,q1]);yt([L1,$1,eJ,DX,YM,tP,JM,lm,RJ]);yt([Qc,VM,cP,XM,QM,ZM,WM,KM,og,Q1,z1,B1,pd]);class Qe extends Error{constructor(t,n,r){super(`MCP error ${t}: ${n}`),this.code=t,this.data=r,this.name="McpError"}static fromError(t,n,r){if(t===nt.UrlElicitationRequired&&r){const a=r;if(a.elicitations)return new MJ(a.elicitations,n)}return new Qe(t,n,r)}}class MJ extends Qe{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(nt.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}function wi(e){return e==="completed"||e==="failed"||e==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function a2(e){const n=DM(e)?.method;if(!n)throw new Error("Schema is missing a method literal");const r=tX(n);if(typeof r!="string")throw new Error("Schema method literal must be a string");return r}function s2(e,t){const n=Is(e,t);if(!n.success)throw n.error;return n.data}const PJ=6e4;class DJ{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(L1,n=>{this._oncancel(n)}),this.setNotificationHandler($1,n=>{this._onprogress(n)}),this.setRequestHandler(j1,n=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(U1,async(n,r)=>{const a=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!a)throw new Qe(nt.InvalidParams,"Failed to retrieve task: Task not found");return{...a}}),this.setRequestHandler(V1,async(n,r)=>{const a=async()=>{const i=n.params.taskId;if(this._taskMessageQueue){let u;for(;u=await this._taskMessageQueue.dequeue(i,r.sessionId);){if(u.type==="response"||u.type==="error"){const d=u.message,f=d.id,m=this._requestResolvers.get(f);if(m)if(this._requestResolvers.delete(f),u.type==="response")m(d);else{const p=d,g=new Qe(p.error.code,p.error.message,p.error.data);m(g)}else{const p=u.type==="response"?"Response":"Error";this._onerror(new Error(`${p} handler missing for request ${f}`))}continue}await this._transport?.send(u.message,{relatedRequestId:r.requestId})}}const c=await this._taskStore.getTask(i,r.sessionId);if(!c)throw new Qe(nt.InvalidParams,`Task not found: ${i}`);if(!wi(c.status))return await this._waitForTaskUpdate(i,r.signal),await a();if(wi(c.status)){const u=await this._taskStore.getTaskResult(i,r.sessionId);return this._clearTaskQueue(i),{...u,_meta:{...u._meta,[xi]:{taskId:i}}}}return await a()};return await a()}),this.setRequestHandler(F1,async(n,r)=>{try{const{tasks:a,nextCursor:i}=await this._taskStore.listTasks(n.params?.cursor,r.sessionId);return{tasks:a,nextCursor:i,_meta:{}}}catch(a){throw new Qe(nt.InvalidParams,`Failed to list tasks: ${a instanceof Error?a.message:String(a)}`)}}),this.setRequestHandler(q1,async(n,r)=>{try{const a=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!a)throw new Qe(nt.InvalidParams,`Task not found: ${n.params.taskId}`);if(wi(a.status))throw new Qe(nt.InvalidParams,`Cannot cancel task in terminal status: ${a.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",r.sessionId),this._clearTaskQueue(n.params.taskId);const i=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!i)throw new Qe(nt.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...i}}catch(a){throw a instanceof Qe?a:new Qe(nt.InvalidRequest,`Failed to cancel task: ${a instanceof Error?a.message:String(a)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,n,r,a,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(a,n),startTime:Date.now(),timeout:n,maxTotalTimeout:r,resetTimeoutOnProgress:i,onTimeout:a})}_resetTimeout(t){const n=this._timeoutInfo.get(t);if(!n)return!1;const r=Date.now()-n.startTime;if(n.maxTotalTimeout&&r>=n.maxTotalTimeout)throw this._timeoutInfo.delete(t),Qe.fromError(nt.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:r});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(t){const n=this._timeoutInfo.get(t);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(t))}async connect(t){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=t;const n=this.transport?.onclose;this._transport.onclose=()=>{n?.(),this._onclose()};const r=this.transport?.onerror;this._transport.onerror=i=>{r?.(i),this._onerror(i)};const a=this._transport?.onmessage;this._transport.onmessage=(i,c)=>{a?.(i,c),ju(i)||iX(i)?this._onresponse(i):B_(i)?this._onrequest(i,c):sX(i)?this._onnotification(i):this._onerror(new Error(`Unknown message type: ${JSON.stringify(i)}`))},await this._transport.start()}_onclose(){const t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const r of this._requestHandlerAbortControllers.values())r.abort();this._requestHandlerAbortControllers.clear();const n=Qe.fromError(nt.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const r of t.values())r(n)}_onerror(t){this.onerror?.(t)}_onnotification(t){const n=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(t)).catch(r=>this._onerror(new Error(`Uncaught error in notification handler: ${r}`)))}_onrequest(t,n){const r=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,a=this._transport,i=t.params?._meta?.[xi]?.taskId;if(r===void 0){const m={jsonrpc:"2.0",id:t.id,error:{code:nt.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:m,timestamp:Date.now()},a?.sessionId).catch(p=>this._onerror(new Error(`Failed to enqueue error response: ${p}`))):a?.send(m).catch(p=>this._onerror(new Error(`Failed to send an error response: ${p}`)));return}const c=new AbortController;this._requestHandlerAbortControllers.set(t.id,c);const u=aX(t.params)?t.params.task:void 0,d=this._taskStore?this.requestTaskStore(t,a?.sessionId):void 0,f={signal:c.signal,sessionId:a?.sessionId,_meta:t.params?._meta,sendNotification:async m=>{if(c.signal.aborted)return;const p={relatedRequestId:t.id};i&&(p.relatedTask={taskId:i}),await this.notification(m,p)},sendRequest:async(m,p,g)=>{if(c.signal.aborted)throw new Qe(nt.ConnectionClosed,"Request was cancelled");const y={...g,relatedRequestId:t.id};i&&!y.relatedTask&&(y.relatedTask={taskId:i});const w=y.relatedTask?.taskId??i;return w&&d&&await d.updateTaskStatus(w,"input_required"),await this.request(m,p,y)},authInfo:n?.authInfo,requestId:t.id,requestInfo:n?.requestInfo,taskId:i,taskStore:d,taskRequestedTtl:u?.ttl,closeSSEStream:n?.closeSSEStream,closeStandaloneSSEStream:n?.closeStandaloneSSEStream};Promise.resolve().then(()=>{u&&this.assertTaskHandlerCapability(t.method)}).then(()=>r(t,f)).then(async m=>{if(c.signal.aborted)return;const p={result:m,jsonrpc:"2.0",id:t.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:p,timestamp:Date.now()},a?.sessionId):await a?.send(p)},async m=>{if(c.signal.aborted)return;const p={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(m.code)?m.code:nt.InternalError,message:m.message??"Internal error",...m.data!==void 0&&{data:m.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:p,timestamp:Date.now()},a?.sessionId):await a?.send(p)}).catch(m=>this._onerror(new Error(`Failed to send response: ${m}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){const{progressToken:n,...r}=t.params,a=Number(n),i=this._progressHandlers.get(a);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}const c=this._responseHandlers.get(a),u=this._timeoutInfo.get(a);if(u&&c&&u.resetTimeoutOnProgress)try{this._resetTimeout(a)}catch(d){this._responseHandlers.delete(a),this._progressHandlers.delete(a),this._cleanupTimeout(a),c(d);return}i(r)}_onresponse(t){const n=Number(t.id),r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),ju(t))r(t);else{const c=new Qe(t.error.code,t.error.message,t.error.data);r(c)}return}const a=this._responseHandlers.get(n);if(a===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let i=!1;if(ju(t)&&t.result&&typeof t.result=="object"){const c=t.result;if(c.task&&typeof c.task=="object"){const u=c.task;typeof u.taskId=="string"&&(i=!0,this._taskProgressTokens.set(u.taskId,n))}}if(i||this._progressHandlers.delete(n),ju(t))a(t);else{const c=Qe.fromError(t.error.code,t.error.message,t.error.data);a(c)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,n,r){const{task:a}=r??{};if(!a){try{yield{type:"result",result:await this.request(t,n,r)}}catch(c){yield{type:"error",error:c instanceof Qe?c:new Qe(nt.InternalError,String(c))}}return}let i;try{const c=await this.request(t,pd,r);if(c.task)i=c.task.taskId,yield{type:"taskCreated",task:c.task};else throw new Qe(nt.InternalError,"Task creation did not return a task");for(;;){const u=await this.getTask({taskId:i},r);if(yield{type:"taskStatus",task:u},wi(u.status)){u.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},n,r)}:u.status==="failed"?yield{type:"error",error:new Qe(nt.InternalError,`Task ${i} failed`)}:u.status==="cancelled"&&(yield{type:"error",error:new Qe(nt.InternalError,`Task ${i} was cancelled`)});return}if(u.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},n,r)};return}const d=u.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(f=>setTimeout(f,d)),r?.signal?.throwIfAborted()}}catch(c){yield{type:"error",error:c instanceof Qe?c:new Qe(nt.InternalError,String(c))}}}request(t,n,r){const{relatedRequestId:a,resumptionToken:i,onresumptiontoken:c,task:u,relatedTask:d}=r??{};return new Promise((f,m)=>{const p=R=>{m(R)};if(!this._transport){p(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),u&&this.assertTaskCapability(t.method)}catch(R){p(R);return}r?.signal?.throwIfAborted();const g=this._requestMessageId++,y={...t,jsonrpc:"2.0",id:g};r?.onprogress&&(this._progressHandlers.set(g,r.onprogress),y.params={...t.params,_meta:{...t.params?._meta||{},progressToken:g}}),u&&(y.params={...y.params,task:u}),d&&(y.params={...y.params,_meta:{...y.params?._meta||{},[xi]:d}});const w=R=>{this._responseHandlers.delete(g),this._progressHandlers.delete(g),this._cleanupTimeout(g),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:g,reason:String(R)}},{relatedRequestId:a,resumptionToken:i,onresumptiontoken:c}).catch(O=>this._onerror(new Error(`Failed to send cancellation: ${O}`)));const T=R instanceof Qe?R:new Qe(nt.RequestTimeout,String(R));m(T)};this._responseHandlers.set(g,R=>{if(!r?.signal?.aborted){if(R instanceof Error)return m(R);try{const T=Is(n,R.result);T.success?f(T.data):m(T.error)}catch(T){m(T)}}}),r?.signal?.addEventListener("abort",()=>{w(r?.signal?.reason)});const S=r?.timeout??PJ,b=()=>w(Qe.fromError(nt.RequestTimeout,"Request timed out",{timeout:S}));this._setupTimeout(g,S,r?.maxTotalTimeout,b,r?.resetTimeoutOnProgress??!1);const E=d?.taskId;if(E){const R=T=>{const O=this._responseHandlers.get(g);O?O(T):this._onerror(new Error(`Response handler missing for side-channeled request ${g}`))};this._requestResolvers.set(g,R),this._enqueueTaskMessage(E,{type:"request",message:y,timestamp:Date.now()}).catch(T=>{this._cleanupTimeout(g),m(T)})}else this._transport.send(y,{relatedRequestId:a,resumptionToken:i,onresumptiontoken:c}).catch(R=>{this._cleanupTimeout(g),m(R)})})}async getTask(t,n){return this.request({method:"tasks/get",params:t},z1,n)}async getTaskResult(t,n,r){return this.request({method:"tasks/result",params:t},n,r)}async listTasks(t,n){return this.request({method:"tasks/list",params:t},B1,n)}async cancelTask(t,n){return this.request({method:"tasks/cancel",params:t},RX,n)}async notification(t,n){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);const r=n?.relatedTask?.taskId;if(r){const u={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[xi]:n.relatedTask}}};await this._enqueueTaskMessage(r,{type:"notification",message:u,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId&&!n?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let u={...t,jsonrpc:"2.0"};n?.relatedTask&&(u={...u,params:{...u.params,_meta:{...u.params?._meta||{},[xi]:n.relatedTask}}}),this._transport?.send(u,n).catch(d=>this._onerror(d))});return}let c={...t,jsonrpc:"2.0"};n?.relatedTask&&(c={...c,params:{...c.params,_meta:{...c.params?._meta||{},[xi]:n.relatedTask}}}),await this._transport.send(c,n)}setRequestHandler(t,n){const r=a2(t);this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(a,i)=>{const c=s2(t,a);return Promise.resolve(n(c,i))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,n){const r=a2(t);this._notificationHandlers.set(r,a=>{const i=s2(t,a);return Promise.resolve(n(i))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){const n=this._taskProgressTokens.get(t);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,n,r){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const a=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,n,r,a)}async _clearTaskQueue(t,n){if(this._taskMessageQueue){const r=await this._taskMessageQueue.dequeueAll(t,n);for(const a of r)if(a.type==="request"&&B_(a.message)){const i=a.message.id,c=this._requestResolvers.get(i);c?(c(new Qe(nt.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,n){let r=this._options?.defaultTaskPollInterval??1e3;try{const a=await this._taskStore?.getTask(t);a?.pollInterval&&(r=a.pollInterval)}catch{}return new Promise((a,i)=>{if(n.aborted){i(new Qe(nt.InvalidRequest,"Request cancelled"));return}const c=setTimeout(a,r);n.addEventListener("abort",()=>{clearTimeout(c),i(new Qe(nt.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,n){const r=this._taskStore;if(!r)throw new Error("No task store configured");return{createTask:async a=>{if(!t)throw new Error("No request provided");return await r.createTask(a,t.id,{method:t.method,params:t.params},n)},getTask:async a=>{const i=await r.getTask(a,n);if(!i)throw new Qe(nt.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(a,i,c)=>{await r.storeTaskResult(a,i,c,n);const u=await r.getTask(a,n);if(u){const d=lm.parse({method:"notifications/tasks/status",params:u});await this.notification(d),wi(u.status)&&this._cleanupTaskProgressHandler(a)}},getTaskResult:a=>r.getTaskResult(a,n),updateTaskStatus:async(a,i,c)=>{const u=await r.getTask(a,n);if(!u)throw new Qe(nt.InvalidParams,`Task "${a}" not found - it may have been cleaned up`);if(wi(u.status))throw new Qe(nt.InvalidParams,`Cannot update task "${a}" from terminal status "${u.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await r.updateTaskStatus(a,i,c,n);const d=await r.getTask(a,n);if(d){const f=lm.parse({method:"notifications/tasks/status",params:d});await this.notification(f),wi(d.status)&&this._cleanupTaskProgressHandler(a)}},listTasks:a=>r.listTasks(a,n)}}}function i2(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function LJ(e,t){const n={...e};for(const r in t){const a=r,i=t[a];if(i===void 0)continue;const c=n[a];i2(c)&&i2(i)?n[a]={...c,...i}:n[a]=i}return n}var Ch={exports:{}},M0={},$a={},Si={},P0={},D0={},L0={},c2;function dm(){return c2||(c2=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor(R){if(super(),!e.IDENTIFIER.test(R))throw new Error("CodeGen: name must be a valid identifier");this.str=R}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class r extends t{constructor(R){super(),this._items=typeof R=="string"?[R]:R}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const R=this._items[0];return R===""||R==='""'}get str(){var R;return(R=this._str)!==null&&R!==void 0?R:this._str=this._items.reduce((T,O)=>`${T}${O}`,"")}get names(){var R;return(R=this._names)!==null&&R!==void 0?R:this._names=this._items.reduce((T,O)=>(O instanceof n&&(T[O.str]=(T[O.str]||0)+1),T),{})}}e._Code=r,e.nil=new r("");function a(E,...R){const T=[E[0]];let O=0;for(;O<R.length;)u(T,R[O]),T.push(E[++O]);return new r(T)}e._=a;const i=new r("+");function c(E,...R){const T=[y(E[0])];let O=0;for(;O<R.length;)T.push(i),u(T,R[O]),T.push(i,y(E[++O]));return d(T),new r(T)}e.str=c;function u(E,R){R instanceof r?E.push(...R._items):R instanceof n?E.push(R):E.push(p(R))}e.addCodeArg=u;function d(E){let R=1;for(;R<E.length-1;){if(E[R]===i){const T=f(E[R-1],E[R+1]);if(T!==void 0){E.splice(R-1,3,T);continue}E[R++]="+"}R++}}function f(E,R){if(R==='""')return E;if(E==='""')return R;if(typeof E=="string")return R instanceof n||E[E.length-1]!=='"'?void 0:typeof R!="string"?`${E.slice(0,-1)}${R}"`:R[0]==='"'?E.slice(0,-1)+R.slice(1):void 0;if(typeof R=="string"&&R[0]==='"'&&!(E instanceof n))return`"${E}${R.slice(1)}`}function m(E,R){return R.emptyStr()?E:E.emptyStr()?R:c`${E}${R}`}e.strConcat=m;function p(E){return typeof E=="number"||typeof E=="boolean"||E===null?E:y(Array.isArray(E)?E.join(","):E)}function g(E){return new r(y(E))}e.stringify=g;function y(E){return JSON.stringify(E).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=y;function w(E){return typeof E=="string"&&e.IDENTIFIER.test(E)?new r(`.${E}`):a`[${E}]`}e.getProperty=w;function S(E){if(typeof E=="string"&&e.IDENTIFIER.test(E))return new r(`${E}`);throw new Error(`CodeGen: invalid export name: ${E}, use explicit $id name mapping`)}e.getEsmExportName=S;function b(E){return new r(E.toString())}e.regexpCode=b})(L0)),L0}var j0={},l2;function u2(){return l2||(l2=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=dm();class n extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var r;(function(d){d[d.Started=0]="Started",d[d.Completed=1]="Completed"})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class a{constructor({prefixes:f,parent:m}={}){this._names={},this._prefixes=f,this._parent=m}toName(f){return f instanceof t.Name?f:this.name(f)}name(f){return new t.Name(this._newName(f))}_newName(f){const m=this._names[f]||this._nameGroup(f);return`${f}${m.index++}`}_nameGroup(f){var m,p;if(!((p=(m=this._parent)===null||m===void 0?void 0:m._prefixes)===null||p===void 0)&&p.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}e.Scope=a;class i extends t.Name{constructor(f,m){super(m),this.prefix=f}setValue(f,{property:m,itemIndex:p}){this.value=f,this.scopePath=(0,t._)`.${new t.Name(m)}[${p}]`}}e.ValueScopeName=i;const c=(0,t._)`\n`;class u extends a{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?c:t.nil}}get(){return this._scope}name(f){return new i(f,this._newName(f))}value(f,m){var p;if(m.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const g=this.toName(f),{prefix:y}=g,w=(p=m.key)!==null&&p!==void 0?p:m.ref;let S=this._values[y];if(S){const R=S.get(w);if(R)return R}else S=this._values[y]=new Map;S.set(w,g);const b=this._scope[y]||(this._scope[y]=[]),E=b.length;return b[E]=m.ref,g.setValue(m,{property:y,itemIndex:E}),g}getValue(f,m){const p=this._values[f];if(p)return p.get(m)}scopeRefs(f,m=this._values){return this._reduceValues(m,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${f}${p.scopePath}`})}scopeCode(f=this._values,m,p){return this._reduceValues(f,g=>{if(g.value===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return g.value.code},m,p)}_reduceValues(f,m,p={},g){let y=t.nil;for(const w in f){const S=f[w];if(!S)continue;const b=p[w]=p[w]||new Map;S.forEach(E=>{if(b.has(E))return;b.set(E,r.Started);let R=m(E);if(R){const T=this.opts.es5?e.varKinds.var:e.varKinds.const;y=(0,t._)`${y}${T} ${E} = ${R};${this.opts._n}`}else if(R=g?.(E))y=(0,t._)`${y}${R}${this.opts._n}`;else throw new n(E);b.set(E,r.Completed)})}return y}}e.ValueScope=u})(j0)),j0}var d2;function gt(){return d2||(d2=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=dm(),n=u2();var r=dm();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var a=u2();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class i{optimizeNodes(){return this}optimizeNames(L,z){return this}}class c extends i{constructor(L,z,Q){super(),this.varKind=L,this.name=z,this.rhs=Q}render({es5:L,_n:z}){const Q=L?n.varKinds.var:this.varKind,me=this.rhs===void 0?"":` = ${this.rhs}`;return`${Q} ${this.name}${me};`+z}optimizeNames(L,z){if(L[this.name.str])return this.rhs&&(this.rhs=J(this.rhs,L,z)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class u extends i{constructor(L,z,Q){super(),this.lhs=L,this.rhs=z,this.sideEffects=Q}render({_n:L}){return`${this.lhs} = ${this.rhs};`+L}optimizeNames(L,z){if(!(this.lhs instanceof t.Name&&!L[this.lhs.str]&&!this.sideEffects))return this.rhs=J(this.rhs,L,z),this}get names(){const L=this.lhs instanceof t.Name?{}:{...this.lhs.names};return U(L,this.rhs)}}class d extends u{constructor(L,z,Q,me){super(L,Q,me),this.op=z}render({_n:L}){return`${this.lhs} ${this.op}= ${this.rhs};`+L}}class f extends i{constructor(L){super(),this.label=L,this.names={}}render({_n:L}){return`${this.label}:`+L}}class m extends i{constructor(L){super(),this.label=L,this.names={}}render({_n:L}){return`break${this.label?` ${this.label}`:""};`+L}}class p extends i{constructor(L){super(),this.error=L}render({_n:L}){return`throw ${this.error};`+L}get names(){return this.error.names}}class g extends i{constructor(L){super(),this.code=L}render({_n:L}){return`${this.code};`+L}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(L,z){return this.code=J(this.code,L,z),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class y extends i{constructor(L=[]){super(),this.nodes=L}render(L){return this.nodes.reduce((z,Q)=>z+Q.render(L),"")}optimizeNodes(){const{nodes:L}=this;let z=L.length;for(;z--;){const Q=L[z].optimizeNodes();Array.isArray(Q)?L.splice(z,1,...Q):Q?L[z]=Q:L.splice(z,1)}return L.length>0?this:void 0}optimizeNames(L,z){const{nodes:Q}=this;let me=Q.length;for(;me--;){const ve=Q[me];ve.optimizeNames(L,z)||(le(L,ve.names),Q.splice(me,1))}return Q.length>0?this:void 0}get names(){return this.nodes.reduce((L,z)=>G(L,z.names),{})}}class w extends y{render(L){return"{"+L._n+super.render(L)+"}"+L._n}}class S extends y{}class b extends w{}b.kind="else";class E extends w{constructor(L,z){super(z),this.condition=L}render(L){let z=`if(${this.condition})`+super.render(L);return this.else&&(z+="else "+this.else.render(L)),z}optimizeNodes(){super.optimizeNodes();const L=this.condition;if(L===!0)return this.nodes;let z=this.else;if(z){const Q=z.optimizeNodes();z=this.else=Array.isArray(Q)?new b(Q):Q}if(z)return L===!1?z instanceof E?z:z.nodes:this.nodes.length?this:new E(F(L),z instanceof E?[z]:z.nodes);if(!(L===!1||!this.nodes.length))return this}optimizeNames(L,z){var Q;if(this.else=(Q=this.else)===null||Q===void 0?void 0:Q.optimizeNames(L,z),!!(super.optimizeNames(L,z)||this.else))return this.condition=J(this.condition,L,z),this}get names(){const L=super.names;return U(L,this.condition),this.else&&G(L,this.else.names),L}}E.kind="if";class R extends w{}R.kind="for";class T extends R{constructor(L){super(),this.iteration=L}render(L){return`for(${this.iteration})`+super.render(L)}optimizeNames(L,z){if(super.optimizeNames(L,z))return this.iteration=J(this.iteration,L,z),this}get names(){return G(super.names,this.iteration.names)}}class O extends R{constructor(L,z,Q,me){super(),this.varKind=L,this.name=z,this.from=Q,this.to=me}render(L){const z=L.es5?n.varKinds.var:this.varKind,{name:Q,from:me,to:ve}=this;return`for(${z} ${Q}=${me}; ${Q}<${ve}; ${Q}++)`+super.render(L)}get names(){const L=U(super.names,this.from);return U(L,this.to)}}class C extends R{constructor(L,z,Q,me){super(),this.loop=L,this.varKind=z,this.name=Q,this.iterable=me}render(L){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(L)}optimizeNames(L,z){if(super.optimizeNames(L,z))return this.iterable=J(this.iterable,L,z),this}get names(){return G(super.names,this.iterable.names)}}class I extends w{constructor(L,z,Q){super(),this.name=L,this.args=z,this.async=Q}render(L){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(L)}}I.kind="func";class N extends y{render(L){return"return "+super.render(L)}}N.kind="return";class P extends w{render(L){let z="try"+super.render(L);return this.catch&&(z+=this.catch.render(L)),this.finally&&(z+=this.finally.render(L)),z}optimizeNodes(){var L,z;return super.optimizeNodes(),(L=this.catch)===null||L===void 0||L.optimizeNodes(),(z=this.finally)===null||z===void 0||z.optimizeNodes(),this}optimizeNames(L,z){var Q,me;return super.optimizeNames(L,z),(Q=this.catch)===null||Q===void 0||Q.optimizeNames(L,z),(me=this.finally)===null||me===void 0||me.optimizeNames(L,z),this}get names(){const L=super.names;return this.catch&&G(L,this.catch.names),this.finally&&G(L,this.finally.names),L}}class $ extends w{constructor(L){super(),this.error=L}render(L){return`catch(${this.error})`+super.render(L)}}$.kind="catch";class W extends w{render(L){return"finally"+super.render(L)}}W.kind="finally";class V{constructor(L,z={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...z,_n:z.lines?`
164
- `:""},this._extScope=L,this._scope=new n.Scope({parent:L}),this._nodes=[new S]}toString(){return this._root.render(this.opts)}name(L){return this._scope.name(L)}scopeName(L){return this._extScope.name(L)}scopeValue(L,z){const Q=this._extScope.value(L,z);return(this._values[Q.prefix]||(this._values[Q.prefix]=new Set)).add(Q),Q}getScopeValue(L,z){return this._extScope.getValue(L,z)}scopeRefs(L){return this._extScope.scopeRefs(L,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(L,z,Q,me){const ve=this._scope.toName(z);return Q!==void 0&&me&&(this._constants[ve.str]=Q),this._leafNode(new c(L,ve,Q)),ve}const(L,z,Q){return this._def(n.varKinds.const,L,z,Q)}let(L,z,Q){return this._def(n.varKinds.let,L,z,Q)}var(L,z,Q){return this._def(n.varKinds.var,L,z,Q)}assign(L,z,Q){return this._leafNode(new u(L,z,Q))}add(L,z){return this._leafNode(new d(L,e.operators.ADD,z))}code(L){return typeof L=="function"?L():L!==t.nil&&this._leafNode(new g(L)),this}object(...L){const z=["{"];for(const[Q,me]of L)z.length>1&&z.push(","),z.push(Q),(Q!==me||this.opts.es5)&&(z.push(":"),(0,t.addCodeArg)(z,me));return z.push("}"),new t._Code(z)}if(L,z,Q){if(this._blockNode(new E(L)),z&&Q)this.code(z).else().code(Q).endIf();else if(z)this.code(z).endIf();else if(Q)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(L){return this._elseNode(new E(L))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(E,b)}_for(L,z){return this._blockNode(L),z&&this.code(z).endFor(),this}for(L,z){return this._for(new T(L),z)}forRange(L,z,Q,me,ve=this.opts.es5?n.varKinds.var:n.varKinds.let){const Ce=this._scope.toName(L);return this._for(new O(ve,Ce,z,Q),()=>me(Ce))}forOf(L,z,Q,me=n.varKinds.const){const ve=this._scope.toName(L);if(this.opts.es5){const Ce=z instanceof t.Name?z:this.var("_arr",z);return this.forRange("_i",0,(0,t._)`${Ce}.length`,Ie=>{this.var(ve,(0,t._)`${Ce}[${Ie}]`),Q(ve)})}return this._for(new C("of",me,ve,z),()=>Q(ve))}forIn(L,z,Q,me=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(L,(0,t._)`Object.keys(${z})`,Q);const ve=this._scope.toName(L);return this._for(new C("in",me,ve,z),()=>Q(ve))}endFor(){return this._endBlockNode(R)}label(L){return this._leafNode(new f(L))}break(L){return this._leafNode(new m(L))}return(L){const z=new N;if(this._blockNode(z),this.code(L),z.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(N)}try(L,z,Q){if(!z&&!Q)throw new Error('CodeGen: "try" without "catch" and "finally"');const me=new P;if(this._blockNode(me),this.code(L),z){const ve=this.name("e");this._currNode=me.catch=new $(ve),z(ve)}return Q&&(this._currNode=me.finally=new W,this.code(Q)),this._endBlockNode($,W)}throw(L){return this._leafNode(new p(L))}block(L,z){return this._blockStarts.push(this._nodes.length),L&&this.code(L).endBlock(z),this}endBlock(L){const z=this._blockStarts.pop();if(z===void 0)throw new Error("CodeGen: not in self-balancing block");const Q=this._nodes.length-z;if(Q<0||L!==void 0&&Q!==L)throw new Error(`CodeGen: wrong number of nodes: ${Q} vs ${L} expected`);return this._nodes.length=z,this}func(L,z=t.nil,Q,me){return this._blockNode(new I(L,z,Q)),me&&this.code(me).endFunc(),this}endFunc(){return this._endBlockNode(I)}optimize(L=1){for(;L-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(L){return this._currNode.nodes.push(L),this}_blockNode(L){this._currNode.nodes.push(L),this._nodes.push(L)}_endBlockNode(L,z){const Q=this._currNode;if(Q instanceof L||z&&Q instanceof z)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${z?`${L.kind}/${z.kind}`:L.kind}"`)}_elseNode(L){const z=this._currNode;if(!(z instanceof E))throw new Error('CodeGen: "else" without "if"');return this._currNode=z.else=L,this}get _root(){return this._nodes[0]}get _currNode(){const L=this._nodes;return L[L.length-1]}set _currNode(L){const z=this._nodes;z[z.length-1]=L}}e.CodeGen=V;function G(B,L){for(const z in L)B[z]=(B[z]||0)+(L[z]||0);return B}function U(B,L){return L instanceof t._CodeOrName?G(B,L.names):B}function J(B,L,z){if(B instanceof t.Name)return Q(B);if(!me(B))return B;return new t._Code(B._items.reduce((ve,Ce)=>(Ce instanceof t.Name&&(Ce=Q(Ce)),Ce instanceof t._Code?ve.push(...Ce._items):ve.push(Ce),ve),[]));function Q(ve){const Ce=z[ve.str];return Ce===void 0||L[ve.str]!==1?ve:(delete L[ve.str],Ce)}function me(ve){return ve instanceof t._Code&&ve._items.some(Ce=>Ce instanceof t.Name&&L[Ce.str]===1&&z[Ce.str]!==void 0)}}function le(B,L){for(const z in L)B[z]=(B[z]||0)-(L[z]||0)}function F(B){return typeof B=="boolean"||typeof B=="number"||B===null?!B:(0,t._)`!${q(B)}`}e.not=F;const Y=D(e.operators.AND);function ie(...B){return B.reduce(Y)}e.and=ie;const fe=D(e.operators.OR);function K(...B){return B.reduce(fe)}e.or=K;function D(B){return(L,z)=>L===t.nil?z:z===t.nil?L:(0,t._)`${q(L)} ${B} ${q(z)}`}function q(B){return B instanceof t.Name?B:(0,t._)`(${B})`}})(D0)),D0}var ht={},f2;function At(){if(f2)return ht;f2=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.checkStrictMode=ht.getErrorPath=ht.Type=ht.useFunc=ht.setEvaluated=ht.evaluatedPropsToName=ht.mergeEvaluated=ht.eachItem=ht.unescapeJsonPointer=ht.escapeJsonPointer=ht.escapeFragment=ht.unescapeFragment=ht.schemaRefOrVal=ht.schemaHasRulesButRef=ht.schemaHasRules=ht.checkUnknownRules=ht.alwaysValidSchema=ht.toHash=void 0;const e=gt(),t=dm();function n(C){const I={};for(const N of C)I[N]=!0;return I}ht.toHash=n;function r(C,I){return typeof I=="boolean"?I:Object.keys(I).length===0?!0:(a(C,I),!i(I,C.self.RULES.all))}ht.alwaysValidSchema=r;function a(C,I=C.schema){const{opts:N,self:P}=C;if(!N.strictSchema||typeof I=="boolean")return;const $=P.RULES.keywords;for(const W in I)$[W]||O(C,`unknown keyword: "${W}"`)}ht.checkUnknownRules=a;function i(C,I){if(typeof C=="boolean")return!C;for(const N in C)if(I[N])return!0;return!1}ht.schemaHasRules=i;function c(C,I){if(typeof C=="boolean")return!C;for(const N in C)if(N!=="$ref"&&I.all[N])return!0;return!1}ht.schemaHasRulesButRef=c;function u({topSchemaRef:C,schemaPath:I},N,P,$){if(!$){if(typeof N=="number"||typeof N=="boolean")return N;if(typeof N=="string")return(0,e._)`${N}`}return(0,e._)`${C}${I}${(0,e.getProperty)(P)}`}ht.schemaRefOrVal=u;function d(C){return p(decodeURIComponent(C))}ht.unescapeFragment=d;function f(C){return encodeURIComponent(m(C))}ht.escapeFragment=f;function m(C){return typeof C=="number"?`${C}`:C.replace(/~/g,"~0").replace(/\//g,"~1")}ht.escapeJsonPointer=m;function p(C){return C.replace(/~1/g,"/").replace(/~0/g,"~")}ht.unescapeJsonPointer=p;function g(C,I){if(Array.isArray(C))for(const N of C)I(N);else I(C)}ht.eachItem=g;function y({mergeNames:C,mergeToName:I,mergeValues:N,resultToName:P}){return($,W,V,G)=>{const U=V===void 0?W:V instanceof e.Name?(W instanceof e.Name?C($,W,V):I($,W,V),V):W instanceof e.Name?(I($,V,W),W):N(W,V);return G===e.Name&&!(U instanceof e.Name)?P($,U):U}}ht.mergeEvaluated={props:y({mergeNames:(C,I,N)=>C.if((0,e._)`${N} !== true && ${I} !== undefined`,()=>{C.if((0,e._)`${I} === true`,()=>C.assign(N,!0),()=>C.assign(N,(0,e._)`${N} || {}`).code((0,e._)`Object.assign(${N}, ${I})`))}),mergeToName:(C,I,N)=>C.if((0,e._)`${N} !== true`,()=>{I===!0?C.assign(N,!0):(C.assign(N,(0,e._)`${N} || {}`),S(C,N,I))}),mergeValues:(C,I)=>C===!0?!0:{...C,...I},resultToName:w}),items:y({mergeNames:(C,I,N)=>C.if((0,e._)`${N} !== true && ${I} !== undefined`,()=>C.assign(N,(0,e._)`${I} === true ? true : ${N} > ${I} ? ${N} : ${I}`)),mergeToName:(C,I,N)=>C.if((0,e._)`${N} !== true`,()=>C.assign(N,I===!0?!0:(0,e._)`${N} > ${I} ? ${N} : ${I}`)),mergeValues:(C,I)=>C===!0?!0:Math.max(C,I),resultToName:(C,I)=>C.var("items",I)})};function w(C,I){if(I===!0)return C.var("props",!0);const N=C.var("props",(0,e._)`{}`);return I!==void 0&&S(C,N,I),N}ht.evaluatedPropsToName=w;function S(C,I,N){Object.keys(N).forEach(P=>C.assign((0,e._)`${I}${(0,e.getProperty)(P)}`,!0))}ht.setEvaluated=S;const b={};function E(C,I){return C.scopeValue("func",{ref:I,code:b[I.code]||(b[I.code]=new t._Code(I.code))})}ht.useFunc=E;var R;(function(C){C[C.Num=0]="Num",C[C.Str=1]="Str"})(R||(ht.Type=R={}));function T(C,I,N){if(C instanceof e.Name){const P=I===R.Num;return N?P?(0,e._)`"[" + ${C} + "]"`:(0,e._)`"['" + ${C} + "']"`:P?(0,e._)`"/" + ${C}`:(0,e._)`"/" + ${C}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return N?(0,e.getProperty)(C).toString():"/"+m(C)}ht.getErrorPath=T;function O(C,I,N=C.opts.strictSchema){if(N){if(I=`strict mode: ${I}`,N===!0)throw new Error(I);C.self.logger.warn(I)}}return ht.checkStrictMode=O,ht}var Ah={},h2;function Js(){if(h2)return Ah;h2=1,Object.defineProperty(Ah,"__esModule",{value:!0});const e=gt(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Ah.default=t,Ah}var p2;function ag(){return p2||(p2=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=gt(),n=At(),r=Js();e.keywordError={message:({keyword:b})=>(0,t.str)`must pass "${b}" keyword validation`},e.keyword$DataError={message:({keyword:b,schemaType:E})=>E?(0,t.str)`"${b}" keyword must be ${E} ($data)`:(0,t.str)`"${b}" keyword is invalid ($data)`};function a(b,E=e.keywordError,R,T){const{it:O}=b,{gen:C,compositeRule:I,allErrors:N}=O,P=p(b,E,R);T??(I||N)?d(C,P):f(O,(0,t._)`[${P}]`)}e.reportError=a;function i(b,E=e.keywordError,R){const{it:T}=b,{gen:O,compositeRule:C,allErrors:I}=T,N=p(b,E,R);d(O,N),C||I||f(T,r.default.vErrors)}e.reportExtraError=i;function c(b,E){b.assign(r.default.errors,E),b.if((0,t._)`${r.default.vErrors} !== null`,()=>b.if(E,()=>b.assign((0,t._)`${r.default.vErrors}.length`,E),()=>b.assign(r.default.vErrors,null)))}e.resetErrorsCount=c;function u({gen:b,keyword:E,schemaValue:R,data:T,errsCount:O,it:C}){if(O===void 0)throw new Error("ajv implementation error");const I=b.name("err");b.forRange("i",O,r.default.errors,N=>{b.const(I,(0,t._)`${r.default.vErrors}[${N}]`),b.if((0,t._)`${I}.instancePath === undefined`,()=>b.assign((0,t._)`${I}.instancePath`,(0,t.strConcat)(r.default.instancePath,C.errorPath))),b.assign((0,t._)`${I}.schemaPath`,(0,t.str)`${C.errSchemaPath}/${E}`),C.opts.verbose&&(b.assign((0,t._)`${I}.schema`,R),b.assign((0,t._)`${I}.data`,T))})}e.extendErrors=u;function d(b,E){const R=b.const("err",E);b.if((0,t._)`${r.default.vErrors} === null`,()=>b.assign(r.default.vErrors,(0,t._)`[${R}]`),(0,t._)`${r.default.vErrors}.push(${R})`),b.code((0,t._)`${r.default.errors}++`)}function f(b,E){const{gen:R,validateName:T,schemaEnv:O}=b;O.$async?R.throw((0,t._)`new ${b.ValidationError}(${E})`):(R.assign((0,t._)`${T}.errors`,E),R.return(!1))}const m={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(b,E,R){const{createErrors:T}=b.it;return T===!1?(0,t._)`{}`:g(b,E,R)}function g(b,E,R={}){const{gen:T,it:O}=b,C=[y(O,R),w(b,R)];return S(b,E,C),T.object(...C)}function y({errorPath:b},{instancePath:E}){const R=E?(0,t.str)`${b}${(0,n.getErrorPath)(E,n.Type.Str)}`:b;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,R)]}function w({keyword:b,it:{errSchemaPath:E}},{schemaPath:R,parentSchema:T}){let O=T?E:(0,t.str)`${E}/${b}`;return R&&(O=(0,t.str)`${O}${(0,n.getErrorPath)(R,n.Type.Str)}`),[m.schemaPath,O]}function S(b,{params:E,message:R},T){const{keyword:O,data:C,schemaValue:I,it:N}=b,{opts:P,propertyName:$,topSchemaRef:W,schemaPath:V}=N;T.push([m.keyword,O],[m.params,typeof E=="function"?E(b):E||(0,t._)`{}`]),P.messages&&T.push([m.message,typeof R=="function"?R(b):R]),P.verbose&&T.push([m.schema,I],[m.parentSchema,(0,t._)`${W}${V}`],[r.default.data,C]),$&&T.push([m.propertyName,$])}})(P0)),P0}var m2;function jJ(){if(m2)return Si;m2=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.boolOrEmptySchema=Si.topBoolOrEmptySchema=void 0;const e=ag(),t=gt(),n=Js(),r={message:"boolean schema is false"};function a(u){const{gen:d,schema:f,validateName:m}=u;f===!1?c(u,!1):typeof f=="object"&&f.$async===!0?d.return(n.default.data):(d.assign((0,t._)`${m}.errors`,null),d.return(!0))}Si.topBoolOrEmptySchema=a;function i(u,d){const{gen:f,schema:m}=u;m===!1?(f.var(d,!1),c(u)):f.var(d,!0)}Si.boolOrEmptySchema=i;function c(u,d){const{gen:f,data:m}=u,p={gen:f,keyword:"false schema",data:m,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:u};(0,e.reportError)(p,r,void 0,d)}return Si}var nr={},Ei={},g2;function lP(){if(g2)return Ei;g2=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.getRules=Ei.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function n(a){return typeof a=="string"&&t.has(a)}Ei.isJSONType=n;function r(){const a={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...a,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},a.number,a.string,a.array,a.object],post:{rules:[]},all:{},keywords:{}}}return Ei.getRules=r,Ei}var Ua={},v2;function uP(){if(v2)return Ua;v2=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.shouldUseRule=Ua.shouldUseGroup=Ua.schemaHasRulesForType=void 0;function e({schema:r,self:a},i){const c=a.RULES.types[i];return c&&c!==!0&&t(r,c)}Ua.schemaHasRulesForType=e;function t(r,a){return a.rules.some(i=>n(r,i))}Ua.shouldUseGroup=t;function n(r,a){var i;return r[a.keyword]!==void 0||((i=a.definition.implements)===null||i===void 0?void 0:i.some(c=>r[c]!==void 0))}return Ua.shouldUseRule=n,Ua}var y2;function fm(){if(y2)return nr;y2=1,Object.defineProperty(nr,"__esModule",{value:!0}),nr.reportTypeError=nr.checkDataTypes=nr.checkDataType=nr.coerceAndCheckDataType=nr.getJSONTypes=nr.getSchemaTypes=nr.DataType=void 0;const e=lP(),t=uP(),n=ag(),r=gt(),a=At();var i;(function(R){R[R.Correct=0]="Correct",R[R.Wrong=1]="Wrong"})(i||(nr.DataType=i={}));function c(R){const T=u(R.type);if(T.includes("null")){if(R.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!T.length&&R.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');R.nullable===!0&&T.push("null")}return T}nr.getSchemaTypes=c;function u(R){const T=Array.isArray(R)?R:R?[R]:[];if(T.every(e.isJSONType))return T;throw new Error("type must be JSONType or JSONType[]: "+T.join(","))}nr.getJSONTypes=u;function d(R,T){const{gen:O,data:C,opts:I}=R,N=m(T,I.coerceTypes),P=T.length>0&&!(N.length===0&&T.length===1&&(0,t.schemaHasRulesForType)(R,T[0]));if(P){const $=w(T,C,I.strictNumbers,i.Wrong);O.if($,()=>{N.length?p(R,T,N):b(R)})}return P}nr.coerceAndCheckDataType=d;const f=new Set(["string","number","integer","boolean","null"]);function m(R,T){return T?R.filter(O=>f.has(O)||T==="array"&&O==="array"):[]}function p(R,T,O){const{gen:C,data:I,opts:N}=R,P=C.let("dataType",(0,r._)`typeof ${I}`),$=C.let("coerced",(0,r._)`undefined`);N.coerceTypes==="array"&&C.if((0,r._)`${P} == 'object' && Array.isArray(${I}) && ${I}.length == 1`,()=>C.assign(I,(0,r._)`${I}[0]`).assign(P,(0,r._)`typeof ${I}`).if(w(T,I,N.strictNumbers),()=>C.assign($,I))),C.if((0,r._)`${$} !== undefined`);for(const V of O)(f.has(V)||V==="array"&&N.coerceTypes==="array")&&W(V);C.else(),b(R),C.endIf(),C.if((0,r._)`${$} !== undefined`,()=>{C.assign(I,$),g(R,$)});function W(V){switch(V){case"string":C.elseIf((0,r._)`${P} == "number" || ${P} == "boolean"`).assign($,(0,r._)`"" + ${I}`).elseIf((0,r._)`${I} === null`).assign($,(0,r._)`""`);return;case"number":C.elseIf((0,r._)`${P} == "boolean" || ${I} === null
165
- || (${P} == "string" && ${I} && ${I} == +${I})`).assign($,(0,r._)`+${I}`);return;case"integer":C.elseIf((0,r._)`${P} === "boolean" || ${I} === null
166
- || (${P} === "string" && ${I} && ${I} == +${I} && !(${I} % 1))`).assign($,(0,r._)`+${I}`);return;case"boolean":C.elseIf((0,r._)`${I} === "false" || ${I} === 0 || ${I} === null`).assign($,!1).elseIf((0,r._)`${I} === "true" || ${I} === 1`).assign($,!0);return;case"null":C.elseIf((0,r._)`${I} === "" || ${I} === 0 || ${I} === false`),C.assign($,null);return;case"array":C.elseIf((0,r._)`${P} === "string" || ${P} === "number"
167
- || ${P} === "boolean" || ${I} === null`).assign($,(0,r._)`[${I}]`)}}}function g({gen:R,parentData:T,parentDataProperty:O},C){R.if((0,r._)`${T} !== undefined`,()=>R.assign((0,r._)`${T}[${O}]`,C))}function y(R,T,O,C=i.Correct){const I=C===i.Correct?r.operators.EQ:r.operators.NEQ;let N;switch(R){case"null":return(0,r._)`${T} ${I} null`;case"array":N=(0,r._)`Array.isArray(${T})`;break;case"object":N=(0,r._)`${T} && typeof ${T} == "object" && !Array.isArray(${T})`;break;case"integer":N=P((0,r._)`!(${T} % 1) && !isNaN(${T})`);break;case"number":N=P();break;default:return(0,r._)`typeof ${T} ${I} ${R}`}return C===i.Correct?N:(0,r.not)(N);function P($=r.nil){return(0,r.and)((0,r._)`typeof ${T} == "number"`,$,O?(0,r._)`isFinite(${T})`:r.nil)}}nr.checkDataType=y;function w(R,T,O,C){if(R.length===1)return y(R[0],T,O,C);let I;const N=(0,a.toHash)(R);if(N.array&&N.object){const P=(0,r._)`typeof ${T} != "object"`;I=N.null?P:(0,r._)`!${T} || ${P}`,delete N.null,delete N.array,delete N.object}else I=r.nil;N.number&&delete N.integer;for(const P in N)I=(0,r.and)(I,y(P,T,O,C));return I}nr.checkDataTypes=w;const S={message:({schema:R})=>`must be ${R}`,params:({schema:R,schemaValue:T})=>typeof R=="string"?(0,r._)`{type: ${R}}`:(0,r._)`{type: ${T}}`};function b(R){const T=E(R);(0,n.reportError)(T,S)}nr.reportTypeError=b;function E(R){const{gen:T,data:O,schema:C}=R,I=(0,a.schemaRefOrVal)(R,C,"type");return{gen:T,keyword:"type",data:O,schema:C.type,schemaCode:I,schemaValue:I,parentSchema:C,params:{},it:R}}return nr}var Au={},_2;function $J(){if(_2)return Au;_2=1,Object.defineProperty(Au,"__esModule",{value:!0}),Au.assignDefaults=void 0;const e=gt(),t=At();function n(a,i){const{properties:c,items:u}=a.schema;if(i==="object"&&c)for(const d in c)r(a,d,c[d].default);else i==="array"&&Array.isArray(u)&&u.forEach((d,f)=>r(a,f,d.default))}Au.assignDefaults=n;function r(a,i,c){const{gen:u,compositeRule:d,data:f,opts:m}=a;if(c===void 0)return;const p=(0,e._)`${f}${(0,e.getProperty)(i)}`;if(d){(0,t.checkStrictMode)(a,`default is ignored for: ${p}`);return}let g=(0,e._)`${p} === undefined`;m.useDefaults==="empty"&&(g=(0,e._)`${g} || ${p} === null || ${p} === ""`),u.if(g,(0,e._)`${p} = ${(0,e.stringify)(c)}`)}return Au}var Do={},Ft={},b2;function Ko(){if(b2)return Ft;b2=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.validateUnion=Ft.validateArray=Ft.usePattern=Ft.callValidateCode=Ft.schemaProperties=Ft.allSchemaProperties=Ft.noPropertyInData=Ft.propertyInData=Ft.isOwnProperty=Ft.hasPropFunc=Ft.reportMissingProp=Ft.checkMissingProp=Ft.checkReportMissingProp=void 0;const e=gt(),t=At(),n=Js(),r=At();function a(R,T){const{gen:O,data:C,it:I}=R;O.if(m(O,C,T,I.opts.ownProperties),()=>{R.setParams({missingProperty:(0,e._)`${T}`},!0),R.error()})}Ft.checkReportMissingProp=a;function i({gen:R,data:T,it:{opts:O}},C,I){return(0,e.or)(...C.map(N=>(0,e.and)(m(R,T,N,O.ownProperties),(0,e._)`${I} = ${N}`)))}Ft.checkMissingProp=i;function c(R,T){R.setParams({missingProperty:T},!0),R.error()}Ft.reportMissingProp=c;function u(R){return R.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Ft.hasPropFunc=u;function d(R,T,O){return(0,e._)`${u(R)}.call(${T}, ${O})`}Ft.isOwnProperty=d;function f(R,T,O,C){const I=(0,e._)`${T}${(0,e.getProperty)(O)} !== undefined`;return C?(0,e._)`${I} && ${d(R,T,O)}`:I}Ft.propertyInData=f;function m(R,T,O,C){const I=(0,e._)`${T}${(0,e.getProperty)(O)} === undefined`;return C?(0,e.or)(I,(0,e.not)(d(R,T,O))):I}Ft.noPropertyInData=m;function p(R){return R?Object.keys(R).filter(T=>T!=="__proto__"):[]}Ft.allSchemaProperties=p;function g(R,T){return p(T).filter(O=>!(0,t.alwaysValidSchema)(R,T[O]))}Ft.schemaProperties=g;function y({schemaCode:R,data:T,it:{gen:O,topSchemaRef:C,schemaPath:I,errorPath:N},it:P},$,W,V){const G=V?(0,e._)`${R}, ${T}, ${C}${I}`:T,U=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,N)],[n.default.parentData,P.parentData],[n.default.parentDataProperty,P.parentDataProperty],[n.default.rootData,n.default.rootData]];P.opts.dynamicRef&&U.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const J=(0,e._)`${G}, ${O.object(...U)}`;return W!==e.nil?(0,e._)`${$}.call(${W}, ${J})`:(0,e._)`${$}(${J})`}Ft.callValidateCode=y;const w=(0,e._)`new RegExp`;function S({gen:R,it:{opts:T}},O){const C=T.unicodeRegExp?"u":"",{regExp:I}=T.code,N=I(O,C);return R.scopeValue("pattern",{key:N.toString(),ref:N,code:(0,e._)`${I.code==="new RegExp"?w:(0,r.useFunc)(R,I)}(${O}, ${C})`})}Ft.usePattern=S;function b(R){const{gen:T,data:O,keyword:C,it:I}=R,N=T.name("valid");if(I.allErrors){const $=T.let("valid",!0);return P(()=>T.assign($,!1)),$}return T.var(N,!0),P(()=>T.break()),N;function P($){const W=T.const("len",(0,e._)`${O}.length`);T.forRange("i",0,W,V=>{R.subschema({keyword:C,dataProp:V,dataPropType:t.Type.Num},N),T.if((0,e.not)(N),$)})}}Ft.validateArray=b;function E(R){const{gen:T,schema:O,keyword:C,it:I}=R;if(!Array.isArray(O))throw new Error("ajv implementation error");if(O.some(W=>(0,t.alwaysValidSchema)(I,W))&&!I.opts.unevaluated)return;const P=T.let("valid",!1),$=T.name("_valid");T.block(()=>O.forEach((W,V)=>{const G=R.subschema({keyword:C,schemaProp:V,compositeRule:!0},$);T.assign(P,(0,e._)`${P} || ${$}`),R.mergeValidEvaluated(G,$)||T.if((0,e.not)(P))})),R.result(P,()=>R.reset(),()=>R.error(!0))}return Ft.validateUnion=E,Ft}var w2;function UJ(){if(w2)return Do;w2=1,Object.defineProperty(Do,"__esModule",{value:!0}),Do.validateKeywordUsage=Do.validSchemaType=Do.funcKeywordCode=Do.macroKeywordCode=void 0;const e=gt(),t=Js(),n=Ko(),r=ag();function a(g,y){const{gen:w,keyword:S,schema:b,parentSchema:E,it:R}=g,T=y.macro.call(R.self,b,E,R),O=f(w,S,T);R.opts.validateSchema!==!1&&R.self.validateSchema(T,!0);const C=w.name("valid");g.subschema({schema:T,schemaPath:e.nil,errSchemaPath:`${R.errSchemaPath}/${S}`,topSchemaRef:O,compositeRule:!0},C),g.pass(C,()=>g.error(!0))}Do.macroKeywordCode=a;function i(g,y){var w;const{gen:S,keyword:b,schema:E,parentSchema:R,$data:T,it:O}=g;d(O,y);const C=!T&&y.compile?y.compile.call(O.self,E,R,O):y.validate,I=f(S,b,C),N=S.let("valid");g.block$data(N,P),g.ok((w=y.valid)!==null&&w!==void 0?w:N);function P(){if(y.errors===!1)V(),y.modifying&&c(g),G(()=>g.error());else{const U=y.async?$():W();y.modifying&&c(g),G(()=>u(g,U))}}function $(){const U=S.let("ruleErrs",null);return S.try(()=>V((0,e._)`await `),J=>S.assign(N,!1).if((0,e._)`${J} instanceof ${O.ValidationError}`,()=>S.assign(U,(0,e._)`${J}.errors`),()=>S.throw(J))),U}function W(){const U=(0,e._)`${I}.errors`;return S.assign(U,null),V(e.nil),U}function V(U=y.async?(0,e._)`await `:e.nil){const J=O.opts.passContext?t.default.this:t.default.self,le=!("compile"in y&&!T||y.schema===!1);S.assign(N,(0,e._)`${U}${(0,n.callValidateCode)(g,I,J,le)}`,y.modifying)}function G(U){var J;S.if((0,e.not)((J=y.valid)!==null&&J!==void 0?J:N),U)}}Do.funcKeywordCode=i;function c(g){const{gen:y,data:w,it:S}=g;y.if(S.parentData,()=>y.assign(w,(0,e._)`${S.parentData}[${S.parentDataProperty}]`))}function u(g,y){const{gen:w}=g;w.if((0,e._)`Array.isArray(${y})`,()=>{w.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${y} : ${t.default.vErrors}.concat(${y})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,r.extendErrors)(g)},()=>g.error())}function d({schemaEnv:g},y){if(y.async&&!g.$async)throw new Error("async keyword in sync schema")}function f(g,y,w){if(w===void 0)throw new Error(`keyword "${y}" failed to compile`);return g.scopeValue("keyword",typeof w=="function"?{ref:w}:{ref:w,code:(0,e.stringify)(w)})}function m(g,y,w=!1){return!y.length||y.some(S=>S==="array"?Array.isArray(g):S==="object"?g&&typeof g=="object"&&!Array.isArray(g):typeof g==S||w&&typeof g>"u")}Do.validSchemaType=m;function p({schema:g,opts:y,self:w,errSchemaPath:S},b,E){if(Array.isArray(b.keyword)?!b.keyword.includes(E):b.keyword!==E)throw new Error("ajv implementation error");const R=b.dependencies;if(R?.some(T=>!Object.prototype.hasOwnProperty.call(g,T)))throw new Error(`parent schema must have dependencies of ${E}: ${R.join(",")}`);if(b.validateSchema&&!b.validateSchema(g[E])){const O=`keyword "${E}" value is invalid at path "${S}": `+w.errorsText(b.validateSchema.errors);if(y.validateSchema==="log")w.logger.error(O);else throw new Error(O)}}return Do.validateKeywordUsage=p,Do}var za={},S2;function zJ(){if(S2)return za;S2=1,Object.defineProperty(za,"__esModule",{value:!0}),za.extendSubschemaMode=za.extendSubschemaData=za.getSubschema=void 0;const e=gt(),t=At();function n(i,{keyword:c,schemaProp:u,schema:d,schemaPath:f,errSchemaPath:m,topSchemaRef:p}){if(c!==void 0&&d!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(c!==void 0){const g=i.schema[c];return u===void 0?{schema:g,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(c)}`,errSchemaPath:`${i.errSchemaPath}/${c}`}:{schema:g[u],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(c)}${(0,e.getProperty)(u)}`,errSchemaPath:`${i.errSchemaPath}/${c}/${(0,t.escapeFragment)(u)}`}}if(d!==void 0){if(f===void 0||m===void 0||p===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:d,schemaPath:f,topSchemaRef:p,errSchemaPath:m}}throw new Error('either "keyword" or "schema" must be passed')}za.getSubschema=n;function r(i,c,{dataProp:u,dataPropType:d,data:f,dataTypes:m,propertyName:p}){if(f!==void 0&&u!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:g}=c;if(u!==void 0){const{errorPath:w,dataPathArr:S,opts:b}=c,E=g.let("data",(0,e._)`${c.data}${(0,e.getProperty)(u)}`,!0);y(E),i.errorPath=(0,e.str)`${w}${(0,t.getErrorPath)(u,d,b.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${u}`,i.dataPathArr=[...S,i.parentDataProperty]}if(f!==void 0){const w=f instanceof e.Name?f:g.let("data",f,!0);y(w),p!==void 0&&(i.propertyName=p)}m&&(i.dataTypes=m);function y(w){i.data=w,i.dataLevel=c.dataLevel+1,i.dataTypes=[],c.definedProperties=new Set,i.parentData=c.data,i.dataNames=[...c.dataNames,w]}}za.extendSubschemaData=r;function a(i,{jtdDiscriminator:c,jtdMetadata:u,compositeRule:d,createErrors:f,allErrors:m}){d!==void 0&&(i.compositeRule=d),f!==void 0&&(i.createErrors=f),m!==void 0&&(i.allErrors=m),i.jtdDiscriminator=c,i.jtdMetadata=u}return za.extendSubschemaMode=a,za}var br={},$0,E2;function dP(){return E2||(E2=1,$0=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,a,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(a=r;a--!==0;)if(!e(t[a],n[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(a=r;a--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[a]))return!1;for(a=r;a--!==0;){var c=i[a];if(!e(t[c],n[c]))return!1}return!0}return t!==t&&n!==n}),$0}var U0={exports:{}},R2;function VJ(){if(R2)return U0.exports;R2=1;var e=U0.exports=function(r,a,i){typeof a=="function"&&(i=a,a={}),i=a.cb||i;var c=typeof i=="function"?i:i.pre||function(){},u=i.post||function(){};t(a,c,u,r,"",r)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(r,a,i,c,u,d,f,m,p,g){if(c&&typeof c=="object"&&!Array.isArray(c)){a(c,u,d,f,m,p,g);for(var y in c){var w=c[y];if(Array.isArray(w)){if(y in e.arrayKeywords)for(var S=0;S<w.length;S++)t(r,a,i,w[S],u+"/"+y+"/"+S,d,u,y,c,S)}else if(y in e.propsKeywords){if(w&&typeof w=="object")for(var b in w)t(r,a,i,w[b],u+"/"+y+"/"+n(b),d,u,y,c,b)}else(y in e.keywords||r.allKeys&&!(y in e.skipKeywords))&&t(r,a,i,w,u+"/"+y,d,u,y,c)}i(c,u,d,f,m,p,g)}}function n(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}return U0.exports}var x2;function sg(){if(x2)return br;x2=1,Object.defineProperty(br,"__esModule",{value:!0}),br.getSchemaRefs=br.resolveUrl=br.normalizeId=br._getFullPath=br.getFullPath=br.inlineRef=void 0;const e=At(),t=dP(),n=VJ(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function a(S,b=!0){return typeof S=="boolean"?!0:b===!0?!c(S):b?u(S)<=b:!1}br.inlineRef=a;const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(S){for(const b in S){if(i.has(b))return!0;const E=S[b];if(Array.isArray(E)&&E.some(c)||typeof E=="object"&&c(E))return!0}return!1}function u(S){let b=0;for(const E in S){if(E==="$ref")return 1/0;if(b++,!r.has(E)&&(typeof S[E]=="object"&&(0,e.eachItem)(S[E],R=>b+=u(R)),b===1/0))return 1/0}return b}function d(S,b="",E){E!==!1&&(b=p(b));const R=S.parse(b);return f(S,R)}br.getFullPath=d;function f(S,b){return S.serialize(b).split("#")[0]+"#"}br._getFullPath=f;const m=/#\/?$/;function p(S){return S?S.replace(m,""):""}br.normalizeId=p;function g(S,b,E){return E=p(E),S.resolve(b,E)}br.resolveUrl=g;const y=/^[a-z_][-a-z0-9._]*$/i;function w(S,b){if(typeof S=="boolean")return{};const{schemaId:E,uriResolver:R}=this.opts,T=p(S[E]||b),O={"":T},C=d(R,T,!1),I={},N=new Set;return n(S,{allKeys:!0},(W,V,G,U)=>{if(U===void 0)return;const J=C+V;let le=O[U];typeof W[E]=="string"&&(le=F.call(this,W[E])),Y.call(this,W.$anchor),Y.call(this,W.$dynamicAnchor),O[V]=le;function F(ie){const fe=this.opts.uriResolver.resolve;if(ie=p(le?fe(le,ie):ie),N.has(ie))throw $(ie);N.add(ie);let K=this.refs[ie];return typeof K=="string"&&(K=this.refs[K]),typeof K=="object"?P(W,K.schema,ie):ie!==p(J)&&(ie[0]==="#"?(P(W,I[ie],ie),I[ie]=W):this.refs[ie]=J),ie}function Y(ie){if(typeof ie=="string"){if(!y.test(ie))throw new Error(`invalid anchor "${ie}"`);F.call(this,`#${ie}`)}}}),I;function P(W,V,G){if(V!==void 0&&!t(W,V))throw $(G)}function $(W){return new Error(`reference "${W}" resolves to more than one schema`)}}return br.getSchemaRefs=w,br}var T2;function ig(){if(T2)return $a;T2=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.getData=$a.KeywordCxt=$a.validateFunctionCode=void 0;const e=jJ(),t=fm(),n=uP(),r=fm(),a=$J(),i=UJ(),c=zJ(),u=gt(),d=Js(),f=sg(),m=At(),p=ag();function g(H){if(C(H)&&(N(H),O(H))){b(H);return}y(H,()=>(0,e.topBoolOrEmptySchema)(H))}$a.validateFunctionCode=g;function y({gen:H,validateName:re,schema:be,schemaEnv:se,opts:ue},Oe){ue.code.es5?H.func(re,(0,u._)`${d.default.data}, ${d.default.valCxt}`,se.$async,()=>{H.code((0,u._)`"use strict"; ${R(be,ue)}`),S(H,ue),H.code(Oe)}):H.func(re,(0,u._)`${d.default.data}, ${w(ue)}`,se.$async,()=>H.code(R(be,ue)).code(Oe))}function w(H){return(0,u._)`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${H.dynamicRef?(0,u._)`, ${d.default.dynamicAnchors}={}`:u.nil}}={}`}function S(H,re){H.if(d.default.valCxt,()=>{H.var(d.default.instancePath,(0,u._)`${d.default.valCxt}.${d.default.instancePath}`),H.var(d.default.parentData,(0,u._)`${d.default.valCxt}.${d.default.parentData}`),H.var(d.default.parentDataProperty,(0,u._)`${d.default.valCxt}.${d.default.parentDataProperty}`),H.var(d.default.rootData,(0,u._)`${d.default.valCxt}.${d.default.rootData}`),re.dynamicRef&&H.var(d.default.dynamicAnchors,(0,u._)`${d.default.valCxt}.${d.default.dynamicAnchors}`)},()=>{H.var(d.default.instancePath,(0,u._)`""`),H.var(d.default.parentData,(0,u._)`undefined`),H.var(d.default.parentDataProperty,(0,u._)`undefined`),H.var(d.default.rootData,d.default.data),re.dynamicRef&&H.var(d.default.dynamicAnchors,(0,u._)`{}`)})}function b(H){const{schema:re,opts:be,gen:se}=H;y(H,()=>{be.$comment&&re.$comment&&U(H),W(H),se.let(d.default.vErrors,null),se.let(d.default.errors,0),be.unevaluated&&E(H),P(H),J(H)})}function E(H){const{gen:re,validateName:be}=H;H.evaluated=re.const("evaluated",(0,u._)`${be}.evaluated`),re.if((0,u._)`${H.evaluated}.dynamicProps`,()=>re.assign((0,u._)`${H.evaluated}.props`,(0,u._)`undefined`)),re.if((0,u._)`${H.evaluated}.dynamicItems`,()=>re.assign((0,u._)`${H.evaluated}.items`,(0,u._)`undefined`))}function R(H,re){const be=typeof H=="object"&&H[re.schemaId];return be&&(re.code.source||re.code.process)?(0,u._)`/*# sourceURL=${be} */`:u.nil}function T(H,re){if(C(H)&&(N(H),O(H))){I(H,re);return}(0,e.boolOrEmptySchema)(H,re)}function O({schema:H,self:re}){if(typeof H=="boolean")return!H;for(const be in H)if(re.RULES.all[be])return!0;return!1}function C(H){return typeof H.schema!="boolean"}function I(H,re){const{schema:be,gen:se,opts:ue}=H;ue.$comment&&be.$comment&&U(H),V(H),G(H);const Oe=se.const("_errs",d.default.errors);P(H,Oe),se.var(re,(0,u._)`${Oe} === ${d.default.errors}`)}function N(H){(0,m.checkUnknownRules)(H),$(H)}function P(H,re){if(H.opts.jtd)return F(H,[],!1,re);const be=(0,t.getSchemaTypes)(H.schema),se=(0,t.coerceAndCheckDataType)(H,be);F(H,be,!se,re)}function $(H){const{schema:re,errSchemaPath:be,opts:se,self:ue}=H;re.$ref&&se.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(re,ue.RULES)&&ue.logger.warn(`$ref: keywords ignored in schema at path "${be}"`)}function W(H){const{schema:re,opts:be}=H;re.default!==void 0&&be.useDefaults&&be.strictSchema&&(0,m.checkStrictMode)(H,"default is ignored in the schema root")}function V(H){const re=H.schema[H.opts.schemaId];re&&(H.baseId=(0,f.resolveUrl)(H.opts.uriResolver,H.baseId,re))}function G(H){if(H.schema.$async&&!H.schemaEnv.$async)throw new Error("async schema in sync schema")}function U({gen:H,schemaEnv:re,schema:be,errSchemaPath:se,opts:ue}){const Oe=be.$comment;if(ue.$comment===!0)H.code((0,u._)`${d.default.self}.logger.log(${Oe})`);else if(typeof ue.$comment=="function"){const Le=(0,u.str)`${se}/$comment`,Xe=H.scopeValue("root",{ref:re.root});H.code((0,u._)`${d.default.self}.opts.$comment(${Oe}, ${Le}, ${Xe}.schema)`)}}function J(H){const{gen:re,schemaEnv:be,validateName:se,ValidationError:ue,opts:Oe}=H;be.$async?re.if((0,u._)`${d.default.errors} === 0`,()=>re.return(d.default.data),()=>re.throw((0,u._)`new ${ue}(${d.default.vErrors})`)):(re.assign((0,u._)`${se}.errors`,d.default.vErrors),Oe.unevaluated&&le(H),re.return((0,u._)`${d.default.errors} === 0`))}function le({gen:H,evaluated:re,props:be,items:se}){be instanceof u.Name&&H.assign((0,u._)`${re}.props`,be),se instanceof u.Name&&H.assign((0,u._)`${re}.items`,se)}function F(H,re,be,se){const{gen:ue,schema:Oe,data:Le,allErrors:Xe,opts:Be,self:Ke}=H,{RULES:Z}=Ke;if(Oe.$ref&&(Be.ignoreKeywordsWithRef||!(0,m.schemaHasRulesButRef)(Oe,Z))){ue.block(()=>me(H,"$ref",Z.all.$ref.definition));return}Be.jtd||ie(H,re),ue.block(()=>{for(const oe of Z.rules)te(oe);te(Z.post)});function te(oe){(0,n.shouldUseGroup)(Oe,oe)&&(oe.type?(ue.if((0,r.checkDataType)(oe.type,Le,Be.strictNumbers)),Y(H,oe),re.length===1&&re[0]===oe.type&&be&&(ue.else(),(0,r.reportTypeError)(H)),ue.endIf()):Y(H,oe),Xe||ue.if((0,u._)`${d.default.errors} === ${se||0}`))}}function Y(H,re){const{gen:be,schema:se,opts:{useDefaults:ue}}=H;ue&&(0,a.assignDefaults)(H,re.type),be.block(()=>{for(const Oe of re.rules)(0,n.shouldUseRule)(se,Oe)&&me(H,Oe.keyword,Oe.definition,re.type)})}function ie(H,re){H.schemaEnv.meta||!H.opts.strictTypes||(fe(H,re),H.opts.allowUnionTypes||K(H,re),D(H,H.dataTypes))}function fe(H,re){if(re.length){if(!H.dataTypes.length){H.dataTypes=re;return}re.forEach(be=>{B(H.dataTypes,be)||z(H,`type "${be}" not allowed by context "${H.dataTypes.join(",")}"`)}),L(H,re)}}function K(H,re){re.length>1&&!(re.length===2&&re.includes("null"))&&z(H,"use allowUnionTypes to allow union type keyword")}function D(H,re){const be=H.self.RULES.all;for(const se in be){const ue=be[se];if(typeof ue=="object"&&(0,n.shouldUseRule)(H.schema,ue)){const{type:Oe}=ue.definition;Oe.length&&!Oe.some(Le=>q(re,Le))&&z(H,`missing type "${Oe.join(",")}" for keyword "${se}"`)}}}function q(H,re){return H.includes(re)||re==="number"&&H.includes("integer")}function B(H,re){return H.includes(re)||re==="integer"&&H.includes("number")}function L(H,re){const be=[];for(const se of H.dataTypes)B(re,se)?be.push(se):re.includes("integer")&&se==="number"&&be.push("integer");H.dataTypes=be}function z(H,re){const be=H.schemaEnv.baseId+H.errSchemaPath;re+=` at "${be}" (strictTypes)`,(0,m.checkStrictMode)(H,re,H.opts.strictTypes)}class Q{constructor(re,be,se){if((0,i.validateKeywordUsage)(re,be,se),this.gen=re.gen,this.allErrors=re.allErrors,this.keyword=se,this.data=re.data,this.schema=re.schema[se],this.$data=be.$data&&re.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,m.schemaRefOrVal)(re,this.schema,se,this.$data),this.schemaType=be.schemaType,this.parentSchema=re.schema,this.params={},this.it=re,this.def=be,this.$data)this.schemaCode=re.gen.const("vSchema",Ie(this.$data,re));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,be.schemaType,be.allowUndefined))throw new Error(`${se} value must be ${JSON.stringify(be.schemaType)}`);("code"in be?be.trackErrors:be.errors!==!1)&&(this.errsCount=re.gen.const("_errs",d.default.errors))}result(re,be,se){this.failResult((0,u.not)(re),be,se)}failResult(re,be,se){this.gen.if(re),se?se():this.error(),be?(this.gen.else(),be(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(re,be){this.failResult((0,u.not)(re),void 0,be)}fail(re){if(re===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(re),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(re){if(!this.$data)return this.fail(re);const{schemaCode:be}=this;this.fail((0,u._)`${be} !== undefined && (${(0,u.or)(this.invalid$data(),re)})`)}error(re,be,se){if(be){this.setParams(be),this._error(re,se),this.setParams({});return}this._error(re,se)}_error(re,be){(re?p.reportExtraError:p.reportError)(this,this.def.error,be)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(re){this.allErrors||this.gen.if(re)}setParams(re,be){be?Object.assign(this.params,re):this.params=re}block$data(re,be,se=u.nil){this.gen.block(()=>{this.check$data(re,se),be()})}check$data(re=u.nil,be=u.nil){if(!this.$data)return;const{gen:se,schemaCode:ue,schemaType:Oe,def:Le}=this;se.if((0,u.or)((0,u._)`${ue} === undefined`,be)),re!==u.nil&&se.assign(re,!0),(Oe.length||Le.validateSchema)&&(se.elseIf(this.invalid$data()),this.$dataError(),re!==u.nil&&se.assign(re,!1)),se.else()}invalid$data(){const{gen:re,schemaCode:be,schemaType:se,def:ue,it:Oe}=this;return(0,u.or)(Le(),Xe());function Le(){if(se.length){if(!(be instanceof u.Name))throw new Error("ajv implementation error");const Be=Array.isArray(se)?se:[se];return(0,u._)`${(0,r.checkDataTypes)(Be,be,Oe.opts.strictNumbers,r.DataType.Wrong)}`}return u.nil}function Xe(){if(ue.validateSchema){const Be=re.scopeValue("validate$data",{ref:ue.validateSchema});return(0,u._)`!${Be}(${be})`}return u.nil}}subschema(re,be){const se=(0,c.getSubschema)(this.it,re);(0,c.extendSubschemaData)(se,this.it,re),(0,c.extendSubschemaMode)(se,re);const ue={...this.it,...se,items:void 0,props:void 0};return T(ue,be),ue}mergeEvaluated(re,be){const{it:se,gen:ue}=this;se.opts.unevaluated&&(se.props!==!0&&re.props!==void 0&&(se.props=m.mergeEvaluated.props(ue,re.props,se.props,be)),se.items!==!0&&re.items!==void 0&&(se.items=m.mergeEvaluated.items(ue,re.items,se.items,be)))}mergeValidEvaluated(re,be){const{it:se,gen:ue}=this;if(se.opts.unevaluated&&(se.props!==!0||se.items!==!0))return ue.if(be,()=>this.mergeEvaluated(re,u.Name)),!0}}$a.KeywordCxt=Q;function me(H,re,be,se){const ue=new Q(H,be,re);"code"in be?be.code(ue,se):ue.$data&&be.validate?(0,i.funcKeywordCode)(ue,be):"macro"in be?(0,i.macroKeywordCode)(ue,be):(be.compile||be.validate)&&(0,i.funcKeywordCode)(ue,be)}const ve=/^\/(?:[^~]|~0|~1)*$/,Ce=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ie(H,{dataLevel:re,dataNames:be,dataPathArr:se}){let ue,Oe;if(H==="")return d.default.rootData;if(H[0]==="/"){if(!ve.test(H))throw new Error(`Invalid JSON-pointer: ${H}`);ue=H,Oe=d.default.rootData}else{const Ke=Ce.exec(H);if(!Ke)throw new Error(`Invalid JSON-pointer: ${H}`);const Z=+Ke[1];if(ue=Ke[2],ue==="#"){if(Z>=re)throw new Error(Be("property/index",Z));return se[re-Z]}if(Z>re)throw new Error(Be("data",Z));if(Oe=be[re-Z],!ue)return Oe}let Le=Oe;const Xe=ue.split("/");for(const Ke of Xe)Ke&&(Oe=(0,u._)`${Oe}${(0,u.getProperty)((0,m.unescapeJsonPointer)(Ke))}`,Le=(0,u._)`${Le} && ${Oe}`);return Le;function Be(Ke,Z){return`Cannot access ${Ke} ${Z} levels up, current level is ${re}`}}return $a.getData=Ie,$a}var Ih={},O2;function X1(){if(O2)return Ih;O2=1,Object.defineProperty(Ih,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}return Ih.default=e,Ih}var Nh={},C2;function cg(){if(C2)return Nh;C2=1,Object.defineProperty(Nh,"__esModule",{value:!0});const e=sg();class t extends Error{constructor(r,a,i,c){super(c||`can't resolve reference ${i} from id ${a}`),this.missingRef=(0,e.resolveUrl)(r,a,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(r,this.missingRef))}}return Nh.default=t,Nh}var Wr={},A2;function J1(){if(A2)return Wr;A2=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.resolveSchema=Wr.getCompilingSchema=Wr.resolveRef=Wr.compileSchema=Wr.SchemaEnv=void 0;const e=gt(),t=X1(),n=Js(),r=sg(),a=At(),i=ig();class c{constructor(E){var R;this.refs={},this.dynamicAnchors={};let T;typeof E.schema=="object"&&(T=E.schema),this.schema=E.schema,this.schemaId=E.schemaId,this.root=E.root||this,this.baseId=(R=E.baseId)!==null&&R!==void 0?R:(0,r.normalizeId)(T?.[E.schemaId||"$id"]),this.schemaPath=E.schemaPath,this.localRefs=E.localRefs,this.meta=E.meta,this.$async=T?.$async,this.refs={}}}Wr.SchemaEnv=c;function u(b){const E=m.call(this,b);if(E)return E;const R=(0,r.getFullPath)(this.opts.uriResolver,b.root.baseId),{es5:T,lines:O}=this.opts.code,{ownProperties:C}=this.opts,I=new e.CodeGen(this.scope,{es5:T,lines:O,ownProperties:C});let N;b.$async&&(N=I.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const P=I.scopeName("validate");b.validateName=P;const $={gen:I,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:I.scopeValue("schema",this.opts.code.source===!0?{ref:b.schema,code:(0,e.stringify)(b.schema)}:{ref:b.schema}),validateName:P,ValidationError:N,schema:b.schema,schemaEnv:b,rootId:R,baseId:b.baseId||R,schemaPath:e.nil,errSchemaPath:b.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let W;try{this._compilations.add(b),(0,i.validateFunctionCode)($),I.optimize(this.opts.code.optimize);const V=I.toString();W=`${I.scopeRefs(n.default.scope)}return ${V}`,this.opts.code.process&&(W=this.opts.code.process(W,b));const U=new Function(`${n.default.self}`,`${n.default.scope}`,W)(this,this.scope.get());if(this.scope.value(P,{ref:U}),U.errors=null,U.schema=b.schema,U.schemaEnv=b,b.$async&&(U.$async=!0),this.opts.code.source===!0&&(U.source={validateName:P,validateCode:V,scopeValues:I._values}),this.opts.unevaluated){const{props:J,items:le}=$;U.evaluated={props:J instanceof e.Name?void 0:J,items:le instanceof e.Name?void 0:le,dynamicProps:J instanceof e.Name,dynamicItems:le instanceof e.Name},U.source&&(U.source.evaluated=(0,e.stringify)(U.evaluated))}return b.validate=U,b}catch(V){throw delete b.validate,delete b.validateName,W&&this.logger.error("Error compiling schema, function code:",W),V}finally{this._compilations.delete(b)}}Wr.compileSchema=u;function d(b,E,R){var T;R=(0,r.resolveUrl)(this.opts.uriResolver,E,R);const O=b.refs[R];if(O)return O;let C=g.call(this,b,R);if(C===void 0){const I=(T=b.localRefs)===null||T===void 0?void 0:T[R],{schemaId:N}=this.opts;I&&(C=new c({schema:I,schemaId:N,root:b,baseId:E}))}if(C!==void 0)return b.refs[R]=f.call(this,C)}Wr.resolveRef=d;function f(b){return(0,r.inlineRef)(b.schema,this.opts.inlineRefs)?b.schema:b.validate?b:u.call(this,b)}function m(b){for(const E of this._compilations)if(p(E,b))return E}Wr.getCompilingSchema=m;function p(b,E){return b.schema===E.schema&&b.root===E.root&&b.baseId===E.baseId}function g(b,E){let R;for(;typeof(R=this.refs[E])=="string";)E=R;return R||this.schemas[E]||y.call(this,b,E)}function y(b,E){const R=this.opts.uriResolver.parse(E),T=(0,r._getFullPath)(this.opts.uriResolver,R);let O=(0,r.getFullPath)(this.opts.uriResolver,b.baseId,void 0);if(Object.keys(b.schema).length>0&&T===O)return S.call(this,R,b);const C=(0,r.normalizeId)(T),I=this.refs[C]||this.schemas[C];if(typeof I=="string"){const N=y.call(this,b,I);return typeof N?.schema!="object"?void 0:S.call(this,R,N)}if(typeof I?.schema=="object"){if(I.validate||u.call(this,I),C===(0,r.normalizeId)(E)){const{schema:N}=I,{schemaId:P}=this.opts,$=N[P];return $&&(O=(0,r.resolveUrl)(this.opts.uriResolver,O,$)),new c({schema:N,schemaId:P,root:b,baseId:O})}return S.call(this,R,I)}}Wr.resolveSchema=y;const w=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function S(b,{baseId:E,schema:R,root:T}){var O;if(((O=b.fragment)===null||O===void 0?void 0:O[0])!=="/")return;for(const N of b.fragment.slice(1).split("/")){if(typeof R=="boolean")return;const P=R[(0,a.unescapeFragment)(N)];if(P===void 0)return;R=P;const $=typeof R=="object"&&R[this.opts.schemaId];!w.has(N)&&$&&(E=(0,r.resolveUrl)(this.opts.uriResolver,E,$))}let C;if(typeof R!="boolean"&&R.$ref&&!(0,a.schemaHasRulesButRef)(R,this.RULES)){const N=(0,r.resolveUrl)(this.opts.uriResolver,E,R.$ref);C=y.call(this,T,N)}const{schemaId:I}=this.opts;if(C=C||new c({schema:R,schemaId:I,root:T,baseId:E}),C.schema!==C.root.schema)return C}return Wr}const FJ="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",BJ="Meta-schema for $data reference (JSON AnySchema extension proposal)",qJ="object",HJ=["$data"],GJ={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},ZJ=!1,WJ={$id:FJ,description:BJ,type:qJ,required:HJ,properties:GJ,additionalProperties:ZJ};var kh={},Iu={exports:{}},z0,I2;function fP(){if(I2)return z0;I2=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function n(g){let y="",w=0,S=0;for(S=0;S<g.length;S++)if(w=g[S].charCodeAt(0),w!==48){if(!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";y+=g[S];break}for(S+=1;S<g.length;S++){if(w=g[S].charCodeAt(0),!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";y+=g[S]}return y}const r=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(g){return g.length=0,!0}function i(g,y,w){if(g.length){const S=n(g);if(S!=="")y.push(S);else return w.error=!0,!1;g.length=0}return!0}function c(g){let y=0;const w={error:!1,address:"",zone:""},S=[],b=[];let E=!1,R=!1,T=i;for(let O=0;O<g.length;O++){const C=g[O];if(!(C==="["||C==="]"))if(C===":"){if(E===!0&&(R=!0),!T(b,S,w))break;if(++y>7){w.error=!0;break}O>0&&g[O-1]===":"&&(E=!0),S.push(":");continue}else if(C==="%"){if(!T(b,S,w))break;T=a}else{b.push(C);continue}}return b.length&&(T===a?w.zone=b.join(""):R?S.push(b.join("")):S.push(n(b))),w.address=S.join(""),w}function u(g){if(d(g,":")<2)return{host:g,isIPV6:!1};const y=c(g);if(y.error)return{host:g,isIPV6:!1};{let w=y.address,S=y.address;return y.zone&&(w+="%"+y.zone,S+="%25"+y.zone),{host:w,isIPV6:!0,escapedHost:S}}}function d(g,y){let w=0;for(let S=0;S<g.length;S++)g[S]===y&&w++;return w}function f(g){let y=g;const w=[];let S=-1,b=0;for(;b=y.length;){if(b===1){if(y===".")break;if(y==="/"){w.push("/");break}else{w.push(y);break}}else if(b===2){if(y[0]==="."){if(y[1]===".")break;if(y[1]==="/"){y=y.slice(2);continue}}else if(y[0]==="/"&&(y[1]==="."||y[1]==="/")){w.push("/");break}}else if(b===3&&y==="/.."){w.length!==0&&w.pop(),w.push("/");break}if(y[0]==="."){if(y[1]==="."){if(y[2]==="/"){y=y.slice(3);continue}}else if(y[1]==="/"){y=y.slice(2);continue}}else if(y[0]==="/"&&y[1]==="."){if(y[2]==="/"){y=y.slice(2);continue}else if(y[2]==="."&&y[3]==="/"){y=y.slice(3),w.length!==0&&w.pop();continue}}if((S=y.indexOf("/",1))===-1){w.push(y);break}else w.push(y.slice(0,S)),y=y.slice(S)}return w.join("")}function m(g,y){const w=y!==!0?escape:unescape;return g.scheme!==void 0&&(g.scheme=w(g.scheme)),g.userinfo!==void 0&&(g.userinfo=w(g.userinfo)),g.host!==void 0&&(g.host=w(g.host)),g.path!==void 0&&(g.path=w(g.path)),g.query!==void 0&&(g.query=w(g.query)),g.fragment!==void 0&&(g.fragment=w(g.fragment)),g}function p(g){const y=[];if(g.userinfo!==void 0&&(y.push(g.userinfo),y.push("@")),g.host!==void 0){let w=unescape(g.host);if(!t(w)){const S=u(w);S.isIPV6===!0?w=`[${S.escapedHost}]`:w=g.host}y.push(w)}return(typeof g.port=="number"||typeof g.port=="string")&&(y.push(":"),y.push(String(g.port))),y.length?y.join(""):void 0}return z0={nonSimpleDomain:r,recomposeAuthority:p,normalizeComponentEncoding:m,removeDotSegments:f,isIPv4:t,isUUID:e,normalizeIPv6:u,stringArrayToHexStripped:n},z0}var V0,N2;function KJ(){if(N2)return V0;N2=1;const{isUUID:e}=fP(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(C){return n.indexOf(C)!==-1}function a(C){return C.secure===!0?!0:C.secure===!1?!1:C.scheme?C.scheme.length===3&&(C.scheme[0]==="w"||C.scheme[0]==="W")&&(C.scheme[1]==="s"||C.scheme[1]==="S")&&(C.scheme[2]==="s"||C.scheme[2]==="S"):!1}function i(C){return C.host||(C.error=C.error||"HTTP URIs must have a host."),C}function c(C){const I=String(C.scheme).toLowerCase()==="https";return(C.port===(I?443:80)||C.port==="")&&(C.port=void 0),C.path||(C.path="/"),C}function u(C){return C.secure=a(C),C.resourceName=(C.path||"/")+(C.query?"?"+C.query:""),C.path=void 0,C.query=void 0,C}function d(C){if((C.port===(a(C)?443:80)||C.port==="")&&(C.port=void 0),typeof C.secure=="boolean"&&(C.scheme=C.secure?"wss":"ws",C.secure=void 0),C.resourceName){const[I,N]=C.resourceName.split("?");C.path=I&&I!=="/"?I:void 0,C.query=N,C.resourceName=void 0}return C.fragment=void 0,C}function f(C,I){if(!C.path)return C.error="URN can not be parsed",C;const N=C.path.match(t);if(N){const P=I.scheme||C.scheme||"urn";C.nid=N[1].toLowerCase(),C.nss=N[2];const $=`${P}:${I.nid||C.nid}`,W=O($);C.path=void 0,W&&(C=W.parse(C,I))}else C.error=C.error||"URN can not be parsed.";return C}function m(C,I){if(C.nid===void 0)throw new Error("URN without nid cannot be serialized");const N=I.scheme||C.scheme||"urn",P=C.nid.toLowerCase(),$=`${N}:${I.nid||P}`,W=O($);W&&(C=W.serialize(C,I));const V=C,G=C.nss;return V.path=`${P||I.nid}:${G}`,I.skipEscape=!0,V}function p(C,I){const N=C;return N.uuid=N.nss,N.nss=void 0,!I.tolerant&&(!N.uuid||!e(N.uuid))&&(N.error=N.error||"UUID is not valid."),N}function g(C){const I=C;return I.nss=(C.uuid||"").toLowerCase(),I}const y={scheme:"http",domainHost:!0,parse:i,serialize:c},w={scheme:"https",domainHost:y.domainHost,parse:i,serialize:c},S={scheme:"ws",domainHost:!0,parse:u,serialize:d},b={scheme:"wss",domainHost:S.domainHost,parse:S.parse,serialize:S.serialize},T={http:y,https:w,ws:S,wss:b,urn:{scheme:"urn",parse:f,serialize:m,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:p,serialize:g,skipNormalize:!0}};Object.setPrototypeOf(T,null);function O(C){return C&&(T[C]||T[C.toLowerCase()])||void 0}return V0={wsIsSecure:a,SCHEMES:T,isValidSchemeName:r,getSchemeHandler:O},V0}var k2;function YJ(){if(k2)return Iu.exports;k2=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:n,normalizeComponentEncoding:r,isIPv4:a,nonSimpleDomain:i}=fP(),{SCHEMES:c,getSchemeHandler:u}=KJ();function d(b,E){return typeof b=="string"?b=g(w(b,E),E):typeof b=="object"&&(b=w(g(b,E),E)),b}function f(b,E,R){const T=R?Object.assign({scheme:"null"},R):{scheme:"null"},O=m(w(b,T),w(E,T),T,!0);return T.skipEscape=!0,g(O,T)}function m(b,E,R,T){const O={};return T||(b=w(g(b,R),R),E=w(g(E,R),R)),R=R||{},!R.tolerant&&E.scheme?(O.scheme=E.scheme,O.userinfo=E.userinfo,O.host=E.host,O.port=E.port,O.path=t(E.path||""),O.query=E.query):(E.userinfo!==void 0||E.host!==void 0||E.port!==void 0?(O.userinfo=E.userinfo,O.host=E.host,O.port=E.port,O.path=t(E.path||""),O.query=E.query):(E.path?(E.path[0]==="/"?O.path=t(E.path):((b.userinfo!==void 0||b.host!==void 0||b.port!==void 0)&&!b.path?O.path="/"+E.path:b.path?O.path=b.path.slice(0,b.path.lastIndexOf("/")+1)+E.path:O.path=E.path,O.path=t(O.path)),O.query=E.query):(O.path=b.path,E.query!==void 0?O.query=E.query:O.query=b.query),O.userinfo=b.userinfo,O.host=b.host,O.port=b.port),O.scheme=b.scheme),O.fragment=E.fragment,O}function p(b,E,R){return typeof b=="string"?(b=unescape(b),b=g(r(w(b,R),!0),{...R,skipEscape:!0})):typeof b=="object"&&(b=g(r(b,!0),{...R,skipEscape:!0})),typeof E=="string"?(E=unescape(E),E=g(r(w(E,R),!0),{...R,skipEscape:!0})):typeof E=="object"&&(E=g(r(E,!0),{...R,skipEscape:!0})),b.toLowerCase()===E.toLowerCase()}function g(b,E){const R={host:b.host,scheme:b.scheme,userinfo:b.userinfo,port:b.port,path:b.path,query:b.query,nid:b.nid,nss:b.nss,uuid:b.uuid,fragment:b.fragment,reference:b.reference,resourceName:b.resourceName,secure:b.secure,error:""},T=Object.assign({},E),O=[],C=u(T.scheme||R.scheme);C&&C.serialize&&C.serialize(R,T),R.path!==void 0&&(T.skipEscape?R.path=unescape(R.path):(R.path=escape(R.path),R.scheme!==void 0&&(R.path=R.path.split("%3A").join(":")))),T.reference!=="suffix"&&R.scheme&&O.push(R.scheme,":");const I=n(R);if(I!==void 0&&(T.reference!=="suffix"&&O.push("//"),O.push(I),R.path&&R.path[0]!=="/"&&O.push("/")),R.path!==void 0){let N=R.path;!T.absolutePath&&(!C||!C.absolutePath)&&(N=t(N)),I===void 0&&N[0]==="/"&&N[1]==="/"&&(N="/%2F"+N.slice(2)),O.push(N)}return R.query!==void 0&&O.push("?",R.query),R.fragment!==void 0&&O.push("#",R.fragment),O.join("")}const y=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function w(b,E){const R=Object.assign({},E),T={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let O=!1;R.reference==="suffix"&&(R.scheme?b=R.scheme+":"+b:b="//"+b);const C=b.match(y);if(C){if(T.scheme=C[1],T.userinfo=C[3],T.host=C[4],T.port=parseInt(C[5],10),T.path=C[6]||"",T.query=C[7],T.fragment=C[8],isNaN(T.port)&&(T.port=C[5]),T.host)if(a(T.host)===!1){const P=e(T.host);T.host=P.host.toLowerCase(),O=P.isIPV6}else O=!0;T.scheme===void 0&&T.userinfo===void 0&&T.host===void 0&&T.port===void 0&&T.query===void 0&&!T.path?T.reference="same-document":T.scheme===void 0?T.reference="relative":T.fragment===void 0?T.reference="absolute":T.reference="uri",R.reference&&R.reference!=="suffix"&&R.reference!==T.reference&&(T.error=T.error||"URI is not a "+R.reference+" reference.");const I=u(R.scheme||T.scheme);if(!R.unicodeSupport&&(!I||!I.unicodeSupport)&&T.host&&(R.domainHost||I&&I.domainHost)&&O===!1&&i(T.host))try{T.host=URL.domainToASCII(T.host.toLowerCase())}catch(N){T.error=T.error||"Host's domain name can not be converted to ASCII: "+N}(!I||I&&!I.skipNormalize)&&(b.indexOf("%")!==-1&&(T.scheme!==void 0&&(T.scheme=unescape(T.scheme)),T.host!==void 0&&(T.host=unescape(T.host))),T.path&&(T.path=escape(unescape(T.path))),T.fragment&&(T.fragment=encodeURI(decodeURIComponent(T.fragment)))),I&&I.parse&&I.parse(T,R)}else T.error=T.error||"URI can not be parsed.";return T}const S={SCHEMES:c,normalize:d,resolve:f,resolveComponent:m,equal:p,serialize:g,parse:w};return Iu.exports=S,Iu.exports.default=S,Iu.exports.fastUri=S,Iu.exports}var M2;function QJ(){if(M2)return kh;M2=1,Object.defineProperty(kh,"__esModule",{value:!0});const e=YJ();return e.code='require("ajv/dist/runtime/uri").default',kh.default=e,kh}var P2;function XJ(){return P2||(P2=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=ig();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=gt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=X1(),a=cg(),i=lP(),c=J1(),u=gt(),d=sg(),f=fm(),m=At(),p=WJ,g=QJ(),y=(K,D)=>new RegExp(K,D);y.code="new RegExp";const w=["removeAdditional","useDefaults","coerceTypes"],S=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},E={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},R=200;function T(K){var D,q,B,L,z,Q,me,ve,Ce,Ie,H,re,be,se,ue,Oe,Le,Xe,Be,Ke,Z,te,oe,Se,xe;const Re=K.strict,ke=(D=K.code)===null||D===void 0?void 0:D.optimize,Je=ke===!0||ke===void 0?1:ke||0,at=(B=(q=K.code)===null||q===void 0?void 0:q.regExp)!==null&&B!==void 0?B:y,kt=(L=K.uriResolver)!==null&&L!==void 0?L:g.default;return{strictSchema:(Q=(z=K.strictSchema)!==null&&z!==void 0?z:Re)!==null&&Q!==void 0?Q:!0,strictNumbers:(ve=(me=K.strictNumbers)!==null&&me!==void 0?me:Re)!==null&&ve!==void 0?ve:!0,strictTypes:(Ie=(Ce=K.strictTypes)!==null&&Ce!==void 0?Ce:Re)!==null&&Ie!==void 0?Ie:"log",strictTuples:(re=(H=K.strictTuples)!==null&&H!==void 0?H:Re)!==null&&re!==void 0?re:"log",strictRequired:(se=(be=K.strictRequired)!==null&&be!==void 0?be:Re)!==null&&se!==void 0?se:!1,code:K.code?{...K.code,optimize:Je,regExp:at}:{optimize:Je,regExp:at},loopRequired:(ue=K.loopRequired)!==null&&ue!==void 0?ue:R,loopEnum:(Oe=K.loopEnum)!==null&&Oe!==void 0?Oe:R,meta:(Le=K.meta)!==null&&Le!==void 0?Le:!0,messages:(Xe=K.messages)!==null&&Xe!==void 0?Xe:!0,inlineRefs:(Be=K.inlineRefs)!==null&&Be!==void 0?Be:!0,schemaId:(Ke=K.schemaId)!==null&&Ke!==void 0?Ke:"$id",addUsedSchema:(Z=K.addUsedSchema)!==null&&Z!==void 0?Z:!0,validateSchema:(te=K.validateSchema)!==null&&te!==void 0?te:!0,validateFormats:(oe=K.validateFormats)!==null&&oe!==void 0?oe:!0,unicodeRegExp:(Se=K.unicodeRegExp)!==null&&Se!==void 0?Se:!0,int32range:(xe=K.int32range)!==null&&xe!==void 0?xe:!0,uriResolver:kt}}class O{constructor(D={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,D=this.opts={...D,...T(D)};const{es5:q,lines:B}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:S,es5:q,lines:B}),this.logger=G(D.logger);const L=D.validateFormats;D.validateFormats=!1,this.RULES=(0,i.getRules)(),C.call(this,b,D,"NOT SUPPORTED"),C.call(this,E,D,"DEPRECATED","warn"),this._metaOpts=W.call(this),D.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),D.keywords&&$.call(this,D.keywords),typeof D.meta=="object"&&this.addMetaSchema(D.meta),N.call(this),D.validateFormats=L}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:D,meta:q,schemaId:B}=this.opts;let L=p;B==="id"&&(L={...p},L.id=L.$id,delete L.$id),q&&D&&this.addMetaSchema(L,L[B],!1)}defaultMeta(){const{meta:D,schemaId:q}=this.opts;return this.opts.defaultMeta=typeof D=="object"?D[q]||D:void 0}validate(D,q){let B;if(typeof D=="string"){if(B=this.getSchema(D),!B)throw new Error(`no schema with key or ref "${D}"`)}else B=this.compile(D);const L=B(q);return"$async"in B||(this.errors=B.errors),L}compile(D,q){const B=this._addSchema(D,q);return B.validate||this._compileSchemaEnv(B)}compileAsync(D,q){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:B}=this.opts;return L.call(this,D,q);async function L(Ie,H){await z.call(this,Ie.$schema);const re=this._addSchema(Ie,H);return re.validate||Q.call(this,re)}async function z(Ie){Ie&&!this.getSchema(Ie)&&await L.call(this,{$ref:Ie},!0)}async function Q(Ie){try{return this._compileSchemaEnv(Ie)}catch(H){if(!(H instanceof a.default))throw H;return me.call(this,H),await ve.call(this,H.missingSchema),Q.call(this,Ie)}}function me({missingSchema:Ie,missingRef:H}){if(this.refs[Ie])throw new Error(`AnySchema ${Ie} is loaded but ${H} cannot be resolved`)}async function ve(Ie){const H=await Ce.call(this,Ie);this.refs[Ie]||await z.call(this,H.$schema),this.refs[Ie]||this.addSchema(H,Ie,q)}async function Ce(Ie){const H=this._loading[Ie];if(H)return H;try{return await(this._loading[Ie]=B(Ie))}finally{delete this._loading[Ie]}}}addSchema(D,q,B,L=this.opts.validateSchema){if(Array.isArray(D)){for(const Q of D)this.addSchema(Q,void 0,B,L);return this}let z;if(typeof D=="object"){const{schemaId:Q}=this.opts;if(z=D[Q],z!==void 0&&typeof z!="string")throw new Error(`schema ${Q} must be string`)}return q=(0,d.normalizeId)(q||z),this._checkUnique(q),this.schemas[q]=this._addSchema(D,B,q,L,!0),this}addMetaSchema(D,q,B=this.opts.validateSchema){return this.addSchema(D,q,!0,B),this}validateSchema(D,q){if(typeof D=="boolean")return!0;let B;if(B=D.$schema,B!==void 0&&typeof B!="string")throw new Error("$schema must be a string");if(B=B||this.opts.defaultMeta||this.defaultMeta(),!B)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const L=this.validate(B,D);if(!L&&q){const z="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(z);else throw new Error(z)}return L}getSchema(D){let q;for(;typeof(q=I.call(this,D))=="string";)D=q;if(q===void 0){const{schemaId:B}=this.opts,L=new c.SchemaEnv({schema:{},schemaId:B});if(q=c.resolveSchema.call(this,L,D),!q)return;this.refs[D]=q}return q.validate||this._compileSchemaEnv(q)}removeSchema(D){if(D instanceof RegExp)return this._removeAllSchemas(this.schemas,D),this._removeAllSchemas(this.refs,D),this;switch(typeof D){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const q=I.call(this,D);return typeof q=="object"&&this._cache.delete(q.schema),delete this.schemas[D],delete this.refs[D],this}case"object":{const q=D;this._cache.delete(q);let B=D[this.opts.schemaId];return B&&(B=(0,d.normalizeId)(B),delete this.schemas[B],delete this.refs[B]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(D){for(const q of D)this.addKeyword(q);return this}addKeyword(D,q){let B;if(typeof D=="string")B=D,typeof q=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),q.keyword=B);else if(typeof D=="object"&&q===void 0){if(q=D,B=q.keyword,Array.isArray(B)&&!B.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(J.call(this,B,q),!q)return(0,m.eachItem)(B,z=>le.call(this,z)),this;Y.call(this,q);const L={...q,type:(0,f.getJSONTypes)(q.type),schemaType:(0,f.getJSONTypes)(q.schemaType)};return(0,m.eachItem)(B,L.type.length===0?z=>le.call(this,z,L):z=>L.type.forEach(Q=>le.call(this,z,L,Q))),this}getKeyword(D){const q=this.RULES.all[D];return typeof q=="object"?q.definition:!!q}removeKeyword(D){const{RULES:q}=this;delete q.keywords[D],delete q.all[D];for(const B of q.rules){const L=B.rules.findIndex(z=>z.keyword===D);L>=0&&B.rules.splice(L,1)}return this}addFormat(D,q){return typeof q=="string"&&(q=new RegExp(q)),this.formats[D]=q,this}errorsText(D=this.errors,{separator:q=", ",dataVar:B="data"}={}){return!D||D.length===0?"No errors":D.map(L=>`${B}${L.instancePath} ${L.message}`).reduce((L,z)=>L+q+z)}$dataMetaSchema(D,q){const B=this.RULES.all;D=JSON.parse(JSON.stringify(D));for(const L of q){const z=L.split("/").slice(1);let Q=D;for(const me of z)Q=Q[me];for(const me in B){const ve=B[me];if(typeof ve!="object")continue;const{$data:Ce}=ve.definition,Ie=Q[me];Ce&&Ie&&(Q[me]=fe(Ie))}}return D}_removeAllSchemas(D,q){for(const B in D){const L=D[B];(!q||q.test(B))&&(typeof L=="string"?delete D[B]:L&&!L.meta&&(this._cache.delete(L.schema),delete D[B]))}}_addSchema(D,q,B,L=this.opts.validateSchema,z=this.opts.addUsedSchema){let Q;const{schemaId:me}=this.opts;if(typeof D=="object")Q=D[me];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof D!="boolean")throw new Error("schema must be object or boolean")}let ve=this._cache.get(D);if(ve!==void 0)return ve;B=(0,d.normalizeId)(Q||B);const Ce=d.getSchemaRefs.call(this,D,B);return ve=new c.SchemaEnv({schema:D,schemaId:me,meta:q,baseId:B,localRefs:Ce}),this._cache.set(ve.schema,ve),z&&!B.startsWith("#")&&(B&&this._checkUnique(B),this.refs[B]=ve),L&&this.validateSchema(D,!0),ve}_checkUnique(D){if(this.schemas[D]||this.refs[D])throw new Error(`schema with key or id "${D}" already exists`)}_compileSchemaEnv(D){if(D.meta?this._compileMetaSchema(D):c.compileSchema.call(this,D),!D.validate)throw new Error("ajv implementation error");return D.validate}_compileMetaSchema(D){const q=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,D)}finally{this.opts=q}}}O.ValidationError=r.default,O.MissingRefError=a.default,e.default=O;function C(K,D,q,B="error"){for(const L in K){const z=L;z in D&&this.logger[B](`${q}: option ${L}. ${K[z]}`)}}function I(K){return K=(0,d.normalizeId)(K),this.schemas[K]||this.refs[K]}function N(){const K=this.opts.schemas;if(K)if(Array.isArray(K))this.addSchema(K);else for(const D in K)this.addSchema(K[D],D)}function P(){for(const K in this.opts.formats){const D=this.opts.formats[K];D&&this.addFormat(K,D)}}function $(K){if(Array.isArray(K)){this.addVocabulary(K);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const D in K){const q=K[D];q.keyword||(q.keyword=D),this.addKeyword(q)}}function W(){const K={...this.opts};for(const D of w)delete K[D];return K}const V={log(){},warn(){},error(){}};function G(K){if(K===!1)return V;if(K===void 0)return console;if(K.log&&K.warn&&K.error)return K;throw new Error("logger must implement log, warn and error methods")}const U=/^[a-z_$][a-z0-9_$:-]*$/i;function J(K,D){const{RULES:q}=this;if((0,m.eachItem)(K,B=>{if(q.keywords[B])throw new Error(`Keyword ${B} is already defined`);if(!U.test(B))throw new Error(`Keyword ${B} has invalid name`)}),!!D&&D.$data&&!("code"in D||"validate"in D))throw new Error('$data keyword must have "code" or "validate" function')}function le(K,D,q){var B;const L=D?.post;if(q&&L)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:z}=this;let Q=L?z.post:z.rules.find(({type:ve})=>ve===q);if(Q||(Q={type:q,rules:[]},z.rules.push(Q)),z.keywords[K]=!0,!D)return;const me={keyword:K,definition:{...D,type:(0,f.getJSONTypes)(D.type),schemaType:(0,f.getJSONTypes)(D.schemaType)}};D.before?F.call(this,Q,me,D.before):Q.rules.push(me),z.all[K]=me,(B=D.implements)===null||B===void 0||B.forEach(ve=>this.addKeyword(ve))}function F(K,D,q){const B=K.rules.findIndex(L=>L.keyword===q);B>=0?K.rules.splice(B,0,D):(K.rules.push(D),this.logger.warn(`rule ${q} is not defined`))}function Y(K){let{metaSchema:D}=K;D!==void 0&&(K.$data&&this.opts.$data&&(D=fe(D)),K.validateSchema=this.compile(D,!0))}const ie={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function fe(K){return{anyOf:[K,ie]}}})(M0)),M0}var Mh={},Ph={},Dh={},D2;function JJ(){if(D2)return Dh;D2=1,Object.defineProperty(Dh,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Dh.default=e,Dh}var Os={},L2;function eee(){if(L2)return Os;L2=1,Object.defineProperty(Os,"__esModule",{value:!0}),Os.callRef=Os.getValidate=void 0;const e=cg(),t=Ko(),n=gt(),r=Js(),a=J1(),i=At(),c={keyword:"$ref",schemaType:"string",code(f){const{gen:m,schema:p,it:g}=f,{baseId:y,schemaEnv:w,validateName:S,opts:b,self:E}=g,{root:R}=w;if((p==="#"||p==="#/")&&y===R.baseId)return O();const T=a.resolveRef.call(E,R,y,p);if(T===void 0)throw new e.default(g.opts.uriResolver,y,p);if(T instanceof a.SchemaEnv)return C(T);return I(T);function O(){if(w===R)return d(f,S,w,w.$async);const N=m.scopeValue("root",{ref:R});return d(f,(0,n._)`${N}.validate`,R,R.$async)}function C(N){const P=u(f,N);d(f,P,N,N.$async)}function I(N){const P=m.scopeValue("schema",b.code.source===!0?{ref:N,code:(0,n.stringify)(N)}:{ref:N}),$=m.name("valid"),W=f.subschema({schema:N,dataTypes:[],schemaPath:n.nil,topSchemaRef:P,errSchemaPath:p},$);f.mergeEvaluated(W),f.ok($)}}};function u(f,m){const{gen:p}=f;return m.validate?p.scopeValue("validate",{ref:m.validate}):(0,n._)`${p.scopeValue("wrapper",{ref:m})}.validate`}Os.getValidate=u;function d(f,m,p,g){const{gen:y,it:w}=f,{allErrors:S,schemaEnv:b,opts:E}=w,R=E.passContext?r.default.this:n.nil;g?T():O();function T(){if(!b.$async)throw new Error("async schema referenced by sync schema");const N=y.let("valid");y.try(()=>{y.code((0,n._)`await ${(0,t.callValidateCode)(f,m,R)}`),I(m),S||y.assign(N,!0)},P=>{y.if((0,n._)`!(${P} instanceof ${w.ValidationError})`,()=>y.throw(P)),C(P),S||y.assign(N,!1)}),f.ok(N)}function O(){f.result((0,t.callValidateCode)(f,m,R),()=>I(m),()=>C(m))}function C(N){const P=(0,n._)`${N}.errors`;y.assign(r.default.vErrors,(0,n._)`${r.default.vErrors} === null ? ${P} : ${r.default.vErrors}.concat(${P})`),y.assign(r.default.errors,(0,n._)`${r.default.vErrors}.length`)}function I(N){var P;if(!w.opts.unevaluated)return;const $=(P=p?.validate)===null||P===void 0?void 0:P.evaluated;if(w.props!==!0)if($&&!$.dynamicProps)$.props!==void 0&&(w.props=i.mergeEvaluated.props(y,$.props,w.props));else{const W=y.var("props",(0,n._)`${N}.evaluated.props`);w.props=i.mergeEvaluated.props(y,W,w.props,n.Name)}if(w.items!==!0)if($&&!$.dynamicItems)$.items!==void 0&&(w.items=i.mergeEvaluated.items(y,$.items,w.items));else{const W=y.var("items",(0,n._)`${N}.evaluated.items`);w.items=i.mergeEvaluated.items(y,W,w.items,n.Name)}}}return Os.callRef=d,Os.default=c,Os}var j2;function tee(){if(j2)return Ph;j2=1,Object.defineProperty(Ph,"__esModule",{value:!0});const e=JJ(),t=eee(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Ph.default=n,Ph}var Lh={},jh={},$2;function nee(){if($2)return jh;$2=1,Object.defineProperty(jh,"__esModule",{value:!0});const e=gt(),t=e.operators,n={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},r={message:({keyword:i,schemaCode:c})=>(0,e.str)`must be ${n[i].okStr} ${c}`,params:({keyword:i,schemaCode:c})=>(0,e._)`{comparison: ${n[i].okStr}, limit: ${c}}`},a={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:r,code(i){const{keyword:c,data:u,schemaCode:d}=i;i.fail$data((0,e._)`${u} ${n[c].fail} ${d} || isNaN(${u})`)}};return jh.default=a,jh}var $h={},U2;function ree(){if(U2)return $h;U2=1,Object.defineProperty($h,"__esModule",{value:!0});const e=gt(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,e._)`{multipleOf: ${r}}`},code(r){const{gen:a,data:i,schemaCode:c,it:u}=r,d=u.opts.multipleOfPrecision,f=a.let("res"),m=d?(0,e._)`Math.abs(Math.round(${f}) - ${f}) > 1e-${d}`:(0,e._)`${f} !== parseInt(${f})`;r.fail$data((0,e._)`(${c} === 0 || (${f} = ${i}/${c}, ${m}))`)}};return $h.default=n,$h}var Uh={},zh={},z2;function oee(){if(z2)return zh;z2=1,Object.defineProperty(zh,"__esModule",{value:!0});function e(t){const n=t.length;let r=0,a=0,i;for(;a<n;)r++,i=t.charCodeAt(a++),i>=55296&&i<=56319&&a<n&&(i=t.charCodeAt(a),(i&64512)===56320&&a++);return r}return zh.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',zh}var V2;function aee(){if(V2)return Uh;V2=1,Object.defineProperty(Uh,"__esModule",{value:!0});const e=gt(),t=At(),n=oee(),a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:c}){const u=i==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${u} than ${c} characters`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:c,data:u,schemaCode:d,it:f}=i,m=c==="maxLength"?e.operators.GT:e.operators.LT,p=f.opts.unicode===!1?(0,e._)`${u}.length`:(0,e._)`${(0,t.useFunc)(i.gen,n.default)}(${u})`;i.fail$data((0,e._)`${p} ${m} ${d}`)}};return Uh.default=a,Uh}var Vh={},F2;function see(){if(F2)return Vh;F2=1,Object.defineProperty(Vh,"__esModule",{value:!0});const e=Ko(),t=At(),n=gt(),a={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,n.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,n._)`{pattern: ${i}}`},code(i){const{gen:c,data:u,$data:d,schema:f,schemaCode:m,it:p}=i,g=p.opts.unicodeRegExp?"u":"";if(d){const{regExp:y}=p.opts.code,w=y.code==="new RegExp"?(0,n._)`new RegExp`:(0,t.useFunc)(c,y),S=c.let("valid");c.try(()=>c.assign(S,(0,n._)`${w}(${m}, ${g}).test(${u})`),()=>c.assign(S,!1)),i.fail$data((0,n._)`!${S}`)}else{const y=(0,e.usePattern)(i,f);i.fail$data((0,n._)`!${y}.test(${u})`)}}};return Vh.default=a,Vh}var Fh={},B2;function iee(){if(B2)return Fh;B2=1,Object.defineProperty(Fh,"__esModule",{value:!0});const e=gt(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:a}){const i=r==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${a} properties`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:a,data:i,schemaCode:c}=r,u=a==="maxProperties"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`Object.keys(${i}).length ${u} ${c}`)}};return Fh.default=n,Fh}var Bh={},q2;function cee(){if(q2)return Bh;q2=1,Object.defineProperty(Bh,"__esModule",{value:!0});const e=Ko(),t=gt(),n=At(),a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:i}})=>(0,t.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,t._)`{missingProperty: ${i}}`},code(i){const{gen:c,schema:u,schemaCode:d,data:f,$data:m,it:p}=i,{opts:g}=p;if(!m&&u.length===0)return;const y=u.length>=g.loopRequired;if(p.allErrors?w():S(),g.strictRequired){const R=i.parentSchema.properties,{definedProperties:T}=i.it;for(const O of u)if(R?.[O]===void 0&&!T.has(O)){const C=p.schemaEnv.baseId+p.errSchemaPath,I=`required property "${O}" is not defined at "${C}" (strictRequired)`;(0,n.checkStrictMode)(p,I,p.opts.strictRequired)}}function w(){if(y||m)i.block$data(t.nil,b);else for(const R of u)(0,e.checkReportMissingProp)(i,R)}function S(){const R=c.let("missing");if(y||m){const T=c.let("valid",!0);i.block$data(T,()=>E(R,T)),i.ok(T)}else c.if((0,e.checkMissingProp)(i,u,R)),(0,e.reportMissingProp)(i,R),c.else()}function b(){c.forOf("prop",d,R=>{i.setParams({missingProperty:R}),c.if((0,e.noPropertyInData)(c,f,R,g.ownProperties),()=>i.error())})}function E(R,T){i.setParams({missingProperty:R}),c.forOf(R,d,()=>{c.assign(T,(0,e.propertyInData)(c,f,R,g.ownProperties)),c.if((0,t.not)(T),()=>{i.error(),c.break()})},t.nil)}}};return Bh.default=a,Bh}var qh={},H2;function lee(){if(H2)return qh;H2=1,Object.defineProperty(qh,"__esModule",{value:!0});const e=gt(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:a}){const i=r==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${a} items`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:a,data:i,schemaCode:c}=r,u=a==="maxItems"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`${i}.length ${u} ${c}`)}};return qh.default=n,qh}var Hh={},Gh={},G2;function ew(){if(G2)return Gh;G2=1,Object.defineProperty(Gh,"__esModule",{value:!0});const e=dP();return e.code='require("ajv/dist/runtime/equal").default',Gh.default=e,Gh}var Z2;function uee(){if(Z2)return Hh;Z2=1,Object.defineProperty(Hh,"__esModule",{value:!0});const e=fm(),t=gt(),n=At(),r=ew(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:c,j:u}})=>(0,t.str)`must NOT have duplicate items (items ## ${u} and ${c} are identical)`,params:({params:{i:c,j:u}})=>(0,t._)`{i: ${c}, j: ${u}}`},code(c){const{gen:u,data:d,$data:f,schema:m,parentSchema:p,schemaCode:g,it:y}=c;if(!f&&!m)return;const w=u.let("valid"),S=p.items?(0,e.getSchemaTypes)(p.items):[];c.block$data(w,b,(0,t._)`${g} === false`),c.ok(w);function b(){const O=u.let("i",(0,t._)`${d}.length`),C=u.let("j");c.setParams({i:O,j:C}),u.assign(w,!0),u.if((0,t._)`${O} > 1`,()=>(E()?R:T)(O,C))}function E(){return S.length>0&&!S.some(O=>O==="object"||O==="array")}function R(O,C){const I=u.name("item"),N=(0,e.checkDataTypes)(S,I,y.opts.strictNumbers,e.DataType.Wrong),P=u.const("indices",(0,t._)`{}`);u.for((0,t._)`;${O}--;`,()=>{u.let(I,(0,t._)`${d}[${O}]`),u.if(N,(0,t._)`continue`),S.length>1&&u.if((0,t._)`typeof ${I} == "string"`,(0,t._)`${I} += "_"`),u.if((0,t._)`typeof ${P}[${I}] == "number"`,()=>{u.assign(C,(0,t._)`${P}[${I}]`),c.error(),u.assign(w,!1).break()}).code((0,t._)`${P}[${I}] = ${O}`)})}function T(O,C){const I=(0,n.useFunc)(u,r.default),N=u.name("outer");u.label(N).for((0,t._)`;${O}--;`,()=>u.for((0,t._)`${C} = ${O}; ${C}--;`,()=>u.if((0,t._)`${I}(${d}[${O}], ${d}[${C}])`,()=>{c.error(),u.assign(w,!1).break(N)})))}}};return Hh.default=i,Hh}var Zh={},W2;function dee(){if(W2)return Zh;W2=1,Object.defineProperty(Zh,"__esModule",{value:!0});const e=gt(),t=At(),n=ew(),a={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},code(i){const{gen:c,data:u,$data:d,schemaCode:f,schema:m}=i;d||m&&typeof m=="object"?i.fail$data((0,e._)`!${(0,t.useFunc)(c,n.default)}(${u}, ${f})`):i.fail((0,e._)`${m} !== ${u}`)}};return Zh.default=a,Zh}var Wh={},K2;function fee(){if(K2)return Wh;K2=1,Object.defineProperty(Wh,"__esModule",{value:!0});const e=gt(),t=At(),n=ew(),a={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},code(i){const{gen:c,data:u,$data:d,schema:f,schemaCode:m,it:p}=i;if(!d&&f.length===0)throw new Error("enum must have non-empty array");const g=f.length>=p.opts.loopEnum;let y;const w=()=>y??(y=(0,t.useFunc)(c,n.default));let S;if(g||d)S=c.let("valid"),i.block$data(S,b);else{if(!Array.isArray(f))throw new Error("ajv implementation error");const R=c.const("vSchema",m);S=(0,e.or)(...f.map((T,O)=>E(R,O)))}i.pass(S);function b(){c.assign(S,!1),c.forOf("v",m,R=>c.if((0,e._)`${w()}(${u}, ${R})`,()=>c.assign(S,!0).break()))}function E(R,T){const O=f[T];return typeof O=="object"&&O!==null?(0,e._)`${w()}(${u}, ${R}[${T}])`:(0,e._)`${u} === ${O}`}}};return Wh.default=a,Wh}var Y2;function hee(){if(Y2)return Lh;Y2=1,Object.defineProperty(Lh,"__esModule",{value:!0});const e=nee(),t=ree(),n=aee(),r=see(),a=iee(),i=cee(),c=lee(),u=uee(),d=dee(),f=fee(),m=[e.default,t.default,n.default,r.default,a.default,i.default,c.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,f.default];return Lh.default=m,Lh}var Kh={},zc={},Q2;function hP(){if(Q2)return zc;Q2=1,Object.defineProperty(zc,"__esModule",{value:!0}),zc.validateAdditionalItems=void 0;const e=gt(),t=At(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},code(i){const{parentSchema:c,it:u}=i,{items:d}=c;if(!Array.isArray(d)){(0,t.checkStrictMode)(u,'"additionalItems" is ignored when "items" is not an array of schemas');return}a(i,d)}};function a(i,c){const{gen:u,schema:d,data:f,keyword:m,it:p}=i;p.items=!0;const g=u.const("len",(0,e._)`${f}.length`);if(d===!1)i.setParams({len:c.length}),i.pass((0,e._)`${g} <= ${c.length}`);else if(typeof d=="object"&&!(0,t.alwaysValidSchema)(p,d)){const w=u.var("valid",(0,e._)`${g} <= ${c.length}`);u.if((0,e.not)(w),()=>y(w)),i.ok(w)}function y(w){u.forRange("i",c.length,g,S=>{i.subschema({keyword:m,dataProp:S,dataPropType:t.Type.Num},w),p.allErrors||u.if((0,e.not)(w),()=>u.break())})}}return zc.validateAdditionalItems=a,zc.default=r,zc}var Yh={},Vc={},X2;function pP(){if(X2)return Vc;X2=1,Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.validateTuple=void 0;const e=gt(),t=At(),n=Ko(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:c,it:u}=i;if(Array.isArray(c))return a(i,"additionalItems",c);u.items=!0,!(0,t.alwaysValidSchema)(u,c)&&i.ok((0,n.validateArray)(i))}};function a(i,c,u=i.schema){const{gen:d,parentSchema:f,data:m,keyword:p,it:g}=i;S(f),g.opts.unevaluated&&u.length&&g.items!==!0&&(g.items=t.mergeEvaluated.items(d,u.length,g.items));const y=d.name("valid"),w=d.const("len",(0,e._)`${m}.length`);u.forEach((b,E)=>{(0,t.alwaysValidSchema)(g,b)||(d.if((0,e._)`${w} > ${E}`,()=>i.subschema({keyword:p,schemaProp:E,dataProp:E},y)),i.ok(y))});function S(b){const{opts:E,errSchemaPath:R}=g,T=u.length,O=T===b.minItems&&(T===b.maxItems||b[c]===!1);if(E.strictTuples&&!O){const C=`"${p}" is ${T}-tuple, but minItems or maxItems/${c} are not specified or different at path "${R}"`;(0,t.checkStrictMode)(g,C,E.strictTuples)}}}return Vc.validateTuple=a,Vc.default=r,Vc}var J2;function pee(){if(J2)return Yh;J2=1,Object.defineProperty(Yh,"__esModule",{value:!0});const e=pP(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};return Yh.default=t,Yh}var Qh={},eC;function mee(){if(eC)return Qh;eC=1,Object.defineProperty(Qh,"__esModule",{value:!0});const e=gt(),t=At(),n=Ko(),r=hP(),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:c}})=>(0,e.str)`must NOT have more than ${c} items`,params:({params:{len:c}})=>(0,e._)`{limit: ${c}}`},code(c){const{schema:u,parentSchema:d,it:f}=c,{prefixItems:m}=d;f.items=!0,!(0,t.alwaysValidSchema)(f,u)&&(m?(0,r.validateAdditionalItems)(c,m):c.ok((0,n.validateArray)(c)))}};return Qh.default=i,Qh}var Xh={},tC;function gee(){if(tC)return Xh;tC=1,Object.defineProperty(Xh,"__esModule",{value:!0});const e=gt(),t=At(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:a,max:i}})=>i===void 0?(0,e.str)`must contain at least ${a} valid item(s)`:(0,e.str)`must contain at least ${a} and no more than ${i} valid item(s)`,params:({params:{min:a,max:i}})=>i===void 0?(0,e._)`{minContains: ${a}}`:(0,e._)`{minContains: ${a}, maxContains: ${i}}`},code(a){const{gen:i,schema:c,parentSchema:u,data:d,it:f}=a;let m,p;const{minContains:g,maxContains:y}=u;f.opts.next?(m=g===void 0?1:g,p=y):m=1;const w=i.const("len",(0,e._)`${d}.length`);if(a.setParams({min:m,max:p}),p===void 0&&m===0){(0,t.checkStrictMode)(f,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&m>p){(0,t.checkStrictMode)(f,'"minContains" > "maxContains" is always invalid'),a.fail();return}if((0,t.alwaysValidSchema)(f,c)){let T=(0,e._)`${w} >= ${m}`;p!==void 0&&(T=(0,e._)`${T} && ${w} <= ${p}`),a.pass(T);return}f.items=!0;const S=i.name("valid");p===void 0&&m===1?E(S,()=>i.if(S,()=>i.break())):m===0?(i.let(S,!0),p!==void 0&&i.if((0,e._)`${d}.length > 0`,b)):(i.let(S,!1),b()),a.result(S,()=>a.reset());function b(){const T=i.name("_valid"),O=i.let("count",0);E(T,()=>i.if(T,()=>R(O)))}function E(T,O){i.forRange("i",0,w,C=>{a.subschema({keyword:"contains",dataProp:C,dataPropType:t.Type.Num,compositeRule:!0},T),O()})}function R(T){i.code((0,e._)`${T}++`),p===void 0?i.if((0,e._)`${T} >= ${m}`,()=>i.assign(S,!0).break()):(i.if((0,e._)`${T} > ${p}`,()=>i.assign(S,!1).break()),m===1?i.assign(S,!0):i.if((0,e._)`${T} >= ${m}`,()=>i.assign(S,!0)))}}};return Xh.default=r,Xh}var F0={},nC;function vee(){return nC||(nC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=gt(),n=At(),r=Ko();e.error={message:({params:{property:d,depsCount:f,deps:m}})=>{const p=f===1?"property":"properties";return(0,t.str)`must have ${p} ${m} when property ${d} is present`},params:({params:{property:d,depsCount:f,deps:m,missingProperty:p}})=>(0,t._)`{property: ${d},
168
- missingProperty: ${p},
169
- depsCount: ${f},
170
- deps: ${m}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(d){const[f,m]=i(d);c(d,f),u(d,m)}};function i({schema:d}){const f={},m={};for(const p in d){if(p==="__proto__")continue;const g=Array.isArray(d[p])?f:m;g[p]=d[p]}return[f,m]}function c(d,f=d.schema){const{gen:m,data:p,it:g}=d;if(Object.keys(f).length===0)return;const y=m.let("missing");for(const w in f){const S=f[w];if(S.length===0)continue;const b=(0,r.propertyInData)(m,p,w,g.opts.ownProperties);d.setParams({property:w,depsCount:S.length,deps:S.join(", ")}),g.allErrors?m.if(b,()=>{for(const E of S)(0,r.checkReportMissingProp)(d,E)}):(m.if((0,t._)`${b} && (${(0,r.checkMissingProp)(d,S,y)})`),(0,r.reportMissingProp)(d,y),m.else())}}e.validatePropertyDeps=c;function u(d,f=d.schema){const{gen:m,data:p,keyword:g,it:y}=d,w=m.name("valid");for(const S in f)(0,n.alwaysValidSchema)(y,f[S])||(m.if((0,r.propertyInData)(m,p,S,y.opts.ownProperties),()=>{const b=d.subschema({keyword:g,schemaProp:S},w);d.mergeValidEvaluated(b,w)},()=>m.var(w,!0)),d.ok(w))}e.validateSchemaDeps=u,e.default=a})(F0)),F0}var Jh={},rC;function yee(){if(rC)return Jh;rC=1,Object.defineProperty(Jh,"__esModule",{value:!0});const e=gt(),t=At(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:a})=>(0,e._)`{propertyName: ${a.propertyName}}`},code(a){const{gen:i,schema:c,data:u,it:d}=a;if((0,t.alwaysValidSchema)(d,c))return;const f=i.name("valid");i.forIn("key",u,m=>{a.setParams({propertyName:m}),a.subschema({keyword:"propertyNames",data:m,dataTypes:["string"],propertyName:m,compositeRule:!0},f),i.if((0,e.not)(f),()=>{a.error(!0),d.allErrors||i.break()})}),a.ok(f)}};return Jh.default=r,Jh}var ep={},oC;function mP(){if(oC)return ep;oC=1,Object.defineProperty(ep,"__esModule",{value:!0});const e=Ko(),t=gt(),n=Js(),r=At(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:c})=>(0,t._)`{additionalProperty: ${c.additionalProperty}}`},code(c){const{gen:u,schema:d,parentSchema:f,data:m,errsCount:p,it:g}=c;if(!p)throw new Error("ajv implementation error");const{allErrors:y,opts:w}=g;if(g.props=!0,w.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(g,d))return;const S=(0,e.allSchemaProperties)(f.properties),b=(0,e.allSchemaProperties)(f.patternProperties);E(),c.ok((0,t._)`${p} === ${n.default.errors}`);function E(){u.forIn("key",m,I=>{!S.length&&!b.length?O(I):u.if(R(I),()=>O(I))})}function R(I){let N;if(S.length>8){const P=(0,r.schemaRefOrVal)(g,f.properties,"properties");N=(0,e.isOwnProperty)(u,P,I)}else S.length?N=(0,t.or)(...S.map(P=>(0,t._)`${I} === ${P}`)):N=t.nil;return b.length&&(N=(0,t.or)(N,...b.map(P=>(0,t._)`${(0,e.usePattern)(c,P)}.test(${I})`))),(0,t.not)(N)}function T(I){u.code((0,t._)`delete ${m}[${I}]`)}function O(I){if(w.removeAdditional==="all"||w.removeAdditional&&d===!1){T(I);return}if(d===!1){c.setParams({additionalProperty:I}),c.error(),y||u.break();return}if(typeof d=="object"&&!(0,r.alwaysValidSchema)(g,d)){const N=u.name("valid");w.removeAdditional==="failing"?(C(I,N,!1),u.if((0,t.not)(N),()=>{c.reset(),T(I)})):(C(I,N),y||u.if((0,t.not)(N),()=>u.break()))}}function C(I,N,P){const $={keyword:"additionalProperties",dataProp:I,dataPropType:r.Type.Str};P===!1&&Object.assign($,{compositeRule:!0,createErrors:!1,allErrors:!1}),c.subschema($,N)}}};return ep.default=i,ep}var tp={},aC;function _ee(){if(aC)return tp;aC=1,Object.defineProperty(tp,"__esModule",{value:!0});const e=ig(),t=Ko(),n=At(),r=mP(),a={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:c,schema:u,parentSchema:d,data:f,it:m}=i;m.opts.removeAdditional==="all"&&d.additionalProperties===void 0&&r.default.code(new e.KeywordCxt(m,r.default,"additionalProperties"));const p=(0,t.allSchemaProperties)(u);for(const b of p)m.definedProperties.add(b);m.opts.unevaluated&&p.length&&m.props!==!0&&(m.props=n.mergeEvaluated.props(c,(0,n.toHash)(p),m.props));const g=p.filter(b=>!(0,n.alwaysValidSchema)(m,u[b]));if(g.length===0)return;const y=c.name("valid");for(const b of g)w(b)?S(b):(c.if((0,t.propertyInData)(c,f,b,m.opts.ownProperties)),S(b),m.allErrors||c.else().var(y,!0),c.endIf()),i.it.definedProperties.add(b),i.ok(y);function w(b){return m.opts.useDefaults&&!m.compositeRule&&u[b].default!==void 0}function S(b){i.subschema({keyword:"properties",schemaProp:b,dataProp:b},y)}}};return tp.default=a,tp}var np={},sC;function bee(){if(sC)return np;sC=1,Object.defineProperty(np,"__esModule",{value:!0});const e=Ko(),t=gt(),n=At(),r=At(),a={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:c,schema:u,data:d,parentSchema:f,it:m}=i,{opts:p}=m,g=(0,e.allSchemaProperties)(u),y=g.filter(O=>(0,n.alwaysValidSchema)(m,u[O]));if(g.length===0||y.length===g.length&&(!m.opts.unevaluated||m.props===!0))return;const w=p.strictSchema&&!p.allowMatchingProperties&&f.properties,S=c.name("valid");m.props!==!0&&!(m.props instanceof t.Name)&&(m.props=(0,r.evaluatedPropsToName)(c,m.props));const{props:b}=m;E();function E(){for(const O of g)w&&R(O),m.allErrors?T(O):(c.var(S,!0),T(O),c.if(S))}function R(O){for(const C in w)new RegExp(O).test(C)&&(0,n.checkStrictMode)(m,`property ${C} matches pattern ${O} (use allowMatchingProperties)`)}function T(O){c.forIn("key",d,C=>{c.if((0,t._)`${(0,e.usePattern)(i,O)}.test(${C})`,()=>{const I=y.includes(O);I||i.subschema({keyword:"patternProperties",schemaProp:O,dataProp:C,dataPropType:r.Type.Str},S),m.opts.unevaluated&&b!==!0?c.assign((0,t._)`${b}[${C}]`,!0):!I&&!m.allErrors&&c.if((0,t.not)(S),()=>c.break())})})}}};return np.default=a,np}var rp={},iC;function wee(){if(iC)return rp;iC=1,Object.defineProperty(rp,"__esModule",{value:!0});const e=At(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:r,schema:a,it:i}=n;if((0,e.alwaysValidSchema)(i,a)){n.fail();return}const c=r.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},c),n.failResult(c,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};return rp.default=t,rp}var op={},cC;function See(){if(cC)return op;cC=1,Object.defineProperty(op,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ko().validateUnion,error:{message:"must match a schema in anyOf"}};return op.default=t,op}var ap={},lC;function Eee(){if(lC)return ap;lC=1,Object.defineProperty(ap,"__esModule",{value:!0});const e=gt(),t=At(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:a})=>(0,e._)`{passingSchemas: ${a.passing}}`},code(a){const{gen:i,schema:c,parentSchema:u,it:d}=a;if(!Array.isArray(c))throw new Error("ajv implementation error");if(d.opts.discriminator&&u.discriminator)return;const f=c,m=i.let("valid",!1),p=i.let("passing",null),g=i.name("_valid");a.setParams({passing:p}),i.block(y),a.result(m,()=>a.reset(),()=>a.error(!0));function y(){f.forEach((w,S)=>{let b;(0,t.alwaysValidSchema)(d,w)?i.var(g,!0):b=a.subschema({keyword:"oneOf",schemaProp:S,compositeRule:!0},g),S>0&&i.if((0,e._)`${g} && ${m}`).assign(m,!1).assign(p,(0,e._)`[${p}, ${S}]`).else(),i.if(g,()=>{i.assign(m,!0),i.assign(p,S),b&&a.mergeEvaluated(b,e.Name)})})}}};return ap.default=r,ap}var sp={},uC;function Ree(){if(uC)return sp;uC=1,Object.defineProperty(sp,"__esModule",{value:!0});const e=At(),t={keyword:"allOf",schemaType:"array",code(n){const{gen:r,schema:a,it:i}=n;if(!Array.isArray(a))throw new Error("ajv implementation error");const c=r.name("valid");a.forEach((u,d)=>{if((0,e.alwaysValidSchema)(i,u))return;const f=n.subschema({keyword:"allOf",schemaProp:d},c);n.ok(c),n.mergeEvaluated(f)})}};return sp.default=t,sp}var ip={},dC;function xee(){if(dC)return ip;dC=1,Object.defineProperty(ip,"__esModule",{value:!0});const e=gt(),t=At(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,e.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,e._)`{failingKeyword: ${i.ifClause}}`},code(i){const{gen:c,parentSchema:u,it:d}=i;u.then===void 0&&u.else===void 0&&(0,t.checkStrictMode)(d,'"if" without "then" and "else" is ignored');const f=a(d,"then"),m=a(d,"else");if(!f&&!m)return;const p=c.let("valid",!0),g=c.name("_valid");if(y(),i.reset(),f&&m){const S=c.let("ifClause");i.setParams({ifClause:S}),c.if(g,w("then",S),w("else",S))}else f?c.if(g,w("then")):c.if((0,e.not)(g),w("else"));i.pass(p,()=>i.error(!0));function y(){const S=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},g);i.mergeEvaluated(S)}function w(S,b){return()=>{const E=i.subschema({keyword:S},g);c.assign(p,g),i.mergeValidEvaluated(E,p),b?c.assign(b,(0,e._)`${S}`):i.setParams({ifClause:S})}}}};function a(i,c){const u=i.schema[c];return u!==void 0&&!(0,t.alwaysValidSchema)(i,u)}return ip.default=r,ip}var cp={},fC;function Tee(){if(fC)return cp;fC=1,Object.defineProperty(cp,"__esModule",{value:!0});const e=At(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:r,it:a}){r.if===void 0&&(0,e.checkStrictMode)(a,`"${n}" without "if" is ignored`)}};return cp.default=t,cp}var hC;function Oee(){if(hC)return Kh;hC=1,Object.defineProperty(Kh,"__esModule",{value:!0});const e=hP(),t=pee(),n=pP(),r=mee(),a=gee(),i=vee(),c=yee(),u=mP(),d=_ee(),f=bee(),m=wee(),p=See(),g=Eee(),y=Ree(),w=xee(),S=Tee();function b(E=!1){const R=[m.default,p.default,g.default,y.default,w.default,S.default,c.default,u.default,i.default,d.default,f.default];return E?R.push(t.default,r.default):R.push(e.default,n.default),R.push(a.default),R}return Kh.default=b,Kh}var lp={},up={},pC;function Cee(){if(pC)return up;pC=1,Object.defineProperty(up,"__esModule",{value:!0});const e=gt(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,e._)`{format: ${r}}`},code(r,a){const{gen:i,data:c,$data:u,schema:d,schemaCode:f,it:m}=r,{opts:p,errSchemaPath:g,schemaEnv:y,self:w}=m;if(!p.validateFormats)return;u?S():b();function S(){const E=i.scopeValue("formats",{ref:w.formats,code:p.code.formats}),R=i.const("fDef",(0,e._)`${E}[${f}]`),T=i.let("fType"),O=i.let("format");i.if((0,e._)`typeof ${R} == "object" && !(${R} instanceof RegExp)`,()=>i.assign(T,(0,e._)`${R}.type || "string"`).assign(O,(0,e._)`${R}.validate`),()=>i.assign(T,(0,e._)`"string"`).assign(O,R)),r.fail$data((0,e.or)(C(),I()));function C(){return p.strictSchema===!1?e.nil:(0,e._)`${f} && !${O}`}function I(){const N=y.$async?(0,e._)`(${R}.async ? await ${O}(${c}) : ${O}(${c}))`:(0,e._)`${O}(${c})`,P=(0,e._)`(typeof ${O} == "function" ? ${N} : ${O}.test(${c}))`;return(0,e._)`${O} && ${O} !== true && ${T} === ${a} && !${P}`}}function b(){const E=w.formats[d];if(!E){C();return}if(E===!0)return;const[R,T,O]=I(E);R===a&&r.pass(N());function C(){if(p.strictSchema===!1){w.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${d}" ignored in schema at path "${g}"`}}function I(P){const $=P instanceof RegExp?(0,e.regexpCode)(P):p.code.formats?(0,e._)`${p.code.formats}${(0,e.getProperty)(d)}`:void 0,W=i.scopeValue("formats",{key:d,ref:P,code:$});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,e._)`${W}.validate`]:["string",P,W]}function N(){if(typeof E=="object"&&!(E instanceof RegExp)&&E.async){if(!y.$async)throw new Error("async format in sync schema");return(0,e._)`await ${O}(${c})`}return typeof T=="function"?(0,e._)`${O}(${c})`:(0,e._)`${O}.test(${c})`}}}};return up.default=n,up}var mC;function Aee(){if(mC)return lp;mC=1,Object.defineProperty(lp,"__esModule",{value:!0});const t=[Cee().default];return lp.default=t,lp}var Ri={},gC;function Iee(){return gC||(gC=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.contentVocabulary=Ri.metadataVocabulary=void 0,Ri.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Ri.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Ri}var vC;function Nee(){if(vC)return Mh;vC=1,Object.defineProperty(Mh,"__esModule",{value:!0});const e=tee(),t=hee(),n=Oee(),r=Aee(),a=Iee(),i=[e.default,t.default,(0,n.default)(),r.default,a.metadataVocabulary,a.contentVocabulary];return Mh.default=i,Mh}var dp={},Nu={},yC;function kee(){if(yC)return Nu;yC=1,Object.defineProperty(Nu,"__esModule",{value:!0}),Nu.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Nu.DiscrError=e={})),Nu}var _C;function Mee(){if(_C)return dp;_C=1,Object.defineProperty(dp,"__esModule",{value:!0});const e=gt(),t=kee(),n=J1(),r=cg(),a=At(),c={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:u,tagName:d}})=>u===t.DiscrError.Tag?`tag "${d}" must be string`:`value of tag "${d}" must be in oneOf`,params:({params:{discrError:u,tag:d,tagName:f}})=>(0,e._)`{error: ${u}, tag: ${f}, tagValue: ${d}}`},code(u){const{gen:d,data:f,schema:m,parentSchema:p,it:g}=u,{oneOf:y}=p;if(!g.opts.discriminator)throw new Error("discriminator: requires discriminator option");const w=m.propertyName;if(typeof w!="string")throw new Error("discriminator: requires propertyName");if(m.mapping)throw new Error("discriminator: mapping is not supported");if(!y)throw new Error("discriminator: requires oneOf keyword");const S=d.let("valid",!1),b=d.const("tag",(0,e._)`${f}${(0,e.getProperty)(w)}`);d.if((0,e._)`typeof ${b} == "string"`,()=>E(),()=>u.error(!1,{discrError:t.DiscrError.Tag,tag:b,tagName:w})),u.ok(S);function E(){const O=T();d.if(!1);for(const C in O)d.elseIf((0,e._)`${b} === ${C}`),d.assign(S,R(O[C]));d.else(),u.error(!1,{discrError:t.DiscrError.Mapping,tag:b,tagName:w}),d.endIf()}function R(O){const C=d.name("valid"),I=u.subschema({keyword:"oneOf",schemaProp:O},C);return u.mergeEvaluated(I,e.Name),C}function T(){var O;const C={},I=P(p);let N=!0;for(let V=0;V<y.length;V++){let G=y[V];if(G?.$ref&&!(0,a.schemaHasRulesButRef)(G,g.self.RULES)){const J=G.$ref;if(G=n.resolveRef.call(g.self,g.schemaEnv.root,g.baseId,J),G instanceof n.SchemaEnv&&(G=G.schema),G===void 0)throw new r.default(g.opts.uriResolver,g.baseId,J)}const U=(O=G?.properties)===null||O===void 0?void 0:O[w];if(typeof U!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${w}"`);N=N&&(I||P(G)),$(U,V)}if(!N)throw new Error(`discriminator: "${w}" must be required`);return C;function P({required:V}){return Array.isArray(V)&&V.includes(w)}function $(V,G){if(V.const)W(V.const,G);else if(V.enum)for(const U of V.enum)W(U,G);else throw new Error(`discriminator: "properties/${w}" must have "const" or "enum"`)}function W(V,G){if(typeof V!="string"||V in C)throw new Error(`discriminator: "${w}" values must be unique strings`);C[V]=G}}}};return dp.default=c,dp}const Pee="http://json-schema.org/draft-07/schema#",Dee="http://json-schema.org/draft-07/schema#",Lee="Core schema meta-schema",jee={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},$ee=["object","boolean"],Uee={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},zee={$schema:Pee,$id:Dee,title:Lee,definitions:jee,type:$ee,properties:Uee,default:!0};var bC;function gP(){return bC||(bC=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const n=XJ(),r=Nee(),a=Mee(),i=zee,c=["/properties"],u="http://json-schema.org/draft-07/schema";class d extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(w=>this.addVocabulary(w)),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const w=this.opts.$data?this.$dataMetaSchema(i,c):i;this.addMetaSchema(w,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}t.Ajv=d,e.exports=t=d,e.exports.Ajv=d,Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var f=ig();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var m=gt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return m._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return m.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return m.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return m.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return m.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return m.CodeGen}});var p=X1();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var g=cg();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return g.default}})})(Ch,Ch.exports)),Ch.exports}var Vee=gP();const Fee=Za(Vee);var fp={exports:{}},B0={},wC;function Bee(){return wC||(wC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(V,G){return{validate:V,compare:G}}e.fullFormats={date:t(i,c),time:t(d(!0),f),"date-time":t(g(!0),y),"iso-time":t(d(),m),"iso-date-time":t(g(),w),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:E,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:W,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:T,int32:{type:"number",validate:I},int64:{type:"number",validate:N},float:{type:"number",validate:P},double:{type:"number",validate:P},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,c),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,y),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,w),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(V){return V%4===0&&(V%100!==0||V%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,a=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(V){const G=r.exec(V);if(!G)return!1;const U=+G[1],J=+G[2],le=+G[3];return J>=1&&J<=12&&le>=1&&le<=(J===2&&n(U)?29:a[J])}function c(V,G){if(V&&G)return V>G?1:V<G?-1:0}const u=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function d(V){return function(U){const J=u.exec(U);if(!J)return!1;const le=+J[1],F=+J[2],Y=+J[3],ie=J[4],fe=J[5]==="-"?-1:1,K=+(J[6]||0),D=+(J[7]||0);if(K>23||D>59||V&&!ie)return!1;if(le<=23&&F<=59&&Y<60)return!0;const q=F-D*fe,B=le-K*fe-(q<0?1:0);return(B===23||B===-1)&&(q===59||q===-1)&&Y<61}}function f(V,G){if(!(V&&G))return;const U=new Date("2020-01-01T"+V).valueOf(),J=new Date("2020-01-01T"+G).valueOf();if(U&&J)return U-J}function m(V,G){if(!(V&&G))return;const U=u.exec(V),J=u.exec(G);if(U&&J)return V=U[1]+U[2]+U[3],G=J[1]+J[2]+J[3],V>G?1:V<G?-1:0}const p=/t|\s/i;function g(V){const G=d(V);return function(J){const le=J.split(p);return le.length===2&&i(le[0])&&G(le[1])}}function y(V,G){if(!(V&&G))return;const U=new Date(V).valueOf(),J=new Date(G).valueOf();if(U&&J)return U-J}function w(V,G){if(!(V&&G))return;const[U,J]=V.split(p),[le,F]=G.split(p),Y=c(U,le);if(Y!==void 0)return Y||f(J,F)}const S=/\/|:/,b=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function E(V){return S.test(V)&&b.test(V)}const R=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function T(V){return R.lastIndex=0,R.test(V)}const O=-2147483648,C=2**31-1;function I(V){return Number.isInteger(V)&&V<=C&&V>=O}function N(V){return Number.isInteger(V)}function P(){return!0}const $=/[^\\]\\Z/;function W(V){if($.test(V))return!1;try{return new RegExp(V),!0}catch{return!1}}})(B0)),B0}var q0={},SC;function qee(){return SC||(SC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=gP(),n=gt(),r=n.operators,a={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},i={message:({keyword:u,schemaCode:d})=>(0,n.str)`should be ${a[u].okStr} ${d}`,params:({keyword:u,schemaCode:d})=>(0,n._)`{comparison: ${a[u].okStr}, limit: ${d}}`};e.formatLimitDefinition={keyword:Object.keys(a),type:"string",schemaType:"string",$data:!0,error:i,code(u){const{gen:d,data:f,schemaCode:m,keyword:p,it:g}=u,{opts:y,self:w}=g;if(!y.validateFormats)return;const S=new t.KeywordCxt(g,w.RULES.all.format.definition,"format");S.$data?b():E();function b(){const T=d.scopeValue("formats",{ref:w.formats,code:y.code.formats}),O=d.const("fmt",(0,n._)`${T}[${S.schemaCode}]`);u.fail$data((0,n.or)((0,n._)`typeof ${O} != "object"`,(0,n._)`${O} instanceof RegExp`,(0,n._)`typeof ${O}.compare != "function"`,R(O)))}function E(){const T=S.schema,O=w.formats[T];if(!O||O===!0)return;if(typeof O!="object"||O instanceof RegExp||typeof O.compare!="function")throw new Error(`"${p}": format "${T}" does not define "compare" function`);const C=d.scopeValue("formats",{key:T,ref:O,code:y.code.formats?(0,n._)`${y.code.formats}${(0,n.getProperty)(T)}`:void 0});u.fail$data(R(C))}function R(T){return(0,n._)`${T}.compare(${f}, ${m}) ${a[p].fail} 0`}},dependencies:["format"]};const c=u=>(u.addKeyword(e.formatLimitDefinition),u);e.default=c})(q0)),q0}var EC;function Hee(){return EC||(EC=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=Bee(),r=qee(),a=gt(),i=new a.Name("fullFormats"),c=new a.Name("fastFormats"),u=(f,m={keywords:!0})=>{if(Array.isArray(m))return d(f,m,n.fullFormats,i),f;const[p,g]=m.mode==="fast"?[n.fastFormats,c]:[n.fullFormats,i],y=m.formats||n.formatNames;return d(f,y,p,g),m.keywords&&(0,r.default)(f),f};u.get=(f,m="full")=>{const g=(m==="fast"?n.fastFormats:n.fullFormats)[f];if(!g)throw new Error(`Unknown format "${f}"`);return g};function d(f,m,p,g){var y,w;(y=(w=f.opts.code).formats)!==null&&y!==void 0||(w.formats=(0,a._)`require("ajv-formats/dist/formats").${g}`);for(const S of m)f.addFormat(S,p[S])}e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u})(fp,fp.exports)),fp.exports}var Gee=Hee();const Zee=Za(Gee);function Wee(){const e=new Fee({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return Zee(e),e}class Kee{constructor(t){this._ajv=t??Wee()}getValidator(t){const n="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return r=>n(r)?{valid:!0,data:r,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(n.errors)}}}class Yee{constructor(t){this._client=t}async*callToolStream(t,n=og,r){const a=this._client,i={...r,task:r?.task??(a.isToolTask(t.name)?{}:void 0)},c=a.requestStream({method:"tools/call",params:t},n,i),u=a.getToolOutputValidator(t.name);for await(const d of c){if(d.type==="result"&&u){const f=d.result;if(!f.structuredContent&&!f.isError){yield{type:"error",error:new Qe(nt.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`)};return}if(f.structuredContent)try{const m=u(f.structuredContent);if(!m.valid){yield{type:"error",error:new Qe(nt.InvalidParams,`Structured content does not match the tool's output schema: ${m.errorMessage}`)};return}}catch(m){if(m instanceof Qe){yield{type:"error",error:m};return}yield{type:"error",error:new Qe(nt.InvalidParams,`Failed to validate structured content: ${m instanceof Error?m.message:String(m)}`)};return}}yield d}}async getTask(t,n){return this._client.getTask({taskId:t},n)}async getTaskResult(t,n,r){return this._client.getTaskResult({taskId:t},n,r)}async listTasks(t,n){return this._client.listTasks(t?{cursor:t}:void 0,n)}async cancelTask(t,n){return this._client.cancelTask({taskId:t},n)}requestStream(t,n,r){return this._client.requestStream(t,n,r)}}function Qee(e,t,n){if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${n} does not support task creation for tools/call (required for ${t})`);break}}function Xee(e,t,n){if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${n} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${n} does not support task creation for elicitation/create (required for ${t})`);break}}function xp(e,t){if(!(!e||t===null||typeof t!="object")){if(e.type==="object"&&e.properties&&typeof e.properties=="object"){const n=t,r=e.properties;for(const a of Object.keys(r)){const i=r[a];n[a]===void 0&&Object.prototype.hasOwnProperty.call(i,"default")&&(n[a]=i.default),n[a]!==void 0&&xp(i,n[a])}}if(Array.isArray(e.anyOf))for(const n of e.anyOf)typeof n!="boolean"&&xp(n,t);if(Array.isArray(e.oneOf))for(const n of e.oneOf)typeof n!="boolean"&&xp(n,t)}}function vP(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};const t=e.form!==void 0,n=e.url!==void 0;return{supportsFormMode:t||!t&&!n,supportsUrlMode:n}}let yP=class extends DJ{constructor(t,n){super(n),this._clientInfo=t,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=n?.capabilities??{},this._jsonSchemaValidator=n?.jsonSchemaValidator??new Kee,n?.listChanged&&(this._pendingListChangedConfig=n.listChanged)}_setupListChangedHandlers(t){t.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",tP,t.tools,async()=>(await this.listTools()).tools),t.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",JM,t.prompts,async()=>(await this.listPrompts()).prompts),t.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",YM,t.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new Yee(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=LJ(this._capabilities,t)}setRequestHandler(t,n){const a=DM(t)?.method;if(!a)throw new Error("Schema is missing a method literal");let i;if(eg(a)){const u=a;i=u._zod?.def?.value??u.value}else{const u=a;i=u._def?.value??u.value}if(typeof i!="string")throw new Error("Schema method literal must be a string");const c=i;if(c==="elicitation/create"){const u=async(d,f)=>{const m=Is(sP,d);if(!m.success){const R=m.error instanceof Error?m.error.message:String(m.error);throw new Qe(nt.InvalidParams,`Invalid elicitation request: ${R}`)}const{params:p}=m.data;p.mode=p.mode??"form";const{supportsFormMode:g,supportsUrlMode:y}=vP(this._capabilities.elicitation);if(p.mode==="form"&&!g)throw new Qe(nt.InvalidParams,"Client does not support form-mode elicitation requests");if(p.mode==="url"&&!y)throw new Qe(nt.InvalidParams,"Client does not support URL-mode elicitation requests");const w=await Promise.resolve(n(d,f));if(p.task){const R=Is(pd,w);if(!R.success){const T=R.error instanceof Error?R.error.message:String(R.error);throw new Qe(nt.InvalidParams,`Invalid task creation result: ${T}`)}return R.data}const S=Is(iP,w);if(!S.success){const R=S.error instanceof Error?S.error.message:String(S.error);throw new Qe(nt.InvalidParams,`Invalid elicitation result: ${R}`)}const b=S.data,E=p.mode==="form"?p.requestedSchema:void 0;if(p.mode==="form"&&b.action==="accept"&&b.content&&E&&this._capabilities.elicitation?.form?.applyDefaults)try{xp(E,b.content)}catch{}return b};return super.setRequestHandler(t,u)}if(c==="sampling/createMessage"){const u=async(d,f)=>{const m=Is(rP,d);if(!m.success){const b=m.error instanceof Error?m.error.message:String(m.error);throw new Qe(nt.InvalidParams,`Invalid sampling request: ${b}`)}const{params:p}=m.data,g=await Promise.resolve(n(d,f));if(p.task){const b=Is(pd,g);if(!b.success){const E=b.error instanceof Error?b.error.message:String(b.error);throw new Qe(nt.InvalidParams,`Invalid task creation result: ${E}`)}return b.data}const w=p.tools||p.toolChoice?aP:oP,S=Is(w,g);if(!S.success){const b=S.error instanceof Error?S.error.message:String(S.error);throw new Qe(nt.InvalidParams,`Invalid sampling result: ${b}`)}return S.data};return super.setRequestHandler(t,u)}return super.setRequestHandler(t,n)}assertCapability(t,n){if(!this._serverCapabilities?.[t])throw new Error(`Server does not support ${t} (required for ${n})`)}async connect(t,n){if(await super.connect(t),t.sessionId===void 0)try{const r=await this.request({method:"initialize",params:{protocolVersion:tg,capabilities:this._capabilities,clientInfo:this._clientInfo}},VM,n);if(r===void 0)throw new Error(`Server sent invalid initialize result: ${r}`);if(!nX.includes(r.protocolVersion))throw new Error(`Server's protocol version is not supported: ${r.protocolVersion}`);this._serverCapabilities=r.capabilities,this._serverVersion=r.serverInfo,t.setProtocolVersion&&t.setProtocolVersion(r.protocolVersion),this._instructions=r.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(r){throw this.close(),r}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(t){switch(t){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`Server does not support resources (required for ${t})`);if(t==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${t})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${t})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${t})`);break}}assertNotificationCapability(t){switch(t){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${t})`);break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${t})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${t})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${t})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${t})`);break}}assertTaskCapability(t){Qee(this._serverCapabilities?.tasks?.requests,t,"Server")}assertTaskHandlerCapability(t){this._capabilities&&Xee(this._capabilities.tasks?.requests,t,"Client")}async ping(t){return this.request({method:"ping"},Qc,t)}async complete(t,n){return this.request({method:"completion/complete",params:t},cP,n)}async setLoggingLevel(t,n){return this.request({method:"logging/setLevel",params:{level:t}},Qc,n)}async getPrompt(t,n){return this.request({method:"prompts/get",params:t},XM,n)}async listPrompts(t,n){return this.request({method:"prompts/list",params:t},QM,n)}async listResources(t,n){return this.request({method:"resources/list",params:t},ZM,n)}async listResourceTemplates(t,n){return this.request({method:"resources/templates/list",params:t},WM,n)}async readResource(t,n){return this.request({method:"resources/read",params:t},KM,n)}async subscribeResource(t,n){return this.request({method:"resources/subscribe",params:t},Qc,n)}async unsubscribeResource(t,n){return this.request({method:"resources/unsubscribe",params:t},Qc,n)}async callTool(t,n=og,r){if(this.isToolTaskRequired(t.name))throw new Qe(nt.InvalidRequest,`Tool "${t.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);const a=await this.request({method:"tools/call",params:t},n,r),i=this.getToolOutputValidator(t.name);if(i){if(!a.structuredContent&&!a.isError)throw new Qe(nt.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`);if(a.structuredContent)try{const c=i(a.structuredContent);if(!c.valid)throw new Qe(nt.InvalidParams,`Structured content does not match the tool's output schema: ${c.errorMessage}`)}catch(c){throw c instanceof Qe?c:new Qe(nt.InvalidParams,`Failed to validate structured content: ${c instanceof Error?c.message:String(c)}`)}}return a}isToolTask(t){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(t):!1}isToolTaskRequired(t){return this._cachedRequiredTaskTools.has(t)}cacheToolMetadata(t){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(const n of t){if(n.outputSchema){const a=this._jsonSchemaValidator.getValidator(n.outputSchema);this._cachedToolOutputValidators.set(n.name,a)}const r=n.execution?.taskSupport;(r==="required"||r==="optional")&&this._cachedKnownTaskTools.add(n.name),r==="required"&&this._cachedRequiredTaskTools.add(n.name)}}getToolOutputValidator(t){return this._cachedToolOutputValidators.get(t)}async listTools(t,n){const r=await this.request({method:"tools/list",params:t},Q1,n);return this.cacheToolMetadata(r.tools),r}_setupListChangedHandler(t,n,r,a){const i=YX.safeParse(r);if(!i.success)throw new Error(`Invalid ${t} listChanged options: ${i.error.message}`);if(typeof r.onChanged!="function")throw new Error(`Invalid ${t} listChanged options: onChanged must be a function`);const{autoRefresh:c,debounceMs:u}=i.data,{onChanged:d}=r,f=async()=>{if(!c){d(null,null);return}try{const p=await a();d(null,p)}catch(p){const g=p instanceof Error?p:new Error(String(p));d(g,null)}},m=()=>{if(u){const p=this._listChangedDebounceTimers.get(t);p&&clearTimeout(p);const g=setTimeout(f,u);this._listChangedDebounceTimers.set(t,g)}else f()};this.setNotificationHandler(n,m)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};const dae=Object.freeze(Object.defineProperty({__proto__:null,Client:yP,getSupportedElicitationModes:vP},Symbol.toStringTag,{value:"Module"}));class RC extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}}function H0(e){}function _P(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=H0,onError:n=H0,onRetry:r=H0,onComment:a}=e;let i="",c=!0,u,d="",f="";function m(S){const b=c?S.replace(/^\xEF\xBB\xBF/,""):S,[E,R]=Jee(`${i}${b}`);for(const T of E)p(T);i=R,c=!1}function p(S){if(S===""){y();return}if(S.startsWith(":")){a&&a(S.slice(S.startsWith(": ")?2:1));return}const b=S.indexOf(":");if(b!==-1){const E=S.slice(0,b),R=S[b+1]===" "?2:1,T=S.slice(b+R);g(E,T,S);return}g(S,"",S)}function g(S,b,E){switch(S){case"event":f=b;break;case"data":d=`${d}${b}
171
- `;break;case"id":u=b.includes("\0")?void 0:b;break;case"retry":/^\d+$/.test(b)?r(parseInt(b,10)):n(new RC(`Invalid \`retry\` value: "${b}"`,{type:"invalid-retry",value:b,line:E}));break;default:n(new RC(`Unknown field "${S.length>20?`${S.slice(0,20)}…`:S}"`,{type:"unknown-field",field:S,value:b,line:E}));break}}function y(){d.length>0&&t({id:u,event:f||void 0,data:d.endsWith(`
172
- `)?d.slice(0,-1):d}),u=void 0,d="",f=""}function w(S={}){i&&S.consume&&p(i),c=!0,u=void 0,d="",f="",i=""}return{feed:m,reset:w}}function Jee(e){const t=[];let n="",r=0;for(;r<e.length;){const a=e.indexOf("\r",r),i=e.indexOf(`
173
- `,r);let c=-1;if(a!==-1&&i!==-1?c=Math.min(a,i):a!==-1?a===e.length-1?c=-1:c=a:i!==-1&&(c=i),c===-1){n=e.slice(r);break}else{const u=e.slice(r,c);t.push(u),r=c+1,e[r-1]==="\r"&&e[r]===`
174
- `&&r++}}return[t,n]}class xC extends Event{constructor(t,n){var r,a;super(t),this.code=(r=n?.code)!=null?r:void 0,this.message=(a=n?.message)!=null?a:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(TC(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(TC(this),n)}}function ete(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function q_(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(q_).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${q_(e.cause)}`:e.message:`${e}`}function TC(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var bP=e=>{throw TypeError(e)},tw=(e,t,n)=>t.has(e)||bP("Cannot "+n),wt=(e,t,n)=>(tw(e,t,"read from private field"),n?n.call(e):t.get(e)),zn=(e,t,n)=>t.has(e)?bP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ln=(e,t,n,r)=>(tw(e,t,"write to private field"),t.set(e,n),n),Va=(e,t,n)=>(tw(e,t,"access private method"),n),$r,Oi,Hc,Tp,hm,Qu,Xc,Xu,Ms,Gc,il,Zc,$u,jo,H_,G_,Z_,OC,W_,K_,Uu,Y_,Q_;class Op extends EventTarget{constructor(t,n){var r,a;super(),zn(this,jo),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,zn(this,$r),zn(this,Oi),zn(this,Hc),zn(this,Tp),zn(this,hm),zn(this,Qu),zn(this,Xc),zn(this,Xu,null),zn(this,Ms),zn(this,Gc),zn(this,il,null),zn(this,Zc,null),zn(this,$u,null),zn(this,G_,async i=>{var c;wt(this,Gc).reset();const{body:u,redirected:d,status:f,headers:m}=i;if(f===204){Va(this,jo,Uu).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(d?ln(this,Hc,new URL(i.url)):ln(this,Hc,void 0),f!==200){Va(this,jo,Uu).call(this,`Non-200 status code (${f})`,f);return}if(!(m.get("content-type")||"").startsWith("text/event-stream")){Va(this,jo,Uu).call(this,'Invalid content type, expected "text/event-stream"',f);return}if(wt(this,$r)===this.CLOSED)return;ln(this,$r,this.OPEN);const p=new Event("open");if((c=wt(this,$u))==null||c.call(this,p),this.dispatchEvent(p),typeof u!="object"||!u||!("getReader"in u)){Va(this,jo,Uu).call(this,"Invalid response body, expected a web ReadableStream",f),this.close();return}const g=new TextDecoder,y=u.getReader();let w=!0;do{const{done:S,value:b}=await y.read();b&&wt(this,Gc).feed(g.decode(b,{stream:!S})),S&&(w=!1,wt(this,Gc).reset(),Va(this,jo,Y_).call(this))}while(w)}),zn(this,Z_,i=>{ln(this,Ms,void 0),!(i.name==="AbortError"||i.type==="aborted")&&Va(this,jo,Y_).call(this,q_(i))}),zn(this,W_,i=>{typeof i.id=="string"&&ln(this,Xu,i.id);const c=new MessageEvent(i.event||"message",{data:i.data,origin:wt(this,Hc)?wt(this,Hc).origin:wt(this,Oi).origin,lastEventId:i.id||""});wt(this,Zc)&&(!i.event||i.event==="message")&&wt(this,Zc).call(this,c),this.dispatchEvent(c)}),zn(this,K_,i=>{ln(this,Qu,i)}),zn(this,Q_,()=>{ln(this,Xc,void 0),wt(this,$r)===this.CONNECTING&&Va(this,jo,H_).call(this)});try{if(t instanceof URL)ln(this,Oi,t);else if(typeof t=="string")ln(this,Oi,new URL(t,tte()));else throw new Error("Invalid URL")}catch{throw ete("An invalid or illegal string was specified")}ln(this,Gc,_P({onEvent:wt(this,W_),onRetry:wt(this,K_)})),ln(this,$r,this.CONNECTING),ln(this,Qu,3e3),ln(this,hm,(r=n?.fetch)!=null?r:globalThis.fetch),ln(this,Tp,(a=n?.withCredentials)!=null?a:!1),Va(this,jo,H_).call(this)}get readyState(){return wt(this,$r)}get url(){return wt(this,Oi).href}get withCredentials(){return wt(this,Tp)}get onerror(){return wt(this,il)}set onerror(t){ln(this,il,t)}get onmessage(){return wt(this,Zc)}set onmessage(t){ln(this,Zc,t)}get onopen(){return wt(this,$u)}set onopen(t){ln(this,$u,t)}addEventListener(t,n,r){const a=n;super.addEventListener(t,a,r)}removeEventListener(t,n,r){const a=n;super.removeEventListener(t,a,r)}close(){wt(this,Xc)&&clearTimeout(wt(this,Xc)),wt(this,$r)!==this.CLOSED&&(wt(this,Ms)&&wt(this,Ms).abort(),ln(this,$r,this.CLOSED),ln(this,Ms,void 0))}}$r=new WeakMap,Oi=new WeakMap,Hc=new WeakMap,Tp=new WeakMap,hm=new WeakMap,Qu=new WeakMap,Xc=new WeakMap,Xu=new WeakMap,Ms=new WeakMap,Gc=new WeakMap,il=new WeakMap,Zc=new WeakMap,$u=new WeakMap,jo=new WeakSet,H_=function(){ln(this,$r,this.CONNECTING),ln(this,Ms,new AbortController),wt(this,hm)(wt(this,Oi),Va(this,jo,OC).call(this)).then(wt(this,G_)).catch(wt(this,Z_))},G_=new WeakMap,Z_=new WeakMap,OC=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...wt(this,Xu)?{"Last-Event-ID":wt(this,Xu)}:void 0},cache:"no-store",signal:(e=wt(this,Ms))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},W_=new WeakMap,K_=new WeakMap,Uu=function(e,t){var n;wt(this,$r)!==this.CLOSED&&ln(this,$r,this.CLOSED);const r=new xC("error",{code:t,message:e});(n=wt(this,il))==null||n.call(this,r),this.dispatchEvent(r)},Y_=function(e,t){var n;if(wt(this,$r)===this.CLOSED)return;ln(this,$r,this.CONNECTING);const r=new xC("error",{code:t,message:e});(n=wt(this,il))==null||n.call(this,r),this.dispatchEvent(r),ln(this,Xc,setTimeout(wt(this,Q_),wt(this,Qu)))},Q_=new WeakMap,Op.CONNECTING=0,Op.OPEN=1,Op.CLOSED=2;function tte(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}function pm(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function wP(e=fetch,t){return t?async(n,r)=>{const a={...t,...r,headers:r?.headers?{...pm(t.headers),...pm(r.headers)}:t.headers};return e(n,a)}:e}let nw;nw=globalThis.crypto;async function nte(e){return(await nw).getRandomValues(new Uint8Array(e))}async function rte(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",n=Math.pow(2,8)-Math.pow(2,8)%t.length;let r="";for(;r.length<e;){const a=await nte(e-r.length);for(const i of a)i<n&&(r+=t[i%t.length])}return r}async function ote(e){return await rte(e)}async function ate(e){const t=await(await nw).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function ste(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await ote(e),n=await ate(t);return{code_verifier:t,code_challenge:n}}const rr=jU().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Oz.custom,message:"URL must be parseable",fatal:!0}),z$}).refine(e=>{const t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),ite=ar({resource:M().url(),authorization_servers:ye(rr).optional(),jwks_uri:M().url().optional(),scopes_supported:ye(M()).optional(),bearer_methods_supported:ye(M()).optional(),resource_signing_alg_values_supported:ye(M()).optional(),resource_name:M().optional(),resource_documentation:M().optional(),resource_policy_uri:M().url().optional(),resource_tos_uri:M().url().optional(),tls_client_certificate_bound_access_tokens:et().optional(),authorization_details_types_supported:ye(M()).optional(),dpop_signing_alg_values_supported:ye(M()).optional(),dpop_bound_access_tokens_required:et().optional()}),SP=ar({issuer:M(),authorization_endpoint:rr,token_endpoint:rr,registration_endpoint:rr.optional(),scopes_supported:ye(M()).optional(),response_types_supported:ye(M()),response_modes_supported:ye(M()).optional(),grant_types_supported:ye(M()).optional(),token_endpoint_auth_methods_supported:ye(M()).optional(),token_endpoint_auth_signing_alg_values_supported:ye(M()).optional(),service_documentation:rr.optional(),revocation_endpoint:rr.optional(),revocation_endpoint_auth_methods_supported:ye(M()).optional(),revocation_endpoint_auth_signing_alg_values_supported:ye(M()).optional(),introspection_endpoint:M().optional(),introspection_endpoint_auth_methods_supported:ye(M()).optional(),introspection_endpoint_auth_signing_alg_values_supported:ye(M()).optional(),code_challenge_methods_supported:ye(M()).optional(),client_id_metadata_document_supported:et().optional()}),cte=ar({issuer:M(),authorization_endpoint:rr,token_endpoint:rr,userinfo_endpoint:rr.optional(),jwks_uri:rr,registration_endpoint:rr.optional(),scopes_supported:ye(M()).optional(),response_types_supported:ye(M()),response_modes_supported:ye(M()).optional(),grant_types_supported:ye(M()).optional(),acr_values_supported:ye(M()).optional(),subject_types_supported:ye(M()),id_token_signing_alg_values_supported:ye(M()),id_token_encryption_alg_values_supported:ye(M()).optional(),id_token_encryption_enc_values_supported:ye(M()).optional(),userinfo_signing_alg_values_supported:ye(M()).optional(),userinfo_encryption_alg_values_supported:ye(M()).optional(),userinfo_encryption_enc_values_supported:ye(M()).optional(),request_object_signing_alg_values_supported:ye(M()).optional(),request_object_encryption_alg_values_supported:ye(M()).optional(),request_object_encryption_enc_values_supported:ye(M()).optional(),token_endpoint_auth_methods_supported:ye(M()).optional(),token_endpoint_auth_signing_alg_values_supported:ye(M()).optional(),display_values_supported:ye(M()).optional(),claim_types_supported:ye(M()).optional(),claims_supported:ye(M()).optional(),service_documentation:M().optional(),claims_locales_supported:ye(M()).optional(),ui_locales_supported:ye(M()).optional(),claims_parameter_supported:et().optional(),request_parameter_supported:et().optional(),request_uri_parameter_supported:et().optional(),require_request_uri_registration:et().optional(),op_policy_uri:rr.optional(),op_tos_uri:rr.optional(),client_id_metadata_document_supported:et().optional()}),lte=ae({...cte.shape,...SP.pick({code_challenge_methods_supported:!0}).shape}),ute=ae({access_token:M(),id_token:M().optional(),token_type:M(),expires_in:uN().optional(),scope:M().optional(),refresh_token:M().optional()}).strip(),dte=ae({error:M(),error_description:M().optional(),error_uri:M().optional()}),CC=rr.optional().or(De("").transform(()=>{})),fte=ae({redirect_uris:ye(rr),token_endpoint_auth_method:M().optional(),grant_types:ye(M()).optional(),response_types:ye(M()).optional(),client_name:M().optional(),client_uri:rr.optional(),logo_uri:CC,scope:M().optional(),contacts:ye(M()).optional(),tos_uri:CC,policy_uri:M().optional(),jwks_uri:rr.optional(),jwks:eo().optional(),software_id:M().optional(),software_version:M().optional(),software_statement:M().optional()}).strip(),hte=ae({client_id:M(),client_secret:M().optional(),client_id_issued_at:Pe().optional(),client_secret_expires_at:Pe().optional()}).strip(),pte=fte.merge(hte);ae({error:M(),error_description:M().optional()}).strip();ae({token:M(),token_type_hint:M().optional()}).strip();function mte(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function gte({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class Kn extends Error{constructor(t,n){super(t),this.errorUri=n,this.name=this.constructor.name}toResponseObject(){const t={error:this.errorCode,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}get errorCode(){return this.constructor.errorCode}}class X_ extends Kn{}X_.errorCode="invalid_request";class mm extends Kn{}mm.errorCode="invalid_client";class gm extends Kn{}gm.errorCode="invalid_grant";class vm extends Kn{}vm.errorCode="unauthorized_client";class J_ extends Kn{}J_.errorCode="unsupported_grant_type";class eb extends Kn{}eb.errorCode="invalid_scope";class tb extends Kn{}tb.errorCode="access_denied";class ml extends Kn{}ml.errorCode="server_error";class nb extends Kn{}nb.errorCode="temporarily_unavailable";class rb extends Kn{}rb.errorCode="unsupported_response_type";class ob extends Kn{}ob.errorCode="unsupported_token_type";class ab extends Kn{}ab.errorCode="invalid_token";class sb extends Kn{}sb.errorCode="method_not_allowed";class ib extends Kn{}ib.errorCode="too_many_requests";class ym extends Kn{}ym.errorCode="invalid_client_metadata";class cb extends Kn{}cb.errorCode="insufficient_scope";class lb extends Kn{}lb.errorCode="invalid_target";const vte={[X_.errorCode]:X_,[mm.errorCode]:mm,[gm.errorCode]:gm,[vm.errorCode]:vm,[J_.errorCode]:J_,[eb.errorCode]:eb,[tb.errorCode]:tb,[ml.errorCode]:ml,[nb.errorCode]:nb,[rb.errorCode]:rb,[ob.errorCode]:ob,[ab.errorCode]:ab,[sb.errorCode]:sb,[ib.errorCode]:ib,[ym.errorCode]:ym,[cb.errorCode]:cb,[lb.errorCode]:lb};class Uo extends Error{constructor(t){super(t??"Unauthorized")}}function yte(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const G0="code",Z0="S256";function _te(e,t){const n=e.client_secret!==void 0;return t.length===0?n?"client_secret_post":"none":"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&yte(e.token_endpoint_auth_method)&&t.includes(e.token_endpoint_auth_method)?e.token_endpoint_auth_method:n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function bte(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":wte(a,i,n);return;case"client_secret_post":Ste(a,i,r);return;case"none":Ete(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function wte(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function Ste(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function Ete(e,t){t.set("client_id",e)}async function EP(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=dte.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:c}=r,u=vte[a]||ml;return new u(i||"",c)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new ml(a)}}async function Ni(e,t){try{return await W0(e,t)}catch(n){if(n instanceof mm||n instanceof vm)return await e.invalidateCredentials?.("all"),await W0(e,t);if(n instanceof gm)return await e.invalidateCredentials?.("tokens"),await W0(e,t);throw n}}async function W0(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){let c,u;try{c=await Tte(t,{resourceMetadataUrl:a},i),c.authorization_servers&&c.authorization_servers.length>0&&(u=c.authorization_servers[0])}catch{}u||(u=new URL("/",t));const d=await xte(t,e,c),f=await Nte(u,{fetchFn:i});let m=await Promise.resolve(e.clientInformation());if(!m){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const b=f?.client_id_metadata_document_supported===!0,E=e.clientMetadataUrl;if(E&&!Rte(E))throw new ym(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${E}`);if(b&&E)m={client_id:E},await e.saveClientInformation?.(m);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const T=await Dte(u,{metadata:f,clientMetadata:e.clientMetadata,fetchFn:i});await e.saveClientInformation(T),m=T}}const p=!e.redirectUrl;if(n!==void 0||p){const b=await Pte(e,u,{metadata:f,resource:d,authorizationCode:n,fetchFn:i});return await e.saveTokens(b),"AUTHORIZED"}const g=await e.tokens();if(g?.refresh_token)try{const b=await Mte(u,{metadata:f,clientInformation:m,refreshToken:g.refresh_token,resource:d,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(b),"AUTHORIZED"}catch(b){if(!(!(b instanceof Kn)||b instanceof ml))throw b}const y=e.state?await e.state():void 0,{authorizationUrl:w,codeVerifier:S}=await kte(u,{metadata:f,clientInformation:m,state:y,redirectUrl:e.redirectUrl,scope:r||c?.scopes_supported?.join(" ")||e.clientMetadata.scope,resource:d});return await e.saveCodeVerifier(S),await e.redirectToAuthorization(w),"REDIRECT"}function Rte(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function xte(e,t,n){const r=mte(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!gte({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function _m(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=K0(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const c=K0(e,"scope")||void 0,u=K0(e,"error")||void 0;return{resourceMetadataUrl:i,scope:c,error:u}}function K0(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function Tte(e,t,n=fetch){const r=await Ate(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return ite.parse(await r.json())}async function rw(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?rw(e,void 0,n):void 0;throw r}}function Ote(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function AC(e,t,n=fetch){return await rw(e,{"MCP-Protocol-Version":t},n)}function Cte(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function Ate(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??tg;let c;if(r?.metadataUrl)c=new URL(r.metadataUrl);else{const d=Ote(t,a.pathname);c=new URL(d,r?.metadataServerUrl??a),c.search=a.search}let u=await AC(c,i,n);if(!r?.metadataUrl&&Cte(u,a.pathname)){const d=new URL(`/.well-known/${t}`,a);u=await AC(d,i,n)}return u}function Ite(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function Nte(e,{fetchFn:t=fetch,protocolVersion:n=tg}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=Ite(e);for(const{url:i,type:c}of a){const u=await rw(i,r,t);if(u){if(!u.ok){if(await u.body?.cancel(),u.status>=400&&u.status<500)continue;throw new Error(`HTTP ${u.status} trying to load ${c==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return c==="oauth"?SP.parse(await u.json()):lte.parse(await u.json())}}}async function kte(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:c}){let u;if(t){if(u=new URL(t.authorization_endpoint),!t.response_types_supported.includes(G0))throw new Error(`Incompatible auth server: does not support response type ${G0}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(Z0))throw new Error(`Incompatible auth server: does not support code challenge method ${Z0}`)}else u=new URL("/authorize",e);const d=await ste(),f=d.code_verifier,m=d.code_challenge;return u.searchParams.set("response_type",G0),u.searchParams.set("client_id",n.client_id),u.searchParams.set("code_challenge",m),u.searchParams.set("code_challenge_method",Z0),u.searchParams.set("redirect_uri",String(r)),i&&u.searchParams.set("state",i),a&&u.searchParams.set("scope",a),a?.includes("offline_access")&&u.searchParams.append("prompt","consent"),c&&u.searchParams.set("resource",c.href),{authorizationUrl:u,codeVerifier:f}}function RP(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function ow(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:c}){const u=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),d=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(d,n,u,t);else if(r){const m=t?.token_endpoint_auth_methods_supported??[],p=_te(r,m);bte(p,r,d,n)}const f=await(c??fetch)(u,{method:"POST",headers:d,body:n});if(!f.ok)throw await EP(f);return ute.parse(await f.json())}async function fae(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:c,addClientAuthentication:u,fetchFn:d}){const f=RP(r,a,i);return ow(e,{metadata:t,tokenRequestParams:f,clientInformation:n,addClientAuthentication:u,resource:c,fetchFn:d})}async function Mte(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:c}){const u=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),d=await ow(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:c});return{refresh_token:r,...d}}async function Pte(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const c=e.clientMetadata.scope;let u;if(e.prepareTokenRequest&&(u=await e.prepareTokenRequest(c)),!u){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const f=await e.codeVerifier();u=RP(a,f,e.redirectUrl)}const d=await e.clientInformation();return ow(t,{metadata:n,tokenRequestParams:u,clientInformation:d??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function Dte(e,{metadata:t,clientMetadata:n,fetchFn:r}){let a;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");a=new URL(t.registration_endpoint)}else a=new URL("/register",e);const i=await(r??fetch)(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!i.ok)throw await EP(i);return pte.parse(await i.json())}class Lte extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class jte{constructor(t,n){this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=n?.eventSourceInit,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=wP(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new Uo("No auth provider");let t;try{t=await Ni(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new Uo;return await this._startOrAuth()}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=pm(this._requestInit?.headers);return new Headers({...t,...n})}_startOrAuth(){const t=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new Op(this._url.href,{...this._eventSourceInit,fetch:async(a,i)=>{const c=await this._commonHeaders();c.set("Accept","text/event-stream");const u=await t(a,{...i,headers:c});if(u.status===401&&u.headers.has("www-authenticate")){const{resourceMetadataUrl:d,scope:f}=_m(u);this._resourceMetadataUrl=d,this._scope=f}return u}}),this._abortController=new AbortController,this._eventSource.onerror=a=>{if(a.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const i=new Lte(a.code,a.message,a);r(i),this.onerror?.(i)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",a=>{const i=a;try{if(this._endpoint=new URL(i.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(c){r(c),this.onerror?.(c),this.close();return}n()}),this._eventSource.onmessage=a=>{const i=a;let c;try{c=Yu.parse(JSON.parse(i.data))}catch(u){this.onerror?.(u);return}this.onmessage?.(c)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(t){if(!this._authProvider)throw new Uo("No auth provider");if(await Ni(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Uo("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(t){if(!this._endpoint)throw new Error("Not connected");try{const n=await this._commonHeaders();n.set("content-type","application/json");const r={...this._requestInit,method:"POST",headers:n,body:JSON.stringify(t),signal:this._abortController?.signal},a=await(this._fetch??fetch)(this._endpoint,r);if(!a.ok){const i=await a.text().catch(()=>null);if(a.status===401&&this._authProvider){const{resourceMetadataUrl:c,scope:u}=_m(a);if(this._resourceMetadataUrl=c,this._scope=u,await Ni(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Uo;return this.send(t)}throw new Error(`Error POSTing to endpoint (HTTP ${a.status}): ${i}`)}await a.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(t){this._protocolVersion=t}}const $te="mcp";class Ute{constructor(t){this._url=t}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,n)=>{this._socket=new WebSocket(this._url,$te),this._socket.onerror=r=>{const a="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(a),this.onerror?.(a)},this._socket.onopen=()=>{t()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let a;try{a=Yu.parse(JSON.parse(r.data))}catch(i){this.onerror?.(i);return}this.onmessage?.(a)}})}async close(){this._socket?.close()}send(t){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(t)),n()})}}class zte extends TransformStream{constructor({onError:t,onRetry:n,onComment:r}={}){let a;super({start(i){a=_P({onEvent:c=>{i.enqueue(c)},onError(c){t==="terminate"?i.error(c):typeof t=="function"&&t(c)},onRetry:n,onComment:r})},transform(i){a.feed(i)}})}}const Vte={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class Fc extends Error{constructor(t,n){super(`Streamable HTTP error: ${n}`),this.code=t}}let Fte=class{constructor(t,n){this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=wP(n?.fetch,n?.requestInit),this._sessionId=n?.sessionId,this._reconnectionOptions=n?.reconnectionOptions??Vte}async _authThenStart(){if(!this._authProvider)throw new Uo("No auth provider");let t;try{t=await Ni(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new Uo;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._sessionId&&(t["mcp-session-id"]=this._sessionId),this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=pm(this._requestInit?.headers);return new Headers({...t,...n})}async _startOrAuthSse(t){const{resumptionToken:n}=t;try{const r=await this._commonHeaders();r.set("Accept","text/event-stream"),n&&r.set("last-event-id",n);const a=await(this._fetch??fetch)(this._url,{method:"GET",headers:r,signal:this._abortController?.signal});if(!a.ok){if(await a.body?.cancel(),a.status===401&&this._authProvider)return await this._authThenStart();if(a.status===405)return;throw new Fc(a.status,`Failed to open SSE stream: ${a.statusText}`)}this._handleSseStream(a.body,t,!0)}catch(r){throw this.onerror?.(r),r}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const n=this._reconnectionOptions.initialReconnectionDelay,r=this._reconnectionOptions.reconnectionDelayGrowFactor,a=this._reconnectionOptions.maxReconnectionDelay;return Math.min(n*Math.pow(r,t),a)}_scheduleReconnection(t,n=0){const r=this._reconnectionOptions.maxRetries;if(n>=r){this.onerror?.(new Error(`Maximum reconnection attempts (${r}) exceeded.`));return}const a=this._getNextReconnectionDelay(n);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(i=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${i instanceof Error?i.message:String(i)}`)),this._scheduleReconnection(t,n+1)})},a)}_handleSseStream(t,n,r){if(!t)return;const{onresumptiontoken:a,replayMessageId:i}=n;let c,u=!1,d=!1;(async()=>{try{const m=t.pipeThrough(new TextDecoderStream).pipeThrough(new zte({onRetry:y=>{this._serverRetryMs=y}})).getReader();for(;;){const{value:y,done:w}=await m.read();if(w)break;if(y.id&&(c=y.id,u=!0,a?.(y.id)),!!y.data&&(!y.event||y.event==="message"))try{const S=Yu.parse(JSON.parse(y.data));ju(S)&&(d=!0,i!==void 0&&(S.id=i)),this.onmessage?.(S)}catch(S){this.onerror?.(S)}}(r||u)&&!d&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:c,onresumptiontoken:a,replayMessageId:i},0)}catch(m){if(this.onerror?.(new Error(`SSE stream disconnected: ${m}`)),(r||u)&&!d&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:c,onresumptiontoken:a,replayMessageId:i},0)}catch(y){this.onerror?.(new Error(`Failed to reconnect: ${y instanceof Error?y.message:String(y)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(t){if(!this._authProvider)throw new Uo("No auth provider");if(await Ni(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Uo("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(t,n){try{const{resumptionToken:r,onresumptiontoken:a}=n||{};if(r){this._startOrAuthSse({resumptionToken:r,replayMessageId:B_(t)?t.id:void 0}).catch(g=>this.onerror?.(g));return}const i=await this._commonHeaders();i.set("content-type","application/json"),i.set("accept","application/json, text/event-stream");const c={...this._requestInit,method:"POST",headers:i,body:JSON.stringify(t),signal:this._abortController?.signal},u=await(this._fetch??fetch)(this._url,c),d=u.headers.get("mcp-session-id");if(d&&(this._sessionId=d),!u.ok){const g=await u.text().catch(()=>null);if(u.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new Fc(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:y,scope:w}=_m(u);if(this._resourceMetadataUrl=y,this._scope=w,await Ni(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Uo;return this._hasCompletedAuthFlow=!0,this.send(t)}if(u.status===403&&this._authProvider){const{resourceMetadataUrl:y,scope:w,error:S}=_m(u);if(S==="insufficient_scope"){const b=u.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===b)throw new Fc(403,"Server returned 403 after trying upscoping");if(w&&(this._scope=w),y&&(this._resourceMetadataUrl=y),this._lastUpscopingHeader=b??void 0,await Ni(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new Uo;return this.send(t)}}throw new Fc(u.status,`Error POSTing to endpoint: ${g}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,u.status===202){await u.body?.cancel(),yX(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(g=>this.onerror?.(g));return}const m=(Array.isArray(t)?t:[t]).filter(g=>"method"in g&&"id"in g&&g.id!==void 0).length>0,p=u.headers.get("content-type");if(m)if(p?.includes("text/event-stream"))this._handleSseStream(u.body,{onresumptiontoken:a},!1);else if(p?.includes("application/json")){const g=await u.json(),y=Array.isArray(g)?g.map(w=>Yu.parse(w)):[Yu.parse(g)];for(const w of y)this.onmessage?.(w)}else throw await u.body?.cancel(),new Fc(-1,`Unexpected content type: ${p}`);else await u.body?.cancel()}catch(r){throw this.onerror?.(r),r}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const t=await this._commonHeaders(),n={...this._requestInit,method:"DELETE",headers:t,signal:this._abortController?.signal},r=await(this._fetch??fetch)(this._url,n);if(await r.body?.cancel(),!r.ok&&r.status!==405)throw new Fc(r.status,`Failed to terminate session: ${r.statusText}`);this._sessionId=void 0}catch(t){throw this.onerror?.(t),t}}setProtocolVersion(t){this._protocolVersion=t}get protocolVersion(){return this._protocolVersion}async resumeStream(t,n){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:n?.onresumptiontoken})}};class Bte extends Fte{constructor(t,n){super(t,n)}send(t,n){const r=qte(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function qte(e){const t=e;if(!t||typeof t!="object"||!("method"in t))return null;switch(t.method){case"initialize":{const n=t?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:t.jsonrpc??"2.0",id:t.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class Hte extends yP{constructor(t,n){super(t,n)}async listTools(t,n){return await this.request({method:"tools/list",params:t},Q1,n)}}const Gte=async(e,t,n)=>{const r=Zte(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const a=new Hte({name:e?.name??"MCP Client",version:"1.0.0"});return await a.connect(r),{client:a,callStreamableTool:(i,c,u)=>{if(e.connection.type!=="HTTP")throw new Error("HTTP connection required");const d=new Headers(n);d.has("Authorization")||d.set("Authorization",`Bearer ${e.connection.token}`);for(const[p,g]of Object.entries(e.connection.headers??{}))d.set(p,g);const f=new URL(e.connection.url),m=f.pathname.replace(/\/+$/,"")||"/";return f.pathname=`${m}/call-tool/${encodeURIComponent(i)}`,fetch(f.href,{method:"POST",redirect:"manual",body:JSON.stringify(c),headers:d,signal:u})}}},Zte=(e,t,n)=>{if(e.type==="Websocket")return new Ute(new URL(e.url));if(e.type!=="SSE"&&e.type!=="HTTP")return null;const a={...e.token?{authorization:`Bearer ${e.token}`}:{},...n??{},..."headers"in e?e.headers||{}:{}};if(e.type==="SSE"){const i={requestInit:{headers:a,signal:t}};return e.token&&(i.eventSourceInit={fetch:(c,u)=>fetch(c,{...u,headers:{...a,Accept:"text/event-stream"},signal:t})}),new jte(new URL(e.url),i)}return new Bte(new URL(e.url),{requestInit:{headers:a,signal:t,credentials:"include"}})},IC=e=>{try{return JSON.parse(e)}catch{return e}},hp=new Map,NC=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?mr(e.inputSchema):void 0,outputSchema:e.outputSchema?mr(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function Wte(e){const t=n=>"connection"in e?Gte({connection:e.connection},void 0,n):e.client;return new Proxy({},{get(n,r){if(r==="toJSON")return null;if(typeof r!="string")throw new Error("Name must be a string");if(r==="listTools")return u;async function a(d,f=r){const m=e?.debugId?.(),p=m?{"x-trace-debug-id":m}:void 0,{client:g,callStreamableTool:y}=await t(p);if(e?.streamable?.[String(f)]){if(!y)throw new Error(`Tool ${String(f)} requires streaming support but client doesn't provide callStreamableTool`);return await y(String(f),d)}const{structuredContent:w,isError:S,content:b}=await g.callTool({name:String(f),arguments:d});if(S){const R=b?.[0]?.text,T=typeof R=="string"?IC(R):null,O=T?.code&&typeof e?.getErrorByStatusCode=="function"?e.getErrorByStatusCode(T.code,T.message,T.traceId):null;throw O||new Error(`Tool ${String(f)} returned an error: ${JSON.stringify(w??b)}`)}if(w!==void 0)return w;const E=b?.[0]?.text;return typeof E=="string"?IC(E):void 0}async function i(){const{client:d}=await t(),{tools:f}=await d.listTools();return f}async function c(){if(!("connection"in e))return i();const d=e.connection,f=JSON.stringify(d);try{return hp.has(f)||hp.set(f,i()),await hp.get(f)}catch(m){console.error("Failed to list tools",m),hp.delete(f);return}}async function u(){return(await c()??[]).map(f=>NC(f,a))}return a.asTool=async()=>{const f=(await c()??[]).find(m=>m.name===r);if(!f)throw new Error(`Tool ${r} not found`);return NC(f,a)},a}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>Kte({connection:n}):global[t]}});function Kte(e){return Wte(e)}const lg=ae({id:M().describe("Unique identifier for the entity"),title:M().describe("Human-readable title for the entity"),description:M().nullish().describe("Description of the entity"),created_at:M().datetime(),updated_at:M().datetime(),created_by:M().optional(),updated_by:M().optional()}),Yte=ae({field:ye(M()),operator:Ot(["eq","gt","gte","lt","lte","in","like","contains"]),value:st()}),xP=xo(()=>yt([Yte,ae({operator:Ot(["and","or","not"]),conditions:ye(xP)})])),Qte=ae({field:ye(M()),direction:Ot(["asc","desc"]),nulls:Ot(["first","last"]).optional()}),Xte=ae({where:xP.optional().describe("Filter expression"),orderBy:ye(Qte).optional().describe("Sort expressions"),limit:Pe().int().min(1).max(1e3).optional().describe("Maximum number of items to return"),offset:Pe().int().min(0).optional().describe("Number of items to skip")});function Jte(e){return ae({items:ye(e).describe("Array of collection items"),totalCount:Pe().int().min(0).optional().describe("Total number of matching items (if available)"),hasMore:et().optional().describe("Whether there are more items available")})}const ene=ae({id:M().describe("ID of the entity to retrieve")});function tne(e){return ae({item:e.nullable().describe("The retrieved item, or null if not found")})}function nne(e){return ae({data:e.partial().describe("Data for the new entity (id may be auto-generated)")})}function rne(e){return ae({item:e.describe("The created entity with generated id")})}function one(e){return ae({id:M().describe("ID of the entity to update"),data:e.partial().describe("Partial entity data to update")})}function ane(e){return ae({item:e.describe("The updated entity")})}const sne=ae({id:M().describe("ID of the entity to delete")});function ine(e){return ae({item:e.describe("The deleted entity")})}function ug(e,t,n){const r=e.toUpperCase(),a=n?.readOnly??!1,i=[{name:`COLLECTION_${r}_LIST`,inputSchema:Xte,outputSchema:Jte(t)},{name:`COLLECTION_${r}_GET`,inputSchema:ene,outputSchema:tne(t)}];return a||i.push({name:`COLLECTION_${r}_CREATE`,inputSchema:nne(t),outputSchema:rne(t),opt:!0},{name:`COLLECTION_${r}_UPDATE`,inputSchema:one(t),outputSchema:ane(t),opt:!0},{name:`COLLECTION_${r}_DELETE`,inputSchema:sne,outputSchema:ine(t),opt:!0}),i}const cne=ae({id:M(),name:M(),description:M().optional(),inputSchema:ft(M(),st()),outputSchema:ft(M(),st()).optional()}),lne=lg.extend({_meta:ae({"io.decocms":ae({id:M(),verified:et(),scopeName:M(),appName:M(),friendlyName:M().nullable().optional(),metadata:ft(M(),st()).nullable().optional(),publishedAt:M().datetime().optional(),updatedAt:M().datetime().optional(),tools:ye(cne).nullable().optional().describe("Available tools exposed by this app")}).optional()}).optional(),server:ae({$schema:M().optional(),_meta:ft(M(),st()).optional(),name:M().describe("The server name (scope/app)"),title:M().optional().describe("User-friendly title"),description:M().optional().describe("Server description"),icons:ye(ae({src:M(),mimeType:M().optional(),sizes:ye(M()).optional(),theme:Ot(["light","dark"]).optional()})).optional(),remotes:ye(ae({type:Ot(["http","stdio","sse"]),url:M().optional(),headers:ye(st()).optional()})).optional(),packages:ye(st()).optional(),repository:ae({url:M(),source:M().optional(),subfolder:M().optional()}).optional(),version:M().optional(),websiteUrl:M().optional()})});ug("registry_app",lne,{readOnly:!0});const une=ae({specversion:De("1.0").describe("CloudEvents specification version"),id:M().describe("Unique identifier for this event (UUID recommended)"),source:M().describe("Connection ID of the event publisher"),type:M().describe("Event type (e.g., 'order.created', 'user.signup')"),time:M().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:M().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:M().optional().default("application/json").describe("Content type of the data attribute"),dataschema:M().url().optional().describe("URI to the schema for the data attribute"),data:st().optional().describe("Event payload (any JSON value)")});ae({events:ye(une).min(1).describe("Batch of CloudEvents to process")});const dne=ae({success:et().optional().describe("Whether this event was processed successfully"),error:M().optional().describe("Error message for this event"),retryAfter:Pe().int().positive().optional().describe("Re-deliver this event after this many ms")});ae({success:et().optional().describe("Batch success - applies to events not in results"),error:M().optional().describe("Batch error message - applies to events not in results"),processedCount:Pe().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:Pe().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:ft(M(),dne).optional().describe("Per-event results keyed by event ID")});ae({type:M().min(1).max(255).describe("Event type identifier"),subject:M().max(255).optional().describe("Subject/resource identifier (e.g., order ID)"),data:st().optional().describe("Event payload"),deliverAt:M().datetime().optional().describe("Scheduled delivery time (ISO 8601). Omit for immediate delivery."),cron:M().max(100).optional().describe("Cron expression for recurring delivery. Use EVENT_CANCEL to stop.")});ae({id:M().describe("Unique event ID"),type:M().describe("Event type"),source:M().describe("Source connection ID"),time:M().describe("Event timestamp")});ae({eventType:M().min(1).max(255).describe("Event type to subscribe to"),publisher:M().optional().describe("Filter events by publisher connection ID"),filter:M().max(1e3).optional().describe("JSONPath filter expression on event data")});ae({subscription:ae({id:M().describe("Subscription ID"),connectionId:M().describe("Subscriber connection ID"),eventType:M().describe("Event type pattern"),publisher:M().nullable().describe("Publisher connection filter"),filter:M().nullable().describe("JSONPath filter expression"),enabled:et().describe("Whether subscription is enabled"),createdAt:M().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:M().datetime().describe("Updated timestamp (ISO 8601)")})});const fne=ae({eventType:M().min(1).max(255).describe("Event type to subscribe to"),publisher:M().optional().describe("Filter events by publisher connection ID"),filter:M().max(1e3).optional().describe("JSONPath filter expression on event data")}),hne=ae({id:M().describe("Subscription ID"),connectionId:M().describe("Subscriber connection ID"),eventType:M().describe("Event type pattern"),publisher:M().nullable().describe("Publisher connection filter"),filter:M().nullable().describe("JSONPath filter expression"),enabled:et().describe("Whether subscription is enabled"),createdAt:M().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:M().datetime().describe("Updated timestamp (ISO 8601)")});ae({subscriptions:ye(fne).describe("Desired subscriptions - system will create/update/delete to match")});ae({created:Pe().int().min(0).describe("Number of subscriptions created"),updated:Pe().int().min(0).describe("Number of subscriptions with filter updated"),deleted:Pe().int().min(0).describe("Number of subscriptions removed"),unchanged:Pe().int().min(0).describe("Number of subscriptions unchanged"),subscriptions:ye(hne).describe("Current subscriptions after sync")});ae({subscriptionId:M().describe("Subscription ID to remove")});ae({success:et().describe("Whether unsubscribe was successful"),subscriptionId:M().describe("Subscription ID that was removed")});ae({eventId:M().describe("Event ID to cancel")});ae({success:et().describe("Whether cancellation was successful"),eventId:M().describe("Event ID that was cancelled")});ae({eventId:M().describe("Event ID to acknowledge")});ae({success:et().describe("Whether ACK was successful"),eventId:M().describe("Event ID that was acknowledged")});const pne=ae({prefix:M().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:Pe().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:M().optional().describe("Token for pagination from previous response"),delimiter:M().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")}),mne=ae({objects:ye(ae({key:M().describe("Object key/path"),size:Pe().describe("Object size in bytes"),lastModified:M().describe("Last modified timestamp"),etag:M().describe("Entity tag for the object")})),nextContinuationToken:M().optional().describe("Token for fetching next page of results"),isTruncated:et().describe("Whether there are more results available"),commonPrefixes:ye(M()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")}),gne=ae({key:M().describe("Object key/path to get metadata for")}),vne=ae({contentType:M().optional().describe("MIME type of the object"),contentLength:Pe().describe("Size of the object in bytes"),lastModified:M().describe("Last modified timestamp"),etag:M().describe("Entity tag for the object"),metadata:ft(M(),M()).optional().describe("Custom metadata key-value pairs")}),yne=ae({key:M().describe("Object key/path to generate URL for"),expiresIn:Pe().optional().describe("URL expiration time in seconds (default: from state config or 3600)")}),_ne=ae({url:M().describe("Presigned URL for downloading the object"),expiresIn:Pe().describe("Expiration time in seconds that was used")}),bne=ae({key:M().describe("Object key/path for the upload"),expiresIn:Pe().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:M().optional().describe("MIME type for the object being uploaded")}),wne=ae({url:M().describe("Presigned URL for uploading the object"),expiresIn:Pe().describe("Expiration time in seconds that was used")}),Sne=ae({key:M().describe("Object key/path to delete")}),Ene=ae({success:et().describe("Whether the deletion was successful"),key:M().describe("The key that was deleted")}),Rne=ae({keys:ye(M()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")}),xne=ae({deleted:ye(M()).describe("Array of successfully deleted keys"),errors:ye(ae({key:M(),message:M()})).describe("Array of errors for failed deletions")}),Tne=[{name:"LIST_OBJECTS",inputSchema:pne,outputSchema:mne},{name:"GET_OBJECT_METADATA",inputSchema:gne,outputSchema:vne},{name:"GET_PRESIGNED_URL",inputSchema:yne,outputSchema:_ne},{name:"PUT_PRESIGNED_URL",inputSchema:bne,outputSchema:wne},{name:"DELETE_OBJECT",inputSchema:Sne,outputSchema:Ene},{name:"DELETE_OBJECTS",inputSchema:Rne,outputSchema:xne}],One=ae({toolName:M().describe("Name of the tool to invoke on that connection"),transformCode:M().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(input): Output { ... }`\n The input will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output. \n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),Cne=ae({code:M().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(input): Output { ... }\`
175
- The input is the resolved value of the references in the input field. Example:
176
- {
177
- "input": {
178
- "name": "@Step_1.name",
179
- "age": "@Step_2.age"
180
- },
181
- "code": "export default function(input): Output { return { result: \`\${input.name} is \${input.age} years old.\` } }"
182
- }
183
- `)});ae({signalName:M().describe("Signal name to wait for (e.g., 'approval'). Execution pauses until SEND_SIGNAL is called with this name.")});const Ane=yt([One.describe("Call an external tool via MCP connection. "),Cne.describe("Run pure TypeScript code for data transformation. Useful to merge data from multiple steps and transform it.")]),Ine=ae({maxAttempts:Pe().optional().describe("Max retry attempts on failure (default: 1, no retries)"),backoffMs:Pe().optional().describe("Initial delay between retries in ms (doubles each attempt)"),timeoutMs:Pe().optional().describe("Max execution time in ms before step fails (default: 30000)"),onError:Ot(["fail","continue"]).optional().describe("What to do when this step fails: 'fail' aborts the workflow, 'continue' skips the error and proceeds")}),TP=xo(()=>ae({type:M().optional(),properties:ft(M(),st()).optional(),required:ye(M()).optional(),description:M().optional(),additionalProperties:et().optional(),additionalItems:et().optional(),items:TP.optional()}).passthrough()),Nne=ae({name:M().min(1).describe("Unique identifier for this step. Other steps reference its output as @name.field"),description:M().optional().describe("What this step does"),action:Ane,input:ft(M(),st()).optional().describe("Data passed to the action. Use @ref for dynamic values: @input.field (workflow input), @stepName.field (previous step output), @item/@index (loop context). Example: { 'userId': '@input.user_id', 'data': '@fetch.result' }"),outputSchema:TP.optional().describe("Optional JSON Schema describing the expected output of the step."),config:Ine.optional().describe("Retry and timeout settings"),forEach:ae({ref:M().describe("@ ref to the step to iterate over"),concurrency:Pe().optional().default(1).describe("max parallel iterations. default is 1 (sequential)")}).optional()}),kne=Ot(["enqueued","running","success","error","failed","cancelled"]).default("enqueued"),OP=lg.extend({virtual_mcp_id:M().describe("ID of the virtual MCP (agent) that will be used to execute the workflow"),status:kne.describe("Current status of the workflow execution"),input:ft(M(),st()).optional().describe("Input data for the workflow execution"),output:st().optional().describe("Output data for the workflow execution"),completed_at_epoch_ms:Pe().nullish().describe("Timestamp of when the workflow execution completed"),start_at_epoch_ms:Pe().nullish().describe("Timestamp of when the workflow execution started or will start"),timeout_ms:Pe().nullish().describe("Timeout in milliseconds for the workflow execution"),deadline_at_epoch_ms:Pe().nullish().describe("Deadline for the workflow execution - when the workflow execution will be cancelled if it is not completed. This is read-only and is set by the workflow engine when an execution is created."),error:st().nullish().describe("Error that occurred during the workflow execution"),completed_steps:ae({success:ye(ae({name:M(),completed_at_epoch_ms:Pe()})).describe("Names of the steps that were completed successfully"),error:ye(M()).describe("Names of the steps that errored")}).optional().describe("Names of the steps that were completed and their status"),running_steps:ye(M()).optional().describe("Names of the steps that are currently running")}),Mne=Ot(["signal","timer","message","output","step_started","step_completed","workflow_started","workflow_completed"]);lg.extend({execution_id:M(),type:Mne,name:M().nullish(),payload:st().optional(),visible_at:Pe().nullish(),consumed_at:Pe().nullish(),source_execution_id:M().nullish()});const Pne=lg.extend({description:M().optional().describe("Human-readable summary of what this workflow does"),steps:ye(Nne).describe("Ordered list of steps. Execution order is auto-determined by @ref dependencies: steps with no @ref dependencies run in parallel; steps referencing @stepName wait for that step to complete.")}),Dne=ug("workflow",Pne),Lne={maxAttempts:1,timeoutMs:3e4},pae={name:"Initial Step",action:{code:`
184
- interface Input {
185
- example: string;
186
- }
187
-
188
- interface Output {
189
- result: unknown;
190
- }
191
-
192
- export default async function(input: Input): Promise<Output> {
193
- return {
194
- result: input.example
195
- }
196
- }`},config:Lne,outputSchema:{type:"object",properties:{result:{type:"string",description:"The result of the step"}},required:["result"],description:"The output of the step. This is a JSON Schema describing the expected output of the step."}},jne=ug("workflow_execution",OP),$ne=[...Dne,...jne],mae=[...$ne],gae=ug("workflow_execution",OP),dg=Ot(["passing","warning","failing","info"]),Une=ae({label:M().describe("Metric label (e.g. 'LCP', 'Performance')"),value:yt([Pe(),M()]).describe("Current metric value"),unit:M().optional().describe("Unit of measurement (e.g. 's', 'ms', 'score')"),previousValue:yt([Pe(),M()]).optional().describe("Previous value for delta comparison"),status:dg.optional().describe("Status of this individual metric")}),zne=ae({label:M().describe("Short name of the criterion"),description:M().optional().describe("Longer explanation"),status:dg.optional().describe("Status of this individual criterion (passing/warning/failing/info)")}),Vne=ae({position:Pe().describe("Current rank position"),reference_position:Pe().optional().describe("Previous rank position before reordering. Used to compute delta automatically (delta = reference_position - position)."),delta:Pe().optional().describe("Explicit change in position. Ignored when reference_position is provided."),label:M().describe("Item name"),image:M().describe("URL of the item image"),values:ye(yt([M(),Pe()])).describe("Values matching columns"),note:yt([M(),ft(M(),yt([M(),Pe()]))]).optional().describe("Inline annotation or structured key-value metrics")}),Fne=jb("type",[ae({type:De("markdown"),content:M().describe("Markdown content")}),ae({type:De("metrics"),title:M().optional().describe("Section title"),items:ye(Une).describe("Metric items")}),ae({type:De("table"),title:M().optional().describe("Section title"),columns:ye(M()).describe("Column headers"),rows:ye(ye(yt([M(),Pe(),El()]))).describe("Table rows")}),ae({type:De("criteria"),title:M().optional().describe("Section title"),items:ye(zne).describe("List of criteria items")}),ae({type:De("note"),content:M().describe("The note text")}),ae({type:De("ranked-list"),title:M().optional().describe("Section title"),rows:ye(Vne).describe("Ranked items")})]),CP=Ot(["unread","read","dismissed"]),AP=ae({id:M().describe("Unique report identifier"),title:M().describe("Report title"),category:M().describe("Report category (e.g. 'performance', 'security', 'accessibility')"),status:dg.describe("Overall report status"),summary:M().describe("One-line summary of findings"),updatedAt:M().describe("ISO 8601 timestamp of last update"),source:M().optional().describe("Agent or service that generated the report (e.g. 'security-auditor', 'performance-monitor')"),tags:ye(M()).optional().describe("Free-form tags for filtering (e.g. 'homepage', 'api', 'ci')"),lifecycleStatus:CP.optional().describe("Inbox lifecycle status of the report (default: unread)")}),Bne=AP.extend({sections:ye(Fne).describe("Ordered content sections")}),qne=ae({category:M().optional().describe("Filter by category (e.g. 'performance', 'security')"),status:dg.optional().describe("Filter by report status")}),Hne=ae({reports:ye(AP).describe("List of report summaries")}),Gne=ae({id:M().describe("Report identifier")}),Zne=Bne,Wne=ae({reportId:M().describe("Report identifier"),lifecycleStatus:CP.describe("New lifecycle status for the report")}),Kne=ae({success:et().describe("Whether the operation succeeded"),message:M().optional().describe("Human-readable result message")}),Yne=[{name:"REPORTS_LIST",inputSchema:qne,outputSchema:Hne},{name:"REPORTS_GET",inputSchema:Gne,outputSchema:Zne},{name:"REPORTS_UPDATE_STATUS",inputSchema:Wne,outputSchema:Kne,opt:!0}],IP=({size:e=24,color:t="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.createElement("path",{d:"M20 12.5V6.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C17.72 2 16.88 2 15.2 2H8.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C4 4.28 4 5.12 4 6.8v10.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C6.28 22 7.12 22 8.8 22H12m2-11H8m2 4H8m8-8H8m6.5 12 2 2 4.5-4.5"}));IP.displayName="FileCheck02";const NP=({size:e=24,color:t="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Z"}));NP.displayName="Folder";const kP=({size:e=24,color:t="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.createElement("path",{d:"M20.5 7.278 12 12m0 0L3.5 7.278M12 12v9.5m9-5.441V7.942c0-.343 0-.514-.05-.667a1 1 0 0 0-.215-.364c-.109-.119-.258-.202-.558-.368l-7.4-4.111c-.284-.158-.425-.237-.575-.267a1 1 0 0 0-.403 0c-.15.03-.292.11-.576.267l-7.4 4.11c-.3.167-.45.25-.558.369a1 1 0 0 0-.215.364C3 7.428 3 7.599 3 7.942v8.117c0 .342 0 .514.05.666a1 1 0 0 0 .215.364c.109.119.258.202.558.368l7.4 4.111c.284.158.425.237.576.268.133.027.27.027.402 0 .15-.031.292-.11.576-.268l7.4-4.11c.3-.167.45-.25.558-.369a.999.999 0 0 0 .215-.364c.05-.152.05-.324.05-.666ZM16.5 9.5l-9-5"}));kP.displayName="Package";function kC(e,t,n,r){return e?e.startsWith("/")?`/${t}/${n}/${r}${e}`:e:`/${t}/${n}/${r}`}function Qne(e){return{createRoutes:e,useParams:t=>tl({strict:!1}),useSearch:t=>Im({strict:!1}),useNavigate:()=>{const t=wl(),{org:n,project:r,pluginId:a}=tl({strict:!1});return i=>{const c=kC(i.to,n,r,a);return t({...i,to:c,params:{org:n,project:r,pluginId:a,...i.params}})}},useLocation:()=>AL(),Link:function(n){const{org:r,project:a,pluginId:i}=tl({strict:!1}),c=kC(n.to,r,a,i);return x.jsx(km,{...n,to:c,params:{org:r,project:a,pluginId:i,...n.params}})},_types:{routes:void 0,routeIds:void 0}}}var jt;(function(e){e.assertEqual=a=>{};function t(a){}e.assertIs=t;function n(a){throw new Error}e.assertNever=n,e.arrayToEnum=a=>{const i={};for(const c of a)i[c]=c;return i},e.getValidEnumValues=a=>{const i=e.objectKeys(a).filter(u=>typeof a[a[u]]!="number"),c={};for(const u of i)c[u]=a[u];return e.objectValues(c)},e.objectValues=a=>e.objectKeys(a).map(function(i){return a[i]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&i.push(c);return i},e.find=(a,i)=>{for(const c of a)if(i(c))return c},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,i=" | "){return a.map(c=>typeof c=="string"?`'${c}'`:c).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(jt||(jt={}));var MC;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(MC||(MC={}));const Fe=jt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ns=e=>{switch(typeof e){case"undefined":return Fe.undefined;case"string":return Fe.string;case"number":return Number.isNaN(e)?Fe.nan:Fe.number;case"boolean":return Fe.boolean;case"function":return Fe.function;case"bigint":return Fe.bigint;case"symbol":return Fe.symbol;case"object":return Array.isArray(e)?Fe.array:e===null?Fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Fe.promise:typeof Map<"u"&&e instanceof Map?Fe.map:typeof Set<"u"&&e instanceof Set?Fe.set:typeof Date<"u"&&e instanceof Date?Fe.date:Fe.object;default:return Fe.unknown}},Ne=jt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ga extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},a=i=>{for(const c of i.issues)if(c.code==="invalid_union")c.unionErrors.map(a);else if(c.code==="invalid_return_type")a(c.returnTypeError);else if(c.code==="invalid_arguments")a(c.argumentsError);else if(c.path.length===0)r._errors.push(n(c));else{let u=r,d=0;for(;d<c.path.length;){const f=c.path[d];d===c.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(c))):u[f]=u[f]||{_errors:[]},u=u[f],d++}}};return a(this),r}static assert(t){if(!(t instanceof Ga))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,jt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const a of this.issues)if(a.path.length>0){const i=a.path[0];n[i]=n[i]||[],n[i].push(t(a))}else r.push(t(a));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ga.create=e=>new Ga(e);const ub=(e,t)=>{let n;switch(e.code){case Ne.invalid_type:e.received===Fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ne.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,jt.jsonStringifyReplacer)}`;break;case Ne.unrecognized_keys:n=`Unrecognized key(s) in object: ${jt.joinValues(e.keys,", ")}`;break;case Ne.invalid_union:n="Invalid input";break;case Ne.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${jt.joinValues(e.options)}`;break;case Ne.invalid_enum_value:n=`Invalid enum value. Expected ${jt.joinValues(e.options)}, received '${e.received}'`;break;case Ne.invalid_arguments:n="Invalid function arguments";break;case Ne.invalid_return_type:n="Invalid function return type";break;case Ne.invalid_date:n="Invalid date";break;case Ne.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:jt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ne.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Ne.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Ne.custom:n="Invalid input";break;case Ne.invalid_intersection_types:n="Intersection results could not be merged";break;case Ne.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ne.not_finite:n="Number must be finite";break;default:n=t.defaultError,jt.assertNever(e)}return{message:n}};let Xne=ub;function Jne(){return Xne}const ere=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,i=[...n,...a.path||[]],c={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let u="";const d=r.filter(f=>!!f).slice().reverse();for(const f of d)u=f(c,{data:t,defaultError:u}).message;return{...a,path:i,message:u}};function je(e,t){const n=Jne(),r=ere({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ub?void 0:ub].filter(a=>!!a)});e.common.issues.push(r)}class ro{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const a of n){if(a.status==="aborted")return rt;a.status==="dirty"&&t.dirty(),r.push(a.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const a of n){const i=await a.key,c=await a.value;r.push({key:i,value:c})}return ro.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const a of n){const{key:i,value:c}=a;if(i.status==="aborted"||c.status==="aborted")return rt;i.status==="dirty"&&t.dirty(),c.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof c.value<"u"||a.alwaysSet)&&(r[i.value]=c.value)}return{status:t.value,value:r}}}const rt=Object.freeze({status:"aborted"}),zu=e=>({status:"dirty",value:e}),Co=e=>({status:"valid",value:e}),PC=e=>e.status==="aborted",DC=e=>e.status==="dirty",gl=e=>e.status==="valid",bm=e=>typeof Promise<"u"&&e instanceof Promise;var Ze;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Ze||(Ze={}));class Gs{constructor(t,n,r,a){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const LC=(e,t)=>{if(gl(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ga(e.common.issues);return this._error=n,this._error}}};function vt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(c,u)=>{const{message:d}=e;return c.code==="invalid_enum_value"?{message:d??u.defaultError}:typeof u.data>"u"?{message:d??r??u.defaultError}:c.code!=="invalid_type"?{message:u.defaultError}:{message:d??n??u.defaultError}},description:a}}class Nt{get description(){return this._def.description}_getType(t){return Ns(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ns(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ro,ctx:{common:t.parent.common,data:t.data,parsedType:Ns(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(bm(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ns(t)},a=this._parseSync({data:t,path:r.path,parent:r});return LC(r,a)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ns(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return gl(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>gl(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ns(t)},a=this._parse({data:t,path:r.path,parent:r}),i=await(bm(a)?a:Promise.resolve(a));return LC(r,i)}refine(t,n){const r=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,i)=>{const c=t(a),u=()=>i.addIssue({code:Ne.custom,...r(a)});return typeof Promise<"u"&&c instanceof Promise?c.then(d=>d?!0:(u(),!1)):c?!0:(u(),!1)})}refinement(t,n){return this._refinement((r,a)=>t(r)?!0:(a.addIssue(typeof n=="function"?n(r,a):n),!1))}_refinement(t){return new yl({schema:this,typeName:ot.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Vs.create(this,this._def)}nullable(){return _l.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return la.create(this)}promise(){return Rm.create(this,this._def)}or(t){return Sm.create([this,t],this._def)}and(t){return Em.create(this,t,this._def)}transform(t){return new yl({...vt(this._def),schema:this,typeName:ot.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new hb({...vt(this._def),innerType:this,defaultValue:n,typeName:ot.ZodDefault})}brand(){return new Ere({typeName:ot.ZodBranded,type:this,...vt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new pb({...vt(this._def),innerType:this,catchValue:n,typeName:ot.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return aw.create(this,t)}readonly(){return mb.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const tre=/^c[^\s-]{8,}$/i,nre=/^[0-9a-z]+$/,rre=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ore=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,are=/^[a-z0-9_-]{21}$/i,sre=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ire=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,cre=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,lre="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Y0;const ure=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,dre=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,fre=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,hre=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,pre=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,mre=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,MP="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",gre=new RegExp(`^${MP}$`);function PP(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function vre(e){return new RegExp(`^${PP(e)}$`)}function yre(e){let t=`${MP}T${PP(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function _re(e,t){return!!((t==="v4"||!t)&&ure.test(e)||(t==="v6"||!t)&&fre.test(e))}function bre(e,t){if(!sre.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||t&&a.alg!==t)}catch{return!1}}function wre(e,t){return!!((t==="v4"||!t)&&dre.test(e)||(t==="v6"||!t)&&hre.test(e))}class Ds extends Nt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Fe.string){const i=this._getOrReturnCtx(t);return je(i,{code:Ne.invalid_type,expected:Fe.string,received:i.parsedType}),rt}const r=new ro;let a;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(a=this._getOrReturnCtx(t,a),je(a,{code:Ne.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(a=this._getOrReturnCtx(t,a),je(a,{code:Ne.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const c=t.data.length>i.value,u=t.data.length<i.value;(c||u)&&(a=this._getOrReturnCtx(t,a),c?je(a,{code:Ne.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):u&&je(a,{code:Ne.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")cre.test(t.data)||(a=this._getOrReturnCtx(t,a),je(a,{validation:"email",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Y0||(Y0=new RegExp(lre,"u")),Y0.test(t.data)||(a=this._getOrReturnCtx(t,a),je(a,{validation:"emoji",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")ore.test(t.data)||(a=this._getOrReturnCtx(t,a),je(a,{validation:"uuid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")are.test(t.data)||(a=this._getOrReturnCtx(t,a),je(a,{validation:"nanoid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")tre.test(t.data)||(a=this._getOrReturnCtx(t,a),je(a,{validation:"cuid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")nre.test(t.data)||(a=this._getOrReturnCtx(t,a),je(a,{validation:"cuid2",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")rre.test(t.data)||(a=this._getOrReturnCtx(t,a),je(a,{validation:"ulid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),je(a,{validation:"url",code:Ne.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),je(a,{validation:"regex",code:Ne.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(t,a),je(a,{code:Ne.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(a=this._getOrReturnCtx(t,a),je(a,{code:Ne.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(a=this._getOrReturnCtx(t,a),je(a,{code:Ne.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?yre(i).test(t.data)||(a=this._getOrReturnCtx(t,a),je(a,{code:Ne.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?gre.test(t.data)||(a=this._getOrReturnCtx(t,a),je(a,{code:Ne.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?vre(i).test(t.data)||(a=this._getOrReturnCtx(t,a),je(a,{code:Ne.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?ire.test(t.data)||(a=this._getOrReturnCtx(t,a),je(a,{validation:"duration",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?_re(t.data,i.version)||(a=this._getOrReturnCtx(t,a),je(a,{validation:"ip",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?bre(t.data,i.alg)||(a=this._getOrReturnCtx(t,a),je(a,{validation:"jwt",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?wre(t.data,i.version)||(a=this._getOrReturnCtx(t,a),je(a,{validation:"cidr",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?pre.test(t.data)||(a=this._getOrReturnCtx(t,a),je(a,{validation:"base64",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?mre.test(t.data)||(a=this._getOrReturnCtx(t,a),je(a,{validation:"base64url",code:Ne.invalid_string,message:i.message}),r.dirty()):jt.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(a=>t.test(a),{validation:n,code:Ne.invalid_string,...Ze.errToObj(r)})}_addCheck(t){return new Ds({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ze.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ze.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ze.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ze.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ze.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ze.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ze.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ze.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ze.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ze.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ze.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ze.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ze.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Ze.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Ze.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Ze.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ze.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Ze.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ze.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ze.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ze.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ze.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ze.errToObj(n)})}nonempty(t){return this.min(1,Ze.errToObj(t))}trim(){return new Ds({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ds({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ds({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ds.create=e=>new Ds({checks:[],typeName:ot.ZodString,coerce:e?.coerce??!1,...vt(e)});function Sre(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r,i=Number.parseInt(e.toFixed(a).replace(".","")),c=Number.parseInt(t.toFixed(a).replace(".",""));return i%c/10**a}class md extends Nt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Fe.number){const i=this._getOrReturnCtx(t);return je(i,{code:Ne.invalid_type,expected:Fe.number,received:i.parsedType}),rt}let r;const a=new ro;for(const i of this._def.checks)i.kind==="int"?jt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),je(r,{code:Ne.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),je(r,{code:Ne.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),je(r,{code:Ne.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?Sre(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),je(r,{code:Ne.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),je(r,{code:Ne.not_finite,message:i.message}),a.dirty()):jt.assertNever(i);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ze.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ze.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ze.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ze.toString(n))}setLimit(t,n,r,a){return new md({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ze.toString(a)}]})}_addCheck(t){return new md({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ze.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ze.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ze.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ze.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ze.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ze.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ze.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ze.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ze.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&jt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}md.create=e=>new md({checks:[],typeName:ot.ZodNumber,coerce:e?.coerce||!1,...vt(e)});class gd extends Nt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Fe.bigint)return this._getInvalidInput(t);let r;const a=new ro;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),je(r,{code:Ne.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),je(r,{code:Ne.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),je(r,{code:Ne.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):jt.assertNever(i);return{status:a.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return je(n,{code:Ne.invalid_type,expected:Fe.bigint,received:n.parsedType}),rt}gte(t,n){return this.setLimit("min",t,!0,Ze.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ze.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ze.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ze.toString(n))}setLimit(t,n,r,a){return new gd({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ze.toString(a)}]})}_addCheck(t){return new gd({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ze.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ze.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ze.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ze.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ze.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}gd.create=e=>new gd({checks:[],typeName:ot.ZodBigInt,coerce:e?.coerce??!1,...vt(e)});class db extends Nt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Fe.boolean){const r=this._getOrReturnCtx(t);return je(r,{code:Ne.invalid_type,expected:Fe.boolean,received:r.parsedType}),rt}return Co(t.data)}}db.create=e=>new db({typeName:ot.ZodBoolean,coerce:e?.coerce||!1,...vt(e)});class wm extends Nt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Fe.date){const i=this._getOrReturnCtx(t);return je(i,{code:Ne.invalid_type,expected:Fe.date,received:i.parsedType}),rt}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return je(i,{code:Ne.invalid_date}),rt}const r=new ro;let a;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(a=this._getOrReturnCtx(t,a),je(a,{code:Ne.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(a=this._getOrReturnCtx(t,a),je(a,{code:Ne.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):jt.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new wm({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ze.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ze.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}wm.create=e=>new wm({checks:[],coerce:e?.coerce||!1,typeName:ot.ZodDate,...vt(e)});class jC extends Nt{_parse(t){if(this._getType(t)!==Fe.symbol){const r=this._getOrReturnCtx(t);return je(r,{code:Ne.invalid_type,expected:Fe.symbol,received:r.parsedType}),rt}return Co(t.data)}}jC.create=e=>new jC({typeName:ot.ZodSymbol,...vt(e)});class $C extends Nt{_parse(t){if(this._getType(t)!==Fe.undefined){const r=this._getOrReturnCtx(t);return je(r,{code:Ne.invalid_type,expected:Fe.undefined,received:r.parsedType}),rt}return Co(t.data)}}$C.create=e=>new $C({typeName:ot.ZodUndefined,...vt(e)});class UC extends Nt{_parse(t){if(this._getType(t)!==Fe.null){const r=this._getOrReturnCtx(t);return je(r,{code:Ne.invalid_type,expected:Fe.null,received:r.parsedType}),rt}return Co(t.data)}}UC.create=e=>new UC({typeName:ot.ZodNull,...vt(e)});class zC extends Nt{constructor(){super(...arguments),this._any=!0}_parse(t){return Co(t.data)}}zC.create=e=>new zC({typeName:ot.ZodAny,...vt(e)});class VC extends Nt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Co(t.data)}}VC.create=e=>new VC({typeName:ot.ZodUnknown,...vt(e)});class Zs extends Nt{_parse(t){const n=this._getOrReturnCtx(t);return je(n,{code:Ne.invalid_type,expected:Fe.never,received:n.parsedType}),rt}}Zs.create=e=>new Zs({typeName:ot.ZodNever,...vt(e)});class FC extends Nt{_parse(t){if(this._getType(t)!==Fe.undefined){const r=this._getOrReturnCtx(t);return je(r,{code:Ne.invalid_type,expected:Fe.void,received:r.parsedType}),rt}return Co(t.data)}}FC.create=e=>new FC({typeName:ot.ZodVoid,...vt(e)});class la extends Nt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==Fe.array)return je(n,{code:Ne.invalid_type,expected:Fe.array,received:n.parsedType}),rt;if(a.exactLength!==null){const c=n.data.length>a.exactLength.value,u=n.data.length<a.exactLength.value;(c||u)&&(je(n,{code:c?Ne.too_big:Ne.too_small,minimum:u?a.exactLength.value:void 0,maximum:c?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(je(n,{code:Ne.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(je(n,{code:Ne.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((c,u)=>a.type._parseAsync(new Gs(n,c,n.path,u)))).then(c=>ro.mergeArray(r,c));const i=[...n.data].map((c,u)=>a.type._parseSync(new Gs(n,c,n.path,u)));return ro.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new la({...this._def,minLength:{value:t,message:Ze.toString(n)}})}max(t,n){return new la({...this._def,maxLength:{value:t,message:Ze.toString(n)}})}length(t,n){return new la({...this._def,exactLength:{value:t,message:Ze.toString(n)}})}nonempty(t){return this.min(1,t)}}la.create=(e,t)=>new la({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ot.ZodArray,...vt(t)});function Wc(e){if(e instanceof Pn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Vs.create(Wc(r))}return new Pn({...e._def,shape:()=>t})}else return e instanceof la?new la({...e._def,type:Wc(e.element)}):e instanceof Vs?Vs.create(Wc(e.unwrap())):e instanceof _l?_l.create(Wc(e.unwrap())):e instanceof Vi?Vi.create(e.items.map(t=>Wc(t))):e}class Pn extends Nt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=jt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Fe.object){const f=this._getOrReturnCtx(t);return je(f,{code:Ne.invalid_type,expected:Fe.object,received:f.parsedType}),rt}const{status:r,ctx:a}=this._processInputParams(t),{shape:i,keys:c}=this._getCached(),u=[];if(!(this._def.catchall instanceof Zs&&this._def.unknownKeys==="strip"))for(const f in a.data)c.includes(f)||u.push(f);const d=[];for(const f of c){const m=i[f],p=a.data[f];d.push({key:{status:"valid",value:f},value:m._parse(new Gs(a,p,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof Zs){const f=this._def.unknownKeys;if(f==="passthrough")for(const m of u)d.push({key:{status:"valid",value:m},value:{status:"valid",value:a.data[m]}});else if(f==="strict")u.length>0&&(je(a,{code:Ne.unrecognized_keys,keys:u}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const m of u){const p=a.data[m];d.push({key:{status:"valid",value:m},value:f._parse(new Gs(a,p,a.path,m)),alwaysSet:m in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of d){const p=await m.key,g=await m.value;f.push({key:p,value:g,alwaysSet:m.alwaysSet})}return f}).then(f=>ro.mergeObjectSync(r,f)):ro.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return Ze.errToObj,new Pn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const a=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Ze.errToObj(t).message??a}:{message:a}}}:{}})}strip(){return new Pn({...this._def,unknownKeys:"strip"})}passthrough(){return new Pn({...this._def,unknownKeys:"passthrough"})}extend(t){return new Pn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Pn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ot.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Pn({...this._def,catchall:t})}pick(t){const n={};for(const r of jt.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Pn({...this._def,shape:()=>n})}omit(t){const n={};for(const r of jt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Pn({...this._def,shape:()=>n})}deepPartial(){return Wc(this)}partial(t){const n={};for(const r of jt.objectKeys(this.shape)){const a=this.shape[r];t&&!t[r]?n[r]=a:n[r]=a.optional()}return new Pn({...this._def,shape:()=>n})}required(t){const n={};for(const r of jt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Vs;)i=i._def.innerType;n[r]=i}return new Pn({...this._def,shape:()=>n})}keyof(){return DP(jt.objectKeys(this.shape))}}Pn.create=(e,t)=>new Pn({shape:()=>e,unknownKeys:"strip",catchall:Zs.create(),typeName:ot.ZodObject,...vt(t)});Pn.strictCreate=(e,t)=>new Pn({shape:()=>e,unknownKeys:"strict",catchall:Zs.create(),typeName:ot.ZodObject,...vt(t)});Pn.lazycreate=(e,t)=>new Pn({shape:e,unknownKeys:"strip",catchall:Zs.create(),typeName:ot.ZodObject,...vt(t)});class Sm extends Nt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function a(i){for(const u of i)if(u.result.status==="valid")return u.result;for(const u of i)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const c=i.map(u=>new Ga(u.ctx.common.issues));return je(n,{code:Ne.invalid_union,unionErrors:c}),rt}if(n.common.async)return Promise.all(r.map(async i=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(a);{let i;const c=[];for(const d of r){const f={...n,common:{...n.common,issues:[]},parent:null},m=d._parseSync({data:n.data,path:n.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!i&&(i={result:m,ctx:f}),f.common.issues.length&&c.push(f.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const u=c.map(d=>new Ga(d));return je(n,{code:Ne.invalid_union,unionErrors:u}),rt}}get options(){return this._def.options}}Sm.create=(e,t)=>new Sm({options:e,typeName:ot.ZodUnion,...vt(t)});function fb(e,t){const n=Ns(e),r=Ns(t);if(e===t)return{valid:!0,data:e};if(n===Fe.object&&r===Fe.object){const a=jt.objectKeys(t),i=jt.objectKeys(e).filter(u=>a.indexOf(u)!==-1),c={...e,...t};for(const u of i){const d=fb(e[u],t[u]);if(!d.valid)return{valid:!1};c[u]=d.data}return{valid:!0,data:c}}else if(n===Fe.array&&r===Fe.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let i=0;i<e.length;i++){const c=e[i],u=t[i],d=fb(c,u);if(!d.valid)return{valid:!1};a.push(d.data)}return{valid:!0,data:a}}else return n===Fe.date&&r===Fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Em extends Nt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(i,c)=>{if(PC(i)||PC(c))return rt;const u=fb(i.value,c.value);return u.valid?((DC(i)||DC(c))&&n.dirty(),{status:n.value,value:u.data}):(je(r,{code:Ne.invalid_intersection_types}),rt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,c])=>a(i,c)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Em.create=(e,t,n)=>new Em({left:e,right:t,typeName:ot.ZodIntersection,...vt(n)});class Vi extends Nt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.array)return je(r,{code:Ne.invalid_type,expected:Fe.array,received:r.parsedType}),rt;if(r.data.length<this._def.items.length)return je(r,{code:Ne.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),rt;!this._def.rest&&r.data.length>this._def.items.length&&(je(r,{code:Ne.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((c,u)=>{const d=this._def.items[u]||this._def.rest;return d?d._parse(new Gs(r,c,r.path,u)):null}).filter(c=>!!c);return r.common.async?Promise.all(i).then(c=>ro.mergeArray(n,c)):ro.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Vi({...this._def,rest:t})}}Vi.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Vi({items:e,typeName:ot.ZodTuple,rest:null,...vt(t)})};class BC extends Nt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.map)return je(r,{code:Ne.invalid_type,expected:Fe.map,received:r.parsedType}),rt;const a=this._def.keyType,i=this._def.valueType,c=[...r.data.entries()].map(([u,d],f)=>({key:a._parse(new Gs(r,u,r.path,[f,"key"])),value:i._parse(new Gs(r,d,r.path,[f,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const d of c){const f=await d.key,m=await d.value;if(f.status==="aborted"||m.status==="aborted")return rt;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const d of c){const f=d.key,m=d.value;if(f.status==="aborted"||m.status==="aborted")return rt;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}}}}BC.create=(e,t,n)=>new BC({valueType:t,keyType:e,typeName:ot.ZodMap,...vt(n)});class vd extends Nt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.set)return je(r,{code:Ne.invalid_type,expected:Fe.set,received:r.parsedType}),rt;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(je(r,{code:Ne.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(je(r,{code:Ne.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const i=this._def.valueType;function c(d){const f=new Set;for(const m of d){if(m.status==="aborted")return rt;m.status==="dirty"&&n.dirty(),f.add(m.value)}return{status:n.value,value:f}}const u=[...r.data.values()].map((d,f)=>i._parse(new Gs(r,d,r.path,f)));return r.common.async?Promise.all(u).then(d=>c(d)):c(u)}min(t,n){return new vd({...this._def,minSize:{value:t,message:Ze.toString(n)}})}max(t,n){return new vd({...this._def,maxSize:{value:t,message:Ze.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}vd.create=(e,t)=>new vd({valueType:e,minSize:null,maxSize:null,typeName:ot.ZodSet,...vt(t)});class qC extends Nt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}qC.create=(e,t)=>new qC({getter:e,typeName:ot.ZodLazy,...vt(t)});class HC extends Nt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return je(n,{received:n.data,code:Ne.invalid_literal,expected:this._def.value}),rt}return{status:"valid",value:t.data}}get value(){return this._def.value}}HC.create=(e,t)=>new HC({value:e,typeName:ot.ZodLiteral,...vt(t)});function DP(e,t){return new vl({values:e,typeName:ot.ZodEnum,...vt(t)})}class vl extends Nt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return je(n,{expected:jt.joinValues(r),received:n.parsedType,code:Ne.invalid_type}),rt}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return je(n,{received:n.data,code:Ne.invalid_enum_value,options:r}),rt}return Co(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return vl.create(t,{...this._def,...n})}exclude(t,n=this._def){return vl.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}vl.create=DP;class GC extends Nt{_parse(t){const n=jt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Fe.string&&r.parsedType!==Fe.number){const a=jt.objectValues(n);return je(r,{expected:jt.joinValues(a),received:r.parsedType,code:Ne.invalid_type}),rt}if(this._cache||(this._cache=new Set(jt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const a=jt.objectValues(n);return je(r,{received:r.data,code:Ne.invalid_enum_value,options:a}),rt}return Co(t.data)}get enum(){return this._def.values}}GC.create=(e,t)=>new GC({values:e,typeName:ot.ZodNativeEnum,...vt(t)});class Rm extends Nt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Fe.promise&&n.common.async===!1)return je(n,{code:Ne.invalid_type,expected:Fe.promise,received:n.parsedType}),rt;const r=n.parsedType===Fe.promise?n.data:Promise.resolve(n.data);return Co(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Rm.create=(e,t)=>new Rm({type:e,typeName:ot.ZodPromise,...vt(t)});class yl extends Nt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ot.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=this._def.effect||null,i={addIssue:c=>{je(r,c),c.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const c=a.transform(r.data,i);if(r.common.async)return Promise.resolve(c).then(async u=>{if(n.value==="aborted")return rt;const d=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return d.status==="aborted"?rt:d.status==="dirty"||n.value==="dirty"?zu(d.value):d});{if(n.value==="aborted")return rt;const u=this._def.schema._parseSync({data:c,path:r.path,parent:r});return u.status==="aborted"?rt:u.status==="dirty"||n.value==="dirty"?zu(u.value):u}}if(a.type==="refinement"){const c=u=>{const d=a.refinement(u,i);if(r.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?rt:(u.status==="dirty"&&n.dirty(),c(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?rt:(u.status==="dirty"&&n.dirty(),c(u.value).then(()=>({status:n.value,value:u.value}))))}if(a.type==="transform")if(r.common.async===!1){const c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!gl(c))return rt;const u=a.transform(c.value,i);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(c=>gl(c)?Promise.resolve(a.transform(c.value,i)).then(u=>({status:n.value,value:u})):rt);jt.assertNever(a)}}yl.create=(e,t,n)=>new yl({schema:e,typeName:ot.ZodEffects,effect:t,...vt(n)});yl.createWithPreprocess=(e,t,n)=>new yl({schema:t,effect:{type:"preprocess",transform:e},typeName:ot.ZodEffects,...vt(n)});class Vs extends Nt{_parse(t){return this._getType(t)===Fe.undefined?Co(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Vs.create=(e,t)=>new Vs({innerType:e,typeName:ot.ZodOptional,...vt(t)});class _l extends Nt{_parse(t){return this._getType(t)===Fe.null?Co(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}_l.create=(e,t)=>new _l({innerType:e,typeName:ot.ZodNullable,...vt(t)});class hb extends Nt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}hb.create=(e,t)=>new hb({innerType:e,typeName:ot.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...vt(t)});class pb extends Nt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return bm(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ga(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ga(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}pb.create=(e,t)=>new pb({innerType:e,typeName:ot.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...vt(t)});class ZC extends Nt{_parse(t){if(this._getType(t)!==Fe.nan){const r=this._getOrReturnCtx(t);return je(r,{code:Ne.invalid_type,expected:Fe.nan,received:r.parsedType}),rt}return{status:"valid",value:t.data}}}ZC.create=e=>new ZC({typeName:ot.ZodNaN,...vt(e)});class Ere extends Nt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class aw extends Nt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?rt:i.status==="dirty"?(n.dirty(),zu(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?rt:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(t,n){return new aw({in:t,out:n,typeName:ot.ZodPipeline})}}class mb extends Nt{_parse(t){const n=this._def.innerType._parse(t),r=a=>(gl(a)&&(a.value=Object.freeze(a.value)),a);return bm(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}}mb.create=(e,t)=>new mb({innerType:e,typeName:ot.ZodReadonly,...vt(t)});var ot;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ot||(ot={}));const Rre=Ds.create,xre=db.create;Zs.create;la.create;const Tre=Pn.create;Sm.create;Em.create;Vi.create;const Ore=vl.create;Rm.create;Vs.create;_l.create;const Cre=Tre({path:Rre().optional().default(""),flat:xre().optional().default(!1),view:Ore(["table","grid"]).optional().default("grid")}),Are=Qne(e=>{const{createRoute:t,lazyRouteComponent:n}=e.routing;return[t({getParentRoute:()=>e.parentRoute,path:"/",component:n(()=>It(()=>import("./file-browser-CyYYn3HQ.js").then(a=>a.b),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]))),validateSearch:Cre})]}),Ire=A.lazy(()=>It(()=>import("./plugin-header-DGLeYRv9.js"),__vite__mapDeps([18,6,19]))),Nre=A.lazy(()=>It(()=>import("./plugin-empty-state-D_Z6xsRD.js"),[])),kre={id:"object-storage",description:"Browse and manage files in S3-compatible object storage",binding:Tne,renderHeader:e=>x.jsx(Ire,{...e}),renderEmptyState:()=>x.jsx(Nre,{}),setup:e=>{const{registerSidebarGroup:t,registerPluginRoutes:n}=e;t({id:"object-storage",label:"Object Storage",items:[{icon:x.jsx(NP,{size:16}),label:"File browser"}],defaultExpanded:!0});const r=Are.createRoutes(e);n(r)}},Mre="private-registry",Pre="Organization private MCP registry with CRUD and Store integration",vae=`
197
- You are an MCP tool tester running automated integration checks.
198
-
199
- Goal:
200
- - Validate that this MCP and its tools work end-to-end.
201
- - Prefer realistic sequences where one tool output feeds the next tool input.
202
- - Example chain: list -> pick id -> get/update/delete.
203
-
204
- Rules:
205
- - Try to execute as many tools as possible.
206
- - If a tool requires context, first call discovery/list tools to obtain valid IDs.
207
- - If you create test data, clean it up when possible.
208
- - If one tool fails, continue testing the remaining tools.
209
- - If a tool returns input validation errors, fix the arguments and retry that tool.
210
- - For tools that require identifiers (fileId, folderId, etc), always get IDs from previous list/get calls.
211
- - Keep calls focused and safe.
212
-
213
- At the end, provide a concise summary of:
214
- - What passed
215
- - What failed
216
- - What could not be tested and why
217
- - If some tool needs user-specific context (email/account/tenant), explicitly output a "CONTEXT_REQUIRED" note with what is needed.
218
- `.trim(),Dre=A.lazy(()=>It(()=>import("./registry-layout-D0ZI3R-w.js"),__vite__mapDeps([20,4,21,22,23,24,17,25,2,3,26,27,28,6,8,29,30,31,32,33,34,35,14,36,37,38,7,9,16,39,40,15,41,42,43,19,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60]))),Lre={id:Mre,description:Pre,LayoutComponent:Dre,setup:e=>{e.registerSidebarGroup({id:"private-registry",label:"Private Registry",items:[{icon:x.jsx(kP,{size:16}),label:"Registry"}],defaultExpanded:!0})}},jre=A.lazy(()=>It(()=>import("./reports-layout-NWBpDTNI.js"),__vite__mapDeps([61,62,24,52,17,25,1,14,23,6,19,4,7,46,63,64,54,65,21,66,51,29,67,68,69,8,10,70,26,40,42,43]))),$re={id:"reports",description:"View automated reports with actionable insights",binding:Yne,LayoutComponent:jre,setup:e=>{e.registerSidebarGroup({id:"observability",label:"Observability",items:[{icon:x.jsx(IP,{size:16}),label:"Reports"}]})}},Ure="user-sandbox",zre="Create embeddable integration flows for platform end-users";var Vre=(e,t,n,r,a,i,c,u)=>{let d=document.documentElement,f=["light","dark"];function m(y){(Array.isArray(e)?e:[e]).forEach(w=>{let S=w==="class",b=S&&i?a.map(E=>i[E]||E):a;S?(d.classList.remove(...b),d.classList.add(i&&i[y]?i[y]:y)):d.setAttribute(w,y)}),p(y)}function p(y){u&&f.includes(y)&&(d.style.colorScheme=y)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)m(r);else try{let y=localStorage.getItem(t)||n,w=c&&y==="system"?g():y;m(w)}catch{}},Fre=A.createContext(void 0),Bre={setTheme:e=>{},themes:[]},yae=()=>{var e;return(e=A.useContext(Fre))!=null?e:Bre};A.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultTheme:i,value:c,themes:u,nonce:d,scriptProps:f})=>{let m=JSON.stringify([n,t,i,e,u,c,r,a]).slice(1,-1);return A.createElement("script",{...f,suppressHydrationWarning:!0,nonce:typeof window>"u"?d:"",dangerouslySetInnerHTML:{__html:`(${Vre.toString()})(${m})`}})});const xm="org-admin",qre={from({org:e,project:t}){if(e?.includes("/")||t.includes("/"))throw new Error("Org or project cannot contain slashes");return`${e}/${t}`},parse(e){e.startsWith("/")&&(e=e.slice(1));const[t,n]=e.split("/");if(!t||!n)throw new Error("Invalid locator");return{org:t,project:n}},isOrgAdminProject(e){return e.split("/")[1]===xm},adminProject(e){return`${e}/${xm}`}},LP=A.createContext(void 0),_ae=()=>{const e=A.useContext(LP);if(!e)throw new Error("useProjectContext must be used within a ProjectContextProvider");return e},bae=e=>{const t=bl.c(10),{children:n,org:r,project:a}=e;let i;t[0]!==r.slug||t[1]!==a.slug?(i=qre.from({org:r.slug,project:a.slug}),t[0]=r.slug,t[1]=a.slug,t[2]=i):i=t[2];const c=i;let u;t[3]!==c||t[4]!==r||t[5]!==a?(u={org:r,project:a,locator:c},t[3]=c,t[4]=r,t[5]=a,t[6]=u):u=t[6];const d=u;let f;return t[7]!==n||t[8]!==d?(f=x.jsx(LP.Provider,{value:d,children:n}),t[7]=n,t[8]=d,t[9]=f):f=t[9],f},Hre=ae({authorizationEndpoint:M().url(),tokenEndpoint:M().url(),introspectionEndpoint:M().url().optional(),clientId:M(),clientSecret:M().optional(),scopes:ye(M()),grantType:Ot(["authorization_code","client_credentials"])}),Gre=ae({title:M().optional(),readOnlyHint:et().optional(),destructiveHint:et().optional(),idempotentHint:et().optional(),openWorldHint:et().optional()}),Zre=ae({name:M(),description:M().optional(),inputSchema:ft(M(),st()),outputSchema:ft(M(),st()).optional(),annotations:Gre.optional(),_meta:ft(M(),st()).optional()}),Wre=ae({headers:ft(M(),M()).optional()}),Kre=ae({command:M().describe("Command to run (e.g., 'npx', 'node')"),args:ye(M()).optional().describe("Command arguments"),cwd:M().optional().describe("Working directory"),envVars:ft(M(),M()).optional().describe("Environment variables (encrypted in storage)")}),jP=ae({id:M().describe("Unique identifier for the connection"),title:M().describe("Human-readable name for the connection"),created_at:M().describe("When the connection was created"),updated_at:M().describe("When the connection was last updated"),created_by:M().describe("User ID who created the connection"),updated_by:M().optional().describe("User ID who last updated the connection"),organization_id:M().describe("Organization ID this connection belongs to"),description:M().nullable().describe("Description of the connection"),icon:M().nullable().describe("Icon URL for the connection"),app_name:M().nullable().describe("Associated app name"),app_id:M().nullable().describe("Associated app ID"),connection_type:Ot(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:M().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:M().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:yt([Kre,Wre]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:Hre.nullable().describe("OAuth configuration"),configuration_state:ft(M(),st()).nullable().describe("Configuration state (decrypted)"),configuration_scopes:ye(M()).nullable().optional().describe("Configuration scopes"),metadata:ft(M(),st()).nullable().describe("Additional metadata (includes repository info)"),tools:ye(Zre).nullable().describe("Discovered tools from MCP"),bindings:ye(M()).nullable().describe("Detected bindings"),status:Ot(["active","inactive","error"]).describe("Current status")});jP.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0}).extend({icon:M().nullish()});jP.partial();function wae(e){return e!=null&&"command"in e}function Sae(e){return!e||!e.startsWith("virtual://")?null:e.replace("virtual://","")}const Vu=ae({connection_id:M().describe("Connection ID"),selected_tools:ye(M()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:ye(M()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:ye(M()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),$P=Vu.extend({selected_tools:Vu.shape.selected_tools.optional(),selected_resources:Vu.shape.selected_resources.optional(),selected_prompts:Vu.shape.selected_prompts.optional()}),Eae=ae({id:M().describe("Unique identifier"),title:M().describe("Human-readable name"),description:M().nullable().describe("Description"),icon:M().nullable().describe("Icon URL"),created_at:M().describe("Creation timestamp"),updated_at:M().describe("Last update timestamp"),created_by:M().describe("User ID who created this item"),updated_by:M().optional().describe("User ID who last updated this item"),organization_id:M().describe("Organization ID this item belongs to"),status:Ot(["active","inactive"]).describe("Current status"),metadata:ae({instructions:M().nullable().describe("Instructions also used as system prompt")}).loose().describe("Metadata"),connections:ye(Vu).describe("Connections with their selected tools, resources, and prompts")});ae({title:M().min(1).max(255).describe("Name for the virtual MCP"),description:M().nullable().optional().describe("Optional description"),icon:M().nullish().describe("Optional icon URL"),status:Ot(["active","inactive"]).optional().default("active").describe("Initial status"),metadata:ae({instructions:M().nullable().optional().describe("MCP server instructions")}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:ye($P).describe("Connections to include/exclude (can be empty for exclusion mode)")});ae({title:M().min(1).max(255).optional().describe("New name"),description:M().nullable().optional().describe("New description (null to clear)"),icon:M().nullish().describe("New icon URL"),status:Ot(["active","inactive"]).optional().describe("New status"),metadata:ae({instructions:M().nullable().optional().describe("MCP server instructions")}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:ye($P).optional().describe("New connections (replaces existing)")});var WC;(function(e){e.Completable="McpCompletable"})(WC||(WC={}));const Yre=[],Qre={id:Ure,description:zre,binding:Yre},Xre="workflows",Jre="Create workflows for platform end-users",eoe=A.lazy(()=>It(()=>import("./plugin-header-D_XJF06t.js"),__vite__mapDeps([71,6,19,72]))),toe=A.lazy(()=>It(()=>import("./plugin-empty-state-Cdi0lxlF.js"),__vite__mapDeps([73,72]))),noe={id:Xre,description:Jre,binding:[],renderHeader:e=>x.jsx(eoe,{...e}),renderEmptyState:()=>x.jsx(toe,{})},roe=[kre,$re,Qre,Lre,noe],ei=gL({component:()=>x.jsx(gQ,{children:x.jsx(A.Suspense,{fallback:x.jsx(PM,{}),children:x.jsx(AA,{})})})}),ooe=qt({getParentRoute:()=>ei,path:"/login",component:Jt(()=>It(()=>import("./login-CUcM51_h.js"),__vite__mapDeps([74,17,4,27]))),validateSearch:xo(()=>ae({next:M().optional(),client_id:M().optional(),redirect_uri:M().optional(),response_type:M().optional(),state:M().optional(),scope:M().optional(),code_challenge:M().optional(),code_challenge_method:M().optional()}))}),aoe=qt({getParentRoute:()=>ei,path:"/reset-password",component:Jt(()=>It(()=>import("./reset-password-BEvAUHxp.js"),__vite__mapDeps([75,17,4,27]))),validateSearch:xo(()=>ae({token:M().optional(),error:M().optional()}))}),soe=qt({getParentRoute:()=>ei,path:"/auth/$pathname",component:Jt(()=>It(()=>import("./auth-catchall-Bg2u42FQ.js"),[]))}),ioe=qt({getParentRoute:()=>ei,path:"/connect/$sessionId",component:Jt(()=>It(()=>import("./connect-CjbgNw43.js"),__vite__mapDeps([76,24,17,4,40,59,77])))}),coe=qt({getParentRoute:()=>ei,path:"/store/$appName",component:Jt(()=>It(()=>import("./store-invite-B6QzkY9D.js"),[])),validateSearch:xo(()=>ae({serverName:M().optional()}))}),loe=qt({getParentRoute:()=>ei,path:"/oauth/callback",component:Jt(()=>It(()=>import("./oauth-callback-Dsqe_oXS.js"),__vite__mapDeps([78,14,59])))}),fg=qt({getParentRoute:()=>ei,id:"shell",component:Jt(()=>It(()=>import("./shell-layout-DaVrqTvl.js"),__vite__mapDeps([79,80,4,81,25,82,52,17,83,84,62,24,85,86,87,27,53,42,43,6,19,88,11,89,48,36,23,90,3,91,58,92,37,38,93,41,94,22,95,68,96,97,51,7,46,47,26,98,99,8,100,67,54,101,102,28,13,29,103,14,40,49,104,105,106,107,108,64,15,109,57,110,45,63,72,12,111,32,112,65,113,114,115,39,44,116,1,35,50,117])))}),uoe=qt({getParentRoute:()=>fg,path:"/",component:Jt(()=>It(()=>import("./home-DoBwFvBu.js"),__vite__mapDeps([118,40,4,112,7,6,57,36,113,27,115,39,93,41,91,17])))}),doe=qt({getParentRoute:()=>fg,path:"/$org",beforeLoad:({params:e})=>{throw xb({to:"/$org/$project",params:{org:e.org,project:xm}})}}),ur=qt({getParentRoute:()=>fg,path:"/$org/$project",component:Jt(()=>It(()=>import("./project-layout-gRYIrnzO.js"),__vite__mapDeps([119,111,24,25,4])))}),foe=qt({getParentRoute:()=>ur,path:"/",component:Jt(()=>It(()=>import("./page-BLmopBsr.js"),__vite__mapDeps([120,80,4,81,25,82,52,17,83,84,62,24,85,86,87,27,53,42,43,6,19,88,11,89,48,36,23,90,3,91,58,92,37,38,93,41,94,22,95,68,96,97,51,7,46,47,26,98,99,8,100,67,54,101,102,28,13,29,103,14,40,49,104,105,106,107,108,64,15,109,121,57,122])))}),hoe=qt({getParentRoute:()=>ur,path:"/tasks",component:Jt(()=>It(()=>import("./tasks-B817iTsv.js"),__vite__mapDeps([123,80,4,81,25,82,52,17,83,84,62,24,85,86,87,27,53,42,43,6,19,88,11,89,48,36,23,90,3,91,58,92,37,38,93,41,94,22,95,68,96,97,51,7,46,47,26,98,99,8,100,67,54,101,102,28,13,29,103,14,40,49,104,105,106,107,108,64,15,124,112,31,32,125,126,127,128,63])))}),poe=qt({getParentRoute:()=>ur,path:"/settings",component:Jt(()=>It(()=>import("./project-settings-iakvSAMp.js"),__vite__mapDeps([129,107,4,127,8,17,25,27,45,93,41,24,44,52,84,62,130,131,132,133,134,108,14,57,42,43,6,19,16,38,39])))}),Yo=({params:e})=>{if(e.project!==xm)throw xb({to:"/$org/$project",params:{org:e.org,project:e.project}})},moe=qt({getParentRoute:()=>ur,path:"/projects",beforeLoad:Yo,component:Jt(()=>It(()=>import("./projects-list-BTf0o0Dw.js"),__vite__mapDeps([135,111,24,25,107,4,103,14,36,27,112,136,126,110,17,37,38,93,41,45,6,127,8])))}),goe=qt({getParentRoute:()=>ur,path:"/members",beforeLoad:Yo,component:Jt(()=>It(()=>import("./members-Dt-WMWXs.js"),__vite__mapDeps([137,102,4,28,6,8,68,11,13,58,43,29,103,14,36,27,107,127,94,22,5,46,52,17,25,138,139,24,83,84,62,112,26,39,37,38,140,141,57,15,44,86,87,93,41,42,19,45,40,33,56,113,53])))}),voe=qt({getParentRoute:()=>ur,path:"/mcps",beforeLoad:Yo,component:Jt(()=>It(()=>import("./connections-DSsqgW7V.js"),__vite__mapDeps([142,108,102,4,28,6,8,68,11,13,58,43,29,103,14,36,27,143,40,94,22,26,7,21,86,87,107,124,112,24,25,31,32,84,62,134,39,127,37,38,93,41,42,19,45,52,17,144,33,49,104,145,15,125,126,146,57]))),validateSearch:xo(()=>ae({action:Ot(["create"]).optional()}))}),yoe=qt({getParentRoute:()=>ur,path:"/mcps/$connectionId",beforeLoad:Yo,component:Jt(()=>It(()=>import("./connection-detail-1_ZQMYvG.js"),__vite__mapDeps([147,103,14,36,27,4,86,87,146,57,15,148,58,43,121,116,17,25,149,55,84,62,150,59,144,24,88,56,52,132,134,131,133,108,130,42,6,19,151,77,139,80,81,82,83,85,53,11,89,48,23,90,3,91,92,37,38,93,41,94,22,95,68,96,97,51,7,46,47,26,98,99,8,100,67,54,101,102,28,13,29,40,49,104,105,106,107,64,127,152,153,33,154,65,124,112,31,32,39,21,145,113,136,126,155,156]))),validateSearch:xo(()=>ae({tab:M().optional()}))}),_oe=qt({getParentRoute:()=>ur,path:"/mcps/$connectionId/$collectionName/$itemId",beforeLoad:Yo,component:Jt(()=>It(()=>import("./collection-detail-tuOZUkEg.js"),__vite__mapDeps([157,103,14,36,27,4,86,87,52,17,25,148,58,43,121,116,93,41,45,106,107,149,55,42,6,19,7,64,98,54,60,113,127,8,150,59,144,24,88,56,84,62,132,134,131,133,108,130,57,151,77,139,80,81,82,83,85,53,11,89,48,23,90,3,91,92,37,38,94,22,95,68,96,97,51,46,47,26,99,100,67,101,102,28,13,29,40,49,104,105,15,158,154,117,128,140,159]))),validateSearch:xo(()=>ae({replayId:M().optional()}))}),boe=qt({getParentRoute:()=>ur,path:"/monitoring",beforeLoad:Yo,component:Jt(()=>It(()=>import("./monitoring-DINJ4pYy.js"),__vite__mapDeps([160,103,14,36,27,4,107,127,8,86,87,161,26,53,58,43,6,54,9,34,56,60,158,91,42,19,64,94,22,29,151,25,33,57,15,143,40,28,39,138,139,90,3,52,17,82,98,11,5,45,152,44,41,144,24,30,97]))),validateSearch:xo(()=>ae({tab:Ot(["logs","analytics","dashboards"]).default("logs"),from:M().default("now-24h"),to:M().default("now"),connectionId:ye(M()).optional().default([]),virtualMcpId:ye(M()).optional().default([]),tool:M().default(""),status:Ot(["all","success","errors"]).default("all"),search:M().default(""),page:Pe().optional(),streaming:et().default(!0),propertyFilters:M().default(""),hideSystem:et().default(!1)}))}),woe=qt({getParentRoute:()=>ur,path:"/monitoring/dashboards/$dashboardId",beforeLoad:Yo,component:Jt(()=>It(()=>import("./monitoring-dashboard-view-B53vWJlZ.js"),__vite__mapDeps([162,25,4,161,26,53,58,43,6,54,9,34,56,60,158,91,42,19,64,8,27,105,86,87,106,107,127,45,98,11,57,15,113])))}),Soe=qt({getParentRoute:()=>ur,path:"/monitoring/dashboards/$dashboardId/edit",beforeLoad:Yo,component:Jt(()=>It(()=>import("./monitoring-dashboard-edit-ViuWKC7f.js"),__vite__mapDeps([163,86,4,87,52,17,25,27,94,22,5,6,53,19,42,43,70,60,57,105,15,30,106,107,149,55,14,127,8])))}),UP=qt({getParentRoute:()=>ur,path:"/store",beforeLoad:Yo,component:Jt(()=>It(()=>import("./page-BKBuf2HE.js"),__vite__mapDeps([164,107,4,127,8,87,34,65,14,105,36,24,2,3,134,25,52,17,165,103,27,166,58,43,69,104,141,57,145,40,94,22,133,53,6,19,113,84,62,85,86])))}),Eoe=qt({getParentRoute:()=>UP,path:"/$appName",component:Jt(()=>It(()=>import("./mcp-server-detail-BsuSFuH9.js"),__vite__mapDeps([167,7,14,107,4,94,22,21,19,57,28,6,8,50,103,36,27,155,24,88,133,156,100,101,102,68,11,13,58,43,29,26,40,87,49,104,105,106,152,166,69,141,145,127,84,62,52,17,25,144,85,131,132,134,108,165,66]))),validateSearch:xo(()=>ae({registryId:M().optional(),serverName:M().optional(),itemId:M().optional()}))}),Roe=qt({getParentRoute:()=>ur,path:"/agents",beforeLoad:Yo,component:Jt(()=>It(()=>import("./agents-Dp1lzRWx.js"),__vite__mapDeps([168,102,4,28,6,8,68,11,13,58,43,29,103,14,36,27,107,127,143,40,94,22,86,87,124,112,24,25,31,32,99,82,52,17,39,33,49,15,97,169,125,126]))),validateSearch:xo(()=>ae({action:Ot(["create"]).optional()}))}),xoe=qt({getParentRoute:()=>ur,path:"/agents/$agentId",beforeLoad:Yo,component:Jt(()=>It(()=>import("./agent-detail-Dm90C1dq.js"),__vite__mapDeps([170,81,25,82,52,17,83,84,62,24,85,86,4,87,27,53,42,43,6,19,88,11,89,48,36,23,90,3,103,14,94,22,148,58,121,116,26,44,45,8,10,60,57,122,159,97,127,106,107,149,55,101,102,28,68,13,29,40,49,104,105,5,37,38,144,92,165,98,54,66,169]))),validateSearch:xo(()=>ae({tab:M().optional()}))}),Toe=qt({getParentRoute:()=>ur,path:"/workflows",component:Jt(()=>It(()=>import("./workflow-D3d1tCTr.js"),__vite__mapDeps([171,25,153,108,102,4,28,6,8,68,11,13,58,43,29,103,14,36,27,40,94,22,54,33,96,49,15,154,65,124,112,24,31,32,132,39,52,17,57,106,107,86,87,127,84,62,48,114,72])))}),zP=qt({getParentRoute:()=>ur,path:"/$pluginId",component:Jt(()=>It(()=>import("./dynamic-plugin-layout-gS11xmZg.js"),__vite__mapDeps([172,14,62,1,24,52,17,25,23,4,107])))}),Ooe=[],Coe=[],VP=[];roe.forEach(e=>{if(!e.setup)return;const t={parentRoute:zP,routing:{createRoute:qt,lazyRouteComponent:Jt},registerRootSidebarItem:n=>Ooe.push({pluginId:e.id,...n}),registerSidebarGroup:n=>Coe.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{VP.push(...n)}};e.setup(t)});const Aoe=zP.addChildren(VP),Ioe=UP.addChildren([Eoe]),Noe=[foe,hoe,poe,moe,goe,voe,yoe,_oe,boe,woe,Soe,Ioe,Roe,xoe,Toe,Aoe],koe=ur.addChildren(Noe),Moe=fg.addChildren([uoe,doe,koe]),Poe=ei.addChildren([Moe,ooe,aoe,soe,loe,ioe,coe]),Doe=xL({routeTree:Poe}),Loe=document.getElementById("root");u5.createRoot(Loe).render(x.jsx(A.StrictMode,{children:x.jsx(CL,{router:Doe})}));export{cZ as $,iae as A,K5 as B,jP as C,H5 as D,qoe as E,fF as F,lg as G,Nm as H,NP as I,lq as J,iA as K,qre as L,hq as M,Boe as N,xm as O,bae as P,Yoe as Q,dZ as R,PM as S,pq as T,dq as U,Eae as V,fq as W,Qoe as X,uq as Y,aZ as Z,Joe as _,Im as a,w5 as a$,oZ as a0,sZ as a1,iZ as a2,Xoe as a3,tae as a4,eae as a5,nae as a6,rae as a7,oae as a8,pn as a9,Rk as aA,wZ as aB,SZ as aC,bZ as aD,km as aE,roe as aF,Dk as aG,DH as aH,Jb as aI,Tk as aJ,ZN as aK,e1 as aL,id as aM,$N as aN,Xb as aO,Qb as aP,LH as aQ,jH as aR,Koe as aS,Woe as aT,Zoe as aU,yd as aV,X0 as aW,Ju as aX,k5 as aY,or as aZ,Lr as a_,C5 as aa,Tte as ab,Nte as ac,fae as ad,Ni as ae,yx as af,zoe as ag,Uoe as ah,L4 as ai,$4 as aj,Voe as ak,ye as al,Ot as am,Us as an,Ad as ao,Sd as ap,dk as aq,Ed as ar,WH as as,Bn as at,KH as au,lt as av,jk as aw,Ya as ax,Hi as ay,jZ as az,wl as b,Go as b$,U$ as b0,FA as b1,Qe as b2,nt as b3,vr as b4,gb as b5,mt as b6,ug as b7,ft as b8,eo as b9,Mre as bA,cF as bB,IP as bC,Yne as bD,vae as bE,zte as bF,OU as bG,Goe as bH,lN as bI,jb as bJ,Hoe as bK,Coe as bL,EY as bM,aY as bN,aae as bO,Foe as bP,pae as bQ,aF as bR,rF as bS,JV as bT,gN as bU,Ur as bV,pZ as bW,RA as bX,TA as bY,fO as bZ,yH as b_,JI as ba,ar as bb,Pe as bc,yt as bd,et as be,De as bf,st as bg,xo as bh,El as bi,gae as bj,mae as bk,mr as bl,ee as bm,qo as bn,uk as bo,Ho as bp,Fte as bq,yP as br,Za as bs,Are as bt,It as bu,Ooe as bv,yae as bw,wV as bx,$oe as by,Rr as bz,bl as c,cd as c0,c1,fl as c2,Hs as c3,da as c4,Zo as c5,pk as c6,bH as c7,EH as c8,wH as c9,cH as ca,joe as cb,QC as cc,$5 as cd,V5 as ce,G5 as cf,F5 as cg,B5 as ch,W5 as ci,_x as cj,Z5 as ck,q5 as cl,YJ as cm,gt as cn,gP as co,Fee as cp,Ws as cq,Ba as cr,dae as cs,Yj as d,tl as e,cae as f,sae as g,lae as h,wae as i,x as j,ha as k,fa as l,AA as m,sA as n,ae as o,Sae as p,uF as q,A as r,M as s,xT as t,_ae as u,kN as v,dF as w,EN as x,PF as y,L5 as z};